@termiq/cli 0.1.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.
Files changed (66) hide show
  1. package/LICENSE +54 -0
  2. package/README.md +61 -0
  3. package/dist/bin.js +102 -0
  4. package/dist/node_modules/node-pty/LICENSE +69 -0
  5. package/dist/node_modules/node-pty/README.md +165 -0
  6. package/dist/node_modules/node-pty/lib/conpty_console_list_agent.js +16 -0
  7. package/dist/node_modules/node-pty/lib/conpty_console_list_agent.js.map +1 -0
  8. package/dist/node_modules/node-pty/lib/eventEmitter2.js +47 -0
  9. package/dist/node_modules/node-pty/lib/eventEmitter2.js.map +1 -0
  10. package/dist/node_modules/node-pty/lib/eventEmitter2.test.js +30 -0
  11. package/dist/node_modules/node-pty/lib/eventEmitter2.test.js.map +1 -0
  12. package/dist/node_modules/node-pty/lib/index.js +52 -0
  13. package/dist/node_modules/node-pty/lib/index.js.map +1 -0
  14. package/dist/node_modules/node-pty/lib/interfaces.js +7 -0
  15. package/dist/node_modules/node-pty/lib/interfaces.js.map +1 -0
  16. package/dist/node_modules/node-pty/lib/shared/conout.js +11 -0
  17. package/dist/node_modules/node-pty/lib/shared/conout.js.map +1 -0
  18. package/dist/node_modules/node-pty/lib/terminal.js +190 -0
  19. package/dist/node_modules/node-pty/lib/terminal.js.map +1 -0
  20. package/dist/node_modules/node-pty/lib/terminal.test.js +139 -0
  21. package/dist/node_modules/node-pty/lib/terminal.test.js.map +1 -0
  22. package/dist/node_modules/node-pty/lib/testUtils.test.js +28 -0
  23. package/dist/node_modules/node-pty/lib/testUtils.test.js.map +1 -0
  24. package/dist/node_modules/node-pty/lib/types.js +7 -0
  25. package/dist/node_modules/node-pty/lib/types.js.map +1 -0
  26. package/dist/node_modules/node-pty/lib/unixTerminal.js +346 -0
  27. package/dist/node_modules/node-pty/lib/unixTerminal.js.map +1 -0
  28. package/dist/node_modules/node-pty/lib/unixTerminal.test.js +351 -0
  29. package/dist/node_modules/node-pty/lib/unixTerminal.test.js.map +1 -0
  30. package/dist/node_modules/node-pty/lib/utils.js +39 -0
  31. package/dist/node_modules/node-pty/lib/utils.js.map +1 -0
  32. package/dist/node_modules/node-pty/lib/windowsConoutConnection.js +125 -0
  33. package/dist/node_modules/node-pty/lib/windowsConoutConnection.js.map +1 -0
  34. package/dist/node_modules/node-pty/lib/windowsPtyAgent.js +320 -0
  35. package/dist/node_modules/node-pty/lib/windowsPtyAgent.js.map +1 -0
  36. package/dist/node_modules/node-pty/lib/windowsPtyAgent.test.js +90 -0
  37. package/dist/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +1 -0
  38. package/dist/node_modules/node-pty/lib/windowsTerminal.js +199 -0
  39. package/dist/node_modules/node-pty/lib/windowsTerminal.js.map +1 -0
  40. package/dist/node_modules/node-pty/lib/windowsTerminal.test.js +219 -0
  41. package/dist/node_modules/node-pty/lib/windowsTerminal.test.js.map +1 -0
  42. package/dist/node_modules/node-pty/lib/worker/conoutSocketWorker.js +22 -0
  43. package/dist/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +1 -0
  44. package/dist/node_modules/node-pty/node-addon-api@7.1.1/node_modules/node-addon-api/node_addon_api_except.stamp +0 -0
  45. package/dist/node_modules/node-pty/package.json +64 -0
  46. package/dist/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
  47. package/dist/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
  48. package/dist/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
  49. package/dist/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
  50. package/dist/node_modules/node-pty/prebuilds/linux-x64/pty.node +0 -0
  51. package/dist/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
  52. package/dist/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
  53. package/dist/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
  54. package/dist/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
  55. package/dist/node_modules/node-pty/prebuilds/win32-arm64/pty.node +0 -0
  56. package/dist/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
  57. package/dist/node_modules/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
  58. package/dist/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
  59. package/dist/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
  60. package/dist/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
  61. package/dist/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
  62. package/dist/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
  63. package/dist/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
  64. package/dist/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
  65. package/dist/node_modules/node-pty/typings/node-pty.d.ts +211 -0
  66. package/package.json +48 -0
