@lvce-editor/process-explorer-worker 3.0.0 → 3.2.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/index.js +935 -49
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@ const toCommandId = key => {
|
|
|
2
2
|
const dotIndex = key.indexOf('.');
|
|
3
3
|
return key.slice(dotIndex + 1);
|
|
4
4
|
};
|
|
5
|
-
const create$
|
|
5
|
+
const create$e = () => {
|
|
6
6
|
const states = Object.create(null);
|
|
7
7
|
const commandMapRef = {};
|
|
8
8
|
return {
|
|
@@ -184,22 +184,25 @@ const {
|
|
|
184
184
|
get: get$2,
|
|
185
185
|
getCommandIds,
|
|
186
186
|
registerCommands,
|
|
187
|
-
set: set$
|
|
187
|
+
set: set$9,
|
|
188
188
|
wrapCommand,
|
|
189
189
|
wrapLoadContent
|
|
190
|
-
} = create$
|
|
190
|
+
} = create$e();
|
|
191
191
|
|
|
192
|
-
const create$
|
|
192
|
+
const create$d = (id, _uri, x, y, width, height, _args, parentUid, platform = 0, assetDir = '') => {
|
|
193
193
|
const state = {
|
|
194
194
|
assetDir,
|
|
195
195
|
collapsedPids: [],
|
|
196
|
+
errorCodeFrame: '',
|
|
196
197
|
errorMessage: '',
|
|
198
|
+
errorStack: '',
|
|
197
199
|
focus: 0,
|
|
198
200
|
focused: false,
|
|
199
201
|
focusedIndex: -1,
|
|
200
202
|
height,
|
|
201
203
|
initial: true,
|
|
202
204
|
parentUid,
|
|
205
|
+
platform,
|
|
203
206
|
processes: [],
|
|
204
207
|
rootPid: 0,
|
|
205
208
|
uid: id,
|
|
@@ -208,7 +211,7 @@ const create$9 = (id, _uri, x, y, width, height, _args, parentUid, _platform = 0
|
|
|
208
211
|
x,
|
|
209
212
|
y
|
|
210
213
|
};
|
|
211
|
-
set$
|
|
214
|
+
set$9(state.uid, state, state);
|
|
212
215
|
return state;
|
|
213
216
|
};
|
|
214
217
|
|
|
@@ -217,7 +220,7 @@ const isEqual$1 = (oldState, newState) => {
|
|
|
217
220
|
};
|
|
218
221
|
|
|
219
222
|
const isEqual = (oldState, newState) => {
|
|
220
|
-
return oldState.initial === newState.initial && oldState.errorMessage === newState.errorMessage && oldState.visibleProcesses === newState.visibleProcesses;
|
|
223
|
+
return oldState.initial === newState.initial && oldState.errorCodeFrame === newState.errorCodeFrame && oldState.errorMessage === newState.errorMessage && oldState.errorStack === newState.errorStack && oldState.visibleProcesses === newState.visibleProcesses;
|
|
221
224
|
};
|
|
222
225
|
|
|
223
226
|
const RenderItems = 1;
|
|
@@ -305,6 +308,7 @@ const Text = 12;
|
|
|
305
308
|
const Th = 13;
|
|
306
309
|
const THead = 14;
|
|
307
310
|
const Tr = 15;
|
|
311
|
+
const Pre = 51;
|
|
308
312
|
|
|
309
313
|
const ClientX = 'event.clientX';
|
|
310
314
|
const ClientY = 'event.clientY';
|
|
@@ -321,10 +325,21 @@ const DownArrow = 16;
|
|
|
321
325
|
const ContextMenu = 56;
|
|
322
326
|
const Star = 131;
|
|
323
327
|
|
|
328
|
+
const Script = 2;
|
|
329
|
+
|
|
324
330
|
const CtrlCmd = 1 << 11 >>> 0;
|
|
325
331
|
|
|
332
|
+
const Electron = 2;
|
|
333
|
+
const Remote = 3;
|
|
334
|
+
|
|
335
|
+
const DebugWorker = 55;
|
|
336
|
+
const EditorWorker = 99;
|
|
337
|
+
const ErrorWorker = 3308;
|
|
326
338
|
const FileSystemWorker$1 = 209;
|
|
327
|
-
const
|
|
339
|
+
const IconThemeWorker = 7009;
|
|
340
|
+
const OpenerWorker = 4561;
|
|
341
|
+
const RendererWorker$1 = 1;
|
|
342
|
+
const TestWorker = 9001;
|
|
328
343
|
|
|
329
344
|
const FocusSelector = 'Viewlet.focusSelector';
|
|
330
345
|
const SetDom2 = 'Viewlet.setDom2';
|
|
@@ -333,7 +348,7 @@ const SetFocusContext = 'Viewlet.setFocusContext';
|
|
|
333
348
|
const Empty = 0;
|
|
334
349
|
const FocusExplorer = 13;
|
|
335
350
|
|
|
336
|
-
const getKeyBindings = () => {
|
|
351
|
+
const getKeyBindings$1 = () => {
|
|
337
352
|
return [{
|
|
338
353
|
command: 'ProcessExplorer.handleArrowRight',
|
|
339
354
|
key: RightArrow,
|
|
@@ -514,6 +529,49 @@ class VError extends Error {
|
|
|
514
529
|
}
|
|
515
530
|
}
|
|
516
531
|
|
|
532
|
+
class AssertionError extends Error {
|
|
533
|
+
constructor(message) {
|
|
534
|
+
super(message);
|
|
535
|
+
this.name = 'AssertionError';
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
const Object$1 = 1;
|
|
539
|
+
const Number$1 = 2;
|
|
540
|
+
const Array$1 = 3;
|
|
541
|
+
const String$1 = 4;
|
|
542
|
+
const Boolean$1 = 5;
|
|
543
|
+
const Function = 6;
|
|
544
|
+
const Null = 7;
|
|
545
|
+
const Unknown = 8;
|
|
546
|
+
const getType = value => {
|
|
547
|
+
switch (typeof value) {
|
|
548
|
+
case 'number':
|
|
549
|
+
return Number$1;
|
|
550
|
+
case 'function':
|
|
551
|
+
return Function;
|
|
552
|
+
case 'string':
|
|
553
|
+
return String$1;
|
|
554
|
+
case 'object':
|
|
555
|
+
if (value === null) {
|
|
556
|
+
return Null;
|
|
557
|
+
}
|
|
558
|
+
if (Array.isArray(value)) {
|
|
559
|
+
return Array$1;
|
|
560
|
+
}
|
|
561
|
+
return Object$1;
|
|
562
|
+
case 'boolean':
|
|
563
|
+
return Boolean$1;
|
|
564
|
+
default:
|
|
565
|
+
return Unknown;
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
const number = value => {
|
|
569
|
+
const type = getType(value);
|
|
570
|
+
if (type !== Number$1) {
|
|
571
|
+
throw new AssertionError('expected value to be of type number');
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
|
|
517
575
|
const isMessagePort = value => {
|
|
518
576
|
return value && value instanceof MessagePort;
|
|
519
577
|
};
|
|
@@ -828,6 +886,9 @@ const IpcChildWithModuleWorkerAndMessagePort$1 = {
|
|
|
828
886
|
listen: listen$6,
|
|
829
887
|
wrap: wrap$e
|
|
830
888
|
};
|
|
889
|
+
const Error$3 = 1;
|
|
890
|
+
const Open = 2;
|
|
891
|
+
const Close = 3;
|
|
831
892
|
const addListener = (emitter, type, callback) => {
|
|
832
893
|
if ('addEventListener' in emitter) {
|
|
833
894
|
emitter.addEventListener(type, callback);
|
|
@@ -922,6 +983,66 @@ const IpcParentWithMessagePort$1 = {
|
|
|
922
983
|
signal: signal$1,
|
|
923
984
|
wrap: wrap$5
|
|
924
985
|
};
|
|
986
|
+
const stringifyCompact = value => {
|
|
987
|
+
return JSON.stringify(value);
|
|
988
|
+
};
|
|
989
|
+
const parse = content => {
|
|
990
|
+
if (content === 'undefined') {
|
|
991
|
+
return null;
|
|
992
|
+
}
|
|
993
|
+
try {
|
|
994
|
+
return JSON.parse(content);
|
|
995
|
+
} catch (error) {
|
|
996
|
+
throw new VError(error, 'failed to parse json');
|
|
997
|
+
}
|
|
998
|
+
};
|
|
999
|
+
const waitForWebSocketToBeOpen = webSocket => {
|
|
1000
|
+
return getFirstEvent(webSocket, {
|
|
1001
|
+
close: Close,
|
|
1002
|
+
error: Error$3,
|
|
1003
|
+
open: Open
|
|
1004
|
+
});
|
|
1005
|
+
};
|
|
1006
|
+
const create$c = async ({
|
|
1007
|
+
webSocket
|
|
1008
|
+
}) => {
|
|
1009
|
+
const firstWebSocketEvent = await waitForWebSocketToBeOpen(webSocket);
|
|
1010
|
+
if (firstWebSocketEvent.type === Error$3) {
|
|
1011
|
+
throw new IpcError(`WebSocket connection error`);
|
|
1012
|
+
}
|
|
1013
|
+
if (firstWebSocketEvent.type === Close) {
|
|
1014
|
+
throw new IpcError('Websocket connection was immediately closed');
|
|
1015
|
+
}
|
|
1016
|
+
return webSocket;
|
|
1017
|
+
};
|
|
1018
|
+
class IpcParentWithWebSocket extends Ipc {
|
|
1019
|
+
getData(event) {
|
|
1020
|
+
return parse(event.data);
|
|
1021
|
+
}
|
|
1022
|
+
send(message) {
|
|
1023
|
+
this._rawIpc.send(stringifyCompact(message));
|
|
1024
|
+
}
|
|
1025
|
+
sendAndTransfer(message) {
|
|
1026
|
+
throw new Error('sendAndTransfer not supported');
|
|
1027
|
+
}
|
|
1028
|
+
dispose() {
|
|
1029
|
+
this._rawIpc.close();
|
|
1030
|
+
}
|
|
1031
|
+
onClose(callback) {
|
|
1032
|
+
this._rawIpc.addEventListener('close', callback);
|
|
1033
|
+
}
|
|
1034
|
+
onMessage(callback) {
|
|
1035
|
+
this._rawIpc.addEventListener('message', callback);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
const wrap = webSocket => {
|
|
1039
|
+
return new IpcParentWithWebSocket(webSocket);
|
|
1040
|
+
};
|
|
1041
|
+
const IpcParentWithWebSocket$1 = {
|
|
1042
|
+
__proto__: null,
|
|
1043
|
+
create: create$c,
|
|
1044
|
+
wrap
|
|
1045
|
+
};
|
|
925
1046
|
|
|
926
1047
|
class CommandNotFoundError extends Error {
|
|
927
1048
|
constructor(command) {
|
|
@@ -1158,7 +1279,7 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
|
1158
1279
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
1159
1280
|
return create$1$1(id, errorProperty);
|
|
1160
1281
|
};
|
|
1161
|
-
const create$
|
|
1282
|
+
const create$b = (message, result) => {
|
|
1162
1283
|
return {
|
|
1163
1284
|
id: message.id,
|
|
1164
1285
|
jsonrpc: Two$1,
|
|
@@ -1167,7 +1288,7 @@ const create$8 = (message, result) => {
|
|
|
1167
1288
|
};
|
|
1168
1289
|
const getSuccessResponse = (message, result) => {
|
|
1169
1290
|
const resultProperty = result ?? null;
|
|
1170
|
-
return create$
|
|
1291
|
+
return create$b(message, resultProperty);
|
|
1171
1292
|
};
|
|
1172
1293
|
const getErrorResponseSimple = (id, error) => {
|
|
1173
1294
|
return {
|
|
@@ -1261,7 +1382,7 @@ const handleJsonRpcMessage = async (...args) => {
|
|
|
1261
1382
|
|
|
1262
1383
|
const Two = '2.0';
|
|
1263
1384
|
|
|
1264
|
-
const create$
|
|
1385
|
+
const create$a = (method, params) => {
|
|
1265
1386
|
return {
|
|
1266
1387
|
jsonrpc: Two,
|
|
1267
1388
|
method,
|
|
@@ -1269,7 +1390,7 @@ const create$7 = (method, params) => {
|
|
|
1269
1390
|
};
|
|
1270
1391
|
};
|
|
1271
1392
|
|
|
1272
|
-
const create$
|
|
1393
|
+
const create$9 = (id, method, params) => {
|
|
1273
1394
|
const message = {
|
|
1274
1395
|
id,
|
|
1275
1396
|
jsonrpc: Two,
|
|
@@ -1280,12 +1401,12 @@ const create$6 = (id, method, params) => {
|
|
|
1280
1401
|
};
|
|
1281
1402
|
|
|
1282
1403
|
let id = 0;
|
|
1283
|
-
const create$
|
|
1404
|
+
const create$8 = () => {
|
|
1284
1405
|
return ++id;
|
|
1285
1406
|
};
|
|
1286
1407
|
|
|
1287
1408
|
const registerPromise = map => {
|
|
1288
|
-
const id = create$
|
|
1409
|
+
const id = create$8();
|
|
1289
1410
|
const {
|
|
1290
1411
|
promise,
|
|
1291
1412
|
resolve
|
|
@@ -1302,7 +1423,7 @@ const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer)
|
|
|
1302
1423
|
id,
|
|
1303
1424
|
promise
|
|
1304
1425
|
} = registerPromise(callbacks);
|
|
1305
|
-
const message = create$
|
|
1426
|
+
const message = create$9(id, method, params);
|
|
1306
1427
|
if (useSendAndTransfer && ipc.sendAndTransfer) {
|
|
1307
1428
|
ipc.sendAndTransfer(message);
|
|
1308
1429
|
} else {
|
|
@@ -1338,7 +1459,7 @@ const createRpc = ipc => {
|
|
|
1338
1459
|
* @deprecated
|
|
1339
1460
|
*/
|
|
1340
1461
|
send(method, ...params) {
|
|
1341
|
-
const message = create$
|
|
1462
|
+
const message = create$a(method, params);
|
|
1342
1463
|
ipc.send(message);
|
|
1343
1464
|
}
|
|
1344
1465
|
};
|
|
@@ -1378,7 +1499,7 @@ const listen$1 = async (module, options) => {
|
|
|
1378
1499
|
return ipc;
|
|
1379
1500
|
};
|
|
1380
1501
|
|
|
1381
|
-
const create$
|
|
1502
|
+
const create$7 = async ({
|
|
1382
1503
|
commandMap,
|
|
1383
1504
|
isMessagePortOpen = true,
|
|
1384
1505
|
messagePort
|
|
@@ -1396,7 +1517,7 @@ const create$4 = async ({
|
|
|
1396
1517
|
return rpc;
|
|
1397
1518
|
};
|
|
1398
1519
|
|
|
1399
|
-
const create$
|
|
1520
|
+
const create$6 = async ({
|
|
1400
1521
|
commandMap,
|
|
1401
1522
|
isMessagePortOpen,
|
|
1402
1523
|
send
|
|
@@ -1406,7 +1527,7 @@ const create$3 = async ({
|
|
|
1406
1527
|
port2
|
|
1407
1528
|
} = new MessageChannel();
|
|
1408
1529
|
await send(port1);
|
|
1409
|
-
return create$
|
|
1530
|
+
return create$7({
|
|
1410
1531
|
commandMap,
|
|
1411
1532
|
isMessagePortOpen,
|
|
1412
1533
|
messagePort: port2
|
|
@@ -1441,13 +1562,13 @@ const createSharedLazyRpc = factory => {
|
|
|
1441
1562
|
};
|
|
1442
1563
|
};
|
|
1443
1564
|
|
|
1444
|
-
const create$
|
|
1565
|
+
const create$5 = async ({
|
|
1445
1566
|
commandMap,
|
|
1446
1567
|
isMessagePortOpen,
|
|
1447
1568
|
send
|
|
1448
1569
|
}) => {
|
|
1449
1570
|
return createSharedLazyRpc(() => {
|
|
1450
|
-
return create$
|
|
1571
|
+
return create$6({
|
|
1451
1572
|
commandMap,
|
|
1452
1573
|
isMessagePortOpen,
|
|
1453
1574
|
send
|
|
@@ -1455,6 +1576,68 @@ const create$2 = async ({
|
|
|
1455
1576
|
});
|
|
1456
1577
|
};
|
|
1457
1578
|
|
|
1579
|
+
const Https = 'https:';
|
|
1580
|
+
const Ws = 'ws:';
|
|
1581
|
+
const Wss = 'wss:';
|
|
1582
|
+
|
|
1583
|
+
const getWebSocketProtocol = locationProtocol => {
|
|
1584
|
+
return locationProtocol === Https ? Wss : Ws;
|
|
1585
|
+
};
|
|
1586
|
+
|
|
1587
|
+
const getWebSocketUrl = (type, host, locationProtocol) => {
|
|
1588
|
+
const wsProtocol = getWebSocketProtocol(locationProtocol);
|
|
1589
|
+
return `${wsProtocol}//${host}/websocket/${type}`;
|
|
1590
|
+
};
|
|
1591
|
+
|
|
1592
|
+
const getHost = () => {
|
|
1593
|
+
return location.host;
|
|
1594
|
+
};
|
|
1595
|
+
const getProtocol = () => {
|
|
1596
|
+
return location.protocol;
|
|
1597
|
+
};
|
|
1598
|
+
|
|
1599
|
+
const create$4 = async ({
|
|
1600
|
+
commandMap,
|
|
1601
|
+
webSocket
|
|
1602
|
+
}) => {
|
|
1603
|
+
// TODO create a commandMap per rpc instance
|
|
1604
|
+
register(commandMap);
|
|
1605
|
+
const rawIpc = await IpcParentWithWebSocket$1.create({
|
|
1606
|
+
webSocket
|
|
1607
|
+
});
|
|
1608
|
+
const ipc = IpcParentWithWebSocket$1.wrap(rawIpc);
|
|
1609
|
+
handleIpc(ipc);
|
|
1610
|
+
const rpc = createRpc(ipc);
|
|
1611
|
+
return rpc;
|
|
1612
|
+
};
|
|
1613
|
+
|
|
1614
|
+
const create$3 = async ({
|
|
1615
|
+
commandMap,
|
|
1616
|
+
type
|
|
1617
|
+
}) => {
|
|
1618
|
+
const host = getHost();
|
|
1619
|
+
const protocol = getProtocol();
|
|
1620
|
+
const wsUrl = getWebSocketUrl(type, host, protocol);
|
|
1621
|
+
const webSocket = new WebSocket(wsUrl);
|
|
1622
|
+
const rpc = await create$4({
|
|
1623
|
+
commandMap,
|
|
1624
|
+
webSocket
|
|
1625
|
+
});
|
|
1626
|
+
return rpc;
|
|
1627
|
+
};
|
|
1628
|
+
|
|
1629
|
+
const create$2 = async ({
|
|
1630
|
+
commandMap,
|
|
1631
|
+
type
|
|
1632
|
+
}) => {
|
|
1633
|
+
return createSharedLazyRpc(() => {
|
|
1634
|
+
return create$3({
|
|
1635
|
+
commandMap,
|
|
1636
|
+
type
|
|
1637
|
+
});
|
|
1638
|
+
});
|
|
1639
|
+
};
|
|
1640
|
+
|
|
1458
1641
|
const create$1 = async ({
|
|
1459
1642
|
commandMap
|
|
1460
1643
|
}) => {
|
|
@@ -1487,7 +1670,7 @@ const createMockRpc = ({
|
|
|
1487
1670
|
};
|
|
1488
1671
|
|
|
1489
1672
|
const rpcs = Object.create(null);
|
|
1490
|
-
const set$
|
|
1673
|
+
const set$8 = (id, rpc) => {
|
|
1491
1674
|
rpcs[id] = rpc;
|
|
1492
1675
|
};
|
|
1493
1676
|
const get = id => {
|
|
@@ -1520,7 +1703,7 @@ const create = rpcId => {
|
|
|
1520
1703
|
const mockRpc = createMockRpc({
|
|
1521
1704
|
commandMap
|
|
1522
1705
|
});
|
|
1523
|
-
set$
|
|
1706
|
+
set$8(rpcId, mockRpc);
|
|
1524
1707
|
// @ts-ignore
|
|
1525
1708
|
mockRpc[Symbol.dispose] = () => {
|
|
1526
1709
|
remove(rpcId);
|
|
@@ -1529,29 +1712,612 @@ const create = rpcId => {
|
|
|
1529
1712
|
return mockRpc;
|
|
1530
1713
|
},
|
|
1531
1714
|
set(rpc) {
|
|
1532
|
-
set$
|
|
1715
|
+
set$8(rpcId, rpc);
|
|
1533
1716
|
}
|
|
1534
1717
|
};
|
|
1535
1718
|
};
|
|
1536
1719
|
|
|
1537
1720
|
const {
|
|
1538
|
-
set: set$
|
|
1721
|
+
set: set$7
|
|
1722
|
+
} = create(EditorWorker);
|
|
1723
|
+
|
|
1724
|
+
const {
|
|
1725
|
+
invoke: invoke$2,
|
|
1726
|
+
set: set$6
|
|
1727
|
+
} = create(ErrorWorker);
|
|
1728
|
+
const prepare = async error => {
|
|
1729
|
+
return invoke$2('Errors.prepare', error);
|
|
1730
|
+
};
|
|
1731
|
+
|
|
1732
|
+
const {
|
|
1733
|
+
set: set$5
|
|
1539
1734
|
} = create(FileSystemWorker$1);
|
|
1540
1735
|
|
|
1541
1736
|
const FileSystemWorker = {
|
|
1542
1737
|
__proto__: null,
|
|
1543
|
-
set: set$
|
|
1738
|
+
set: set$5
|
|
1544
1739
|
};
|
|
1545
1740
|
|
|
1546
1741
|
const {
|
|
1742
|
+
set: set$4
|
|
1743
|
+
} = create(OpenerWorker);
|
|
1744
|
+
|
|
1745
|
+
const {
|
|
1746
|
+
set: set$3
|
|
1747
|
+
} = create(IconThemeWorker);
|
|
1748
|
+
|
|
1749
|
+
const {
|
|
1750
|
+
dispose,
|
|
1547
1751
|
invoke: invoke$1,
|
|
1548
1752
|
invokeAndTransfer,
|
|
1549
|
-
|
|
1550
|
-
|
|
1753
|
+
registerMockRpc,
|
|
1754
|
+
set: set$2
|
|
1755
|
+
} = create(RendererWorker$1);
|
|
1756
|
+
const searchFileHtml = async uri => {
|
|
1757
|
+
return invoke$1('ExtensionHost.searchFileWithHtml', uri);
|
|
1758
|
+
};
|
|
1759
|
+
const getFilePathElectron = async file => {
|
|
1760
|
+
return invoke$1('FileSystemHandle.getFilePathElectron', file);
|
|
1761
|
+
};
|
|
1762
|
+
const handleModifiedStatusChange = async (uri, modified) => {
|
|
1763
|
+
return invoke$1('Main.handleModifiedStatusChange', uri, modified);
|
|
1764
|
+
};
|
|
1765
|
+
/**
|
|
1766
|
+
* @deprecated
|
|
1767
|
+
*/
|
|
1768
|
+
const showContextMenu = async (x, y, id, ...args) => {
|
|
1769
|
+
return invoke$1('ContextMenu.show', x, y, id, ...args);
|
|
1770
|
+
};
|
|
1771
|
+
const showContextMenu2 = async (uid, menuId, x, y, args) => {
|
|
1772
|
+
number(uid);
|
|
1773
|
+
number(menuId);
|
|
1774
|
+
number(x);
|
|
1775
|
+
number(y);
|
|
1776
|
+
await invoke$1('ContextMenu.show2', uid, menuId, x, y, args);
|
|
1777
|
+
};
|
|
1778
|
+
const getElectronVersion = async () => {
|
|
1779
|
+
return invoke$1('Process.getElectronVersion');
|
|
1780
|
+
};
|
|
1781
|
+
const applyBulkReplacement = async bulkEdits => {
|
|
1782
|
+
await invoke$1('BulkReplacement.applyBulkReplacement', bulkEdits);
|
|
1783
|
+
};
|
|
1784
|
+
const setColorTheme = async id => {
|
|
1785
|
+
return invoke$1(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
|
|
1786
|
+
};
|
|
1787
|
+
const getNodeVersion = async () => {
|
|
1788
|
+
return invoke$1('Process.getNodeVersion');
|
|
1789
|
+
};
|
|
1790
|
+
const getBadgeCounts = async () => {
|
|
1791
|
+
return invoke$1('Layout.getBadgeCounts');
|
|
1792
|
+
};
|
|
1793
|
+
const getChromeVersion = async () => {
|
|
1794
|
+
return invoke$1('Process.getChromeVersion');
|
|
1795
|
+
};
|
|
1796
|
+
const getV8Version = async () => {
|
|
1797
|
+
return invoke$1('Process.getV8Version');
|
|
1798
|
+
};
|
|
1799
|
+
const getFileHandles = async fileIds => {
|
|
1800
|
+
const files = await invoke$1('FileSystemHandle.getFileHandles', fileIds);
|
|
1801
|
+
return files;
|
|
1802
|
+
};
|
|
1803
|
+
const setWorkspacePath = async path => {
|
|
1804
|
+
await invoke$1('Workspace.setPath', path);
|
|
1805
|
+
};
|
|
1806
|
+
const registerWebViewInterceptor = async (id, port) => {
|
|
1807
|
+
await invokeAndTransfer('WebView.registerInterceptor', id, port);
|
|
1808
|
+
};
|
|
1809
|
+
const unregisterWebViewInterceptor = async id => {
|
|
1810
|
+
await invoke$1('WebView.unregisterInterceptor', id);
|
|
1811
|
+
};
|
|
1812
|
+
const sendMessagePortToEditorWorker = async (port, rpcId) => {
|
|
1813
|
+
const command = 'HandleMessagePort.handleMessagePort';
|
|
1814
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToEditorWorker', port, command, rpcId);
|
|
1815
|
+
};
|
|
1816
|
+
const sendMessagePortToSettingsWorker = async (port, rpcId) => {
|
|
1817
|
+
const command = 'HandleMessagePort.handleMessagePort';
|
|
1818
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToSettingsWorker', port, command, rpcId);
|
|
1819
|
+
};
|
|
1820
|
+
const sendMessagePortToClipBoardWorker = async (port, rpcId) => {
|
|
1821
|
+
const command = 'ClipBoard.handleMessagePort';
|
|
1822
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToClipBoardWorker', port, command, rpcId);
|
|
1823
|
+
};
|
|
1824
|
+
const sendMessagePortToOpenerWorker = async (port, rpcId) => {
|
|
1825
|
+
const command = 'HandleMessagePort.handleMessagePort';
|
|
1826
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToOpenerWorker', port, command, rpcId);
|
|
1827
|
+
};
|
|
1828
|
+
const sendMessagePortToChatMathWorker = async (port, rpcId) => {
|
|
1829
|
+
const command = 'HandleMessagePort.handleMessagePort';
|
|
1830
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToChatMathWorker', port, command, rpcId);
|
|
1831
|
+
};
|
|
1832
|
+
const sendMessagePortToChatCoordinatorWorker = async (port, rpcId) => {
|
|
1833
|
+
const command = 'HandleMessagePort.handleMessagePort';
|
|
1834
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToChatCoordinatorWorker', port, command, rpcId);
|
|
1835
|
+
};
|
|
1836
|
+
const sendMessagePortToChatMessageParsingWorker = async (port, rpcId) => {
|
|
1837
|
+
const command = 'HandleMessagePort.handleMessagePort';
|
|
1838
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToChatMessageParsingWorker', port, command, rpcId);
|
|
1839
|
+
};
|
|
1840
|
+
const sendMessagePortToMainAreaWorker = async (port, rpcId) => {
|
|
1841
|
+
const command = 'HandleMessagePort.handleMessagePort';
|
|
1842
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToMainAreaWorker', port, command, rpcId);
|
|
1843
|
+
};
|
|
1844
|
+
const sendMessagePortToTerminalProcess = async (port, rpcId) => {
|
|
1845
|
+
const command = 'HandleMessagePortForTerminalProcess.handleMessagePortForTerminalProcess';
|
|
1846
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToTerminalProcess', port, command, rpcId);
|
|
1847
|
+
};
|
|
1848
|
+
const sendMessagePortToTextSearchWorker = async (port, rpcId) => {
|
|
1849
|
+
const command = 'HandleMessagePort.handleMessagePort';
|
|
1850
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToTextSearchWorker', port, command, rpcId);
|
|
1851
|
+
};
|
|
1852
|
+
const sendMessagePortToAuthWorker = async (port, rpcId) => {
|
|
1853
|
+
const command = 'HandleMessagePort.handleMessagePort';
|
|
1854
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToAuthWorker', port, command, rpcId);
|
|
1855
|
+
};
|
|
1856
|
+
const sendMessagePortToAuthProcess = async (port, rpcId) => {
|
|
1857
|
+
const command = 'HandleMessagePortForAuthProcess.handleMessagePortForAuthProcess';
|
|
1858
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToSharedProcess', port, command, rpcId);
|
|
1859
|
+
};
|
|
1860
|
+
const sendMessagePortToErrorWorker$1 = async (port, rpcId) => {
|
|
1861
|
+
const command = 'Errors.handleMessagePort';
|
|
1862
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToErrorWorker', port, command, rpcId);
|
|
1863
|
+
};
|
|
1864
|
+
const sendMessagePortToMarkdownWorker = async (port, rpcId) => {
|
|
1865
|
+
const command = 'Markdown.handleMessagePort';
|
|
1866
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToMarkdownWorker', port, command, rpcId);
|
|
1867
|
+
};
|
|
1868
|
+
const sendMessagePortToIconThemeWorker = async (port, rpcId) => {
|
|
1869
|
+
const command = 'IconTheme.handleMessagePort';
|
|
1870
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToIconThemeWorker', port, command, rpcId);
|
|
1871
|
+
};
|
|
1551
1872
|
const sendMessagePortToFileSystemWorker$1 = async (port, rpcId) => {
|
|
1552
1873
|
const command = 'FileSystem.handleMessagePort';
|
|
1553
1874
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
|
|
1554
1875
|
};
|
|
1876
|
+
const readFile = async uri => {
|
|
1877
|
+
return invoke$1('FileSystem.readFile', uri);
|
|
1878
|
+
};
|
|
1879
|
+
const getWebViewSecret = async key => {
|
|
1880
|
+
return invoke$1('WebView.getSecret', key);
|
|
1881
|
+
};
|
|
1882
|
+
const setWebViewPort = async (uid, port, origin, portType) => {
|
|
1883
|
+
return invokeAndTransfer('WebView.setPort', uid, port, origin, portType);
|
|
1884
|
+
};
|
|
1885
|
+
const setFocus = key => {
|
|
1886
|
+
return invoke$1('Focus.setFocus', key);
|
|
1887
|
+
};
|
|
1888
|
+
const getFileIcon = async options => {
|
|
1889
|
+
return invoke$1('IconTheme.getFileIcon', options);
|
|
1890
|
+
};
|
|
1891
|
+
const getColorThemeNames = async () => {
|
|
1892
|
+
return invoke$1('ColorTheme.getColorThemeNames');
|
|
1893
|
+
};
|
|
1894
|
+
const disableExtension = async id => {
|
|
1895
|
+
return invoke$1('ExtensionManagement.disable', id);
|
|
1896
|
+
};
|
|
1897
|
+
const enableExtension = async id => {
|
|
1898
|
+
return invoke$1('ExtensionManagement.enable', id);
|
|
1899
|
+
};
|
|
1900
|
+
const disposeEditor = async uid => {
|
|
1901
|
+
return invoke$1('Viewlet.dispose', uid);
|
|
1902
|
+
};
|
|
1903
|
+
const handleDebugChange = async params => {
|
|
1904
|
+
return invoke$1('Run And Debug.handleChange', params);
|
|
1905
|
+
};
|
|
1906
|
+
const getFolderIcon = async options => {
|
|
1907
|
+
return invoke$1('IconTheme.getFolderIcon', options);
|
|
1908
|
+
};
|
|
1909
|
+
const handleWorkspaceRefresh = async () => {
|
|
1910
|
+
return invoke$1('Layout.handleWorkspaceRefresh');
|
|
1911
|
+
};
|
|
1912
|
+
const closeWidget = async widgetId => {
|
|
1913
|
+
return invoke$1('Viewlet.closeWidget', widgetId);
|
|
1914
|
+
};
|
|
1915
|
+
const createViewlet = async (viewletModuleId, editorUid, tabId, bounds, uri) => {
|
|
1916
|
+
return invoke$1('Layout.createViewlet', viewletModuleId, editorUid, tabId, bounds, uri);
|
|
1917
|
+
};
|
|
1918
|
+
const sendMessagePortToExtensionHostWorker = async (port, rpcId = 0) => {
|
|
1919
|
+
const command = 'HandleMessagePort.handleMessagePort2';
|
|
1920
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
|
|
1921
|
+
};
|
|
1922
|
+
const getViewletModuleId = async uri => {
|
|
1923
|
+
return invoke$1('Layout.getModuleId', uri);
|
|
1924
|
+
};
|
|
1925
|
+
const showPanel = async () => {
|
|
1926
|
+
return invoke$1('Layout.showPanel');
|
|
1927
|
+
};
|
|
1928
|
+
const showPreview = async () => {
|
|
1929
|
+
return invoke$1('Layout.showPreview');
|
|
1930
|
+
};
|
|
1931
|
+
const saveEditor = async () => {
|
|
1932
|
+
return invoke$1('Editor.save');
|
|
1933
|
+
};
|
|
1934
|
+
const sendMessagePortToFileSearchWorker2 = async (port, rpcId = 0) => {
|
|
1935
|
+
const command = 'FileSearch.handleMessagePort';
|
|
1936
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSearchWorker', port, command, rpcId);
|
|
1937
|
+
};
|
|
1938
|
+
const togglePanelView = async id => {
|
|
1939
|
+
return invoke$1('Panel.toggleView', id);
|
|
1940
|
+
};
|
|
1941
|
+
const resizeViewlet = async (uid, dimensions) => {
|
|
1942
|
+
return invoke$1('Viewlet.resize', uid, dimensions);
|
|
1943
|
+
};
|
|
1944
|
+
const sendMessagePortToFileSearchWorker = async (port, rpcId = 0) => {
|
|
1945
|
+
const command = 'QuickPick.handleMessagePort';
|
|
1946
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSearchWorker', port, command, rpcId);
|
|
1947
|
+
};
|
|
1948
|
+
const sendMessagePortToQuickPickWorker = async (port, rpcId = 0) => {
|
|
1949
|
+
const command = 'QuickPick.handleMessagePort';
|
|
1950
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToQuickPickWorker', port, command, rpcId);
|
|
1951
|
+
};
|
|
1952
|
+
const sendMessagePortToSearchProcess = async port => {
|
|
1953
|
+
await invokeAndTransfer('SendMessagePortToElectron.sendMessagePortToElectron', port, 'HandleMessagePortForSearchProcess.handleMessagePortForSearchProcess');
|
|
1954
|
+
};
|
|
1955
|
+
const sendMessagePortToChatViewModel = async port => {
|
|
1956
|
+
await invokeAndTransfer('SendMessagePortToElectron.sendMessagePortToChatViewModel', port, 'ViewModel.handleMessagePort');
|
|
1957
|
+
};
|
|
1958
|
+
const sendMessagePortToChatNetworkWorker = async port => {
|
|
1959
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToChatNetworkWorker', port, 'HandleMessagePort.handleMessagePort');
|
|
1960
|
+
};
|
|
1961
|
+
const sendMessagePortToChatToolWorker = async port => {
|
|
1962
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToChatToolWorker', port, 'HandleMessagePort.handleMessagePort');
|
|
1963
|
+
};
|
|
1964
|
+
const sendMessagePortToChatStorageWorker = async (port, rpcId) => {
|
|
1965
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToChatStorageWorker', port, 'HandleMessagePort.handleMessagePort', rpcId);
|
|
1966
|
+
};
|
|
1967
|
+
const sendMessagePortToChatDebugViewWorker = async port => {
|
|
1968
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToChatDebugViewWorker', port, 'HandleMessagePort.handleMessagePort');
|
|
1969
|
+
};
|
|
1970
|
+
const confirm = async (message, options) => {
|
|
1971
|
+
const result = await invoke$1('ConfirmPrompt.prompt', message, options);
|
|
1972
|
+
return result;
|
|
1973
|
+
};
|
|
1974
|
+
const getRecentlyOpened = async () => {
|
|
1975
|
+
return invoke$1(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
|
|
1976
|
+
};
|
|
1977
|
+
const getKeyBindings = async () => {
|
|
1978
|
+
return invoke$1('KeyBindingsInitial.getKeyBindings');
|
|
1979
|
+
};
|
|
1980
|
+
const writeClipBoardText = async text => {
|
|
1981
|
+
await invoke$1('ClipBoard.writeText', /* text */text);
|
|
1982
|
+
};
|
|
1983
|
+
const writeFile = async (uri, text) => {
|
|
1984
|
+
await invoke$1('FileSystem.writeFile', uri, text);
|
|
1985
|
+
};
|
|
1986
|
+
const handleUriChange = async (uri, newUri) => {
|
|
1987
|
+
await invoke$1('Main.handleUriChange', uri, newUri);
|
|
1988
|
+
};
|
|
1989
|
+
const readClipBoardText = async () => {
|
|
1990
|
+
return invoke$1('ClipBoard.readText');
|
|
1991
|
+
};
|
|
1992
|
+
const writeClipBoardImage = async blob => {
|
|
1993
|
+
await invoke$1('ClipBoard.writeImage', /* text */blob);
|
|
1994
|
+
};
|
|
1995
|
+
const searchFileMemory = async uri => {
|
|
1996
|
+
return invoke$1('ExtensionHost.searchFileWithMemory', uri);
|
|
1997
|
+
};
|
|
1998
|
+
const searchFileFetch = async uri => {
|
|
1999
|
+
return invoke$1('ExtensionHost.searchFileWithFetch', uri);
|
|
2000
|
+
};
|
|
2001
|
+
const showMessageBox = async options => {
|
|
2002
|
+
return invoke$1('ElectronDialog.showMessageBox', options);
|
|
2003
|
+
};
|
|
2004
|
+
const handleDebugResumed = async params => {
|
|
2005
|
+
await invoke$1('Run And Debug.handleResumed', params);
|
|
2006
|
+
};
|
|
2007
|
+
const openWidget = async name => {
|
|
2008
|
+
await invoke$1('Viewlet.openWidget', name);
|
|
2009
|
+
};
|
|
2010
|
+
const getIcons = async requests => {
|
|
2011
|
+
const icons = await invoke$1('IconTheme.getIcons', requests);
|
|
2012
|
+
return icons;
|
|
2013
|
+
};
|
|
2014
|
+
const activateByEvent = (event, assetDir, platform) => {
|
|
2015
|
+
return invoke$1('ExtensionHostManagement.activateByEvent', event, assetDir, platform);
|
|
2016
|
+
};
|
|
2017
|
+
const setAdditionalFocus = focusKey => {
|
|
2018
|
+
return invoke$1('Focus.setAdditionalFocus', focusKey);
|
|
2019
|
+
};
|
|
2020
|
+
const getActiveEditorId = () => {
|
|
2021
|
+
return invoke$1('GetActiveEditor.getActiveEditorId');
|
|
2022
|
+
};
|
|
2023
|
+
const getWorkspacePath = () => {
|
|
2024
|
+
return invoke$1('Workspace.getPath');
|
|
2025
|
+
};
|
|
2026
|
+
const sendMessagePortToRendererProcess = async port => {
|
|
2027
|
+
const command = 'HandleMessagePort.handleMessagePort';
|
|
2028
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToRendererProcess', port, command, DebugWorker);
|
|
2029
|
+
};
|
|
2030
|
+
const sendMessagePortToTextMeasurementWorker = async port => {
|
|
2031
|
+
const command = 'TextMeasurement.handleMessagePort';
|
|
2032
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToTextMeasurementWorker', port, command, 0);
|
|
2033
|
+
};
|
|
2034
|
+
const sendMessagePortToSourceControlWorker = async port => {
|
|
2035
|
+
const command = 'SourceControl.handleMessagePort';
|
|
2036
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToSourceControlWorker', port, command, 0);
|
|
2037
|
+
};
|
|
2038
|
+
const sendMessagePortToSharedProcess = async port => {
|
|
2039
|
+
const command = 'HandleElectronMessagePort.handleElectronMessagePort';
|
|
2040
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToSharedProcess', port, command, 0);
|
|
2041
|
+
};
|
|
2042
|
+
const sendMessagePortToFileSystemProcess = async (port, rpcId) => {
|
|
2043
|
+
const command = 'HandleMessagePortForFileSystemProcess.handleMessagePortForFileSystemProcess';
|
|
2044
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToSharedProcess', port, command, rpcId);
|
|
2045
|
+
};
|
|
2046
|
+
const sendMessagePortToIframeWorker = async (port, rpcId) => {
|
|
2047
|
+
const command = 'Iframes.handleMessagePort';
|
|
2048
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToIframeWorker', port, command, rpcId);
|
|
2049
|
+
};
|
|
2050
|
+
const sendMessagePortToExtensionManagementWorker = async (port, rpcId) => {
|
|
2051
|
+
const command = 'Extensions.handleMessagePort';
|
|
2052
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionManagementWorker', port, command, rpcId);
|
|
2053
|
+
};
|
|
2054
|
+
const getPreference = async key => {
|
|
2055
|
+
return await invoke$1('Preferences.get', key);
|
|
2056
|
+
};
|
|
2057
|
+
const getAllExtensions = async () => {
|
|
2058
|
+
return invoke$1('ExtensionManagement.getAllExtensions');
|
|
2059
|
+
};
|
|
2060
|
+
const rerenderEditor = async key => {
|
|
2061
|
+
return invoke$1('Editor.rerender', key);
|
|
2062
|
+
};
|
|
2063
|
+
const handleDebugPaused = async params => {
|
|
2064
|
+
await invoke$1('Run And Debug.handlePaused', params);
|
|
2065
|
+
};
|
|
2066
|
+
const openUri = async (uri, focus, options) => {
|
|
2067
|
+
await invoke$1('Main.openUri', uri, focus, options);
|
|
2068
|
+
};
|
|
2069
|
+
const sendMessagePortToSyntaxHighlightingWorker = async port => {
|
|
2070
|
+
await invokeAndTransfer('SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort2');
|
|
2071
|
+
};
|
|
2072
|
+
const sendMessagePortToBlobWorker = async (port, rpcId = 0) => {
|
|
2073
|
+
const command = 'Blob.handleMessagePort';
|
|
2074
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToBlobWorker', port, command, rpcId);
|
|
2075
|
+
};
|
|
2076
|
+
const sendMessagePortToDiffWorker = async (port, rpcId = 0) => {
|
|
2077
|
+
const command = 'Diff.handleMessagePort';
|
|
2078
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToDiffWorker', port, command, rpcId);
|
|
2079
|
+
};
|
|
2080
|
+
const handleDebugScriptParsed = async script => {
|
|
2081
|
+
await invoke$1('Run And Debug.handleScriptParsed', script);
|
|
2082
|
+
};
|
|
2083
|
+
const getWindowId = async () => {
|
|
2084
|
+
return invoke$1('GetWindowId.getWindowId');
|
|
2085
|
+
};
|
|
2086
|
+
const getBlob = async uri => {
|
|
2087
|
+
return invoke$1('FileSystem.getBlob', uri);
|
|
2088
|
+
};
|
|
2089
|
+
const getExtensionCommands = async () => {
|
|
2090
|
+
return invoke$1('ExtensionHost.getCommands');
|
|
2091
|
+
};
|
|
2092
|
+
const showErrorDialog = async errorInfo => {
|
|
2093
|
+
await invoke$1('ErrorHandling.showErrorDialog', errorInfo);
|
|
2094
|
+
};
|
|
2095
|
+
const getFolderSize = async uri => {
|
|
2096
|
+
return await invoke$1('FileSystem.getFolderSize', uri);
|
|
2097
|
+
};
|
|
2098
|
+
const getExtension = async id => {
|
|
2099
|
+
return invoke$1('ExtensionManagement.getExtension', id);
|
|
2100
|
+
};
|
|
2101
|
+
const getMarkdownDom = async html => {
|
|
2102
|
+
return invoke$1('Markdown.getVirtualDom', html);
|
|
2103
|
+
};
|
|
2104
|
+
const renderMarkdown = async (markdown, options) => {
|
|
2105
|
+
return invoke$1('Markdown.renderMarkdown', markdown, options);
|
|
2106
|
+
};
|
|
2107
|
+
const openNativeFolder = async uri => {
|
|
2108
|
+
await invoke$1('OpenNativeFolder.openNativeFolder', uri);
|
|
2109
|
+
};
|
|
2110
|
+
const uninstallExtension = async id => {
|
|
2111
|
+
return invoke$1('ExtensionManagement.uninstall', id);
|
|
2112
|
+
};
|
|
2113
|
+
const installExtension = async id => {
|
|
2114
|
+
return invoke$1('ExtensionManagement.install', id);
|
|
2115
|
+
};
|
|
2116
|
+
const minimizeWindow = async () => {
|
|
2117
|
+
return invoke$1('ElectronWindow.minimize');
|
|
2118
|
+
};
|
|
2119
|
+
const unmaximizeWindow = async () => {
|
|
2120
|
+
return invoke$1('ElectronWindow.unmaximize');
|
|
2121
|
+
};
|
|
2122
|
+
const maximizeWindow = async () => {
|
|
2123
|
+
return invoke$1('ElectronWindow.maximize');
|
|
2124
|
+
};
|
|
2125
|
+
const showSideBar = async (id, focus) => {
|
|
2126
|
+
return invoke$1('SideBar.show', id, focus);
|
|
2127
|
+
};
|
|
2128
|
+
const closeWindow = async () => {
|
|
2129
|
+
return invoke$1('ElectronWindow.close');
|
|
2130
|
+
};
|
|
2131
|
+
const openExtensionSearch = async () => {
|
|
2132
|
+
return invoke$1('SideBar.openViewlet', 'Extensions');
|
|
2133
|
+
};
|
|
2134
|
+
const setExtensionsSearchValue = async searchValue => {
|
|
2135
|
+
return invoke$1('Extensions.handleInput', searchValue, Script);
|
|
2136
|
+
};
|
|
2137
|
+
const openExternal = async uri => {
|
|
2138
|
+
await invoke$1('Open.openExternal', uri);
|
|
2139
|
+
};
|
|
2140
|
+
const openUrl = async uri => {
|
|
2141
|
+
await invoke$1('Open.openUrl', uri);
|
|
2142
|
+
};
|
|
2143
|
+
const getAllPreferences = async () => {
|
|
2144
|
+
return invoke$1('Preferences.getAll');
|
|
2145
|
+
};
|
|
2146
|
+
const showSaveFilePicker = async () => {
|
|
2147
|
+
return invoke$1('FilePicker.showSaveFilePicker');
|
|
2148
|
+
};
|
|
2149
|
+
const getLogsDir = async () => {
|
|
2150
|
+
return invoke$1('PlatformPaths.getLogsDir');
|
|
2151
|
+
};
|
|
2152
|
+
const measureTextBlockHeight = async (actualInput, fontFamily, fontSize, lineHeightPx, width) => {
|
|
2153
|
+
return invoke$1(`MeasureTextHeight.measureTextBlockHeight`, actualInput, fontFamily, fontSize, lineHeightPx, width);
|
|
2154
|
+
};
|
|
2155
|
+
const refreshOutput = async () => {
|
|
2156
|
+
await invoke$1('Output.refresh');
|
|
2157
|
+
};
|
|
2158
|
+
const send = async (port, sourceId = 0) => {
|
|
2159
|
+
await sendMessagePortToOpenerWorker(port, sourceId);
|
|
2160
|
+
};
|
|
2161
|
+
const initializeOpenerWorker = async () => {
|
|
2162
|
+
const rpc = await create$5({
|
|
2163
|
+
commandMap: {},
|
|
2164
|
+
send
|
|
2165
|
+
});
|
|
2166
|
+
set$4(rpc);
|
|
2167
|
+
};
|
|
2168
|
+
const send2 = async port => {
|
|
2169
|
+
await sendMessagePortToEditorWorker(port, TestWorker);
|
|
2170
|
+
};
|
|
2171
|
+
const initializeEditorWorker = async () => {
|
|
2172
|
+
const rpc = await create$5({
|
|
2173
|
+
commandMap: {},
|
|
2174
|
+
send: send2
|
|
2175
|
+
});
|
|
2176
|
+
set$7(rpc);
|
|
2177
|
+
};
|
|
2178
|
+
const send3 = port => {
|
|
2179
|
+
return sendMessagePortToTextMeasurementWorker(port);
|
|
2180
|
+
};
|
|
2181
|
+
const initializeTextMeasurementWorker = async () => {
|
|
2182
|
+
const rpc = await create$5({
|
|
2183
|
+
commandMap: {},
|
|
2184
|
+
send: send3
|
|
2185
|
+
});
|
|
2186
|
+
set$3(rpc);
|
|
2187
|
+
};
|
|
2188
|
+
|
|
2189
|
+
const RendererWorker = {
|
|
2190
|
+
__proto__: null,
|
|
2191
|
+
activateByEvent,
|
|
2192
|
+
applyBulkReplacement,
|
|
2193
|
+
closeWidget,
|
|
2194
|
+
closeWindow,
|
|
2195
|
+
confirm,
|
|
2196
|
+
createViewlet,
|
|
2197
|
+
disableExtension,
|
|
2198
|
+
dispose,
|
|
2199
|
+
disposeEditor,
|
|
2200
|
+
enableExtension,
|
|
2201
|
+
getActiveEditorId,
|
|
2202
|
+
getAllExtensions,
|
|
2203
|
+
getAllPreferences,
|
|
2204
|
+
getBadgeCounts,
|
|
2205
|
+
getBlob,
|
|
2206
|
+
getChromeVersion,
|
|
2207
|
+
getColorThemeNames,
|
|
2208
|
+
getElectronVersion,
|
|
2209
|
+
getExtension,
|
|
2210
|
+
getExtensionCommands,
|
|
2211
|
+
getFileHandles,
|
|
2212
|
+
getFileIcon,
|
|
2213
|
+
getFilePathElectron,
|
|
2214
|
+
getFolderIcon,
|
|
2215
|
+
getFolderSize,
|
|
2216
|
+
getIcons,
|
|
2217
|
+
getKeyBindings,
|
|
2218
|
+
getLogsDir,
|
|
2219
|
+
getMarkdownDom,
|
|
2220
|
+
getNodeVersion,
|
|
2221
|
+
getPreference,
|
|
2222
|
+
getRecentlyOpened,
|
|
2223
|
+
getV8Version,
|
|
2224
|
+
getViewletModuleId,
|
|
2225
|
+
getWebViewSecret,
|
|
2226
|
+
getWindowId,
|
|
2227
|
+
getWorkspacePath,
|
|
2228
|
+
handleDebugChange,
|
|
2229
|
+
handleDebugPaused,
|
|
2230
|
+
handleDebugResumed,
|
|
2231
|
+
handleDebugScriptParsed,
|
|
2232
|
+
handleModifiedStatusChange,
|
|
2233
|
+
handleUriChange,
|
|
2234
|
+
handleWorkspaceRefresh,
|
|
2235
|
+
initializeEditorWorker,
|
|
2236
|
+
initializeOpenerWorker,
|
|
2237
|
+
initializeTextMeasurementWorker,
|
|
2238
|
+
installExtension,
|
|
2239
|
+
invoke: invoke$1,
|
|
2240
|
+
invokeAndTransfer,
|
|
2241
|
+
maximizeWindow,
|
|
2242
|
+
measureTextBlockHeight,
|
|
2243
|
+
minimizeWindow,
|
|
2244
|
+
openExtensionSearch,
|
|
2245
|
+
openExternal,
|
|
2246
|
+
openNativeFolder,
|
|
2247
|
+
openUri,
|
|
2248
|
+
openUrl,
|
|
2249
|
+
openWidget,
|
|
2250
|
+
readClipBoardText,
|
|
2251
|
+
readFile,
|
|
2252
|
+
refreshOutput,
|
|
2253
|
+
registerMockRpc,
|
|
2254
|
+
registerWebViewInterceptor,
|
|
2255
|
+
renderMarkdown,
|
|
2256
|
+
rerenderEditor,
|
|
2257
|
+
resizeViewlet,
|
|
2258
|
+
saveEditor,
|
|
2259
|
+
searchFileFetch,
|
|
2260
|
+
searchFileHtml,
|
|
2261
|
+
searchFileMemory,
|
|
2262
|
+
sendMessagePortToAuthProcess,
|
|
2263
|
+
sendMessagePortToAuthWorker,
|
|
2264
|
+
sendMessagePortToBlobWorker,
|
|
2265
|
+
sendMessagePortToChatCoordinatorWorker,
|
|
2266
|
+
sendMessagePortToChatDebugViewWorker,
|
|
2267
|
+
sendMessagePortToChatMathWorker,
|
|
2268
|
+
sendMessagePortToChatMessageParsingWorker,
|
|
2269
|
+
sendMessagePortToChatNetworkWorker,
|
|
2270
|
+
sendMessagePortToChatStorageWorker,
|
|
2271
|
+
sendMessagePortToChatToolWorker,
|
|
2272
|
+
sendMessagePortToChatViewModel,
|
|
2273
|
+
sendMessagePortToClipBoardWorker,
|
|
2274
|
+
sendMessagePortToDiffWorker,
|
|
2275
|
+
sendMessagePortToEditorWorker,
|
|
2276
|
+
sendMessagePortToErrorWorker: sendMessagePortToErrorWorker$1,
|
|
2277
|
+
sendMessagePortToExtensionHostWorker,
|
|
2278
|
+
sendMessagePortToExtensionManagementWorker,
|
|
2279
|
+
sendMessagePortToFileSearchWorker,
|
|
2280
|
+
sendMessagePortToFileSearchWorker2,
|
|
2281
|
+
sendMessagePortToFileSystemProcess,
|
|
2282
|
+
sendMessagePortToFileSystemWorker: sendMessagePortToFileSystemWorker$1,
|
|
2283
|
+
sendMessagePortToIconThemeWorker,
|
|
2284
|
+
sendMessagePortToIframeWorker,
|
|
2285
|
+
sendMessagePortToMainAreaWorker,
|
|
2286
|
+
sendMessagePortToMarkdownWorker,
|
|
2287
|
+
sendMessagePortToOpenerWorker,
|
|
2288
|
+
sendMessagePortToQuickPickWorker,
|
|
2289
|
+
sendMessagePortToRendererProcess,
|
|
2290
|
+
sendMessagePortToSearchProcess,
|
|
2291
|
+
sendMessagePortToSettingsWorker,
|
|
2292
|
+
sendMessagePortToSharedProcess,
|
|
2293
|
+
sendMessagePortToSourceControlWorker,
|
|
2294
|
+
sendMessagePortToSyntaxHighlightingWorker,
|
|
2295
|
+
sendMessagePortToTerminalProcess,
|
|
2296
|
+
sendMessagePortToTextMeasurementWorker,
|
|
2297
|
+
sendMessagePortToTextSearchWorker,
|
|
2298
|
+
set: set$2,
|
|
2299
|
+
setAdditionalFocus,
|
|
2300
|
+
setColorTheme,
|
|
2301
|
+
setExtensionsSearchValue,
|
|
2302
|
+
setFocus,
|
|
2303
|
+
setWebViewPort,
|
|
2304
|
+
setWorkspacePath,
|
|
2305
|
+
showContextMenu,
|
|
2306
|
+
showContextMenu2,
|
|
2307
|
+
showErrorDialog,
|
|
2308
|
+
showMessageBox,
|
|
2309
|
+
showPanel,
|
|
2310
|
+
showPreview,
|
|
2311
|
+
showSaveFilePicker,
|
|
2312
|
+
showSideBar,
|
|
2313
|
+
togglePanelView,
|
|
2314
|
+
uninstallExtension,
|
|
2315
|
+
unmaximizeWindow,
|
|
2316
|
+
unregisterWebViewInterceptor,
|
|
2317
|
+
writeClipBoardImage,
|
|
2318
|
+
writeClipBoardText,
|
|
2319
|
+
writeFile
|
|
2320
|
+
};
|
|
1555
2321
|
|
|
1556
2322
|
const isDebuggable = command => {
|
|
1557
2323
|
return command.includes('node ') || command.includes('node.exe') || command.includes('node.mojom.NodeService');
|
|
@@ -1610,12 +2376,67 @@ const handleFocus = state => {
|
|
|
1610
2376
|
};
|
|
1611
2377
|
};
|
|
1612
2378
|
|
|
2379
|
+
const sendMessagePortToProcessExplorer = async port => {
|
|
2380
|
+
const rendererWorker = RendererWorker;
|
|
2381
|
+
await rendererWorker.sendMessagePortToProcessExplorer(port);
|
|
2382
|
+
};
|
|
2383
|
+
|
|
2384
|
+
const launchProcessExplorerElectron = async () => {
|
|
2385
|
+
try {
|
|
2386
|
+
const rpc = await create$5({
|
|
2387
|
+
commandMap: {},
|
|
2388
|
+
send: sendMessagePortToProcessExplorer
|
|
2389
|
+
});
|
|
2390
|
+
return rpc;
|
|
2391
|
+
} catch (error) {
|
|
2392
|
+
throw new VError(error, 'Failed to create process explorer electron rpc');
|
|
2393
|
+
}
|
|
2394
|
+
};
|
|
2395
|
+
|
|
2396
|
+
const launchProcessExplorerNode = async () => {
|
|
2397
|
+
try {
|
|
2398
|
+
const rpc = await create$2({
|
|
2399
|
+
commandMap: {},
|
|
2400
|
+
type: 'process-explorer'
|
|
2401
|
+
});
|
|
2402
|
+
return rpc;
|
|
2403
|
+
} catch (error) {
|
|
2404
|
+
throw new VError(error, 'Failed to create process explorer websocket rpc');
|
|
2405
|
+
}
|
|
2406
|
+
};
|
|
2407
|
+
|
|
2408
|
+
const state$1 = {
|
|
2409
|
+
rpc: undefined
|
|
2410
|
+
};
|
|
1613
2411
|
const invoke = async (method, ...params) => {
|
|
1614
|
-
|
|
2412
|
+
if (!state$1.rpc) {
|
|
2413
|
+
throw new Error('ProcessExplorerModule is not initialized');
|
|
2414
|
+
}
|
|
2415
|
+
return state$1.rpc.invoke(method, ...params);
|
|
2416
|
+
};
|
|
2417
|
+
const set$1 = newRpc => {
|
|
2418
|
+
state$1.rpc = newRpc;
|
|
2419
|
+
};
|
|
2420
|
+
|
|
2421
|
+
const state = {
|
|
2422
|
+
initializedPlatform: 0
|
|
2423
|
+
};
|
|
2424
|
+
const initializeProcessExplorer = async platform => {
|
|
2425
|
+
if (state.initializedPlatform === platform) {
|
|
2426
|
+
return;
|
|
2427
|
+
}
|
|
2428
|
+
if (platform === Electron) {
|
|
2429
|
+
const rpc = await launchProcessExplorerElectron();
|
|
2430
|
+
set$1(rpc);
|
|
2431
|
+
state.initializedPlatform = platform;
|
|
2432
|
+
return;
|
|
2433
|
+
}
|
|
2434
|
+
if (platform === Remote) {
|
|
2435
|
+
const rpc = await launchProcessExplorerNode();
|
|
2436
|
+
set$1(rpc);
|
|
2437
|
+
state.initializedPlatform = platform;
|
|
2438
|
+
}
|
|
1615
2439
|
};
|
|
1616
|
-
const {
|
|
1617
|
-
set
|
|
1618
|
-
} = FileSystemWorker;
|
|
1619
2440
|
|
|
1620
2441
|
const getErrorMessage = error => {
|
|
1621
2442
|
if (error instanceof Error) {
|
|
@@ -1623,6 +2444,17 @@ const getErrorMessage = error => {
|
|
|
1623
2444
|
}
|
|
1624
2445
|
return String(error);
|
|
1625
2446
|
};
|
|
2447
|
+
const prepareError = async error => {
|
|
2448
|
+
try {
|
|
2449
|
+
return await prepare(error);
|
|
2450
|
+
} catch {
|
|
2451
|
+
return {
|
|
2452
|
+
codeFrame: undefined,
|
|
2453
|
+
message: getErrorMessage(error),
|
|
2454
|
+
stack: undefined
|
|
2455
|
+
};
|
|
2456
|
+
}
|
|
2457
|
+
};
|
|
1626
2458
|
const getFocusedIndex = (oldFocusedIndex, visibleProcesses) => {
|
|
1627
2459
|
if (visibleProcesses.length === 0) {
|
|
1628
2460
|
return -1;
|
|
@@ -1634,12 +2466,15 @@ const getFocusedIndex = (oldFocusedIndex, visibleProcesses) => {
|
|
|
1634
2466
|
};
|
|
1635
2467
|
const refresh = async state => {
|
|
1636
2468
|
try {
|
|
2469
|
+
await initializeProcessExplorer(state.platform);
|
|
1637
2470
|
const rootPid = state.rootPid || (await invoke('ProcessId.getMainProcessId'));
|
|
1638
2471
|
const processes = await invoke('ListProcessesWithMemoryUsage.listProcessesWithMemoryUsage', rootPid);
|
|
1639
2472
|
const visibleProcesses = getVisibleProcesses(processes, state.collapsedPids, rootPid);
|
|
1640
2473
|
return {
|
|
1641
2474
|
...state,
|
|
2475
|
+
errorCodeFrame: '',
|
|
1642
2476
|
errorMessage: '',
|
|
2477
|
+
errorStack: '',
|
|
1643
2478
|
focusedIndex: getFocusedIndex(state.focusedIndex, visibleProcesses),
|
|
1644
2479
|
initial: false,
|
|
1645
2480
|
processes,
|
|
@@ -1647,9 +2482,12 @@ const refresh = async state => {
|
|
|
1647
2482
|
visibleProcesses
|
|
1648
2483
|
};
|
|
1649
2484
|
} catch (error) {
|
|
2485
|
+
const prettyError = await prepareError(error);
|
|
1650
2486
|
return {
|
|
1651
2487
|
...state,
|
|
1652
|
-
|
|
2488
|
+
errorCodeFrame: prettyError.codeFrame || '',
|
|
2489
|
+
errorMessage: prettyError.message || getErrorMessage(error),
|
|
2490
|
+
errorStack: prettyError.stack || '',
|
|
1653
2491
|
initial: false
|
|
1654
2492
|
};
|
|
1655
2493
|
}
|
|
@@ -1810,23 +2648,37 @@ const getBodyDom = state => {
|
|
|
1810
2648
|
type: TBody
|
|
1811
2649
|
}, ...visibleProcesses.flatMap((process, index) => getRowDom(process, index, index === focusedIndex))];
|
|
1812
2650
|
};
|
|
1813
|
-
const
|
|
1814
|
-
if (!
|
|
2651
|
+
const getErrorSectionDom = (value, type) => {
|
|
2652
|
+
if (!value) {
|
|
1815
2653
|
return [];
|
|
1816
2654
|
}
|
|
1817
2655
|
return [{
|
|
1818
2656
|
childCount: 1,
|
|
2657
|
+
type
|
|
2658
|
+
}, text(value)];
|
|
2659
|
+
};
|
|
2660
|
+
const hasError = state => {
|
|
2661
|
+
return Boolean(state.errorMessage || state.errorCodeFrame || state.errorStack);
|
|
2662
|
+
};
|
|
2663
|
+
const getErrorDom = state => {
|
|
2664
|
+
const messageDom = getErrorSectionDom(state.errorMessage, Div);
|
|
2665
|
+
const codeFrameDom = getErrorSectionDom(state.errorCodeFrame, Pre);
|
|
2666
|
+
const stackDom = getErrorSectionDom(state.errorStack, Pre);
|
|
2667
|
+
const childCount = messageDom.length / 2 + codeFrameDom.length / 2 + stackDom.length / 2;
|
|
2668
|
+
return [{
|
|
2669
|
+
childCount: 1,
|
|
2670
|
+
className: `${Viewlet} ${ProcessExplorer}`,
|
|
2671
|
+
role: None,
|
|
2672
|
+
type: Div
|
|
2673
|
+
}, {
|
|
2674
|
+
childCount,
|
|
1819
2675
|
className: Error$1,
|
|
1820
2676
|
type: Div
|
|
1821
|
-
},
|
|
2677
|
+
}, ...messageDom, ...codeFrameDom, ...stackDom];
|
|
1822
2678
|
};
|
|
1823
|
-
const
|
|
1824
|
-
if (state.initial) {
|
|
1825
|
-
return [];
|
|
1826
|
-
}
|
|
1827
|
-
const errorDom = getErrorDom(state.errorMessage);
|
|
2679
|
+
const getTableDom = state => {
|
|
1828
2680
|
return [{
|
|
1829
|
-
childCount: 1
|
|
2681
|
+
childCount: 1,
|
|
1830
2682
|
className: `${Viewlet} ${ProcessExplorer}`,
|
|
1831
2683
|
role: None,
|
|
1832
2684
|
type: Div
|
|
@@ -1844,7 +2696,16 @@ const getDom = state => {
|
|
|
1844
2696
|
role: Grid,
|
|
1845
2697
|
tabIndex: 0,
|
|
1846
2698
|
type: Table$1
|
|
1847
|
-
}, ...getHeaderDom(), ...getBodyDom(state)
|
|
2699
|
+
}, ...getHeaderDom(), ...getBodyDom(state)];
|
|
2700
|
+
};
|
|
2701
|
+
const getDom = state => {
|
|
2702
|
+
if (state.initial) {
|
|
2703
|
+
return [];
|
|
2704
|
+
}
|
|
2705
|
+
if (hasError(state)) {
|
|
2706
|
+
return getErrorDom(state);
|
|
2707
|
+
}
|
|
2708
|
+
return getTableDom(state);
|
|
1848
2709
|
};
|
|
1849
2710
|
const renderItems = (oldState, newState) => {
|
|
1850
2711
|
return [SetDom2, newState.uid, getDom(newState)];
|
|
@@ -1880,7 +2741,7 @@ const render2 = (uid, diffResult) => {
|
|
|
1880
2741
|
oldState,
|
|
1881
2742
|
scheduledState
|
|
1882
2743
|
} = get$2(uid);
|
|
1883
|
-
set$
|
|
2744
|
+
set$9(uid, scheduledState, scheduledState);
|
|
1884
2745
|
return applyRender(oldState, scheduledState, diffResult);
|
|
1885
2746
|
};
|
|
1886
2747
|
|
|
@@ -1911,7 +2772,7 @@ const renderEventListeners = () => {
|
|
|
1911
2772
|
|
|
1912
2773
|
const commandMap = {
|
|
1913
2774
|
'ProcessExplorer.collapseAll': wrapCommand(collapseAll),
|
|
1914
|
-
'ProcessExplorer.create': create$
|
|
2775
|
+
'ProcessExplorer.create': create$d,
|
|
1915
2776
|
'ProcessExplorer.diff2': diff2,
|
|
1916
2777
|
'ProcessExplorer.expandAll': wrapCommand(expandAll),
|
|
1917
2778
|
'ProcessExplorer.focusFirst': wrapCommand(focusFirst),
|
|
@@ -1919,7 +2780,7 @@ const commandMap = {
|
|
|
1919
2780
|
'ProcessExplorer.focusNext': wrapCommand(focusNext),
|
|
1920
2781
|
'ProcessExplorer.focusPrevious': wrapCommand(focusPrevious),
|
|
1921
2782
|
'ProcessExplorer.getCommandIds': getCommandIds,
|
|
1922
|
-
'ProcessExplorer.getKeyBindings': getKeyBindings,
|
|
2783
|
+
'ProcessExplorer.getKeyBindings': getKeyBindings$1,
|
|
1923
2784
|
'ProcessExplorer.handleArrowLeft': wrapCommand(handleArrowLeft),
|
|
1924
2785
|
'ProcessExplorer.handleArrowRight': wrapCommand(handleArrowRight),
|
|
1925
2786
|
'ProcessExplorer.handleBlur': wrapCommand(handleBlur),
|
|
@@ -1934,13 +2795,34 @@ const commandMap = {
|
|
|
1934
2795
|
'ProcessExplorer.terminate': terminate
|
|
1935
2796
|
};
|
|
1936
2797
|
|
|
2798
|
+
const sendMessagePortToErrorWorker = async port => {
|
|
2799
|
+
await sendMessagePortToErrorWorker$1(port, 0);
|
|
2800
|
+
};
|
|
2801
|
+
|
|
2802
|
+
const createErrorWorkerRpc = async () => {
|
|
2803
|
+
try {
|
|
2804
|
+
const rpc = await create$5({
|
|
2805
|
+
commandMap: {},
|
|
2806
|
+
send: sendMessagePortToErrorWorker
|
|
2807
|
+
});
|
|
2808
|
+
return rpc;
|
|
2809
|
+
} catch (error) {
|
|
2810
|
+
throw new VError(error, `Failed to create error worker rpc`);
|
|
2811
|
+
}
|
|
2812
|
+
};
|
|
2813
|
+
|
|
2814
|
+
const initializeErrorWorker = async () => {
|
|
2815
|
+
const rpc = await createErrorWorkerRpc();
|
|
2816
|
+
set$6(rpc);
|
|
2817
|
+
};
|
|
2818
|
+
|
|
1937
2819
|
const sendMessagePortToFileSystemWorker = async port => {
|
|
1938
2820
|
await sendMessagePortToFileSystemWorker$1(port, 0);
|
|
1939
2821
|
};
|
|
1940
2822
|
|
|
1941
2823
|
const createFileSystemWorkerRpc = async () => {
|
|
1942
2824
|
try {
|
|
1943
|
-
const rpc = await create$
|
|
2825
|
+
const rpc = await create$5({
|
|
1944
2826
|
commandMap: {},
|
|
1945
2827
|
send: sendMessagePortToFileSystemWorker
|
|
1946
2828
|
});
|
|
@@ -1950,6 +2832,10 @@ const createFileSystemWorkerRpc = async () => {
|
|
|
1950
2832
|
}
|
|
1951
2833
|
};
|
|
1952
2834
|
|
|
2835
|
+
const {
|
|
2836
|
+
set
|
|
2837
|
+
} = FileSystemWorker;
|
|
2838
|
+
|
|
1953
2839
|
const initializeFileSystemWorker = async () => {
|
|
1954
2840
|
const rpc = await createFileSystemWorkerRpc();
|
|
1955
2841
|
set(rpc);
|
|
@@ -1959,12 +2845,12 @@ const initializeRendererWorker = async () => {
|
|
|
1959
2845
|
const rpc = await create$1({
|
|
1960
2846
|
commandMap: commandMap
|
|
1961
2847
|
});
|
|
1962
|
-
set$
|
|
2848
|
+
set$2(rpc);
|
|
1963
2849
|
};
|
|
1964
2850
|
|
|
1965
2851
|
const listen = async () => {
|
|
1966
2852
|
registerCommands(commandMap);
|
|
1967
|
-
await Promise.all([initializeRendererWorker(), initializeFileSystemWorker()]);
|
|
2853
|
+
await Promise.all([initializeRendererWorker(), initializeFileSystemWorker(), initializeErrorWorker()]);
|
|
1968
2854
|
};
|
|
1969
2855
|
|
|
1970
2856
|
const main = async () => {
|