Comparing version 2.4.0 to 2.5.0
@@ -43,2 +43,3 @@ "use strict"; | ||
var Terminal_1 = __importDefault(require("./Terminal")); | ||
var FileSystem_1 = __importDefault(require("./FileSystem")); | ||
var AttachToContainer_1 = require("../TerminalCommands/AttachToContainer"); | ||
@@ -50,6 +51,8 @@ var ListRunningContainers_1 = require("../TerminalCommands/ListRunningContainers"); | ||
var RunContainer_1 = require("../TerminalCommands/RunContainer"); | ||
var ListDockerComposeFiles_1 = require("../TerminalCommands/ListDockerComposeFiles"); | ||
var TabulatedTable_1 = __importDefault(require("../Services/TabulatedTable")); | ||
var Factory = (function () { | ||
function Factory(terminal) { | ||
function Factory(terminal, disk) { | ||
this.terminal = terminal; | ||
this.disk = disk; | ||
} | ||
@@ -91,2 +94,9 @@ Factory.prototype.ListRunningContainers = function () { | ||
}; | ||
Factory.prototype.ListDockerComposeFiles = function (directoryPath) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2, new ListDockerComposeFiles_1.ListDockerComposeFiles(this.terminal, this.disk, directoryPath)]; | ||
}); | ||
}); | ||
}; | ||
Factory.prototype.AttachToContainer = function (options) { | ||
@@ -104,6 +114,7 @@ return __awaiter(this, void 0, void 0, function () { | ||
exports.Factory = Factory; | ||
exports.factory = function (terminal) { | ||
exports.factory = function (terminal, disk) { | ||
if (terminal === void 0) { terminal = Terminal_1["default"](); } | ||
return new Factory(terminal); | ||
if (disk === void 0) { disk = FileSystem_1["default"](); } | ||
return new Factory(terminal, disk); | ||
}; | ||
//# sourceMappingURL=CommandFactory.js.map |
@@ -10,2 +10,3 @@ "use strict"; | ||
var runContainer_1 = __importDefault(require("./runContainer")); | ||
var runDockerCompose_1 = __importDefault(require("./runDockerCompose")); | ||
var tasks = [ | ||
@@ -16,4 +17,5 @@ attachToRunningContainer_1["default"], | ||
runContainer_1["default"], | ||
runDockerCompose_1["default"], | ||
]; | ||
exports["default"] = tasks; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "dssh", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "CLI utility providing handy docker shortcuts", | ||
@@ -5,0 +5,0 @@ "main": "build/app.js", |
@@ -21,1 +21,6 @@ export interface ITerminal { | ||
} | ||
export interface IFileLocation { | ||
absolutePath: string; | ||
name: string; | ||
} |
import createTerminalInstance from './Terminal'; | ||
import createFileSystem, { FileSystem } from './FileSystem'; | ||
import { AttachToContainer } from '../TerminalCommands/AttachToContainer'; | ||
@@ -9,6 +10,7 @@ import { ListRunningContainers } from '../TerminalCommands/ListRunningContainers'; | ||
import { RunContainer } from '../TerminalCommands/RunContainer'; | ||
import { ListDockerComposeFiles } from '../TerminalCommands/ListDockerComposeFiles'; | ||
import createTabulatedTable from '../Services/TabulatedTable'; | ||
export class Factory { | ||
public constructor(private terminal: ITerminal) {} | ||
public constructor(private terminal: ITerminal, private disk: FileSystem) {} | ||
@@ -35,2 +37,8 @@ public async ListRunningContainers(): Promise<ListRunningContainers> { | ||
public async ListDockerComposeFiles( | ||
directoryPath: string | ||
): Promise<ListDockerComposeFiles> { | ||
return new ListDockerComposeFiles(this.terminal, this.disk, directoryPath); | ||
} | ||
public async AttachToContainer(options: { | ||
@@ -45,4 +53,7 @@ containerId: string; | ||
export const factory = (terminal: ITerminal = createTerminalInstance()) => { | ||
return new Factory(terminal); | ||
export const factory = ( | ||
terminal: ITerminal = createTerminalInstance(), | ||
disk: FileSystem = createFileSystem() | ||
) => { | ||
return new Factory(terminal, disk); | ||
}; |
@@ -9,2 +9,3 @@ interface ITask { | ||
import runContainer from './runContainer'; | ||
import runDockerCompose from './runDockerCompose'; | ||
@@ -16,4 +17,5 @@ const tasks: ITask[] = [ | ||
runContainer, | ||
runDockerCompose, | ||
]; | ||
export default tasks; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128405
79
2347
1