@@ -0,0 +1,219 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2017, Daniel Imms (MIT License).
4
+ * Copyright (c) 2018, Microsoft Corporation (MIT License).
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ var fs = require("fs");
8
+ var assert = require("assert");
9
+ var windowsTerminal_1 = require("./windowsTerminal");
10
+ var path = require("path");
11
+ var psList = require("ps-list");
12
+ function pollForProcessState(desiredState, intervalMs, timeoutMs) {
13
+ if (intervalMs === void 0) { intervalMs = 100; }
14
+ if (timeoutMs === void 0) { timeoutMs = 2000; }
15
+ return new Promise(function (resolve) {
16
+ var tries = 0;
17
+ var interval = setInterval(function () {
18
+ psList({ all: true }).then(function (ps) {
19
+ var success = true;
20
+ var pids = Object.keys(desiredState).map(function (k) { return parseInt(k, 10); });
21
+ console.log('expected pids', JSON.stringify(pids));
22
+ pids.forEach(function (pid) {
23
+ if (desiredState[pid]) {
24
+ if (!ps.some(function (p) { return p.pid === pid; })) {
25
+ console.log("pid " + pid + " does not exist");
26
+ success = false;
27
+ }
28
+ }
29
+ else {
30
+ if (ps.some(function (p) { return p.pid === pid; })) {
31
+ console.log("pid " + pid + " still exists");
32
+ success = false;
33
+ }
34
+ }
35
+ });
36
+ if (success) {
37
+ clearInterval(interval);
38
+ resolve();
39
+ return;
40
+ }
41
+ tries++;
42
+ if (tries * intervalMs >= timeoutMs) {
43
+ clearInterval(interval);
44
+ var processListing = pids.map(function (k) { return k + ": " + desiredState[k]; }).join('\n');
45
+ assert.fail("Bad process state, expected:\n" + processListing);
46
+ resolve();
47
+ }
48
+ });
49
+ }, intervalMs);
50
+ });
51
+ }
52
+ function pollForProcessTreeSize(pid, size, intervalMs, timeoutMs) {
53
+ if (intervalMs === void 0) { intervalMs = 100; }
54
+ if (timeoutMs === void 0) { timeoutMs = 2000; }
55
+ return new Promise(function (resolve) {
56
+ var tries = 0;
57
+ var interval = setInterval(function () {
58
+ psList({ all: true }).then(function (ps) {
59
+ var openList = [];
60
+ openList.push(ps.filter(function (p) { return p.pid === pid; }).map(function (p) {
61
+ return { name: p.name, pid: p.pid };
62
+ })[0]);
63
+ var list = [];
64
+ var _loop_1 = function () {
65
+ var current = openList.shift();
66
+ ps.filter(function (p) { return p.ppid === current.pid; }).map(function (p) {
67
+ return { name: p.name, pid: p.pid };
68
+ }).forEach(function (p) { return openList.push(p); });
69
+ list.push(current);
70
+ };
71
+ while (openList.length) {
72
+ _loop_1();
73
+ }
74
+ console.log('list', JSON.stringify(list));
75
+ var success = list.length === size;
76
+ if (success) {
77
+ clearInterval(interval);
78
+ resolve(list);
79
+ return;
80
+ }
81
+ tries++;
82
+ if (tries * intervalMs >= timeoutMs) {
83
+ clearInterval(interval);
84
+ assert.fail("Bad process state, expected: " + size + ", actual: " + list.length);
85
+ }
86
+ });
87
+ }, intervalMs);
88
+ });
89
+ }
90
+ if (process.platform === 'win32') {
91
+ [[false, false], [true, false], [true, true]].forEach(function (_a) {
92
+ var useConpty = _a[0], useConptyDll = _a[1];
93
+ describe("WindowsTerminal (useConpty = " + useConpty + ", useConptyDll = " + useConptyDll + ")", function () {
94
+ describe('kill', function () {
95
+ it('should not crash parent process', function (done) {
96
+ this.timeout(20000);
97
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
98
+ term.on('exit', function () { return done(); });
99
+ term.kill();
100
+ });
101
+ it('should kill the process tree', function (done) {
102
+ this.timeout(20000);
103
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
104
+ // Start sub-processes
105
+ term.write('powershell.exe\r');
106
+ term.write('node.exe\r');
107
+ console.log('start poll for tree size');
108
+ pollForProcessTreeSize(term.pid, 3, 500, 5000).then(function (list) {
109
+ assert.strictEqual(list[0].name.toLowerCase(), 'cmd.exe');
110
+ assert.strictEqual(list[1].name.toLowerCase(), 'powershell.exe');
111
+ assert.strictEqual(list[2].name.toLowerCase(), 'node.exe');
112
+ term.kill();
113
+ var desiredState = {};
114
+ desiredState[list[0].pid] = false;
115
+ desiredState[list[1].pid] = false;
116
+ desiredState[list[2].pid] = false;
117
+ term.on('exit', function () {
118
+ pollForProcessState(desiredState, 1000, 5000).then(function () {
119
+ done();
120
+ });
121
+ });
122
+ });
123
+ });
124
+ });
125
+ describe('resize', function () {
126
+ it('should throw a non-native exception when resizing an invalid value', function (done) {
127
+ this.timeout(20000);
128
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
129
+ assert.throws(function () { return term.resize(-1, -1); });
130
+ assert.throws(function () { return term.resize(0, 0); });
131
+ assert.doesNotThrow(function () { return term.resize(1, 1); });
132
+ term.on('exit', function () {
133
+ done();
134
+ });
135
+ term.kill();
136
+ });
137
+ it('should throw a non-native exception when resizing a killed terminal', function (done) {
138
+ this.timeout(20000);
139
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
140
+ term._defer(function () {
141
+ term.once('exit', function () {
142
+ assert.throws(function () { return term.resize(1, 1); });
143
+ done();
144
+ });
145
+ term.destroy();
146
+ });
147
+ });
148
+ });
149
+ describe('Args as CommandLine', function () {
150
+ it('should not fail running a file containing a space in the path', function (done) {
151
+ this.timeout(10000);
152
+ var spaceFolder = path.resolve(__dirname, '..', 'fixtures', 'space folder');
153
+ if (!fs.existsSync(spaceFolder)) {
154
+ fs.mkdirSync(spaceFolder);
155
+ }
156
+ var cmdCopiedPath = path.resolve(spaceFolder, 'cmd.exe');
157
+ var data = fs.readFileSync(process.env.windir + "\\System32\\cmd.exe");
158
+ fs.writeFileSync(cmdCopiedPath, data);
159
+ if (!fs.existsSync(cmdCopiedPath)) {
160
+ // Skip test if git bash isn't installed
161
+ return;
162
+ }
163
+ var term = new windowsTerminal_1.WindowsTerminal(cmdCopiedPath, '/c echo "hello world"', { useConpty: useConpty, useConptyDll: useConptyDll });
164
+ var result = '';
165
+ term.on('data', function (data) {
166
+ result += data;
167
+ });
168
+ term.on('exit', function () {
169
+ assert.ok(result.indexOf('hello world') >= 1);
170
+ done();
171
+ });
172
+ });
173
+ });
174
+ describe('env', function () {
175
+ it('should set environment variables of the shell', function (done) {
176
+ this.timeout(10000);
177
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '/C echo %FOO%', { useConpty: useConpty, useConptyDll: useConptyDll, env: { FOO: 'BAR' } });
178
+ var result = '';
179
+ term.on('data', function (data) {
180
+ result += data;
181
+ });
182
+ term.on('exit', function () {
183
+ assert.ok(result.indexOf('BAR') >= 0);
184
+ done();
185
+ });
186
+ });
187
+ });
188
+ describe('On close', function () {
189
+ it('should return process zero exit codes', function (done) {
190
+ this.timeout(10000);
191
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '/C exit', { useConpty: useConpty, useConptyDll: useConptyDll });
192
+ term.on('exit', function (code) {
193
+ assert.strictEqual(code, 0);
194
+ done();
195
+ });
196
+ });
197
+ it('should return process non-zero exit codes', function (done) {
198
+ this.timeout(10000);
199
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '/C exit 2', { useConpty: useConpty, useConptyDll: useConptyDll });
200
+ term.on('exit', function (code) {
201
+ assert.strictEqual(code, 2);
202
+ done();
203
+ });
204
+ });
205
+ });
206
+ describe('Write', function () {
207
+ it('should accept input', function (done) {
208
+ this.timeout(10000);
209
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '', { useConpty: useConpty, useConptyDll: useConptyDll });
210
+ term.write('exit\r');
211
+ term.on('exit', function () {
212
+ done();
213
+ });
214
+ });
215
+ });
216
+ });
217
+ });
218
+ }
219
+ //# sourceMappingURL=windowsTerminal.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windowsTerminal.test.js","sourceRoot":"","sources":["../src/windowsTerminal.test.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,uBAAyB;AACzB,+BAAiC;AACjC,qDAAoD;AACpD,2BAA6B;AAC7B,gCAAkC;AAYlC,SAAS,mBAAmB,CAAC,YAA2B,EAAE,UAAwB,EAAE,SAAwB;IAAlD,2BAAA,EAAA,gBAAwB;IAAE,0BAAA,EAAA,gBAAwB;IAC1G,OAAO,IAAI,OAAO,CAAO,UAAA,OAAO;QAC9B,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAM,QAAQ,GAAG,WAAW,CAAC;YAC3B,MAAM,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,UAAA,EAAE;gBAC3B,IAAI,OAAO,GAAG,IAAI,CAAC;gBACnB,IAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,EAAf,CAAe,CAAC,CAAC;gBACjE,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,IAA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AE,CAAC,CAAC,CAAC;wBAC5B,IAAI,EAAE,CAAC;oBACT,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;gBAEH,EAAE,CAAC,2CAA2C,EAAE,UAAU,IAAI;oBAC5D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;oBACpB,IAAM,IAAI,GAAG,IAAI,iCAAe,CAAC,SAAS,EAAE,WAAW,EAAE,EAAE,SAAS,WAAA,EAAE,YAAY,cAAA,EAAE,CAAC,CAAC;oBACtF,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,UAAC,IAAI;wBACnB,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;wBAC5B,IAAI,EAAE,CAAC;oBACT,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,QAAQ,CAAC,OAAO,EAAE;gBAChB,EAAE,CAAC,qBAAqB,EAAE,UAAU,IAAI;oBACtC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;oBACpB,IAAM,IAAI,GAAG,IAAI,iCAAe,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,SAAS,WAAA,EAAE,YAAY,cAAA,EAAE,CAAC,CAAC;oBAC7E,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;oBACrB,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE;wBACd,IAAI,EAAE,CAAC;oBACT,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;CACJ"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2020, Microsoft Corporation (MIT License).
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var worker_threads_1 = require("worker_threads");
7
+ var net_1 = require("net");
8
+ var conout_1 = require("../shared/conout");
9
+ var conoutPipeName = worker_threads_1.workerData.conoutPipeName;
10
+ var conoutSocket = new net_1.Socket();
11
+ conoutSocket.setEncoding('utf8');
12
+ conoutSocket.connect(conoutPipeName, function () {
13
+ var server = net_1.createServer(function (workerSocket) {
14
+ conoutSocket.pipe(workerSocket);
15
+ });
16
+ server.listen(conout_1.getWorkerPipeName(conoutPipeName));
17
+ if (!worker_threads_1.parentPort) {
18
+ throw new Error('worker_threads parentPort is null');
19
+ }
20
+ worker_threads_1.parentPort.postMessage(1 /* READY */);
21
+ });
22
+ //# sourceMappingURL=conoutSocketWorker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conoutSocketWorker.js","sourceRoot":"","sources":["../../src/worker/conoutSocketWorker.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,iDAAwD;AACxD,2BAA2C;AAC3C,2CAAuF;AAE/E,IAAA,cAAc,GAAM,2BAA0B,eAAhC,CAAiC;AAEvD,IAAM,YAAY,GAAG,IAAI,YAAM,EAAE,CAAC;AAClC,YAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACjC,YAAY,CAAC,OAAO,CAAC,cAAc,EAAE;IACnC,IAAM,MAAM,GAAG,kBAAY,CAAC,UAAA,YAAY;QACtC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,MAAM,CAAC,0BAAiB,CAAC,cAAc,CAAC,CAAC,CAAC;IACjD,IAAI,CAAC,2BAAU,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;KACtD;IACD,2BAAU,CAAC,WAAW,eAA2B,CAAC;AACpD,CAAC,CAAC,CAAC"}
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "node-pty",
3
+ "description": "Fork pseudoterminals in Node.JS",
4
+ "author": {
5
+ "name": "Microsoft Corporation"
6
+ },
7
+ "version": "1.1.0",
8
+ "license": "MIT",
9
+ "main": "./lib/index.js",
10
+ "types": "./typings/node-pty.d.ts",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git://github.com/microsoft/node-pty.git"
14
+ },
15
+ "files": [
16
+ "binding.gyp",
17
+ "lib/",
18
+ "scripts/",
19
+ "src/",
20
+ "deps/",
21
+ "prebuilds/",
22
+ "third_party/",
23
+ "typings/"
24
+ ],
25
+ "homepage": "https://github.com/microsoft/node-pty",
26
+ "bugs": {
27
+ "url": "https://github.com/microsoft/node-pty/issues"
28
+ },
29
+ "keywords": [
30
+ "pty",
31
+ "tty",
32
+ "terminal",
33
+ "pseudoterminal",
34
+ "forkpty",
35
+ "openpty"
36
+ ],
37
+ "scripts": {
38
+ "build": "tsc -b ./src/tsconfig.json",
39
+ "watch": "tsc -b -w ./src/tsconfig.json",
40
+ "lint": "eslint -c .eslintrc.js --ext .ts src/",
41
+ "install": "node scripts/prebuild.js || node-gyp rebuild",
42
+ "postinstall": "node scripts/post-install.js",
43
+ "compileCommands": "node scripts/gen-compile-commands.js",
44
+ "test": "cross-env NODE_ENV=test mocha -R spec --exit lib/*.test.js",
45
+ "posttest": "npm run lint",
46
+ "prepare": "npm run build",
47
+ "prepublishOnly": "npm run build"
48
+ },
49
+ "dependencies": {
50
+ "node-addon-api": "^7.1.0"
51
+ },
52
+ "devDependencies": {
53
+ "@types/mocha": "^7.0.2",
54
+ "@types/node": "12",
55
+ "@typescript-eslint/eslint-plugin": "^2.27.0",
56
+ "@typescript-eslint/parser": "^2.27.0",
57
+ "cross-env": "^5.1.4",
58
+ "eslint": "^6.8.0",
59
+ "mocha": "10",
60
+ "node-gyp": "^11.4.2",
61
+ "ps-list": "^6.0.0",
62
+ "typescript": "^3.8.3"
63
+ }
64
+ }
@@ -0,0 +1,211 @@
1
+ /**
2
+ * Copyright (c) 2017, Daniel Imms (MIT License).
3
+ * Copyright (c) 2018, Microsoft Corporation (MIT License).
4
+ */
5
+
6
+ declare module 'node-pty' {
7
+ /**
8
+ * Forks a process as a pseudoterminal.
9
+ * @param file The file to launch.
10
+ * @param args The file's arguments as argv (string[]) or in a pre-escaped CommandLine format
11
+ * (string). Note that the CommandLine option is only available on Windows and is expected to be
12
+ * escaped properly.
13
+ * @param options The options of the terminal.
14
+ * @see CommandLineToArgvW https://msdn.microsoft.com/en-us/library/windows/desktop/bb776391(v=vs.85).aspx
15
+ * @see Parsing C++ Comamnd-Line Arguments https://msdn.microsoft.com/en-us/library/17w5ykft.aspx
16
+ * @see GetCommandLine https://msdn.microsoft.com/en-us/library/windows/desktop/ms683156.aspx
17
+ */
18
+ export function spawn(file: string, args: string[] | string, options: IPtyForkOptions | IWindowsPtyForkOptions): IPty;
19
+
20
+ export interface IBasePtyForkOptions {
21
+
22
+ /**
23
+ * Name of the terminal to be set in environment ($TERM variable).
24
+ */
25
+ name?: string;
26
+
27
+ /**
28
+ * Number of intial cols of the pty.
29
+ */
30
+ cols?: number;
31
+
32
+ /**
33
+ * Number of initial rows of the pty.
34
+ */
35
+ rows?: number;
36
+
37
+ /**
38
+ * Working directory to be set for the child program.
39
+ */
40
+ cwd?: string;
41
+
42
+ /**
43
+ * Environment to be set for the child program.
44
+ */
45
+ env?: { [key: string]: string | undefined };
46
+
47
+ /**
48
+ * String encoding of the underlying pty.
49
+ * If set, incoming data will be decoded to strings and outgoing strings to bytes applying this encoding.
50
+ * If unset, incoming data will be delivered as raw bytes (Buffer type).
51
+ * By default 'utf8' is assumed, to unset it explicitly set it to `null`.
52
+ */
53
+ encoding?: string | null;
54
+
55
+ /**
56
+ * (EXPERIMENTAL)
57
+ * Whether to enable flow control handling (false by default). If enabled a message of `flowControlPause`
58
+ * will pause the socket and thus blocking the child program execution due to buffer back pressure.
59
+ * A message of `flowControlResume` will resume the socket into flow mode.
60
+ * For performance reasons only a single message as a whole will match (no message part matching).
61
+ * If flow control is enabled the `flowControlPause` and `flowControlResume` messages are not forwarded to
62
+ * the underlying pseudoterminal.
63
+ */
64
+ handleFlowControl?: boolean;
65
+
66
+ /**
67
+ * (EXPERIMENTAL)
68
+ * The string that should pause the pty when `handleFlowControl` is true. Default is XOFF ('\x13').
69
+ */
70
+ flowControlPause?: string;
71
+
72
+ /**
73
+ * (EXPERIMENTAL)
74
+ * The string that should resume the pty when `handleFlowControl` is true. Default is XON ('\x11').
75
+ */
76
+ flowControlResume?: string;
77
+ }
78
+
79
+ export interface IPtyForkOptions extends IBasePtyForkOptions {
80
+ /**
81
+ * Security warning: use this option with great caution,
82
+ * as opened file descriptors with higher privileges might leak to the child program.
83
+ */
84
+ uid?: number;
85
+ gid?: number;
86
+ }
87
+
88
+ export interface IWindowsPtyForkOptions extends IBasePtyForkOptions {
89
+ /**
90
+ * Whether to use the ConPTY system on Windows. When this is not set, ConPTY will be used when
91
+ * the Windows build number is >= 18309 (instead of winpty). Note that ConPTY is available from
92
+ * build 17134 but is too unstable to enable by default.
93
+ *
94
+ * This setting does nothing on non-Windows.
95
+ */
96
+ useConpty?: boolean;
97
+
98
+ /**
99
+ * (EXPERIMENTAL)
100
+ *
101
+ * Whether to use the conpty.dll shipped with the node-pty package instead of the one built into
102
+ * Windows. Defaults to false.
103
+ */
104
+ useConptyDll?: boolean;
105
+
106
+ /**
107
+ * Whether to use PSEUDOCONSOLE_INHERIT_CURSOR in conpty.
108
+ * @see https://docs.microsoft.com/en-us/windows/console/createpseudoconsole
109
+ */
110
+ conptyInheritCursor?: boolean;
111
+ }
112
+
113
+ /**
114
+ * An interface representing a pseudoterminal, on Windows this is emulated via the winpty library.
115
+ */
116
+ export interface IPty {
117
+ /**
118
+ * The process ID of the outer process.
119
+ */
120
+ readonly pid: number;
121
+
122
+ /**
123
+ * The column size in characters.
124
+ */
125
+ readonly cols: number;
126
+
127
+ /**
128
+ * The row size in characters.
129
+ */
130
+ readonly rows: number;
131
+
132
+ /**
133
+ * The title of the active process.
134
+ */
135
+ readonly process: string;
136
+
137
+ /**
138
+ * (EXPERIMENTAL)
139
+ * Whether to handle flow control. Useful to disable/re-enable flow control during runtime.
140
+ * Use this for binary data that is likely to contain the `flowControlPause` string by accident.
141
+ */
142
+ handleFlowControl: boolean;
143
+
144
+ /**
145
+ * Adds an event listener for when a data event fires. This happens when data is returned from
146
+ * the pty.
147
+ * @returns an `IDisposable` to stop listening.
148
+ */
149
+ readonly onData: IEvent<string>;
150
+
151
+ /**
152
+ * Adds an event listener for when an exit event fires. This happens when the pty exits.
153
+ * @returns an `IDisposable` to stop listening.
154
+ */
155
+ readonly onExit: IEvent<{ exitCode: number, signal?: number }>;
156
+
157
+ /**
158
+ * Resizes the dimensions of the pty.
159
+ * @param columns The number of columns to use.
160
+ * @param rows The number of rows to use.
161
+ */
162
+ resize(columns: number, rows: number): void;
163
+
164
+ /**
165
+ * Clears the pty's internal representation of its buffer. This is a no-op
166
+ * unless on Windows/ConPTY. This is useful if the buffer is cleared on the
167
+ * frontend in order to synchronize state with the backend to avoid ConPTY
168
+ * possibly reprinting the screen.
169
+ */
170
+ clear(): void;
171
+
172
+ /**
173
+ * Writes data to the pty.
174
+ * @param data The data to write.
175
+ */
176
+ write(data: string | Buffer): void;
177
+
178
+ /**
179
+ * Kills the pty.
180
+ * @param signal The signal to use, defaults to SIGHUP. This parameter is not supported on
181
+ * Windows.
182
+ * @throws Will throw when signal is used on Windows.
183
+ */
184
+ kill(signal?: string): void;
185
+
186
+ /**
187
+ * Pauses the pty for customizable flow control.
188
+ */
189
+ pause(): void;
190
+
191
+ /**
192
+ * Resumes the pty for customizable flow control.
193
+ */
194
+ resume(): void;
195
+ }
196
+
197
+ /**
198
+ * An object that can be disposed via a dispose function.
199
+ */
200
+ export interface IDisposable {
201
+ dispose(): void;
202
+ }
203
+
204
+ /**
205
+ * An event that can be listened to.
206
+ * @returns an `IDisposable` to stop listening.
207
+ */
208
+ export interface IEvent<T> {
209
+ (listener: (e: T) => any): IDisposable;
210
+ }
211
+ }
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@termiq/cli",
3
+ "version": "0.1.0",
4
+ "description": "TermIQ CLI agent — access terminals from anywhere",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "homepage": "https://termiq.io",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://bitbucket.org/orionm2m/termiq"
10
+ },
11
+ "bugs": {
12
+ "url": "https://termiq.io/support"
13
+ },
14
+ "bin": {
15
+ "termiq": "./dist/bin.js"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md",
20
+ "LICENSE"
21
+ ],
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "scripts": {
26
+ "build": "esbuild src/bin.ts --bundle --outfile=dist/bin.js --platform=node --format=cjs --external:node-pty --minify",
27
+ "build:dev": "tsc",
28
+ "dev": "tsc --watch",
29
+ "clean": "rm -rf dist",
30
+ "type-check": "tsc --noEmit",
31
+ "lint": "eslint src --ext .ts",
32
+ "lint:fix": "eslint src --ext .ts --fix",
33
+ "copy-native": "node scripts/copy-native.js",
34
+ "prepublishOnly": "pnpm run build && pnpm run copy-native"
35
+ },
36
+ "devDependencies": {
37
+ "@termiq/agent-core": "workspace:*",
38
+ "@termiq/shared": "workspace:*",
39
+ "@types/node": "^20.19.33",
40
+ "chokidar": "^5.0.0",
41
+ "esbuild": "^0.27.3",
42
+ "ignore": "^7.0.5",
43
+ "node-machine-id": "^1.1.12",
44
+ "node-pty": "^1.1.0",
45
+ "open": "^10.1.0",
46
+ "typescript": "^5.9.3"
47
+ }
48
+ }