@theia/plugin-ext-headless 1.67.0-next.3 → 1.67.0-next.56

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 (89) hide show
  1. package/package.json +5 -5
  2. package/lib/common/headless-plugin-container.d.ts +0 -8
  3. package/lib/common/headless-plugin-container.d.ts.map +0 -1
  4. package/lib/common/headless-plugin-container.js +0 -26
  5. package/lib/common/headless-plugin-container.js.map +0 -1
  6. package/lib/common/headless-plugin-protocol.d.ts +0 -21
  7. package/lib/common/headless-plugin-protocol.d.ts.map +0 -1
  8. package/lib/common/headless-plugin-protocol.js +0 -26
  9. package/lib/common/headless-plugin-protocol.js.map +0 -1
  10. package/lib/common/headless-plugin-rpc.d.ts +0 -23
  11. package/lib/common/headless-plugin-rpc.d.ts.map +0 -1
  12. package/lib/common/headless-plugin-rpc.js +0 -31
  13. package/lib/common/headless-plugin-rpc.js.map +0 -1
  14. package/lib/common/index.d.ts +0 -5
  15. package/lib/common/index.d.ts.map +0 -1
  16. package/lib/common/index.js +0 -27
  17. package/lib/common/index.js.map +0 -1
  18. package/lib/common/plugin-ext-headless-api-contribution.d.ts +0 -38
  19. package/lib/common/plugin-ext-headless-api-contribution.d.ts.map +0 -1
  20. package/lib/common/plugin-ext-headless-api-contribution.js +0 -20
  21. package/lib/common/plugin-ext-headless-api-contribution.js.map +0 -1
  22. package/lib/hosted/node/headless-hosted-plugin.d.ts +0 -30
  23. package/lib/hosted/node/headless-hosted-plugin.d.ts.map +0 -1
  24. package/lib/hosted/node/headless-hosted-plugin.js +0 -184
  25. package/lib/hosted/node/headless-hosted-plugin.js.map +0 -1
  26. package/lib/hosted/node/headless-plugin-service.d.ts +0 -5
  27. package/lib/hosted/node/headless-plugin-service.d.ts.map +0 -1
  28. package/lib/hosted/node/headless-plugin-service.js +0 -31
  29. package/lib/hosted/node/headless-plugin-service.js.map +0 -1
  30. package/lib/hosted/node/plugin-ext-headless-hosted-module.d.ts +0 -4
  31. package/lib/hosted/node/plugin-ext-headless-hosted-module.d.ts.map +0 -1
  32. package/lib/hosted/node/plugin-ext-headless-hosted-module.js +0 -70
  33. package/lib/hosted/node/plugin-ext-headless-hosted-module.js.map +0 -1
  34. package/lib/hosted/node/plugin-host-headless-module.d.ts +0 -5
  35. package/lib/hosted/node/plugin-host-headless-module.d.ts.map +0 -1
  36. package/lib/hosted/node/plugin-host-headless-module.js +0 -74
  37. package/lib/hosted/node/plugin-host-headless-module.js.map +0 -1
  38. package/lib/hosted/node/plugin-host-headless-rpc.d.ts +0 -21
  39. package/lib/hosted/node/plugin-host-headless-rpc.d.ts.map +0 -1
  40. package/lib/hosted/node/plugin-host-headless-rpc.js +0 -74
  41. package/lib/hosted/node/plugin-host-headless-rpc.js.map +0 -1
  42. package/lib/hosted/node/plugin-host-headless.d.ts +0 -2
  43. package/lib/hosted/node/plugin-host-headless.d.ts.map +0 -1
  44. package/lib/hosted/node/plugin-host-headless.js +0 -104
  45. package/lib/hosted/node/plugin-host-headless.js.map +0 -1
  46. package/lib/hosted/node/scanners/scanner-theia-headless.d.ts +0 -26
  47. package/lib/hosted/node/scanners/scanner-theia-headless.d.ts.map +0 -1
  48. package/lib/hosted/node/scanners/scanner-theia-headless.js +0 -83
  49. package/lib/hosted/node/scanners/scanner-theia-headless.js.map +0 -1
  50. package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.d.ts +0 -3
  51. package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.d.ts.map +0 -1
  52. package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.js +0 -24
  53. package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.js.map +0 -1
  54. package/lib/index.d.ts +0 -2
  55. package/lib/index.d.ts.map +0 -1
  56. package/lib/index.js +0 -20
  57. package/lib/index.js.map +0 -1
  58. package/lib/main/node/handlers/plugin-theia-headless-directory-handler.d.ts +0 -7
  59. package/lib/main/node/handlers/plugin-theia-headless-directory-handler.d.ts.map +0 -1
  60. package/lib/main/node/handlers/plugin-theia-headless-directory-handler.js +0 -38
  61. package/lib/main/node/handlers/plugin-theia-headless-directory-handler.js.map +0 -1
  62. package/lib/main/node/headless-progress-client.d.ts +0 -10
  63. package/lib/main/node/headless-progress-client.d.ts.map +0 -1
  64. package/lib/main/node/headless-progress-client.js +0 -47
  65. package/lib/main/node/headless-progress-client.js.map +0 -1
  66. package/lib/main/node/main-context.d.ts +0 -4
  67. package/lib/main/node/main-context.d.ts.map +0 -1
  68. package/lib/main/node/main-context.js +0 -19
  69. package/lib/main/node/main-context.js.map +0 -1
  70. package/lib/main/node/plugin-ext-headless-main-module.d.ts +0 -4
  71. package/lib/main/node/plugin-ext-headless-main-module.d.ts.map +0 -1
  72. package/lib/main/node/plugin-ext-headless-main-module.js +0 -38
  73. package/lib/main/node/plugin-ext-headless-main-module.js.map +0 -1
  74. package/lib/package.spec.d.ts +0 -1
  75. package/lib/package.spec.d.ts.map +0 -1
  76. package/lib/package.spec.js +0 -24
  77. package/lib/package.spec.js.map +0 -1
  78. package/lib/plugin/headless-plugin-manager.d.ts +0 -10
  79. package/lib/plugin/headless-plugin-manager.d.ts.map +0 -1
  80. package/lib/plugin/headless-plugin-manager.js +0 -51
  81. package/lib/plugin/headless-plugin-manager.js.map +0 -1
  82. package/lib/plugin-ext-headless-electron-module.d.ts +0 -4
  83. package/lib/plugin-ext-headless-electron-module.d.ts.map +0 -1
  84. package/lib/plugin-ext-headless-electron-module.js +0 -32
  85. package/lib/plugin-ext-headless-electron-module.js.map +0 -1
  86. package/lib/plugin-ext-headless-module.d.ts +0 -4
  87. package/lib/plugin-ext-headless-module.d.ts.map +0 -1
  88. package/lib/plugin-ext-headless-module.js +0 -31
  89. package/lib/plugin-ext-headless-module.js.map +0 -1
