@theia/plugin-ext-headless 1.67.0-next.56 → 1.67.0-next.59
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.d.ts +8 -0
- package/lib/common/headless-plugin-container.d.ts.map +1 -0
- package/lib/common/headless-plugin-container.js +26 -0
- package/lib/common/headless-plugin-container.js.map +1 -0
- package/lib/common/headless-plugin-protocol.d.ts +21 -0
- package/lib/common/headless-plugin-protocol.d.ts.map +1 -0
- package/lib/common/headless-plugin-protocol.js +26 -0
- package/lib/common/headless-plugin-protocol.js.map +1 -0
- package/lib/common/headless-plugin-rpc.d.ts +23 -0
- package/lib/common/headless-plugin-rpc.d.ts.map +1 -0
- package/lib/common/headless-plugin-rpc.js +31 -0
- package/lib/common/headless-plugin-rpc.js.map +1 -0
- package/lib/common/index.d.ts +5 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +27 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/plugin-ext-headless-api-contribution.d.ts +38 -0
- package/lib/common/plugin-ext-headless-api-contribution.d.ts.map +1 -0
- package/lib/common/plugin-ext-headless-api-contribution.js +20 -0
- package/lib/common/plugin-ext-headless-api-contribution.js.map +1 -0
- package/lib/hosted/node/headless-hosted-plugin.d.ts +30 -0
- package/lib/hosted/node/headless-hosted-plugin.d.ts.map +1 -0
- package/lib/hosted/node/headless-hosted-plugin.js +184 -0
- package/lib/hosted/node/headless-hosted-plugin.js.map +1 -0
- package/lib/hosted/node/headless-plugin-service.d.ts +5 -0
- package/lib/hosted/node/headless-plugin-service.d.ts.map +1 -0
- package/lib/hosted/node/headless-plugin-service.js +31 -0
- package/lib/hosted/node/headless-plugin-service.js.map +1 -0
- package/lib/hosted/node/plugin-ext-headless-hosted-module.d.ts +4 -0
- package/lib/hosted/node/plugin-ext-headless-hosted-module.d.ts.map +1 -0
- package/lib/hosted/node/plugin-ext-headless-hosted-module.js +70 -0
- package/lib/hosted/node/plugin-ext-headless-hosted-module.js.map +1 -0
- package/lib/hosted/node/plugin-host-headless-module.d.ts +5 -0
- package/lib/hosted/node/plugin-host-headless-module.d.ts.map +1 -0
- package/lib/hosted/node/plugin-host-headless-module.js +74 -0
- package/lib/hosted/node/plugin-host-headless-module.js.map +1 -0
- package/lib/hosted/node/plugin-host-headless-rpc.d.ts +21 -0
- package/lib/hosted/node/plugin-host-headless-rpc.d.ts.map +1 -0
- package/lib/hosted/node/plugin-host-headless-rpc.js +74 -0
- package/lib/hosted/node/plugin-host-headless-rpc.js.map +1 -0
- package/lib/hosted/node/plugin-host-headless.d.ts +2 -0
- package/lib/hosted/node/plugin-host-headless.d.ts.map +1 -0
- package/lib/hosted/node/plugin-host-headless.js +104 -0
- package/lib/hosted/node/plugin-host-headless.js.map +1 -0
- package/lib/hosted/node/scanners/scanner-theia-headless.d.ts +26 -0
- package/lib/hosted/node/scanners/scanner-theia-headless.d.ts.map +1 -0
- package/lib/hosted/node/scanners/scanner-theia-headless.js +83 -0
- package/lib/hosted/node/scanners/scanner-theia-headless.js.map +1 -0
- package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.d.ts +3 -0
- package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.d.ts.map +1 -0
- package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.js +24 -0
- package/lib/hosted/node-electron/plugin-ext-headless-hosted-electron-module.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +20 -0
- package/lib/index.js.map +1 -0
- package/lib/main/node/handlers/plugin-theia-headless-directory-handler.d.ts +7 -0
- package/lib/main/node/handlers/plugin-theia-headless-directory-handler.d.ts.map +1 -0
- package/lib/main/node/handlers/plugin-theia-headless-directory-handler.js +38 -0
- package/lib/main/node/handlers/plugin-theia-headless-directory-handler.js.map +1 -0
- package/lib/main/node/headless-progress-client.d.ts +10 -0
- package/lib/main/node/headless-progress-client.d.ts.map +1 -0
- package/lib/main/node/headless-progress-client.js +47 -0
- package/lib/main/node/headless-progress-client.js.map +1 -0
- package/lib/main/node/main-context.d.ts +4 -0
- package/lib/main/node/main-context.d.ts.map +1 -0
- package/lib/main/node/main-context.js +19 -0
- package/lib/main/node/main-context.js.map +1 -0
- package/lib/main/node/plugin-ext-headless-main-module.d.ts +4 -0
- package/lib/main/node/plugin-ext-headless-main-module.d.ts.map +1 -0
- package/lib/main/node/plugin-ext-headless-main-module.js +38 -0
- package/lib/main/node/plugin-ext-headless-main-module.js.map +1 -0
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.d.ts.map +1 -0
- package/lib/package.spec.js +24 -0
- package/lib/package.spec.js.map +1 -0
- package/lib/plugin/headless-plugin-manager.d.ts +10 -0
- package/lib/plugin/headless-plugin-manager.d.ts.map +1 -0
- package/lib/plugin/headless-plugin-manager.js +51 -0
- package/lib/plugin/headless-plugin-manager.js.map +1 -0
- package/lib/plugin-ext-headless-electron-module.d.ts +4 -0
- package/lib/plugin-ext-headless-electron-module.d.ts.map +1 -0
- package/lib/plugin-ext-headless-electron-module.js +32 -0
- package/lib/plugin-ext-headless-electron-module.js.map +1 -0
- package/lib/plugin-ext-headless-module.d.ts +4 -0
- package/lib/plugin-ext-headless-module.d.ts.map +1 -0
- package/lib/plugin-ext-headless-module.js +31 -0
- package/lib/plugin-ext-headless-module.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service identifier for Inversify container modules that are used
|
|
3
|
+
* to configure the child Container in which scope the services supporting
|
|
4
|
+
* the Headless Plugin Host are isolated from connection-scoped frontend/backend
|
|
5
|
+
* plugin hosts and the rest of the Theia Node server.
|
|
6
|
+
*/
|
|
7
|
+
export declare const HeadlessPluginContainerModule: unique symbol;
|
|
8
|
+
//# sourceMappingURL=headless-plugin-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-plugin-container.d.ts","sourceRoot":"","sources":["../../src/common/headless-plugin-container.ts"],"names":[],"mappings":"AAgBA;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,eAA0C,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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.HeadlessPluginContainerModule = void 0;
|
|
19
|
+
/**
|
|
20
|
+
* Service identifier for Inversify container modules that are used
|
|
21
|
+
* to configure the child Container in which scope the services supporting
|
|
22
|
+
* the Headless Plugin Host are isolated from connection-scoped frontend/backend
|
|
23
|
+
* plugin hosts and the rest of the Theia Node server.
|
|
24
|
+
*/
|
|
25
|
+
exports.HeadlessPluginContainerModule = Symbol('HeadlessPluginContainerModule');
|
|
26
|
+
//# sourceMappingURL=headless-plugin-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-plugin-container.js","sourceRoot":"","sources":["../../src/common/headless-plugin-container.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;;;;;GAKG;AACU,QAAA,6BAA6B,GAAG,MAAM,CAAC,+BAA+B,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from '@theia/plugin-ext';
|
|
2
|
+
declare module '@theia/plugin-ext' {
|
|
3
|
+
/**
|
|
4
|
+
* Extension of the package manifest interface defined by the core plugin framework.
|
|
5
|
+
*/
|
|
6
|
+
interface PluginPackage {
|
|
7
|
+
/**
|
|
8
|
+
* Analogues of declarations offered by VS Code plugins, but for the headless instantiation.
|
|
9
|
+
*/
|
|
10
|
+
headless?: {
|
|
11
|
+
/** Activation events supported in headless mode, if any. */
|
|
12
|
+
activationEvents?: string[];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Name for a `string[]` injection binding contributing headless activation event names
|
|
18
|
+
* supported by the application.
|
|
19
|
+
*/
|
|
20
|
+
export declare const SupportedHeadlessActivationEvents: unique symbol;
|
|
21
|
+
//# sourceMappingURL=headless-plugin-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-plugin-protocol.d.ts","sourceRoot":"","sources":["../../src/common/headless-plugin-protocol.ts"],"names":[],"mappings":"AAgBA,cAAc,mBAAmB,CAAC;AAElC,OAAO,QAAQ,mBAAmB,CAAC;IACjC;;OAEG;IACH,UAAU,aAAa;QACnB;;WAEG;QACH,QAAQ,CAAC,EAAE;YACP,4DAA4D;YAC5D,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;SAC/B,CAAA;KACJ;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,iCAAiC,eAA8C,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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.SupportedHeadlessActivationEvents = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
tslib_1.__exportStar(require("@theia/plugin-ext"), exports);
|
|
21
|
+
/**
|
|
22
|
+
* Name for a `string[]` injection binding contributing headless activation event names
|
|
23
|
+
* supported by the application.
|
|
24
|
+
*/
|
|
25
|
+
exports.SupportedHeadlessActivationEvents = Symbol('SupportedHeadlessActivationEvents');
|
|
26
|
+
//# sourceMappingURL=headless-plugin-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-plugin-protocol.js","sourceRoot":"","sources":["../../src/common/headless-plugin-protocol.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,4DAAkC;AAiBlC;;;GAGG;AACU,QAAA,iCAAiC,GAAG,MAAM,CAAC,mCAAmC,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AbstractPluginManagerExt, EnvInit } from '@theia/plugin-ext';
|
|
2
|
+
import { KeysToKeysToAnyValue } from '@theia/plugin-ext/lib/common/types';
|
|
3
|
+
import { ExtPluginApi } from './plugin-ext-headless-api-contribution';
|
|
4
|
+
export declare const HEADLESSPLUGIN_RPC_CONTEXT: {
|
|
5
|
+
MESSAGE_REGISTRY_MAIN: import("@theia/plugin-ext/lib/common/rpc-protocol").ProxyIdentifier<import("@theia/plugin-ext").MessageRegistryMain>;
|
|
6
|
+
ENV_MAIN: import("@theia/plugin-ext/lib/common/rpc-protocol").ProxyIdentifier<import("@theia/plugin-ext").EnvMain>;
|
|
7
|
+
NOTIFICATION_MAIN: import("@theia/plugin-ext/lib/common/rpc-protocol").ProxyIdentifier<import("@theia/plugin-ext").NotificationMain>;
|
|
8
|
+
LOCALIZATION_MAIN: import("@theia/plugin-ext/lib/common/rpc-protocol").ProxyIdentifier<import("@theia/plugin-ext").LocalizationMain>;
|
|
9
|
+
};
|
|
10
|
+
export declare const HEADLESSMAIN_RPC_CONTEXT: {
|
|
11
|
+
HOSTED_PLUGIN_MANAGER_EXT: import("@theia/plugin-ext/lib/common/rpc-protocol").ProxyIdentifier<HeadlessPluginManagerExt>;
|
|
12
|
+
NOTIFICATION_EXT: import("@theia/plugin-ext/lib/common/rpc-protocol").ProxyIdentifier<import("@theia/plugin-ext").NotificationExt>;
|
|
13
|
+
};
|
|
14
|
+
export type HeadlessEnvInit = Pick<EnvInit, 'language' | 'shell' | 'appName' | 'appHost'>;
|
|
15
|
+
export interface HeadlessPluginManagerInitializeParams {
|
|
16
|
+
activationEvents: string[];
|
|
17
|
+
globalState: KeysToKeysToAnyValue;
|
|
18
|
+
env: HeadlessEnvInit;
|
|
19
|
+
extApi?: ExtPluginApi[];
|
|
20
|
+
}
|
|
21
|
+
export interface HeadlessPluginManagerExt extends AbstractPluginManagerExt<HeadlessPluginManagerInitializeParams> {
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=headless-plugin-rpc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-plugin-rpc.d.ts","sourceRoot":"","sources":["../../src/common/headless-plugin-rpc.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,wBAAwB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAI1E,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAEtE,eAAO,MAAM,0BAA0B;;;;;CAKtC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;CAGpC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;AAE1F,MAAM,WAAW,qCAAqC;IAClD,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,EAAE,oBAAoB,CAAC;IAClC,GAAG,EAAE,eAAe,CAAC;IACrB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB,CAAC,qCAAqC,CAAC;CAAI"}
|
|
@@ -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
|
+
exports.HEADLESSMAIN_RPC_CONTEXT = exports.HEADLESSPLUGIN_RPC_CONTEXT = void 0;
|
|
19
|
+
const rpc_protocol_1 = require("@theia/plugin-ext/lib/common/rpc-protocol");
|
|
20
|
+
const plugin_api_rpc_1 = require("@theia/plugin-ext/lib/common/plugin-api-rpc");
|
|
21
|
+
exports.HEADLESSPLUGIN_RPC_CONTEXT = {
|
|
22
|
+
MESSAGE_REGISTRY_MAIN: plugin_api_rpc_1.PLUGIN_RPC_CONTEXT.MESSAGE_REGISTRY_MAIN,
|
|
23
|
+
ENV_MAIN: plugin_api_rpc_1.PLUGIN_RPC_CONTEXT.ENV_MAIN,
|
|
24
|
+
NOTIFICATION_MAIN: plugin_api_rpc_1.PLUGIN_RPC_CONTEXT.NOTIFICATION_MAIN,
|
|
25
|
+
LOCALIZATION_MAIN: plugin_api_rpc_1.PLUGIN_RPC_CONTEXT.LOCALIZATION_MAIN,
|
|
26
|
+
};
|
|
27
|
+
exports.HEADLESSMAIN_RPC_CONTEXT = {
|
|
28
|
+
HOSTED_PLUGIN_MANAGER_EXT: (0, rpc_protocol_1.createProxyIdentifier)('HeadlessPluginManagerExt'),
|
|
29
|
+
NOTIFICATION_EXT: plugin_api_rpc_1.MAIN_RPC_CONTEXT.NOTIFICATION_EXT,
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=headless-plugin-rpc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-plugin-rpc.js","sourceRoot":"","sources":["../../src/common/headless-plugin-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,4EAAkF;AAGlF,gFAEqD;AAGxC,QAAA,0BAA0B,GAAG;IACtC,qBAAqB,EAAE,mCAAkB,CAAC,qBAAqB;IAC/D,QAAQ,EAAE,mCAAkB,CAAC,QAAQ;IACrC,iBAAiB,EAAE,mCAAkB,CAAC,iBAAiB;IACvD,iBAAiB,EAAE,mCAAkB,CAAC,iBAAiB;CAC1D,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACpC,yBAAyB,EAAE,IAAA,oCAAqB,EAA2B,0BAA0B,CAAC;IACtG,gBAAgB,EAAE,iCAAgB,CAAC,gBAAgB;CACtD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './headless-plugin-container';
|
|
2
|
+
export { ExtPluginApi, ExtPluginHeadlessApi, ExtPluginApiProvider, ExtPluginHeadlessApiProvider } from './plugin-ext-headless-api-contribution';
|
|
3
|
+
export { PluginPackage, SupportedHeadlessActivationEvents } from './headless-plugin-protocol';
|
|
4
|
+
export * from './headless-plugin-rpc';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAgBA,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EACH,YAAY,EAAE,oBAAoB,EAAE,oBAAoB,EACxD,4BAA4B,EAC/B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC9F,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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.SupportedHeadlessActivationEvents = exports.PluginPackage = exports.ExtPluginApiProvider = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
tslib_1.__exportStar(require("./headless-plugin-container"), exports);
|
|
21
|
+
var plugin_ext_headless_api_contribution_1 = require("./plugin-ext-headless-api-contribution");
|
|
22
|
+
Object.defineProperty(exports, "ExtPluginApiProvider", { enumerable: true, get: function () { return plugin_ext_headless_api_contribution_1.ExtPluginApiProvider; } });
|
|
23
|
+
var headless_plugin_protocol_1 = require("./headless-plugin-protocol");
|
|
24
|
+
Object.defineProperty(exports, "PluginPackage", { enumerable: true, get: function () { return headless_plugin_protocol_1.PluginPackage; } });
|
|
25
|
+
Object.defineProperty(exports, "SupportedHeadlessActivationEvents", { enumerable: true, get: function () { return headless_plugin_protocol_1.SupportedHeadlessActivationEvents; } });
|
|
26
|
+
tslib_1.__exportStar(require("./headless-plugin-rpc"), exports);
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/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,sEAA4C;AAC5C,+FAGgD;AAFR,4IAAA,oBAAoB,OAAA;AAG5D,uEAA8F;AAArF,yHAAA,aAAa,OAAA;AAAE,6IAAA,iCAAiC,OAAA;AACzD,gEAAsC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PluginManager } from '@theia/plugin-ext';
|
|
2
|
+
import { RPCProtocol } from '@theia/plugin-ext/lib/common/rpc-protocol';
|
|
3
|
+
export * from '@theia/plugin-ext';
|
|
4
|
+
declare module '@theia/plugin-ext' {
|
|
5
|
+
/**
|
|
6
|
+
* Plugin API extension description.
|
|
7
|
+
* This interface describes scripts for all three plugin runtimes: frontend (WebWorker), backend (NodeJs), and headless (NodeJs).
|
|
8
|
+
*/
|
|
9
|
+
interface ExtPluginApi extends ExtPluginHeadlessApi {
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Provider for headless extension API description.
|
|
14
|
+
*/
|
|
15
|
+
export interface ExtPluginHeadlessApiProvider {
|
|
16
|
+
/**
|
|
17
|
+
* Provide API description.
|
|
18
|
+
*/
|
|
19
|
+
provideApi(): ExtPluginHeadlessApi;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Headless Plugin API extension description.
|
|
23
|
+
* This interface describes a script for the headless (NodeJs) runtime outside of the scope of frontend connections.
|
|
24
|
+
*/
|
|
25
|
+
export interface ExtPluginHeadlessApi {
|
|
26
|
+
/**
|
|
27
|
+
* Path to the script which should be loaded to provide api, module should export `provideApi` function with
|
|
28
|
+
* [ExtPluginApiBackendInitializationFn](#ExtPluginApiBackendInitializationFn) signature
|
|
29
|
+
*/
|
|
30
|
+
headlessInitPath?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Signature of the extension API initialization function for APIs contributed to headless plugins.
|
|
34
|
+
*/
|
|
35
|
+
export interface ExtPluginApiHeadlessInitializationFn {
|
|
36
|
+
(rpc: RPCProtocol, pluginManager: PluginManager): void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=plugin-ext-headless-api-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-ext-headless-api-contribution.d.ts","sourceRoot":"","sources":["../../src/common/plugin-ext-headless-api-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAExE,cAAc,mBAAmB,CAAC;AAElC,OAAO,QAAQ,mBAAmB,CAAC;IAC/B;;;OAGG;IACH,UAAU,YAAa,SAAQ,oBAAoB;KAGlD;CACJ;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC;;OAEG;IACH,UAAU,IAAI,oBAAoB,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACjD,CAAC,GAAG,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;CAC1D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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("@theia/plugin-ext"), exports);
|
|
20
|
+
//# sourceMappingURL=plugin-ext-headless-api-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-ext-headless-api-contribution.js","sourceRoot":"","sources":["../../src/common/plugin-ext-headless-api-contribution.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;;;AAKhF,4DAAkC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DeployedPlugin, HostedPluginServer } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
|
2
|
+
import { RPCProtocol } from '@theia/plugin-ext/lib/common/rpc-protocol';
|
|
3
|
+
import { ContributionProvider, Disposable, DisposableCollection } from '@theia/core';
|
|
4
|
+
import { HostedPluginProcess } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin-process';
|
|
5
|
+
import { IShellTerminalServer } from '@theia/terminal/lib/common/shell-terminal-protocol';
|
|
6
|
+
import { HeadlessPluginManagerExt } from '../../common/headless-plugin-rpc';
|
|
7
|
+
import { AbstractHostedPluginSupport, PluginContributions } from '@theia/plugin-ext/lib/hosted/common/hosted-plugin';
|
|
8
|
+
import { TheiaHeadlessPluginScanner } from './scanners/scanner-theia-headless';
|
|
9
|
+
import { PluginDeployerImpl } from '@theia/plugin-ext/lib/main/node/plugin-deployer-impl';
|
|
10
|
+
export type HeadlessPluginHost = string;
|
|
11
|
+
export declare function isHeadlessPlugin(plugin: DeployedPlugin): boolean;
|
|
12
|
+
export declare class HeadlessHostedPluginSupport extends AbstractHostedPluginSupport<HeadlessPluginManagerExt, HostedPluginServer> {
|
|
13
|
+
protected readonly pluginProcess: HostedPluginProcess;
|
|
14
|
+
protected readonly shellTerminalServer: IShellTerminalServer;
|
|
15
|
+
protected readonly scanner: TheiaHeadlessPluginScanner;
|
|
16
|
+
protected readonly pluginDeployer: PluginDeployerImpl;
|
|
17
|
+
protected readonly supportedActivationEventsContributions: ContributionProvider<string[]>;
|
|
18
|
+
constructor();
|
|
19
|
+
shutDown(): void;
|
|
20
|
+
protected createTheiaReadyPromise(): Promise<unknown>;
|
|
21
|
+
protected acceptPlugin(plugin: DeployedPlugin): boolean | DeployedPlugin;
|
|
22
|
+
protected handleContributions(_plugin: DeployedPlugin): Disposable;
|
|
23
|
+
protected beforeSyncPlugins(toDisconnect: DisposableCollection): Promise<void>;
|
|
24
|
+
protected obtainManager(host: string, hostContributions: PluginContributions[], toDisconnect: DisposableCollection): Promise<HeadlessPluginManagerExt | undefined>;
|
|
25
|
+
protected initRpc(host: HeadlessPluginHost, pluginId: string): RPCProtocol;
|
|
26
|
+
protected createServerRpc(pluginHostId: string): RPCProtocol;
|
|
27
|
+
protected getStoragePath(): Promise<string | undefined>;
|
|
28
|
+
protected getHostGlobalStoragePath(): Promise<string>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=headless-hosted-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-hosted-plugin.d.ts","sourceRoot":"","sources":["../../../src/hosted/node/headless-hosted-plugin.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAe,cAAc,EAAE,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AKzC,iBAAiB,CAAC,YAAY,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;cAU7E,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,EAAE,YAAY,EAAE,oBAAoB,GAAG,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAyCxK,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW;IAQ1E,SAAS,CAAC,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW;cAM5C,cAAc,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;cAM7C,wBAAwB,IAAI,OAAO,CAAC,MAAM,CAAC;CA4B9D"}
|
|
@@ -0,0 +1,184 @@
|
|
|
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
|
+
/*---------------------------------------------------------------------------------------------
|
|
18
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
20
|
+
*--------------------------------------------------------------------------------------------*/
|
|
21
|
+
// some code copied and modified from https://github.com/microsoft/vscode/blob/da5fb7d5b865aa522abc7e82c10b746834b98639/src/vs/workbench/api/node/extHostExtensionService.ts
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.HeadlessHostedPluginSupport = exports.isHeadlessPlugin = void 0;
|
|
24
|
+
const tslib_1 = require("tslib");
|
|
25
|
+
const uuid_1 = require("@theia/core/lib/common/uuid");
|
|
26
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
27
|
+
const plugin_protocol_1 = require("@theia/plugin-ext/lib/common/plugin-protocol");
|
|
28
|
+
const main_context_1 = require("../../main/node/main-context");
|
|
29
|
+
const rpc_protocol_1 = require("@theia/plugin-ext/lib/common/rpc-protocol");
|
|
30
|
+
const core_1 = require("@theia/core");
|
|
31
|
+
const environment_1 = require("@theia/core/shared/@theia/application-package/lib/environment");
|
|
32
|
+
const node_1 = require("@theia/core/lib/node");
|
|
33
|
+
const backend_application_config_provider_1 = require("@theia/core/lib/node/backend-application-config-provider");
|
|
34
|
+
const hosted_plugin_process_1 = require("@theia/plugin-ext/lib/hosted/node/hosted-plugin-process");
|
|
35
|
+
const shell_terminal_protocol_1 = require("@theia/terminal/lib/common/shell-terminal-protocol");
|
|
36
|
+
const headless_plugin_rpc_1 = require("../../common/headless-plugin-rpc");
|
|
37
|
+
const hosted_plugin_1 = require("@theia/plugin-ext/lib/hosted/common/hosted-plugin");
|
|
38
|
+
const scanner_theia_headless_1 = require("./scanners/scanner-theia-headless");
|
|
39
|
+
const headless_plugin_protocol_1 = require("../../common/headless-plugin-protocol");
|
|
40
|
+
const plugin_deployer_impl_1 = require("@theia/plugin-ext/lib/main/node/plugin-deployer-impl");
|
|
41
|
+
const uri_1 = require("@theia/core/lib/common/uri");
|
|
42
|
+
const asyncFs = require("fs/promises");
|
|
43
|
+
function isHeadlessPlugin(plugin) {
|
|
44
|
+
return !!plugin.metadata.model.entryPoint.headless;
|
|
45
|
+
}
|
|
46
|
+
exports.isHeadlessPlugin = isHeadlessPlugin;
|
|
47
|
+
let HeadlessHostedPluginSupport = class HeadlessHostedPluginSupport extends hosted_plugin_1.AbstractHostedPluginSupport {
|
|
48
|
+
constructor() {
|
|
49
|
+
super((0, uuid_1.generateUuid)());
|
|
50
|
+
}
|
|
51
|
+
shutDown() {
|
|
52
|
+
this.pluginProcess.terminatePluginServer();
|
|
53
|
+
}
|
|
54
|
+
createTheiaReadyPromise() {
|
|
55
|
+
return Promise.all([this.envServer.getVariables()]);
|
|
56
|
+
}
|
|
57
|
+
// Only load headless plugins
|
|
58
|
+
acceptPlugin(plugin) {
|
|
59
|
+
if (!isHeadlessPlugin(plugin)) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
if (plugin.metadata.model.engine.type === this.scanner.apiType) {
|
|
63
|
+
// Easy case: take it as it is
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
// Adapt it for headless
|
|
67
|
+
return this.scanner.adaptForHeadless(plugin);
|
|
68
|
+
}
|
|
69
|
+
handleContributions(_plugin) {
|
|
70
|
+
// We have no contribution points, yet, for headless plugins
|
|
71
|
+
return core_1.Disposable.NULL;
|
|
72
|
+
}
|
|
73
|
+
async beforeSyncPlugins(toDisconnect) {
|
|
74
|
+
await super.beforeSyncPlugins(toDisconnect);
|
|
75
|
+
// Plugin deployment is asynchronous, so wait until that's finished.
|
|
76
|
+
return new Promise((resolve, reject) => {
|
|
77
|
+
this.pluginDeployer.onDidDeploy(resolve);
|
|
78
|
+
toDisconnect.push(core_1.Disposable.create(reject));
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
async obtainManager(host, hostContributions, toDisconnect) {
|
|
82
|
+
let manager = this.managers.get(host);
|
|
83
|
+
if (!manager) {
|
|
84
|
+
const pluginId = (0, plugin_protocol_1.getPluginId)(hostContributions[0].plugin.metadata.model);
|
|
85
|
+
const rpc = this.initRpc(host, pluginId);
|
|
86
|
+
toDisconnect.push(rpc);
|
|
87
|
+
manager = rpc.getProxy(headless_plugin_rpc_1.HEADLESSMAIN_RPC_CONTEXT.HOSTED_PLUGIN_MANAGER_EXT);
|
|
88
|
+
this.managers.set(host, manager);
|
|
89
|
+
toDisconnect.push(core_1.Disposable.create(() => this.managers.delete(host)));
|
|
90
|
+
const [extApi, globalState] = await Promise.all([
|
|
91
|
+
this.server.getExtPluginAPI(),
|
|
92
|
+
this.pluginServer.getAllStorageValues(undefined)
|
|
93
|
+
]);
|
|
94
|
+
if (toDisconnect.disposed) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
const activationEvents = this.supportedActivationEventsContributions.getContributions().flatMap(array => array);
|
|
98
|
+
const shell = await this.shellTerminalServer.getDefaultShell();
|
|
99
|
+
const isElectron = environment_1.environment.electron.is();
|
|
100
|
+
await manager.$init({
|
|
101
|
+
activationEvents,
|
|
102
|
+
globalState,
|
|
103
|
+
env: {
|
|
104
|
+
language: core_1.nls.locale || core_1.nls.defaultLocale,
|
|
105
|
+
shell,
|
|
106
|
+
appName: backend_application_config_provider_1.BackendApplicationConfigProvider.get().applicationName,
|
|
107
|
+
appHost: isElectron ? 'desktop' : 'web' // TODO: 'web' could be the embedder's name, e.g. 'github.dev'
|
|
108
|
+
},
|
|
109
|
+
extApi
|
|
110
|
+
});
|
|
111
|
+
if (toDisconnect.disposed) {
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return manager;
|
|
116
|
+
}
|
|
117
|
+
initRpc(host, pluginId) {
|
|
118
|
+
const rpc = this.createServerRpc(host);
|
|
119
|
+
this.container.bind(rpc_protocol_1.RPCProtocol).toConstantValue(rpc);
|
|
120
|
+
(0, main_context_1.setUpPluginApi)(rpc, this.container);
|
|
121
|
+
this.mainPluginApiProviders.getContributions().forEach(p => p.initialize(rpc, this.container));
|
|
122
|
+
return rpc;
|
|
123
|
+
}
|
|
124
|
+
createServerRpc(pluginHostId) {
|
|
125
|
+
const channel = new node_1.IPCChannel(this.pluginProcess['childProcess']);
|
|
126
|
+
return new rpc_protocol_1.RPCProtocolImpl(channel);
|
|
127
|
+
}
|
|
128
|
+
async getStoragePath() {
|
|
129
|
+
// Headless plugins are associated with the main Node process, so
|
|
130
|
+
// their storage is the global storage.
|
|
131
|
+
return this.getHostGlobalStoragePath();
|
|
132
|
+
}
|
|
133
|
+
async getHostGlobalStoragePath() {
|
|
134
|
+
const configDirUri = await this.envServer.getConfigDirUri();
|
|
135
|
+
const globalStorageFolderUri = new uri_1.default(configDirUri).resolve('globalStorage');
|
|
136
|
+
const globalStorageFolderUrl = new URL(globalStorageFolderUri.toString());
|
|
137
|
+
let stat;
|
|
138
|
+
try {
|
|
139
|
+
stat = await asyncFs.stat(globalStorageFolderUrl);
|
|
140
|
+
}
|
|
141
|
+
catch (_) {
|
|
142
|
+
// OK, no such directory
|
|
143
|
+
}
|
|
144
|
+
if (stat && !stat.isDirectory()) {
|
|
145
|
+
throw new Error(`Global storage folder is not a directory: ${globalStorageFolderUri}`);
|
|
146
|
+
}
|
|
147
|
+
// Make sure that folder by the path exists
|
|
148
|
+
if (!stat) {
|
|
149
|
+
await asyncFs.mkdir(globalStorageFolderUrl, { recursive: true });
|
|
150
|
+
}
|
|
151
|
+
const globalStorageFolderFsPath = await asyncFs.realpath(globalStorageFolderUrl);
|
|
152
|
+
if (!globalStorageFolderFsPath) {
|
|
153
|
+
throw new Error(`Could not resolve the FS path for URI: ${globalStorageFolderUri}`);
|
|
154
|
+
}
|
|
155
|
+
return globalStorageFolderFsPath;
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
exports.HeadlessHostedPluginSupport = HeadlessHostedPluginSupport;
|
|
159
|
+
tslib_1.__decorate([
|
|
160
|
+
(0, inversify_1.inject)(hosted_plugin_process_1.HostedPluginProcess),
|
|
161
|
+
tslib_1.__metadata("design:type", hosted_plugin_process_1.HostedPluginProcess)
|
|
162
|
+
], HeadlessHostedPluginSupport.prototype, "pluginProcess", void 0);
|
|
163
|
+
tslib_1.__decorate([
|
|
164
|
+
(0, inversify_1.inject)(shell_terminal_protocol_1.IShellTerminalServer),
|
|
165
|
+
tslib_1.__metadata("design:type", Object)
|
|
166
|
+
], HeadlessHostedPluginSupport.prototype, "shellTerminalServer", void 0);
|
|
167
|
+
tslib_1.__decorate([
|
|
168
|
+
(0, inversify_1.inject)(scanner_theia_headless_1.TheiaHeadlessPluginScanner),
|
|
169
|
+
tslib_1.__metadata("design:type", scanner_theia_headless_1.TheiaHeadlessPluginScanner)
|
|
170
|
+
], HeadlessHostedPluginSupport.prototype, "scanner", void 0);
|
|
171
|
+
tslib_1.__decorate([
|
|
172
|
+
(0, inversify_1.inject)(plugin_protocol_1.PluginDeployer),
|
|
173
|
+
tslib_1.__metadata("design:type", plugin_deployer_impl_1.PluginDeployerImpl)
|
|
174
|
+
], HeadlessHostedPluginSupport.prototype, "pluginDeployer", void 0);
|
|
175
|
+
tslib_1.__decorate([
|
|
176
|
+
(0, inversify_1.inject)(core_1.ContributionProvider),
|
|
177
|
+
(0, inversify_1.named)(headless_plugin_protocol_1.SupportedHeadlessActivationEvents),
|
|
178
|
+
tslib_1.__metadata("design:type", Object)
|
|
179
|
+
], HeadlessHostedPluginSupport.prototype, "supportedActivationEventsContributions", void 0);
|
|
180
|
+
exports.HeadlessHostedPluginSupport = HeadlessHostedPluginSupport = tslib_1.__decorate([
|
|
181
|
+
(0, inversify_1.injectable)(),
|
|
182
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
183
|
+
], HeadlessHostedPluginSupport);
|
|
184
|
+
//# sourceMappingURL=headless-hosted-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-hosted-plugin.js","sourceRoot":"","sources":["../../../src/hosted/node/headless-hosted-plugin.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,yDAA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,MAAM,yBAAyB,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;QACjF,IAAI,CAAC,yBAAyB,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,0CAA0C,sBAAsB,EAAE,CAAC,CAAC;QACxF,CAAC;QACD,OAAO,yBAAyB,CAAC;IACrC,CAAC;CACJ,CAAA;AArJY,kEAA2B;AAGjB;IADlB,IAAA,kBAAM,EAAC,2CAAmB,CAAC;sCACM,2CAAmB;kEAAC;AAGnC;IADlB,IAAA,kBAAM,EAAC,8CAAoB,CAAC;;wEACgC;AAG1C;IADlB,IAAA,kBAAM,EAAC,mDAA0B,CAAC;sCACP,mDAA0B;4DAAC;AAGpC;IADlB,IAAA,kBAAM,EAAC,gCAAc,CAAC;sCACY,yCAAkB;mEAAC;AAInC;IAFlB,IAAA,kBAAM,EAAC,2BAAoB,CAAC;IAC5B,IAAA,iBAAK,EAAC,4DAAiC,CAAC;;2FACiD;sCAhBjF,2BAA2B;IADvC,IAAA,sBAAU,GAAE;;GACA,2BAA2B,CAqJvC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HostedPluginServerImpl } from '@theia/plugin-ext/lib/hosted/node/plugin-service';
|
|
2
|
+
export declare class HeadlessHostedPluginServerImpl extends HostedPluginServerImpl {
|
|
3
|
+
protected getServerName(): string;
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=headless-plugin-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-plugin-service.d.ts","sourceRoot":"","sources":["../../../src/hosted/node/headless-plugin-service.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAE1F,qBACa,8BAA+B,SAAQ,sBAAsB;cACnD,aAAa,IAAI,MAAM;CAG7C"}
|
|
@@ -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
|
+
exports.HeadlessHostedPluginServerImpl = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const plugin_service_1 = require("@theia/plugin-ext/lib/hosted/node/plugin-service");
|
|
22
|
+
let HeadlessHostedPluginServerImpl = class HeadlessHostedPluginServerImpl extends plugin_service_1.HostedPluginServerImpl {
|
|
23
|
+
getServerName() {
|
|
24
|
+
return 'headless-hosted-plugin';
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.HeadlessHostedPluginServerImpl = HeadlessHostedPluginServerImpl;
|
|
28
|
+
exports.HeadlessHostedPluginServerImpl = HeadlessHostedPluginServerImpl = tslib_1.__decorate([
|
|
29
|
+
(0, inversify_1.injectable)()
|
|
30
|
+
], HeadlessHostedPluginServerImpl);
|
|
31
|
+
//# sourceMappingURL=headless-plugin-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-plugin-service.js","sourceRoot":"","sources":["../../../src/hosted/node/headless-plugin-service.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,qFAA0F;AAGnF,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,uCAAsB;IACnD,aAAa;QAC5B,OAAO,wBAAwB,CAAC;IACpC,CAAC;CACJ,CAAA;AAJY,wEAA8B;yCAA9B,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAI1C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { interfaces } from '@theia/core/shared/inversify';
|
|
2
|
+
export declare function bindCommonHostedBackend(bind: interfaces.Bind): void;
|
|
3
|
+
export declare function bindHeadlessHosted(bind: interfaces.Bind): void;
|
|
4
|
+
//# sourceMappingURL=plugin-ext-headless-hosted-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-ext-headless-hosted-module.d.ts","sourceRoot":"","sources":["../../../src/hosted/node/plugin-ext-headless-hosted-module.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAmB,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAY3E,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAgBnE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CA0B9D"}
|