deployer: use typescript constructor args

master
Yorick van Pelt 2023-04-23 09:43:11 +02:00
parent 795df06ff1
commit d2f5ba3ca2
Signed by: yorick
GPG Key ID: A36E70F9DC014A15
2 changed files with 2 additions and 5 deletions

View File

@ -99,10 +99,8 @@ function cmd<R>(target: { _commands?: string[] }, propertyKey: string, descripto
}
class MachineInterface {
machine: Machine
_commands?: string[]
constructor(machine: Machine) {
this.machine = machine
constructor(public machine: Machine) {
// hack:
delete this._commands
}

View File

@ -38,9 +38,8 @@ export async function ssh<R>(host: string, cb?: () => Promise<R>) {
}
export class SSH {
host: string;
child?: ChildProcess | null;
constructor(host: string) { this.host = host }
constructor(public host: string) { }
within<R>(cb: () => Promise<R>): Promise<R> {
return within(async () => {
$.spawn = (command: string, options: any): any => {