@lvce-editor/file-search-worker 6.16.0 → 6.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.
@@ -243,8 +243,8 @@ const getModuleNotFoundError = stderr => {
243
243
  const messageIndex = lines.findIndex(isModuleNotFoundMessage);
244
244
  const message = lines[messageIndex];
245
245
  return {
246
- message,
247
- code: ERR_MODULE_NOT_FOUND
246
+ code: ERR_MODULE_NOT_FOUND,
247
+ message
248
248
  };
249
249
  };
250
250
  const isModuleNotFoundError = stderr => {
@@ -267,14 +267,14 @@ const isUnhelpfulNativeModuleError = stderr => {
267
267
  const getNativeModuleErrorMessage = stderr => {
268
268
  const message = getMessageCodeBlock(stderr);
269
269
  return {
270
- message: `Incompatible native node module: ${message}`,
271
- code: E_INCOMPATIBLE_NATIVE_MODULE
270
+ code: E_INCOMPATIBLE_NATIVE_MODULE,
271
+ message: `Incompatible native node module: ${message}`
272
272
  };
273
273
  };
274
274
  const getModuleSyntaxError = () => {
275
275
  return {
276
- message: `ES Modules are not supported in electron`,
277
- code: E_MODULES_NOT_SUPPORTED_IN_ELECTRON
276
+ code: E_MODULES_NOT_SUPPORTED_IN_ELECTRON,
277
+ message: `ES Modules are not supported in electron`
278
278
  };
279
279
  };
280
280
  const getHelpfulChildProcessError = (stdout, stderr) => {
@@ -293,8 +293,8 @@ const getHelpfulChildProcessError = (stdout, stderr) => {
293
293
  rest
294
294
  } = getDetails(lines);
295
295
  return {
296
- message: actualMessage,
297
296
  code: '',
297
+ message: actualMessage,
298
298
  stack: rest
299
299
  };
300
300
  };
@@ -304,8 +304,8 @@ class IpcError extends VError {
304
304
  if (stdout || stderr) {
305
305
  // @ts-ignore
306
306
  const {
307
- message,
308
307
  code,
308
+ message,
309
309
  stack
310
310
  } = getHelpfulChildProcessError(stdout, stderr);
311
311
  const cause = new Error(message);
@@ -366,8 +366,8 @@ const wrap$f = global => {
366
366
  };
367
367
  const waitForFirstMessage = async port => {
368
368
  const {
369
- resolve,
370
- promise
369
+ promise,
370
+ resolve
371
371
  } = Promise.withResolvers();
372
372
  port.addEventListener('message', resolve, {
373
373
  once: true
@@ -387,8 +387,8 @@ const listen$6 = async () => {
387
387
  const type = firstMessage.params[0];
388
388
  if (type === 'message-port') {
389
389
  parentIpc.send({
390
- jsonrpc: '2.0',
391
390
  id: firstMessage.id,
391
+ jsonrpc: '2.0',
392
392
  result: null
393
393
  });
394
394
  parentIpc.dispose();
@@ -445,8 +445,8 @@ const removeListener = (emitter, type, callback) => {
445
445
  };
446
446
  const getFirstEvent = (eventEmitter, eventMap) => {
447
447
  const {
448
- resolve,
449
- promise
448
+ promise,
449
+ resolve
450
450
  } = Promise.withResolvers();
451
451
  const listenerMap = Object.create(null);
452
452
  const cleanup = value => {
@@ -458,8 +458,8 @@ const getFirstEvent = (eventEmitter, eventMap) => {
458
458
  for (const [event, type] of Object.entries(eventMap)) {
459
459
  const listener = event => {
460
460
  cleanup({
461
- type,
462
- event
461
+ event,
462
+ type
463
463
  });
464
464
  };
465
465
  addListener(eventEmitter, event, listener);
@@ -469,8 +469,8 @@ const getFirstEvent = (eventEmitter, eventMap) => {
469
469
  };
470
470
  const Message$1 = 3;
471
471
  const create$5$1 = async ({
472
- messagePort,
473
- isMessagePortOpen
472
+ isMessagePortOpen,
473
+ messagePort
474
474
  }) => {
475
475
  if (!isMessagePort(messagePort)) {
476
476
  throw new IpcError('port must be of type MessagePort');
@@ -483,8 +483,8 @@ const create$5$1 = async ({
483
483
  });
484
484
  messagePort.start();
485
485
  const {
486
- type,
487
- event
486
+ event,
487
+ type
488
488
  } = await eventPromise;
489
489
  if (type !== Message$1) {
490
490
  throw new IpcError('Failed to wait for ipc message');
@@ -524,56 +524,14 @@ const IpcParentWithMessagePort$1 = {
524
524
  wrap: wrap$5
525
525
  };
526
526
 
527
- const Two = '2.0';
528
- const create$4$1 = (method, params) => {
529
- return {
530
- jsonrpc: Two,
531
- method,
532
- params
533
- };
534
- };
527
+ const Two$1 = '2.0';
535
528
  const callbacks = Object.create(null);
536
- const set$4 = (id, fn) => {
537
- callbacks[id] = fn;
538
- };
539
529
  const get$2 = id => {
540
530
  return callbacks[id];
541
531
  };
542
532
  const remove = id => {
543
533
  delete callbacks[id];
544
534
  };
545
- let id = 0;
546
- const create$3$2 = () => {
547
- return ++id;
548
- };
549
- const registerPromise = () => {
550
- const id = create$3$2();
551
- const {
552
- resolve,
553
- promise
554
- } = Promise.withResolvers();
555
- set$4(id, resolve);
556
- return {
557
- id,
558
- promise
559
- };
560
- };
561
- const create$2$1 = (method, params) => {
562
- const {
563
- id,
564
- promise
565
- } = registerPromise();
566
- const message = {
567
- jsonrpc: Two,
568
- method,
569
- params,
570
- id
571
- };
572
- return {
573
- message,
574
- promise
575
- };
576
- };
577
535
  class JsonRpcError extends Error {
578
536
  constructor(message) {
579
537
  super(message);
@@ -769,7 +727,7 @@ const getErrorProperty = (error, prettyError) => {
769
727
  };
770
728
  const create$1$1 = (id, error) => {
771
729
  return {
772
- jsonrpc: Two,
730
+ jsonrpc: Two$1,
773
731
  id,
774
732
  error
775
733
  };
@@ -780,20 +738,20 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
780
738
  const errorProperty = getErrorProperty(error, prettyError);
781
739
  return create$1$1(id, errorProperty);
782
740
  };
783
- const create$6 = (message, result) => {
741
+ const create$4 = (message, result) => {
784
742
  return {
785
- jsonrpc: Two,
743
+ jsonrpc: Two$1,
786
744
  id: message.id,
787
745
  result: result ?? null
788
746
  };
789
747
  };
790
748
  const getSuccessResponse = (message, result) => {
791
749
  const resultProperty = result ?? null;
792
- return create$6(message, resultProperty);
750
+ return create$4(message, resultProperty);
793
751
  };
794
752
  const getErrorResponseSimple = (id, error) => {
795
753
  return {
796
- jsonrpc: Two,
754
+ jsonrpc: Two$1,
797
755
  id,
798
756
  error: {
799
757
  code: Custom$2,
@@ -880,29 +838,6 @@ const handleJsonRpcMessage = async (...args) => {
880
838
  }
881
839
  throw new JsonRpcError('unexpected message');
882
840
  };
883
- const invokeHelper = async (ipc, method, params, useSendAndTransfer) => {
884
- const {
885
- message,
886
- promise
887
- } = create$2$1(method, params);
888
- if (useSendAndTransfer && ipc.sendAndTransfer) {
889
- ipc.sendAndTransfer(message);
890
- } else {
891
- ipc.send(message);
892
- }
893
- const responseMessage = await promise;
894
- return unwrapJsonRpcResult(responseMessage);
895
- };
896
- const send = (transport, method, ...params) => {
897
- const message = create$4$1(method, params);
898
- transport.send(message);
899
- };
900
- const invoke$3 = (ipc, method, ...params) => {
901
- return invokeHelper(ipc, method, params, false);
902
- };
903
- const invokeAndTransfer$1 = (ipc, method, ...params) => {
904
- return invokeHelper(ipc, method, params, true);
905
- };
906
841
 
907
842
  class CommandNotFoundError extends Error {
908
843
  constructor(command) {
@@ -925,24 +860,87 @@ const execute = (command, ...args) => {
925
860
  return fn(...args);
926
861
  };
927
862
 
863
+ const Two = '2.0';
864
+ const create$p = (method, params) => {
865
+ return {
866
+ jsonrpc: Two,
867
+ method,
868
+ params
869
+ };
870
+ };
871
+ const create$o = (id, method, params) => {
872
+ const message = {
873
+ id,
874
+ jsonrpc: Two,
875
+ method,
876
+ params
877
+ };
878
+ return message;
879
+ };
880
+ let id = 0;
881
+ const create$n = () => {
882
+ return ++id;
883
+ };
884
+
885
+ /* eslint-disable n/no-unsupported-features/es-syntax */
886
+
887
+ const registerPromise = map => {
888
+ const id = create$n();
889
+ const {
890
+ promise,
891
+ resolve
892
+ } = Promise.withResolvers();
893
+ map[id] = resolve;
894
+ return {
895
+ id,
896
+ promise
897
+ };
898
+ };
899
+
900
+ // @ts-ignore
901
+ const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer) => {
902
+ const {
903
+ id,
904
+ promise
905
+ } = registerPromise(callbacks);
906
+ const message = create$o(id, method, params);
907
+ if (useSendAndTransfer && ipc.sendAndTransfer) {
908
+ ipc.sendAndTransfer(message);
909
+ } else {
910
+ ipc.send(message);
911
+ }
912
+ const responseMessage = await promise;
913
+ return unwrapJsonRpcResult(responseMessage);
914
+ };
928
915
  const createRpc = ipc => {
916
+ const callbacks = Object.create(null);
917
+ ipc._resolve = (id, response) => {
918
+ const fn = callbacks[id];
919
+ if (!fn) {
920
+ console.warn(`callback ${id} may already be disposed`);
921
+ return;
922
+ }
923
+ fn(response);
924
+ delete callbacks[id];
925
+ };
929
926
  const rpc = {
927
+ async dispose() {
928
+ await ipc?.dispose();
929
+ },
930
+ invoke(method, ...params) {
931
+ return invokeHelper(callbacks, ipc, method, params, false);
932
+ },
933
+ invokeAndTransfer(method, ...params) {
934
+ return invokeHelper(callbacks, ipc, method, params, true);
935
+ },
930
936
  // @ts-ignore
931
937
  ipc,
932
938
  /**
933
939
  * @deprecated
934
940
  */
935
941
  send(method, ...params) {
936
- send(ipc, method, ...params);
937
- },
938
- invoke(method, ...params) {
939
- return invoke$3(ipc, method, ...params);
940
- },
941
- invokeAndTransfer(method, ...params) {
942
- return invokeAndTransfer$1(ipc, method, ...params);
943
- },
944
- async dispose() {
945
- await ipc?.dispose();
942
+ const message = create$p(method, params);
943
+ ipc.send(message);
946
944
  }
947
945
  };
948
946
  return rpc;
@@ -959,7 +957,7 @@ const logError = () => {
959
957
  const handleMessage = event => {
960
958
  const actualRequiresSocket = event?.target?.requiresSocket || requiresSocket;
961
959
  const actualExecute = event?.target?.execute || execute;
962
- return handleJsonRpcMessage(event.target, event.data, actualExecute, resolve, preparePrettyError, logError, actualRequiresSocket);
960
+ return handleJsonRpcMessage(event.target, event.data, actualExecute, event.target._resolve, preparePrettyError, logError, actualRequiresSocket);
963
961
  };
964
962
  const handleIpc = ipc => {
965
963
  if ('addEventListener' in ipc) {
@@ -977,15 +975,16 @@ const listen$1 = async (module, options) => {
977
975
  const ipc = module.wrap(rawIpc);
978
976
  return ipc;
979
977
  };
980
- const create$5 = async ({
978
+ const create$7 = async ({
981
979
  commandMap,
980
+ isMessagePortOpen = true,
982
981
  messagePort
983
982
  }) => {
984
983
  // TODO create a commandMap per rpc instance
985
984
  register$1(commandMap);
986
985
  const rawIpc = await IpcParentWithMessagePort$1.create({
987
- messagePort,
988
- isMessagePortOpen: true
986
+ isMessagePortOpen,
987
+ messagePort
989
988
  });
990
989
  const ipc = IpcParentWithMessagePort$1.wrap(rawIpc);
991
990
  handleIpc(ipc);
@@ -993,8 +992,13 @@ const create$5 = async ({
993
992
  messagePort.start();
994
993
  return rpc;
995
994
  };
996
- const create$3$1 = async ({
995
+ const PlainMessagePortRpc = {
996
+ __proto__: null,
997
+ create: create$7
998
+ };
999
+ const create$5 = async ({
997
1000
  commandMap,
1001
+ isMessagePortOpen,
998
1002
  send
999
1003
  }) => {
1000
1004
  const {
@@ -1002,16 +1006,17 @@ const create$3$1 = async ({
1002
1006
  port2
1003
1007
  } = new MessageChannel();
1004
1008
  await send(port1);
1005
- return create$5({
1009
+ return create$7({
1006
1010
  commandMap,
1011
+ isMessagePortOpen,
1007
1012
  messagePort: port2
1008
1013
  });
1009
1014
  };
1010
1015
  const TransferMessagePortRpcParent = {
1011
1016
  __proto__: null,
1012
- create: create$3$1
1017
+ create: create$5
1013
1018
  };
1014
- const create$4 = async ({
1019
+ const create$2$1 = async ({
1015
1020
  commandMap
1016
1021
  }) => {
1017
1022
  // TODO create a commandMap per rpc instance
@@ -1023,15 +1028,9 @@ const create$4 = async ({
1023
1028
  };
1024
1029
  const WebWorkerRpcClient = {
1025
1030
  __proto__: null,
1026
- create: create$4
1031
+ create: create$2$1
1027
1032
  };
1028
1033
 
1029
- const Div = 4;
1030
- const Input = 6;
1031
- const Span = 8;
1032
- const Text = 12;
1033
- const Img = 17;
1034
-
1035
1034
  const EditorWorker = 99;
1036
1035
  const RendererWorker = 1;
1037
1036
 
@@ -1047,6 +1046,10 @@ const get$1 = id => {
1047
1046
 
1048
1047
  const create$3 = rpcId => {
1049
1048
  return {
1049
+ async dispose() {
1050
+ const rpc = get$1(rpcId);
1051
+ await rpc.dispose();
1052
+ },
1050
1053
  // @ts-ignore
1051
1054
  invoke(method, ...params) {
1052
1055
  const rpc = get$1(rpcId);
@@ -1061,17 +1064,14 @@ const create$3 = rpcId => {
1061
1064
  },
1062
1065
  set(rpc) {
1063
1066
  set$3(rpcId, rpc);
1064
- },
1065
- async dispose() {
1066
- const rpc = get$1(rpcId);
1067
- await rpc.dispose();
1068
1067
  }
1069
1068
  };
1070
1069
  };
1071
1070
 
1072
1071
  const {
1073
1072
  invoke: invoke$2,
1074
- set: set$2} = create$3(EditorWorker);
1073
+ set: set$2
1074
+ } = create$3(EditorWorker);
1075
1075
  const getLines = async editorUid => {
1076
1076
  const lines = await invoke$2('Editor.getLines2', editorUid);
1077
1077
  return lines;
@@ -1080,7 +1080,8 @@ const getLines = async editorUid => {
1080
1080
  const {
1081
1081
  invoke: invoke$1,
1082
1082
  invokeAndTransfer,
1083
- set: set$1} = create$3(RendererWorker);
1083
+ set: set$1
1084
+ } = create$3(RendererWorker);
1084
1085
  const sendMessagePortToEditorWorker = async (port, rpcId) => {
1085
1086
  const command = 'HandleMessagePort.handleMessagePort';
1086
1087
  // @ts-ignore
@@ -2059,12 +2060,10 @@ const toProtoVisibleItem$3 = name => {
2059
2060
  };
2060
2061
  return pick;
2061
2062
  };
2062
- const getPicks$c = async (searchValue, args) => {
2063
- if (!args || !Array.isArray(args)) {
2064
- args = ['', 0];
2065
- }
2066
- const platform = args.at(-1);
2067
- const assetDir = args.at(-2);
2063
+ const getPicks$c = async (searchValue, args, {
2064
+ assetDir = '',
2065
+ platform = 0
2066
+ } = {}) => {
2068
2067
  const colorThemeNames = await getColorThemeNames(assetDir, platform);
2069
2068
  const picks = colorThemeNames.map(toProtoVisibleItem$3);
2070
2069
  return picks;
@@ -2168,12 +2167,10 @@ const toProtoVisibleItem$2 = item => {
2168
2167
  // @ts-ignore
2169
2168
  return pick;
2170
2169
  };
2171
- const getPicks$b = async (value, args) => {
2172
- if (!args || !Array.isArray(args)) {
2173
- args = ['', 0];
2174
- }
2175
- const platform = args.at(-1);
2176
- const assetDir = args.at(-2);
2170
+ const getPicks$b = async (value, args, {
2171
+ assetDir = '',
2172
+ platform = 0
2173
+ } = {}) => {
2177
2174
  // TODO get picks in parallel
2178
2175
  const builtinPicks = await getBuiltinPicks();
2179
2176
  const extensionPicks = await getExtensionPicks(assetDir, platform);
@@ -2426,14 +2423,22 @@ const getPicksGoToLineBase = async () => {
2426
2423
  }];
2427
2424
  };
2428
2425
 
2426
+ const parseGotoline = value => {
2427
+ const lineString = value.slice(GoToLine$1.length);
2428
+ const wantedLine = Number.parseInt(lineString, 10);
2429
+ if (Number.isNaN(wantedLine)) {
2430
+ return -1;
2431
+ }
2432
+ return wantedLine;
2433
+ };
2434
+
2429
2435
  const getPicks$8 = async value => {
2430
2436
  if (value === GoToLine$1) {
2431
2437
  return getPicksGoToLineBase();
2432
2438
  }
2433
2439
  if (value.startsWith(GoToLine$1)) {
2434
- const lineString = value.slice(GoToLine$1.length);
2435
- const wantedLine = Number.parseInt(lineString, 10);
2436
- if (Number.isNaN(wantedLine)) {
2440
+ const wantedLine = parseGotoline(value);
2441
+ if (wantedLine === -1) {
2437
2442
  return getPicksGoToLineBase();
2438
2443
  }
2439
2444
  const rowIndex = wantedLine - 1;
@@ -2736,9 +2741,15 @@ const getSelect = id => {
2736
2741
  return fn;
2737
2742
  };
2738
2743
 
2739
- const getPicks = (id, searchValue, args) => {
2744
+ const getPicks = (id, searchValue, args, {
2745
+ assetDir,
2746
+ platform
2747
+ }) => {
2740
2748
  const fn = getPicks$1(id);
2741
- return fn(searchValue, args);
2749
+ return fn(searchValue, args, {
2750
+ assetDir,
2751
+ platform
2752
+ });
2742
2753
  };
2743
2754
 
2744
2755
  const getQuickPickSubProviderId = (id, prefix) => {
@@ -2769,11 +2780,13 @@ const getQuickPickSubProviderId = (id, prefix) => {
2769
2780
  const setValue = async (state, newValue) => {
2770
2781
  const {
2771
2782
  args,
2783
+ assetDir,
2772
2784
  fileIconCache,
2773
2785
  height,
2774
2786
  itemHeight,
2775
2787
  maxLineY,
2776
2788
  minLineY,
2789
+ platform,
2777
2790
  providerId,
2778
2791
  value
2779
2792
  } = state;
@@ -2782,7 +2795,10 @@ const setValue = async (state, newValue) => {
2782
2795
  }
2783
2796
  const prefix = getQuickPickPrefix(newValue);
2784
2797
  const subId = getQuickPickSubProviderId(providerId, prefix);
2785
- const newPicks = await getPicks(subId, newValue, args);
2798
+ const newPicks = await getPicks(subId, newValue, args, {
2799
+ assetDir,
2800
+ platform
2801
+ });
2786
2802
  const filterValue = getFilterValue(providerId, subId, newValue);
2787
2803
  const items = filterQuickPickItems(newPicks, filterValue);
2788
2804
  const focusedIndex = items.length === 0 ? -1 : 0;
@@ -2920,6 +2936,16 @@ const handleFocus = async state => {
2920
2936
  return state;
2921
2937
  };
2922
2938
 
2939
+ const commandMapRef = {};
2940
+
2941
+ const handleMessagePort = async port => {
2942
+ await PlainMessagePortRpc.create({
2943
+ commandMap: commandMapRef,
2944
+ isMessagePortOpen: true,
2945
+ messagePort: port
2946
+ });
2947
+ };
2948
+
2923
2949
  const initialize = async () => {
2924
2950
  // TODO
2925
2951
  const rpc = await TransferMessagePortRpcParent.create({
@@ -2973,7 +2999,6 @@ const getQuickPickProviderId = prefix => {
2973
2999
  };
2974
3000
 
2975
3001
  const loadContent = async state => {
2976
- // @ts-ignore
2977
3002
  const {
2978
3003
  args,
2979
3004
  assetDir,
@@ -2987,7 +3012,10 @@ const loadContent = async state => {
2987
3012
  const value = getDefaultValue(id);
2988
3013
  const prefix = getQuickPickPrefix(value);
2989
3014
  const subId = getQuickPickSubProviderId(id, prefix);
2990
- const newPicks = await getPicks(subId, value, [...args, assetDir, platform]);
3015
+ const newPicks = await getPicks(subId, value, args, {
3016
+ assetDir,
3017
+ platform
3018
+ });
2991
3019
  array(newPicks);
2992
3020
  const filterValue = getFilterValue(id, subId, value);
2993
3021
  const items = filterQuickPickItems(newPicks, filterValue);
@@ -3152,6 +3180,12 @@ const renderHeight = newState => {
3152
3180
  return ['Viewlet.send', newState.uid, /* method */SetItemsHeight, /* height */newState.height];
3153
3181
  };
3154
3182
 
3183
+ const Div = 4;
3184
+ const Input = 6;
3185
+ const Span = 8;
3186
+ const Text = 12;
3187
+ const Img = 17;
3188
+
3155
3189
  const mergeClassNames = (...classNames) => {
3156
3190
  return classNames.filter(Boolean).join(' ');
3157
3191
  };
@@ -3494,6 +3528,17 @@ const selectItem = async (state, label) => {
3494
3528
  return selectIndex(state, index);
3495
3529
  };
3496
3530
 
3531
+ const showQuickInput = async ({
3532
+ ignoreFocusOut,
3533
+ initialValue
3534
+ }) => {
3535
+ // TODO ask renderer worker to create quickpick instance, with given options
3536
+ return {
3537
+ canceled: false,
3538
+ inputValue: ''
3539
+ };
3540
+ };
3541
+
3497
3542
  const commandMap = {
3498
3543
  'QuickPick.addMenuEntries': add,
3499
3544
  'QuickPick.close': close,
@@ -3512,6 +3557,7 @@ const commandMap = {
3512
3557
  'QuickPick.handleClickAt': wrapCommand(handleClickAt),
3513
3558
  'QuickPick.handleFocus': wrapCommand(handleFocus),
3514
3559
  'QuickPick.handleInput': wrapCommand(handleInput),
3560
+ 'QuickPick.handleMessagePort': handleMessagePort,
3515
3561
  'QuickPick.handleWheel': wrapCommand(handleWheel),
3516
3562
  'QuickPick.initialize': initialize,
3517
3563
  'QuickPick.loadContent': wrapCommand(loadContent),
@@ -3521,7 +3567,8 @@ const commandMap = {
3521
3567
  'QuickPick.selectIndex': wrapCommand(selectIndex),
3522
3568
  'QuickPick.selectItem': wrapCommand(selectItem),
3523
3569
  'QuickPick.setDeltaY': wrapCommand(setDeltaY),
3524
- 'QuickPick.setValue': wrapCommand(setValue)
3570
+ 'QuickPick.setValue': wrapCommand(setValue),
3571
+ 'QuickPick.showQuickInput': showQuickInput
3525
3572
  };
3526
3573
 
3527
3574
  const Memfs = 'memfs';
@@ -3577,6 +3624,7 @@ const searchModules = {
3577
3624
  };
3578
3625
 
3579
3626
  const listen = async () => {
3627
+ Object.assign(commandMapRef, commandMap);
3580
3628
  registerCommands(commandMap);
3581
3629
  register(searchModules);
3582
3630
  const rpc = await WebWorkerRpcClient.create({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-search-worker",
3
- "version": "6.16.0",
3
+ "version": "6.18.0",
4
4
  "keywords": [
5
5
  "text-search"
6
6
  ],
@@ -11,5 +11,8 @@
11
11
  "license": "MIT",
12
12
  "author": "Lvce Editor",
13
13
  "type": "module",
14
- "main": "dist/fileSearchWorkerMain.js"
14
+ "main": "dist/fileSearchWorkerMain.js",
15
+ "dependencies": {
16
+ "@lvce-editor/constants": "^2.8.0"
17
+ }
15
18
  }