@langgenius/nodwork-linux-arm64 0.0.0-bootstrap.0 → 0.0.1-beta
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/README.md +3 -2
- package/package.json +24 -6
- package/payload/.env.example +2 -0
- package/payload/dist/chunk-BwDYZCav.js +1 -0
- package/payload/dist/cli.d.ts +4 -0
- package/payload/dist/cli.js +514 -0
- package/payload/dist/devtools-D4NxccOc.js +96 -0
- package/payload/dist/token-CqKQPcXv.js +1 -0
- package/payload/dist/token-error-CxiWEZm9.js +1 -0
- package/payload/dist/token-util-CiNuS5JL.js +1 -0
- package/payload/dist/token-util-Cscbk5az.js +1 -0
- package/payload/package.json +54 -0
- package/payload/vendor/node-pty/LICENSE +69 -0
- package/payload/vendor/node-pty/build/Release/pty.node +0 -0
- package/payload/vendor/node-pty/lib/eventEmitter2.js +46 -0
- package/payload/vendor/node-pty/lib/index.js +51 -0
- package/payload/vendor/node-pty/lib/terminal.js +189 -0
- package/payload/vendor/node-pty/lib/unixTerminal.js +345 -0
- package/payload/vendor/node-pty/lib/utils.js +38 -0
- package/payload/vendor/node-pty/package.json +64 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UnixTerminal = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Copyright (c) 2012-2015, Christopher Jeffrey (MIT License)
|
|
19
|
+
* Copyright (c) 2016, Daniel Imms (MIT License).
|
|
20
|
+
* Copyright (c) 2018, Microsoft Corporation (MIT License).
|
|
21
|
+
*/
|
|
22
|
+
var fs = require("fs");
|
|
23
|
+
var path = require("path");
|
|
24
|
+
var tty = require("tty");
|
|
25
|
+
var terminal_1 = require("./terminal");
|
|
26
|
+
var utils_1 = require("./utils");
|
|
27
|
+
var native = utils_1.loadNativeModule('pty');
|
|
28
|
+
var pty = native.module;
|
|
29
|
+
var helperPath = native.dir + '/spawn-helper';
|
|
30
|
+
helperPath = path.resolve(__dirname, helperPath);
|
|
31
|
+
helperPath = helperPath.replace('app.asar', 'app.asar.unpacked');
|
|
32
|
+
helperPath = helperPath.replace('node_modules.asar', 'node_modules.asar.unpacked');
|
|
33
|
+
var DEFAULT_FILE = 'sh';
|
|
34
|
+
var DEFAULT_NAME = 'xterm';
|
|
35
|
+
var DESTROY_SOCKET_TIMEOUT_MS = 200;
|
|
36
|
+
var UnixTerminal = /** @class */ (function (_super) {
|
|
37
|
+
__extends(UnixTerminal, _super);
|
|
38
|
+
function UnixTerminal(file, args, opt) {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
var _this = _super.call(this, opt) || this;
|
|
41
|
+
_this._boundClose = false;
|
|
42
|
+
_this._emittedClose = false;
|
|
43
|
+
if (typeof args === 'string') {
|
|
44
|
+
throw new Error('args as a string is not supported on unix.');
|
|
45
|
+
}
|
|
46
|
+
// Initialize arguments
|
|
47
|
+
args = args || [];
|
|
48
|
+
file = file || DEFAULT_FILE;
|
|
49
|
+
opt = opt || {};
|
|
50
|
+
opt.env = opt.env || process.env;
|
|
51
|
+
_this._cols = opt.cols || terminal_1.DEFAULT_COLS;
|
|
52
|
+
_this._rows = opt.rows || terminal_1.DEFAULT_ROWS;
|
|
53
|
+
var uid = (_a = opt.uid) !== null && _a !== void 0 ? _a : -1;
|
|
54
|
+
var gid = (_b = opt.gid) !== null && _b !== void 0 ? _b : -1;
|
|
55
|
+
var env = utils_1.assign({}, opt.env);
|
|
56
|
+
if (opt.env === process.env) {
|
|
57
|
+
_this._sanitizeEnv(env);
|
|
58
|
+
}
|
|
59
|
+
var cwd = opt.cwd || process.cwd();
|
|
60
|
+
env.PWD = cwd;
|
|
61
|
+
var name = opt.name || env.TERM || DEFAULT_NAME;
|
|
62
|
+
env.TERM = name;
|
|
63
|
+
var parsedEnv = _this._parseEnv(env);
|
|
64
|
+
var encoding = (opt.encoding === undefined ? 'utf8' : opt.encoding);
|
|
65
|
+
var onexit = function (code, signal) {
|
|
66
|
+
// XXX Sometimes a data event is emitted after exit. Wait til socket is
|
|
67
|
+
// destroyed.
|
|
68
|
+
if (!_this._emittedClose) {
|
|
69
|
+
if (_this._boundClose) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
_this._boundClose = true;
|
|
73
|
+
// From macOS High Sierra 10.13.2 sometimes the socket never gets
|
|
74
|
+
// closed. A timeout is applied here to avoid the terminal never being
|
|
75
|
+
// destroyed when this occurs.
|
|
76
|
+
var timeout_1 = setTimeout(function () {
|
|
77
|
+
timeout_1 = null;
|
|
78
|
+
// Destroying the socket now will cause the close event to fire
|
|
79
|
+
_this._socket.destroy();
|
|
80
|
+
}, DESTROY_SOCKET_TIMEOUT_MS);
|
|
81
|
+
_this.once('close', function () {
|
|
82
|
+
if (timeout_1 !== null) {
|
|
83
|
+
clearTimeout(timeout_1);
|
|
84
|
+
}
|
|
85
|
+
_this.emit('exit', code, signal);
|
|
86
|
+
});
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
_this.emit('exit', code, signal);
|
|
90
|
+
};
|
|
91
|
+
// fork
|
|
92
|
+
var term = pty.fork(file, args, parsedEnv, cwd, _this._cols, _this._rows, uid, gid, (encoding === 'utf8'), helperPath, onexit);
|
|
93
|
+
_this._socket = new tty.ReadStream(term.fd);
|
|
94
|
+
if (encoding !== null) {
|
|
95
|
+
_this._socket.setEncoding(encoding);
|
|
96
|
+
}
|
|
97
|
+
_this._writeStream = new CustomWriteStream(term.fd, (encoding || undefined));
|
|
98
|
+
// setup
|
|
99
|
+
_this._socket.on('error', function (err) {
|
|
100
|
+
// NOTE: fs.ReadStream gets EAGAIN twice at first:
|
|
101
|
+
if (err.code) {
|
|
102
|
+
if (~err.code.indexOf('EAGAIN')) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// close
|
|
107
|
+
_this._close();
|
|
108
|
+
// EIO on exit from fs.ReadStream:
|
|
109
|
+
if (!_this._emittedClose) {
|
|
110
|
+
_this._emittedClose = true;
|
|
111
|
+
_this.emit('close');
|
|
112
|
+
}
|
|
113
|
+
// EIO, happens when someone closes our child process: the only process in
|
|
114
|
+
// the terminal.
|
|
115
|
+
// node < 0.6.14: errno 5
|
|
116
|
+
// node >= 0.6.14: read EIO
|
|
117
|
+
if (err.code) {
|
|
118
|
+
if (~err.code.indexOf('errno 5') || ~err.code.indexOf('EIO')) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// throw anything else
|
|
123
|
+
if (_this.listeners('error').length < 2) {
|
|
124
|
+
throw err;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
_this._pid = term.pid;
|
|
128
|
+
_this._fd = term.fd;
|
|
129
|
+
_this._pty = term.pty;
|
|
130
|
+
_this._file = file;
|
|
131
|
+
_this._name = name;
|
|
132
|
+
_this._readable = true;
|
|
133
|
+
_this._writable = true;
|
|
134
|
+
_this._socket.on('close', function () {
|
|
135
|
+
if (_this._emittedClose) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
_this._emittedClose = true;
|
|
139
|
+
_this._close();
|
|
140
|
+
_this.emit('close');
|
|
141
|
+
});
|
|
142
|
+
_this._forwardEvents();
|
|
143
|
+
return _this;
|
|
144
|
+
}
|
|
145
|
+
Object.defineProperty(UnixTerminal.prototype, "master", {
|
|
146
|
+
get: function () { return this._master; },
|
|
147
|
+
enumerable: false,
|
|
148
|
+
configurable: true
|
|
149
|
+
});
|
|
150
|
+
Object.defineProperty(UnixTerminal.prototype, "slave", {
|
|
151
|
+
get: function () { return this._slave; },
|
|
152
|
+
enumerable: false,
|
|
153
|
+
configurable: true
|
|
154
|
+
});
|
|
155
|
+
UnixTerminal.prototype._write = function (data) {
|
|
156
|
+
this._writeStream.write(data);
|
|
157
|
+
};
|
|
158
|
+
Object.defineProperty(UnixTerminal.prototype, "fd", {
|
|
159
|
+
/* Accessors */
|
|
160
|
+
get: function () { return this._fd; },
|
|
161
|
+
enumerable: false,
|
|
162
|
+
configurable: true
|
|
163
|
+
});
|
|
164
|
+
Object.defineProperty(UnixTerminal.prototype, "ptsName", {
|
|
165
|
+
get: function () { return this._pty; },
|
|
166
|
+
enumerable: false,
|
|
167
|
+
configurable: true
|
|
168
|
+
});
|
|
169
|
+
/**
|
|
170
|
+
* openpty
|
|
171
|
+
*/
|
|
172
|
+
UnixTerminal.open = function (opt) {
|
|
173
|
+
var self = Object.create(UnixTerminal.prototype);
|
|
174
|
+
opt = opt || {};
|
|
175
|
+
if (arguments.length > 1) {
|
|
176
|
+
opt = {
|
|
177
|
+
cols: arguments[1],
|
|
178
|
+
rows: arguments[2]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
var cols = opt.cols || terminal_1.DEFAULT_COLS;
|
|
182
|
+
var rows = opt.rows || terminal_1.DEFAULT_ROWS;
|
|
183
|
+
var encoding = (opt.encoding === undefined ? 'utf8' : opt.encoding);
|
|
184
|
+
// open
|
|
185
|
+
var term = pty.open(cols, rows);
|
|
186
|
+
self._master = new tty.ReadStream(term.master);
|
|
187
|
+
if (encoding !== null) {
|
|
188
|
+
self._master.setEncoding(encoding);
|
|
189
|
+
}
|
|
190
|
+
self._master.resume();
|
|
191
|
+
self._slave = new tty.ReadStream(term.slave);
|
|
192
|
+
if (encoding !== null) {
|
|
193
|
+
self._slave.setEncoding(encoding);
|
|
194
|
+
}
|
|
195
|
+
self._slave.resume();
|
|
196
|
+
self._socket = self._master;
|
|
197
|
+
self._pid = -1;
|
|
198
|
+
self._fd = term.master;
|
|
199
|
+
self._pty = term.pty;
|
|
200
|
+
self._file = process.argv[0] || 'node';
|
|
201
|
+
self._name = process.env.TERM || '';
|
|
202
|
+
self._readable = true;
|
|
203
|
+
self._writable = true;
|
|
204
|
+
self._socket.on('error', function (err) {
|
|
205
|
+
self._close();
|
|
206
|
+
if (self.listeners('error').length < 2) {
|
|
207
|
+
throw err;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
self._socket.on('close', function () {
|
|
211
|
+
self._close();
|
|
212
|
+
});
|
|
213
|
+
return self;
|
|
214
|
+
};
|
|
215
|
+
UnixTerminal.prototype.destroy = function () {
|
|
216
|
+
var _this = this;
|
|
217
|
+
this._close();
|
|
218
|
+
// Need to close the read stream so node stops reading a dead file
|
|
219
|
+
// descriptor. Then we can safely SIGHUP the shell.
|
|
220
|
+
this._socket.once('close', function () {
|
|
221
|
+
_this.kill('SIGHUP');
|
|
222
|
+
});
|
|
223
|
+
this._socket.destroy();
|
|
224
|
+
this._writeStream.dispose();
|
|
225
|
+
};
|
|
226
|
+
UnixTerminal.prototype.kill = function (signal) {
|
|
227
|
+
try {
|
|
228
|
+
process.kill(this.pid, signal || 'SIGHUP');
|
|
229
|
+
}
|
|
230
|
+
catch (e) { /* swallow */ }
|
|
231
|
+
};
|
|
232
|
+
Object.defineProperty(UnixTerminal.prototype, "process", {
|
|
233
|
+
/**
|
|
234
|
+
* Gets the name of the process.
|
|
235
|
+
*/
|
|
236
|
+
get: function () {
|
|
237
|
+
if (process.platform === 'darwin') {
|
|
238
|
+
var title = pty.process(this._fd);
|
|
239
|
+
return (title !== 'kernel_task') ? title : this._file;
|
|
240
|
+
}
|
|
241
|
+
return pty.process(this._fd, this._pty) || this._file;
|
|
242
|
+
},
|
|
243
|
+
enumerable: false,
|
|
244
|
+
configurable: true
|
|
245
|
+
});
|
|
246
|
+
/**
|
|
247
|
+
* TTY
|
|
248
|
+
*/
|
|
249
|
+
UnixTerminal.prototype.resize = function (cols, rows) {
|
|
250
|
+
if (cols <= 0 || rows <= 0 || isNaN(cols) || isNaN(rows) || cols === Infinity || rows === Infinity) {
|
|
251
|
+
throw new Error('resizing must be done using positive cols and rows');
|
|
252
|
+
}
|
|
253
|
+
pty.resize(this._fd, cols, rows);
|
|
254
|
+
this._cols = cols;
|
|
255
|
+
this._rows = rows;
|
|
256
|
+
};
|
|
257
|
+
UnixTerminal.prototype.clear = function () {
|
|
258
|
+
};
|
|
259
|
+
UnixTerminal.prototype._sanitizeEnv = function (env) {
|
|
260
|
+
// Make sure we didn't start our server from inside tmux.
|
|
261
|
+
delete env['TMUX'];
|
|
262
|
+
delete env['TMUX_PANE'];
|
|
263
|
+
// Make sure we didn't start our server from inside screen.
|
|
264
|
+
// http://web.mit.edu/gnu/doc/html/screen_20.html
|
|
265
|
+
delete env['STY'];
|
|
266
|
+
delete env['WINDOW'];
|
|
267
|
+
// Delete some variables that might confuse our terminal.
|
|
268
|
+
delete env['WINDOWID'];
|
|
269
|
+
delete env['TERMCAP'];
|
|
270
|
+
delete env['COLUMNS'];
|
|
271
|
+
delete env['LINES'];
|
|
272
|
+
};
|
|
273
|
+
return UnixTerminal;
|
|
274
|
+
}(terminal_1.Terminal));
|
|
275
|
+
exports.UnixTerminal = UnixTerminal;
|
|
276
|
+
/**
|
|
277
|
+
* A custom write stream that writes directly to a file descriptor with proper
|
|
278
|
+
* handling of backpressure and errors. This avoids some event loop exhaustion
|
|
279
|
+
* issues that can occur when using the standard APIs in Node.
|
|
280
|
+
*/
|
|
281
|
+
var CustomWriteStream = /** @class */ (function () {
|
|
282
|
+
function CustomWriteStream(_fd, _encoding) {
|
|
283
|
+
this._fd = _fd;
|
|
284
|
+
this._encoding = _encoding;
|
|
285
|
+
this._writeQueue = [];
|
|
286
|
+
}
|
|
287
|
+
CustomWriteStream.prototype.dispose = function () {
|
|
288
|
+
clearImmediate(this._writeImmediate);
|
|
289
|
+
this._writeImmediate = undefined;
|
|
290
|
+
};
|
|
291
|
+
CustomWriteStream.prototype.write = function (data) {
|
|
292
|
+
// Writes are put in a queue and processed asynchronously in order to handle
|
|
293
|
+
// backpressure from the kernel buffer.
|
|
294
|
+
var buffer = typeof data === 'string'
|
|
295
|
+
? Buffer.from(data, this._encoding)
|
|
296
|
+
: Buffer.from(data);
|
|
297
|
+
if (buffer.byteLength !== 0) {
|
|
298
|
+
this._writeQueue.push({ buffer: buffer, offset: 0 });
|
|
299
|
+
if (this._writeQueue.length === 1) {
|
|
300
|
+
this._processWriteQueue();
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
CustomWriteStream.prototype._processWriteQueue = function () {
|
|
305
|
+
var _this = this;
|
|
306
|
+
this._writeImmediate = undefined;
|
|
307
|
+
if (this._writeQueue.length === 0) {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
var task = this._writeQueue[0];
|
|
311
|
+
// Write to the underlying file descriptor and handle it directly, rather
|
|
312
|
+
// than using the `net.Socket`/`tty.WriteStream` wrappers which swallow and
|
|
313
|
+
// mask errors like EAGAIN and can cause the thread to block indefinitely.
|
|
314
|
+
fs.write(this._fd, task.buffer, task.offset, function (err, written) {
|
|
315
|
+
if (err) {
|
|
316
|
+
if ('code' in err && err.code === 'EAGAIN') {
|
|
317
|
+
// `setImmediate` is used to yield to the event loop and re-attempt
|
|
318
|
+
// the write later.
|
|
319
|
+
_this._writeImmediate = setImmediate(function () { return _this._processWriteQueue(); });
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
// Stop processing immediately on unexpected error and log
|
|
323
|
+
_this._writeQueue.length = 0;
|
|
324
|
+
console.error('Unhandled pty write error', err);
|
|
325
|
+
}
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
task.offset += written;
|
|
329
|
+
if (task.offset >= task.buffer.byteLength) {
|
|
330
|
+
_this._writeQueue.shift();
|
|
331
|
+
}
|
|
332
|
+
// Since there is more room in the kernel buffer, we can continue to write
|
|
333
|
+
// until we hit EAGAIN or exhaust the queue.
|
|
334
|
+
//
|
|
335
|
+
// Note that old versions of bash, like v3.2 which ships in macOS, appears
|
|
336
|
+
// to have a bug in its readline implementation that causes data
|
|
337
|
+
// corruption when writes to the pty happens too quickly. Instead of
|
|
338
|
+
// trying to workaround that we just accept it so that large pastes are as
|
|
339
|
+
// fast as possible.
|
|
340
|
+
// Context: https://github.com/microsoft/node-pty/issues/833
|
|
341
|
+
_this._processWriteQueue();
|
|
342
|
+
});
|
|
343
|
+
};
|
|
344
|
+
return CustomWriteStream;
|
|
345
|
+
}());
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
exports.loadNativeModule = exports.assign = void 0;
|
|
8
|
+
function assign(target) {
|
|
9
|
+
var sources = [];
|
|
10
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
11
|
+
sources[_i - 1] = arguments[_i];
|
|
12
|
+
}
|
|
13
|
+
sources.forEach(function (source) { return Object.keys(source).forEach(function (key) { return target[key] = source[key]; }); });
|
|
14
|
+
return target;
|
|
15
|
+
}
|
|
16
|
+
exports.assign = assign;
|
|
17
|
+
function loadNativeModule(name) {
|
|
18
|
+
// Check build, debug, and then prebuilds.
|
|
19
|
+
var dirs = ['build/Release', 'build/Debug', "prebuilds/" + process.platform + "-" + process.arch];
|
|
20
|
+
// Check relative to the parent dir for unbundled and then the current dir for bundled
|
|
21
|
+
var relative = ['..', '.'];
|
|
22
|
+
var lastError;
|
|
23
|
+
for (var _i = 0, dirs_1 = dirs; _i < dirs_1.length; _i++) {
|
|
24
|
+
var d = dirs_1[_i];
|
|
25
|
+
for (var _a = 0, relative_1 = relative; _a < relative_1.length; _a++) {
|
|
26
|
+
var r = relative_1[_a];
|
|
27
|
+
var dir = r + "/" + d + "/";
|
|
28
|
+
try {
|
|
29
|
+
return { dir: dir, module: require(dir + "/" + name + ".node") };
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
lastError = e;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
throw new Error("Failed to load native module: " + name + ".node, checked: " + dirs.join(', ') + ": " + lastError);
|
|
37
|
+
}
|
|
38
|
+
exports.loadNativeModule = loadNativeModule;
|
|
@@ -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
|
+
}
|