@vibedeckx/darwin-arm64 0.1.17 → 0.1.19
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/process-manager.d.ts +1 -1
- package/dist/process-manager.js +102 -42
- package/dist/ui/404/index.html +1 -1
- package/dist/ui/404.html +1 -1
- package/dist/ui/__next.__PAGE__.txt +1 -1
- package/dist/ui/__next._full.txt +1 -1
- package/dist/ui/__next._head.txt +1 -1
- package/dist/ui/__next._index.txt +1 -1
- package/dist/ui/__next._tree.txt +1 -1
- package/dist/ui/_not-found/__next._full.txt +1 -1
- package/dist/ui/_not-found/__next._head.txt +1 -1
- package/dist/ui/_not-found/__next._index.txt +1 -1
- package/dist/ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/ui/_not-found/__next._not-found.txt +1 -1
- package/dist/ui/_not-found/__next._tree.txt +1 -1
- package/dist/ui/_not-found/index.html +1 -1
- package/dist/ui/_not-found/index.txt +1 -1
- package/dist/ui/index.html +1 -1
- package/dist/ui/index.txt +1 -1
- package/node_modules/node-pty/lib/conpty_console_list_agent.js +10 -1
- package/node_modules/node-pty/lib/unixTerminal.js +6 -3
- package/node_modules/node-pty/lib/utils.js +1 -1
- package/node_modules/node-pty/lib/windowsPtyAgent.js +62 -95
- package/node_modules/node-pty/lib/windowsTerminal.js +4 -2
- package/node_modules/node-pty/package.json +6 -5
- package/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/package.json +2 -2
- package/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
- package/node_modules/node-pty/lib/terminal.test.js +0 -139
- package/node_modules/node-pty/lib/testUtils.test.js +0 -28
- package/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
- package/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
- package/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
- /package/dist/ui/_next/static/{yeP8Hh4fEFoXM9i740k4g → 5yRNIcjV38DbpJEZ9GKXB}/_buildManifest.js +0 -0
- /package/dist/ui/_next/static/{yeP8Hh4fEFoXM9i740k4g → 5yRNIcjV38DbpJEZ9GKXB}/_clientMiddlewareManifest.json +0 -0
- /package/dist/ui/_next/static/{yeP8Hh4fEFoXM9i740k4g → 5yRNIcjV38DbpJEZ9GKXB}/_ssgManifest.js +0 -0
|
@@ -1,219 +0,0 @@
|
|
|
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
|
/package/dist/ui/_next/static/{yeP8Hh4fEFoXM9i740k4g → 5yRNIcjV38DbpJEZ9GKXB}/_buildManifest.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/ui/_next/static/{yeP8Hh4fEFoXM9i740k4g → 5yRNIcjV38DbpJEZ9GKXB}/_ssgManifest.js
RENAMED
|
File without changes
|