@lvce-editor/extension-host-helper-process 0.28.2 → 0.28.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/extension-host-helper-process",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@lvce-editor/assert": "^1.2.0",
|
|
20
|
-
"@lvce-editor/ipc": "^8.2.
|
|
20
|
+
"@lvce-editor/ipc": "^8.2.1",
|
|
21
21
|
"@lvce-editor/json-rpc": "^1.3.0",
|
|
22
22
|
"@lvce-editor/pretty-error": "^1.5.0",
|
|
23
23
|
"@lvce-editor/verror": "^1.2.0",
|
|
@@ -2,12 +2,21 @@ import * as Assert from '../Assert/Assert.js'
|
|
|
2
2
|
import * as HandleIpc from '../HandleIpc/HandleIpc.js'
|
|
3
3
|
import * as IpcChild from '../IpcChild/IpcChild.js'
|
|
4
4
|
import * as IpcChildType from '../IpcChildType/IpcChildType.js'
|
|
5
|
+
import * as IpcId from '../IpcId/IpcId.js'
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
const handleClose = () => {
|
|
8
|
+
process.exit(0)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const handleElectronMessagePort = async (messagePort, ipcId) => {
|
|
7
12
|
Assert.object(messagePort)
|
|
8
13
|
const ipc = await IpcChild.listen({
|
|
9
14
|
method: IpcChildType.ElectronMessagePort,
|
|
10
15
|
messagePort,
|
|
11
16
|
})
|
|
12
17
|
HandleIpc.handleIpc(ipc)
|
|
18
|
+
if (ipcId === IpcId.ExtensionHostWorker) {
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
ipc.addEventListener('close', handleClose)
|
|
21
|
+
}
|
|
13
22
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const EmbedsProcess = 2
|
|
2
|
+
export const EmbedsWorker = 77
|
|
3
|
+
export const ExtensionHostHelperProcess = 3
|
|
4
|
+
export const MainProcess = -5
|
|
5
|
+
export const ProcessExplorer = 11
|
|
6
|
+
export const SearchProcess = 13
|
|
7
|
+
export const SharedProcess = 1
|
|
8
|
+
export const TerminalProcess = 7
|
|
9
|
+
export const Unknown = 0
|
|
10
|
+
export const ProcessExplorerRenderer = 33
|
|
11
|
+
export const ExtensionHostWorker = 218
|