@lvce-editor/test-worker 4.16.0 → 4.18.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 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 };
@@ -524,7 +524,7 @@ const create$4 = (method, params) => {
524
524
  };
525
525
  };
526
526
  const callbacks = Object.create(null);
527
- const set$2 = (id, fn) => {
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$2(id, resolve);
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$6 = async ({
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$6
949
+ create: create$8
947
950
  };
948
951
  const create$1 = async ({
949
952
  commandMap
@@ -964,29 +967,45 @@ 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$1 = (id, rpc) => {
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 invokeAndTransfer = (method, ...params) => {
982
- const rpc = get$1(RendererWorker);
983
+ const invokeAndTransfer$2 = (method, ...params) => {
984
+ const rpc = get$1(RendererWorker$1);
985
+ // @ts-ignore
983
986
  return rpc.invokeAndTransfer(method, ...params);
984
987
  };
988
+ const set$2 = rpc => {
989
+ set$3(RendererWorker$1, rpc);
990
+ };
991
+ const RendererWorker = {
992
+ __proto__: null,
993
+ invoke: invoke$2,
994
+ invokeAndTransfer: invokeAndTransfer$2,
995
+ set: set$2
996
+ };
997
+
998
+ const {
999
+ set: set$1
1000
+ } = RendererWorker;
1001
+ const invoke = RendererWorker.invoke;
1002
+ const invokeAndTransfer = RendererWorker.invokeAndTransfer;
985
1003
 
986
1004
  const Rpc = {
987
1005
  __proto__: null,
988
1006
  invoke,
989
- invokeAndTransfer
1007
+ invokeAndTransfer,
1008
+ set: set$1
990
1009
  };
991
1010
 
992
1011
  const printError = error => {
@@ -1870,7 +1889,7 @@ const TestFrameWorkComponentEditor = {
1870
1889
  type
1871
1890
  };
1872
1891
 
1873
- const selectIndex$3 = async index => {
1892
+ const selectIndex$4 = async index => {
1874
1893
  await invoke('EditorCompletion.selectIndex', index);
1875
1894
  };
1876
1895
  const selectCurrentIndex$1 = async () => {
@@ -1880,7 +1899,7 @@ const selectCurrentIndex$1 = async () => {
1880
1899
  const TestFrameWorkComponentEditorCompletion = {
1881
1900
  __proto__: null,
1882
1901
  selectCurrentIndex: selectCurrentIndex$1,
1883
- selectIndex: selectIndex$3
1902
+ selectIndex: selectIndex$4
1884
1903
  };
1885
1904
 
1886
1905
  const openContextMenu = async index => {
@@ -2123,7 +2142,7 @@ const TestFrameWorkComponentIconTheme = {
2123
2142
  setIconTheme
2124
2143
  };
2125
2144
 
2126
- const selectIndex$2 = async index => {
2145
+ const selectIndex$3 = async index => {
2127
2146
  return invoke('IframeInspector.selectIndex', index);
2128
2147
  };
2129
2148
  const focusNext$5 = async () => {
@@ -2145,7 +2164,7 @@ const TestFrameWorkComponentIframeInspector = {
2145
2164
  focusLast: focusLast$4,
2146
2165
  focusNext: focusNext$5,
2147
2166
  focusPrevious: focusPrevious$5,
2148
- selectIndex: selectIndex$2
2167
+ selectIndex: selectIndex$3
2149
2168
  };
2150
2169
 
2151
2170
  const open$3 = async () => {
@@ -2433,7 +2452,7 @@ const focusPrevious$2 = async () => {
2433
2452
  const selectItem = async label => {
2434
2453
  await invoke('QuickPick.selectItem', label);
2435
2454
  };
2436
- const selectIndex$1 = async index => {
2455
+ const selectIndex$2 = async index => {
2437
2456
  await invoke('QuickPick.selectIndex', index);
2438
2457
  };
2439
2458
  const selectCurrentIndex = async () => {
@@ -2457,7 +2476,7 @@ const TestFrameWorkComponentQuickPick = {
2457
2476
  handleInput: handleInput$1,
2458
2477
  open: open$1,
2459
2478
  selectCurrentIndex,
2460
- selectIndex: selectIndex$1,
2479
+ selectIndex: selectIndex$2,
2461
2480
  selectItem,
2462
2481
  setValue: setValue$1
2463
2482
  };
@@ -2497,7 +2516,7 @@ const focusFirst$1 = async () => {
2497
2516
  const focusIndex$1 = async index => {
2498
2517
  await invoke('Search.focusIndex', index);
2499
2518
  };
2500
- const selectIndex = async index => {
2519
+ const selectIndex$1 = async index => {
2501
2520
  await invoke('Search.selectIndex', index);
2502
2521
  };
2503
2522
  const focusNext$1 = async () => {
@@ -2548,7 +2567,7 @@ const TestFrameWorkComponentSearch = {
2548
2567
  handleWheel,
2549
2568
  openDetails,
2550
2569
  replaceAll,
2551
- selectIndex,
2570
+ selectIndex: selectIndex$1,
2552
2571
  setExcludeValue,
2553
2572
  setIncludeValue,
2554
2573
  setReplaceValue,
@@ -2583,17 +2602,25 @@ const TestFrameWorkComponentSideBar = {
2583
2602
  open
2584
2603
  };
2585
2604
 
2605
+ const selectIndex = async index => {
2606
+ await invoke('Source Control.selectIndex');
2607
+ };
2586
2608
  const acceptInput = async () => {
2587
2609
  await invoke('Source Control.acceptInput');
2588
2610
  };
2589
2611
  const handleInput = async text => {
2590
2612
  await invoke('Source Control.handleInput', text);
2591
2613
  };
2614
+ const handleClickSourceControlButtons = async (index, name) => {
2615
+ await invoke('Source Control.handleClickSourceControlButtons', index, name);
2616
+ };
2592
2617
 
2593
2618
  const TestFrameWorkComponentSourceControl = {
2594
2619
  __proto__: null,
2595
2620
  acceptInput,
2596
- handleInput
2621
+ handleClickSourceControlButtons,
2622
+ handleInput,
2623
+ selectIndex
2597
2624
  };
2598
2625
 
2599
2626
  const update = async () => {
@@ -2834,7 +2861,7 @@ const listen = async () => {
2834
2861
  const rpc = await WebWorkerRpcClient.create({
2835
2862
  commandMap: commandMap
2836
2863
  });
2837
- set$1(RendererWorker, rpc);
2864
+ set$1(rpc);
2838
2865
  };
2839
2866
 
2840
2867
  const main = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "4.16.0",
3
+ "version": "4.18.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",