@theia/plugin-ext-headless 1.77.0-next.99 → 1.78.0-next.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/lib/common/headless-plugin-container.js +1 -4
- package/lib/common/headless-plugin-container.js.map +1 -1
- package/lib/common/headless-plugin-protocol.js +2 -6
- package/lib/common/headless-plugin-protocol.js.map +1 -1
- package/lib/common/headless-plugin-rpc.d.ts +1 -1
- package/lib/common/headless-plugin-rpc.d.ts.map +1 -1
- package/lib/common/headless-plugin-rpc.js +10 -13
- package/lib/common/headless-plugin-rpc.js.map +1 -1
- package/lib/common/index.d.ts +4 -4
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +4 -11
- package/lib/common/index.js.map +1 -1
- package/lib/common/plugin-ext-headless-api-contribution.js +1 -4
- package/lib/common/plugin-ext-headless-api-contribution.js.map +1 -1
- package/lib/hosted/node/headless-hosted-plugin.d.ts +2 -2
- package/lib/hosted/node/headless-hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/node/headless-hosted-plugin.js +51 -63
- package/lib/hosted/node/headless-hosted-plugin.js.map +1 -1
- package/lib/hosted/node/headless-plugin-service.js +7 -10
- package/lib/hosted/node/headless-plugin-service.js.map +1 -1
- package/lib/hosted/node/plugin-ext-headless-hosted-module.js +31 -36
- package/lib/hosted/node/plugin-ext-headless-hosted-module.js.map +1 -1
- package/lib/hosted/node/plugin-host-headless-module.js +32 -34
- package/lib/hosted/node/plugin-host-headless-module.js.map +1 -1
- package/lib/hosted/node/plugin-host-headless-rpc.d.ts +2 -2
- package/lib/hosted/node/plugin-host-headless-rpc.d.ts.map +1 -1
- package/lib/hosted/node/plugin-host-headless-rpc.js +17 -24
- package/lib/hosted/node/plugin-host-headless-rpc.js.map +1 -1
- package/lib/hosted/node/plugin-host-headless.js +15 -18
- package/lib/hosted/node/plugin-host-headless.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia-headless.js +9 -13
- package/lib/hosted/node/scanners/scanner-theia-headless.js.map +1 -1
- package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.js +3 -6
- package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -4
- package/lib/index.js.map +1 -1
- package/lib/main/node/handlers/plugin-theia-headless-directory-handler.js +9 -12
- package/lib/main/node/handlers/plugin-theia-headless-directory-handler.js.map +1 -1
- package/lib/main/node/headless-progress-client.js +10 -14
- package/lib/main/node/headless-progress-client.js.map +1 -1
- package/lib/main/node/main-context.js +11 -14
- package/lib/main/node/main-context.js.map +1 -1
- package/lib/main/node/plugin-ext-headless-main-module.js +12 -16
- package/lib/main/node/plugin-ext-headless-main-module.js.map +1 -1
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.js +1 -1
- package/lib/package.spec.js.map +1 -1
- package/lib/plugin/headless-plugin-manager.d.ts +1 -1
- package/lib/plugin/headless-plugin-manager.d.ts.map +1 -1
- package/lib/plugin/headless-plugin-manager.js +7 -10
- package/lib/plugin/headless-plugin-manager.js.map +1 -1
- package/lib/plugin-ext-headless-electron-module.js +12 -14
- package/lib/plugin-ext-headless-electron-module.js.map +1 -1
- package/lib/plugin-ext-headless-module.js +11 -13
- package/lib/plugin-ext-headless-module.js.map +1 -1
- package/package.json +16 -7
- package/src/common/headless-plugin-rpc.ts +1 -1
- package/src/common/index.ts +4 -4
- package/src/hosted/node/headless-hosted-plugin.ts +4 -4
- package/src/hosted/node/plugin-ext-headless-hosted-module.ts +6 -6
- package/src/hosted/node/plugin-host-headless-module.ts +2 -2
- package/src/hosted/node/plugin-host-headless-rpc.ts +3 -3
- package/src/hosted/node/plugin-host-headless.ts +2 -2
- package/src/hosted/node-electron/plugin-ext-headless-hosted-electron-module.ts +1 -1
- package/src/index.ts +1 -1
- package/src/main/node/main-context.ts +1 -1
- package/src/main/node/plugin-ext-headless-main-module.ts +2 -2
- package/src/plugin/headless-plugin-manager.ts +1 -1
- package/src/plugin-ext-headless-electron-module.ts +4 -4
- package/src/plugin-ext-headless-module.ts +3 -3
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
// *****************************************************************************
|
|
4
2
|
// Copyright (C) 2024 EclipseSource and others.
|
|
5
3
|
//
|
|
@@ -15,59 +13,59 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
13
|
//
|
|
16
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
17
15
|
// *****************************************************************************
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const channel = new
|
|
36
|
-
bind(
|
|
37
|
-
bind(
|
|
16
|
+
import '@theia/core/shared/reflect-metadata';
|
|
17
|
+
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
18
|
+
import { RPCProtocol, RPCProtocolImpl } from '@theia/plugin-ext/lib/common/rpc-protocol';
|
|
19
|
+
import { AbstractPluginHostRPC, PluginContainerModuleLoader } from '@theia/plugin-ext/lib/hosted/node/plugin-host-rpc';
|
|
20
|
+
import { AbstractPluginManagerExtImpl, MinimalTerminalServiceExt } from '@theia/plugin-ext/lib/plugin/plugin-manager';
|
|
21
|
+
import { HeadlessPluginHostRPC } from './plugin-host-headless-rpc.js';
|
|
22
|
+
import { HeadlessPluginManagerExtImpl } from '../../plugin/headless-plugin-manager.js';
|
|
23
|
+
import { IPCChannel } from '@theia/core/lib/node';
|
|
24
|
+
import { EnvExtImpl } from '@theia/plugin-ext/lib/plugin/env';
|
|
25
|
+
import { EnvNodeExtImpl } from '@theia/plugin-ext/lib/plugin/node/env-node-ext';
|
|
26
|
+
import { LocalizationExt } from '@theia/plugin-ext';
|
|
27
|
+
import { LocalizationExtImpl } from '@theia/plugin-ext/lib/plugin/localization-ext';
|
|
28
|
+
import { InternalStorageExt } from '@theia/plugin-ext/lib/plugin/plugin-storage';
|
|
29
|
+
import { InternalSecretsExt } from '@theia/plugin-ext/lib/plugin/secrets-ext';
|
|
30
|
+
import { EnvironmentVariableCollectionImpl } from '@theia/plugin-ext/lib/plugin/terminal-ext';
|
|
31
|
+
import { Disposable } from '@theia/core';
|
|
32
|
+
export default new ContainerModule(bind => {
|
|
33
|
+
const channel = new IPCChannel();
|
|
34
|
+
bind(RPCProtocol).toConstantValue(new RPCProtocolImpl(channel));
|
|
35
|
+
bind(PluginContainerModuleLoader).toDynamicValue(({ container }) => (module) => {
|
|
38
36
|
container.load(module);
|
|
39
37
|
const internalModule = module;
|
|
40
38
|
const pluginApiCache = internalModule.initializeApi?.(container);
|
|
41
39
|
return pluginApiCache;
|
|
42
40
|
}).inSingletonScope();
|
|
43
|
-
bind(
|
|
44
|
-
bind(
|
|
45
|
-
bind(
|
|
46
|
-
bind(
|
|
47
|
-
bind(
|
|
48
|
-
bind(
|
|
41
|
+
bind(AbstractPluginHostRPC).toService(HeadlessPluginHostRPC);
|
|
42
|
+
bind(HeadlessPluginHostRPC).toSelf().inSingletonScope();
|
|
43
|
+
bind(AbstractPluginManagerExtImpl).toService(HeadlessPluginManagerExtImpl);
|
|
44
|
+
bind(HeadlessPluginManagerExtImpl).toSelf().inSingletonScope();
|
|
45
|
+
bind(EnvExtImpl).to(EnvNodeExtImpl).inSingletonScope();
|
|
46
|
+
bind(LocalizationExt).to(LocalizationExtImpl).inSingletonScope();
|
|
49
47
|
const dummySecrets = {
|
|
50
48
|
get: () => Promise.resolve(undefined),
|
|
51
49
|
store: () => Promise.resolve(undefined),
|
|
52
50
|
delete: () => Promise.resolve(undefined),
|
|
53
51
|
$onDidChangePassword: () => Promise.resolve(),
|
|
54
|
-
onDidChangePassword: () =>
|
|
52
|
+
onDidChangePassword: () => Disposable.NULL,
|
|
55
53
|
keys: () => Promise.resolve([]),
|
|
56
54
|
};
|
|
57
55
|
const dummyStorage = {
|
|
58
56
|
init: () => undefined,
|
|
59
57
|
setPerPluginData: () => Promise.resolve(false),
|
|
60
58
|
getPerPluginData: () => ({}),
|
|
61
|
-
storageDataChangedEvent: () =>
|
|
59
|
+
storageDataChangedEvent: () => Disposable.NULL,
|
|
62
60
|
$updatePluginsWorkspaceData: () => undefined
|
|
63
61
|
};
|
|
64
62
|
const dummyTerminalService = {
|
|
65
63
|
$initEnvironmentVariableCollections: () => undefined,
|
|
66
64
|
$setShell: () => undefined,
|
|
67
|
-
getEnvironmentVariableCollection: () => new
|
|
65
|
+
getEnvironmentVariableCollection: () => new EnvironmentVariableCollectionImpl(false),
|
|
68
66
|
};
|
|
69
|
-
bind(
|
|
70
|
-
bind(
|
|
71
|
-
bind(
|
|
67
|
+
bind(InternalSecretsExt).toConstantValue(dummySecrets);
|
|
68
|
+
bind(InternalStorageExt).toConstantValue(dummyStorage);
|
|
69
|
+
bind(MinimalTerminalServiceExt).toConstantValue(dummyTerminalService);
|
|
72
70
|
});
|
|
73
71
|
//# sourceMappingURL=plugin-host-headless-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-host-headless-module.js","sourceRoot":"","sources":["../../../src/hosted/node/plugin-host-headless-module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-host-headless-module.js","sourceRoot":"","sources":["../../../src/hosted/node/plugin-host-headless-module.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;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gB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;QAC5B,uBAAuB,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI;QAC9C,2BAA2B,EAAE,GAAG,EAAE,CAAC,SAAS;KAC/C,CAAC;IACF,MAAM,oBAAoB,GAA8B;QACpD,mCAAmC,EAAE,GAAG,EAAE,CAAC,SAAS;QACpD,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS;QAC1B,gCAAgC,EAAE,GAAG,EAAE,CAAC,IAAI,iCAAiC,CAAC,KAAK,CAAC;KACvF,CAAC;IACF,IAAI,CAAC,kBAAkB,CAAC,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IACvD,IAAI,CAAC,kBAAkB,CAAC,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IACvD,IAAI,CAAC,yBAAyB,CAAC,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC;AAC1E,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EnvExtImpl } from '@theia/plugin-ext/lib/plugin/env';
|
|
2
2
|
import { LocalizationExtImpl } from '@theia/plugin-ext/lib/plugin/localization-ext';
|
|
3
|
-
import { HeadlessPluginManagerExtImpl } from '../../plugin/headless-plugin-manager';
|
|
3
|
+
import { HeadlessPluginManagerExtImpl } from '../../plugin/headless-plugin-manager.js';
|
|
4
4
|
import { AbstractPluginHostRPC, ExtInterfaces } from '@theia/plugin-ext/lib/hosted/node/plugin-host-rpc';
|
|
5
5
|
import { PluginModel } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
|
6
|
-
import { ExtPluginApi } from '../../common/plugin-ext-headless-api-contribution';
|
|
6
|
+
import { ExtPluginApi } from '../../common/plugin-ext-headless-api-contribution.js';
|
|
7
7
|
type HeadlessExtInterfaces = Pick<ExtInterfaces, 'envExt' | 'localizationExt'>;
|
|
8
8
|
/**
|
|
9
9
|
* The RPC handler for headless plugins.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-host-headless-rpc.d.ts","sourceRoot":"","sources":["../../../src/hosted/node/plugin-host-headless-rpc.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,4BAA4B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"plugin-host-headless-rpc.d.ts","sourceRoot":"","sources":["../../../src/hosted/node/plugin-host-headless-rpc.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAwC,MAAM,sDAAsD,CAAC;AAE1H,KAAK,qBAAqB,GAAG,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,iBAAiB,CAAC,CAAC;AAE/E;;GAEG;AACH,qBACa,qBAAsB,SAAQ,qBAAqB,CAAC,4BAA4B,EAAE,IAAI,EAAE,qBAAqB,CAAC;IAEvH,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAGtC,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAC;;IAUxD,SAAS,CAAC,mBAAmB,IAAI,qBAAqB;IAOtD,SAAS,CAAC,gBAAgB,CAAC,cAAc,EAAE,qBAAqB,GAAG,IAAI;cAKpD,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS;IAIrF,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;CAenD"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2024 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,23 +13,20 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const localization_ext_1 = require("@theia/plugin-ext/lib/plugin/localization-ext");
|
|
25
|
-
const headless_plugin_rpc_1 = require("../../common/headless-plugin-rpc");
|
|
26
|
-
const plugin_host_rpc_1 = require("@theia/plugin-ext/lib/hosted/node/plugin-host-rpc");
|
|
16
|
+
import { __decorate } from "tslib";
|
|
17
|
+
import { dynamicRequire } from '@theia/core/lib/node/dynamic-require';
|
|
18
|
+
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
19
|
+
import { EnvExtImpl } from '@theia/plugin-ext/lib/plugin/env';
|
|
20
|
+
import { LocalizationExt } from '@theia/plugin-ext';
|
|
21
|
+
import { HEADLESSMAIN_RPC_CONTEXT } from '../../common/headless-plugin-rpc.js';
|
|
22
|
+
import { AbstractPluginHostRPC } from '@theia/plugin-ext/lib/hosted/node/plugin-host-rpc';
|
|
27
23
|
/**
|
|
28
24
|
* The RPC handler for headless plugins.
|
|
29
25
|
*/
|
|
30
|
-
let HeadlessPluginHostRPC = class HeadlessPluginHostRPC extends
|
|
26
|
+
let HeadlessPluginHostRPC = class HeadlessPluginHostRPC extends AbstractPluginHostRPC {
|
|
31
27
|
constructor() {
|
|
32
28
|
super('HEADLESS_PLUGIN_HOST', undefined, {
|
|
33
|
-
$pluginManager:
|
|
29
|
+
$pluginManager: HEADLESSMAIN_RPC_CONTEXT.HOSTED_PLUGIN_MANAGER_EXT,
|
|
34
30
|
});
|
|
35
31
|
}
|
|
36
32
|
createExtInterfaces() {
|
|
@@ -48,7 +44,7 @@ let HeadlessPluginHostRPC = class HeadlessPluginHostRPC extends plugin_host_rpc_
|
|
|
48
44
|
}
|
|
49
45
|
initExtApi(extApi) {
|
|
50
46
|
if (extApi.headlessInitPath) {
|
|
51
|
-
const { containerModule, provideApi } =
|
|
47
|
+
const { containerModule, provideApi } = dynamicRequire(extApi.headlessInitPath);
|
|
52
48
|
if (containerModule) {
|
|
53
49
|
this.loadContainerModule(containerModule);
|
|
54
50
|
}
|
|
@@ -58,17 +54,14 @@ let HeadlessPluginHostRPC = class HeadlessPluginHostRPC extends plugin_host_rpc_
|
|
|
58
54
|
}
|
|
59
55
|
}
|
|
60
56
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
(0, inversify_1.inject)(env_1.EnvExtImpl),
|
|
64
|
-
tslib_1.__metadata("design:type", env_1.EnvExtImpl)
|
|
57
|
+
__decorate([
|
|
58
|
+
inject(EnvExtImpl)
|
|
65
59
|
], HeadlessPluginHostRPC.prototype, "envExt", void 0);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
tslib_1.__metadata("design:type", localization_ext_1.LocalizationExtImpl)
|
|
60
|
+
__decorate([
|
|
61
|
+
inject(LocalizationExt)
|
|
69
62
|
], HeadlessPluginHostRPC.prototype, "localizationExt", void 0);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
63
|
+
HeadlessPluginHostRPC = __decorate([
|
|
64
|
+
injectable()
|
|
73
65
|
], HeadlessPluginHostRPC);
|
|
66
|
+
export { HeadlessPluginHostRPC };
|
|
74
67
|
//# sourceMappingURL=plugin-host-headless-rpc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-host-headless-rpc.js","sourceRoot":"","sources":["../../../src/hosted/node/plugin-host-headless-rpc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-host-headless-rpc.js","sourceRoot":"","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,CAAC;YAC/F,IAAI,eAAe,EAAE,CAAC;gBAClB,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;YAC9C,CAAC;YACD,IAAI,UAAU,EAAE,CAAC;gBACb,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;YAC7C,CAAC;QACL,CAAC;IACL,CAAC;CACJ,CAAA;AA5CsB;IADlB,MAAM,CAAC,UAAU,CAAC;qDACmB;AAGnB;IADlB,MAAM,CAAC,eAAe,CAAC;8DACgC;AAL/C,qBAAqB;IADjC,UAAU,EAAE;GACA,qBAAqB,CA8CjC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
1
|
// *****************************************************************************
|
|
5
2
|
// Copyright (C) 2018 Red Hat, Inc. and others.
|
|
6
3
|
//
|
|
@@ -16,15 +13,15 @@ const tslib_1 = require("tslib");
|
|
|
16
13
|
//
|
|
17
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
18
15
|
// *****************************************************************************
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
import '@theia/core/shared/reflect-metadata';
|
|
17
|
+
import { suppressNodeNavigator } from '@theia/plugin-ext/lib/hosted/node/plugin-host-navigator-override';
|
|
18
|
+
import { Container } from '@theia/core/shared/inversify';
|
|
19
|
+
import { ConnectionClosedError, RPCProtocol } from '@theia/plugin-ext/lib/common/rpc-protocol';
|
|
20
|
+
import { ProcessTerminatedMessage, ProcessTerminateMessage } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin-protocol';
|
|
21
|
+
import { HeadlessPluginHostRPC } from './plugin-host-headless-rpc.js';
|
|
22
|
+
import pluginHostModule from './plugin-host-headless-module.js';
|
|
26
23
|
// Undefine globalThis.navigator unless opted in, see https://github.com/eclipse-theia/theia/issues/16233
|
|
27
|
-
|
|
24
|
+
suppressNodeNavigator();
|
|
28
25
|
const banner = `HEADLESS_PLUGIN_HOST(${process.pid}):`;
|
|
29
26
|
console.log(banner, 'Starting instance');
|
|
30
27
|
// override exit() function, to do not allow plugin kill this node
|
|
@@ -54,7 +51,7 @@ process.on('unhandledRejection', (reason, promise) => {
|
|
|
54
51
|
if (index >= 0) {
|
|
55
52
|
promise.catch(err => {
|
|
56
53
|
unhandledPromises.splice(index, 1);
|
|
57
|
-
if (terminating && (
|
|
54
|
+
if (terminating && (ConnectionClosedError.is(err) || ConnectionClosedError.is(reason))) {
|
|
58
55
|
// during termination it is expected that pending rpc request are rejected
|
|
59
56
|
return;
|
|
60
57
|
}
|
|
@@ -74,17 +71,17 @@ process.on('rejectionHandled', (promise) => {
|
|
|
74
71
|
}
|
|
75
72
|
});
|
|
76
73
|
let terminating = false;
|
|
77
|
-
const container = new
|
|
78
|
-
container.load(
|
|
79
|
-
const rpc = container.get(
|
|
80
|
-
const pluginHostRPC = container.get(
|
|
74
|
+
const container = new Container();
|
|
75
|
+
container.load(pluginHostModule);
|
|
76
|
+
const rpc = container.get(RPCProtocol);
|
|
77
|
+
const pluginHostRPC = container.get(HeadlessPluginHostRPC);
|
|
81
78
|
process.on('message', async (message) => {
|
|
82
79
|
if (terminating) {
|
|
83
80
|
return;
|
|
84
81
|
}
|
|
85
82
|
try {
|
|
86
83
|
const msg = JSON.parse(message);
|
|
87
|
-
if (
|
|
84
|
+
if (ProcessTerminateMessage.is(msg)) {
|
|
88
85
|
terminating = true;
|
|
89
86
|
if (msg.stopTimeout) {
|
|
90
87
|
await Promise.race([
|
|
@@ -97,7 +94,7 @@ process.on('message', async (message) => {
|
|
|
97
94
|
}
|
|
98
95
|
rpc.dispose();
|
|
99
96
|
if (process.send) {
|
|
100
|
-
process.send(JSON.stringify({ type:
|
|
97
|
+
process.send(JSON.stringify({ type: ProcessTerminatedMessage.TYPE }));
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-host-headless.js","sourceRoot":"","sources":["../../../src/hosted/node/plugin-host-headless.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-host-headless.js","sourceRoot":"","sources":["../../../src/hosted/node/plugin-host-headless.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,OAAO,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kEAAkE,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC/F,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AAC7H,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAEhE,yGAAyG;AACzG,qBAAqB,EAAE,CAAC;AAExB,MAAM,MAAM,GAAG,wBAAwB,OAAO,CAAC,GAAG,IAAI,CAAC;AACvD,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAEzC,kEAAkE;AAClE,OAAO,CAAC,IAAI,GAAG,UAAU,IAAa;IAClC,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAC5E,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,CAA6B,CAAC;AAE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AAE,GAAG,CAAC,WAAW,CAAC,CAAC;iBAC/D,CAAC,CAAC;YACP,CAAC;iBAAM,CAAC;gBACJ,MAAM,aAAa,CAAC,SAAS,EAAE,CAAC;YACpC,CAAC;YACD,GAAG,CAAC,OAAO,EAAE,CAAC;YACd,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;gBACf,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,wBAAwB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YAC1E,CAAC;QAEL,CAAC;IACL,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2024 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,14 +13,12 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
exports.TheiaHeadlessPluginScanner = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
16
|
+
import { __decorate } from "tslib";
|
|
20
17
|
/* eslint-disable @theia/localization-check */
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
let TheiaHeadlessPluginScanner = class TheiaHeadlessPluginScanner extends
|
|
18
|
+
import { injectable } from '@theia/core/shared/inversify';
|
|
19
|
+
import { AbstractPluginScanner } from '@theia/plugin-ext/lib/hosted/node/scanners/scanner-theia';
|
|
20
|
+
import { deepClone } from '@theia/core/lib/common/objects';
|
|
21
|
+
let TheiaHeadlessPluginScanner = class TheiaHeadlessPluginScanner extends AbstractPluginScanner {
|
|
25
22
|
constructor() {
|
|
26
23
|
super('theiaHeadlessPlugin');
|
|
27
24
|
}
|
|
@@ -60,7 +57,7 @@ let TheiaHeadlessPluginScanner = class TheiaHeadlessPluginScanner extends scanne
|
|
|
60
57
|
};
|
|
61
58
|
}
|
|
62
59
|
adaptMetadataForHeadless(plugin) {
|
|
63
|
-
const result =
|
|
60
|
+
const result = deepClone(plugin.metadata);
|
|
64
61
|
const lifecycle = result.lifecycle;
|
|
65
62
|
delete lifecycle.frontendInitPath;
|
|
66
63
|
delete lifecycle.backendInitPath;
|
|
@@ -74,9 +71,8 @@ let TheiaHeadlessPluginScanner = class TheiaHeadlessPluginScanner extends scanne
|
|
|
74
71
|
return undefined;
|
|
75
72
|
}
|
|
76
73
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
(0, inversify_1.injectable)(),
|
|
80
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
74
|
+
TheiaHeadlessPluginScanner = __decorate([
|
|
75
|
+
injectable()
|
|
81
76
|
], TheiaHeadlessPluginScanner);
|
|
77
|
+
export { TheiaHeadlessPluginScanner };
|
|
82
78
|
//# sourceMappingURL=scanner-theia-headless.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner-theia-headless.js","sourceRoot":"","sources":["../../../../src/hosted/node/scanners/scanner-theia-headless.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scanner-theia-headless.js","sourceRoot":"","sources":["../../../../src/hosted/node/scanners/scanner-theia-headless.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,8CAA8C;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,qBAA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
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2024 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,10 +13,8 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function bindElectronBackend(bind) {
|
|
21
|
-
(0, plugin_ext_headless_hosted_module_1.bindCommonHostedBackend)(bind);
|
|
16
|
+
import { bindCommonHostedBackend } from '../node/plugin-ext-headless-hosted-module.js';
|
|
17
|
+
export function bindElectronBackend(bind) {
|
|
18
|
+
bindCommonHostedBackend(bind);
|
|
22
19
|
}
|
|
23
20
|
//# sourceMappingURL=plugin-ext-headless-hosted-electron-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-ext-headless-hosted-electron-module.js","sourceRoot":"","sources":["../../../src/hosted/node-electron/plugin-ext-headless-hosted-electron-module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-ext-headless-hosted-electron-module.js","sourceRoot":"","sources":["../../../src/hosted/node-electron/plugin-ext-headless-hosted-electron-module.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAGhF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAEvF,MAAM,UAAU,mBAAmB,CAAC,IAAqB;IACrD,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './common';
|
|
1
|
+
export * from './common/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,cAAc,mBAAmB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2024 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,7 +13,5 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
const tslib_1 = require("tslib");
|
|
19
|
-
tslib_1.__exportStar(require("./common"), exports);
|
|
16
|
+
export * from './common/index.js';
|
|
20
17
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2024 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,24 +13,22 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const plugin_theia_directory_handler_1 = require("@theia/plugin-ext/lib/main/node/handlers/plugin-theia-directory-handler");
|
|
23
|
-
let PluginTheiaHeadlessDirectoryHandler = class PluginTheiaHeadlessDirectoryHandler extends plugin_theia_directory_handler_1.AbstractPluginDirectoryHandler {
|
|
16
|
+
import { __decorate } from "tslib";
|
|
17
|
+
import { injectable } from '@theia/core/shared/inversify';
|
|
18
|
+
import { PluginDeployerEntryType } from '@theia/plugin-ext';
|
|
19
|
+
import { AbstractPluginDirectoryHandler } from '@theia/plugin-ext/lib/main/node/handlers/plugin-theia-directory-handler';
|
|
20
|
+
let PluginTheiaHeadlessDirectoryHandler = class PluginTheiaHeadlessDirectoryHandler extends AbstractPluginDirectoryHandler {
|
|
24
21
|
acceptManifest(plugin) {
|
|
25
22
|
return plugin?.engines?.theiaPlugin === undefined && 'theiaHeadlessPlugin' in plugin.engines;
|
|
26
23
|
}
|
|
27
24
|
async handle(context) {
|
|
28
25
|
await this.copyDirectory(context);
|
|
29
|
-
const types = [
|
|
26
|
+
const types = [PluginDeployerEntryType.HEADLESS];
|
|
30
27
|
context.pluginEntry().accept(...types);
|
|
31
28
|
}
|
|
32
29
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
(0, inversify_1.injectable)()
|
|
30
|
+
PluginTheiaHeadlessDirectoryHandler = __decorate([
|
|
31
|
+
injectable()
|
|
36
32
|
], PluginTheiaHeadlessDirectoryHandler);
|
|
33
|
+
export { PluginTheiaHeadlessDirectoryHandler };
|
|
37
34
|
//# sourceMappingURL=plugin-theia-headless-directory-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-theia-headless-directory-handler.js","sourceRoot":"","sources":["../../../../src/main/node/handlers/plugin-theia-headless-directory-handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-theia-headless-directory-handler.js","sourceRoot":"","sources":["../../../../src/main/node/handlers/plugin-theia-headless-directory-handler.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAyC,uBAAuB,EAAiB,MAAM,mBAAmB,CAAC;AAClH,OAAO,EAAE,8BAA8B,EAAE,MAAM,yEAAyE,CAAC;AAGlH,IAAM,mCAAmC,GAAzC,MAAM,mCAAoC,SAAQ,8BAA8B;IAEzE,cAAc,CAAC,MAAqB;QAC1C,OAAO,MAAM,EAAE,OAAO,EAAE,WAAW,KAAK,SAAS,IAAI,qBAAqB,IAAI,MAAM,CAAC,OAAO,CAAC;IACjG,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAA8C;QACvD,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAClC,MAAM,KAAK,GAA8B,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC;QAC5E,OAAO,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC;IAC3C,CAAC;CAEJ,CAAA;AAZY,mCAAmC;IAD/C,UAAU,EAAE;GACA,mCAAmC,CAY/C"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2024 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,11 +13,9 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const core_1 = require("@theia/core");
|
|
16
|
+
import { __decorate } from "tslib";
|
|
17
|
+
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
18
|
+
import { ProgressMessage, ILogger } from '@theia/core';
|
|
22
19
|
/**
|
|
23
20
|
* A simple progress client for headless plugins that just writes debug messages to the console
|
|
24
21
|
* because there is no one connected frontend to which it is appropriate to send the messages.
|
|
@@ -26,7 +23,7 @@ const core_1 = require("@theia/core");
|
|
|
26
23
|
let HeadlessProgressClient = class HeadlessProgressClient {
|
|
27
24
|
async showProgress(_progressId, message, cancellationToken) {
|
|
28
25
|
if (cancellationToken.isCancellationRequested) {
|
|
29
|
-
return
|
|
26
|
+
return ProgressMessage.Cancel;
|
|
30
27
|
}
|
|
31
28
|
this.logger.debug(message.text);
|
|
32
29
|
}
|
|
@@ -39,13 +36,12 @@ let HeadlessProgressClient = class HeadlessProgressClient {
|
|
|
39
36
|
this.logger.debug(text);
|
|
40
37
|
}
|
|
41
38
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
(
|
|
45
|
-
(0, inversify_1.named)('plugin-ext-headless:HeadlessProgressClient'),
|
|
46
|
-
tslib_1.__metadata("design:type", Object)
|
|
39
|
+
__decorate([
|
|
40
|
+
inject(ILogger),
|
|
41
|
+
named('plugin-ext-headless:HeadlessProgressClient')
|
|
47
42
|
], HeadlessProgressClient.prototype, "logger", void 0);
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
HeadlessProgressClient = __decorate([
|
|
44
|
+
injectable()
|
|
50
45
|
], HeadlessProgressClient);
|
|
46
|
+
export { HeadlessProgressClient };
|
|
51
47
|
//# sourceMappingURL=headless-progress-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headless-progress-client.js","sourceRoot":"","sources":["../../../src/main/node/headless-progress-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"headless-progress-client.js","sourceRoot":"","sources":["../../../src/main/node/headless-progress-client.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAEa,eAAe,EAAkB,OAAO,EAC3D,MAAM,aAAa,CAAC;AAErB;;;GAGG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAK/B,KAAK,CAAC,YAAY,CAAC,WAAmB,EAAE,OAAwB,EAAE,iBAAoC;QAClG,IAAI,iBAAiB,CAAC,uBAAuB,EAAE,CAAC;YAC5C,OAAO,eAAe,CAAC,MAAM,CAAC;QAClC,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,WAAmB,EAAE,MAAsB,EAAE,OAAwB,EAAE,iBAAoC;QAC5H,IAAI,iBAAiB,CAAC,uBAAuB,EAAE,CAAC;YAC5C,OAAO;QACX,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACzI,MAAM,IAAI,GAAG,GAAG,QAAQ,IAAI,MAAM,CAAC,OAAO,IAAI,eAAe,EAAE,CAAC;QAChE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACJ,CAAA;AAjBsB;IADlB,MAAM,CAAC,OAAO,CAAC;IAAE,KAAK,CAAC,4CAA4C,CAAC;sDAClC;AAH1B,sBAAsB;IADlC,UAAU,EAAE;GACA,sBAAsB,CAoBlC"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const basic_message_registry_main_1 = require("@theia/plugin-ext/lib/main/common/basic-message-registry-main");
|
|
6
|
-
const basic_notification_main_1 = require("@theia/plugin-ext/lib/main/common/basic-notification-main");
|
|
7
|
-
const headless_plugin_rpc_1 = require("../../common/headless-plugin-rpc");
|
|
1
|
+
import { EnvMainImpl } from '@theia/plugin-ext/lib/main/common/env-main';
|
|
2
|
+
import { BasicMessageRegistryMainImpl } from '@theia/plugin-ext/lib/main/common/basic-message-registry-main';
|
|
3
|
+
import { BasicNotificationMainImpl } from '@theia/plugin-ext/lib/main/common/basic-notification-main';
|
|
4
|
+
import { HEADLESSMAIN_RPC_CONTEXT, HEADLESSPLUGIN_RPC_CONTEXT } from '../../common/headless-plugin-rpc.js';
|
|
8
5
|
// This sets up only the minimal plugin API required by the plugin manager to report
|
|
9
6
|
// messages and notifications to the main side and to initialize plugins.
|
|
10
|
-
function setUpPluginApi(rpc, container) {
|
|
11
|
-
const envMain = new
|
|
12
|
-
rpc.set(
|
|
13
|
-
const messageRegistryMain = new
|
|
14
|
-
rpc.set(
|
|
15
|
-
const notificationMain = new
|
|
16
|
-
rpc.set(
|
|
7
|
+
export function setUpPluginApi(rpc, container) {
|
|
8
|
+
const envMain = new EnvMainImpl(rpc, container);
|
|
9
|
+
rpc.set(HEADLESSPLUGIN_RPC_CONTEXT.ENV_MAIN, envMain);
|
|
10
|
+
const messageRegistryMain = new BasicMessageRegistryMainImpl(container);
|
|
11
|
+
rpc.set(HEADLESSPLUGIN_RPC_CONTEXT.MESSAGE_REGISTRY_MAIN, messageRegistryMain);
|
|
12
|
+
const notificationMain = new BasicNotificationMainImpl(rpc, container, HEADLESSMAIN_RPC_CONTEXT.NOTIFICATION_EXT);
|
|
13
|
+
rpc.set(HEADLESSPLUGIN_RPC_CONTEXT.NOTIFICATION_MAIN, notificationMain);
|
|
17
14
|
}
|
|
18
15
|
//# sourceMappingURL=main-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-context.js","sourceRoot":"","sources":["../../../src/main/node/main-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main-context.js","sourceRoot":"","sources":["../../../src/main/node/main-context.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAC;AAC7G,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAC;AAEtG,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAE3G,oFAAoF;AACpF,yEAAyE;AACzE,MAAM,UAAU,cAAc,CAAC,GAAgB,EAAE,SAA+B;IAC5E,MAAM,OAAO,GAAG,IAAI,WAAW,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAChD,GAAG,CAAC,GAAG,CAAC,0BAA0B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAEtD,MAAM,mBAAmB,GAAG,IAAI,4BAA4B,CAAC,SAAS,CAAC,CAAC;IACxE,GAAG,CAAC,GAAG,CAAC,0BAA0B,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;IAE/E,MAAM,gBAAgB,GAAG,IAAI,yBAAyB,CAAC,GAAG,EAAE,SAAS,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IAClH,GAAG,CAAC,GAAG,CAAC,0BAA0B,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;AAC5E,CAAC"}
|