@lvce-editor/file-watcher-process 3.0.0 → 3.1.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/index.js +16 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -519,7 +519,7 @@ const IpcChildWithNodeWorker$1 = {
|
|
|
519
519
|
};
|
|
520
520
|
|
|
521
521
|
const Two = '2.0';
|
|
522
|
-
const create$4 = (method, params) => {
|
|
522
|
+
const create$4$1 = (method, params) => {
|
|
523
523
|
return {
|
|
524
524
|
jsonrpc: Two,
|
|
525
525
|
method,
|
|
@@ -527,7 +527,7 @@ const create$4 = (method, params) => {
|
|
|
527
527
|
};
|
|
528
528
|
};
|
|
529
529
|
const callbacks = Object.create(null);
|
|
530
|
-
const set
|
|
530
|
+
const set = (id, fn) => {
|
|
531
531
|
callbacks[id] = fn;
|
|
532
532
|
};
|
|
533
533
|
const get$1 = id => {
|
|
@@ -537,16 +537,16 @@ const remove = id => {
|
|
|
537
537
|
delete callbacks[id];
|
|
538
538
|
};
|
|
539
539
|
let id = 0;
|
|
540
|
-
const create$3
|
|
540
|
+
const create$3 = () => {
|
|
541
541
|
return ++id;
|
|
542
542
|
};
|
|
543
543
|
const registerPromise = () => {
|
|
544
|
-
const id = create$3
|
|
544
|
+
const id = create$3();
|
|
545
545
|
const {
|
|
546
546
|
resolve,
|
|
547
547
|
promise
|
|
548
548
|
} = Promise.withResolvers();
|
|
549
|
-
set
|
|
549
|
+
set(id, resolve);
|
|
550
550
|
return {
|
|
551
551
|
id,
|
|
552
552
|
promise
|
|
@@ -854,7 +854,7 @@ const invokeHelper = async (ipc, method, params, useSendAndTransfer) => {
|
|
|
854
854
|
return unwrapJsonRpcResult(responseMessage);
|
|
855
855
|
};
|
|
856
856
|
const send = (transport, method, ...params) => {
|
|
857
|
-
const message = create$4(method, params);
|
|
857
|
+
const message = create$4$1(method, params);
|
|
858
858
|
transport.send(message);
|
|
859
859
|
};
|
|
860
860
|
const invoke$1 = (ipc, method, ...params) => {
|
|
@@ -931,7 +931,7 @@ const listen$2 = async (module, options) => {
|
|
|
931
931
|
const ipc = module.wrap(rawIpc);
|
|
932
932
|
return ipc;
|
|
933
933
|
};
|
|
934
|
-
const create$
|
|
934
|
+
const create$c = async ({
|
|
935
935
|
commandMap,
|
|
936
936
|
messagePort
|
|
937
937
|
}) => {
|
|
@@ -946,9 +946,9 @@ const create$b = async ({
|
|
|
946
946
|
};
|
|
947
947
|
const ElectronMessagePortRpcClient = {
|
|
948
948
|
__proto__: null,
|
|
949
|
-
create: create$
|
|
949
|
+
create: create$c
|
|
950
950
|
};
|
|
951
|
-
const create$
|
|
951
|
+
const create$b = async ({
|
|
952
952
|
commandMap
|
|
953
953
|
}) => {
|
|
954
954
|
// TODO create a commandMap per rpc instance
|
|
@@ -960,9 +960,9 @@ const create$a = async ({
|
|
|
960
960
|
};
|
|
961
961
|
const ElectronUtilityProcessRpcClient = {
|
|
962
962
|
__proto__: null,
|
|
963
|
-
create: create$
|
|
963
|
+
create: create$b
|
|
964
964
|
};
|
|
965
|
-
const create$
|
|
965
|
+
const create$7 = async ({
|
|
966
966
|
commandMap
|
|
967
967
|
}) => {
|
|
968
968
|
// TODO create a commandMap per rpc instance
|
|
@@ -974,9 +974,9 @@ const create$6 = async ({
|
|
|
974
974
|
};
|
|
975
975
|
const NodeForkedProcessRpcClient = {
|
|
976
976
|
__proto__: null,
|
|
977
|
-
create: create$
|
|
977
|
+
create: create$7
|
|
978
978
|
};
|
|
979
|
-
const create$
|
|
979
|
+
const create$4 = async ({
|
|
980
980
|
commandMap
|
|
981
981
|
}) => {
|
|
982
982
|
// TODO create a commandMap per rpc instance
|
|
@@ -988,7 +988,7 @@ const create$3 = async ({
|
|
|
988
988
|
};
|
|
989
989
|
const NodeWorkerRpcClient = {
|
|
990
990
|
__proto__: null,
|
|
991
|
-
create: create$
|
|
991
|
+
create: create$4
|
|
992
992
|
};
|
|
993
993
|
|
|
994
994
|
const NodeWorker = 1;
|
|
@@ -1047,7 +1047,7 @@ const handleElectronMessagePort = async messagePort => {
|
|
|
1047
1047
|
const SharedProcess = 1;
|
|
1048
1048
|
|
|
1049
1049
|
const rpcs = Object.create(null);
|
|
1050
|
-
const set = (id, rpc) => {
|
|
1050
|
+
const set$3 = (id, rpc) => {
|
|
1051
1051
|
rpcs[id] = rpc;
|
|
1052
1052
|
};
|
|
1053
1053
|
const get = id => {
|
|
@@ -1160,7 +1160,7 @@ const listen = async () => {
|
|
|
1160
1160
|
method: Auto(),
|
|
1161
1161
|
commandMap: commandMap
|
|
1162
1162
|
});
|
|
1163
|
-
set(SharedProcess, rpc);
|
|
1163
|
+
set$3(SharedProcess, rpc);
|
|
1164
1164
|
};
|
|
1165
1165
|
|
|
1166
1166
|
const main = async () => {
|