ssh-client-wrapper 3.1.4 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/agent.js +1 -1
- package/lib/fork.js +3 -2
- package/package.json +3 -3
package/lib/agent.js
CHANGED
|
@@ -5,7 +5,7 @@ import { execFile } from "node:child_process";
|
|
|
5
5
|
import { promisify } from "node:util";
|
|
6
6
|
import { setTimeout as setTimeoutPromise } from "node:timers/promises";
|
|
7
7
|
import Debug from "debug";
|
|
8
|
-
import { spawn } from "node-pty
|
|
8
|
+
import { spawn } from "node-pty";
|
|
9
9
|
import { rePhPrompt } from "./util.js";
|
|
10
10
|
|
|
11
11
|
const debug = Debug("sshClientWrapper:debug:agent");
|
package/lib/fork.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Debug from "debug";
|
|
2
|
-
import { spawn } from "node-pty
|
|
2
|
+
import { spawn } from "node-pty";
|
|
3
3
|
|
|
4
4
|
import { rePwPrompt, rePhPrompt, reNewHostPrompt, reRemoteHostIdentificationHasChanged, buff2String, sendPty, watchDogTimer } from "./util.js";
|
|
5
5
|
|
|
@@ -85,7 +85,8 @@ export function createMasterPty(hostInfo) {
|
|
|
85
85
|
export async function fork(hostInfo, cmd, args, timeout, outputCallback, retryableExitCodes = [], expects = []) {
|
|
86
86
|
return new Promise((resolve, reject)=>{
|
|
87
87
|
debug(`cmd=${cmd}: args=${args}`);
|
|
88
|
-
|
|
88
|
+
//node-pty accepts only string arguments (e.g. the port number is a number)
|
|
89
|
+
const ptyProcess = spawn(cmd, args.map(String), nodePtyOpt);
|
|
89
90
|
let ac = null;
|
|
90
91
|
if (timeout > 0) {
|
|
91
92
|
ac = watchDogTimer(timeout, cmd, ()=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ssh-client-wrapper",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "wrapper library for open ssh client and rsync",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ssh",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"ajv": "^8.17.1",
|
|
44
44
|
"ajv-keywords": "^5.1.0",
|
|
45
45
|
"debug": "^4.4.3",
|
|
46
|
-
"glob": "^
|
|
47
|
-
"node-pty
|
|
46
|
+
"glob": "^14.0.2",
|
|
47
|
+
"node-pty": "^1.1.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@eslint/js": "^9.33.0",
|