@lvce-editor/extension-host-worker 8.2.0 → 8.3.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/extensionHostWorkerMain.js +237 -205
- package/package.json +1 -1
|
@@ -579,7 +579,7 @@ const registerMethod = ({
|
|
|
579
579
|
}
|
|
580
580
|
};
|
|
581
581
|
};
|
|
582
|
-
const create$
|
|
582
|
+
const create$b = ({
|
|
583
583
|
additionalMethodNames = [],
|
|
584
584
|
executeKey = '',
|
|
585
585
|
name,
|
|
@@ -632,7 +632,7 @@ const String$1 = 'string';
|
|
|
632
632
|
|
|
633
633
|
const {
|
|
634
634
|
executeBraceCompletionProvider,
|
|
635
|
-
registerBraceCompletionProvider} = create$
|
|
635
|
+
registerBraceCompletionProvider} = create$b({
|
|
636
636
|
name: 'BraceCompletion',
|
|
637
637
|
resultShape: {
|
|
638
638
|
type: Boolean$1
|
|
@@ -642,7 +642,7 @@ const {
|
|
|
642
642
|
const {
|
|
643
643
|
executeClosingTagProvider,
|
|
644
644
|
registerClosingTagProvider
|
|
645
|
-
} = create$
|
|
645
|
+
} = create$b({
|
|
646
646
|
name: 'ClosingTag',
|
|
647
647
|
resultShape: {
|
|
648
648
|
allowUndefined: true,
|
|
@@ -654,7 +654,7 @@ const {
|
|
|
654
654
|
const {
|
|
655
655
|
executeCodeActionProvider,
|
|
656
656
|
registerCodeActionProvider
|
|
657
|
-
} = create$
|
|
657
|
+
} = create$b({
|
|
658
658
|
name: 'CodeAction',
|
|
659
659
|
resultShape: {
|
|
660
660
|
items: {
|
|
@@ -736,7 +736,7 @@ const executeCommand$1 = async (id, ...args) => {
|
|
|
736
736
|
const {
|
|
737
737
|
executeCommentProvider,
|
|
738
738
|
registerCommentProvider
|
|
739
|
-
} = create$
|
|
739
|
+
} = create$b({
|
|
740
740
|
name: 'Comment',
|
|
741
741
|
resultShape() {
|
|
742
742
|
return '';
|
|
@@ -747,7 +747,7 @@ const {
|
|
|
747
747
|
executeCompletionProvider,
|
|
748
748
|
executeresolveCompletionItemProvider,
|
|
749
749
|
registerCompletionProvider
|
|
750
|
-
} = create$
|
|
750
|
+
} = create$b({
|
|
751
751
|
additionalMethodNames: [
|
|
752
752
|
// @ts-ignore
|
|
753
753
|
{
|
|
@@ -782,17 +782,14 @@ const ExtensionManagementWorker = 9006;
|
|
|
782
782
|
const RendererWorker$1 = 1;
|
|
783
783
|
|
|
784
784
|
const rpcs$2 = Object.create(null);
|
|
785
|
-
const set$
|
|
786
|
-
if (rpcs$2[id]) {
|
|
787
|
-
throw new Error(`rpc with id ${id} is already registered`);
|
|
788
|
-
}
|
|
785
|
+
const set$b = (id, rpc) => {
|
|
789
786
|
rpcs$2[id] = rpc;
|
|
790
787
|
};
|
|
791
788
|
const get$b = id => {
|
|
792
789
|
return rpcs$2[id];
|
|
793
790
|
};
|
|
794
791
|
|
|
795
|
-
const create$
|
|
792
|
+
const create$a = rpcId => {
|
|
796
793
|
return {
|
|
797
794
|
async dispose() {
|
|
798
795
|
const rpc = get$b(rpcId);
|
|
@@ -811,7 +808,7 @@ const create$9 = rpcId => {
|
|
|
811
808
|
return rpc.invokeAndTransfer(method, ...params);
|
|
812
809
|
},
|
|
813
810
|
set(rpc) {
|
|
814
|
-
set$
|
|
811
|
+
set$b(rpcId, rpc);
|
|
815
812
|
}
|
|
816
813
|
};
|
|
817
814
|
};
|
|
@@ -819,16 +816,16 @@ const create$9 = rpcId => {
|
|
|
819
816
|
const {
|
|
820
817
|
dispose,
|
|
821
818
|
invoke: invoke$7,
|
|
822
|
-
invokeAndTransfer: invokeAndTransfer$
|
|
823
|
-
set: set$
|
|
824
|
-
} = create$
|
|
819
|
+
invokeAndTransfer: invokeAndTransfer$4,
|
|
820
|
+
set: set$a
|
|
821
|
+
} = create$a(DebugWorker$1);
|
|
825
822
|
|
|
826
823
|
const DebugWorker = {
|
|
827
824
|
__proto__: null,
|
|
828
825
|
dispose,
|
|
829
826
|
invoke: invoke$7,
|
|
830
|
-
invokeAndTransfer: invokeAndTransfer$
|
|
831
|
-
set: set$
|
|
827
|
+
invokeAndTransfer: invokeAndTransfer$4,
|
|
828
|
+
set: set$a
|
|
832
829
|
};
|
|
833
830
|
|
|
834
831
|
const isMessagePort = value => {
|
|
@@ -959,8 +956,8 @@ const getModuleNotFoundError = stderr => {
|
|
|
959
956
|
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
960
957
|
const message = lines[messageIndex];
|
|
961
958
|
return {
|
|
962
|
-
|
|
963
|
-
|
|
959
|
+
code: ERR_MODULE_NOT_FOUND,
|
|
960
|
+
message
|
|
964
961
|
};
|
|
965
962
|
};
|
|
966
963
|
const isModuleNotFoundError = stderr => {
|
|
@@ -983,14 +980,14 @@ const isUnhelpfulNativeModuleError = stderr => {
|
|
|
983
980
|
const getNativeModuleErrorMessage = stderr => {
|
|
984
981
|
const message = getMessageCodeBlock(stderr);
|
|
985
982
|
return {
|
|
986
|
-
|
|
987
|
-
|
|
983
|
+
code: E_INCOMPATIBLE_NATIVE_MODULE,
|
|
984
|
+
message: `Incompatible native node module: ${message}`
|
|
988
985
|
};
|
|
989
986
|
};
|
|
990
987
|
const getModuleSyntaxError = () => {
|
|
991
988
|
return {
|
|
992
|
-
|
|
993
|
-
|
|
989
|
+
code: E_MODULES_NOT_SUPPORTED_IN_ELECTRON,
|
|
990
|
+
message: `ES Modules are not supported in electron`
|
|
994
991
|
};
|
|
995
992
|
};
|
|
996
993
|
const getHelpfulChildProcessError = (stdout, stderr) => {
|
|
@@ -1009,8 +1006,8 @@ const getHelpfulChildProcessError = (stdout, stderr) => {
|
|
|
1009
1006
|
rest
|
|
1010
1007
|
} = getDetails(lines);
|
|
1011
1008
|
return {
|
|
1012
|
-
message: actualMessage,
|
|
1013
1009
|
code: '',
|
|
1010
|
+
message: actualMessage,
|
|
1014
1011
|
stack: rest
|
|
1015
1012
|
};
|
|
1016
1013
|
};
|
|
@@ -1020,8 +1017,8 @@ class IpcError extends VError {
|
|
|
1020
1017
|
if (stdout || stderr) {
|
|
1021
1018
|
// @ts-ignore
|
|
1022
1019
|
const {
|
|
1023
|
-
message,
|
|
1024
1020
|
code,
|
|
1021
|
+
message,
|
|
1025
1022
|
stack
|
|
1026
1023
|
} = getHelpfulChildProcessError(stdout, stderr);
|
|
1027
1024
|
const cause = new Error(message);
|
|
@@ -1121,8 +1118,8 @@ const wrap$f = global => {
|
|
|
1121
1118
|
};
|
|
1122
1119
|
const waitForFirstMessage = async port => {
|
|
1123
1120
|
const {
|
|
1124
|
-
|
|
1125
|
-
|
|
1121
|
+
promise,
|
|
1122
|
+
resolve
|
|
1126
1123
|
} = Promise.withResolvers();
|
|
1127
1124
|
port.addEventListener('message', resolve, {
|
|
1128
1125
|
once: true
|
|
@@ -1142,8 +1139,8 @@ const listen$6 = async () => {
|
|
|
1142
1139
|
const type = firstMessage.params[0];
|
|
1143
1140
|
if (type === 'message-port') {
|
|
1144
1141
|
parentIpc.send({
|
|
1145
|
-
jsonrpc: '2.0',
|
|
1146
1142
|
id: firstMessage.id,
|
|
1143
|
+
jsonrpc: '2.0',
|
|
1147
1144
|
result: null
|
|
1148
1145
|
});
|
|
1149
1146
|
parentIpc.dispose();
|
|
@@ -1203,8 +1200,8 @@ const removeListener = (emitter, type, callback) => {
|
|
|
1203
1200
|
};
|
|
1204
1201
|
const getFirstEvent = (eventEmitter, eventMap) => {
|
|
1205
1202
|
const {
|
|
1206
|
-
|
|
1207
|
-
|
|
1203
|
+
promise,
|
|
1204
|
+
resolve
|
|
1208
1205
|
} = Promise.withResolvers();
|
|
1209
1206
|
const listenerMap = Object.create(null);
|
|
1210
1207
|
const cleanup = value => {
|
|
@@ -1216,8 +1213,8 @@ const getFirstEvent = (eventEmitter, eventMap) => {
|
|
|
1216
1213
|
for (const [event, type] of Object.entries(eventMap)) {
|
|
1217
1214
|
const listener = event => {
|
|
1218
1215
|
cleanup({
|
|
1219
|
-
|
|
1220
|
-
|
|
1216
|
+
event,
|
|
1217
|
+
type
|
|
1221
1218
|
});
|
|
1222
1219
|
};
|
|
1223
1220
|
addListener(eventEmitter, event, listener);
|
|
@@ -1227,8 +1224,8 @@ const getFirstEvent = (eventEmitter, eventMap) => {
|
|
|
1227
1224
|
};
|
|
1228
1225
|
const Message$1 = 3;
|
|
1229
1226
|
const create$5$2 = async ({
|
|
1230
|
-
|
|
1231
|
-
|
|
1227
|
+
isMessagePortOpen,
|
|
1228
|
+
messagePort
|
|
1232
1229
|
}) => {
|
|
1233
1230
|
if (!isMessagePort(messagePort)) {
|
|
1234
1231
|
throw new IpcError('port must be of type MessagePort');
|
|
@@ -1241,8 +1238,8 @@ const create$5$2 = async ({
|
|
|
1241
1238
|
});
|
|
1242
1239
|
messagePort.start();
|
|
1243
1240
|
const {
|
|
1244
|
-
|
|
1245
|
-
|
|
1241
|
+
event,
|
|
1242
|
+
type
|
|
1246
1243
|
} = await eventPromise;
|
|
1247
1244
|
if (type !== Message$1) {
|
|
1248
1245
|
throw new IpcError('Failed to wait for ipc message');
|
|
@@ -1296,12 +1293,12 @@ const parse$1 = content => {
|
|
|
1296
1293
|
};
|
|
1297
1294
|
const waitForWebSocketToBeOpen = webSocket => {
|
|
1298
1295
|
return getFirstEvent(webSocket, {
|
|
1299
|
-
open: Open,
|
|
1300
1296
|
close: Close,
|
|
1301
|
-
error: Error$3
|
|
1297
|
+
error: Error$3,
|
|
1298
|
+
open: Open
|
|
1302
1299
|
});
|
|
1303
1300
|
};
|
|
1304
|
-
const create$
|
|
1301
|
+
const create$9 = async ({
|
|
1305
1302
|
webSocket
|
|
1306
1303
|
}) => {
|
|
1307
1304
|
const firstWebSocketEvent = await waitForWebSocketToBeOpen(webSocket);
|
|
@@ -1338,60 +1335,18 @@ const wrap$1 = webSocket => {
|
|
|
1338
1335
|
};
|
|
1339
1336
|
const IpcParentWithWebSocket$1$1 = {
|
|
1340
1337
|
__proto__: null,
|
|
1341
|
-
create: create$
|
|
1338
|
+
create: create$9,
|
|
1342
1339
|
wrap: wrap$1
|
|
1343
1340
|
};
|
|
1344
1341
|
|
|
1345
|
-
const Two = '2.0';
|
|
1346
|
-
const create$4$2 = (method, params) => {
|
|
1347
|
-
return {
|
|
1348
|
-
jsonrpc: Two,
|
|
1349
|
-
method,
|
|
1350
|
-
params
|
|
1351
|
-
};
|
|
1352
|
-
};
|
|
1342
|
+
const Two$1 = '2.0';
|
|
1353
1343
|
const callbacks = Object.create(null);
|
|
1354
|
-
const set$a = (id, fn) => {
|
|
1355
|
-
callbacks[id] = fn;
|
|
1356
|
-
};
|
|
1357
1344
|
const get$a = id => {
|
|
1358
1345
|
return callbacks[id];
|
|
1359
1346
|
};
|
|
1360
1347
|
const remove$4 = id => {
|
|
1361
1348
|
delete callbacks[id];
|
|
1362
1349
|
};
|
|
1363
|
-
let id$1 = 0;
|
|
1364
|
-
const create$3$2 = () => {
|
|
1365
|
-
return ++id$1;
|
|
1366
|
-
};
|
|
1367
|
-
const registerPromise = () => {
|
|
1368
|
-
const id = create$3$2();
|
|
1369
|
-
const {
|
|
1370
|
-
resolve,
|
|
1371
|
-
promise
|
|
1372
|
-
} = Promise.withResolvers();
|
|
1373
|
-
set$a(id, resolve);
|
|
1374
|
-
return {
|
|
1375
|
-
id,
|
|
1376
|
-
promise
|
|
1377
|
-
};
|
|
1378
|
-
};
|
|
1379
|
-
const create$2$2 = (method, params) => {
|
|
1380
|
-
const {
|
|
1381
|
-
id,
|
|
1382
|
-
promise
|
|
1383
|
-
} = registerPromise();
|
|
1384
|
-
const message = {
|
|
1385
|
-
jsonrpc: Two,
|
|
1386
|
-
method,
|
|
1387
|
-
params,
|
|
1388
|
-
id
|
|
1389
|
-
};
|
|
1390
|
-
return {
|
|
1391
|
-
message,
|
|
1392
|
-
promise
|
|
1393
|
-
};
|
|
1394
|
-
};
|
|
1395
1350
|
class JsonRpcError extends Error {
|
|
1396
1351
|
constructor(message) {
|
|
1397
1352
|
super(message);
|
|
@@ -1587,7 +1542,7 @@ const getErrorProperty = (error, prettyError) => {
|
|
|
1587
1542
|
};
|
|
1588
1543
|
const create$1$1 = (id, error) => {
|
|
1589
1544
|
return {
|
|
1590
|
-
jsonrpc: Two,
|
|
1545
|
+
jsonrpc: Two$1,
|
|
1591
1546
|
id,
|
|
1592
1547
|
error
|
|
1593
1548
|
};
|
|
@@ -1598,20 +1553,20 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
|
1598
1553
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
1599
1554
|
return create$1$1(id, errorProperty);
|
|
1600
1555
|
};
|
|
1601
|
-
const create$
|
|
1556
|
+
const create$8 = (message, result) => {
|
|
1602
1557
|
return {
|
|
1603
|
-
jsonrpc: Two,
|
|
1558
|
+
jsonrpc: Two$1,
|
|
1604
1559
|
id: message.id,
|
|
1605
1560
|
result: result ?? null
|
|
1606
1561
|
};
|
|
1607
1562
|
};
|
|
1608
1563
|
const getSuccessResponse = (message, result) => {
|
|
1609
1564
|
const resultProperty = result ?? null;
|
|
1610
|
-
return create$
|
|
1565
|
+
return create$8(message, resultProperty);
|
|
1611
1566
|
};
|
|
1612
1567
|
const getErrorResponseSimple = (id, error) => {
|
|
1613
1568
|
return {
|
|
1614
|
-
jsonrpc: Two,
|
|
1569
|
+
jsonrpc: Two$1,
|
|
1615
1570
|
id,
|
|
1616
1571
|
error: {
|
|
1617
1572
|
code: Custom,
|
|
@@ -1698,29 +1653,6 @@ const handleJsonRpcMessage = async (...args) => {
|
|
|
1698
1653
|
}
|
|
1699
1654
|
throw new JsonRpcError('unexpected message');
|
|
1700
1655
|
};
|
|
1701
|
-
const invokeHelper = async (ipc, method, params, useSendAndTransfer) => {
|
|
1702
|
-
const {
|
|
1703
|
-
message,
|
|
1704
|
-
promise
|
|
1705
|
-
} = create$2$2(method, params);
|
|
1706
|
-
if (useSendAndTransfer && ipc.sendAndTransfer) {
|
|
1707
|
-
ipc.sendAndTransfer(message);
|
|
1708
|
-
} else {
|
|
1709
|
-
ipc.send(message);
|
|
1710
|
-
}
|
|
1711
|
-
const responseMessage = await promise;
|
|
1712
|
-
return unwrapJsonRpcResult(responseMessage);
|
|
1713
|
-
};
|
|
1714
|
-
const send$1 = (transport, method, ...params) => {
|
|
1715
|
-
const message = create$4$2(method, params);
|
|
1716
|
-
transport.send(message);
|
|
1717
|
-
};
|
|
1718
|
-
const invoke$6 = (ipc, method, ...params) => {
|
|
1719
|
-
return invokeHelper(ipc, method, params, false);
|
|
1720
|
-
};
|
|
1721
|
-
const invokeAndTransfer$4 = (ipc, method, ...params) => {
|
|
1722
|
-
return invokeHelper(ipc, method, params, true);
|
|
1723
|
-
};
|
|
1724
1656
|
|
|
1725
1657
|
class CommandNotFoundError extends Error {
|
|
1726
1658
|
constructor(command) {
|
|
@@ -1743,24 +1675,87 @@ const execute = (command, ...args) => {
|
|
|
1743
1675
|
return fn(...args);
|
|
1744
1676
|
};
|
|
1745
1677
|
|
|
1678
|
+
const Two = '2.0';
|
|
1679
|
+
const create$p = (method, params) => {
|
|
1680
|
+
return {
|
|
1681
|
+
jsonrpc: Two,
|
|
1682
|
+
method,
|
|
1683
|
+
params
|
|
1684
|
+
};
|
|
1685
|
+
};
|
|
1686
|
+
const create$o = (id, method, params) => {
|
|
1687
|
+
const message = {
|
|
1688
|
+
id,
|
|
1689
|
+
jsonrpc: Two,
|
|
1690
|
+
method,
|
|
1691
|
+
params
|
|
1692
|
+
};
|
|
1693
|
+
return message;
|
|
1694
|
+
};
|
|
1695
|
+
let id$2 = 0;
|
|
1696
|
+
const create$n = () => {
|
|
1697
|
+
return ++id$2;
|
|
1698
|
+
};
|
|
1699
|
+
|
|
1700
|
+
/* eslint-disable n/no-unsupported-features/es-syntax */
|
|
1701
|
+
|
|
1702
|
+
const registerPromise = map => {
|
|
1703
|
+
const id = create$n();
|
|
1704
|
+
const {
|
|
1705
|
+
promise,
|
|
1706
|
+
resolve
|
|
1707
|
+
} = Promise.withResolvers();
|
|
1708
|
+
map[id] = resolve;
|
|
1709
|
+
return {
|
|
1710
|
+
id,
|
|
1711
|
+
promise
|
|
1712
|
+
};
|
|
1713
|
+
};
|
|
1714
|
+
|
|
1715
|
+
// @ts-ignore
|
|
1716
|
+
const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer) => {
|
|
1717
|
+
const {
|
|
1718
|
+
id,
|
|
1719
|
+
promise
|
|
1720
|
+
} = registerPromise(callbacks);
|
|
1721
|
+
const message = create$o(id, method, params);
|
|
1722
|
+
if (useSendAndTransfer && ipc.sendAndTransfer) {
|
|
1723
|
+
ipc.sendAndTransfer(message);
|
|
1724
|
+
} else {
|
|
1725
|
+
ipc.send(message);
|
|
1726
|
+
}
|
|
1727
|
+
const responseMessage = await promise;
|
|
1728
|
+
return unwrapJsonRpcResult(responseMessage);
|
|
1729
|
+
};
|
|
1746
1730
|
const createRpc$1 = ipc => {
|
|
1731
|
+
const callbacks = Object.create(null);
|
|
1732
|
+
ipc._resolve = (id, response) => {
|
|
1733
|
+
const fn = callbacks[id];
|
|
1734
|
+
if (!fn) {
|
|
1735
|
+
console.warn(`callback ${id} may already be disposed`);
|
|
1736
|
+
return;
|
|
1737
|
+
}
|
|
1738
|
+
fn(response);
|
|
1739
|
+
delete callbacks[id];
|
|
1740
|
+
};
|
|
1747
1741
|
const rpc = {
|
|
1742
|
+
async dispose() {
|
|
1743
|
+
await ipc?.dispose();
|
|
1744
|
+
},
|
|
1745
|
+
invoke(method, ...params) {
|
|
1746
|
+
return invokeHelper(callbacks, ipc, method, params, false);
|
|
1747
|
+
},
|
|
1748
|
+
invokeAndTransfer(method, ...params) {
|
|
1749
|
+
return invokeHelper(callbacks, ipc, method, params, true);
|
|
1750
|
+
},
|
|
1748
1751
|
// @ts-ignore
|
|
1749
1752
|
ipc,
|
|
1750
1753
|
/**
|
|
1751
1754
|
* @deprecated
|
|
1752
1755
|
*/
|
|
1753
1756
|
send(method, ...params) {
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
invoke(method, ...params) {
|
|
1757
|
-
return invoke$6(ipc, method, ...params);
|
|
1758
|
-
},
|
|
1759
|
-
invokeAndTransfer(method, ...params) {
|
|
1760
|
-
return invokeAndTransfer$4(ipc, method, ...params);
|
|
1761
|
-
},
|
|
1762
|
-
async dispose() {
|
|
1763
|
-
await ipc?.dispose();
|
|
1757
|
+
const message = create$p(method, params);
|
|
1758
|
+
ipc.send(message);
|
|
1764
1759
|
}
|
|
1765
1760
|
};
|
|
1766
1761
|
return rpc;
|
|
@@ -1777,7 +1772,7 @@ const logError = () => {
|
|
|
1777
1772
|
const handleMessage = event => {
|
|
1778
1773
|
const actualRequiresSocket = event?.target?.requiresSocket || requiresSocket;
|
|
1779
1774
|
const actualExecute = event?.target?.execute || execute;
|
|
1780
|
-
return handleJsonRpcMessage(event.target, event.data, actualExecute,
|
|
1775
|
+
return handleJsonRpcMessage(event.target, event.data, actualExecute, event.target._resolve, preparePrettyError, logError, actualRequiresSocket);
|
|
1781
1776
|
};
|
|
1782
1777
|
const handleIpc = ipc => {
|
|
1783
1778
|
if ('addEventListener' in ipc) {
|
|
@@ -1795,7 +1790,7 @@ const listen$1 = async (module, options) => {
|
|
|
1795
1790
|
const ipc = module.wrap(rawIpc);
|
|
1796
1791
|
return ipc;
|
|
1797
1792
|
};
|
|
1798
|
-
const create$
|
|
1793
|
+
const create$h = async ({
|
|
1799
1794
|
commandMap,
|
|
1800
1795
|
messagePort
|
|
1801
1796
|
}) => {
|
|
@@ -1810,18 +1805,18 @@ const create$f = async ({
|
|
|
1810
1805
|
};
|
|
1811
1806
|
const MessagePortRpcClient = {
|
|
1812
1807
|
__proto__: null,
|
|
1813
|
-
create: create$
|
|
1808
|
+
create: create$h
|
|
1814
1809
|
};
|
|
1815
|
-
const create$
|
|
1810
|
+
const create$g = async ({
|
|
1816
1811
|
commandMap,
|
|
1817
|
-
|
|
1818
|
-
|
|
1812
|
+
isMessagePortOpen,
|
|
1813
|
+
messagePort
|
|
1819
1814
|
}) => {
|
|
1820
1815
|
// TODO create a commandMap per rpc instance
|
|
1821
1816
|
register$1(commandMap);
|
|
1822
1817
|
const rawIpc = await IpcParentWithMessagePort$1.create({
|
|
1823
|
-
|
|
1824
|
-
|
|
1818
|
+
isMessagePortOpen,
|
|
1819
|
+
messagePort
|
|
1825
1820
|
});
|
|
1826
1821
|
const ipc = IpcParentWithMessagePort$1.wrap(rawIpc);
|
|
1827
1822
|
handleIpc(ipc);
|
|
@@ -1830,17 +1825,18 @@ const create$e = async ({
|
|
|
1830
1825
|
};
|
|
1831
1826
|
const MessagePortRpcParent = {
|
|
1832
1827
|
__proto__: null,
|
|
1833
|
-
create: create$
|
|
1828
|
+
create: create$g
|
|
1834
1829
|
};
|
|
1835
|
-
const create$
|
|
1830
|
+
const create$7 = async ({
|
|
1836
1831
|
commandMap,
|
|
1832
|
+
isMessagePortOpen = true,
|
|
1837
1833
|
messagePort
|
|
1838
1834
|
}) => {
|
|
1839
1835
|
// TODO create a commandMap per rpc instance
|
|
1840
1836
|
register$1(commandMap);
|
|
1841
1837
|
const rawIpc = await IpcParentWithMessagePort$1.create({
|
|
1842
|
-
|
|
1843
|
-
|
|
1838
|
+
isMessagePortOpen,
|
|
1839
|
+
messagePort
|
|
1844
1840
|
});
|
|
1845
1841
|
const ipc = IpcParentWithMessagePort$1.wrap(rawIpc);
|
|
1846
1842
|
handleIpc(ipc);
|
|
@@ -1848,21 +1844,22 @@ const create$5$1 = async ({
|
|
|
1848
1844
|
messagePort.start();
|
|
1849
1845
|
return rpc;
|
|
1850
1846
|
};
|
|
1851
|
-
const create$
|
|
1847
|
+
const create$6$1 = async ({
|
|
1852
1848
|
commandMap,
|
|
1853
1849
|
messagePort
|
|
1854
1850
|
}) => {
|
|
1855
|
-
return create$
|
|
1851
|
+
return create$7({
|
|
1856
1852
|
commandMap,
|
|
1857
1853
|
messagePort
|
|
1858
1854
|
});
|
|
1859
1855
|
};
|
|
1860
1856
|
const PlainMessagePortRpcParent = {
|
|
1861
1857
|
__proto__: null,
|
|
1862
|
-
create: create$
|
|
1858
|
+
create: create$6$1
|
|
1863
1859
|
};
|
|
1864
|
-
const create$
|
|
1860
|
+
const create$5$1 = async ({
|
|
1865
1861
|
commandMap,
|
|
1862
|
+
isMessagePortOpen,
|
|
1866
1863
|
send
|
|
1867
1864
|
}) => {
|
|
1868
1865
|
const {
|
|
@@ -1870,16 +1867,17 @@ const create$3$1 = async ({
|
|
|
1870
1867
|
port2
|
|
1871
1868
|
} = new MessageChannel();
|
|
1872
1869
|
await send(port1);
|
|
1873
|
-
return create$
|
|
1870
|
+
return create$7({
|
|
1874
1871
|
commandMap,
|
|
1872
|
+
isMessagePortOpen,
|
|
1875
1873
|
messagePort: port2
|
|
1876
1874
|
});
|
|
1877
1875
|
};
|
|
1878
1876
|
const TransferMessagePortRpcParent = {
|
|
1879
1877
|
__proto__: null,
|
|
1880
|
-
create: create$
|
|
1878
|
+
create: create$5$1
|
|
1881
1879
|
};
|
|
1882
|
-
const create$
|
|
1880
|
+
const create$4$1 = async ({
|
|
1883
1881
|
commandMap,
|
|
1884
1882
|
webSocket
|
|
1885
1883
|
}) => {
|
|
@@ -1895,9 +1893,9 @@ const create$2$1 = async ({
|
|
|
1895
1893
|
};
|
|
1896
1894
|
const WebSocketRpcParent = {
|
|
1897
1895
|
__proto__: null,
|
|
1898
|
-
create: create$
|
|
1896
|
+
create: create$4$1
|
|
1899
1897
|
};
|
|
1900
|
-
const create$
|
|
1898
|
+
const create$2$1 = async ({
|
|
1901
1899
|
commandMap
|
|
1902
1900
|
}) => {
|
|
1903
1901
|
// TODO create a commandMap per rpc instance
|
|
@@ -1909,15 +1907,15 @@ const create$6 = async ({
|
|
|
1909
1907
|
};
|
|
1910
1908
|
const WebWorkerRpcClient = {
|
|
1911
1909
|
__proto__: null,
|
|
1912
|
-
create: create$
|
|
1910
|
+
create: create$2$1
|
|
1913
1911
|
};
|
|
1914
1912
|
|
|
1915
1913
|
const {
|
|
1916
|
-
invoke: invoke$
|
|
1914
|
+
invoke: invoke$6} = create$a(ExtensionManagementWorker);
|
|
1917
1915
|
|
|
1918
1916
|
const {
|
|
1919
|
-
invoke: invoke$
|
|
1920
|
-
invokeAndTransfer: invokeAndTransfer$3} = create$
|
|
1917
|
+
invoke: invoke$5,
|
|
1918
|
+
invokeAndTransfer: invokeAndTransfer$3} = create$a(RendererWorker$1);
|
|
1921
1919
|
const sendMessagePortToIframeWorker = async (port, rpcId) => {
|
|
1922
1920
|
const command = 'Iframes.handleMessagePort';
|
|
1923
1921
|
await invokeAndTransfer$3('SendMessagePortToExtensionHostWorker.sendMessagePortToIframeWorker', port, command, rpcId);
|
|
@@ -1932,7 +1930,7 @@ const createLazyRpc = rpcId => {
|
|
|
1932
1930
|
let factory;
|
|
1933
1931
|
const createRpc = async () => {
|
|
1934
1932
|
const rpc = await factory();
|
|
1935
|
-
set$
|
|
1933
|
+
set$b(rpcId, rpc);
|
|
1936
1934
|
};
|
|
1937
1935
|
const ensureRpc = async () => {
|
|
1938
1936
|
if (!rpcPromise) {
|
|
@@ -1958,7 +1956,7 @@ const createLazyRpc = rpcId => {
|
|
|
1958
1956
|
};
|
|
1959
1957
|
|
|
1960
1958
|
const {
|
|
1961
|
-
invoke: invoke$
|
|
1959
|
+
invoke: invoke$4
|
|
1962
1960
|
} = DebugWorker;
|
|
1963
1961
|
|
|
1964
1962
|
const state$8 = {
|
|
@@ -1980,20 +1978,20 @@ const registerDebugProvider = debugProvider => {
|
|
|
1980
1978
|
};
|
|
1981
1979
|
const handlePaused = async params => {
|
|
1982
1980
|
// @ts-ignore
|
|
1983
|
-
await invoke$
|
|
1981
|
+
await invoke$4('Debug.paused', params);
|
|
1984
1982
|
};
|
|
1985
1983
|
const handleResumed = async () => {
|
|
1986
1984
|
// @ts-ignore
|
|
1987
|
-
await invoke$
|
|
1985
|
+
await invoke$4('Debug.resumed');
|
|
1988
1986
|
};
|
|
1989
1987
|
const handleScriptParsed = async parsedScript => {
|
|
1990
1988
|
// @ts-ignore
|
|
1991
|
-
await invoke$
|
|
1989
|
+
await invoke$4('Debug.scriptParsed', parsedScript);
|
|
1992
1990
|
};
|
|
1993
1991
|
const handleChange = async params => {
|
|
1994
1992
|
object(params);
|
|
1995
1993
|
// @ts-ignore
|
|
1996
|
-
await invoke$
|
|
1994
|
+
await invoke$4('Debug.handleChange', params);
|
|
1997
1995
|
};
|
|
1998
1996
|
const start = async (protocol, path) => {
|
|
1999
1997
|
try {
|
|
@@ -2145,7 +2143,7 @@ const setPauseOnExceptions = async (protocol, value) => {
|
|
|
2145
2143
|
|
|
2146
2144
|
const {
|
|
2147
2145
|
executeDefinitionProvider,
|
|
2148
|
-
registerDefinitionProvider} = create$
|
|
2146
|
+
registerDefinitionProvider} = create$b({
|
|
2149
2147
|
name: 'Definition',
|
|
2150
2148
|
resultShape: {
|
|
2151
2149
|
allowUndefined: true,
|
|
@@ -2167,7 +2165,7 @@ const {
|
|
|
2167
2165
|
const {
|
|
2168
2166
|
executeDiagnosticProvider,
|
|
2169
2167
|
registerDiagnosticProvider
|
|
2170
|
-
} = create$
|
|
2168
|
+
} = create$b({
|
|
2171
2169
|
name: 'Diagnostic',
|
|
2172
2170
|
resultShape: {
|
|
2173
2171
|
items: {
|
|
@@ -2179,7 +2177,7 @@ const {
|
|
|
2179
2177
|
|
|
2180
2178
|
const RendererWorker = 1;
|
|
2181
2179
|
|
|
2182
|
-
const invoke$
|
|
2180
|
+
const invoke$3 = (method, ...params) => {
|
|
2183
2181
|
const rpc = get$b(RendererWorker);
|
|
2184
2182
|
return rpc.invoke(method, ...params);
|
|
2185
2183
|
};
|
|
@@ -2190,7 +2188,7 @@ const invokeAndTransfer$2 = (method, ...params) => {
|
|
|
2190
2188
|
|
|
2191
2189
|
const showInformationMessage = message => {
|
|
2192
2190
|
string(message);
|
|
2193
|
-
const result = invoke$
|
|
2191
|
+
const result = invoke$3('ExtensionHostDialog.showInformationMessage', message);
|
|
2194
2192
|
return result;
|
|
2195
2193
|
};
|
|
2196
2194
|
|
|
@@ -2253,24 +2251,24 @@ const readFileExternal = async path => {
|
|
|
2253
2251
|
// this avoid parsing the potentially large message
|
|
2254
2252
|
// and improve performance by not blocking the renderer worker
|
|
2255
2253
|
// when reading / writing large files
|
|
2256
|
-
const content = await invoke$
|
|
2254
|
+
const content = await invoke$3('FileSystem.readFile', path);
|
|
2257
2255
|
return content;
|
|
2258
2256
|
};
|
|
2259
2257
|
const removeExternal = async path => {
|
|
2260
|
-
const content = await invoke$
|
|
2258
|
+
const content = await invoke$3('FileSystem.remove', path);
|
|
2261
2259
|
return content;
|
|
2262
2260
|
};
|
|
2263
2261
|
const existsExternal = async uri => {
|
|
2264
|
-
return await invoke$
|
|
2262
|
+
return await invoke$3('FileSystem.exists', uri);
|
|
2265
2263
|
};
|
|
2266
2264
|
const mkdirExternal = async uri => {
|
|
2267
|
-
return await invoke$
|
|
2265
|
+
return await invoke$3('FileSystem.mkdir', uri);
|
|
2268
2266
|
};
|
|
2269
2267
|
const writeFileExternal = async (uri, content) => {
|
|
2270
|
-
return await invoke$
|
|
2268
|
+
return await invoke$3('FileSystem.writeFile', uri, content);
|
|
2271
2269
|
};
|
|
2272
2270
|
const statExternal = async uri => {
|
|
2273
|
-
return await invoke$
|
|
2271
|
+
return await invoke$3('FileSystem.stat', uri);
|
|
2274
2272
|
};
|
|
2275
2273
|
const readDirWithFileTypesExternal = async path => {
|
|
2276
2274
|
// TODO when file is local,
|
|
@@ -2279,7 +2277,7 @@ const readDirWithFileTypesExternal = async path => {
|
|
|
2279
2277
|
// this avoid parsing the potentially large message
|
|
2280
2278
|
// and improve performance by not blocking the renderer worker
|
|
2281
2279
|
// when reading / writing large files
|
|
2282
|
-
const content = await invoke$
|
|
2280
|
+
const content = await invoke$3('FileSystem.readDirWithFileTypes', path);
|
|
2283
2281
|
return content;
|
|
2284
2282
|
};
|
|
2285
2283
|
const remove$3 = async (protocol, path) => {
|
|
@@ -2317,7 +2315,7 @@ const getPathSeparator = protocol => {
|
|
|
2317
2315
|
|
|
2318
2316
|
const {
|
|
2319
2317
|
executeFormattingProvider,
|
|
2320
|
-
registerFormattingProvider} = create$
|
|
2318
|
+
registerFormattingProvider} = create$b({
|
|
2321
2319
|
executeKey: 'format',
|
|
2322
2320
|
name: 'Formatting',
|
|
2323
2321
|
resultShape: {
|
|
@@ -2379,7 +2377,7 @@ const getPosition = (textDocument, offset) => {
|
|
|
2379
2377
|
|
|
2380
2378
|
const {
|
|
2381
2379
|
executeHoverProvider,
|
|
2382
|
-
registerHoverProvider} = create$
|
|
2380
|
+
registerHoverProvider} = create$b({
|
|
2383
2381
|
name: 'Hover',
|
|
2384
2382
|
resultShape: {
|
|
2385
2383
|
allowUndefined: true,
|
|
@@ -2390,7 +2388,7 @@ const {
|
|
|
2390
2388
|
|
|
2391
2389
|
const {
|
|
2392
2390
|
executeImplementationProvider,
|
|
2393
|
-
registerImplementationProvider} = create$
|
|
2391
|
+
registerImplementationProvider} = create$b({
|
|
2394
2392
|
name: 'Implementation',
|
|
2395
2393
|
resultShape: {
|
|
2396
2394
|
items: {
|
|
@@ -2430,7 +2428,7 @@ const sendPort = async ({
|
|
|
2430
2428
|
url
|
|
2431
2429
|
});
|
|
2432
2430
|
};
|
|
2433
|
-
const create$
|
|
2431
|
+
const create$6 = async ({
|
|
2434
2432
|
commandMap,
|
|
2435
2433
|
name,
|
|
2436
2434
|
url
|
|
@@ -2459,7 +2457,7 @@ const create$5 = async ({
|
|
|
2459
2457
|
|
|
2460
2458
|
const IpcParentWithModuleWorkerAndWorkaroundForChromeDevtoolsBug = {
|
|
2461
2459
|
__proto__: null,
|
|
2462
|
-
create: create$
|
|
2460
|
+
create: create$6
|
|
2463
2461
|
};
|
|
2464
2462
|
|
|
2465
2463
|
const sendMessagePortToElectron = async (port, initialCommand) => {
|
|
@@ -2474,7 +2472,7 @@ const getPort = async type => {
|
|
|
2474
2472
|
await sendMessagePortToElectron(port1, 'HandleMessagePortForExtensionHostHelperProcess.handleMessagePortForExtensionHostHelperProcess');
|
|
2475
2473
|
return port2;
|
|
2476
2474
|
};
|
|
2477
|
-
const create$
|
|
2475
|
+
const create$5 = async ({
|
|
2478
2476
|
type
|
|
2479
2477
|
}) => {
|
|
2480
2478
|
const port = await getPort();
|
|
@@ -2490,7 +2488,7 @@ const create$4 = async ({
|
|
|
2490
2488
|
|
|
2491
2489
|
const IpcParentWithElectronMessagePort = {
|
|
2492
2490
|
__proto__: null,
|
|
2493
|
-
create: create$
|
|
2491
|
+
create: create$5
|
|
2494
2492
|
};
|
|
2495
2493
|
|
|
2496
2494
|
const getWebSocketProtocol = () => {
|
|
@@ -2502,7 +2500,7 @@ const getWebSocketUrl = (type, host) => {
|
|
|
2502
2500
|
return `${wsProtocol}//${host}/websocket/${type}`;
|
|
2503
2501
|
};
|
|
2504
2502
|
|
|
2505
|
-
const create$
|
|
2503
|
+
const create$4 = async ({
|
|
2506
2504
|
type
|
|
2507
2505
|
}) => {
|
|
2508
2506
|
string(type);
|
|
@@ -2517,7 +2515,7 @@ const create$3 = async ({
|
|
|
2517
2515
|
|
|
2518
2516
|
const IpcParentWithWebSocket = {
|
|
2519
2517
|
__proto__: null,
|
|
2520
|
-
create: create$
|
|
2518
|
+
create: create$4
|
|
2521
2519
|
};
|
|
2522
2520
|
|
|
2523
2521
|
const Electron = 'electron';
|
|
@@ -2554,7 +2552,7 @@ const getModule$1 = platform => {
|
|
|
2554
2552
|
return IpcParentWithElectronMessagePort;
|
|
2555
2553
|
}
|
|
2556
2554
|
};
|
|
2557
|
-
const create$
|
|
2555
|
+
const create$3 = async ({
|
|
2558
2556
|
raw,
|
|
2559
2557
|
type
|
|
2560
2558
|
}) => {
|
|
@@ -2567,7 +2565,7 @@ const create$2 = async ({
|
|
|
2567
2565
|
|
|
2568
2566
|
const IpcParentWithNode = {
|
|
2569
2567
|
__proto__: null,
|
|
2570
|
-
create: create$
|
|
2568
|
+
create: create$3
|
|
2571
2569
|
};
|
|
2572
2570
|
|
|
2573
2571
|
const getModule = method => {
|
|
@@ -2583,7 +2581,7 @@ const getModule = method => {
|
|
|
2583
2581
|
}
|
|
2584
2582
|
};
|
|
2585
2583
|
|
|
2586
|
-
const create$
|
|
2584
|
+
const create$2 = async ({
|
|
2587
2585
|
method,
|
|
2588
2586
|
...options
|
|
2589
2587
|
}) => {
|
|
@@ -2608,7 +2606,7 @@ const createNodeRpc = async ({
|
|
|
2608
2606
|
try {
|
|
2609
2607
|
string(path);
|
|
2610
2608
|
fn(execute);
|
|
2611
|
-
const rpc = await create$
|
|
2609
|
+
const rpc = await create$2({
|
|
2612
2610
|
commandMap: {},
|
|
2613
2611
|
method: ElectronMessagePort,
|
|
2614
2612
|
name,
|
|
@@ -2704,10 +2702,20 @@ const getEnabledProviders = () => {
|
|
|
2704
2702
|
|
|
2705
2703
|
const confirm = message => {
|
|
2706
2704
|
string(message);
|
|
2707
|
-
const result = invoke$
|
|
2705
|
+
const result = invoke$3('ConfirmPrompt.prompt', message);
|
|
2708
2706
|
return result;
|
|
2709
2707
|
};
|
|
2710
2708
|
|
|
2709
|
+
const invoke$2 = (method, ...params) => {
|
|
2710
|
+
// TODO
|
|
2711
|
+
throw new Error(`[file search worker invoke] not implemented`);
|
|
2712
|
+
};
|
|
2713
|
+
|
|
2714
|
+
let id$1 = 0;
|
|
2715
|
+
const create$1 = () => {
|
|
2716
|
+
return ++id$1;
|
|
2717
|
+
};
|
|
2718
|
+
|
|
2711
2719
|
const ExtensionHostQuickPickShow = 'ExtensionHostQuickPick.show';
|
|
2712
2720
|
|
|
2713
2721
|
const showQuickPick = async ({
|
|
@@ -2716,14 +2724,37 @@ const showQuickPick = async ({
|
|
|
2716
2724
|
}) => {
|
|
2717
2725
|
const rawPicks = await getPicks();
|
|
2718
2726
|
const picks = rawPicks.map(toPick);
|
|
2719
|
-
return invoke$
|
|
2727
|
+
return invoke$3(ExtensionHostQuickPickShow, picks);
|
|
2728
|
+
};
|
|
2729
|
+
const quickInputs = Object.create(null);
|
|
2730
|
+
const showQuickInput = async ({
|
|
2731
|
+
ignoreFocusOut,
|
|
2732
|
+
initialValue,
|
|
2733
|
+
render
|
|
2734
|
+
}) => {
|
|
2735
|
+
const id = create$1();
|
|
2736
|
+
quickInputs[id] = render;
|
|
2737
|
+
// TODO create direct connection to file search worker
|
|
2738
|
+
const {
|
|
2739
|
+
canceled,
|
|
2740
|
+
inputValue
|
|
2741
|
+
} = await invoke$2('QuickPick.showQuickInput', {
|
|
2742
|
+
ignoreFocusOut,
|
|
2743
|
+
initialValue,
|
|
2744
|
+
render
|
|
2745
|
+
});
|
|
2746
|
+
delete quickInputs[id];
|
|
2747
|
+
return {
|
|
2748
|
+
canceled,
|
|
2749
|
+
inputValue
|
|
2750
|
+
};
|
|
2720
2751
|
};
|
|
2721
2752
|
|
|
2722
2753
|
const {
|
|
2723
2754
|
executefileReferenceProvider,
|
|
2724
2755
|
executeReferenceProvider,
|
|
2725
2756
|
getProvider: getProvider$1,
|
|
2726
|
-
registerReferenceProvider} = create$
|
|
2757
|
+
registerReferenceProvider} = create$b({
|
|
2727
2758
|
additionalMethodNames: [
|
|
2728
2759
|
// @ts-ignore
|
|
2729
2760
|
{
|
|
@@ -2785,7 +2816,7 @@ const validateResult = renameResult => {
|
|
|
2785
2816
|
const {
|
|
2786
2817
|
executeprepareRenameProvider,
|
|
2787
2818
|
executeRenameProvider,
|
|
2788
|
-
registerRenameProvider} = create$
|
|
2819
|
+
registerRenameProvider} = create$b({
|
|
2789
2820
|
additionalMethodNames: [
|
|
2790
2821
|
// @ts-ignore
|
|
2791
2822
|
{
|
|
@@ -2807,7 +2838,7 @@ const extensionHostSubWorkerUrl = getExtensionHostSubWorkerUrl();
|
|
|
2807
2838
|
|
|
2808
2839
|
const set$8 = async (url, contentSecurityPolicy) => {
|
|
2809
2840
|
const pathName = new URL(url).pathname;
|
|
2810
|
-
await invoke$
|
|
2841
|
+
await invoke$3('ExtensionHostWorkerContentSecurityPolicy.set', pathName, contentSecurityPolicy);
|
|
2811
2842
|
};
|
|
2812
2843
|
|
|
2813
2844
|
/**
|
|
@@ -2827,7 +2858,7 @@ const createLegacyRpc = async ({
|
|
|
2827
2858
|
if (contentSecurityPolicy) {
|
|
2828
2859
|
await set$8(url, contentSecurityPolicy);
|
|
2829
2860
|
}
|
|
2830
|
-
const rpc = await create$
|
|
2861
|
+
const rpc = await create$2({
|
|
2831
2862
|
commandMap,
|
|
2832
2863
|
method: ModuleWorkerAndWorkaroundForChromeDevtoolsBug$1,
|
|
2833
2864
|
name,
|
|
@@ -2867,7 +2898,7 @@ const createRpcWithId$1 = async (id, commandMap, execute) => {
|
|
|
2867
2898
|
if (!info) {
|
|
2868
2899
|
throw new Error(`rpc with id ${id} not found`);
|
|
2869
2900
|
}
|
|
2870
|
-
const rpc = await create$
|
|
2901
|
+
const rpc = await create$2({
|
|
2871
2902
|
commandMap,
|
|
2872
2903
|
isMessagePortOpen: true,
|
|
2873
2904
|
method: ModuleWorkerAndWorkaroundForChromeDevtoolsBug$1,
|
|
@@ -2942,7 +2973,7 @@ const createRpc = ({
|
|
|
2942
2973
|
|
|
2943
2974
|
const {
|
|
2944
2975
|
executeSelectionProvider,
|
|
2945
|
-
registerSelectionProvider} = create$
|
|
2976
|
+
registerSelectionProvider} = create$b({
|
|
2946
2977
|
name: 'Selection',
|
|
2947
2978
|
resultShape: {
|
|
2948
2979
|
allowUndefined: true,
|
|
@@ -3008,7 +3039,7 @@ const getRemoteUrl$1 = async (uri, options = {}) => {
|
|
|
3008
3039
|
return getRemoteUrlForWebView(uri, options);
|
|
3009
3040
|
}
|
|
3010
3041
|
if (uri.startsWith('html://')) {
|
|
3011
|
-
const url = await invoke$
|
|
3042
|
+
const url = await invoke$3('Blob.getSrc', uri);
|
|
3012
3043
|
return url;
|
|
3013
3044
|
}
|
|
3014
3045
|
throw new Error(`unsupported platform for remote url`);
|
|
@@ -3047,7 +3078,7 @@ const getWebExtensions = async () => {
|
|
|
3047
3078
|
};
|
|
3048
3079
|
|
|
3049
3080
|
const getSharedProcessExtensions = () => {
|
|
3050
|
-
return invoke$
|
|
3081
|
+
return invoke$3(/* ExtensionManagement.getExtensions */'ExtensionManagement.getExtensions');
|
|
3051
3082
|
};
|
|
3052
3083
|
const doGetExtensions = async () => {
|
|
3053
3084
|
const meta = await invoke$1('Extensions.getDynamicWebExtensions');
|
|
@@ -3184,7 +3215,7 @@ const getEnabledProviderIds = async (scheme, root) => {
|
|
|
3184
3215
|
};
|
|
3185
3216
|
const getIconDefinitions = async providerId => {
|
|
3186
3217
|
const extensions = await getExtensions();
|
|
3187
|
-
const webextensions = await invoke$
|
|
3218
|
+
const webextensions = await invoke$6(`Extensions.getDynamicWebExtensions`);
|
|
3188
3219
|
const allExtensions = [...extensions, ...webextensions];
|
|
3189
3220
|
for (const extension of allExtensions) {
|
|
3190
3221
|
const id = extension.id.split('.');
|
|
@@ -3212,7 +3243,7 @@ const getFileDecorations = async (providerId, uris) => {
|
|
|
3212
3243
|
|
|
3213
3244
|
const {
|
|
3214
3245
|
executeTabCompletionProvider,
|
|
3215
|
-
registerTabCompletionProvider} = create$
|
|
3246
|
+
registerTabCompletionProvider} = create$b({
|
|
3216
3247
|
name: 'TabCompletion',
|
|
3217
3248
|
resultShape: {
|
|
3218
3249
|
allowUndefined: true,
|
|
@@ -3251,7 +3282,7 @@ const executeTextSearchProvider = async (scheme, query) => {
|
|
|
3251
3282
|
|
|
3252
3283
|
const {
|
|
3253
3284
|
executeTypeDefinitionProvider,
|
|
3254
|
-
registerTypeDefinitionProvider} = create$
|
|
3285
|
+
registerTypeDefinitionProvider} = create$b({
|
|
3255
3286
|
name: 'TypeDefinition',
|
|
3256
3287
|
resultShape: {
|
|
3257
3288
|
allowUndefined: true,
|
|
@@ -3355,7 +3386,7 @@ const createWorker = async ({
|
|
|
3355
3386
|
string(method);
|
|
3356
3387
|
string(url);
|
|
3357
3388
|
string(name);
|
|
3358
|
-
const rpc = create$
|
|
3389
|
+
const rpc = create$2({
|
|
3359
3390
|
method: ModuleWorkerAndWorkaroundForChromeDevtoolsBug$1,
|
|
3360
3391
|
name,
|
|
3361
3392
|
url
|
|
@@ -3374,7 +3405,7 @@ const getWorkspaceFolder = path => {
|
|
|
3374
3405
|
};
|
|
3375
3406
|
const handleWorkspaceRefresh = async () => {
|
|
3376
3407
|
// @ts-ignore
|
|
3377
|
-
await invoke$
|
|
3408
|
+
await invoke$5('Layout.handleWorkspaceRefresh');
|
|
3378
3409
|
};
|
|
3379
3410
|
|
|
3380
3411
|
class FormattingError extends Error {
|
|
@@ -3495,6 +3526,7 @@ const api = {
|
|
|
3495
3526
|
// Dialog
|
|
3496
3527
|
showInformationMessage: showInformationMessage,
|
|
3497
3528
|
// QuickPick
|
|
3529
|
+
showQuickInput: showQuickInput,
|
|
3498
3530
|
showQuickPick: showQuickPick,
|
|
3499
3531
|
stat: statExternal,
|
|
3500
3532
|
TextSearchResultType,
|
|
@@ -4163,7 +4195,7 @@ const applyBulkReplacement = async (files, ranges, replacement) => {
|
|
|
4163
4195
|
};
|
|
4164
4196
|
|
|
4165
4197
|
const addCssStyleSheet = (id, css) => {
|
|
4166
|
-
return invoke$
|
|
4198
|
+
return invoke$3('Css.addCssStyleSheet', id, css);
|
|
4167
4199
|
};
|
|
4168
4200
|
|
|
4169
4201
|
const NewLine = '\n';
|
|
@@ -4598,10 +4630,10 @@ const GetColorThemeCssCachedIndexedDb = {
|
|
|
4598
4630
|
};
|
|
4599
4631
|
|
|
4600
4632
|
const getText$1 = key => {
|
|
4601
|
-
return invoke$
|
|
4633
|
+
return invoke$3('LocalStorage.getText', key);
|
|
4602
4634
|
};
|
|
4603
4635
|
const setText = (key, value) => {
|
|
4604
|
-
return invoke$
|
|
4636
|
+
return invoke$3('LocalStorage.setText', key, value);
|
|
4605
4637
|
};
|
|
4606
4638
|
|
|
4607
4639
|
const getCacheKey = colorThemeId => {
|
|
@@ -4636,7 +4668,7 @@ const GetColorThemeCssCachedNoop = {
|
|
|
4636
4668
|
};
|
|
4637
4669
|
|
|
4638
4670
|
const get = key => {
|
|
4639
|
-
return invoke$
|
|
4671
|
+
return invoke$3('Preferences.get', key);
|
|
4640
4672
|
};
|
|
4641
4673
|
|
|
4642
4674
|
const getCacheFn = config => {
|
|
@@ -4662,7 +4694,7 @@ const getColorThemeCssCached = async (colorThemeId, getData) => {
|
|
|
4662
4694
|
};
|
|
4663
4695
|
|
|
4664
4696
|
const readJson = url => {
|
|
4665
|
-
return invoke$
|
|
4697
|
+
return invoke$3('FileSystem.readJson', url);
|
|
4666
4698
|
};
|
|
4667
4699
|
|
|
4668
4700
|
const dirname = (pathSeparator, path) => {
|
|
@@ -4744,7 +4776,7 @@ const getMetaThemeColor = colorThemeJson => {
|
|
|
4744
4776
|
};
|
|
4745
4777
|
|
|
4746
4778
|
const setThemeColor = async themeColor => {
|
|
4747
|
-
await invoke$
|
|
4779
|
+
await invoke$3(/* Meta.setThemeColor */'Meta.setThemeColor', /* color */themeColor);
|
|
4748
4780
|
};
|
|
4749
4781
|
|
|
4750
4782
|
// TODO by default color theme should come from local storage, session storage, cache storage, indexeddb or blob url -> fast initial load
|
|
@@ -4780,7 +4812,7 @@ const watch = async id => {
|
|
|
4780
4812
|
return;
|
|
4781
4813
|
}
|
|
4782
4814
|
state$1.watchedTheme = id;
|
|
4783
|
-
await invoke$
|
|
4815
|
+
await invoke$3('ExtensionHost.watchColorTheme', id);
|
|
4784
4816
|
};
|
|
4785
4817
|
const getPreferredColorTheme = () => {
|
|
4786
4818
|
const preferredColorTheme = get('workbench.colorTheme');
|
|
@@ -4864,7 +4896,7 @@ const createWebViewWorkerRpc = async (rpcInfo, port) => {
|
|
|
4864
4896
|
};
|
|
4865
4897
|
|
|
4866
4898
|
const executeExternalCommand = (method, ...params) => {
|
|
4867
|
-
return invoke$
|
|
4899
|
+
return invoke$3(method, ...params);
|
|
4868
4900
|
};
|
|
4869
4901
|
|
|
4870
4902
|
const BraceCompletionExecuteBraceCompletionProvider = 'ExtensionHostBraceCompletion.executeBraceCompletionProvider';
|
|
@@ -4932,7 +4964,7 @@ const mockExec = () => {
|
|
|
4932
4964
|
try {
|
|
4933
4965
|
// @ts-ignore
|
|
4934
4966
|
api.exec = async (command, args, options) => {
|
|
4935
|
-
const result = await invoke$
|
|
4967
|
+
const result = await invoke$3('Test.executeMockExecFunction', command, args, options);
|
|
4936
4968
|
const {
|
|
4937
4969
|
exitCode,
|
|
4938
4970
|
stderr,
|
|
@@ -4958,7 +4990,7 @@ const mockRpc = () => {
|
|
|
4958
4990
|
try {
|
|
4959
4991
|
return {
|
|
4960
4992
|
async invoke(method, ...params) {
|
|
4961
|
-
const result = await invoke$
|
|
4993
|
+
const result = await invoke$3('Test.executeMockRpcFunction', options.name, method, ...params);
|
|
4962
4994
|
return result;
|
|
4963
4995
|
}
|
|
4964
4996
|
};
|
|
@@ -5454,7 +5486,7 @@ const handleMessagePort2 = async (port, rpcId) => {
|
|
|
5454
5486
|
messagePort: port
|
|
5455
5487
|
});
|
|
5456
5488
|
if (rpcId) {
|
|
5457
|
-
set$
|
|
5489
|
+
set$b(rpcId, rpc);
|
|
5458
5490
|
}
|
|
5459
5491
|
};
|
|
5460
5492
|
|
|
@@ -5464,12 +5496,12 @@ const handleMessagePort = async (port, rpcId) => {
|
|
|
5464
5496
|
messagePort: port
|
|
5465
5497
|
});
|
|
5466
5498
|
if (rpcId) {
|
|
5467
|
-
set$
|
|
5499
|
+
set$b(rpcId, rpc);
|
|
5468
5500
|
}
|
|
5469
5501
|
};
|
|
5470
5502
|
|
|
5471
5503
|
const handleIconThemeChange = async () => {
|
|
5472
|
-
await invoke$
|
|
5504
|
+
await invoke$3('IconTheme.handleIconThemeChange');
|
|
5473
5505
|
};
|
|
5474
5506
|
|
|
5475
5507
|
const initialIconTheme = undefined;
|
|
@@ -6239,7 +6271,7 @@ const listen = async () => {
|
|
|
6239
6271
|
const rpc = await WebWorkerRpcClient.create({
|
|
6240
6272
|
commandMap: commandMap
|
|
6241
6273
|
});
|
|
6242
|
-
set$
|
|
6274
|
+
set$b(RendererWorker, rpc);
|
|
6243
6275
|
};
|
|
6244
6276
|
|
|
6245
6277
|
const main = async () => {
|