pty-shell 1.0.5 → 1.0.6
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/dist/index.js +6 -2
- package/package.json +39 -39
package/dist/index.js
CHANGED
|
@@ -334,8 +334,12 @@ class PtyShell {
|
|
|
334
334
|
if (this.child) {
|
|
335
335
|
// SystemUtil.killProcess(this.child.pid);
|
|
336
336
|
const pid = this.child.pid;
|
|
337
|
-
this.
|
|
338
|
-
|
|
337
|
+
if (this.on_child_kill) {
|
|
338
|
+
this.exec_end_call(code, pid);
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
this.child.kill(); // 不同平台信号不同 win 默认 SIGHUP
|
|
342
|
+
}
|
|
339
343
|
this.child = undefined;
|
|
340
344
|
}
|
|
341
345
|
}
|
package/package.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pty-shell",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "a virtual PTY shell for javaScript",
|
|
5
|
-
"author": "xiaobaidadada",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git@github.com:xiaobaidadada/pty-shell.git"
|
|
11
|
-
},
|
|
12
|
-
"homepage": "https://github.com/xiaobaidadada/pty-shell",
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/xiaobaidadada/pty-shell/issues"
|
|
15
|
-
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "tsc"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@types/node": "^22.13.10",
|
|
21
|
-
"typescript": "^5.5.3"
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"dist/**/*",
|
|
25
|
-
"LICENSE.txt",
|
|
26
|
-
"README.md",
|
|
27
|
-
"package.json"
|
|
28
|
-
],
|
|
29
|
-
"keywords":[
|
|
30
|
-
"pty",
|
|
31
|
-
"shell",
|
|
32
|
-
"tty",
|
|
33
|
-
"terminal",
|
|
34
|
-
"browser",
|
|
35
|
-
"web",
|
|
36
|
-
"virtual",
|
|
37
|
-
"command intercept"
|
|
38
|
-
]
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "pty-shell",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "a virtual PTY shell for javaScript",
|
|
5
|
+
"author": "xiaobaidadada",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git@github.com:xiaobaidadada/pty-shell.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/xiaobaidadada/pty-shell",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/xiaobaidadada/pty-shell/issues"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/node": "^22.13.10",
|
|
21
|
+
"typescript": "^5.5.3"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist/**/*",
|
|
25
|
+
"LICENSE.txt",
|
|
26
|
+
"README.md",
|
|
27
|
+
"package.json"
|
|
28
|
+
],
|
|
29
|
+
"keywords":[
|
|
30
|
+
"pty",
|
|
31
|
+
"shell",
|
|
32
|
+
"tty",
|
|
33
|
+
"terminal",
|
|
34
|
+
"browser",
|
|
35
|
+
"web",
|
|
36
|
+
"virtual",
|
|
37
|
+
"command intercept"
|
|
38
|
+
]
|
|
39
|
+
}
|