Skip to content

Commit

Permalink
api optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonewu committed Dec 18, 2022
1 parent 2aea983 commit efdf968
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": false,
"name": "ssh-tunneling",
"version": "1.0.8",
"version": "1.0.9",
"description": "a ssh-tunneling client for nodejs",
"keywords": ["ssh tunnel", "ssh tunneling", "ssh proxy", "ssh port foward"],
"main": "dist/index.js",
Expand Down
8 changes: 2 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class SshTunnel {
});
}

public exec(command: string): Promise<{ command: string; result: string }>
public exec(command: string): Promise<string>

public exec(command: string[]): Promise<{ command: string; result: string }[]>

Expand All @@ -241,11 +241,7 @@ class SshTunnel {
}
});
}
const result = await this._exec(command);
return {
command,
result
}
return this._exec(command);
}

/**
Expand Down

0 comments on commit efdf968

Please sign in to comment.