@lvce-editor/explorer-view 5.16.0 → 5.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/explorerViewWorkerMain.js +29 -30
- package/package.json +1 -1
|
@@ -861,14 +861,14 @@ const execute = (command, ...args) => {
|
|
|
861
861
|
};
|
|
862
862
|
|
|
863
863
|
const Two = '2.0';
|
|
864
|
-
const create$
|
|
864
|
+
const create$s = (method, params) => {
|
|
865
865
|
return {
|
|
866
866
|
jsonrpc: Two,
|
|
867
867
|
method,
|
|
868
868
|
params
|
|
869
869
|
};
|
|
870
870
|
};
|
|
871
|
-
const create$
|
|
871
|
+
const create$r = (id, method, params) => {
|
|
872
872
|
const message = {
|
|
873
873
|
id,
|
|
874
874
|
jsonrpc: Two,
|
|
@@ -878,14 +878,14 @@ const create$n = (id, method, params) => {
|
|
|
878
878
|
return message;
|
|
879
879
|
};
|
|
880
880
|
let id = 0;
|
|
881
|
-
const create$
|
|
881
|
+
const create$q = () => {
|
|
882
882
|
return ++id;
|
|
883
883
|
};
|
|
884
884
|
|
|
885
885
|
/* eslint-disable n/no-unsupported-features/es-syntax */
|
|
886
886
|
|
|
887
887
|
const registerPromise = map => {
|
|
888
|
-
const id = create$
|
|
888
|
+
const id = create$q();
|
|
889
889
|
const {
|
|
890
890
|
promise,
|
|
891
891
|
resolve
|
|
@@ -903,7 +903,7 @@ const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer)
|
|
|
903
903
|
id,
|
|
904
904
|
promise
|
|
905
905
|
} = registerPromise(callbacks);
|
|
906
|
-
const message = create$
|
|
906
|
+
const message = create$r(id, method, params);
|
|
907
907
|
if (useSendAndTransfer && ipc.sendAndTransfer) {
|
|
908
908
|
ipc.sendAndTransfer(message);
|
|
909
909
|
} else {
|
|
@@ -939,7 +939,7 @@ const createRpc = ipc => {
|
|
|
939
939
|
* @deprecated
|
|
940
940
|
*/
|
|
941
941
|
send(method, ...params) {
|
|
942
|
-
const message = create$
|
|
942
|
+
const message = create$s(method, params);
|
|
943
943
|
ipc.send(message);
|
|
944
944
|
}
|
|
945
945
|
};
|
|
@@ -975,7 +975,7 @@ const listen$1 = async (module, options) => {
|
|
|
975
975
|
const ipc = module.wrap(rawIpc);
|
|
976
976
|
return ipc;
|
|
977
977
|
};
|
|
978
|
-
const create$
|
|
978
|
+
const create$4 = async ({
|
|
979
979
|
commandMap,
|
|
980
980
|
isMessagePortOpen = true,
|
|
981
981
|
messagePort
|
|
@@ -992,7 +992,7 @@ const create$6 = async ({
|
|
|
992
992
|
messagePort.start();
|
|
993
993
|
return rpc;
|
|
994
994
|
};
|
|
995
|
-
const create$
|
|
995
|
+
const create$2$1 = async ({
|
|
996
996
|
commandMap,
|
|
997
997
|
isMessagePortOpen,
|
|
998
998
|
send
|
|
@@ -1002,7 +1002,7 @@ const create$4 = async ({
|
|
|
1002
1002
|
port2
|
|
1003
1003
|
} = new MessageChannel();
|
|
1004
1004
|
await send(port1);
|
|
1005
|
-
return create$
|
|
1005
|
+
return create$4({
|
|
1006
1006
|
commandMap,
|
|
1007
1007
|
isMessagePortOpen,
|
|
1008
1008
|
messagePort: port2
|
|
@@ -1010,7 +1010,7 @@ const create$4 = async ({
|
|
|
1010
1010
|
};
|
|
1011
1011
|
const TransferMessagePortRpcParent = {
|
|
1012
1012
|
__proto__: null,
|
|
1013
|
-
create: create$
|
|
1013
|
+
create: create$2$1
|
|
1014
1014
|
};
|
|
1015
1015
|
const create$1$1 = async ({
|
|
1016
1016
|
commandMap
|
|
@@ -1026,6 +1026,25 @@ const WebWorkerRpcClient = {
|
|
|
1026
1026
|
__proto__: null,
|
|
1027
1027
|
create: create$1$1
|
|
1028
1028
|
};
|
|
1029
|
+
const createMockRpc = ({
|
|
1030
|
+
commandMap
|
|
1031
|
+
}) => {
|
|
1032
|
+
const invocations = [];
|
|
1033
|
+
const invoke = (method, ...params) => {
|
|
1034
|
+
invocations.push([method, ...params]);
|
|
1035
|
+
const command = commandMap[method];
|
|
1036
|
+
if (!command) {
|
|
1037
|
+
throw new Error(`command ${method} not found`);
|
|
1038
|
+
}
|
|
1039
|
+
return command(...params);
|
|
1040
|
+
};
|
|
1041
|
+
const mockRpc = {
|
|
1042
|
+
invocations,
|
|
1043
|
+
invoke,
|
|
1044
|
+
invokeAndTransfer: invoke
|
|
1045
|
+
};
|
|
1046
|
+
return mockRpc;
|
|
1047
|
+
};
|
|
1029
1048
|
|
|
1030
1049
|
const Button$3 = 'event.button';
|
|
1031
1050
|
const ClientX = 'event.clientX';
|
|
@@ -1088,26 +1107,6 @@ const create$2 = rpcId => {
|
|
|
1088
1107
|
};
|
|
1089
1108
|
};
|
|
1090
1109
|
|
|
1091
|
-
const createMockRpc = ({
|
|
1092
|
-
commandMap
|
|
1093
|
-
}) => {
|
|
1094
|
-
const invocations = [];
|
|
1095
|
-
const invoke = (method, ...params) => {
|
|
1096
|
-
invocations.push([method, ...params]);
|
|
1097
|
-
const command = commandMap[method];
|
|
1098
|
-
if (!command) {
|
|
1099
|
-
throw new Error(`command ${method} not found`);
|
|
1100
|
-
}
|
|
1101
|
-
return command(...params);
|
|
1102
|
-
};
|
|
1103
|
-
const mockRpc = {
|
|
1104
|
-
invoke,
|
|
1105
|
-
invokeAndTransfer: invoke,
|
|
1106
|
-
invocations
|
|
1107
|
-
};
|
|
1108
|
-
return mockRpc;
|
|
1109
|
-
};
|
|
1110
|
-
|
|
1111
1110
|
const {
|
|
1112
1111
|
dispose,
|
|
1113
1112
|
invoke: invoke$4,
|