@@ -1,70 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2024 EclipseSource and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.bindHeadlessHosted = exports.bindCommonHostedBackend = void 0;
19
- const path = require("path");
20
- const contribution_provider_1 = require("@theia/core/lib/common/contribution-provider");
21
- const node_1 = require("@theia/core/lib/node");
22
- const plugin_ext_1 = require("@theia/plugin-ext");
23
- const hosted_plugin_1 = require("@theia/plugin-ext/lib/hosted/node/hosted-plugin");
24
- const hosted_plugin_process_1 = require("@theia/plugin-ext/lib/hosted/node/hosted-plugin-process");
25
- const plugin_service_1 = require("@theia/plugin-ext/lib/hosted/node/plugin-service");
26
- const headless_plugin_container_1 = require("../../common/headless-plugin-container");
27
- const headless_hosted_plugin_1 = require("./headless-hosted-plugin");
28
- const scanner_theia_headless_1 = require("./scanners/scanner-theia-headless");
29
- const headless_plugin_protocol_1 = require("../../common/headless-plugin-protocol");
30
- const headless_plugin_service_1 = require("./headless-plugin-service");
31
- function bindCommonHostedBackend(bind) {
32
- bind(hosted_plugin_process_1.HostedPluginProcess).toSelf().inSingletonScope();
33
- bind(hosted_plugin_1.HostedPluginSupport).toSelf().inSingletonScope();
34
- (0, contribution_provider_1.bindContributionProvider)(bind, Symbol.for(plugin_ext_1.ExtPluginApiProvider));
35
- (0, contribution_provider_1.bindContributionProvider)(bind, plugin_ext_1.PluginHostEnvironmentVariable);
36
- (0, contribution_provider_1.bindContributionProvider)(bind, headless_plugin_protocol_1.SupportedHeadlessActivationEvents);
37
- bind(headless_plugin_service_1.HeadlessHostedPluginServerImpl).toSelf().inSingletonScope();
38
- bind(plugin_ext_1.HostedPluginServer).toService(headless_plugin_service_1.HeadlessHostedPluginServerImpl);
39
- bind(headless_hosted_plugin_1.HeadlessHostedPluginSupport).toSelf().inSingletonScope();
40
- bind(plugin_service_1.BackendPluginHostableFilter).toConstantValue(headless_hosted_plugin_1.isHeadlessPlugin);
41
- bind(hosted_plugin_process_1.HostedPluginProcessConfiguration).toConstantValue({
42
- path: path.join(__dirname, 'plugin-host-headless'),
43
- });
44
- }
45
- exports.bindCommonHostedBackend = bindCommonHostedBackend;
46
- function bindHeadlessHosted(bind) {
47
- bind(scanner_theia_headless_1.TheiaHeadlessPluginScanner).toSelf().inSingletonScope();
48
- bind(plugin_ext_1.PluginScanner).toService(scanner_theia_headless_1.TheiaHeadlessPluginScanner);
49
- bind(headless_plugin_protocol_1.SupportedHeadlessActivationEvents).toConstantValue(['*', 'onStartupFinished']);
50
- bind(node_1.BackendApplicationContribution).toDynamicValue(({ container }) => {
51
- let hostedPluginSupport;
52
- return {
53
- onStart() {
54
- // Create a child container to isolate the Headless Plugin hosting stack
55
- // from all connection-scoped frontend/backend plugin hosts and
56
- // also to avoid leaking it into the global container scope
57
- const headlessPluginsContainer = container.createChild();
58
- const modules = container.getAll(headless_plugin_container_1.HeadlessPluginContainerModule);
59
- headlessPluginsContainer.load(...modules);
60
- hostedPluginSupport = headlessPluginsContainer.get(headless_hosted_plugin_1.HeadlessHostedPluginSupport);
61
- hostedPluginSupport.onStart(headlessPluginsContainer);
62
- },
63
- onStop() {
64
- hostedPluginSupport === null || hostedPluginSupport === void 0 ? void 0 : hostedPluginSupport.shutDown();
65
- }
66
- };
67
- });
68
- }
69
- exports.bindHeadlessHosted = bindHeadlessHosted;
70
- //# sourceMappingURL=plugin-ext-headless-hosted-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-ext-headless-hosted-module.js","sourceRoot":"","sources":["../../../src/hosted/node/plugin-ext-headless-hosted-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,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,kBAAkB,CAAC,IAAqB;IACpD,IAAI,CAAC,mDAA0B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC7D,IAAI,CAAC,0BAAa,CAAC,CAAC,SAAS,CAAC,mDAA0B,CAAC,CAAC;IAC1D,IAAI,CAAC,4DAAiC,CAAC,CAAC,eAAe,CAAC,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAEpF,IAAI,CAAC,qCAA8B,CAAC,CAAC,cAAc,CAAC,CAAC,EAAC,SAAS,EAAC,EAAE,EAAE;QAChE,IAAI,mBAA4D,CAAC;QAEjE,OAAO;YACH,OAAO;gBACH,wEAAwE;gBACxE,+DAA+D;gBAC/D,2DAA2D;gBAC3D,MAAM,wBAAwB,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;gBACzD,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,CAAkB,yDAA6B,CAAC,CAAC;gBACjF,wBAAwB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;gBAE1C,mBAAmB,GAAG,wBAAwB,CAAC,GAAG,CAAC,oDAA2B,CAAC,CAAC;gBAChF,mBAAmB,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;YAC1D,CAAC;YAED,MAAM;gBACF,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,QAAQ,EAAE,CAAC;YACpC,CAAC;SACJ,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC;AA1BD,gDA0BC"}
@@ -1,5 +0,0 @@
1
- import '@theia/core/shared/reflect-metadata';
2
- import { ContainerModule } from '@theia/core/shared/inversify';
3
- declare const _default: ContainerModule;
4
- export default _default;
5
- //# sourceMappingURL=plugin-host-headless-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-host-headless-module.d.ts","sourceRoot":"","sources":["../../../src/hosted/node/plugin-host-headless-module.ts"],"names":[],"mappings":"AAeA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAkB/D,wBA0CG"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // *****************************************************************************
4
- // Copyright (C) 2024 EclipseSource and others.
5
- //
6
- // This program and the accompanying materials are made available under the
7
- // terms of the Eclipse Public License v. 2.0 which is available at
8
- // http://www.eclipse.org/legal/epl-2.0.
9
- //
10
- // This Source Code may also be made available under the following Secondary
11
- // Licenses when the conditions for such availability set forth in the Eclipse
12
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
- // with the GNU Classpath Exception which is available at
14
- // https://www.gnu.org/software/classpath/license.html.
15
- //
16
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
17
- // *****************************************************************************
18
- require("@theia/core/shared/reflect-metadata");
19
- const inversify_1 = require("@theia/core/shared/inversify");
20
- const rpc_protocol_1 = require("@theia/plugin-ext/lib/common/rpc-protocol");
21
- const plugin_host_rpc_1 = require("@theia/plugin-ext/lib/hosted/node/plugin-host-rpc");
22
- const plugin_manager_1 = require("@theia/plugin-ext/lib/plugin/plugin-manager");
23
- const plugin_host_headless_rpc_1 = require("./plugin-host-headless-rpc");
24
- const headless_plugin_manager_1 = require("../../plugin/headless-plugin-manager");
25
- const node_1 = require("@theia/core/lib/node");
26
- const env_1 = require("@theia/plugin-ext/lib/plugin/env");
27
- const env_node_ext_1 = require("@theia/plugin-ext/lib/plugin/node/env-node-ext");
28
- const plugin_ext_1 = require("@theia/plugin-ext");
29
- const localization_ext_1 = require("@theia/plugin-ext/lib/plugin/localization-ext");
30
- const plugin_storage_1 = require("@theia/plugin-ext/lib/plugin/plugin-storage");
31
- const secrets_ext_1 = require("@theia/plugin-ext/lib/plugin/secrets-ext");
32
- const terminal_ext_1 = require("@theia/plugin-ext/lib/plugin/terminal-ext");
33
- const core_1 = require("@theia/core");
34
- exports.default = new inversify_1.ContainerModule(bind => {
35
- const channel = new node_1.IPCChannel();
36
- bind(rpc_protocol_1.RPCProtocol).toConstantValue(new rpc_protocol_1.RPCProtocolImpl(channel));
37
- bind(plugin_host_rpc_1.PluginContainerModuleLoader).toDynamicValue(({ container }) => (module) => {
38
- var _a;
39
- container.load(module);
40
- const internalModule = module;
41
- const pluginApiCache = (_a = internalModule.initializeApi) === null || _a === void 0 ? void 0 : _a.call(internalModule, container);
42
- return pluginApiCache;
43
- }).inSingletonScope();
44
- bind(plugin_host_rpc_1.AbstractPluginHostRPC).toService(plugin_host_headless_rpc_1.HeadlessPluginHostRPC);
45
- bind(plugin_host_headless_rpc_1.HeadlessPluginHostRPC).toSelf().inSingletonScope();
46
- bind(plugin_manager_1.AbstractPluginManagerExtImpl).toService(headless_plugin_manager_1.HeadlessPluginManagerExtImpl);
47
- bind(headless_plugin_manager_1.HeadlessPluginManagerExtImpl).toSelf().inSingletonScope();
48
- bind(env_1.EnvExtImpl).to(env_node_ext_1.EnvNodeExtImpl).inSingletonScope();
49
- bind(plugin_ext_1.LocalizationExt).to(localization_ext_1.LocalizationExtImpl).inSingletonScope();
50
- const dummySecrets = {
51
- get: () => Promise.resolve(undefined),
52
- store: () => Promise.resolve(undefined),
53
- delete: () => Promise.resolve(undefined),
54
- $onDidChangePassword: () => Promise.resolve(),
55
- onDidChangePassword: () => core_1.Disposable.NULL,
56
- keys: () => Promise.resolve([]),
57
- };
58
- const dummyStorage = {
59
- init: () => undefined,
60
- setPerPluginData: () => Promise.resolve(false),
61
- getPerPluginData: () => ({}),
62
- storageDataChangedEvent: () => core_1.Disposable.NULL,
63
- $updatePluginsWorkspaceData: () => undefined
64
- };
65
- const dummyTerminalService = {
66
- $initEnvironmentVariableCollections: () => undefined,
67
- $setShell: () => undefined,
68
- getEnvironmentVariableCollection: () => new terminal_ext_1.EnvironmentVariableCollectionImpl(false),
69
- };
70
- bind(secrets_ext_1.InternalSecretsExt).toConstantValue(dummySecrets);
71
- bind(plugin_storage_1.InternalStorageExt).toConstantValue(dummyStorage);
72
- bind(plugin_manager_1.MinimalTerminalServiceExt).toConstantValue(dummyTerminalService);
73
- });
74
- //# sourceMappingURL=plugin-host-headless-module.js.map
@@ -1 +0,0 @@
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;AAChF,+CAA6C;AAC7C,4DAA+D;AAC/D,4EAAyF;AACzF,uFAAuH;AACvH,gFAAsH;AACtH,yEAAmE;AACnE,kFAAoF;AACpF,+CAAkD;AAGlD,0DAA8D;AAC9D,iFAAgF;AAChF,kDAAoD;AACpD,oFAAoF;AACpF,gFAAiF;AACjF,0EAA8E;AAC9E,4EAA8F;AAC9F,sCAAyC;AAEzC,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,MAAM,OAAO,GAAG,IAAI,iBAAU,EAAE,CAAC;IACjC,IAAI,CAAC,0BAAW,CAAC,CAAC,eAAe,CAAC,IAAI,8BAAe,CAAC,OAAO,CAAC,CAAC,CAAC;IAEhE,IAAI,CAAC,6CAA2B,CAAC,CAAC,cAAc,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAC/D,CAAC,MAAuB,EAAE,EAAE;;QACxB,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,MAAM,cAAc,GAAG,MAAuC,CAAC;QAC/D,MAAM,cAAc,GAAG,MAAA,cAAc,CAAC,aAAa,+DAAG,SAAS,CAAC,CAAC;QACjE,OAAO,cAAc,CAAC;IAC1B,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAE1B,IAAI,CAAC,uC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AM,oBAAoB,GAA8B;QACpD,mCAAmC,EAAE,GAAG,EAAE,CAAC,SAAS;QACpD,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS;QAC1B,gCAAgC,EAAE,GAAG,EAAE,CAAC,IAAI,gDAAiC,CAAC,KAAK,CAAC;KACvF,CAAC;IACF,IAAI,CAAC,gCAAkB,CAAC,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IACvD,IAAI,CAAC,mCAAkB,CAAC,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IACvD,IAAI,CAAC,0CAAyB,CAAC,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC;AAC1E,CAAC,CAAC,CAAC"}
@@ -1,21 +0,0 @@
1
- import { EnvExtImpl } from '@theia/plugin-ext/lib/plugin/env';
2
- import { LocalizationExtImpl } from '@theia/plugin-ext/lib/plugin/localization-ext';
3
- import { HeadlessPluginManagerExtImpl } from '../../plugin/headless-plugin-manager';
4
- import { AbstractPluginHostRPC, ExtInterfaces } from '@theia/plugin-ext/lib/hosted/node/plugin-host-rpc';
5
- import { PluginModel } from '@theia/plugin-ext/lib/common/plugin-protocol';
6
- import { ExtPluginApi } from '../../common/plugin-ext-headless-api-contribution';
7
- type HeadlessExtInterfaces = Pick<ExtInterfaces, 'envExt' | 'localizationExt'>;
8
- /**
9
- * The RPC handler for headless plugins.
10
- */
11
- export declare class HeadlessPluginHostRPC extends AbstractPluginHostRPC<HeadlessPluginManagerExtImpl, null, HeadlessExtInterfaces> {
12
- protected readonly envExt: EnvExtImpl;
13
- protected readonly localizationExt: LocalizationExtImpl;
14
- constructor();
15
- protected createExtInterfaces(): HeadlessExtInterfaces;
16
- protected createAPIFactory(_extInterfaces: HeadlessExtInterfaces): null;
17
- protected getBackendPluginPath(pluginModel: PluginModel): string | undefined;
18
- protected initExtApi(extApi: ExtPluginApi): void;
19
- }
20
- export {};
21
- //# sourceMappingURL=plugin-host-headless-rpc.d.ts.map
@@ -1 +0,0 @@
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,sCAAsC,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAwC,MAAM,mDAAmD,CAAC;AAEvH,KAAK,qBAAqB,GAAG,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAC,iBAAiB,CAAC,CAAC;AAE7E;;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,74 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2024 EclipseSource and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.HeadlessPluginHostRPC = void 0;
19
- const tslib_1 = require("tslib");
20
- const dynamic_require_1 = require("@theia/core/lib/node/dynamic-require");
21
- const inversify_1 = require("@theia/core/shared/inversify");
22
- const env_1 = require("@theia/plugin-ext/lib/plugin/env");
23
- const plugin_ext_1 = require("@theia/plugin-ext");
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");
27
- /**
28
- * The RPC handler for headless plugins.
29
- */
30
- let HeadlessPluginHostRPC = class HeadlessPluginHostRPC extends plugin_host_rpc_1.AbstractPluginHostRPC {
31
- constructor() {
32
- super('HEADLESS_PLUGIN_HOST', undefined, {
33
- $pluginManager: headless_plugin_rpc_1.HEADLESSMAIN_RPC_CONTEXT.HOSTED_PLUGIN_MANAGER_EXT,
34
- });
35
- }
36
- createExtInterfaces() {
37
- return {
38
- envExt: this.envExt,
39
- localizationExt: this.localizationExt
40
- };
41
- }
42
- createAPIFactory(_extInterfaces) {
43
- // As yet there is no default API namespace for backend plugins to access the Theia framework
44
- return null;
45
- }
46
- getBackendPluginPath(pluginModel) {
47
- return pluginModel.entryPoint.headless;
48
- }
49
- initExtApi(extApi) {
50
- if (extApi.headlessInitPath) {
51
- const { containerModule, provideApi } = (0, dynamic_require_1.dynamicRequire)(extApi.headlessInitPath);
52
- if (containerModule) {
53
- this.loadContainerModule(containerModule);
54
- }
55
- if (provideApi) {
56
- provideApi(this.rpc, this.pluginManager);
57
- }
58
- }
59
- }
60
- };
61
- exports.HeadlessPluginHostRPC = HeadlessPluginHostRPC;
62
- tslib_1.__decorate([
63
- (0, inversify_1.inject)(env_1.EnvExtImpl),
64
- tslib_1.__metadata("design:type", env_1.EnvExtImpl)
65
- ], HeadlessPluginHostRPC.prototype, "envExt", void 0);
66
- tslib_1.__decorate([
67
- (0, inversify_1.inject)(plugin_ext_1.LocalizationExt),
68
- tslib_1.__metadata("design:type", localization_ext_1.LocalizationExtImpl)
69
- ], HeadlessPluginHostRPC.prototype, "localizationExt", void 0);
70
- exports.HeadlessPluginHostRPC = HeadlessPluginHostRPC = tslib_1.__decorate([
71
- (0, inversify_1.injectable)(),
72
- tslib_1.__metadata("design:paramtypes", [])
73
- ], HeadlessPluginHostRPC);
74
- //# sourceMappingURL=plugin-host-headless-rpc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-host-headless-rpc.js","sourceRoot":"","sources":["../../../src/hosted/node/plugin-host-headless-rpc.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,0EAAsE;AACtE,4DAAmF;AACnF,0DAA8D;AAC9D,kDAAoD;AACpD,oFAAoF;AACpF,0EAA4E;AAE5E,uFAAyG;AAMzG;;GAEG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,uCAAgF;IAOvH;QACI,KAAK,CAAC,sBAAsB,EAAE,SAAS,EACnC;YACI,cAAc,EAAE,8CAAwB,CAAC,yBAAyB;SACrE,CACJ,CAAC;IACN,CAAC;IAES,mBAAmB;QACzB,OAAO;YACH,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,eAAe,EAAE,IAAI,CAAC,eAAe;SACxC,CAAC;IACN,CAAC;IAES,gBAAgB,CAAC,cAAqC;QAC5D,6FAA6F;QAC7F,OAAO,IAAI,CAAC;IAChB,CAAC;IAEkB,oBAAoB,CAAC,WAAwB;QAC5D,OAAO,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC;IAC3C,CAAC;IAES,UAAU,CAAC,MAAoB;QAKrC,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;YAC1B,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,IAAA,gCAAc,EAAgB,MAAM,CAAC,gBAAgB,CAAC,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;AA9CY,sDAAqB;AAEX;IADlB,IAAA,kBAAM,EAAC,gBAAU,CAAC;sCACQ,gBAAU;qDAAC;AAGnB;IADlB,IAAA,kBAAM,EAAC,4BAAe,CAAC;sCACY,sCAAmB;8DAAC;gCAL/C,qBAAqB;IADjC,IAAA,sBAAU,GAAE;;GACA,qBAAqB,CA8CjC"}
@@ -1,2 +0,0 @@
1
- import '@theia/core/shared/reflect-metadata';
2
- //# sourceMappingURL=plugin-host-headless.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-host-headless.d.ts","sourceRoot":"","sources":["../../../src/hosted/node/plugin-host-headless.ts"],"names":[],"mappings":"AAeA,OAAO,qCAAqC,CAAC"}
@@ -1,104 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // *****************************************************************************
4
- // Copyright (C) 2018 Red Hat, Inc. and others.
5
- //
6
- // This program and the accompanying materials are made available under the
7
- // terms of the Eclipse Public License v. 2.0 which is available at
8
- // http://www.eclipse.org/legal/epl-2.0.
9
- //
10
- // This Source Code may also be made available under the following Secondary
11
- // Licenses when the conditions for such availability set forth in the Eclipse
12
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
- // with the GNU Classpath Exception which is available at
14
- // https://www.gnu.org/software/classpath/license.html.
15
- //
16
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
17
- // *****************************************************************************
18
- require("@theia/core/shared/reflect-metadata");
19
- const inversify_1 = require("@theia/core/shared/inversify");
20
- const rpc_protocol_1 = require("@theia/plugin-ext/lib/common/rpc-protocol");
21
- const hosted_plugin_protocol_1 = require("@theia/plugin-ext/lib/hosted/node/hosted-plugin-protocol");
22
- const plugin_host_headless_rpc_1 = require("./plugin-host-headless-rpc");
23
- const plugin_host_headless_module_1 = require("./plugin-host-headless-module");
24
- const banner = `HEADLESS_PLUGIN_HOST(${process.pid}):`;
25
- console.log(banner, 'Starting instance');
26
- // override exit() function, to do not allow plugin kill this node
27
- process.exit = function (code) {
28
- const err = new Error('A plugin called process.exit() but it was blocked.');
29
- console.warn(banner, err.stack);
30
- };
31
- // same for 'crash'(works only in electron)
32
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
33
- const proc = process;
34
- if (proc.crash) {
35
- proc.crash = function () {
36
- const err = new Error('A plugin called process.crash() but it was blocked.');
37
- console.warn(banner, err.stack);
38
- };
39
- }
40
- process.on('uncaughtException', (err) => {
41
- console.error(banner, err);
42
- });
43
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
44
- const unhandledPromises = [];
45
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
46
- process.on('unhandledRejection', (reason, promise) => {
47
- unhandledPromises.push(promise);
48
- setTimeout(() => {
49
- const index = unhandledPromises.indexOf(promise);
50
- if (index >= 0) {
51
- promise.catch(err => {
52
- unhandledPromises.splice(index, 1);
53
- if (terminating && (rpc_protocol_1.ConnectionClosedError.is(err) || rpc_protocol_1.ConnectionClosedError.is(reason))) {
54
- // during termination it is expected that pending rpc request are rejected
55
- return;
56
- }
57
- console.error(banner, `Promise rejection not handled in one second: ${err} , reason: ${reason}`);
58
- if (err && err.stack) {
59
- console.error(banner, `With stack trace: ${err.stack}`);
60
- }
61
- });
62
- }
63
- }, 1000);
64
- });
65
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
66
- process.on('rejectionHandled', (promise) => {
67
- const index = unhandledPromises.indexOf(promise);
68
- if (index >= 0) {
69
- unhandledPromises.splice(index, 1);
70
- }
71
- });
72
- let terminating = false;
73
- const container = new inversify_1.Container();
74
- container.load(plugin_host_headless_module_1.default);
75
- const rpc = container.get(rpc_protocol_1.RPCProtocol);
76
- const pluginHostRPC = container.get(plugin_host_headless_rpc_1.HeadlessPluginHostRPC);
77
- process.on('message', async (message) => {
78
- if (terminating) {
79
- return;
80
- }
81
- try {
82
- const msg = JSON.parse(message);
83
- if (hosted_plugin_protocol_1.ProcessTerminateMessage.is(msg)) {
84
- terminating = true;
85
- if (msg.stopTimeout) {
86
- await Promise.race([
87
- pluginHostRPC.terminate(),
88
- new Promise(resolve => setTimeout(resolve, msg.stopTimeout))
89
- ]);
90
- }
91
- else {
92
- await pluginHostRPC.terminate();
93
- }
94
- rpc.dispose();
95
- if (process.send) {
96
- process.send(JSON.stringify({ type: hosted_plugin_protocol_1.ProcessTerminatedMessage.TYPE }));
97
- }
98
- }
99
- }
100
- catch (e) {
101
- console.error(banner, e);
102
- }
103
- });
104
- //# sourceMappingURL=plugin-host-headless.js.map
@@ -1 +0,0 @@
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,+CAA6C;AAC7C,4DAAyD;AACzD,4EAA+F;AAC/F,qGAA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AAC;QACd,OAAO;IACX,CAAC;IACD,IAAI,CAAC;QACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChC,IAAI,gDAAuB,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;YAClC,WAAW,GAAG,IAAI,CAAC;YACnB,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;gBAClB,MAAM,OAAO,CAAC,IAAI,CAAC;oBACf,aAAa,CAAC,SAAS,EAAE;oBACzB,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,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,iDAAwB,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,26 +0,0 @@
1
- import { DeployedPlugin, PluginPackage, PluginEntryPoint } from '@theia/plugin-ext';
2
- import { AbstractPluginScanner } from '@theia/plugin-ext/lib/hosted/node/scanners/scanner-theia';
3
- export declare class TheiaHeadlessPluginScanner extends AbstractPluginScanner {
4
- constructor();
5
- protected getEntryPoint(plugin: PluginPackage): PluginEntryPoint;
6
- /**
7
- * Adapt the given `plugin`'s metadata for headless deployment, where it does not
8
- * already natively specify its headless deployment, such as is the case for plugins
9
- * declaring the `"vscode"` or `"theiaPlugin"` engine. This consists of cloning the
10
- * relevant properties of its deployment metadata and modifying them as required,
11
- * including but not limited to:
12
- *
13
- * - renaming the `lifecycle` start and stop functions as 'activate' and 'deactivate'
14
- * following the VS Code naming convention (in case the `plugin` is a Theia-style
15
- * plugin that uses 'start' and 'stop')
16
- * - deleting inapplicable information such as frontend and backend init script paths
17
- * - filtering/rewriting contributions and/or activation events
18
- *
19
- * The cloning is necessary to retain the original information for the non-headless
20
- * deployments that the plugin also supports.
21
- */
22
- adaptForHeadless(plugin: DeployedPlugin): DeployedPlugin;
23
- protected adaptMetadataForHeadless(plugin: DeployedPlugin): DeployedPlugin['metadata'];
24
- protected adaptContributesForHeadless(plugin: DeployedPlugin): DeployedPlugin['contributes'];
25
- }
26
- //# sourceMappingURL=scanner-theia-headless.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scanner-theia-headless.d.ts","sourceRoot":"","sources":["../../../../src/hosted/node/scanners/scanner-theia-headless.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AAGjG,qBACa,0BAA2B,SAAQ,qBAAqB;;IAMjE,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,gBAAgB;IAYhE;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc;IAQxD,SAAS,CAAC,wBAAwB,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAAC,UAAU,CAAC;IActF,SAAS,CAAC,2BAA2B,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAAC,aAAa,CAAC;CAI/F"}
@@ -1,83 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2024 EclipseSource and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.TheiaHeadlessPluginScanner = void 0;
19
- const tslib_1 = require("tslib");
20
- /* eslint-disable @theia/localization-check */
21
- const inversify_1 = require("@theia/core/shared/inversify");
22
- const scanner_theia_1 = require("@theia/plugin-ext/lib/hosted/node/scanners/scanner-theia");
23
- const objects_1 = require("@theia/core/lib/common/objects");
24
- let TheiaHeadlessPluginScanner = class TheiaHeadlessPluginScanner extends scanner_theia_1.AbstractPluginScanner {
25
- constructor() {
26
- super('theiaHeadlessPlugin');
27
- }
28
- getEntryPoint(plugin) {
29
- var _a;
30
- if ((_a = plugin === null || plugin === void 0 ? void 0 : plugin.theiaPlugin) === null || _a === void 0 ? void 0 : _a.headless) {
31
- return {
32
- headless: plugin.theiaPlugin.headless
33
- };
34
- }
35
- ;
36
- return {
37
- headless: plugin.main
38
- };
39
- }
40
- /**
41
- * Adapt the given `plugin`'s metadata for headless deployment, where it does not
42
- * already natively specify its headless deployment, such as is the case for plugins
43
- * declaring the `"vscode"` or `"theiaPlugin"` engine. This consists of cloning the
44
- * relevant properties of its deployment metadata and modifying them as required,
45
- * including but not limited to:
46
- *
47
- * - renaming the `lifecycle` start and stop functions as 'activate' and 'deactivate'
48
- * following the VS Code naming convention (in case the `plugin` is a Theia-style
49
- * plugin that uses 'start' and 'stop')
50
- * - deleting inapplicable information such as frontend and backend init script paths
51
- * - filtering/rewriting contributions and/or activation events
52
- *
53
- * The cloning is necessary to retain the original information for the non-headless
54
- * deployments that the plugin also supports.
55
- */
56
- adaptForHeadless(plugin) {
57
- return {
58
- type: plugin.type,
59
- metadata: this.adaptMetadataForHeadless(plugin),
60
- contributes: this.adaptContributesForHeadless(plugin)
61
- };
62
- }
63
- adaptMetadataForHeadless(plugin) {
64
- const result = (0, objects_1.deepClone)(plugin.metadata);
65
- const lifecycle = result.lifecycle;
66
- delete lifecycle.frontendInitPath;
67
- delete lifecycle.backendInitPath;
68
- // Same as in VS Code
69
- lifecycle.startMethod = 'activate';
70
- lifecycle.stopMethod = 'deactivate';
71
- return result;
72
- }
73
- adaptContributesForHeadless(plugin) {
74
- // We don't yet support and contribution points in headless plugins
75
- return undefined;
76
- }
77
- };
78
- exports.TheiaHeadlessPluginScanner = TheiaHeadlessPluginScanner;
79
- exports.TheiaHeadlessPluginScanner = TheiaHeadlessPluginScanner = tslib_1.__decorate([
80
- (0, inversify_1.injectable)(),
81
- tslib_1.__metadata("design:paramtypes", [])
82
- ], TheiaHeadlessPluginScanner);
83
- //# sourceMappingURL=scanner-theia-headless.js.map
@@ -1 +0,0 @@
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,4DAA0D;AAE1D,4FAAiG;AACjG,4DAA2D;AAGpD,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,qCAAqB;IAEjE;QACI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACjC,CAAC;IAES,aAAa,CAAC,MAAqB;;QACzC,IAAI,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,0CAAE,QAAQ,EAAE,CAAC;YAChC,OAAO;gBACH,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ;aACxC,CAAC;QACN,CAAC;QAAA,CAAC;QAEF,OAAO;YACH,QAAQ,EAAE,MAAM,CAAC,IAAI;SACxB,CAAC;IACN,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,CAAC,MAAsB;QACnC,OAAO;YACH,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,QAAQ,EAAE,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC;YAC/C,WAAW,EAAE,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC;SACxD,CAAC;IACN,CAAC;IAES,wBAAwB,CAAC,MAAsB;QACrD,MAAM,MAAM,GAAG,IAAA,mBAAS,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAE1C,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QACnC,OAAO,SAAS,CAAC,gBAAgB,CAAC;QAClC,OAAO,SAAS,CAAC,eAAe,CAAC;QAEjC,qBAAqB;QACrB,SAAS,CAAC,WAAW,GAAG,UAAU,CAAC;QACnC,SAAS,CAAC,UAAU,GAAG,YAAY,CAAC;QAEpC,OAAO,MAAM,CAAC;IAClB,CAAC;IAES,2BAA2B,CAAC,MAAsB;QACxD,mEAAmE;QACnE,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ,CAAA;AA5DY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,sBAAU,GAAE;;GACA,0BAA0B,CA4DtC"}
@@ -1,3 +0,0 @@
1
- import { interfaces } from '@theia/core/shared/inversify';
2
- export declare function bindElectronBackend(bind: interfaces.Bind): void;
3
- //# sourceMappingURL=plugin-ext-headless-hosted-electron-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-ext-headless-hosted-electron-module.d.ts","sourceRoot":"","sources":["../../../src/hosted/node-electron/plugin-ext-headless-hosted-electron-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAG1D,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAE/D"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2024 EclipseSource and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.bindElectronBackend = void 0;
19
- const plugin_ext_headless_hosted_module_1 = require("../node/plugin-ext-headless-hosted-module");
20
- function bindElectronBackend(bind) {
21
- (0, plugin_ext_headless_hosted_module_1.bindCommonHostedBackend)(bind);
22
- }
23
- exports.bindElectronBackend = bindElectronBackend;
24
- //# sourceMappingURL=plugin-ext-headless-hosted-electron-module.js.map
@@ -1 +0,0 @@
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,iGAAoF;AAEpF,SAAgB,mBAAmB,CAAC,IAAqB;IACrD,IAAA,2DAAuB,EAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,kDAEC"}
package/lib/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './common';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,cAAc,UAAU,CAAC"}
package/lib/index.js DELETED
@@ -1,20 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2024 EclipseSource and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const tslib_1 = require("tslib");
19
- tslib_1.__exportStar(require("./common"), exports);
20
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
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,mDAAyB"}
@@ -1,7 +0,0 @@
1
- import { PluginDeployerDirectoryHandlerContext, PluginPackage } from '@theia/plugin-ext';
2
- import { AbstractPluginDirectoryHandler } from '@theia/plugin-ext/lib/main/node/handlers/plugin-theia-directory-handler';
3
- export declare class PluginTheiaHeadlessDirectoryHandler extends AbstractPluginDirectoryHandler {
4
- protected acceptManifest(plugin: PluginPackage): boolean;
5
- handle(context: PluginDeployerDirectoryHandlerContext): Promise<void>;
6
- }
7
- //# sourceMappingURL=plugin-theia-headless-directory-handler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-theia-headless-directory-handler.d.ts","sourceRoot":"","sources":["../../../../src/main/node/handlers/plugin-theia-headless-directory-handler.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,qCAAqC,EAA2B,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClH,OAAO,EAAE,8BAA8B,EAAE,MAAM,yEAAyE,CAAC;AAEzH,qBACa,mCAAoC,SAAQ,8BAA8B;IAEnF,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO;IAIlD,MAAM,CAAC,OAAO,EAAE,qCAAqC,GAAG,OAAO,CAAC,IAAI,CAAC;CAM9E"}