@lvce-editor/running-extensions-view 1.18.0 → 1.20.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.
|
@@ -1008,6 +1008,34 @@ const listen$1 = async (module, options) => {
|
|
|
1008
1008
|
return ipc;
|
|
1009
1009
|
};
|
|
1010
1010
|
|
|
1011
|
+
const createSharedLazyRpc = factory => {
|
|
1012
|
+
let rpcPromise;
|
|
1013
|
+
const getOrCreate = () => {
|
|
1014
|
+
if (!rpcPromise) {
|
|
1015
|
+
rpcPromise = factory();
|
|
1016
|
+
}
|
|
1017
|
+
return rpcPromise;
|
|
1018
|
+
};
|
|
1019
|
+
return {
|
|
1020
|
+
async dispose() {
|
|
1021
|
+
const rpc = await getOrCreate();
|
|
1022
|
+
await rpc.dispose();
|
|
1023
|
+
},
|
|
1024
|
+
async invoke(method, ...params) {
|
|
1025
|
+
const rpc = await getOrCreate();
|
|
1026
|
+
return rpc.invoke(method, ...params);
|
|
1027
|
+
},
|
|
1028
|
+
async invokeAndTransfer(method, ...params) {
|
|
1029
|
+
const rpc = await getOrCreate();
|
|
1030
|
+
return rpc.invokeAndTransfer(method, ...params);
|
|
1031
|
+
},
|
|
1032
|
+
async send(method, ...params) {
|
|
1033
|
+
const rpc = await getOrCreate();
|
|
1034
|
+
rpc.send(method, ...params);
|
|
1035
|
+
}
|
|
1036
|
+
};
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1011
1039
|
const create$6 = async ({
|
|
1012
1040
|
commandMap,
|
|
1013
1041
|
isMessagePortOpen = true,
|
|
@@ -1043,34 +1071,6 @@ const create$5 = async ({
|
|
|
1043
1071
|
});
|
|
1044
1072
|
};
|
|
1045
1073
|
|
|
1046
|
-
const createSharedLazyRpc = factory => {
|
|
1047
|
-
let rpcPromise;
|
|
1048
|
-
const getOrCreate = () => {
|
|
1049
|
-
if (!rpcPromise) {
|
|
1050
|
-
rpcPromise = factory();
|
|
1051
|
-
}
|
|
1052
|
-
return rpcPromise;
|
|
1053
|
-
};
|
|
1054
|
-
return {
|
|
1055
|
-
async dispose() {
|
|
1056
|
-
const rpc = await getOrCreate();
|
|
1057
|
-
await rpc.dispose();
|
|
1058
|
-
},
|
|
1059
|
-
async invoke(method, ...params) {
|
|
1060
|
-
const rpc = await getOrCreate();
|
|
1061
|
-
return rpc.invoke(method, ...params);
|
|
1062
|
-
},
|
|
1063
|
-
async invokeAndTransfer(method, ...params) {
|
|
1064
|
-
const rpc = await getOrCreate();
|
|
1065
|
-
return rpc.invokeAndTransfer(method, ...params);
|
|
1066
|
-
},
|
|
1067
|
-
async send(method, ...params) {
|
|
1068
|
-
const rpc = await getOrCreate();
|
|
1069
|
-
rpc.send(method, ...params);
|
|
1070
|
-
}
|
|
1071
|
-
};
|
|
1072
|
-
};
|
|
1073
|
-
|
|
1074
1074
|
const create$4 = async ({
|
|
1075
1075
|
commandMap,
|
|
1076
1076
|
isMessagePortOpen,
|