@lvce-editor/pty-host 6.1.0 → 7.0.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.
- package/dist/ptyHostMain.js +24 -24
- package/package.json +1 -1
package/dist/ptyHostMain.js
CHANGED
|
@@ -1276,14 +1276,14 @@ const Auto = () => {
|
|
|
1276
1276
|
|
|
1277
1277
|
const getModule = method => {
|
|
1278
1278
|
switch (method) {
|
|
1279
|
+
case ElectronMessagePort:
|
|
1280
|
+
return ElectronMessagePortRpcClient;
|
|
1281
|
+
case ElectronUtilityProcess:
|
|
1282
|
+
return ElectronUtilityProcessRpcClient;
|
|
1279
1283
|
case NodeForkedProcess:
|
|
1280
1284
|
return NodeForkedProcessRpcClient;
|
|
1281
1285
|
case WebSocket:
|
|
1282
1286
|
return NodeWebSocketRpcClient;
|
|
1283
|
-
case ElectronUtilityProcess:
|
|
1284
|
-
return ElectronUtilityProcessRpcClient;
|
|
1285
|
-
case ElectronMessagePort:
|
|
1286
|
-
return ElectronMessagePortRpcClient;
|
|
1287
1287
|
default:
|
|
1288
1288
|
throw new Error('unexpected ipc type');
|
|
1289
1289
|
}
|
|
@@ -1301,8 +1301,8 @@ const listen$1 = async ({
|
|
|
1301
1301
|
|
|
1302
1302
|
const handleNodeMessagePort = async messagePort => {
|
|
1303
1303
|
await listen$1({
|
|
1304
|
-
|
|
1305
|
-
|
|
1304
|
+
messagePort,
|
|
1305
|
+
method: NodeMessagePort
|
|
1306
1306
|
});
|
|
1307
1307
|
};
|
|
1308
1308
|
|
|
@@ -1365,9 +1365,9 @@ class Pty extends EventTarget {
|
|
|
1365
1365
|
* @returns {Promise<any>}
|
|
1366
1366
|
*/
|
|
1367
1367
|
const create$1 = async ({
|
|
1368
|
-
|
|
1368
|
+
args,
|
|
1369
1369
|
command,
|
|
1370
|
-
|
|
1370
|
+
cwd
|
|
1371
1371
|
} = {}) => {
|
|
1372
1372
|
try {
|
|
1373
1373
|
string(cwd);
|
|
@@ -1377,8 +1377,8 @@ const create$1 = async ({
|
|
|
1377
1377
|
spawn
|
|
1378
1378
|
} = await import('node-pty');
|
|
1379
1379
|
const pty = spawn(command, args, {
|
|
1380
|
-
|
|
1381
|
-
|
|
1380
|
+
cwd,
|
|
1381
|
+
encoding: null
|
|
1382
1382
|
// cols: 10,
|
|
1383
1383
|
// rows: 10,
|
|
1384
1384
|
});
|
|
@@ -1411,9 +1411,9 @@ const create = async (ipc, id, cwd, command, args) => {
|
|
|
1411
1411
|
object(ipc);
|
|
1412
1412
|
// @ts-ignore
|
|
1413
1413
|
const pty = await create$1({
|
|
1414
|
-
|
|
1414
|
+
args,
|
|
1415
1415
|
command,
|
|
1416
|
-
|
|
1416
|
+
cwd
|
|
1417
1417
|
});
|
|
1418
1418
|
const handleData = event => {
|
|
1419
1419
|
ipc.send({
|
|
@@ -1461,9 +1461,9 @@ const commandMap = {
|
|
|
1461
1461
|
[HandleNodeMessagePort]: handleNodeMessagePort,
|
|
1462
1462
|
[HandleWebSocket]: handleWebSocket,
|
|
1463
1463
|
[TerminalCreate]: create,
|
|
1464
|
+
[TerminalDispose]: dispose,
|
|
1464
1465
|
[TerminalResize]: resize,
|
|
1465
|
-
[TerminalWrite]: write
|
|
1466
|
-
[TerminalDispose]: dispose
|
|
1466
|
+
[TerminalWrite]: write
|
|
1467
1467
|
};
|
|
1468
1468
|
|
|
1469
1469
|
const listen = async () => {
|
|
@@ -1775,54 +1775,54 @@ var hasRequiredLib$1;
|
|
|
1775
1775
|
function requireLib$1 () {
|
|
1776
1776
|
if (hasRequiredLib$1) return lib;
|
|
1777
1777
|
hasRequiredLib$1 = 1;
|
|
1778
|
-
(function (exports) {
|
|
1778
|
+
(function (exports$1) {
|
|
1779
1779
|
|
|
1780
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1780
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
1781
1781
|
value: true
|
|
1782
1782
|
});
|
|
1783
|
-
Object.defineProperty(exports, "isIdentifierChar", {
|
|
1783
|
+
Object.defineProperty(exports$1, "isIdentifierChar", {
|
|
1784
1784
|
enumerable: true,
|
|
1785
1785
|
get: function () {
|
|
1786
1786
|
return _identifier.isIdentifierChar;
|
|
1787
1787
|
}
|
|
1788
1788
|
});
|
|
1789
|
-
Object.defineProperty(exports, "isIdentifierName", {
|
|
1789
|
+
Object.defineProperty(exports$1, "isIdentifierName", {
|
|
1790
1790
|
enumerable: true,
|
|
1791
1791
|
get: function () {
|
|
1792
1792
|
return _identifier.isIdentifierName;
|
|
1793
1793
|
}
|
|
1794
1794
|
});
|
|
1795
|
-
Object.defineProperty(exports, "isIdentifierStart", {
|
|
1795
|
+
Object.defineProperty(exports$1, "isIdentifierStart", {
|
|
1796
1796
|
enumerable: true,
|
|
1797
1797
|
get: function () {
|
|
1798
1798
|
return _identifier.isIdentifierStart;
|
|
1799
1799
|
}
|
|
1800
1800
|
});
|
|
1801
|
-
Object.defineProperty(exports, "isKeyword", {
|
|
1801
|
+
Object.defineProperty(exports$1, "isKeyword", {
|
|
1802
1802
|
enumerable: true,
|
|
1803
1803
|
get: function () {
|
|
1804
1804
|
return _keyword.isKeyword;
|
|
1805
1805
|
}
|
|
1806
1806
|
});
|
|
1807
|
-
Object.defineProperty(exports, "isReservedWord", {
|
|
1807
|
+
Object.defineProperty(exports$1, "isReservedWord", {
|
|
1808
1808
|
enumerable: true,
|
|
1809
1809
|
get: function () {
|
|
1810
1810
|
return _keyword.isReservedWord;
|
|
1811
1811
|
}
|
|
1812
1812
|
});
|
|
1813
|
-
Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
|
|
1813
|
+
Object.defineProperty(exports$1, "isStrictBindOnlyReservedWord", {
|
|
1814
1814
|
enumerable: true,
|
|
1815
1815
|
get: function () {
|
|
1816
1816
|
return _keyword.isStrictBindOnlyReservedWord;
|
|
1817
1817
|
}
|
|
1818
1818
|
});
|
|
1819
|
-
Object.defineProperty(exports, "isStrictBindReservedWord", {
|
|
1819
|
+
Object.defineProperty(exports$1, "isStrictBindReservedWord", {
|
|
1820
1820
|
enumerable: true,
|
|
1821
1821
|
get: function () {
|
|
1822
1822
|
return _keyword.isStrictBindReservedWord;
|
|
1823
1823
|
}
|
|
1824
1824
|
});
|
|
1825
|
-
Object.defineProperty(exports, "isStrictReservedWord", {
|
|
1825
|
+
Object.defineProperty(exports$1, "isStrictReservedWord", {
|
|
1826
1826
|
enumerable: true,
|
|
1827
1827
|
get: function () {
|
|
1828
1828
|
return _keyword.isStrictReservedWord;
|