@me0wo/opencode-windows-arm64 0.0.0-stage → 2.2.6-canary.10

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 (50) hide show
  1. package/assets/@ff-labs/fff-bin-win32-arm64/fff_c.dll +0 -0
  2. package/assets/@lydell/node-pty-win32-arm64/LICENSE +69 -0
  3. package/assets/@lydell/node-pty-win32-arm64/README.md +3 -0
  4. package/assets/@lydell/node-pty-win32-arm64/lib/conpty_console_list_agent.js +25 -0
  5. package/assets/@lydell/node-pty-win32-arm64/lib/eventEmitter2.js +47 -0
  6. package/assets/@lydell/node-pty-win32-arm64/lib/index.js +52 -0
  7. package/assets/@lydell/node-pty-win32-arm64/lib/interfaces.js +7 -0
  8. package/assets/@lydell/node-pty-win32-arm64/lib/shared/conout.js +11 -0
  9. package/assets/@lydell/node-pty-win32-arm64/lib/terminal.js +190 -0
  10. package/assets/@lydell/node-pty-win32-arm64/lib/types.js +7 -0
  11. package/assets/@lydell/node-pty-win32-arm64/lib/utils.js +39 -0
  12. package/assets/@lydell/node-pty-win32-arm64/lib/windowsConoutConnection.js +125 -0
  13. package/assets/@lydell/node-pty-win32-arm64/lib/windowsPtyAgent.js +287 -0
  14. package/assets/@lydell/node-pty-win32-arm64/lib/windowsTerminal.js +201 -0
  15. package/assets/@lydell/node-pty-win32-arm64/lib/worker/conoutSocketWorker.js +22 -0
  16. package/assets/@lydell/node-pty-win32-arm64/package.json +18 -0
  17. package/assets/@lydell/node-pty-win32-arm64/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
  18. package/assets/@lydell/node-pty-win32-arm64/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
  19. package/assets/@lydell/node-pty-win32-arm64/prebuilds/win32-arm64/conpty.node +0 -0
  20. package/assets/@lydell/node-pty-win32-arm64/prebuilds/win32-arm64/conpty_console_list.node +0 -0
  21. package/assets/@opencode/ui/audio/bip-bop-01.mp3 +0 -0
  22. package/assets/@opencode/ui/audio/bip-bop-03.mp3 +0 -0
  23. package/assets/@opencode/ui/audio/nope-03.mp3 +0 -0
  24. package/assets/@opencode/ui/audio/staplebops-06.mp3 +0 -0
  25. package/assets/@opencode/ui/audio/yup-01.mp3 +0 -0
  26. package/assets/@opentui/core/assets/javascript/highlights.scm +205 -0
  27. package/assets/@opentui/core/assets/javascript/tree-sitter-javascript.wasm +0 -0
  28. package/assets/@opentui/core/assets/markdown/highlights.scm +150 -0
  29. package/assets/@opentui/core/assets/markdown/injections.scm +27 -0
  30. package/assets/@opentui/core/assets/markdown/tree-sitter-markdown.wasm +0 -0
  31. package/assets/@opentui/core/assets/markdown_inline/highlights.scm +115 -0
  32. package/assets/@opentui/core/assets/markdown_inline/tree-sitter-markdown_inline.wasm +0 -0
  33. package/assets/@opentui/core/assets/typescript/highlights.scm +604 -0
  34. package/assets/@opentui/core/assets/typescript/tree-sitter-typescript.wasm +0 -0
  35. package/assets/@opentui/core/assets/typescriptreact/highlights.scm +758 -0
  36. package/assets/@opentui/core/assets/typescriptreact/tree-sitter-tsx.wasm +0 -0
  37. package/assets/@opentui/core/assets/zig/highlights.scm +284 -0
  38. package/assets/@opentui/core/assets/zig/tree-sitter-zig.wasm +0 -0
  39. package/assets/@opentui/core/parser.worker.js +4573 -0
  40. package/assets/@opentui/core-win32-arm64/opentui.dll +0 -0
  41. package/assets/@parcel/watcher-win32-arm64/watcher.node +0 -0
  42. package/assets/@silvia-odwyer/photon-node/photon_rs_bg.wasm +0 -0
  43. package/assets/@yuuang/ffi-rs-win32-arm64-msvc/ffi-rs.win32-arm64-msvc.node +0 -0
  44. package/assets/app-archive.bin +0 -0
  45. package/assets/opencode-pty/opencode-pty.exe +0 -0
  46. package/assets/web-tree-sitter/tree-sitter.wasm +0 -0
  47. package/opencode-sea-shim.mjs +9 -0
  48. package/opencode.mjs +5128 -0
  49. package/package.json +21 -4
  50. package/README.md +0 -3
