@lvce-editor/file-watcher-process 1.5.0 → 2.0.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 +8 -8
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -22,19 +22,19 @@ const Auto = () => {
|
|
|
22
22
|
if (argv.includes('--ipc-type=electron-utility-process')) {
|
|
23
23
|
return ElectronUtilityProcess;
|
|
24
24
|
}
|
|
25
|
-
throw new Error('[
|
|
25
|
+
throw new Error('[file-watcher-process] unknown ipc type');
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const getModule = method => {
|
|
29
29
|
switch (method) {
|
|
30
30
|
case NodeForkedProcess:
|
|
31
|
-
return NodeForkedProcessRpcClient;
|
|
31
|
+
return NodeForkedProcessRpcClient.create;
|
|
32
32
|
case NodeWorker:
|
|
33
|
-
return NodeWorkerRpcClient;
|
|
33
|
+
return NodeWorkerRpcClient.create;
|
|
34
34
|
case ElectronUtilityProcess:
|
|
35
|
-
return ElectronUtilityProcessRpcClient;
|
|
35
|
+
return ElectronUtilityProcessRpcClient.create;
|
|
36
36
|
case ElectronMessagePort:
|
|
37
|
-
return ElectronMessagePortRpcClient;
|
|
37
|
+
return ElectronMessagePortRpcClient.create;
|
|
38
38
|
default:
|
|
39
39
|
throw new Error('unexpected ipc type');
|
|
40
40
|
}
|
|
@@ -44,9 +44,9 @@ const listen$1 = async ({
|
|
|
44
44
|
method,
|
|
45
45
|
...params
|
|
46
46
|
}) => {
|
|
47
|
-
const
|
|
47
|
+
const fn = getModule(method);
|
|
48
48
|
// @ts-ignore
|
|
49
|
-
const rpc = await
|
|
49
|
+
const rpc = await fn(params);
|
|
50
50
|
// @ts-ignore
|
|
51
51
|
return rpc;
|
|
52
52
|
};
|
|
@@ -148,10 +148,10 @@ const watchFolders = async ({
|
|
|
148
148
|
});
|
|
149
149
|
return watcher;
|
|
150
150
|
});
|
|
151
|
+
await Promise.all(watchers.map(waitForWatcherToBeReady));
|
|
151
152
|
for (const watcher of watchers) {
|
|
152
153
|
watcher.on('all', callback);
|
|
153
154
|
}
|
|
154
|
-
await Promise.all(watchers.map(waitForWatcherToBeReady));
|
|
155
155
|
};
|
|
156
156
|
|
|
157
157
|
const commandMap = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/file-watcher-process",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "File Watcher Process",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lvce Editor",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"file-watcher-process": "bin/fileWatcherProcess.js"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@lvce-editor/rpc": "^1.
|
|
22
|
-
"@lvce-editor/rpc-registry": "^1.
|
|
21
|
+
"@lvce-editor/rpc": "^2.1.0",
|
|
22
|
+
"@lvce-editor/rpc-registry": "^1.1.0",
|
|
23
23
|
"@lvce-editor/verror": "^1.6.0",
|
|
24
24
|
"chokidar": "^4.0.3"
|
|
25
25
|
},
|