@theia/plugin-ext-headless 1.46.0-next.72

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 (107) hide show
  1. package/README.md +32 -0
  2. package/lib/common/headless-plugin-container.d.ts +8 -0
  3. package/lib/common/headless-plugin-container.d.ts.map +1 -0
  4. package/lib/common/headless-plugin-container.js +26 -0
  5. package/lib/common/headless-plugin-container.js.map +1 -0
  6. package/lib/common/headless-plugin-protocol.d.ts +21 -0
  7. package/lib/common/headless-plugin-protocol.d.ts.map +1 -0
  8. package/lib/common/headless-plugin-protocol.js +35 -0
  9. package/lib/common/headless-plugin-protocol.js.map +1 -0
  10. package/lib/common/headless-plugin-rpc.d.ts +23 -0
  11. package/lib/common/headless-plugin-rpc.d.ts.map +1 -0
  12. package/lib/common/headless-plugin-rpc.js +31 -0
  13. package/lib/common/headless-plugin-rpc.js.map +1 -0
  14. package/lib/common/index.d.ts +5 -0
  15. package/lib/common/index.d.ts.map +1 -0
  16. package/lib/common/index.js +35 -0
  17. package/lib/common/index.js.map +1 -0
  18. package/lib/common/plugin-ext-headless-api-contribution.d.ts +38 -0
  19. package/lib/common/plugin-ext-headless-api-contribution.d.ts.map +1 -0
  20. package/lib/common/plugin-ext-headless-api-contribution.js +29 -0
  21. package/lib/common/plugin-ext-headless-api-contribution.js.map +1 -0
  22. package/lib/hosted/node/headless-hosted-plugin.d.ts +30 -0
  23. package/lib/hosted/node/headless-hosted-plugin.d.ts.map +1 -0
  24. package/lib/hosted/node/headless-hosted-plugin.js +192 -0
  25. package/lib/hosted/node/headless-hosted-plugin.js.map +1 -0
  26. package/lib/hosted/node/plugin-ext-headless-hosted-module.d.ts +4 -0
  27. package/lib/hosted/node/plugin-ext-headless-hosted-module.d.ts.map +1 -0
  28. package/lib/hosted/node/plugin-ext-headless-hosted-module.js +69 -0
  29. package/lib/hosted/node/plugin-ext-headless-hosted-module.js.map +1 -0
  30. package/lib/hosted/node/plugin-host-headless-module.d.ts +5 -0
  31. package/lib/hosted/node/plugin-host-headless-module.d.ts.map +1 -0
  32. package/lib/hosted/node/plugin-host-headless-module.js +73 -0
  33. package/lib/hosted/node/plugin-host-headless-module.js.map +1 -0
  34. package/lib/hosted/node/plugin-host-headless-rpc.d.ts +21 -0
  35. package/lib/hosted/node/plugin-host-headless-rpc.d.ts.map +1 -0
  36. package/lib/hosted/node/plugin-host-headless-rpc.js +82 -0
  37. package/lib/hosted/node/plugin-host-headless-rpc.js.map +1 -0
  38. package/lib/hosted/node/plugin-host-headless.d.ts +2 -0
  39. package/lib/hosted/node/plugin-host-headless.d.ts.map +1 -0
  40. package/lib/hosted/node/plugin-host-headless.js +104 -0
  41. package/lib/hosted/node/plugin-host-headless.js.map +1 -0
  42. package/lib/hosted/node/scanners/scanner-theia-headless.d.ts +26 -0
  43. package/lib/hosted/node/scanners/scanner-theia-headless.d.ts.map +1 -0
  44. package/lib/hosted/node/scanners/scanner-theia-headless.js +91 -0
  45. package/lib/hosted/node/scanners/scanner-theia-headless.js.map +1 -0
  46. package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.d.ts +3 -0
  47. package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.d.ts.map +1 -0
  48. package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.js +24 -0
  49. package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.js.map +1 -0
  50. package/lib/index.d.ts +2 -0
  51. package/lib/index.d.ts.map +1 -0
  52. package/lib/index.js +29 -0
  53. package/lib/index.js.map +1 -0
  54. package/lib/main/node/handlers/plugin-theia-headless-directory-handler.d.ts +7 -0
  55. package/lib/main/node/handlers/plugin-theia-headless-directory-handler.d.ts.map +1 -0
  56. package/lib/main/node/handlers/plugin-theia-headless-directory-handler.js +43 -0
  57. package/lib/main/node/handlers/plugin-theia-headless-directory-handler.js.map +1 -0
  58. package/lib/main/node/headless-progress-client.d.ts +10 -0
  59. package/lib/main/node/headless-progress-client.d.ts.map +1 -0
  60. package/lib/main/node/headless-progress-client.js +52 -0
  61. package/lib/main/node/headless-progress-client.js.map +1 -0
  62. package/lib/main/node/main-context.d.ts +4 -0
  63. package/lib/main/node/main-context.d.ts.map +1 -0
  64. package/lib/main/node/main-context.js +19 -0
  65. package/lib/main/node/main-context.js.map +1 -0
  66. package/lib/main/node/plugin-ext-headless-main-module.d.ts +4 -0
  67. package/lib/main/node/plugin-ext-headless-main-module.d.ts.map +1 -0
  68. package/lib/main/node/plugin-ext-headless-main-module.js +38 -0
  69. package/lib/main/node/plugin-ext-headless-main-module.js.map +1 -0
  70. package/lib/package.spec.d.ts +1 -0
  71. package/lib/package.spec.d.ts.map +1 -0
  72. package/lib/package.spec.js +24 -0
  73. package/lib/package.spec.js.map +1 -0
  74. package/lib/plugin/headless-plugin-manager.d.ts +10 -0
  75. package/lib/plugin/headless-plugin-manager.d.ts.map +1 -0
  76. package/lib/plugin/headless-plugin-manager.js +56 -0
  77. package/lib/plugin/headless-plugin-manager.js.map +1 -0
  78. package/lib/plugin-ext-headless-electron-module.d.ts +4 -0
  79. package/lib/plugin-ext-headless-electron-module.d.ts.map +1 -0
  80. package/lib/plugin-ext-headless-electron-module.js +32 -0
  81. package/lib/plugin-ext-headless-electron-module.js.map +1 -0
  82. package/lib/plugin-ext-headless-module.d.ts +4 -0
  83. package/lib/plugin-ext-headless-module.d.ts.map +1 -0
  84. package/lib/plugin-ext-headless-module.js +31 -0
  85. package/lib/plugin-ext-headless-module.js.map +1 -0
  86. package/package.json +56 -0
  87. package/src/common/headless-plugin-container.ts +23 -0
  88. package/src/common/headless-plugin-protocol.ts +38 -0
  89. package/src/common/headless-plugin-rpc.ts +46 -0
  90. package/src/common/index.ts +23 -0
  91. package/src/common/plugin-ext-headless-api-contribution.ts +60 -0
  92. package/src/hosted/node/headless-hosted-plugin.ts +199 -0
  93. package/src/hosted/node/plugin-ext-headless-hosted-module.ts +75 -0
  94. package/src/hosted/node/plugin-host-headless-module.ts +76 -0
  95. package/src/hosted/node/plugin-host-headless-rpc.ts +80 -0
  96. package/src/hosted/node/plugin-host-headless.ts +111 -0
  97. package/src/hosted/node/scanners/scanner-theia-headless.ts +85 -0
  98. package/src/hosted/node-electron/plugin-ext-headless-hosted-electron-module.ts +22 -0
  99. package/src/index.ts +17 -0
  100. package/src/main/node/handlers/plugin-theia-headless-directory-handler.ts +35 -0
  101. package/src/main/node/headless-progress-client.ts +44 -0
  102. package/src/main/node/main-context.ts +35 -0
  103. package/src/main/node/plugin-ext-headless-main-module.ts +42 -0
  104. package/src/package.spec.ts +25 -0
  105. package/src/plugin/headless-plugin-manager.ts +50 -0
  106. package/src/plugin-ext-headless-electron-module.ts +32 -0
  107. package/src/plugin-ext-headless-module.ts +31 -0