@@ -0,0 +1,287 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2012-2015, Christopher Jeffrey, Peter Sunde (MIT License)
4
+ * Copyright (c) 2016, Daniel Imms (MIT License).
5
+ * Copyright (c) 2018, Microsoft Corporation (MIT License).
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.argsToCommandLine = exports.WindowsPtyAgent = void 0;
9
+ var fs = require("fs");
10
+ var path = require("path");
11
+ var child_process_1 = require("child_process");
12
+ var net_1 = require("net");
13
+ var windowsConoutConnection_1 = require("./windowsConoutConnection");
14
+ var utils_1 = require("./utils");
15
+ var conptyNative;
16
+ /**
17
+ * The amount of time to wait for additional data after the conpty shell process has exited before
18
+ * shutting down the socket. The timer will be reset if a new data event comes in after the timer
19
+ * has started.
20
+ */
21
+ var FLUSH_DATA_INTERVAL = 1000;
22
+ /**
23
+ * This agent sits between the WindowsTerminal class and provides an interface for conpty.
24
+ */
25
+ var WindowsPtyAgent = /** @class */ (function () {
26
+ function WindowsPtyAgent(file, args, env, cwd, cols, rows, debug, _useConptyDll, conptyInheritCursor) {
27
+ var _this = this;
28
+ if (_useConptyDll === void 0) { _useConptyDll = false; }
29
+ if (conptyInheritCursor === void 0) { conptyInheritCursor = false; }
30
+ this._useConptyDll = _useConptyDll;
31
+ this._innerPid = 0;
32
+ if (!conptyNative) {
33
+ conptyNative = utils_1.loadNativeModule('conpty').module;
34
+ }
35
+ this._ptyNative = conptyNative;
36
+ // Sanitize input variable.
37
+ cwd = path.resolve(cwd);
38
+ // Compose command line
39
+ var commandLine = argsToCommandLine(file, args);
40
+ // Open pty session.
41
+ var term = conptyNative.startProcess(file, cols, rows, debug, this._generatePipeName(), conptyInheritCursor, this._useConptyDll);
42
+ // Not available on windows.
43
+ this._fd = term.fd;
44
+ // Generated incremental number that has no real purpose besides using it
45
+ // as a terminal id.
46
+ this._pty = term.pty;
47
+ // Create terminal pipe IPC channel and forward to a local unix socket.
48
+ this._outSocket = new net_1.Socket();
49
+ this._outSocket.setEncoding('utf8');
50
+ // The conout socket must be ready out on another thread to avoid deadlocks
51
+ // We must wait for the worker to connect before calling conptyNative.connect()
52
+ // to avoid blocking the Node.js event loop in ConnectNamedPipe.
53
+ // See https://github.com/microsoft/node-pty/issues/763
54
+ this._conoutSocketWorker = new windowsConoutConnection_1.ConoutConnection(term.conout, this._useConptyDll);
55
+ // Store pending connection info - we'll complete the connection when worker is ready
56
+ this._pendingPtyInfo = { pty: this._pty, commandLine: commandLine, cwd: cwd, env: env };
57
+ // Timeout to ensure connection completes even if worker fails to signal ready
58
+ var connectionTimeout = setTimeout(function () {
59
+ if (_this._pendingPtyInfo) {
60
+ // Worker never signaled ready - complete connection anyway to avoid zombie state
61
+ _this._completePtyConnection();
62
+ }
63
+ }, 5000);
64
+ this._conoutSocketWorker.onReady(function () {
65
+ clearTimeout(connectionTimeout);
66
+ _this._conoutSocketWorker.connectSocket(_this._outSocket);
67
+ // Now that the worker has connected to the output pipe, we can safely call
68
+ // conptyNative.connect() which calls ConnectNamedPipe - it won't block because
69
+ // the client (worker) is already connected
70
+ _this._completePtyConnection();
71
+ });
72
+ this._outSocket.on('connect', function () {
73
+ _this._outSocket.emit('ready_datapipe');
74
+ });
75
+ var inSocketFD = fs.openSync(term.conin, 'w');
76
+ this._inSocket = new net_1.Socket({
77
+ fd: inSocketFD,
78
+ readable: false,
79
+ writable: true
80
+ });
81
+ this._inSocket.setEncoding('utf8');
82
+ }
83
+ Object.defineProperty(WindowsPtyAgent.prototype, "inSocket", {
84
+ get: function () { return this._inSocket; },
85
+ enumerable: false,
86
+ configurable: true
87
+ });
88
+ Object.defineProperty(WindowsPtyAgent.prototype, "outSocket", {
89
+ get: function () { return this._outSocket; },
90
+ enumerable: false,
91
+ configurable: true
92
+ });
93
+ Object.defineProperty(WindowsPtyAgent.prototype, "fd", {
94
+ get: function () { return this._fd; },
95
+ enumerable: false,
96
+ configurable: true
97
+ });
98
+ Object.defineProperty(WindowsPtyAgent.prototype, "innerPid", {
99
+ get: function () { return this._innerPid; },
100
+ enumerable: false,
101
+ configurable: true
102
+ });
103
+ Object.defineProperty(WindowsPtyAgent.prototype, "pty", {
104
+ get: function () { return this._pty; },
105
+ enumerable: false,
106
+ configurable: true
107
+ });
108
+ WindowsPtyAgent.prototype._completePtyConnection = function () {
109
+ var _this = this;
110
+ if (!this._pendingPtyInfo) {
111
+ return;
112
+ }
113
+ var _a = this._pendingPtyInfo, pty = _a.pty, commandLine = _a.commandLine, cwd = _a.cwd, env = _a.env;
114
+ this._pendingPtyInfo = undefined;
115
+ var connect = conptyNative.connect(pty, commandLine, cwd, env, this._useConptyDll, function (c) { return _this._$onProcessExit(c); });
116
+ this._innerPid = connect.pid;
117
+ };
118
+ WindowsPtyAgent.prototype.resize = function (cols, rows) {
119
+ if (this._exitCode !== undefined) {
120
+ throw new Error('Cannot resize a pty that has already exited');
121
+ }
122
+ this._ptyNative.resize(this._pty, cols, rows, this._useConptyDll);
123
+ };
124
+ WindowsPtyAgent.prototype.clear = function () {
125
+ this._ptyNative.clear(this._pty, this._useConptyDll);
126
+ };
127
+ WindowsPtyAgent.prototype.kill = function () {
128
+ var _this = this;
129
+ // Prevent deferred connection from completing after kill
130
+ this._pendingPtyInfo = undefined;
131
+ // Tell the agent to kill the pty, this releases handles to the process
132
+ if (!this._useConptyDll) {
133
+ this._inSocket.readable = false;
134
+ this._outSocket.readable = false;
135
+ this._getConsoleProcessList().then(function (consoleProcessList) {
136
+ consoleProcessList.forEach(function (pid) {
137
+ try {
138
+ process.kill(pid);
139
+ }
140
+ catch (e) {
141
+ // Ignore if process cannot be found (kill ESRCH error)
142
+ }
143
+ });
144
+ });
145
+ this._ptyNative.kill(this._pty, this._useConptyDll);
146
+ this._conoutSocketWorker.dispose();
147
+ }
148
+ else {
149
+ // Close the input write handle to signal the end of session.
150
+ this._inSocket.destroy();
151
+ this._ptyNative.kill(this._pty, this._useConptyDll);
152
+ this._outSocket.on('data', function () {
153
+ _this._conoutSocketWorker.dispose();
154
+ });
155
+ }
156
+ };
157
+ WindowsPtyAgent.prototype._getConsoleProcessList = function () {
158
+ var _this = this;
159
+ if (this._innerPid <= 0) {
160
+ return Promise.resolve([]);
161
+ }
162
+ return new Promise(function (resolve) {
163
+ var agent = child_process_1.fork(path.join(__dirname, 'conpty_console_list_agent'), [_this._innerPid.toString()]);
164
+ agent.on('message', function (message) {
165
+ clearTimeout(timeout);
166
+ resolve(message.consoleProcessList);
167
+ });
168
+ var timeout = setTimeout(function () {
169
+ // Something went wrong, just send back the shell PID
170
+ agent.kill();
171
+ resolve([_this._innerPid]);
172
+ }, 5000);
173
+ });
174
+ };
175
+ Object.defineProperty(WindowsPtyAgent.prototype, "exitCode", {
176
+ get: function () {
177
+ return this._exitCode;
178
+ },
179
+ enumerable: false,
180
+ configurable: true
181
+ });
182
+ WindowsPtyAgent.prototype._generatePipeName = function () {
183
+ return "conpty-" + Math.random() * 10000000;
184
+ };
185
+ /**
186
+ * Triggered from the native side when a contpy process exits.
187
+ */
188
+ WindowsPtyAgent.prototype._$onProcessExit = function (exitCode) {
189
+ var _this = this;
190
+ this._exitCode = exitCode;
191
+ if (!this._useConptyDll) {
192
+ this._flushDataAndCleanUp();
193
+ this._outSocket.on('data', function () { return _this._flushDataAndCleanUp(); });
194
+ }
195
+ };
196
+ WindowsPtyAgent.prototype._flushDataAndCleanUp = function () {
197
+ var _this = this;
198
+ if (this._useConptyDll) {
199
+ return;
200
+ }
201
+ if (this._closeTimeout) {
202
+ clearTimeout(this._closeTimeout);
203
+ }
204
+ this._closeTimeout = setTimeout(function () { return _this._cleanUpProcess(); }, FLUSH_DATA_INTERVAL);
205
+ };
206
+ WindowsPtyAgent.prototype._cleanUpProcess = function () {
207
+ if (this._useConptyDll) {
208
+ return;
209
+ }
210
+ this._inSocket.readable = false;
211
+ this._outSocket.readable = false;
212
+ this._outSocket.destroy();
213
+ };
214
+ return WindowsPtyAgent;
215
+ }());
216
+ exports.WindowsPtyAgent = WindowsPtyAgent;
217
+ // Convert argc/argv into a Win32 command-line following the escaping convention
218
+ // documented on MSDN (e.g. see CommandLineToArgvW documentation). Copied from
219
+ // winpty project.
220
+ function argsToCommandLine(file, args) {
221
+ if (isCommandLine(args)) {
222
+ if (args.length === 0) {
223
+ return file;
224
+ }
225
+ return argsToCommandLine(file, []) + " " + args;
226
+ }
227
+ var argv = [file];
228
+ Array.prototype.push.apply(argv, args);
229
+ var result = '';
230
+ for (var argIndex = 0; argIndex < argv.length; argIndex++) {
231
+ if (argIndex > 0) {
232
+ result += ' ';
233
+ }
234
+ var arg = argv[argIndex];
235
+ // if it is empty or it contains whitespace and is not already quoted
236
+ var hasLopsidedEnclosingQuote = xOr((arg[0] !== '"'), (arg[arg.length - 1] !== '"'));
237
+ var hasNoEnclosingQuotes = ((arg[0] !== '"') && (arg[arg.length - 1] !== '"'));
238
+ var quote = arg === '' ||
239
+ (arg.indexOf(' ') !== -1 ||
240
+ arg.indexOf('\t') !== -1) &&
241
+ ((arg.length > 1) &&
242
+ (hasLopsidedEnclosingQuote || hasNoEnclosingQuotes));
243
+ if (quote) {
244
+ result += '\"';
245
+ }
246
+ var bsCount = 0;
247
+ for (var i = 0; i < arg.length; i++) {
248
+ var p = arg[i];
249
+ if (p === '\\') {
250
+ bsCount++;
251
+ }
252
+ else if (p === '"') {
253
+ result += repeatText('\\', bsCount * 2 + 1);
254
+ result += '"';
255
+ bsCount = 0;
256
+ }
257
+ else {
258
+ result += repeatText('\\', bsCount);
259
+ bsCount = 0;
260
+ result += p;
261
+ }
262
+ }
263
+ if (quote) {
264
+ result += repeatText('\\', bsCount * 2);
265
+ result += '\"';
266
+ }
267
+ else {
268
+ result += repeatText('\\', bsCount);
269
+ }
270
+ }
271
+ return result;
272
+ }
273
+ exports.argsToCommandLine = argsToCommandLine;
274
+ function isCommandLine(args) {
275
+ return typeof args === 'string';
276
+ }
277
+ function repeatText(text, count) {
278
+ var result = '';
279
+ for (var i = 0; i < count; i++) {
280
+ result += text;
281
+ }
282
+ return result;
283
+ }
284
+ function xOr(arg1, arg2) {
285
+ return ((arg1 && !arg2) || (!arg1 && arg2));
286
+ }
287
+ //# sourceMappingURL=windowsPtyAgent.js.map
@@ -0,0 +1,201 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2012-2015, Christopher Jeffrey, Peter Sunde (MIT License)
4
+ * Copyright (c) 2016, Daniel Imms (MIT License).
5
+ * Copyright (c) 2018, Microsoft Corporation (MIT License).
6
+ */
7
+ var __extends = (this && this.__extends) || (function () {
8
+ var extendStatics = function (d, b) {
9
+ extendStatics = Object.setPrototypeOf ||
10
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
12
+ return extendStatics(d, b);
13
+ };
14
+ return function (d, b) {
15
+ extendStatics(d, b);
16
+ function __() { this.constructor = d; }
17
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18
+ };
19
+ })();
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.WindowsTerminal = void 0;
22
+ var terminal_1 = require("./terminal");
23
+ var windowsPtyAgent_1 = require("./windowsPtyAgent");
24
+ var utils_1 = require("./utils");
25
+ var DEFAULT_FILE = 'cmd.exe';
26
+ var DEFAULT_NAME = 'Windows Shell';
27
+ var WindowsTerminal = /** @class */ (function (_super) {
28
+ __extends(WindowsTerminal, _super);
29
+ function WindowsTerminal(file, args, opt) {
30
+ var _this = _super.call(this, opt) || this;
31
+ _this._checkType('args', args, 'string', true);
32
+ // Initialize arguments
33
+ args = args || [];
34
+ file = file || DEFAULT_FILE;
35
+ opt = opt || {};
36
+ opt.env = opt.env || process.env;
37
+ if (opt.encoding) {
38
+ console.warn('Setting encoding on Windows is not supported');
39
+ }
40
+ var env = utils_1.assign({}, opt.env);
41
+ _this._cols = opt.cols || terminal_1.DEFAULT_COLS;
42
+ _this._rows = opt.rows || terminal_1.DEFAULT_ROWS;
43
+ var cwd = opt.cwd || process.cwd();
44
+ var name = opt.name || env.TERM || DEFAULT_NAME;
45
+ var parsedEnv = _this._parseEnv(env);
46
+ // If the terminal is ready
47
+ _this._isReady = false;
48
+ // Functions that need to run after `ready` event is emitted.
49
+ _this._deferreds = [];
50
+ // Create new termal.
51
+ _this._agent = new windowsPtyAgent_1.WindowsPtyAgent(file, args, parsedEnv, cwd, _this._cols, _this._rows, false, opt.useConptyDll, opt.conptyInheritCursor);
52
+ _this._socket = _this._agent.outSocket;
53
+ // Not available until `ready` event emitted.
54
+ _this._pid = _this._agent.innerPid;
55
+ _this._fd = _this._agent.fd;
56
+ _this._pty = _this._agent.pty;
57
+ // The forked windows terminal is not available until `ready` event is
58
+ // emitted.
59
+ _this._socket.on('ready_datapipe', function () {
60
+ // Update pid now that the agent has connected
61
+ _this._pid = _this._agent.innerPid;
62
+ // Run deferreds and set ready state once the first data event is received.
63
+ _this._socket.once('data', function () {
64
+ // Wait until the first data event is fired then we can run deferreds.
65
+ if (!_this._isReady) {
66
+ // Terminal is now ready and we can avoid having to defer method
67
+ // calls.
68
+ _this._isReady = true;
69
+ // Execute all deferred methods
70
+ _this._deferreds.forEach(function (fn) {
71
+ // NB! In order to ensure that `this` has all its references
72
+ // updated any variable that need to be available in `this` before
73
+ // the deferred is run has to be declared above this forEach
74
+ // statement.
75
+ fn.run();
76
+ });
77
+ // Reset
78
+ _this._deferreds = [];
79
+ }
80
+ });
81
+ // Shutdown if `error` event is emitted.
82
+ _this._socket.on('error', function (err) {
83
+ // Close terminal session.
84
+ _this._close();
85
+ // EIO, happens when someone closes our child process: the only process
86
+ // in the terminal.
87
+ // node < 0.6.14: errno 5
88
+ // node >= 0.6.14: read EIO
89
+ if (err.code) {
90
+ if (~err.code.indexOf('errno 5') || ~err.code.indexOf('EIO'))
91
+ return;
92
+ }
93
+ // Throw anything else.
94
+ if (_this.listeners('error').length < 2) {
95
+ throw err;
96
+ }
97
+ });
98
+ // Cleanup after the socket is closed.
99
+ _this._socket.on('close', function () {
100
+ _this.emit('exit', _this._agent.exitCode);
101
+ _this._close();
102
+ });
103
+ });
104
+ _this._file = file;
105
+ _this._name = name;
106
+ _this._readable = true;
107
+ _this._writable = true;
108
+ _this._forwardEvents();
109
+ return _this;
110
+ }
111
+ WindowsTerminal.prototype._write = function (data) {
112
+ this._defer(this._doWrite, data);
113
+ };
114
+ WindowsTerminal.prototype._doWrite = function (data) {
115
+ this._agent.inSocket.write(data);
116
+ };
117
+ /**
118
+ * openpty
119
+ */
120
+ WindowsTerminal.open = function (options) {
121
+ throw new Error('open() not supported on windows, use Fork() instead.');
122
+ };
123
+ /**
124
+ * TTY
125
+ */
126
+ WindowsTerminal.prototype.resize = function (cols, rows, pixelSize) {
127
+ var _this = this;
128
+ if (cols <= 0 || rows <= 0 || isNaN(cols) || isNaN(rows) || cols === Infinity || rows === Infinity) {
129
+ throw new Error('resizing must be done using positive cols and rows');
130
+ }
131
+ this._deferNoArgs(function () {
132
+ _this._agent.resize(cols, rows);
133
+ _this._cols = cols;
134
+ _this._rows = rows;
135
+ });
136
+ };
137
+ WindowsTerminal.prototype.clear = function () {
138
+ var _this = this;
139
+ this._deferNoArgs(function () {
140
+ _this._agent.clear();
141
+ });
142
+ };
143
+ WindowsTerminal.prototype.destroy = function () {
144
+ var _this = this;
145
+ this._deferNoArgs(function () {
146
+ _this.kill();
147
+ });
148
+ };
149
+ WindowsTerminal.prototype.kill = function (signal) {
150
+ var _this = this;
151
+ this._deferNoArgs(function () {
152
+ if (signal) {
153
+ throw new Error('Signals not supported on windows.');
154
+ }
155
+ _this._close();
156
+ _this._agent.kill();
157
+ });
158
+ };
159
+ WindowsTerminal.prototype._deferNoArgs = function (deferredFn) {
160
+ var _this = this;
161
+ // If the terminal is ready, execute.
162
+ if (this._isReady) {
163
+ deferredFn.call(this);
164
+ return;
165
+ }
166
+ // Queue until terminal is ready.
167
+ this._deferreds.push({
168
+ run: function () { return deferredFn.call(_this); }
169
+ });
170
+ };
171
+ WindowsTerminal.prototype._defer = function (deferredFn, arg) {
172
+ var _this = this;
173
+ // If the terminal is ready, execute.
174
+ if (this._isReady) {
175
+ deferredFn.call(this, arg);
176
+ return;
177
+ }
178
+ // Queue until terminal is ready.
179
+ this._deferreds.push({
180
+ run: function () { return deferredFn.call(_this, arg); }
181
+ });
182
+ };
183
+ Object.defineProperty(WindowsTerminal.prototype, "process", {
184
+ get: function () { return this._name; },
185
+ enumerable: false,
186
+ configurable: true
187
+ });
188
+ Object.defineProperty(WindowsTerminal.prototype, "master", {
189
+ get: function () { throw new Error('master is not supported on Windows'); },
190
+ enumerable: false,
191
+ configurable: true
192
+ });
193
+ Object.defineProperty(WindowsTerminal.prototype, "slave", {
194
+ get: function () { throw new Error('slave is not supported on Windows'); },
195
+ enumerable: false,
196
+ configurable: true
197
+ });
198
+ return WindowsTerminal;
199
+ }(terminal_1.Terminal));
200
+ exports.WindowsTerminal = WindowsTerminal;
201
+ //# sourceMappingURL=windowsTerminal.js.map
@@ -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,18 @@
1
+ {
2
+ "name": "@lydell/node-pty-win32-arm64",
3
+ "version": "1.2.0-beta.12",
4
+ "description": "The node-pty package, stripped down only for win32-arm64.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git://github.com/lydell/node-pty.git"
8
+ },
9
+ "license": "MIT",
10
+ "type": "commonjs",
11
+ "exports": "./lib/index.js",
12
+ "os": [
13
+ "win32"
14
+ ],
15
+ "cpu": [
16
+ "arm64"
17
+ ]
18
+ }