deployer: use typescript constructor args
parent
795df06ff1
commit
d2f5ba3ca2
|
@ -99,10 +99,8 @@ function cmd<R>(target: { _commands?: string[] }, propertyKey: string, descripto
|
||||||
}
|
}
|
||||||
|
|
||||||
class MachineInterface {
|
class MachineInterface {
|
||||||
machine: Machine
|
|
||||||
_commands?: string[]
|
_commands?: string[]
|
||||||
constructor(machine: Machine) {
|
constructor(public machine: Machine) {
|
||||||
this.machine = machine
|
|
||||||
// hack:
|
// hack:
|
||||||
delete this._commands
|
delete this._commands
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,9 +38,8 @@ export async function ssh<R>(host: string, cb?: () => Promise<R>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SSH {
|
export class SSH {
|
||||||
host: string;
|
|
||||||
child?: ChildProcess | null;
|
child?: ChildProcess | null;
|
||||||
constructor(host: string) { this.host = host }
|
constructor(public host: string) { }
|
||||||
within<R>(cb: () => Promise<R>): Promise<R> {
|
within<R>(cb: () => Promise<R>): Promise<R> {
|
||||||
return within(async () => {
|
return within(async () => {
|
||||||
$.spawn = (command: string, options: any): any => {
|
$.spawn = (command: string, options: any): any => {
|
||||||
|
|
Loading…
Reference in New Issue