@lvce-editor/file-watcher-process 4.1.0 → 4.2.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.
Files changed (2) hide show
  1. package/dist/index.js +10 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1147,15 +1147,6 @@ const listen$1 = async ({
1147
1147
  return rpc;
1148
1148
  };
1149
1149
 
1150
- const handleElectronMessagePort = async messagePort => {
1151
- await listen$1({
1152
- messagePort,
1153
- method: ElectronMessagePort
1154
- });
1155
- };
1156
-
1157
- const SharedProcess = 1;
1158
-
1159
1150
  const rpcs = Object.create(null);
1160
1151
  const set = (id, rpc) => {
1161
1152
  rpcs[id] = rpc;
@@ -1164,6 +1155,16 @@ const get = id => {
1164
1155
  return rpcs[id];
1165
1156
  };
1166
1157
 
1158
+ const handleElectronMessagePort = async (messagePort, rpcId) => {
1159
+ const rpc = await listen$1({
1160
+ messagePort,
1161
+ method: ElectronMessagePort
1162
+ });
1163
+ set(rpcId, rpc);
1164
+ };
1165
+
1166
+ const SharedProcess = 1;
1167
+
1167
1168
  const invoke = async (method, ...params) => {
1168
1169
  const rpc = get(SharedProcess);
1169
1170
  await rpc.invoke(method, ...params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-watcher-process",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "File Watcher Process",
5
5
  "keywords": [
6
6
  "Lvce Editor",