@@ -0,0 +1,43 @@
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
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.PluginTheiaHeadlessDirectoryHandler = void 0;
25
+ const inversify_1 = require("@theia/core/shared/inversify");
26
+ const plugin_ext_1 = require("@theia/plugin-ext");
27
+ const plugin_theia_directory_handler_1 = require("@theia/plugin-ext/lib/main/node/handlers/plugin-theia-directory-handler");
28
+ let PluginTheiaHeadlessDirectoryHandler = class PluginTheiaHeadlessDirectoryHandler extends plugin_theia_directory_handler_1.AbstractPluginDirectoryHandler {
29
+ acceptManifest(plugin) {
30
+ var _a;
31
+ return ((_a = plugin === null || plugin === void 0 ? void 0 : plugin.engines) === null || _a === void 0 ? void 0 : _a.theiaPlugin) === undefined && 'theiaHeadlessPlugin' in plugin.engines;
32
+ }
33
+ async handle(context) {
34
+ await this.copyDirectory(context);
35
+ const types = [plugin_ext_1.PluginDeployerEntryType.HEADLESS];
36
+ context.pluginEntry().accept(...types);
37
+ }
38
+ };
39
+ PluginTheiaHeadlessDirectoryHandler = __decorate([
40
+ (0, inversify_1.injectable)()
41
+ ], PluginTheiaHeadlessDirectoryHandler);
42
+ exports.PluginTheiaHeadlessDirectoryHandler = PluginTheiaHeadlessDirectoryHandler;
43
+ //# sourceMappingURL=plugin-theia-headless-directory-handler.js.map
@@ -0,0 +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":";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,4DAA0D;AAE1D,kDAAkH;AAClH,4HAAyH;AAGzH,IAAa,mCAAmC,GAAhD,MAAa,mCAAoC,SAAQ,+DAA8B;IAEzE,cAAc,CAAC,MAAqB;;QAC1C,OAAO,CAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAAE,WAAW,MAAK,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,oCAAuB,CAAC,QAAQ,CAAC,CAAC;QAC5E,OAAO,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC;IAC3C,CAAC;CAEJ,CAAA;AAZY,mCAAmC;IAD/C,IAAA,sBAAU,GAAE;GACA,mCAAmC,CAY/C;AAZY,kFAAmC"}
@@ -0,0 +1,10 @@
1
+ import { CancellationToken, ProgressClient, ProgressMessage, ProgressUpdate } from '@theia/core';
2
+ /**
3
+ * A simple progress client for headless plugins that just writes debug messages to the console
4
+ * because there is no one connected frontend to which it is appropriate to send the messages.
5
+ */
6
+ export declare class HeadlessProgressClient implements ProgressClient {
7
+ showProgress(_progressId: string, message: ProgressMessage, cancellationToken: CancellationToken): Promise<string | undefined>;
8
+ reportProgress(_progressId: string, update: ProgressUpdate, message: ProgressMessage, cancellationToken: CancellationToken): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=headless-progress-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"headless-progress-client.d.ts","sourceRoot":"","sources":["../../../src/main/node/headless-progress-client.ts"],"names":[],"mappings":"AAiBA,OAAO,EACH,iBAAiB,EACjB,cAAc,EAAE,eAAe,EAAE,cAAc,EAClD,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,qBACa,sBAAuB,YAAW,cAAc;IACnD,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAO9H,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAQnJ"}
@@ -0,0 +1,52 @@
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
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.HeadlessProgressClient = void 0;
25
+ const inversify_1 = require("@theia/core/shared/inversify");
26
+ const core_1 = require("@theia/core");
27
+ /**
28
+ * A simple progress client for headless plugins that just writes debug messages to the console
29
+ * because there is no one connected frontend to which it is appropriate to send the messages.
30
+ */
31
+ let HeadlessProgressClient = class HeadlessProgressClient {
32
+ async showProgress(_progressId, message, cancellationToken) {
33
+ if (cancellationToken.isCancellationRequested) {
34
+ return core_1.ProgressMessage.Cancel;
35
+ }
36
+ console.debug(message.text);
37
+ }
38
+ async reportProgress(_progressId, update, message, cancellationToken) {
39
+ var _a;
40
+ if (cancellationToken.isCancellationRequested) {
41
+ return;
42
+ }
43
+ const progress = update.work && update.work.total ? `[${100 * Math.min(update.work.done, update.work.total) / update.work.total}%]` : '';
44
+ const text = `${progress} ${(_a = update.message) !== null && _a !== void 0 ? _a : 'completed ...'}`;
45
+ console.debug(text);
46
+ }
47
+ };
48
+ HeadlessProgressClient = __decorate([
49
+ (0, inversify_1.injectable)()
50
+ ], HeadlessProgressClient);
51
+ exports.HeadlessProgressClient = HeadlessProgressClient;
52
+ //# sourceMappingURL=headless-progress-client.js.map
@@ -0,0 +1 @@
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,4DAA0D;AAC1D,sCAGqB;AAErB;;;GAGG;AAEH,IAAa,sBAAsB,GAAnC,MAAa,sBAAsB;IAC/B,KAAK,CAAC,YAAY,CAAC,WAAmB,EAAE,OAAwB,EAAE,iBAAoC;QAClG,IAAI,iBAAiB,CAAC,uBAAuB,EAAE;YAC3C,OAAO,sBAAe,CAAC,MAAM,CAAC;SACjC;QACD,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,WAAmB,EAAE,MAAsB,EAAE,OAAwB,EAAE,iBAAoC;;QAC5H,IAAI,iBAAiB,CAAC,uBAAuB,EAAE;YAC3C,OAAO;SACV;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,MAAA,MAAM,CAAC,OAAO,mCAAI,eAAe,EAAE,CAAC;QAChE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;CACJ,CAAA;AAhBY,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAgBlC;AAhBY,wDAAsB"}
@@ -0,0 +1,4 @@
1
+ import { interfaces } from '@theia/core/shared/inversify';
2
+ import { RPCProtocol } from '@theia/plugin-ext/lib/common/rpc-protocol';
3
+ export declare function setUpPluginApi(rpc: RPCProtocol, container: interfaces.Container): void;
4
+ //# sourceMappingURL=main-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main-context.d.ts","sourceRoot":"","sources":["../../../src/main/node/main-context.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AASxE,wBAAgB,cAAc,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,GAAG,IAAI,CAStF"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setUpPluginApi = void 0;
4
+ const env_main_1 = require("@theia/plugin-ext/lib/main/common/env-main");
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");
8
+ // This sets up only the minimal plugin API required by the plugin manager to report
9
+ // messages and notifications to the main side and to initialize plugins.
10
+ function setUpPluginApi(rpc, container) {
11
+ const envMain = new env_main_1.EnvMainImpl(rpc, container);
12
+ rpc.set(headless_plugin_rpc_1.HEADLESSPLUGIN_RPC_CONTEXT.ENV_MAIN, envMain);
13
+ const messageRegistryMain = new basic_message_registry_main_1.BasicMessageRegistryMainImpl(container);
14
+ rpc.set(headless_plugin_rpc_1.HEADLESSPLUGIN_RPC_CONTEXT.MESSAGE_REGISTRY_MAIN, messageRegistryMain);
15
+ const notificationMain = new basic_notification_main_1.BasicNotificationMainImpl(rpc, container, headless_plugin_rpc_1.HEADLESSMAIN_RPC_CONTEXT.NOTIFICATION_EXT);
16
+ rpc.set(headless_plugin_rpc_1.HEADLESSPLUGIN_RPC_CONTEXT.NOTIFICATION_MAIN, notificationMain);
17
+ }
18
+ exports.setUpPluginApi = setUpPluginApi;
19
+ //# sourceMappingURL=main-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main-context.js","sourceRoot":"","sources":["../../../src/main/node/main-context.ts"],"names":[],"mappings":";;;AAiBA,yEAAyE;AACzE,+GAA6G;AAC7G,uGAAsG;AAEtG,0EAAwG;AAExG,oFAAoF;AACpF,yEAAyE;AACzE,SAAgB,cAAc,CAAC,GAAgB,EAAE,SAA+B;IAC5E,MAAM,OAAO,GAAG,IAAI,sBAAW,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAChD,GAAG,CAAC,GAAG,CAAC,gDAA0B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAEtD,MAAM,mBAAmB,GAAG,IAAI,0DAA4B,CAAC,SAAS,CAAC,CAAC;IACxE,GAAG,CAAC,GAAG,CAAC,gDAA0B,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;IAE/E,MAAM,gBAAgB,GAAG,IAAI,mDAAyB,CAAC,GAAG,EAAE,SAAS,EAAE,8CAAwB,CAAC,gBAAgB,CAAC,CAAC;IAClH,GAAG,CAAC,GAAG,CAAC,gDAA0B,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;AAC5E,CAAC;AATD,wCASC"}
@@ -0,0 +1,4 @@
1
+ import { interfaces } from '@theia/core/shared/inversify';
2
+ export declare function bindHeadlessMain(bind: interfaces.Bind): void;
3
+ export declare function bindBackendMain(bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind): void;
4
+ //# sourceMappingURL=plugin-ext-headless-main-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-ext-headless-main-module.d.ts","sourceRoot":"","sources":["../../../src/main/node/plugin-ext-headless-main-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAU1D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAE5D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,IAAI,CAW9I"}
@@ -0,0 +1,38 @@
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.bindBackendMain = exports.bindHeadlessMain = void 0;
19
+ const core_1 = require("@theia/core");
20
+ const plugin_ext_1 = require("@theia/plugin-ext");
21
+ const plugin_theia_headless_directory_handler_1 = require("./handlers/plugin-theia-headless-directory-handler");
22
+ const headless_progress_client_1 = require("./headless-progress-client");
23
+ function bindHeadlessMain(bind) {
24
+ bind(plugin_ext_1.PluginDeployerDirectoryHandler).to(plugin_theia_headless_directory_handler_1.PluginTheiaHeadlessDirectoryHandler).inSingletonScope();
25
+ }
26
+ exports.bindHeadlessMain = bindHeadlessMain;
27
+ function bindBackendMain(bind, unbind, isBound, rebind) {
28
+ (0, core_1.bindContributionProvider)(bind, plugin_ext_1.MainPluginApiProvider);
29
+ //
30
+ // Main API dependencies
31
+ //
32
+ bind(core_1.MessageService).toSelf().inSingletonScope();
33
+ bind(core_1.MessageClient).toSelf().inSingletonScope(); // Just logs to console
34
+ bind(core_1.ProgressService).toSelf().inSingletonScope();
35
+ bind(core_1.ProgressClient).to(headless_progress_client_1.HeadlessProgressClient).inSingletonScope();
36
+ }
37
+ exports.bindBackendMain = bindBackendMain;
38
+ //# sourceMappingURL=plugin-ext-headless-main-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-ext-headless-main-module.js","sourceRoot":"","sources":["../../../src/main/node/plugin-ext-headless-main-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,sCAIqB;AACrB,kDAA0F;AAC1F,gHAAyG;AACzG,yEAAoE;AAEpE,SAAgB,gBAAgB,CAAC,IAAqB;IAClD,IAAI,CAAC,2CAA8B,CAAC,CAAC,EAAE,CAAC,6EAAmC,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACpG,CAAC;AAFD,4CAEC;AAED,SAAgB,eAAe,CAAC,IAAqB,EAAE,MAAyB,EAAE,OAA2B,EAAE,MAAyB;IACpI,IAAA,+BAAwB,EAAC,IAAI,EAAE,kCAAqB,CAAC,CAAC;IAEtD,EAAE;IACF,wBAAwB;IACxB,EAAE;IAEF,IAAI,CAAC,qBAAc,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACjD,IAAI,CAAC,oBAAa,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC,CAAC,uBAAuB;IACxE,IAAI,CAAC,sBAAe,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAClD,IAAI,CAAC,qBAAc,CAAC,CAAC,EAAE,CAAC,iDAAsB,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACvE,CAAC;AAXD,0CAWC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=package.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.spec.d.ts","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,24 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2024 EclipseSource and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+ /*
17
+ * This is a placeholder for tests that the extension package should implement
18
+ * but as yet does not.
19
+ * Please delete this file when a real test is implemented.
20
+ */
21
+ describe('plugin-ext-headless package', () => {
22
+ it('placeholder to enable mocha', () => true);
23
+ });
24
+ //# sourceMappingURL=package.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.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;;;;GAIG;AAEH,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { AbstractPluginManagerExtImpl } from '@theia/plugin-ext/lib/plugin/plugin-manager';
2
+ import { HeadlessPluginManagerExt, HeadlessPluginManagerInitializeParams } from '../common/headless-plugin-rpc';
3
+ import { Plugin } from '@theia/plugin-ext';
4
+ export declare class HeadlessPluginManagerExtImpl extends AbstractPluginManagerExtImpl<HeadlessPluginManagerInitializeParams> implements HeadlessPluginManagerExt {
5
+ private readonly supportedActivationEvents;
6
+ $init(params: HeadlessPluginManagerInitializeParams): Promise<void>;
7
+ protected getActivationEvents(plugin: Plugin): string[] | undefined;
8
+ protected isSupportedActivationEvent(activationEvent: string): boolean;
9
+ }
10
+ //# sourceMappingURL=headless-plugin-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"headless-plugin-manager.d.ts","sourceRoot":"","sources":["../../src/plugin/headless-plugin-manager.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,qCAAqC,EAAE,MAAM,+BAA+B,CAAC;AAChH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,qBACa,4BAA6B,SAAQ,4BAA4B,CAAC,qCAAqC,CAAE,YAAW,wBAAwB;IAErJ,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAqB;IAEzD,KAAK,CAAC,MAAM,EAAE,qCAAqC,GAAG,OAAO,CAAC,IAAI,CAAC;cActD,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAK5E,SAAS,CAAC,0BAA0B,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO;CAIzE"}
@@ -0,0 +1,56 @@
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
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.HeadlessPluginManagerExtImpl = void 0;
25
+ const inversify_1 = require("@theia/core/shared/inversify");
26
+ const plugin_manager_1 = require("@theia/plugin-ext/lib/plugin/plugin-manager");
27
+ let HeadlessPluginManagerExtImpl = class HeadlessPluginManagerExtImpl extends plugin_manager_1.AbstractPluginManagerExtImpl {
28
+ constructor() {
29
+ super(...arguments);
30
+ this.supportedActivationEvents = new Set();
31
+ }
32
+ async $init(params) {
33
+ var _a;
34
+ (_a = params.activationEvents) === null || _a === void 0 ? void 0 : _a.forEach(event => this.supportedActivationEvents.add(event));
35
+ this.storage.init(params.globalState, {});
36
+ this.envExt.setLanguage(params.env.language);
37
+ this.envExt.setApplicationName(params.env.appName);
38
+ this.envExt.setAppHost(params.env.appHost);
39
+ if (params.extApi) {
40
+ this.host.initExtApi(params.extApi);
41
+ }
42
+ }
43
+ getActivationEvents(plugin) {
44
+ var _a, _b;
45
+ const result = (_b = (_a = plugin.rawModel) === null || _a === void 0 ? void 0 : _a.headless) === null || _b === void 0 ? void 0 : _b.activationEvents;
46
+ return Array.isArray(result) ? result : undefined;
47
+ }
48
+ isSupportedActivationEvent(activationEvent) {
49
+ return this.supportedActivationEvents.has(activationEvent.split(':')[0]);
50
+ }
51
+ };
52
+ HeadlessPluginManagerExtImpl = __decorate([
53
+ (0, inversify_1.injectable)()
54
+ ], HeadlessPluginManagerExtImpl);
55
+ exports.HeadlessPluginManagerExtImpl = HeadlessPluginManagerExtImpl;
56
+ //# sourceMappingURL=headless-plugin-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"headless-plugin-manager.js","sourceRoot":"","sources":["../../src/plugin/headless-plugin-manager.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,4DAA0D;AAC1D,gFAA2F;AAK3F,IAAa,4BAA4B,GAAzC,MAAa,4BAA6B,SAAQ,6CAAmE;IAArH;;QAEqB,8BAAyB,GAAG,IAAI,GAAG,EAAU,CAAC;IAyBnE,CAAC;IAvBG,KAAK,CAAC,KAAK,CAAC,MAA6C;;QACrD,MAAA,MAAM,CAAC,gBAAgB,0CAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QAErF,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAE1C,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAE3C,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SACvC;IACL,CAAC;IAEkB,mBAAmB,CAAC,MAAc;;QACjD,MAAM,MAAM,GAAG,MAAA,MAAA,MAAM,CAAC,QAAQ,0CAAE,QAAQ,0CAAE,gBAAgB,CAAC;QAC3D,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IACtD,CAAC;IAES,0BAA0B,CAAC,eAAuB;QACxD,OAAO,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7E,CAAC;CAEJ,CAAA;AA3BY,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CA2BxC;AA3BY,oEAA4B"}
@@ -0,0 +1,4 @@
1
+ import { ContainerModule } from '@theia/core/shared/inversify';
2
+ declare const _default: ContainerModule;
3
+ export default _default;
4
+ //# sourceMappingURL=plugin-ext-headless-electron-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-ext-headless-electron-module.d.ts","sourceRoot":"","sources":["../src/plugin-ext-headless-electron-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAW/D,wBAIG"}
@@ -0,0 +1,32 @@
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 inversify_1 = require("@theia/core/shared/inversify");
19
+ const headless_plugin_container_1 = require("./common/headless-plugin-container");
20
+ const plugin_ext_headless_hosted_electron_module_1 = require("./hosted/node-electron/plugin-ext-headless-hosted-electron-module");
21
+ const plugin_ext_headless_main_module_1 = require("./main/node/plugin-ext-headless-main-module");
22
+ const plugin_ext_headless_hosted_module_1 = require("./hosted/node/plugin-ext-headless-hosted-module");
23
+ const backendElectronModule = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
24
+ (0, plugin_ext_headless_main_module_1.bindBackendMain)(bind, unbind, isBound, rebind);
25
+ (0, plugin_ext_headless_hosted_electron_module_1.bindElectronBackend)(bind);
26
+ });
27
+ exports.default = new inversify_1.ContainerModule(bind => {
28
+ bind(headless_plugin_container_1.HeadlessPluginContainerModule).toConstantValue(backendElectronModule);
29
+ (0, plugin_ext_headless_main_module_1.bindHeadlessMain)(bind);
30
+ (0, plugin_ext_headless_hosted_module_1.bindHeadlessHosted)(bind);
31
+ });
32
+ //# sourceMappingURL=plugin-ext-headless-electron-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-ext-headless-electron-module.js","sourceRoot":"","sources":["../src/plugin-ext-headless-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;;AAEhF,4DAA+D;AAC/D,kFAAmF;AACnF,kIAAwG;AACxG,iGAAgG;AAChG,uGAAqF;AAErF,MAAM,qBAAqB,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IAChF,IAAA,iDAAe,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/C,IAAA,gEAAmB,EAAC,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEH,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,yDAA6B,CAAC,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;IAC3E,IAAA,kDAAgB,EAAC,IAAI,CAAC,CAAC;IACvB,IAAA,sDAAkB,EAAC,IAAI,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ContainerModule } from '@theia/core/shared/inversify';
2
+ declare const _default: ContainerModule;
3
+ export default _default;
4
+ //# sourceMappingURL=plugin-ext-headless-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-ext-headless-module.d.ts","sourceRoot":"","sources":["../src/plugin-ext-headless-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAU/D,wBAIG"}
@@ -0,0 +1,31 @@
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 inversify_1 = require("@theia/core/shared/inversify");
19
+ const headless_plugin_container_1 = require("./common/headless-plugin-container");
20
+ const plugin_ext_headless_hosted_module_1 = require("./hosted/node/plugin-ext-headless-hosted-module");
21
+ const plugin_ext_headless_main_module_1 = require("./main/node/plugin-ext-headless-main-module");
22
+ const backendModule = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
23
+ (0, plugin_ext_headless_main_module_1.bindBackendMain)(bind, unbind, isBound, rebind);
24
+ (0, plugin_ext_headless_hosted_module_1.bindCommonHostedBackend)(bind);
25
+ });
26
+ exports.default = new inversify_1.ContainerModule(bind => {
27
+ bind(headless_plugin_container_1.HeadlessPluginContainerModule).toConstantValue(backendModule);
28
+ (0, plugin_ext_headless_main_module_1.bindHeadlessMain)(bind);
29
+ (0, plugin_ext_headless_hosted_module_1.bindHeadlessHosted)(bind);
30
+ });
31
+ //# sourceMappingURL=plugin-ext-headless-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-ext-headless-module.js","sourceRoot":"","sources":["../src/plugin-ext-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;;AAEhF,4DAA+D;AAC/D,kFAAmF;AACnF,uGAA8G;AAC9G,iGAAgG;AAEhG,MAAM,aAAa,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACxE,IAAA,iDAAe,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/C,IAAA,2DAAuB,EAAC,IAAI,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AAEH,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,yDAA6B,CAAC,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;IACnE,IAAA,kDAAgB,EAAC,IAAI,CAAC,CAAC;IACvB,IAAA,sDAAkB,EAAC,IAAI,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@theia/plugin-ext-headless",
3
+ "version": "1.46.0-next.72+4a275b29d",
4
+ "description": "Theia - Headless (Backend-only) Plugin Extension",
5
+ "main": "lib/common/index.js",
6
+ "typings": "lib/common/index.d.ts",
7
+ "dependencies": {
8
+ "@theia/core": "1.46.0-next.72+4a275b29d",
9
+ "@theia/plugin-ext": "1.46.0-next.72+4a275b29d",
10
+ "@theia/terminal": "1.46.0-next.72+4a275b29d"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "theiaExtensions": [
16
+ {
17
+ "backend": "lib/plugin-ext-headless-module",
18
+ "backendElectron": "lib/plugin-ext-headless-electron-module"
19
+ }
20
+ ],
21
+ "keywords": [
22
+ "theia-extension"
23
+ ],
24
+ "license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/eclipse-theia/theia.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/eclipse-theia/theia/issues"
31
+ },
32
+ "homepage": "https://github.com/eclipse-theia/theia",
33
+ "files": [
34
+ "lib",
35
+ "src"
36
+ ],
37
+ "scripts": {
38
+ "build": "theiaext build",
39
+ "clean": "theiaext clean",
40
+ "compile": "theiaext compile",
41
+ "lint": "theiaext lint",
42
+ "test": "theiaext test",
43
+ "watch": "theiaext watch"
44
+ },
45
+ "devDependencies": {
46
+ "@theia/ext-scripts": "1.46.0",
47
+ "@types/decompress": "^4.2.2",
48
+ "@types/escape-html": "^0.0.20",
49
+ "@types/lodash.clonedeep": "^4.5.3",
50
+ "@types/ps-tree": "^1.1.0"
51
+ },
52
+ "nyc": {
53
+ "extends": "../../configs/nyc.json"
54
+ },
55
+ "gitHead": "4a275b29d0db6c81190488c7f76cb667da05ef19"
56
+ }
@@ -0,0 +1,23 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2024 EclipseSource and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ /**
18
+ * Service identifier for Inversify container modules that are used
19
+ * to configure the child Container in which scope the services supporting
20
+ * the Headless Plugin Host are isolated from connection-scoped frontend/backend
21
+ * plugin hosts and the rest of the Theia Node server.
22
+ */
23
+ export const HeadlessPluginContainerModule = Symbol('HeadlessPluginContainerModule');
@@ -0,0 +1,38 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2024 EclipseSource and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ export * from '@theia/plugin-ext';
18
+
19
+ declare module '@theia/plugin-ext' {
20
+ /**
21
+ * Extension of the package manifest interface defined by the core plugin framework.
22
+ */
23
+ interface PluginPackage {
24
+ /**
25
+ * Analogues of declarations offered by VS Code plugins, but for the headless instantiation.
26
+ */
27
+ headless?: {
28
+ /** Activation events supported in headless mode, if any. */
29
+ activationEvents?: string[];
30
+ }
31
+ }
32
+ }
33
+
34
+ /**
35
+ * Name for a `string[]` injection binding contributing headless activation event names
36
+ * supported by the application.
37
+ */
38
+ export const SupportedHeadlessActivationEvents = Symbol('SupportedHeadlessActivationEvents');
@@ -0,0 +1,46 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2024 EclipseSource and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { createProxyIdentifier } from '@theia/plugin-ext/lib/common/rpc-protocol';
18
+ import { AbstractPluginManagerExt, EnvInit } from '@theia/plugin-ext';
19
+ import { KeysToKeysToAnyValue } from '@theia/plugin-ext/lib/common/types';
20
+ import {
21
+ MAIN_RPC_CONTEXT, PLUGIN_RPC_CONTEXT
22
+ } from '@theia/plugin-ext/lib/common/plugin-api-rpc';
23
+ import { ExtPluginApi } from './plugin-ext-headless-api-contribution';
24
+
25
+ export const HEADLESSPLUGIN_RPC_CONTEXT = {
26
+ MESSAGE_REGISTRY_MAIN: PLUGIN_RPC_CONTEXT.MESSAGE_REGISTRY_MAIN,
27
+ ENV_MAIN: PLUGIN_RPC_CONTEXT.ENV_MAIN,
28
+ NOTIFICATION_MAIN: PLUGIN_RPC_CONTEXT.NOTIFICATION_MAIN,
29
+ LOCALIZATION_MAIN: PLUGIN_RPC_CONTEXT.LOCALIZATION_MAIN,
30
+ };
31
+
32
+ export const HEADLESSMAIN_RPC_CONTEXT = {
33
+ HOSTED_PLUGIN_MANAGER_EXT: createProxyIdentifier<HeadlessPluginManagerExt>('HeadlessPluginManagerExt'),
34
+ NOTIFICATION_EXT: MAIN_RPC_CONTEXT.NOTIFICATION_EXT,
35
+ };
36
+
37
+ export type HeadlessEnvInit = Pick<EnvInit, 'language' | 'shell' | 'appName' | 'appHost'>;
38
+
39
+ export interface HeadlessPluginManagerInitializeParams {
40
+ activationEvents: string[];
41
+ globalState: KeysToKeysToAnyValue;
42
+ env: HeadlessEnvInit;
43
+ extApi?: ExtPluginApi[];
44
+ }
45
+
46
+ export interface HeadlessPluginManagerExt extends AbstractPluginManagerExt<HeadlessPluginManagerInitializeParams> { }
@@ -0,0 +1,23 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2024 EclipseSource and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ export * from './headless-plugin-container';
18
+ export {
19
+ ExtPluginApi, ExtPluginHeadlessApi, ExtPluginApiProvider,
20
+ ExtPluginHeadlessApiProvider
21
+ } from './plugin-ext-headless-api-contribution';
22
+ export { PluginPackage, SupportedHeadlessActivationEvents } from './headless-plugin-protocol';
23
+ export * from './headless-plugin-rpc';