@lvce-editor/editor-worker 16.3.0 → 16.4.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/editorWorkerMain.js +22 -22
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -474,7 +474,7 @@ const getFirstEvent = (eventEmitter, eventMap) => {
|
|
|
474
474
|
return promise;
|
|
475
475
|
};
|
|
476
476
|
const Message$1 = 3;
|
|
477
|
-
const create$5$
|
|
477
|
+
const create$5$2 = async ({
|
|
478
478
|
isMessagePortOpen,
|
|
479
479
|
messagePort
|
|
480
480
|
}) => {
|
|
@@ -525,7 +525,7 @@ const wrap$5 = messagePort => {
|
|
|
525
525
|
};
|
|
526
526
|
const IpcParentWithMessagePort$1 = {
|
|
527
527
|
__proto__: null,
|
|
528
|
-
create: create$5$
|
|
528
|
+
create: create$5$2,
|
|
529
529
|
signal: signal$1,
|
|
530
530
|
wrap: wrap$5
|
|
531
531
|
};
|
|
@@ -731,7 +731,7 @@ const getErrorProperty = (error, prettyError) => {
|
|
|
731
731
|
}
|
|
732
732
|
};
|
|
733
733
|
};
|
|
734
|
-
const create$1$
|
|
734
|
+
const create$1$1 = (id, error) => {
|
|
735
735
|
return {
|
|
736
736
|
jsonrpc: Two$1,
|
|
737
737
|
id,
|
|
@@ -742,7 +742,7 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
|
742
742
|
const prettyError = preparePrettyError(error);
|
|
743
743
|
logError(error, prettyError);
|
|
744
744
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
745
|
-
return create$1$
|
|
745
|
+
return create$1$1(id, errorProperty);
|
|
746
746
|
};
|
|
747
747
|
const create$a = (message, result) => {
|
|
748
748
|
return {
|
|
@@ -867,14 +867,14 @@ const execute$1 = (command, ...args) => {
|
|
|
867
867
|
};
|
|
868
868
|
|
|
869
869
|
const Two = '2.0';
|
|
870
|
-
const create$
|
|
870
|
+
const create$t = (method, params) => {
|
|
871
871
|
return {
|
|
872
872
|
jsonrpc: Two,
|
|
873
873
|
method,
|
|
874
874
|
params
|
|
875
875
|
};
|
|
876
876
|
};
|
|
877
|
-
const create$
|
|
877
|
+
const create$s = (id, method, params) => {
|
|
878
878
|
const message = {
|
|
879
879
|
id,
|
|
880
880
|
jsonrpc: Two,
|
|
@@ -884,14 +884,14 @@ const create$r = (id, method, params) => {
|
|
|
884
884
|
return message;
|
|
885
885
|
};
|
|
886
886
|
let id = 0;
|
|
887
|
-
const create$
|
|
887
|
+
const create$r = () => {
|
|
888
888
|
return ++id;
|
|
889
889
|
};
|
|
890
890
|
|
|
891
891
|
/* eslint-disable n/no-unsupported-features/es-syntax */
|
|
892
892
|
|
|
893
893
|
const registerPromise = map => {
|
|
894
|
-
const id = create$
|
|
894
|
+
const id = create$r();
|
|
895
895
|
const {
|
|
896
896
|
promise,
|
|
897
897
|
resolve
|
|
@@ -909,7 +909,7 @@ const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer)
|
|
|
909
909
|
id,
|
|
910
910
|
promise
|
|
911
911
|
} = registerPromise(callbacks);
|
|
912
|
-
const message = create$
|
|
912
|
+
const message = create$s(id, method, params);
|
|
913
913
|
if (useSendAndTransfer && ipc.sendAndTransfer) {
|
|
914
914
|
ipc.sendAndTransfer(message);
|
|
915
915
|
} else {
|
|
@@ -945,7 +945,7 @@ const createRpc = ipc => {
|
|
|
945
945
|
* @deprecated
|
|
946
946
|
*/
|
|
947
947
|
send(method, ...params) {
|
|
948
|
-
const message = create$
|
|
948
|
+
const message = create$t(method, params);
|
|
949
949
|
ipc.send(message);
|
|
950
950
|
}
|
|
951
951
|
};
|
|
@@ -1011,13 +1011,13 @@ const createSharedLazyRpc = factory => {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
};
|
|
1013
1013
|
};
|
|
1014
|
-
const create$
|
|
1014
|
+
const create$j = async ({
|
|
1015
1015
|
commandMap,
|
|
1016
1016
|
isMessagePortOpen,
|
|
1017
1017
|
send
|
|
1018
1018
|
}) => {
|
|
1019
1019
|
return createSharedLazyRpc(() => {
|
|
1020
|
-
return create$
|
|
1020
|
+
return create$3$1({
|
|
1021
1021
|
commandMap,
|
|
1022
1022
|
isMessagePortOpen,
|
|
1023
1023
|
send
|
|
@@ -1026,9 +1026,9 @@ const create$i = async ({
|
|
|
1026
1026
|
};
|
|
1027
1027
|
const LazyTransferMessagePortRpcParent = {
|
|
1028
1028
|
__proto__: null,
|
|
1029
|
-
create: create$
|
|
1029
|
+
create: create$j
|
|
1030
1030
|
};
|
|
1031
|
-
const create$
|
|
1031
|
+
const create$5$1 = async ({
|
|
1032
1032
|
commandMap,
|
|
1033
1033
|
isMessagePortOpen = true,
|
|
1034
1034
|
messagePort
|
|
@@ -1045,20 +1045,20 @@ const create$4$1 = async ({
|
|
|
1045
1045
|
messagePort.start();
|
|
1046
1046
|
return rpc;
|
|
1047
1047
|
};
|
|
1048
|
-
const create$
|
|
1048
|
+
const create$4$1 = async ({
|
|
1049
1049
|
commandMap,
|
|
1050
1050
|
messagePort
|
|
1051
1051
|
}) => {
|
|
1052
|
-
return create$
|
|
1052
|
+
return create$5$1({
|
|
1053
1053
|
commandMap,
|
|
1054
1054
|
messagePort
|
|
1055
1055
|
});
|
|
1056
1056
|
};
|
|
1057
1057
|
const PlainMessagePortRpcParent = {
|
|
1058
1058
|
__proto__: null,
|
|
1059
|
-
create: create$
|
|
1059
|
+
create: create$4$1
|
|
1060
1060
|
};
|
|
1061
|
-
const create$
|
|
1061
|
+
const create$3$1 = async ({
|
|
1062
1062
|
commandMap,
|
|
1063
1063
|
isMessagePortOpen,
|
|
1064
1064
|
send
|
|
@@ -1068,7 +1068,7 @@ const create$2$1 = async ({
|
|
|
1068
1068
|
port2
|
|
1069
1069
|
} = new MessageChannel();
|
|
1070
1070
|
await send(port1);
|
|
1071
|
-
return create$
|
|
1071
|
+
return create$5$1({
|
|
1072
1072
|
commandMap,
|
|
1073
1073
|
isMessagePortOpen,
|
|
1074
1074
|
messagePort: port2
|
|
@@ -1076,9 +1076,9 @@ const create$2$1 = async ({
|
|
|
1076
1076
|
};
|
|
1077
1077
|
const TransferMessagePortRpcParent = {
|
|
1078
1078
|
__proto__: null,
|
|
1079
|
-
create: create$
|
|
1079
|
+
create: create$3$1
|
|
1080
1080
|
};
|
|
1081
|
-
const create$
|
|
1081
|
+
const create$2$1 = async ({
|
|
1082
1082
|
commandMap
|
|
1083
1083
|
}) => {
|
|
1084
1084
|
// TODO create a commandMap per rpc instance
|
|
@@ -1090,7 +1090,7 @@ const create$1$1 = async ({
|
|
|
1090
1090
|
};
|
|
1091
1091
|
const WebWorkerRpcClient = {
|
|
1092
1092
|
__proto__: null,
|
|
1093
|
-
create: create$
|
|
1093
|
+
create: create$2$1
|
|
1094
1094
|
};
|
|
1095
1095
|
const createMockRpc = ({
|
|
1096
1096
|
commandMap
|