@lvce-editor/test-worker 4.16.0 → 4.17.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/api.d.ts +3 -1
- package/dist/testWorkerMain.js +45 -24
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -208,8 +208,10 @@ declare const toggleReplace: () => Promise<void>;
|
|
|
208
208
|
declare const update: (settings: any) => Promise<void>;
|
|
209
209
|
declare const open$4: (id: string) => Promise<void>;
|
|
210
210
|
declare const hide: () => Promise<void>;
|
|
211
|
+
declare const selectIndex$4: (index: number) => Promise<void>;
|
|
211
212
|
declare const acceptInput: () => Promise<void>;
|
|
212
213
|
declare const handleInput$2: (text: string) => Promise<void>;
|
|
214
|
+
declare const handleClickSourceControlButtons: (index: number, name: string) => Promise<void>;
|
|
213
215
|
declare const update$1: () => Promise<void>;
|
|
214
216
|
declare const closeMenu: () => Promise<void>;
|
|
215
217
|
declare const focus$2: () => Promise<void>;
|
|
@@ -310,7 +312,7 @@ declare namespace SideBar {
|
|
|
310
312
|
export { hide, open$4 as open };
|
|
311
313
|
}
|
|
312
314
|
declare namespace SourceControl {
|
|
313
|
-
export { acceptInput, handleInput$2 as handleInput };
|
|
315
|
+
export { acceptInput, handleClickSourceControlButtons, handleInput$2 as handleInput, selectIndex$4 as selectIndex };
|
|
314
316
|
}
|
|
315
317
|
declare namespace StatusBar {
|
|
316
318
|
export { update$1 as update };
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -524,7 +524,7 @@ const create$4 = (method, params) => {
|
|
|
524
524
|
};
|
|
525
525
|
};
|
|
526
526
|
const callbacks = Object.create(null);
|
|
527
|
-
const set$
|
|
527
|
+
const set$4 = (id, fn) => {
|
|
528
528
|
callbacks[id] = fn;
|
|
529
529
|
};
|
|
530
530
|
const get$2 = id => {
|
|
@@ -543,7 +543,7 @@ const registerPromise = () => {
|
|
|
543
543
|
resolve,
|
|
544
544
|
promise
|
|
545
545
|
} = Promise.withResolvers();
|
|
546
|
-
set$
|
|
546
|
+
set$4(id, resolve);
|
|
547
547
|
return {
|
|
548
548
|
id,
|
|
549
549
|
promise
|
|
@@ -891,6 +891,9 @@ const createRpc = ipc => {
|
|
|
891
891
|
},
|
|
892
892
|
invokeAndTransfer(method, ...params) {
|
|
893
893
|
return invokeAndTransfer$1(ipc, method, ...params);
|
|
894
|
+
},
|
|
895
|
+
async dispose() {
|
|
896
|
+
await ipc?.dispose();
|
|
894
897
|
}
|
|
895
898
|
};
|
|
896
899
|
return rpc;
|
|
@@ -925,7 +928,7 @@ const listen$1 = async (module, options) => {
|
|
|
925
928
|
const ipc = module.wrap(rawIpc);
|
|
926
929
|
return ipc;
|
|
927
930
|
};
|
|
928
|
-
const create$
|
|
931
|
+
const create$8 = async ({
|
|
929
932
|
commandMap,
|
|
930
933
|
messagePort,
|
|
931
934
|
isMessagePortOpen
|
|
@@ -943,7 +946,7 @@ const create$6 = async ({
|
|
|
943
946
|
};
|
|
944
947
|
const MessagePortRpcParent = {
|
|
945
948
|
__proto__: null,
|
|
946
|
-
create: create$
|
|
949
|
+
create: create$8
|
|
947
950
|
};
|
|
948
951
|
const create$1 = async ({
|
|
949
952
|
commandMap
|
|
@@ -964,29 +967,39 @@ const formatDuration = duration => {
|
|
|
964
967
|
return duration.toFixed(2) + 'ms';
|
|
965
968
|
};
|
|
966
969
|
|
|
967
|
-
const RendererWorker = 1;
|
|
968
|
-
|
|
969
970
|
const rpcs = Object.create(null);
|
|
970
|
-
const set$
|
|
971
|
+
const set$3 = (id, rpc) => {
|
|
971
972
|
rpcs[id] = rpc;
|
|
972
973
|
};
|
|
973
974
|
const get$1 = id => {
|
|
974
975
|
return rpcs[id];
|
|
975
976
|
};
|
|
976
|
-
|
|
977
|
-
const invoke = (method, ...params) => {
|
|
978
|
-
const rpc = get$1(RendererWorker);
|
|
977
|
+
const RendererWorker$1 = 1;
|
|
978
|
+
const invoke$2 = (method, ...params) => {
|
|
979
|
+
const rpc = get$1(RendererWorker$1);
|
|
980
|
+
// @ts-ignore
|
|
979
981
|
return rpc.invoke(method, ...params);
|
|
980
982
|
};
|
|
981
|
-
const
|
|
982
|
-
|
|
983
|
-
|
|
983
|
+
const set$2 = rpc => {
|
|
984
|
+
set$3(RendererWorker$1, rpc);
|
|
985
|
+
};
|
|
986
|
+
const RendererWorker = {
|
|
987
|
+
__proto__: null,
|
|
988
|
+
invoke: invoke$2,
|
|
989
|
+
set: set$2
|
|
984
990
|
};
|
|
985
991
|
|
|
992
|
+
const {
|
|
993
|
+
set: set$1
|
|
994
|
+
} = RendererWorker;
|
|
995
|
+
const invoke = RendererWorker.invoke;
|
|
996
|
+
const invokeAndTransfer = RendererWorker.invoke;
|
|
997
|
+
|
|
986
998
|
const Rpc = {
|
|
987
999
|
__proto__: null,
|
|
988
1000
|
invoke,
|
|
989
|
-
invokeAndTransfer
|
|
1001
|
+
invokeAndTransfer,
|
|
1002
|
+
set: set$1
|
|
990
1003
|
};
|
|
991
1004
|
|
|
992
1005
|
const printError = error => {
|
|
@@ -1870,7 +1883,7 @@ const TestFrameWorkComponentEditor = {
|
|
|
1870
1883
|
type
|
|
1871
1884
|
};
|
|
1872
1885
|
|
|
1873
|
-
const selectIndex$
|
|
1886
|
+
const selectIndex$4 = async index => {
|
|
1874
1887
|
await invoke('EditorCompletion.selectIndex', index);
|
|
1875
1888
|
};
|
|
1876
1889
|
const selectCurrentIndex$1 = async () => {
|
|
@@ -1880,7 +1893,7 @@ const selectCurrentIndex$1 = async () => {
|
|
|
1880
1893
|
const TestFrameWorkComponentEditorCompletion = {
|
|
1881
1894
|
__proto__: null,
|
|
1882
1895
|
selectCurrentIndex: selectCurrentIndex$1,
|
|
1883
|
-
selectIndex: selectIndex$
|
|
1896
|
+
selectIndex: selectIndex$4
|
|
1884
1897
|
};
|
|
1885
1898
|
|
|
1886
1899
|
const openContextMenu = async index => {
|
|
@@ -2123,7 +2136,7 @@ const TestFrameWorkComponentIconTheme = {
|
|
|
2123
2136
|
setIconTheme
|
|
2124
2137
|
};
|
|
2125
2138
|
|
|
2126
|
-
const selectIndex$
|
|
2139
|
+
const selectIndex$3 = async index => {
|
|
2127
2140
|
return invoke('IframeInspector.selectIndex', index);
|
|
2128
2141
|
};
|
|
2129
2142
|
const focusNext$5 = async () => {
|
|
@@ -2145,7 +2158,7 @@ const TestFrameWorkComponentIframeInspector = {
|
|
|
2145
2158
|
focusLast: focusLast$4,
|
|
2146
2159
|
focusNext: focusNext$5,
|
|
2147
2160
|
focusPrevious: focusPrevious$5,
|
|
2148
|
-
selectIndex: selectIndex$
|
|
2161
|
+
selectIndex: selectIndex$3
|
|
2149
2162
|
};
|
|
2150
2163
|
|
|
2151
2164
|
const open$3 = async () => {
|
|
@@ -2433,7 +2446,7 @@ const focusPrevious$2 = async () => {
|
|
|
2433
2446
|
const selectItem = async label => {
|
|
2434
2447
|
await invoke('QuickPick.selectItem', label);
|
|
2435
2448
|
};
|
|
2436
|
-
const selectIndex$
|
|
2449
|
+
const selectIndex$2 = async index => {
|
|
2437
2450
|
await invoke('QuickPick.selectIndex', index);
|
|
2438
2451
|
};
|
|
2439
2452
|
const selectCurrentIndex = async () => {
|
|
@@ -2457,7 +2470,7 @@ const TestFrameWorkComponentQuickPick = {
|
|
|
2457
2470
|
handleInput: handleInput$1,
|
|
2458
2471
|
open: open$1,
|
|
2459
2472
|
selectCurrentIndex,
|
|
2460
|
-
selectIndex: selectIndex$
|
|
2473
|
+
selectIndex: selectIndex$2,
|
|
2461
2474
|
selectItem,
|
|
2462
2475
|
setValue: setValue$1
|
|
2463
2476
|
};
|
|
@@ -2497,7 +2510,7 @@ const focusFirst$1 = async () => {
|
|
|
2497
2510
|
const focusIndex$1 = async index => {
|
|
2498
2511
|
await invoke('Search.focusIndex', index);
|
|
2499
2512
|
};
|
|
2500
|
-
const selectIndex = async index => {
|
|
2513
|
+
const selectIndex$1 = async index => {
|
|
2501
2514
|
await invoke('Search.selectIndex', index);
|
|
2502
2515
|
};
|
|
2503
2516
|
const focusNext$1 = async () => {
|
|
@@ -2548,7 +2561,7 @@ const TestFrameWorkComponentSearch = {
|
|
|
2548
2561
|
handleWheel,
|
|
2549
2562
|
openDetails,
|
|
2550
2563
|
replaceAll,
|
|
2551
|
-
selectIndex,
|
|
2564
|
+
selectIndex: selectIndex$1,
|
|
2552
2565
|
setExcludeValue,
|
|
2553
2566
|
setIncludeValue,
|
|
2554
2567
|
setReplaceValue,
|
|
@@ -2583,17 +2596,25 @@ const TestFrameWorkComponentSideBar = {
|
|
|
2583
2596
|
open
|
|
2584
2597
|
};
|
|
2585
2598
|
|
|
2599
|
+
const selectIndex = async index => {
|
|
2600
|
+
await invoke('Source Control.selectIndex');
|
|
2601
|
+
};
|
|
2586
2602
|
const acceptInput = async () => {
|
|
2587
2603
|
await invoke('Source Control.acceptInput');
|
|
2588
2604
|
};
|
|
2589
2605
|
const handleInput = async text => {
|
|
2590
2606
|
await invoke('Source Control.handleInput', text);
|
|
2591
2607
|
};
|
|
2608
|
+
const handleClickSourceControlButtons = async (index, name) => {
|
|
2609
|
+
await invoke('Source Control.handleClickSourceControlButtons', index, name);
|
|
2610
|
+
};
|
|
2592
2611
|
|
|
2593
2612
|
const TestFrameWorkComponentSourceControl = {
|
|
2594
2613
|
__proto__: null,
|
|
2595
2614
|
acceptInput,
|
|
2596
|
-
|
|
2615
|
+
handleClickSourceControlButtons,
|
|
2616
|
+
handleInput,
|
|
2617
|
+
selectIndex
|
|
2597
2618
|
};
|
|
2598
2619
|
|
|
2599
2620
|
const update = async () => {
|
|
@@ -2834,7 +2855,7 @@ const listen = async () => {
|
|
|
2834
2855
|
const rpc = await WebWorkerRpcClient.create({
|
|
2835
2856
|
commandMap: commandMap
|
|
2836
2857
|
});
|
|
2837
|
-
set$1(
|
|
2858
|
+
set$1(rpc);
|
|
2838
2859
|
};
|
|
2839
2860
|
|
|
2840
2861
|
const main = async () => {
|