@lvce-editor/file-search-worker 6.17.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.
- package/dist/fileSearchWorkerMain.js +153 -122
- package/package.json +5 -2
|
@@ -243,8 +243,8 @@ const getModuleNotFoundError = stderr => {
|
|
|
243
243
|
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
244
244
|
const message = lines[messageIndex];
|
|
245
245
|
return {
|
|
246
|
-
|
|
247
|
-
|
|
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
|
-
|
|
271
|
-
|
|
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
|
-
|
|
277
|
-
|
|
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
|
-
|
|
370
|
-
|
|
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
|
-
|
|
449
|
-
|
|
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
|
-
|
|
462
|
-
|
|
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
|
-
|
|
473
|
-
|
|
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
|
-
|
|
487
|
-
|
|
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$
|
|
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$
|
|
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
|
-
|
|
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,
|
|
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$
|
|
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
|
-
|
|
988
|
-
|
|
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
|
|
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$
|
|
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$
|
|
1017
|
+
create: create$5
|
|
1013
1018
|
};
|
|
1014
|
-
const create$
|
|
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$
|
|
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
|
|
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
|
|
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
|
|
@@ -2935,6 +2936,16 @@ const handleFocus = async state => {
|
|
|
2935
2936
|
return state;
|
|
2936
2937
|
};
|
|
2937
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
|
+
|
|
2938
2949
|
const initialize = async () => {
|
|
2939
2950
|
// TODO
|
|
2940
2951
|
const rpc = await TransferMessagePortRpcParent.create({
|
|
@@ -3169,6 +3180,12 @@ const renderHeight = newState => {
|
|
|
3169
3180
|
return ['Viewlet.send', newState.uid, /* method */SetItemsHeight, /* height */newState.height];
|
|
3170
3181
|
};
|
|
3171
3182
|
|
|
3183
|
+
const Div = 4;
|
|
3184
|
+
const Input = 6;
|
|
3185
|
+
const Span = 8;
|
|
3186
|
+
const Text = 12;
|
|
3187
|
+
const Img = 17;
|
|
3188
|
+
|
|
3172
3189
|
const mergeClassNames = (...classNames) => {
|
|
3173
3190
|
return classNames.filter(Boolean).join(' ');
|
|
3174
3191
|
};
|
|
@@ -3511,6 +3528,17 @@ const selectItem = async (state, label) => {
|
|
|
3511
3528
|
return selectIndex(state, index);
|
|
3512
3529
|
};
|
|
3513
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
|
+
|
|
3514
3542
|
const commandMap = {
|
|
3515
3543
|
'QuickPick.addMenuEntries': add,
|
|
3516
3544
|
'QuickPick.close': close,
|
|
@@ -3529,6 +3557,7 @@ const commandMap = {
|
|
|
3529
3557
|
'QuickPick.handleClickAt': wrapCommand(handleClickAt),
|
|
3530
3558
|
'QuickPick.handleFocus': wrapCommand(handleFocus),
|
|
3531
3559
|
'QuickPick.handleInput': wrapCommand(handleInput),
|
|
3560
|
+
'QuickPick.handleMessagePort': handleMessagePort,
|
|
3532
3561
|
'QuickPick.handleWheel': wrapCommand(handleWheel),
|
|
3533
3562
|
'QuickPick.initialize': initialize,
|
|
3534
3563
|
'QuickPick.loadContent': wrapCommand(loadContent),
|
|
@@ -3538,7 +3567,8 @@ const commandMap = {
|
|
|
3538
3567
|
'QuickPick.selectIndex': wrapCommand(selectIndex),
|
|
3539
3568
|
'QuickPick.selectItem': wrapCommand(selectItem),
|
|
3540
3569
|
'QuickPick.setDeltaY': wrapCommand(setDeltaY),
|
|
3541
|
-
'QuickPick.setValue': wrapCommand(setValue)
|
|
3570
|
+
'QuickPick.setValue': wrapCommand(setValue),
|
|
3571
|
+
'QuickPick.showQuickInput': showQuickInput
|
|
3542
3572
|
};
|
|
3543
3573
|
|
|
3544
3574
|
const Memfs = 'memfs';
|
|
@@ -3594,6 +3624,7 @@ const searchModules = {
|
|
|
3594
3624
|
};
|
|
3595
3625
|
|
|
3596
3626
|
const listen = async () => {
|
|
3627
|
+
Object.assign(commandMapRef, commandMap);
|
|
3597
3628
|
registerCommands(commandMap);
|
|
3598
3629
|
register(searchModules);
|
|
3599
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.
|
|
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
|
}
|