@lvce-editor/test-worker 10.12.0 → 10.14.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.
Files changed (2) hide show
  1. package/dist/testWorkerMain.js +507 -499
  2. package/package.json +1 -1
@@ -1,3 +1,46 @@
1
+ const Directory = 3;
2
+
3
+ const Script$1 = 2;
4
+
5
+ const Web = 1;
6
+ const Remote = 3;
7
+
8
+ const EditorWorker = 99;
9
+ const RendererWorker = 1;
10
+ const TestWorker = 9001;
11
+
12
+ const rpcs = Object.create(null);
13
+ const set$2 = (id, rpc) => {
14
+ rpcs[id] = rpc;
15
+ };
16
+ const get$2 = id => {
17
+ return rpcs[id];
18
+ };
19
+
20
+ const create$4 = rpcId => {
21
+ return {
22
+ async dispose() {
23
+ const rpc = get$2(rpcId);
24
+ await rpc.dispose();
25
+ },
26
+ // @ts-ignore
27
+ invoke(method, ...params) {
28
+ const rpc = get$2(rpcId);
29
+ // @ts-ignore
30
+ return rpc.invoke(method, ...params);
31
+ },
32
+ // @ts-ignore
33
+ invokeAndTransfer(method, ...params) {
34
+ const rpc = get$2(rpcId);
35
+ // @ts-ignore
36
+ return rpc.invokeAndTransfer(method, ...params);
37
+ },
38
+ set(rpc) {
39
+ set$2(rpcId, rpc);
40
+ }
41
+ };
42
+ };
43
+
1
44
  const normalizeLine = line => {
2
45
  if (line.startsWith('Error: ')) {
3
46
  return line.slice('Error: '.length);
@@ -514,7 +557,7 @@ const IpcParentWithMessagePort$1 = {
514
557
 
515
558
  const Two$1 = '2.0';
516
559
  const callbacks$1 = Object.create(null);
517
- const get$2 = id => {
560
+ const get$1 = id => {
518
561
  return callbacks$1[id];
519
562
  };
520
563
  const remove$1 = id => {
@@ -663,7 +706,7 @@ const warn = (...args) => {
663
706
  console.warn(...args);
664
707
  };
665
708
  const resolve$1 = (id, response) => {
666
- const fn = get$2(id);
709
+ const fn = get$1(id);
667
710
  if (!fn) {
668
711
  console.log(response);
669
712
  warn(`callback ${id} may already be disposed`);
@@ -713,7 +756,7 @@ const getErrorProperty = (error, prettyError) => {
713
756
  }
714
757
  };
715
758
  };
716
- const create$1$1 = (id, error) => {
759
+ const create$1 = (id, error) => {
717
760
  return {
718
761
  jsonrpc: Two$1,
719
762
  id,
@@ -724,7 +767,7 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
724
767
  const prettyError = preparePrettyError(error);
725
768
  logError(error, prettyError);
726
769
  const errorProperty = getErrorProperty(error, prettyError);
727
- return create$1$1(id, errorProperty);
770
+ return create$1(id, errorProperty);
728
771
  };
729
772
  const create$3 = (message, result) => {
730
773
  return {
@@ -1035,54 +1078,11 @@ const WebWorkerRpcClient = {
1035
1078
  create: create$2
1036
1079
  };
1037
1080
 
1038
- const Directory = 3;
1039
-
1040
- const Script$1 = 2;
1041
-
1042
- const Web = 1;
1043
- const Remote = 3;
1044
-
1045
- const EditorWorker = 99;
1046
- const RendererWorker = 1;
1047
- const TestWorker = 9001;
1048
-
1049
- const rpcs = Object.create(null);
1050
- const set$2 = (id, rpc) => {
1051
- rpcs[id] = rpc;
1052
- };
1053
- const get$1 = id => {
1054
- return rpcs[id];
1055
- };
1056
-
1057
- const create$1 = rpcId => {
1058
- return {
1059
- async dispose() {
1060
- const rpc = get$1(rpcId);
1061
- await rpc.dispose();
1062
- },
1063
- // @ts-ignore
1064
- invoke(method, ...params) {
1065
- const rpc = get$1(rpcId);
1066
- // @ts-ignore
1067
- return rpc.invoke(method, ...params);
1068
- },
1069
- // @ts-ignore
1070
- invokeAndTransfer(method, ...params) {
1071
- const rpc = get$1(rpcId);
1072
- // @ts-ignore
1073
- return rpc.invokeAndTransfer(method, ...params);
1074
- },
1075
- set(rpc) {
1076
- set$2(rpcId, rpc);
1077
- }
1078
- };
1079
- };
1080
-
1081
1081
  const {
1082
1082
  invoke: invoke$1,
1083
1083
  invokeAndTransfer,
1084
1084
  set: set$1
1085
- } = create$1(RendererWorker);
1085
+ } = create$4(RendererWorker);
1086
1086
  const sendMessagePortToEditorWorker = async (port, rpcId) => {
1087
1087
  const command = 'HandleMessagePort.handleMessagePort';
1088
1088
  // @ts-ignore
@@ -1108,12 +1108,12 @@ const createLazyRpc = rpcId => {
1108
1108
  return {
1109
1109
  async invoke(method, ...params) {
1110
1110
  await ensureRpc();
1111
- const rpc = get$1(rpcId);
1111
+ const rpc = get$2(rpcId);
1112
1112
  return rpc.invoke(method, ...params);
1113
1113
  },
1114
1114
  async invokeAndTransfer(method, ...params) {
1115
1115
  await ensureRpc();
1116
- const rpc = get$1(rpcId);
1116
+ const rpc = get$2(rpcId);
1117
1117
  return rpc.invokeAndTransfer(method, ...params);
1118
1118
  },
1119
1119
  setFactory(value) {
@@ -1122,6 +1122,28 @@ const createLazyRpc = rpcId => {
1122
1122
  };
1123
1123
  };
1124
1124
 
1125
+ const lazyRpc = createLazyRpc(EditorWorker);
1126
+ const {
1127
+ invoke,
1128
+ setFactory
1129
+ } = lazyRpc;
1130
+
1131
+ const send = async port => {
1132
+ await sendMessagePortToEditorWorker(port, TestWorker);
1133
+ };
1134
+ const launchEditorWorkerRpc = async () => {
1135
+ const rpc = await TransferMessagePortRpcParent.create({
1136
+ commandMap: {},
1137
+ send
1138
+ });
1139
+ return rpc;
1140
+ };
1141
+
1142
+ const initializeEditorWorker = async () => {
1143
+ // TODO use lazyrpc
1144
+ setFactory(launchEditorWorkerRpc);
1145
+ };
1146
+
1125
1147
  /* eslint-disable no-console */
1126
1148
  const clearConsole = () => {
1127
1149
  console.clear();
@@ -1446,8 +1468,8 @@ class Expect {
1446
1468
  }
1447
1469
 
1448
1470
  const Expect$1 = {
1449
- __proto__: null,
1450
- expect: expect$1
1471
+ __proto__: null,
1472
+ expect: expect$1
1451
1473
  };
1452
1474
 
1453
1475
  const nameAnonymousFunction = (fn, name) => {
@@ -1597,13 +1619,13 @@ const focusPrevious$8 = async () => {
1597
1619
  };
1598
1620
 
1599
1621
  const About = {
1600
- __proto__: null,
1601
- focusNext: focusNext$9,
1602
- focusPrevious: focusPrevious$8,
1603
- handleClickClose,
1604
- handleClickCopy,
1605
- handleClickOk,
1606
- show: show$6
1622
+ __proto__: null,
1623
+ focusNext: focusNext$9,
1624
+ focusPrevious: focusPrevious$8,
1625
+ handleClickClose,
1626
+ handleClickCopy,
1627
+ handleClickOk,
1628
+ show: show$6
1607
1629
  };
1608
1630
 
1609
1631
  const focus$2 = async () => {
@@ -1632,15 +1654,15 @@ const selectCurrent = async () => {
1632
1654
  };
1633
1655
 
1634
1656
  const ActivityBar = {
1635
- __proto__: null,
1636
- focus: focus$2,
1637
- focusFirst: focusFirst$7,
1638
- focusLast: focusLast$6,
1639
- focusNext: focusNext$8,
1640
- focusPrevious: focusPrevious$7,
1641
- handleClick: handleClick$3,
1642
- handleContextMenu: handleContextMenu$5,
1643
- selectCurrent
1657
+ __proto__: null,
1658
+ focus: focus$2,
1659
+ focusFirst: focusFirst$7,
1660
+ focusLast: focusLast$6,
1661
+ focusNext: focusNext$8,
1662
+ focusPrevious: focusPrevious$7,
1663
+ handleClick: handleClick$3,
1664
+ handleContextMenu: handleContextMenu$5,
1665
+ selectCurrent
1644
1666
  };
1645
1667
 
1646
1668
  const readNativeFiles = async () => {
@@ -1677,13 +1699,13 @@ const writeText = async text => {
1677
1699
  };
1678
1700
 
1679
1701
  const ClipBoard = {
1680
- __proto__: null,
1681
- disableMemoryClipBoard,
1682
- enableMemoryClipBoard,
1683
- readNativeFiles,
1684
- shouldHaveText: shouldHaveText$1,
1685
- writeNativeFiles,
1686
- writeText
1702
+ __proto__: null,
1703
+ disableMemoryClipBoard,
1704
+ enableMemoryClipBoard,
1705
+ readNativeFiles,
1706
+ shouldHaveText: shouldHaveText$1,
1707
+ writeNativeFiles,
1708
+ writeText
1687
1709
  };
1688
1710
 
1689
1711
  const setRelativeX = async x => {
@@ -1691,8 +1713,8 @@ const setRelativeX = async x => {
1691
1713
  };
1692
1714
 
1693
1715
  const ColorPicker = {
1694
- __proto__: null,
1695
- setRelativeX
1716
+ __proto__: null,
1717
+ setRelativeX
1696
1718
  };
1697
1719
 
1698
1720
  const execute$1 = async (id, ...args) => {
@@ -1701,8 +1723,8 @@ const execute$1 = async (id, ...args) => {
1701
1723
  };
1702
1724
 
1703
1725
  const Command = {
1704
- __proto__: null,
1705
- execute: execute$1
1726
+ __proto__: null,
1727
+ execute: execute$1
1706
1728
  };
1707
1729
 
1708
1730
  const selectItem$1 = async text => {
@@ -1710,8 +1732,8 @@ const selectItem$1 = async text => {
1710
1732
  };
1711
1733
 
1712
1734
  const ContextMenu = {
1713
- __proto__: null,
1714
- selectItem: selectItem$1
1735
+ __proto__: null,
1736
+ selectItem: selectItem$1
1715
1737
  };
1716
1738
 
1717
1739
  const openIframeInspector = async () => {
@@ -1748,15 +1770,15 @@ const toggleDeveloperTools = async () => {
1748
1770
  };
1749
1771
 
1750
1772
  const Developer = {
1751
- __proto__: null,
1752
- openCacheFolder,
1753
- openConfigFolder,
1754
- openIframeInspector,
1755
- openLogsFolder,
1756
- openProcessExplorer,
1757
- reloadColorTheme,
1758
- reloadIconTheme,
1759
- toggleDeveloperTools
1773
+ __proto__: null,
1774
+ openCacheFolder,
1775
+ openConfigFolder,
1776
+ openIframeInspector,
1777
+ openLogsFolder,
1778
+ openProcessExplorer,
1779
+ reloadColorTheme,
1780
+ reloadIconTheme,
1781
+ toggleDeveloperTools
1760
1782
  };
1761
1783
 
1762
1784
  const createId = () => {
@@ -1793,11 +1815,11 @@ const executeMock = (id, ...args) => {
1793
1815
  };
1794
1816
 
1795
1817
  const Dialog = {
1796
- __proto__: null,
1797
- executeMock,
1798
- mockConfirm,
1799
- mockSaveFilePicker,
1800
- showSaveFilePicker
1818
+ __proto__: null,
1819
+ executeMock,
1820
+ mockConfirm,
1821
+ mockSaveFilePicker,
1822
+ showSaveFilePicker
1801
1823
  };
1802
1824
 
1803
1825
  const isDiagnosticEqual = (actual, expected) => {
@@ -1828,12 +1850,6 @@ const areSelectionsEqual = (a, b) => {
1828
1850
  return true;
1829
1851
  };
1830
1852
 
1831
- const lazyRpc = createLazyRpc(EditorWorker);
1832
- const {
1833
- invoke,
1834
- setFactory
1835
- } = lazyRpc;
1836
-
1837
1853
  const getEditorKey = async () => {
1838
1854
  const keys = await invoke('Editor.getKeys');
1839
1855
  if (keys.length === 0) {
@@ -1864,10 +1880,10 @@ const disableDiagnostics$1 = () => {
1864
1880
  };
1865
1881
 
1866
1882
  const Settings = {
1867
- __proto__: null,
1868
- disableDiagnostics: disableDiagnostics$1,
1869
- enableDiagnostics: enableDiagnostics$1,
1870
- update: update$1
1883
+ __proto__: null,
1884
+ disableDiagnostics: disableDiagnostics$1,
1885
+ enableDiagnostics: enableDiagnostics$1,
1886
+ update: update$1
1871
1887
  };
1872
1888
 
1873
1889
  const setCursor = async (rowIndex, columnIndex) => {
@@ -2104,71 +2120,71 @@ const disableDiagnostics = async () => {
2104
2120
  };
2105
2121
 
2106
2122
  const Editor = {
2107
- __proto__: null,
2108
- addAllMissingImports,
2109
- closeColorPicker,
2110
- closeCompletion,
2111
- closeCompletionDetails,
2112
- copy: copy$1,
2113
- copyLineDown,
2114
- copyLineUp,
2115
- cursorCharacterLeft,
2116
- cursorCharacterRight,
2117
- cursorDown,
2118
- cursorEnd,
2119
- cursorHome,
2120
- cursorUp,
2121
- cursorWordLeft,
2122
- cursorWordPartLeft,
2123
- cursorWordPartRight,
2124
- cursorWordRight,
2125
- deleteAllLeft,
2126
- deleteAllRight,
2127
- disableCompletionsOnType,
2128
- disableDiagnostics,
2129
- enableCompletionsOnType,
2130
- enableDiagnostics,
2131
- executeTabCompletion,
2132
- findAllImplementations,
2133
- findAllReferences,
2134
- format,
2135
- getSelections,
2136
- getText,
2137
- goToDefinition,
2138
- goToTypeDefinition,
2139
- growSelection,
2140
- insertLineBreak,
2141
- invokeBraceCompletion,
2142
- invokeTabCompletion,
2143
- openColorPicker,
2144
- openCompletion,
2145
- openCompletionDetails,
2146
- openContextMenu: openContextMenu$1,
2147
- openEditorContextMenu,
2148
- openFind,
2149
- openFindWidget,
2150
- openHover,
2151
- openRename,
2152
- openSourceActions,
2153
- organizeImports,
2154
- redo,
2155
- rename: rename$1,
2156
- rename2,
2157
- selectAll: selectAll$1,
2158
- setCursor,
2159
- setDeltaY,
2160
- setSelections,
2161
- shouldHaveDiagnostics,
2162
- shouldHaveSelections,
2163
- shouldHaveText,
2164
- showHover,
2165
- sortImports,
2166
- sourceActionsSelectCurrent,
2167
- toggleBlockComment,
2168
- toggleCompletionDetails,
2169
- toggleLineComment,
2170
- type,
2171
- undo
2123
+ __proto__: null,
2124
+ addAllMissingImports,
2125
+ closeColorPicker,
2126
+ closeCompletion,
2127
+ closeCompletionDetails,
2128
+ copy: copy$1,
2129
+ copyLineDown,
2130
+ copyLineUp,
2131
+ cursorCharacterLeft,
2132
+ cursorCharacterRight,
2133
+ cursorDown,
2134
+ cursorEnd,
2135
+ cursorHome,
2136
+ cursorUp,
2137
+ cursorWordLeft,
2138
+ cursorWordPartLeft,
2139
+ cursorWordPartRight,
2140
+ cursorWordRight,
2141
+ deleteAllLeft,
2142
+ deleteAllRight,
2143
+ disableCompletionsOnType,
2144
+ disableDiagnostics,
2145
+ enableCompletionsOnType,
2146
+ enableDiagnostics,
2147
+ executeTabCompletion,
2148
+ findAllImplementations,
2149
+ findAllReferences,
2150
+ format,
2151
+ getSelections,
2152
+ getText,
2153
+ goToDefinition,
2154
+ goToTypeDefinition,
2155
+ growSelection,
2156
+ insertLineBreak,
2157
+ invokeBraceCompletion,
2158
+ invokeTabCompletion,
2159
+ openColorPicker,
2160
+ openCompletion,
2161
+ openCompletionDetails,
2162
+ openContextMenu: openContextMenu$1,
2163
+ openEditorContextMenu,
2164
+ openFind,
2165
+ openFindWidget,
2166
+ openHover,
2167
+ openRename,
2168
+ openSourceActions,
2169
+ organizeImports,
2170
+ redo,
2171
+ rename: rename$1,
2172
+ rename2,
2173
+ selectAll: selectAll$1,
2174
+ setCursor,
2175
+ setDeltaY,
2176
+ setSelections,
2177
+ shouldHaveDiagnostics,
2178
+ shouldHaveSelections,
2179
+ shouldHaveText,
2180
+ showHover,
2181
+ sortImports,
2182
+ sourceActionsSelectCurrent,
2183
+ toggleBlockComment,
2184
+ toggleCompletionDetails,
2185
+ toggleLineComment,
2186
+ type,
2187
+ undo
2172
2188
  };
2173
2189
 
2174
2190
  const selectIndex$6 = async index => {
@@ -2191,12 +2207,12 @@ const handlePointerdown = async (clientX, clientY) => {
2191
2207
  };
2192
2208
 
2193
2209
  const EditorCompletion = {
2194
- __proto__: null,
2195
- close: close$2,
2196
- handlePointerdown,
2197
- handleWheel: handleWheel$2,
2198
- selectCurrentIndex: selectCurrentIndex$2,
2199
- selectIndex: selectIndex$6
2210
+ __proto__: null,
2211
+ close: close$2,
2212
+ handlePointerdown,
2213
+ handleWheel: handleWheel$2,
2214
+ selectCurrentIndex: selectCurrentIndex$2,
2215
+ selectIndex: selectIndex$6
2200
2216
  };
2201
2217
 
2202
2218
  const show$5 = async () => {
@@ -2208,9 +2224,9 @@ const close$1 = async () => {
2208
2224
  };
2209
2225
 
2210
2226
  const EditorHover = {
2211
- __proto__: null,
2212
- close: close$1,
2213
- show: show$5
2227
+ __proto__: null,
2228
+ close: close$1,
2229
+ show: show$5
2214
2230
  };
2215
2231
 
2216
2232
  const handleInput$5 = async value => {
@@ -2227,10 +2243,10 @@ const cancel = async () => {
2227
2243
  };
2228
2244
 
2229
2245
  const EditorRename = {
2230
- __proto__: null,
2231
- accept,
2232
- cancel,
2233
- handleInput: handleInput$5
2246
+ __proto__: null,
2247
+ accept,
2248
+ cancel,
2249
+ handleInput: handleInput$5
2234
2250
  };
2235
2251
 
2236
2252
  const selectIndex$5 = async index => {
@@ -2243,9 +2259,9 @@ const selectCurrentIndex$1 = async () => {
2243
2259
  };
2244
2260
 
2245
2261
  const EditorSourceAction = {
2246
- __proto__: null,
2247
- selectCurrentIndex: selectCurrentIndex$1,
2248
- selectIndex: selectIndex$5
2262
+ __proto__: null,
2263
+ selectCurrentIndex: selectCurrentIndex$1,
2264
+ selectIndex: selectIndex$5
2249
2265
  };
2250
2266
 
2251
2267
  const openContextMenu = async index => {
@@ -2380,46 +2396,46 @@ const toggleIndividualSelection = async index => {
2380
2396
  };
2381
2397
 
2382
2398
  const Explorer = {
2383
- __proto__: null,
2384
- acceptEdit,
2385
- cancelEdit,
2386
- clickCurrent,
2387
- collapseAll: collapseAll$2,
2388
- copyPath: copyPath$1,
2389
- copyRelativePath,
2390
- expandAll,
2391
- expandRecursively,
2392
- focus: focus$1,
2393
- focusFirst: focusFirst$6,
2394
- focusIndex: focusIndex$5,
2395
- focusLast: focusLast$5,
2396
- focusNext: focusNext$7,
2397
- handleArrowLeft: handleArrowLeft$1,
2398
- handleBlur,
2399
- handleClick: handleClick$2,
2400
- handleClickAt: handleClickAt$2,
2401
- handleCopy,
2402
- handleCut,
2403
- handleDragLeave,
2404
- handleDragOver,
2405
- handleDragOverIndex,
2406
- handleDrop,
2407
- handleEscape,
2408
- handleInputBlur,
2409
- handlePaste,
2410
- newFile,
2411
- newFolder,
2412
- openContextMenu,
2413
- refresh: refresh$1,
2414
- removeDirent,
2415
- rename,
2416
- renameDirent,
2417
- selectAll,
2418
- selectDown,
2419
- selectIndices,
2420
- selectUp,
2421
- toggleIndividualSelection,
2422
- updateEditingValue
2399
+ __proto__: null,
2400
+ acceptEdit,
2401
+ cancelEdit,
2402
+ clickCurrent,
2403
+ collapseAll: collapseAll$2,
2404
+ copyPath: copyPath$1,
2405
+ copyRelativePath,
2406
+ expandAll,
2407
+ expandRecursively,
2408
+ focus: focus$1,
2409
+ focusFirst: focusFirst$6,
2410
+ focusIndex: focusIndex$5,
2411
+ focusLast: focusLast$5,
2412
+ focusNext: focusNext$7,
2413
+ handleArrowLeft: handleArrowLeft$1,
2414
+ handleBlur,
2415
+ handleClick: handleClick$2,
2416
+ handleClickAt: handleClickAt$2,
2417
+ handleCopy,
2418
+ handleCut,
2419
+ handleDragLeave,
2420
+ handleDragOver,
2421
+ handleDragOverIndex,
2422
+ handleDrop,
2423
+ handleEscape,
2424
+ handleInputBlur,
2425
+ handlePaste,
2426
+ newFile,
2427
+ newFolder,
2428
+ openContextMenu,
2429
+ refresh: refresh$1,
2430
+ removeDirent,
2431
+ rename,
2432
+ renameDirent,
2433
+ selectAll,
2434
+ selectDown,
2435
+ selectIndices,
2436
+ selectUp,
2437
+ toggleIndividualSelection,
2438
+ updateEditingValue
2423
2439
  };
2424
2440
 
2425
2441
  const addWebExtension = async relativePath => {
@@ -2434,9 +2450,9 @@ const addNodeExtension = async relativePath => {
2434
2450
  };
2435
2451
 
2436
2452
  const Extension = {
2437
- __proto__: null,
2438
- addNodeExtension,
2439
- addWebExtension
2453
+ __proto__: null,
2454
+ addNodeExtension,
2455
+ addWebExtension
2440
2456
  };
2441
2457
 
2442
2458
  const handleClickCategory = async categoryId => {
@@ -2528,33 +2544,33 @@ const handleTabFocus = async tabName => {
2528
2544
  };
2529
2545
 
2530
2546
  const ExtensionDetail = {
2531
- __proto__: null,
2532
- copyReadmeLink,
2533
- focusNextTab,
2534
- focusPreviousTab,
2535
- handleClickCategory,
2536
- handleClickDisable,
2537
- handleClickEnable,
2538
- handleClickSetColorTheme,
2539
- handleClickUninstall,
2540
- handleImageContextMenu,
2541
- handleReadmeContextMenu,
2542
- handleScroll: handleScroll$1,
2543
- handleTabFocus,
2544
- hideSizeLink,
2545
- open: open$6,
2546
- openCommands,
2547
- openFeature,
2548
- openJsonValidation,
2549
- openRuntimeStatus,
2550
- openSettings,
2551
- openThemes,
2552
- openWebViews,
2553
- selectChangelog,
2554
- selectDetails,
2555
- selectFeature,
2556
- selectFeatures,
2557
- selectTab: selectTab$1
2547
+ __proto__: null,
2548
+ copyReadmeLink,
2549
+ focusNextTab,
2550
+ focusPreviousTab,
2551
+ handleClickCategory,
2552
+ handleClickDisable,
2553
+ handleClickEnable,
2554
+ handleClickSetColorTheme,
2555
+ handleClickUninstall,
2556
+ handleImageContextMenu,
2557
+ handleReadmeContextMenu,
2558
+ handleScroll: handleScroll$1,
2559
+ handleTabFocus,
2560
+ hideSizeLink,
2561
+ open: open$6,
2562
+ openCommands,
2563
+ openFeature,
2564
+ openJsonValidation,
2565
+ openRuntimeStatus,
2566
+ openSettings,
2567
+ openThemes,
2568
+ openWebViews,
2569
+ selectChangelog,
2570
+ selectDetails,
2571
+ selectFeature,
2572
+ selectFeatures,
2573
+ selectTab: selectTab$1
2558
2574
  };
2559
2575
 
2560
2576
  const open$5 = async id => {
@@ -2565,9 +2581,9 @@ const hide = async () => {
2565
2581
  };
2566
2582
 
2567
2583
  const SideBar = {
2568
- __proto__: null,
2569
- hide,
2570
- open: open$5
2584
+ __proto__: null,
2585
+ hide,
2586
+ open: open$5
2571
2587
  };
2572
2588
 
2573
2589
  const open$4 = async () => {
@@ -2599,14 +2615,14 @@ const clearSearchResults$1 = async () => {
2599
2615
  };
2600
2616
 
2601
2617
  const ExtensionSearch = {
2602
- __proto__: null,
2603
- clearSearchResults: clearSearchResults$1,
2604
- copyExtensionId,
2605
- copyExtensionInfo,
2606
- handleClick: handleClick$1,
2607
- handleContextMenu: handleContextMenu$4,
2608
- handleInput: handleInput$4,
2609
- open: open$4
2618
+ __proto__: null,
2619
+ clearSearchResults: clearSearchResults$1,
2620
+ copyExtensionId,
2621
+ copyExtensionInfo,
2622
+ handleClick: handleClick$1,
2623
+ handleContextMenu: handleContextMenu$4,
2624
+ handleInput: handleInput$4,
2625
+ open: open$4
2610
2626
  };
2611
2627
 
2612
2628
  const Memfs = 'memfs';
@@ -2694,9 +2710,9 @@ const Backslash = '\\';
2694
2710
  const Slash$1 = '/';
2695
2711
 
2696
2712
  const Character = {
2697
- __proto__: null,
2698
- Backslash,
2699
- Slash: Slash$1
2713
+ __proto__: null,
2714
+ Backslash,
2715
+ Slash: Slash$1
2700
2716
  };
2701
2717
 
2702
2718
  const {
@@ -2790,20 +2806,20 @@ const loadFixture = async (platform, url) => {
2790
2806
  };
2791
2807
 
2792
2808
  const FileSystem = {
2793
- __proto__: null,
2794
- addFileHandle,
2795
- chmod,
2796
- createDroppedFileHandle,
2797
- createExecutable,
2798
- createExecutableFrom,
2799
- getTmpDir,
2800
- loadFixture,
2801
- mkdir,
2802
- readDir,
2803
- readFile,
2804
- remove,
2805
- writeFile,
2806
- writeJson
2809
+ __proto__: null,
2810
+ addFileHandle,
2811
+ chmod,
2812
+ createDroppedFileHandle,
2813
+ createExecutable,
2814
+ createExecutableFrom,
2815
+ getTmpDir,
2816
+ loadFixture,
2817
+ mkdir,
2818
+ readDir,
2819
+ readFile,
2820
+ remove,
2821
+ writeFile,
2822
+ writeJson
2807
2823
  };
2808
2824
 
2809
2825
  const focusNext$6 = async () => {
@@ -2867,22 +2883,22 @@ const focusPreviousElement = async () => {
2867
2883
  };
2868
2884
 
2869
2885
  const FindWidget = {
2870
- __proto__: null,
2871
- close,
2872
- focusElement,
2873
- focusNext: focusNext$6,
2874
- focusNextElement,
2875
- focusPrevious: focusPrevious$6,
2876
- focusPreviousElement,
2877
- replace,
2878
- replaceAll: replaceAll$1,
2879
- setReplaceValue: setReplaceValue$1,
2880
- setValue: setValue$2,
2881
- toggleMatchCase: toggleMatchCase$1,
2882
- toggleMatchWholeWord: toggleMatchWholeWord$1,
2883
- togglePreserveCase: togglePreserveCase$1,
2884
- toggleReplace: toggleReplace$1,
2885
- toggleUseRegularExpression: toggleUseRegularExpression$1
2886
+ __proto__: null,
2887
+ close,
2888
+ focusElement,
2889
+ focusNext: focusNext$6,
2890
+ focusNextElement,
2891
+ focusPrevious: focusPrevious$6,
2892
+ focusPreviousElement,
2893
+ replace,
2894
+ replaceAll: replaceAll$1,
2895
+ setReplaceValue: setReplaceValue$1,
2896
+ setValue: setValue$2,
2897
+ toggleMatchCase: toggleMatchCase$1,
2898
+ toggleMatchWholeWord: toggleMatchWholeWord$1,
2899
+ togglePreserveCase: togglePreserveCase$1,
2900
+ toggleReplace: toggleReplace$1,
2901
+ toggleUseRegularExpression: toggleUseRegularExpression$1
2886
2902
  };
2887
2903
 
2888
2904
  const setIconTheme = async id => {
@@ -2890,8 +2906,8 @@ const setIconTheme = async id => {
2890
2906
  };
2891
2907
 
2892
2908
  const IconTheme = {
2893
- __proto__: null,
2894
- setIconTheme
2909
+ __proto__: null,
2910
+ setIconTheme
2895
2911
  };
2896
2912
 
2897
2913
  const selectIndex$4 = async index => {
@@ -2911,12 +2927,12 @@ const focusLast$4 = async () => {
2911
2927
  };
2912
2928
 
2913
2929
  const IframeInspector = {
2914
- __proto__: null,
2915
- focusFirst: focusFirst$5,
2916
- focusLast: focusLast$4,
2917
- focusNext: focusNext$5,
2918
- focusPrevious: focusPrevious$5,
2919
- selectIndex: selectIndex$4
2930
+ __proto__: null,
2931
+ focusFirst: focusFirst$5,
2932
+ focusLast: focusLast$4,
2933
+ focusNext: focusNext$5,
2934
+ focusPrevious: focusPrevious$5,
2935
+ selectIndex: selectIndex$4
2920
2936
  };
2921
2937
 
2922
2938
  const open$3 = async () => {
@@ -2991,30 +3007,30 @@ const resetKeyBinding = () => {
2991
3007
  };
2992
3008
 
2993
3009
  const KeyBindingsEditor = {
2994
- __proto__: null,
2995
- addKeyBinding,
2996
- changeWhenExpression,
2997
- clearInput,
2998
- copyCommandId,
2999
- copyCommandTitle,
3000
- focusFirst: focusFirst$4,
3001
- focusIndex: focusIndex$4,
3002
- focusLast: focusLast$3,
3003
- focusNext: focusNext$4,
3004
- focusPrevious: focusPrevious$4,
3005
- handleClick,
3006
- handleContextMenu: handleContextMenu$3,
3007
- handleDoubleClick,
3008
- handleInput: handleInput$3,
3009
- handleWheel: handleWheel$1,
3010
- open: open$3,
3011
- removeKeyBinding,
3012
- resetKeyBinding,
3013
- showSameKeyBindings,
3014
- sortByPrecedence,
3015
- startRecordingKeys,
3016
- stopRecordingKeys,
3017
- toggleRecordingKeys
3010
+ __proto__: null,
3011
+ addKeyBinding,
3012
+ changeWhenExpression,
3013
+ clearInput,
3014
+ copyCommandId,
3015
+ copyCommandTitle,
3016
+ focusFirst: focusFirst$4,
3017
+ focusIndex: focusIndex$4,
3018
+ focusLast: focusLast$3,
3019
+ focusNext: focusNext$4,
3020
+ focusPrevious: focusPrevious$4,
3021
+ handleClick,
3022
+ handleContextMenu: handleContextMenu$3,
3023
+ handleDoubleClick,
3024
+ handleInput: handleInput$3,
3025
+ handleWheel: handleWheel$1,
3026
+ open: open$3,
3027
+ removeKeyBinding,
3028
+ resetKeyBinding,
3029
+ showSameKeyBindings,
3030
+ sortByPrecedence,
3031
+ startRecordingKeys,
3032
+ stopRecordingKeys,
3033
+ toggleRecordingKeys
3018
3034
  };
3019
3035
 
3020
3036
  const Control = 'Control';
@@ -3068,8 +3084,8 @@ const press = async key => {
3068
3084
  };
3069
3085
 
3070
3086
  const KeyBoard = {
3071
- __proto__: null,
3072
- press
3087
+ __proto__: null,
3088
+ press
3073
3089
  };
3074
3090
 
3075
3091
  const openUri = async uri => {
@@ -3110,19 +3126,19 @@ const focusLast$2 = async () => {
3110
3126
  };
3111
3127
 
3112
3128
  const Main = {
3113
- __proto__: null,
3114
- closeActiveEditor,
3115
- closeAllEditors,
3116
- closeOthers,
3117
- closeTabsLeft,
3118
- closeTabsRight,
3119
- focusFirst: focusFirst$3,
3120
- focusLast: focusLast$2,
3121
- focusNext: focusNext$3,
3122
- focusPrevious: focusPrevious$3,
3123
- openKeyBindings,
3124
- openUri,
3125
- splitRight
3129
+ __proto__: null,
3130
+ closeActiveEditor,
3131
+ closeAllEditors,
3132
+ closeOthers,
3133
+ closeTabsLeft,
3134
+ closeTabsRight,
3135
+ focusFirst: focusFirst$3,
3136
+ focusLast: focusLast$2,
3137
+ focusNext: focusNext$3,
3138
+ focusPrevious: focusPrevious$3,
3139
+ openKeyBindings,
3140
+ openUri,
3141
+ splitRight
3126
3142
  };
3127
3143
 
3128
3144
  const show$4 = async () => {
@@ -3143,11 +3159,11 @@ const clear$2 = async () => {
3143
3159
  };
3144
3160
 
3145
3161
  const Output = {
3146
- __proto__: null,
3147
- clear: clear$2,
3148
- handleFilterInput: handleFilterInput$1,
3149
- selectChannel,
3150
- show: show$4
3162
+ __proto__: null,
3163
+ clear: clear$2,
3164
+ handleFilterInput: handleFilterInput$1,
3165
+ selectChannel,
3166
+ show: show$4
3151
3167
  };
3152
3168
 
3153
3169
  const open$2 = async id => {
@@ -3160,9 +3176,9 @@ const openProblems = async () => {
3160
3176
  };
3161
3177
 
3162
3178
  const Panel = {
3163
- __proto__: null,
3164
- open: open$2,
3165
- openProblems
3179
+ __proto__: null,
3180
+ open: open$2,
3181
+ openProblems
3166
3182
  };
3167
3183
 
3168
3184
  const getIsFirefox = () => {
@@ -3191,9 +3207,9 @@ const isFirefox = () => {
3191
3207
  };
3192
3208
 
3193
3209
  const Platform = {
3194
- __proto__: null,
3195
- getNodePath,
3196
- isFirefox
3210
+ __proto__: null,
3211
+ getNodePath,
3212
+ isFirefox
3197
3213
  };
3198
3214
 
3199
3215
  const show$3 = async () => {
@@ -3238,17 +3254,17 @@ const viewAsTable = async () => {
3238
3254
  };
3239
3255
 
3240
3256
  const Problems = {
3241
- __proto__: null,
3242
- copyMessage,
3243
- focusIndex: focusIndex$3,
3244
- handleArrowLeft,
3245
- handleArrowRight,
3246
- handleClickAt: handleClickAt$1,
3247
- handleFilterInput,
3248
- handleIconThemeChange,
3249
- show: show$3,
3250
- viewAsList,
3251
- viewAsTable
3257
+ __proto__: null,
3258
+ copyMessage,
3259
+ focusIndex: focusIndex$3,
3260
+ handleArrowLeft,
3261
+ handleArrowRight,
3262
+ handleClickAt: handleClickAt$1,
3263
+ handleFilterInput,
3264
+ handleIconThemeChange,
3265
+ show: show$3,
3266
+ viewAsList,
3267
+ viewAsTable
3252
3268
  };
3253
3269
 
3254
3270
  const callbacks = Object.create(null);
@@ -3260,7 +3276,7 @@ const registerCallbackCommand = async commandId => {
3260
3276
  } = Promise.withResolvers();
3261
3277
  callbacks[id] = resolve;
3262
3278
  // @ts-ignore
3263
- await invoke$1(`Command.registerTestCommand`, commandId);
3279
+ await invoke$1(`Test.registerTestCommand`, commandId);
3264
3280
  return {
3265
3281
  promise
3266
3282
  };
@@ -3337,21 +3353,21 @@ const selectItem2 = async ({
3337
3353
  };
3338
3354
 
3339
3355
  const QuickPick = {
3340
- __proto__: null,
3341
- executeCommand,
3342
- focusFirst: focusFirst$2,
3343
- focusIndex: focusIndex$2,
3344
- focusLast: focusLast$1,
3345
- focusNext: focusNext$2,
3346
- focusPrevious: focusPrevious$2,
3347
- handleClickAt,
3348
- handleInput: handleInput$2,
3349
- open: open$1,
3350
- selectCurrentIndex,
3351
- selectIndex: selectIndex$3,
3352
- selectItem,
3353
- selectItem2,
3354
- setValue: setValue$1
3356
+ __proto__: null,
3357
+ executeCommand,
3358
+ focusFirst: focusFirst$2,
3359
+ focusIndex: focusIndex$2,
3360
+ focusLast: focusLast$1,
3361
+ focusNext: focusNext$2,
3362
+ focusPrevious: focusPrevious$2,
3363
+ handleClickAt,
3364
+ handleInput: handleInput$2,
3365
+ open: open$1,
3366
+ selectCurrentIndex,
3367
+ selectIndex: selectIndex$3,
3368
+ selectItem,
3369
+ selectItem2,
3370
+ setValue: setValue$1
3355
3371
  };
3356
3372
 
3357
3373
  const clear$1 = async () => {
@@ -3368,10 +3384,10 @@ const refresh = async () => {
3368
3384
  };
3369
3385
 
3370
3386
  const References = {
3371
- __proto__: null,
3372
- clear: clear$1,
3373
- collapseAll: collapseAll$1,
3374
- refresh
3387
+ __proto__: null,
3388
+ clear: clear$1,
3389
+ collapseAll: collapseAll$1,
3390
+ refresh
3375
3391
  };
3376
3392
 
3377
3393
  const show$2 = async () => {
@@ -3415,17 +3431,17 @@ const handleSpace = async () => {
3415
3431
  };
3416
3432
 
3417
3433
  const RunAndDebug = {
3418
- __proto__: null,
3419
- acceptWatchExpressionEdit,
3420
- addWatchExpression,
3421
- handleClickSectionBreakPoints,
3422
- handleClickSectionWatch,
3423
- handleRename,
3424
- handleSpace,
3425
- handleWatchValueChange,
3426
- selectIndex: selectIndex$2,
3427
- setPauseOnExceptions,
3428
- show: show$2
3434
+ __proto__: null,
3435
+ acceptWatchExpressionEdit,
3436
+ addWatchExpression,
3437
+ handleClickSectionBreakPoints,
3438
+ handleClickSectionWatch,
3439
+ handleRename,
3440
+ handleSpace,
3441
+ handleWatchValueChange,
3442
+ selectIndex: selectIndex$2,
3443
+ setPauseOnExceptions,
3444
+ show: show$2
3429
3445
  };
3430
3446
 
3431
3447
  const setValue = async value => {
@@ -3551,42 +3567,42 @@ const handleContextMenu$2 = async (button, x, y) => {
3551
3567
  };
3552
3568
 
3553
3569
  const Search = {
3554
- __proto__: null,
3555
- clearSearchResults,
3556
- collapseAll,
3557
- collapseDetails,
3558
- copy,
3559
- copyPath,
3560
- dismissItem,
3561
- focusFirst: focusFirst$1,
3562
- focusIndex: focusIndex$1,
3563
- focusNext: focusNext$1,
3564
- focusNextPage,
3565
- focusPrevious: focusPrevious$1,
3566
- focusPreviousPage,
3567
- handleContextMenu: handleContextMenu$2,
3568
- handleInputContextMenu,
3569
- handleInputCopy,
3570
- handleInputCut,
3571
- handleInputPaste,
3572
- handleInputSelectionChange,
3573
- handleListBlur,
3574
- handleWheel,
3575
- open,
3576
- openDetails,
3577
- replaceAll,
3578
- selectIndex: selectIndex$1,
3579
- setExcludeValue,
3580
- setIncludeValue,
3581
- setLimit,
3582
- setReplaceValue,
3583
- setValue,
3584
- toggleMatchCase,
3585
- toggleMatchWholeWord,
3586
- togglePreserveCase,
3587
- toggleReplace,
3588
- toggleSearchDetails,
3589
- toggleUseRegularExpression
3570
+ __proto__: null,
3571
+ clearSearchResults,
3572
+ collapseAll,
3573
+ collapseDetails,
3574
+ copy,
3575
+ copyPath,
3576
+ dismissItem,
3577
+ focusFirst: focusFirst$1,
3578
+ focusIndex: focusIndex$1,
3579
+ focusNext: focusNext$1,
3580
+ focusNextPage,
3581
+ focusPrevious: focusPrevious$1,
3582
+ focusPreviousPage,
3583
+ handleContextMenu: handleContextMenu$2,
3584
+ handleInputContextMenu,
3585
+ handleInputCopy,
3586
+ handleInputCut,
3587
+ handleInputPaste,
3588
+ handleInputSelectionChange,
3589
+ handleListBlur,
3590
+ handleWheel,
3591
+ open,
3592
+ openDetails,
3593
+ replaceAll,
3594
+ selectIndex: selectIndex$1,
3595
+ setExcludeValue,
3596
+ setIncludeValue,
3597
+ setLimit,
3598
+ setReplaceValue,
3599
+ setValue,
3600
+ toggleMatchCase,
3601
+ toggleMatchWholeWord,
3602
+ togglePreserveCase,
3603
+ toggleReplace,
3604
+ toggleSearchDetails,
3605
+ toggleUseRegularExpression
3590
3606
  };
3591
3607
 
3592
3608
  const show$1 = async () => {
@@ -3638,20 +3654,20 @@ const handleClickFilterButton = async (x, y) => {
3638
3654
  };
3639
3655
 
3640
3656
  const SettingsView = {
3641
- __proto__: null,
3642
- clear,
3643
- clearHistory,
3644
- handleClickFilterButton,
3645
- handleInput: handleInput$1,
3646
- handleScroll,
3647
- selectExtensions,
3648
- selectTab,
3649
- selectTextEditor,
3650
- selectWindow,
3651
- selectWorkspace,
3652
- show: show$1,
3653
- useNextSearchValue,
3654
- usePreviousSearchValue
3657
+ __proto__: null,
3658
+ clear,
3659
+ clearHistory,
3660
+ handleClickFilterButton,
3661
+ handleInput: handleInput$1,
3662
+ handleScroll,
3663
+ selectExtensions,
3664
+ selectTab,
3665
+ selectTextEditor,
3666
+ selectWindow,
3667
+ selectWorkspace,
3668
+ show: show$1,
3669
+ useNextSearchValue,
3670
+ usePreviousSearchValue
3655
3671
  };
3656
3672
 
3657
3673
  const selectIndex = async index => {
@@ -3677,13 +3693,13 @@ const show = async () => {
3677
3693
  };
3678
3694
 
3679
3695
  const SourceControl = {
3680
- __proto__: null,
3681
- acceptInput,
3682
- handleClickSourceControlButtons,
3683
- handleContextMenu: handleContextMenu$1,
3684
- handleInput,
3685
- selectIndex,
3686
- show
3696
+ __proto__: null,
3697
+ acceptInput,
3698
+ handleClickSourceControlButtons,
3699
+ handleContextMenu: handleContextMenu$1,
3700
+ handleInput,
3701
+ selectIndex,
3702
+ show
3687
3703
  };
3688
3704
 
3689
3705
  const update = async () => {
@@ -3691,8 +3707,8 @@ const update = async () => {
3691
3707
  };
3692
3708
 
3693
3709
  const StatusBar = {
3694
- __proto__: null,
3695
- update
3710
+ __proto__: null,
3711
+ update
3696
3712
  };
3697
3713
 
3698
3714
  const closeMenu = async () => {
@@ -3769,25 +3785,25 @@ const handleContextMenu = async (button, x, y) => {
3769
3785
  };
3770
3786
 
3771
3787
  const TitleBarMenuBar = {
3772
- __proto__: null,
3773
- closeMenu,
3774
- focus,
3775
- focusFirst,
3776
- focusIndex,
3777
- focusLast,
3778
- focusNext,
3779
- focusPrevious,
3780
- handleContextMenu,
3781
- handleKeyArrowDown,
3782
- handleKeyArrowLeft,
3783
- handleKeyArrowRight,
3784
- handleKeyArrowUp,
3785
- handleKeyEnd,
3786
- handleKeyEscape,
3787
- handleKeyHome,
3788
- handleKeySpace,
3789
- toggleIndex,
3790
- toggleMenu
3788
+ __proto__: null,
3789
+ closeMenu,
3790
+ focus,
3791
+ focusFirst,
3792
+ focusIndex,
3793
+ focusLast,
3794
+ focusNext,
3795
+ focusPrevious,
3796
+ handleContextMenu,
3797
+ handleKeyArrowDown,
3798
+ handleKeyArrowLeft,
3799
+ handleKeyArrowRight,
3800
+ handleKeyArrowUp,
3801
+ handleKeyEnd,
3802
+ handleKeyEscape,
3803
+ handleKeyHome,
3804
+ handleKeySpace,
3805
+ toggleIndex,
3806
+ toggleMenu
3791
3807
  };
3792
3808
 
3793
3809
  let url = '';
@@ -3799,9 +3815,9 @@ const resolve = relativePath => {
3799
3815
  };
3800
3816
 
3801
3817
  const Url = {
3802
- __proto__: null,
3803
- resolve,
3804
- setUrl
3818
+ __proto__: null,
3819
+ resolve,
3820
+ setUrl
3805
3821
  };
3806
3822
 
3807
3823
  const getPortTuple = () => {
@@ -3876,8 +3892,8 @@ const fromId = async webViewId => {
3876
3892
  };
3877
3893
 
3878
3894
  const WebView = {
3879
- __proto__: null,
3880
- fromId
3895
+ __proto__: null,
3896
+ fromId
3881
3897
  };
3882
3898
 
3883
3899
  const setPath = async path => {
@@ -3890,9 +3906,9 @@ const openTmpDir = async () => {
3890
3906
  };
3891
3907
 
3892
3908
  const Workspace = {
3893
- __proto__: null,
3894
- openTmpDir,
3895
- setPath
3909
+ __proto__: null,
3910
+ openTmpDir,
3911
+ setPath
3896
3912
  };
3897
3913
 
3898
3914
  const createApi = (platform, assetDir) => {
@@ -4186,25 +4202,17 @@ const commandMap = {
4186
4202
  'Test.executeMock': executeMock
4187
4203
  };
4188
4204
 
4189
- const send = async port => {
4190
- await sendMessagePortToEditorWorker(port, TestWorker);
4191
- };
4192
- const launchEditorWorkerRpc = async () => {
4193
- const rpc = await TransferMessagePortRpcParent.create({
4194
- commandMap: {},
4195
- send
4196
- });
4197
- return rpc;
4198
- };
4199
-
4200
- const listen = async () => {
4201
- setFactory(launchEditorWorkerRpc);
4205
+ const initializeRendererWorker = async () => {
4202
4206
  const rpc = await WebWorkerRpcClient.create({
4203
4207
  commandMap: commandMap
4204
4208
  });
4205
4209
  set$1(rpc);
4206
4210
  };
4207
4211
 
4212
+ const listen = async () => {
4213
+ await Promise.all([initializeRendererWorker(), initializeEditorWorker()]);
4214
+ };
4215
+
4208
4216
  const main = async () => {
4209
4217
  await listen();
4210
4218
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "10.12.0",
3
+ "version": "10.14.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",