@lvce-editor/shared-process 0.25.12 → 0.26.1
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 +4 -4
- package/src/parts/ConnectIpcToElectron/ConnectIpcToElectron.js +8 -0
- package/src/parts/ContentSecurityPolicyEmbedsWorker/ContentSecurityPolicyEmbedsWorker.js +2 -0
- package/src/parts/EmbedsProcess/EmbedsProcess.js +22 -0
- package/src/parts/EmbedsProcessPath/EmbedsProcessPath.js +3 -0
- package/src/parts/GetHeaders/GetHeaders.js +4 -0
- package/src/parts/GetHeadersEmbedsWorker/GetHeadersEmbedsWorker.js +9 -0
- package/src/parts/GetPortTuple/GetPortTuple.js +6 -0
- package/src/parts/HandleElectronMessagePort/HandleElectronMessagePort.js +7 -0
- package/src/parts/HandleIpc/HandleIpc.js +2 -20
- package/src/parts/HandleMessage/HandleMessage.js +16 -0
- package/src/parts/HandleMessagePortForEmbedsProcess/HandleMessagePortForEmbedsProcess.ipc.js +5 -0
- package/src/parts/HandleMessagePortForEmbedsProcess/HandleMessagePortForEmbedsProcess.js +8 -0
- package/src/parts/HandleMessagePortForProcessExplorer/HandleMessagePortForProcessExplorer.ipc.js +5 -0
- package/src/parts/HandleMessagePortForProcessExplorer/HandleMessagePortForProcessExplorer.js +8 -0
- package/src/parts/HandleMessagePortForSearchProcess/HandleMessagePortForSearchProcess.ipc.js +5 -0
- package/src/parts/HandleMessagePortForSearchProcess/HandleMessagePortForSearchProcess.js +8 -0
- package/src/parts/IpcChildWithElectronMessagePort/IpcChildWithElectronMessagePort.js +3 -0
- package/src/parts/IpcParentWithElectronUtilityProcess/IpcParentWithElectronUtilityProcess.js +8 -3
- package/src/parts/LaunchEmbedsProcess/LaunchEmbedsProcess.js +17 -0
- package/src/parts/LaunchProcessExplorer/LaunchProcessExplorer.js +17 -0
- package/src/parts/LaunchPtyHost/LaunchPtyHost.js +37 -0
- package/src/parts/LaunchSearchProcess/LaunchSearchProcess.js +15 -0
- package/src/parts/Module/Module.js +6 -16
- package/src/parts/ModuleId/ModuleId.js +3 -7
- package/src/parts/ModuleMap/ModuleMap.js +6 -50
- package/src/parts/Platform/Platform.js +3 -3
- package/src/parts/ProcessExplorer/ProcessExplorer.js +13 -0
- package/src/parts/ProcessExplorerPath/ProcessExplorerPath.js +3 -0
- package/src/parts/PtyHost/PtyHost.js +2 -36
- package/src/parts/SearchProcess/SearchProcess.js +18 -0
- package/src/parts/SearchProcessPath/SearchProcessPath.js +3 -0
- package/src/parts/TemporaryMessagePort/TemporaryMessagePort.js +17 -0
- package/src/parts/AddAccurateMemoryUsage/AddAccurateMemoryUsage.js +0 -8
- package/src/parts/CreatePidMap/CreatePidMap.js +0 -5
- package/src/parts/ElectronBrowserView/ElectronBrowserView.ipc.js +0 -6
- package/src/parts/ElectronBrowserView/ElectronBrowserView.js +0 -21
- package/src/parts/ElectronBrowserViewFunctions/ElectronBrowserViewFunctions.ipc.js +0 -18
- package/src/parts/ElectronBrowserViewFunctions/ElectronBrowserViewFunctions.js +0 -35
- package/src/parts/ElectronBrowserViewIpcState/ElectronBrowserViewIpcState.js +0 -15
- package/src/parts/ElectronBrowserViewQuickPick/ElectronBrowserViewQuickPick.ipc.js +0 -6
- package/src/parts/ElectronBrowserViewQuickPick/ElectronBrowserViewQuickPick.js +0 -7
- package/src/parts/ElectronBrowserViewState/ElectronBrowserViewState.js +0 -12
- package/src/parts/ElectronBrowserViewSuggestions/ElectronBrowserViewSuggestions.ipc.js +0 -7
- package/src/parts/ElectronBrowserViewSuggestions/ElectronBrowserViewSuggestions.js +0 -10
- package/src/parts/ElectronWebContents/ElectronWebContents.ipc.js +0 -12
- package/src/parts/ElectronWebContents/ElectronWebContents.js +0 -61
- package/src/parts/ElectronWebContentsView/ElectronWebContentsView.ipc.js +0 -6
- package/src/parts/ElectronWebContentsView/ElectronWebContentsView.js +0 -18
- package/src/parts/ElectronWebContentsViewFunctions/ElectronWebContentsViewFunctions.ipc.js +0 -18
- package/src/parts/ElectronWebContentsViewFunctions/ElectronWebContentsViewFunctions.js +0 -35
- package/src/parts/GetAccurateMemoryUsage/GetAccurateMemoryUsage.js +0 -39
- package/src/parts/GetPsOutput/GetPsOutput.js +0 -18
- package/src/parts/ListProcessGetName/ListProcessGetName.js +0 -56
- package/src/parts/ListProcessesWithMemoryUsage/ListProcessesWithMemoryUsage.ipc.js +0 -5
- package/src/parts/ListProcessesWithMemoryUsage/ListProcessesWithMemoryUsage.js +0 -11
- package/src/parts/ListProcessesWithMemoryUsageUnix/ListProcessesWithMemoryUsageUnix.js +0 -20
- package/src/parts/ListProcessesWithMemoryUsageWindows/ListProcessesWithMemoryUsageWindows.js +0 -48
- package/src/parts/LoadWindowsProcessTree/LoadWindowsProcessTree.js +0 -13
- package/src/parts/ParseMemory/ParseMemory.js +0 -10
- package/src/parts/ParsePsOutput/ParsePsOutput.js +0 -47
- package/src/parts/WindowsProcessTree/WindowsProcessTree.js +0 -26
- package/src/parts/WindowsProcessTreeDataFlag/WindowsProcessTreeDataFlag.js +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@lvce-editor/assert": "^1.2.0",
|
|
21
|
-
"@lvce-editor/extension-host-helper-process": "0.
|
|
22
|
-
"@lvce-editor/ipc": "^
|
|
21
|
+
"@lvce-editor/extension-host-helper-process": "0.26.1",
|
|
22
|
+
"@lvce-editor/ipc": "^5.1.0",
|
|
23
23
|
"@lvce-editor/json-rpc": "^1.3.0",
|
|
24
24
|
"@lvce-editor/jsonc-parser": "^1.2.0",
|
|
25
25
|
"@lvce-editor/pretty-error": "^1.5.0",
|
|
26
|
-
"@lvce-editor/pty-host": "0.
|
|
26
|
+
"@lvce-editor/pty-host": "0.26.1",
|
|
27
27
|
"@lvce-editor/verror": "^1.2.0",
|
|
28
28
|
"@lvce-editor/web-socket-server": "^1.1.0",
|
|
29
29
|
"debug": "^4.3.4",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as GetPortTuple from '../GetPortTuple/GetPortTuple.js';
|
|
2
|
+
import * as JsonRpc from '../JsonRpc/JsonRpc.js';
|
|
3
|
+
import * as ParentIpc from '../ParentIpc/ParentIpc.js';
|
|
4
|
+
export const connectIpcToElectron = async (ipc) => {
|
|
5
|
+
const { port1, port2 } = await GetPortTuple.getPortTuple();
|
|
6
|
+
await JsonRpc.invokeAndTransfer(ipc, [port1], 'HandleElectronMessagePort.handleElectronMessagePort', /* isElectron */ true);
|
|
7
|
+
await ParentIpc.invokeAndTransfer('HandleElectronMessagePort.handleElectronMessagePort', [port2]);
|
|
8
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as JsonRpc from '../JsonRpc/JsonRpc.js';
|
|
2
|
+
import * as LaunchEmbedsProcess from '../LaunchEmbedsProcess/LaunchEmbedsProcess.js';
|
|
3
|
+
export const state = {
|
|
4
|
+
/**
|
|
5
|
+
* @type {any}
|
|
6
|
+
*/
|
|
7
|
+
ipc: undefined,
|
|
8
|
+
};
|
|
9
|
+
export const getOrCreate = async () => {
|
|
10
|
+
if (!state.ipc) {
|
|
11
|
+
state.ipc = LaunchEmbedsProcess.launchEmbedsProcess();
|
|
12
|
+
}
|
|
13
|
+
return state.ipc;
|
|
14
|
+
};
|
|
15
|
+
export const invoke = async (method, ...params) => {
|
|
16
|
+
const ipc = await getOrCreate();
|
|
17
|
+
return JsonRpc.invoke(ipc, method, ...params);
|
|
18
|
+
};
|
|
19
|
+
export const invokeAndTransfer = async (method, transfer, ...params) => {
|
|
20
|
+
const ipc = await getOrCreate();
|
|
21
|
+
return JsonRpc.invokeAndTransfer(ipc, transfer, method, ...params);
|
|
22
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { extname } from 'path';
|
|
2
2
|
import * as GetHeadersDefault from '../GetHeadersDefault/GetHeadersDefault.js';
|
|
3
|
+
import * as GetHeadersEmbedsWorker from '../GetHeadersEmbedsWorker/GetHeadersEmbedsWorker.js';
|
|
3
4
|
import * as GetHeadersExtensionHostWorker from '../GetHeadersExtensionHostWorker/GetHeadersExtensionHostWorker.js';
|
|
4
5
|
import * as GetHeadersMainFrame from '../GetHeadersMainFrame/GetHeadersMainFrame.js';
|
|
5
6
|
import * as GetHeadersOtherWorker from '../GetHeadersOtherWorker/GetHeadersOtherWorker.js';
|
|
@@ -30,6 +31,9 @@ const getExtraHeaders = (pathName, fileExtension) => {
|
|
|
30
31
|
if (pathName.endsWith('syntaxHighlightingWorkerMain.js') || pathName.endsWith('syntaxHighlightingWorkerMain.ts')) {
|
|
31
32
|
return GetHeadersSyntaxHighlightingWorker.getHeadersSyntaxHighlightingWorker();
|
|
32
33
|
}
|
|
34
|
+
if (pathName.endsWith('embedsWorkerMain.js') || pathName.endsWith('embedsWorkerMain.ts')) {
|
|
35
|
+
return GetHeadersEmbedsWorker.getHeadersEmbedsWorker();
|
|
36
|
+
}
|
|
33
37
|
if (pathName.endsWith('WorkerMain.js') || pathName.endsWith('WorkerMain.ts')) {
|
|
34
38
|
return GetHeadersOtherWorker.getHeadersOtherWorker(pathName);
|
|
35
39
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as ContentSecurityPolicyEmbedsWorker from '../ContentSecurityPolicyEmbedsWorker/ContentSecurityPolicyEmbedsWorker.js';
|
|
2
|
+
import * as CrossOriginEmbedderPolicy from '../CrossOriginEmbedderPolicy/CrossOriginEmbedderPolicy.js';
|
|
3
|
+
import * as HttpHeader from '../HttpHeader/HttpHeader.js';
|
|
4
|
+
export const getHeadersEmbedsWorker = () => {
|
|
5
|
+
return {
|
|
6
|
+
[HttpHeader.CrossOriginEmbedderPolicy]: CrossOriginEmbedderPolicy.value,
|
|
7
|
+
[HttpHeader.ContentSecurityPolicy]: ContentSecurityPolicyEmbedsWorker.value,
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as TemporaryMessagePort from '../TemporaryMessagePort/TemporaryMessagePort.js';
|
|
2
|
+
// workaround for MessageChannelMain not being available in utility process
|
|
3
|
+
export const getPortTuple = async () => {
|
|
4
|
+
const { port1, port2 } = await TemporaryMessagePort.getPortTuple();
|
|
5
|
+
return { port1, port2 };
|
|
6
|
+
};
|
|
@@ -2,6 +2,8 @@ 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 ParentIpc from '../ParentIpc/ParentIpc.js';
|
|
6
|
+
const mainProcessSpecialId = -5;
|
|
5
7
|
export const handleElectronMessagePort = async (messagePort, ...params) => {
|
|
6
8
|
Assert.object(messagePort);
|
|
7
9
|
const ipc = await IpcChild.listen({
|
|
@@ -9,6 +11,11 @@ export const handleElectronMessagePort = async (messagePort, ...params) => {
|
|
|
9
11
|
messagePort,
|
|
10
12
|
});
|
|
11
13
|
HandleIpc.handleIpc(ipc);
|
|
14
|
+
if (params[0] === mainProcessSpecialId) {
|
|
15
|
+
// update ipc with message port ipc that supports transferring objects
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
ParentIpc.state.ipc = ipc;
|
|
18
|
+
}
|
|
12
19
|
// TODO find better way to associate configuration with ipc
|
|
13
20
|
// @ts-ignore
|
|
14
21
|
ipc.windowId = params[1];
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as Command from '../Command/Command.js';
|
|
3
|
-
import * as JsonRpc from '../JsonRpc/JsonRpc.js';
|
|
4
|
-
import * as PrettyError from '../PrettyError/PrettyError.js';
|
|
5
|
-
import * as PrintPrettyError from '../PrintPrettyError/PrintPrettyError.js';
|
|
6
|
-
import * as RequiresSocket from '../RequiresSocket/RequiresSocket.js';
|
|
7
|
-
import * as ShouldLogError from '../ShouldLogError/ShouldLogError.js';
|
|
8
|
-
const preparePrettyError = PrettyError.prepare;
|
|
9
|
-
const logError = (error, prettyError) => {
|
|
10
|
-
if (ShouldLogError.shouldLogError(error)) {
|
|
11
|
-
PrintPrettyError.printPrettyError(prettyError, `[shared-process] `);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
const handleMessage = (event) => {
|
|
15
|
-
return JsonRpc.handleJsonRpcMessage(event.target, event.data, Command.execute, Callback.resolve, preparePrettyError, logError, RequiresSocket.requiresSocket);
|
|
16
|
-
};
|
|
1
|
+
import * as HandleMessage from '../HandleMessage/HandleMessage.js';
|
|
17
2
|
export const handleIpc = (ipc) => {
|
|
18
|
-
ipc.on('message', handleMessage);
|
|
19
|
-
if (ipc.start) {
|
|
20
|
-
ipc.start();
|
|
21
|
-
}
|
|
3
|
+
ipc.on('message', HandleMessage.handleMessage);
|
|
22
4
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as Callback from '../Callback/Callback.js';
|
|
2
|
+
import * as Command from '../Command/Command.js';
|
|
3
|
+
import * as JsonRpc from '../JsonRpc/JsonRpc.js';
|
|
4
|
+
import * as PrettyError from '../PrettyError/PrettyError.js';
|
|
5
|
+
import * as PrintPrettyError from '../PrintPrettyError/PrintPrettyError.js';
|
|
6
|
+
import * as RequiresSocket from '../RequiresSocket/RequiresSocket.js';
|
|
7
|
+
import * as ShouldLogError from '../ShouldLogError/ShouldLogError.js';
|
|
8
|
+
const preparePrettyError = PrettyError.prepare;
|
|
9
|
+
const logError = (error, prettyError) => {
|
|
10
|
+
if (ShouldLogError.shouldLogError(error)) {
|
|
11
|
+
PrintPrettyError.printPrettyError(prettyError, `[shared-process] `);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export const handleMessage = (event) => {
|
|
15
|
+
return JsonRpc.handleJsonRpcMessage(event.target, event.data, Command.execute, Callback.resolve, preparePrettyError, logError, RequiresSocket.requiresSocket);
|
|
16
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as HandleMessagePortForEmbedsProcess from './HandleMessagePortForEmbedsProcess.js';
|
|
2
|
+
export const name = 'HandleMessagePortForEmbedsProcess';
|
|
3
|
+
export const Commands = {
|
|
4
|
+
handleMessagePortForEmbedsProcess: HandleMessagePortForEmbedsProcess.handleMessagePortForEmbedsProcess,
|
|
5
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as Assert from '../Assert/Assert.js';
|
|
2
|
+
import * as EmbedsProcess from '../EmbedsProcess/EmbedsProcess.js';
|
|
3
|
+
import * as JsonRpc from '../JsonRpc/JsonRpc.js';
|
|
4
|
+
export const handleMessagePortForEmbedsProcess = async (port) => {
|
|
5
|
+
Assert.object(port);
|
|
6
|
+
const embedsProcess = await EmbedsProcess.getOrCreate();
|
|
7
|
+
await JsonRpc.invokeAndTransfer(embedsProcess, [port], 'HandleElectronMessagePort.handleElectronMessagePort');
|
|
8
|
+
};
|
package/src/parts/HandleMessagePortForProcessExplorer/HandleMessagePortForProcessExplorer.ipc.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as HandleMessagePortForProcessExplorer from './HandleMessagePortForProcessExplorer.js';
|
|
2
|
+
export const name = 'HandleMessagePortForProcessExplorer';
|
|
3
|
+
export const Commands = {
|
|
4
|
+
handleMessagePortForProcessExplorer: HandleMessagePortForProcessExplorer.handleMessagePortForProcessExplorer,
|
|
5
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as Assert from '../Assert/Assert.js';
|
|
2
|
+
import * as JsonRpc from '../JsonRpc/JsonRpc.js';
|
|
3
|
+
import * as ProcessExplorer from '../ProcessExplorer/ProcessExplorer.js';
|
|
4
|
+
export const handleMessagePortForProcessExplorer = async (port) => {
|
|
5
|
+
Assert.object(port);
|
|
6
|
+
const ipc = await ProcessExplorer.getOrCreate();
|
|
7
|
+
await JsonRpc.invokeAndTransfer(ipc, [port], 'HandleElectronMessagePort.handleElectronMessagePort');
|
|
8
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as HandleMessagePortForSearchProcess from './HandleMessagePortForSearchProcess.js';
|
|
2
|
+
export const name = 'HandleMessagePortForSearchProcess';
|
|
3
|
+
export const Commands = {
|
|
4
|
+
handleMessagePortForSearchProcess: HandleMessagePortForSearchProcess.handleMessagePortForSearchProcess,
|
|
5
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as Assert from '../Assert/Assert.js';
|
|
2
|
+
import * as SearchProcess from '../SearchProcess/SearchProcess.js';
|
|
3
|
+
import * as JsonRpc from '../JsonRpc/JsonRpc.js';
|
|
4
|
+
export const handleMessagePortForSearchProcess = async (port) => {
|
|
5
|
+
Assert.object(port);
|
|
6
|
+
const ipc = await SearchProcess.getOrCreate();
|
|
7
|
+
await JsonRpc.invokeAndTransfer(ipc, [port], 'HandleElectronMessagePort.handleElectronMessagePort');
|
|
8
|
+
};
|
package/src/parts/IpcParentWithElectronUtilityProcess/IpcParentWithElectronUtilityProcess.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as GetPortTuple from '../GetPortTuple/GetPortTuple.js';
|
|
1
2
|
import * as ParentIpc from '../ParentIpc/ParentIpc.js';
|
|
2
3
|
import * as TemporaryMessagePort from '../TemporaryMessagePort/TemporaryMessagePort.js';
|
|
3
4
|
const ElectronUtilityProcess = 3;
|
|
@@ -9,10 +10,14 @@ export const create = async (options) => {
|
|
|
9
10
|
method: ElectronUtilityProcess,
|
|
10
11
|
noReturn: true,
|
|
11
12
|
});
|
|
13
|
+
const { port1, port2 } = await GetPortTuple.getPortTuple();
|
|
12
14
|
// TODO use uuid instead of name
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return
|
|
15
|
+
await TemporaryMessagePort.sendTo(options.name, port2);
|
|
16
|
+
port1.start();
|
|
17
|
+
return port1;
|
|
18
|
+
};
|
|
19
|
+
export const signal = (port) => {
|
|
20
|
+
port.start();
|
|
16
21
|
};
|
|
17
22
|
export const wrap = (port) => {
|
|
18
23
|
return {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as ConnectIpcToElectron from '../ConnectIpcToElectron/ConnectIpcToElectron.js';
|
|
2
|
+
import * as EmbedsProcessPath from '../EmbedsProcessPath/EmbedsProcessPath.js';
|
|
3
|
+
import * as HandleIpc from '../HandleIpc/HandleIpc.js';
|
|
4
|
+
import * as IpcParent from '../IpcParent/IpcParent.js';
|
|
5
|
+
import * as IpcParentType from '../IpcParentType/IpcParentType.js';
|
|
6
|
+
export const launchEmbedsProcess = async () => {
|
|
7
|
+
const ipc = await IpcParent.create({
|
|
8
|
+
method: IpcParentType.ElectronUtilityProcess,
|
|
9
|
+
path: EmbedsProcessPath.embedsProcessPath,
|
|
10
|
+
argv: [],
|
|
11
|
+
stdio: 'inherit',
|
|
12
|
+
name: 'Embeds Process',
|
|
13
|
+
});
|
|
14
|
+
HandleIpc.handleIpc(ipc);
|
|
15
|
+
await ConnectIpcToElectron.connectIpcToElectron(ipc);
|
|
16
|
+
return ipc;
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as ConnectIpcToElectron from '../ConnectIpcToElectron/ConnectIpcToElectron.js';
|
|
2
|
+
import * as HandleIpc from '../HandleIpc/HandleIpc.js';
|
|
3
|
+
import * as IpcParent from '../IpcParent/IpcParent.js';
|
|
4
|
+
import * as IpcParentType from '../IpcParentType/IpcParentType.js';
|
|
5
|
+
import * as ProcessExplorerPath from '../ProcessExplorerPath/ProcessExplorerPath.js';
|
|
6
|
+
export const launchProcessExplorer = async () => {
|
|
7
|
+
const ipc = await IpcParent.create({
|
|
8
|
+
method: IpcParentType.ElectronUtilityProcess,
|
|
9
|
+
path: ProcessExplorerPath.processExplorerPath,
|
|
10
|
+
argv: [],
|
|
11
|
+
stdio: 'inherit',
|
|
12
|
+
name: 'Process Explorer',
|
|
13
|
+
});
|
|
14
|
+
HandleIpc.handleIpc(ipc);
|
|
15
|
+
await ConnectIpcToElectron.connectIpcToElectron(ipc);
|
|
16
|
+
return ipc;
|
|
17
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import exitHook from 'exit-hook';
|
|
2
|
+
import * as Debug from '../Debug/Debug.js';
|
|
3
|
+
import * as HandleIpc from '../HandleIpc/HandleIpc.js';
|
|
4
|
+
import * as IpcParent from '../IpcParent/IpcParent.js';
|
|
5
|
+
import * as PtyHostPath from '../PtyHostPath/PtyHostPath.js';
|
|
6
|
+
import * as PtyHostState from '../PtyHostState/PtyHostState.js';
|
|
7
|
+
const cleanUpAll = () => {
|
|
8
|
+
if (PtyHostState.state.ipc) {
|
|
9
|
+
PtyHostState.state.ipc.dispose();
|
|
10
|
+
PtyHostState.state.ipc = undefined;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const handleProcessExit = () => {
|
|
14
|
+
Debug.debug('shared process exit, clean terminals');
|
|
15
|
+
cleanUpAll();
|
|
16
|
+
};
|
|
17
|
+
export const launchPtyHost = async (method) => {
|
|
18
|
+
exitHook(handleProcessExit);
|
|
19
|
+
const ptyHostPath = await PtyHostPath.getPtyHostPath();
|
|
20
|
+
const ptyHost = await IpcParent.create({
|
|
21
|
+
method,
|
|
22
|
+
path: ptyHostPath,
|
|
23
|
+
argv: [],
|
|
24
|
+
stdio: 'inherit',
|
|
25
|
+
name: 'Terminal Process',
|
|
26
|
+
});
|
|
27
|
+
HandleIpc.handleIpc(ptyHost);
|
|
28
|
+
const handleClose = () => {
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
ptyHost.off('close', handleClose);
|
|
31
|
+
PtyHostState.state.ipc = undefined;
|
|
32
|
+
PtyHostState.state.ptyHostPromise = undefined;
|
|
33
|
+
};
|
|
34
|
+
ptyHost.on('close', handleClose);
|
|
35
|
+
PtyHostState.state.ipc = ptyHost;
|
|
36
|
+
return ptyHost;
|
|
37
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as SearchProcessPath from '../SearchProcessPath/SearchProcessPath.js';
|
|
2
|
+
import * as HandleIpc from '../HandleIpc/HandleIpc.js';
|
|
3
|
+
import * as IpcParent from '../IpcParent/IpcParent.js';
|
|
4
|
+
import * as IpcParentType from '../IpcParentType/IpcParentType.js';
|
|
5
|
+
export const launchSearchProcess = async () => {
|
|
6
|
+
const embedsProcess = await IpcParent.create({
|
|
7
|
+
method: IpcParentType.ElectronUtilityProcess,
|
|
8
|
+
path: SearchProcessPath.searchProcessPath,
|
|
9
|
+
argv: [],
|
|
10
|
+
stdio: 'inherit',
|
|
11
|
+
name: 'Search Process',
|
|
12
|
+
});
|
|
13
|
+
HandleIpc.handleIpc(embedsProcess);
|
|
14
|
+
return embedsProcess;
|
|
15
|
+
};
|
|
@@ -5,8 +5,6 @@ export const load = (moduleId) => {
|
|
|
5
5
|
return import('../AttachDebugger/AttachDebugger.ipc.js');
|
|
6
6
|
case ModuleId.AutoUpdater:
|
|
7
7
|
return import('../AutoUpdater/AutoUpdater.ipc.js');
|
|
8
|
-
case ModuleId.ElectronBrowserViewFunctions:
|
|
9
|
-
return import('../ElectronBrowserViewFunctions/ElectronBrowserViewFunctions.ipc.js');
|
|
10
8
|
case ModuleId.AutoUpdaterAppImage:
|
|
11
9
|
return import('../AutoUpdaterAppImage/AutoUpdaterAppImage.ipc.js');
|
|
12
10
|
case ModuleId.GetWindowId:
|
|
@@ -27,8 +25,6 @@ export const load = (moduleId) => {
|
|
|
27
25
|
return import('../Download/Download.ipc.js');
|
|
28
26
|
case ModuleId.ElectronApplicationMenu:
|
|
29
27
|
return import('../ElectronApplicationMenu/ElectronApplicationMenu.ipc.js');
|
|
30
|
-
case ModuleId.ElectronBrowserView:
|
|
31
|
-
return import('../ElectronBrowserView/ElectronBrowserView.ipc.js');
|
|
32
28
|
case ModuleId.ElectronContentTracing:
|
|
33
29
|
return import('../ElectronContentTracing/ElectronContentTracing.ipc.js');
|
|
34
30
|
case ModuleId.ElectronDeveloper:
|
|
@@ -47,8 +43,6 @@ export const load = (moduleId) => {
|
|
|
47
43
|
return import('../ElectronSafeStorage/ElectronSafeStorage.ipc.js');
|
|
48
44
|
case ModuleId.Window:
|
|
49
45
|
return import('../ElectronWindow/ElectronWindow.ipc.js');
|
|
50
|
-
case ModuleId.ElectronBrowserViewQuickPick:
|
|
51
|
-
return import('../ElectronBrowserViewQuickPick/ElectronBrowserViewQuickPick.ipc.js');
|
|
52
46
|
case ModuleId.ElectronWindowAbout:
|
|
53
47
|
return import('../ElectronWindowAbout/ElectronWindowAbout.ipc.js');
|
|
54
48
|
case ModuleId.ElectronWindowProcessExplorer:
|
|
@@ -79,8 +73,6 @@ export const load = (moduleId) => {
|
|
|
79
73
|
return import('../InstallExtension/InstallExtension.ipc.js');
|
|
80
74
|
case ModuleId.IsAutoUpdateSupported:
|
|
81
75
|
return import('../IsAutoUpdateSupported/IsAutoUpdateSupported.ipc.js');
|
|
82
|
-
case ModuleId.ListProcessesWithMemoryUsage:
|
|
83
|
-
return import('../ListProcessesWithMemoryUsage/ListProcessesWithMemoryUsage.ipc.js');
|
|
84
76
|
case ModuleId.OpenExternal:
|
|
85
77
|
return import('../OpenExternal/OpenExternal.ipc.js');
|
|
86
78
|
case ModuleId.OpenNativeFolder:
|
|
@@ -113,8 +105,6 @@ export const load = (moduleId) => {
|
|
|
113
105
|
return import('../TextDocument/TextDocument.ipc.js');
|
|
114
106
|
case ModuleId.Search:
|
|
115
107
|
return import('../TextSearch/TextSearch.ipc.js');
|
|
116
|
-
case ModuleId.ElectronBrowserViewSuggestions:
|
|
117
|
-
return import('../ElectronBrowserViewSuggestions/ElectronBrowserViewSuggestions.ipc.js');
|
|
118
108
|
case ModuleId.WebSocketServer:
|
|
119
109
|
return import('../WebSocketServer/WebSocketServer.ipc.js');
|
|
120
110
|
case ModuleId.Workspace:
|
|
@@ -129,6 +119,8 @@ export const load = (moduleId) => {
|
|
|
129
119
|
return import('../HandleWindowAllClosed/HandleWindowAllClosed.ipc.js');
|
|
130
120
|
case ModuleId.HandleMessagePortForTerminalProcess:
|
|
131
121
|
return import('../HandleMessagePortForTerminalProcess/HandleMessagePortForTerminalProcess.ipc.js');
|
|
122
|
+
case ModuleId.HandleMessagePortForEmbedsProcess:
|
|
123
|
+
return import('../HandleMessagePortForEmbedsProcess/HandleMessagePortForEmbedsProcess.ipc.js');
|
|
132
124
|
case ModuleId.TemporaryMessagePort:
|
|
133
125
|
return import('../TemporaryMessagePort/TemporaryMessagePort.ipc.js');
|
|
134
126
|
case ModuleId.GetElectronFileResponse:
|
|
@@ -137,14 +129,12 @@ export const load = (moduleId) => {
|
|
|
137
129
|
return import('../HandleRemoteRequest/HandleRemoteRequest.ipc.js');
|
|
138
130
|
case ModuleId.HandleMessagePortForExtensionHostHelperProcess:
|
|
139
131
|
return import('../HandleMessagePortForExtensionHostHelperProcess/HandleMessagePortForExtensionHostHelperProcess.ipc.js');
|
|
140
|
-
case ModuleId.ElectronWebContents:
|
|
141
|
-
return import('../ElectronWebContents/ElectronWebContents.ipc.js');
|
|
142
|
-
case ModuleId.ElectronWebContentsView:
|
|
143
|
-
return import('../ElectronWebContentsView/ElectronWebContentsView.ipc.js');
|
|
144
|
-
case ModuleId.ElectronWebContentsViewFunctions:
|
|
145
|
-
return import('../ElectronWebContentsViewFunctions/ElectronWebContentsViewFunctions.ipc.js');
|
|
146
132
|
case ModuleId.ContentSecurityPolicy:
|
|
147
133
|
return import('../ContentSecurityPolicy/ContentSecurityPolicy.ipc.js');
|
|
134
|
+
case ModuleId.HandleMessagePortForProcessExplorer:
|
|
135
|
+
return import('../HandleMessagePortForProcessExplorer/HandleMessagePortForProcessExplorer.ipc.js');
|
|
136
|
+
case ModuleId.HandleMessagePortForSearchProcess:
|
|
137
|
+
return import('../HandleMessagePortForSearchProcess/HandleMessagePortForSearchProcess.ipc.js');
|
|
148
138
|
default:
|
|
149
139
|
throw new Error(`module ${moduleId} not found`);
|
|
150
140
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export const ElectronBrowserViewSuggestions = 111;
|
|
2
1
|
export const ClipBoard = 1;
|
|
3
2
|
export const Developer = 2;
|
|
4
3
|
export const ExtensionHost = 3;
|
|
@@ -22,7 +21,6 @@ export const Download = 19;
|
|
|
22
21
|
export const ElectronPowerSaveBlocker = 222;
|
|
23
22
|
export const GitLsFiles = 20;
|
|
24
23
|
export const BulkReplacement = 21;
|
|
25
|
-
export const ElectronBrowserViewQuickPick = 999;
|
|
26
24
|
export const InstallExtension = 22;
|
|
27
25
|
export const AutoUpdater = 23;
|
|
28
26
|
export const IsAutoUpdateSupported = 24;
|
|
@@ -32,7 +30,6 @@ export const RebuildNodePty = 27;
|
|
|
32
30
|
export const ElectronInitialize = 28;
|
|
33
31
|
export const HandleWebSocket = 29;
|
|
34
32
|
export const Process = 30;
|
|
35
|
-
export const ElectronBrowserViewFunctions = 200;
|
|
36
33
|
export const AttachDebugger = 31;
|
|
37
34
|
export const HandleElectronMessagePort = 32;
|
|
38
35
|
export const HandleNodeMessagePort = 33;
|
|
@@ -53,7 +50,6 @@ export const ElectronSafeStorage = 47;
|
|
|
53
50
|
export const ElectronDeveloper = 100;
|
|
54
51
|
export const ElectronProcess = 48;
|
|
55
52
|
export const ElectronContextMenu = 49;
|
|
56
|
-
export const ElectronBrowserView = 50;
|
|
57
53
|
export const Window = 51;
|
|
58
54
|
export const PassThroughElectronMessagePort = 52;
|
|
59
55
|
export const Exit = 53;
|
|
@@ -69,8 +65,8 @@ export const TemporaryMessagePort = 62;
|
|
|
69
65
|
export const GetElectronFileResponse = 63;
|
|
70
66
|
export const HandleRemoteRequest = 64;
|
|
71
67
|
export const HandleMessagePortForExtensionHostHelperProcess = 65;
|
|
72
|
-
export const ElectronWebContents = 66;
|
|
73
|
-
export const ElectronWebContentsView = 67;
|
|
74
|
-
export const ElectronWebContentsViewFunctions = 68;
|
|
75
68
|
export const HandleRequestTest = 69;
|
|
76
69
|
export const ContentSecurityPolicy = 70;
|
|
70
|
+
export const HandleMessagePortForEmbedsProcess = 72;
|
|
71
|
+
export const HandleMessagePortForProcessExplorer = 73;
|
|
72
|
+
export const HandleMessagePortForSearchProcess = 74;
|
|
@@ -41,10 +41,6 @@ export const getModuleId = (commandId) => {
|
|
|
41
41
|
case 'ElectronApplicationMenu.handleClick':
|
|
42
42
|
case 'ElectronApplicationMenu.setItems':
|
|
43
43
|
return ModuleId.ElectronApplicationMenu;
|
|
44
|
-
case 'ElectronBrowserView.createBrowserView':
|
|
45
|
-
case 'ElectronBrowserView.disposeBrowserView':
|
|
46
|
-
case 'ElectronBrowserView.getAll':
|
|
47
|
-
return ModuleId.ElectronBrowserView;
|
|
48
44
|
case 'ElectronClipBoard.writeText':
|
|
49
45
|
return ModuleId.ElectronClipBoard;
|
|
50
46
|
case 'ElectronContentTracing.startRecording':
|
|
@@ -73,9 +69,6 @@ export const getModuleId = (commandId) => {
|
|
|
73
69
|
return ModuleId.ElectronWindowProcessExplorer;
|
|
74
70
|
case 'Exit.exit':
|
|
75
71
|
return ModuleId.Exit;
|
|
76
|
-
case 'ElectronBrowserViewQuickPick.createBrowserViewQuickPick':
|
|
77
|
-
case 'ElectronBrowserViewQuickPick.disposeBrowserViewQuickPick':
|
|
78
|
-
return ModuleId.ElectronBrowserViewQuickPick;
|
|
79
72
|
case 'ExtensionHost.dispose':
|
|
80
73
|
case 'ExtensionHost.enableExtension':
|
|
81
74
|
case 'ExtensionHost.executeCommand':
|
|
@@ -136,34 +129,6 @@ export const getModuleId = (commandId) => {
|
|
|
136
129
|
case 'ExtensionManagement.install':
|
|
137
130
|
case 'ExtensionManagement.uninstall':
|
|
138
131
|
return ModuleId.ExtensionManagement;
|
|
139
|
-
case 'ElectronBrowserViewFunctions.resizeBrowserView':
|
|
140
|
-
case 'ElectronBrowserViewFunctions.setIframeSrc':
|
|
141
|
-
case 'ElectronBrowserViewFunctions.focus':
|
|
142
|
-
case 'ElectronBrowserViewFunctions.openDevtools':
|
|
143
|
-
case 'ElectronBrowserViewFunctions.reload':
|
|
144
|
-
case 'ElectronBrowserViewFunctions.forward':
|
|
145
|
-
case 'ElectronBrowserViewFunctions.backward':
|
|
146
|
-
case 'ElectronBrowserViewFunctions.cancelNavigation':
|
|
147
|
-
case 'ElectronBrowserViewFunctions.hide':
|
|
148
|
-
case 'ElectronBrowserViewFunctions.inspectElement':
|
|
149
|
-
case 'ElectronBrowserViewFunctions.copyImageAt':
|
|
150
|
-
case 'ElectronBrowserViewFunctions.setFallthroughKeyBindings':
|
|
151
|
-
case 'ElectronBrowserViewFunctions.getStats':
|
|
152
|
-
return ModuleId.ElectronBrowserViewFunctions;
|
|
153
|
-
case 'ElectronWebContentsViewFunctions.resizeBrowserView':
|
|
154
|
-
case 'ElectronWebContentsViewFunctions.setIframeSrc':
|
|
155
|
-
case 'ElectronWebContentsViewFunctions.focus':
|
|
156
|
-
case 'ElectronWebContentsViewFunctions.openDevtools':
|
|
157
|
-
case 'ElectronWebContentsViewFunctions.reload':
|
|
158
|
-
case 'ElectronWebContentsViewFunctions.forward':
|
|
159
|
-
case 'ElectronWebContentsViewFunctions.backward':
|
|
160
|
-
case 'ElectronWebContentsViewFunctions.cancelNavigation':
|
|
161
|
-
case 'ElectronWebContentsViewFunctions.hide':
|
|
162
|
-
case 'ElectronWebContentsViewFunctions.inspectElement':
|
|
163
|
-
case 'ElectronWebContentsViewFunctions.copyImageAt':
|
|
164
|
-
case 'ElectronWebContentsViewFunctions.setFallthroughKeyBindings':
|
|
165
|
-
case 'ElectronWebContentsViewFunctions.getStats':
|
|
166
|
-
return ModuleId.ElectronWebContentsViewFunctions;
|
|
167
132
|
case 'FileSystem.chmod':
|
|
168
133
|
case 'FileSystem.copy':
|
|
169
134
|
case 'FileSystem.createFile':
|
|
@@ -177,10 +142,6 @@ export const getModuleId = (commandId) => {
|
|
|
177
142
|
case 'FileSystem.rename':
|
|
178
143
|
case 'FileSystem.writeFile':
|
|
179
144
|
return ModuleId.FileSystem;
|
|
180
|
-
case 'ElectronBrowserViewSuggestions.createBrowserView':
|
|
181
|
-
case 'ElectronBrowserViewSuggestions.disposeBrowserView':
|
|
182
|
-
case 'ElectronBrowserViewSuggestions.setSuggestions':
|
|
183
|
-
return ModuleId.ElectronBrowserViewSuggestions;
|
|
184
145
|
case 'GetTerminalSpawnOptions.getTerminalSpawnOptions':
|
|
185
146
|
return ModuleId.GetTerminalSpawnOptions;
|
|
186
147
|
case 'GitLsFiles.gitLsFiles':
|
|
@@ -309,21 +270,16 @@ export const getModuleId = (commandId) => {
|
|
|
309
270
|
return ModuleId.HandleRemoteRequest;
|
|
310
271
|
case 'HandleMessagePortForExtensionHostHelperProcess.handleMessagePortForExtensionHostHelperProcess':
|
|
311
272
|
return ModuleId.HandleMessagePortForExtensionHostHelperProcess;
|
|
312
|
-
case 'ElectronWebContents.dispose':
|
|
313
|
-
case 'ElectronWebContents.handleKeyBinding':
|
|
314
|
-
case 'ElectronWebContents.handleWindowOpen':
|
|
315
|
-
case 'ElectronWebContents.handleWillNavigate':
|
|
316
|
-
case 'ElectronWebContents.handleDidNavigate':
|
|
317
|
-
case 'ElectronWebContents.handleContextMenu':
|
|
318
|
-
case 'ElectronWebContents.handlePageTitleUpdated':
|
|
319
|
-
return ModuleId.ElectronWebContents;
|
|
320
|
-
case 'ElectronWebContentsView.createWebContentsView':
|
|
321
|
-
case 'ElectronWebContentsView.disposeWebContentsView':
|
|
322
|
-
return ModuleId.ElectronWebContentsView;
|
|
323
273
|
case 'HandleRequestTest.handleRequestTest':
|
|
324
274
|
return ModuleId.HandleRequestTest;
|
|
325
275
|
case 'ContentSecurityPolicy.set':
|
|
326
276
|
return ModuleId.ContentSecurityPolicy;
|
|
277
|
+
case 'HandleMessagePortForEmbedsProcess.handleMessagePortForEmbedsProcess':
|
|
278
|
+
return ModuleId.HandleMessagePortForEmbedsProcess;
|
|
279
|
+
case 'HandleMessagePortForProcessExplorer.handleMessagePortForProcessExplorer':
|
|
280
|
+
return ModuleId.HandleMessagePortForProcessExplorer;
|
|
281
|
+
case 'HandleMessagePortForSearchProcess.handleMessagePortForSearchProcess':
|
|
282
|
+
return ModuleId.HandleMessagePortForSearchProcess;
|
|
327
283
|
default:
|
|
328
284
|
throw new CommandNotFoundError(commandId);
|
|
329
285
|
}
|
|
@@ -41,9 +41,9 @@ export const getAppImageName = () => {
|
|
|
41
41
|
export const getSetupName = () => {
|
|
42
42
|
return 'Lvce-Setup';
|
|
43
43
|
};
|
|
44
|
-
export const version = '0.
|
|
45
|
-
export const commit = '
|
|
46
|
-
export const date = '2024-04-
|
|
44
|
+
export const version = '0.26.1';
|
|
45
|
+
export const commit = 'a044a77';
|
|
46
|
+
export const date = '2024-04-21T08:08:58.000Z';
|
|
47
47
|
export const getVersion = () => {
|
|
48
48
|
return version;
|
|
49
49
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as LaunchProcessExplorer from '../LaunchProcessExplorer/LaunchProcessExplorer.js';
|
|
2
|
+
export const state = {
|
|
3
|
+
/**
|
|
4
|
+
* @type {any}
|
|
5
|
+
*/
|
|
6
|
+
ipc: undefined,
|
|
7
|
+
};
|
|
8
|
+
export const getOrCreate = async () => {
|
|
9
|
+
if (!state.ipc) {
|
|
10
|
+
state.ipc = LaunchProcessExplorer.launchProcessExplorer();
|
|
11
|
+
}
|
|
12
|
+
return state.ipc;
|
|
13
|
+
};
|
|
@@ -1,46 +1,12 @@
|
|
|
1
|
-
import exitHook from 'exit-hook';
|
|
2
1
|
import * as Debug from '../Debug/Debug.js';
|
|
3
|
-
import * as HandleIpc from '../HandleIpc/HandleIpc.js';
|
|
4
|
-
import * as IpcParent from '../IpcParent/IpcParent.js';
|
|
5
2
|
import * as IpcParentType from '../IpcParentType/IpcParentType.js';
|
|
6
3
|
import * as JsonRpc from '../JsonRpc/JsonRpc.js';
|
|
7
|
-
import * as
|
|
4
|
+
import * as LaunchPtyHost from '../LaunchPtyHost/LaunchPtyHost.js';
|
|
8
5
|
import * as PtyHostState from '../PtyHostState/PtyHostState.js';
|
|
9
|
-
const cleanUpAll = () => {
|
|
10
|
-
if (PtyHostState.state.ipc) {
|
|
11
|
-
PtyHostState.state.ipc.dispose();
|
|
12
|
-
PtyHostState.state.ipc = undefined;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
const handleProcessExit = () => {
|
|
16
|
-
Debug.debug('shared process exit, clean terminals');
|
|
17
|
-
cleanUpAll();
|
|
18
|
-
};
|
|
19
|
-
const createPtyHost = async (method) => {
|
|
20
|
-
exitHook(handleProcessExit);
|
|
21
|
-
const ptyHostPath = await PtyHostPath.getPtyHostPath();
|
|
22
|
-
const ptyHost = await IpcParent.create({
|
|
23
|
-
method,
|
|
24
|
-
path: ptyHostPath,
|
|
25
|
-
argv: [],
|
|
26
|
-
stdio: 'inherit',
|
|
27
|
-
name: 'Terminal Process',
|
|
28
|
-
});
|
|
29
|
-
HandleIpc.handleIpc(ptyHost);
|
|
30
|
-
const handleClose = () => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
ptyHost.off('close', handleClose);
|
|
33
|
-
PtyHostState.state.ipc = undefined;
|
|
34
|
-
PtyHostState.state.ptyHostPromise = undefined;
|
|
35
|
-
};
|
|
36
|
-
ptyHost.on('close', handleClose);
|
|
37
|
-
PtyHostState.state.ipc = ptyHost;
|
|
38
|
-
return ptyHost;
|
|
39
|
-
};
|
|
40
6
|
export const getOrCreate = (method = IpcParentType.NodeForkedProcess) => {
|
|
41
7
|
Debug.debug('creating pty host');
|
|
42
8
|
if (!PtyHostState.state.ptyHostPromise) {
|
|
43
|
-
PtyHostState.state.ptyHostPromise =
|
|
9
|
+
PtyHostState.state.ptyHostPromise = LaunchPtyHost.launchPtyHost(method);
|
|
44
10
|
}
|
|
45
11
|
return PtyHostState.state.ptyHostPromise;
|
|
46
12
|
};
|