@theia/plugin-dev 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.
- package/README.md +1 -1
- package/package.json +8 -8
- package/lib/browser/hosted-plugin-controller.d.ts +0 -75
- package/lib/browser/hosted-plugin-controller.d.ts.map +0 -1
- package/lib/browser/hosted-plugin-controller.js +0 -345
- package/lib/browser/hosted-plugin-controller.js.map +0 -1
- package/lib/browser/hosted-plugin-frontend-contribution.d.ts +0 -7
- package/lib/browser/hosted-plugin-frontend-contribution.d.ts.map +0 -1
- package/lib/browser/hosted-plugin-frontend-contribution.js +0 -49
- package/lib/browser/hosted-plugin-frontend-contribution.js.map +0 -1
- package/lib/browser/hosted-plugin-informer.d.ts +0 -26
- package/lib/browser/hosted-plugin-informer.d.ts.map +0 -1
- package/lib/browser/hosted-plugin-informer.js +0 -95
- package/lib/browser/hosted-plugin-informer.js.map +0 -1
- package/lib/browser/hosted-plugin-log-viewer.d.ts +0 -15
- package/lib/browser/hosted-plugin-log-viewer.d.ts.map +0 -1
- package/lib/browser/hosted-plugin-log-viewer.js +0 -62
- package/lib/browser/hosted-plugin-log-viewer.js.map +0 -1
- package/lib/browser/hosted-plugin-manager-client.d.ts +0 -81
- package/lib/browser/hosted-plugin-manager-client.d.ts.map +0 -1
- package/lib/browser/hosted-plugin-manager-client.js +0 -407
- package/lib/browser/hosted-plugin-manager-client.js.map +0 -1
- package/lib/browser/plugin-dev-frontend-module.d.ts +0 -4
- package/lib/browser/plugin-dev-frontend-module.d.ts.map +0 -1
- package/lib/browser/plugin-dev-frontend-module.js +0 -43
- package/lib/browser/plugin-dev-frontend-module.js.map +0 -1
- package/lib/common/hosted-plugin-preferences.d.ts +0 -16
- package/lib/common/hosted-plugin-preferences.d.ts.map +0 -1
- package/lib/common/hosted-plugin-preferences.js +0 -81
- package/lib/common/hosted-plugin-preferences.js.map +0 -1
- package/lib/common/index.d.ts +0 -3
- package/lib/common/index.d.ts.map +0 -1
- package/lib/common/index.js +0 -23
- package/lib/common/index.js.map +0 -1
- package/lib/common/plugin-dev-protocol.d.ts +0 -29
- package/lib/common/plugin-dev-protocol.d.ts.map +0 -1
- package/lib/common/plugin-dev-protocol.js +0 -21
- package/lib/common/plugin-dev-protocol.js.map +0 -1
- package/lib/node/hosted-instance-manager.d.ts +0 -105
- package/lib/node/hosted-instance-manager.d.ts.map +0 -1
- package/lib/node/hosted-instance-manager.js +0 -329
- package/lib/node/hosted-instance-manager.js.map +0 -1
- package/lib/node/hosted-plugin-reader.d.ts +0 -11
- package/lib/node/hosted-plugin-reader.d.ts.map +0 -1
- package/lib/node/hosted-plugin-reader.js +0 -61
- package/lib/node/hosted-plugin-reader.js.map +0 -1
- package/lib/node/hosted-plugin-uri-postprocessor.d.ts +0 -7
- package/lib/node/hosted-plugin-uri-postprocessor.d.ts.map +0 -1
- package/lib/node/hosted-plugin-uri-postprocessor.js +0 -28
- package/lib/node/hosted-plugin-uri-postprocessor.js.map +0 -1
- package/lib/node/hosted-plugins-manager.d.ts +0 -44
- package/lib/node/hosted-plugins-manager.d.ts.map +0 -1
- package/lib/node/hosted-plugins-manager.js +0 -111
- package/lib/node/hosted-plugins-manager.js.map +0 -1
- package/lib/node/plugin-dev-backend-module.d.ts +0 -5
- package/lib/node/plugin-dev-backend-module.d.ts.map +0 -1
- package/lib/node/plugin-dev-backend-module.js +0 -56
- package/lib/node/plugin-dev-backend-module.js.map +0 -1
- package/lib/node/plugin-dev-service.d.ts +0 -26
- package/lib/node/plugin-dev-service.d.ts.map +0 -1
- package/lib/node/plugin-dev-service.js +0 -101
- package/lib/node/plugin-dev-service.js.map +0 -1
- package/lib/node-electron/plugin-dev-electron-backend-module.d.ts +0 -4
- package/lib/node-electron/plugin-dev-electron-backend-module.d.ts.map +0 -1
- package/lib/node-electron/plugin-dev-electron-backend-module.js +0 -29
- package/lib/node-electron/plugin-dev-electron-backend-module.js.map +0 -1
- package/lib/package.spec.d.ts +0 -1
- package/lib/package.spec.d.ts.map +0 -1
- package/lib/package.spec.js +0 -26
- package/lib/package.spec.js.map +0 -1
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { RpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
|
|
2
|
-
import { PluginMetadata } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
|
3
|
-
export declare const pluginDevServicePath = "/services/plugin-dev";
|
|
4
|
-
export declare const PluginDevServer: unique symbol;
|
|
5
|
-
export interface PluginDevServer extends RpcServer<PluginDevClient> {
|
|
6
|
-
getHostedPlugin(): Promise<PluginMetadata | undefined>;
|
|
7
|
-
runHostedPluginInstance(uri: string): Promise<string>;
|
|
8
|
-
runDebugHostedPluginInstance(uri: string, debugConfig: PluginDebugConfiguration): Promise<string>;
|
|
9
|
-
terminateHostedPluginInstance(): Promise<void>;
|
|
10
|
-
isHostedPluginInstanceRunning(): Promise<boolean>;
|
|
11
|
-
getHostedPluginInstanceURI(): Promise<string>;
|
|
12
|
-
getHostedPluginURI(): Promise<string>;
|
|
13
|
-
runWatchCompilation(uri: string): Promise<void>;
|
|
14
|
-
stopWatchCompilation(uri: string): Promise<void>;
|
|
15
|
-
isWatchCompilationRunning(uri: string): Promise<boolean>;
|
|
16
|
-
isPluginValid(uri: string): Promise<boolean>;
|
|
17
|
-
}
|
|
18
|
-
export interface PluginDevClient {
|
|
19
|
-
}
|
|
20
|
-
export interface PluginDebugPort {
|
|
21
|
-
serverName: string;
|
|
22
|
-
debugPort: number;
|
|
23
|
-
}
|
|
24
|
-
export interface PluginDebugConfiguration {
|
|
25
|
-
debugMode?: string;
|
|
26
|
-
pluginLocation?: string;
|
|
27
|
-
debugPort?: string | PluginDebugPort[];
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=plugin-dev-protocol.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-dev-protocol.d.ts","sourceRoot":"","sources":["../../src/common/plugin-dev-protocol.ts"],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AC,EAAE,MAAM,GAAG,eAAe,EAAE,CAAA;CACzC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2019 Red Hat, Inc. 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.PluginDevServer = exports.pluginDevServicePath = void 0;
|
|
19
|
-
exports.pluginDevServicePath = '/services/plugin-dev';
|
|
20
|
-
exports.PluginDevServer = Symbol('PluginDevServer');
|
|
21
|
-
//# sourceMappingURL=plugin-dev-protocol.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-dev-protocol.js","sourceRoot":"","sources":["../../src/common/plugin-dev-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;;;AAKnE,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { RequestOptions, RequestService } from '@theia/core/shared/@theia/request';
|
|
3
|
-
import * as cp from 'child_process';
|
|
4
|
-
import URI from '@theia/core/lib/common/uri';
|
|
5
|
-
import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
|
|
6
|
-
import { HostedPluginUriPostProcessor } from './hosted-plugin-uri-postprocessor';
|
|
7
|
-
import { HostedPluginSupport } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin';
|
|
8
|
-
import { MetadataScanner } from '@theia/plugin-ext/lib/hosted/node/metadata-scanner';
|
|
9
|
-
import { PluginDebugConfiguration } from '../common/plugin-dev-protocol';
|
|
10
|
-
import { HostedPluginProcess } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin-process';
|
|
11
|
-
export declare const HostedInstanceManager: unique symbol;
|
|
12
|
-
/**
|
|
13
|
-
* Is responsible for running and handling separate Theia instance with given plugin.
|
|
14
|
-
*/
|
|
15
|
-
export interface HostedInstanceManager {
|
|
16
|
-
/**
|
|
17
|
-
* Checks whether hosted instance is run.
|
|
18
|
-
*/
|
|
19
|
-
isRunning(): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Runs specified by the given uri plugin in separate Theia instance.
|
|
22
|
-
*
|
|
23
|
-
* @param pluginUri uri to the plugin source location
|
|
24
|
-
* @param port port on which new instance of Theia should be run. Optional.
|
|
25
|
-
* @returns uri where new Theia instance is run
|
|
26
|
-
*/
|
|
27
|
-
run(pluginUri: URI, port?: number): Promise<URI>;
|
|
28
|
-
/**
|
|
29
|
-
* Runs specified by the given uri plugin with debug in separate Theia instance.
|
|
30
|
-
* @param pluginUri uri to the plugin source location
|
|
31
|
-
* @param debugConfig debug configuration
|
|
32
|
-
* @returns uri where new Theia instance is run
|
|
33
|
-
*/
|
|
34
|
-
debug(pluginUri: URI, debugConfig: PluginDebugConfiguration): Promise<URI>;
|
|
35
|
-
/**
|
|
36
|
-
* Terminates hosted plugin instance.
|
|
37
|
-
* Throws error if instance is not running.
|
|
38
|
-
*/
|
|
39
|
-
terminate(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Returns uri where hosted instance is run.
|
|
42
|
-
* Throws error if instance is not running.
|
|
43
|
-
*/
|
|
44
|
-
getInstanceURI(): URI;
|
|
45
|
-
/**
|
|
46
|
-
* Returns uri where plugin loaded into hosted instance is located.
|
|
47
|
-
* Throws error if instance is not running.
|
|
48
|
-
*/
|
|
49
|
-
getPluginURI(): URI;
|
|
50
|
-
/**
|
|
51
|
-
* Checks whether given uri points to a valid plugin.
|
|
52
|
-
*
|
|
53
|
-
* @param uri uri to the plugin source location
|
|
54
|
-
*/
|
|
55
|
-
isPluginValid(uri: URI): Promise<boolean>;
|
|
56
|
-
}
|
|
57
|
-
export declare abstract class AbstractHostedInstanceManager implements HostedInstanceManager {
|
|
58
|
-
protected hostedInstanceProcess: cp.ChildProcess;
|
|
59
|
-
protected isPluginRunning: boolean;
|
|
60
|
-
protected instanceUri: URI;
|
|
61
|
-
protected pluginUri: URI;
|
|
62
|
-
protected instanceOptions: Omit<RequestOptions, 'url'>;
|
|
63
|
-
protected readonly hostedPluginSupport: HostedPluginSupport;
|
|
64
|
-
protected readonly metadata: MetadataScanner;
|
|
65
|
-
protected readonly hostedPluginProcess: HostedPluginProcess;
|
|
66
|
-
protected readonly request: RequestService;
|
|
67
|
-
isRunning(): boolean;
|
|
68
|
-
run(pluginUri: URI, port?: number): Promise<URI>;
|
|
69
|
-
debug(pluginUri: URI, debugConfig: PluginDebugConfiguration): Promise<URI>;
|
|
70
|
-
private doRun;
|
|
71
|
-
terminate(): void;
|
|
72
|
-
getInstanceURI(): URI;
|
|
73
|
-
getPluginURI(): URI;
|
|
74
|
-
/**
|
|
75
|
-
* Checks that the `instanceUri` is responding before exiting method
|
|
76
|
-
*/
|
|
77
|
-
checkInstanceUriReady(): Promise<void>;
|
|
78
|
-
/**
|
|
79
|
-
* Start a loop to ping, if ping is OK return immediately, else start a new ping after 1second. We iterate for the given amount of loops provided in remainingCount
|
|
80
|
-
* @param remainingCount the number of occurrence to check
|
|
81
|
-
* @param resolve resolve function if ok
|
|
82
|
-
* @param reject reject function if error
|
|
83
|
-
*/
|
|
84
|
-
private pingLoop;
|
|
85
|
-
/**
|
|
86
|
-
* Ping the plugin URI (checking status of the head)
|
|
87
|
-
*/
|
|
88
|
-
private ping;
|
|
89
|
-
isPluginValid(uri: URI): Promise<boolean>;
|
|
90
|
-
protected getStartCommand(port?: number, debugConfig?: PluginDebugConfiguration): Promise<string[]>;
|
|
91
|
-
protected postProcessInstanceUri(uri: URI): Promise<URI>;
|
|
92
|
-
protected postProcessInstanceOptions(options: Omit<RequestOptions, 'url'>): Promise<Omit<RequestOptions, 'url'>>;
|
|
93
|
-
protected runHostedPluginTheiaInstance(command: string[], options: cp.SpawnOptions): Promise<URI>;
|
|
94
|
-
protected validatePort(port: number): Promise<void>;
|
|
95
|
-
protected isPortFree(port: number): Promise<boolean>;
|
|
96
|
-
}
|
|
97
|
-
export declare class NodeHostedPluginRunner extends AbstractHostedInstanceManager {
|
|
98
|
-
protected readonly uriPostProcessors: ContributionProvider<HostedPluginUriPostProcessor>;
|
|
99
|
-
protected postProcessInstanceUri(uri: URI): Promise<URI>;
|
|
100
|
-
protected postProcessInstanceOptions(options: object): Promise<object>;
|
|
101
|
-
protected getStartCommand(port?: number, debugConfig?: PluginDebugConfiguration): Promise<string[]>;
|
|
102
|
-
}
|
|
103
|
-
export declare class ElectronNodeHostedPluginRunner extends AbstractHostedInstanceManager {
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=hosted-instance-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-instance-manager.d.ts","sourceRoot":"","sources":["../../src/node/hosted-instance-manager.ts"],"names":[],"mappings":";AAgBA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mCAAmC,CA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AAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUzD,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAcvD;AAED,qBACa,sBAAuB,SAAQ,6BAA6B;IAErE,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,4BAA4B,CAAC,CAAC;cAEhE,sBAAsB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;cAO9C,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;cAO5D,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAQrH;AAED,qBACa,8BAA+B,SAAQ,6BAA6B;CAEhF"}
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2018 Red Hat, Inc. 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.ElectronNodeHostedPluginRunner = exports.NodeHostedPluginRunner = exports.AbstractHostedInstanceManager = exports.HostedInstanceManager = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const request_1 = require("@theia/core/shared/@theia/request");
|
|
21
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
-
const cp = require("child_process");
|
|
23
|
-
const fs = require("@theia/core/shared/fs-extra");
|
|
24
|
-
const net = require("net");
|
|
25
|
-
const path = require("path");
|
|
26
|
-
const uri_1 = require("@theia/core/lib/common/uri");
|
|
27
|
-
const contribution_provider_1 = require("@theia/core/lib/common/contribution-provider");
|
|
28
|
-
const hosted_plugin_uri_postprocessor_1 = require("./hosted-plugin-uri-postprocessor");
|
|
29
|
-
const core_1 = require("@theia/core");
|
|
30
|
-
const file_uri_1 = require("@theia/core/lib/common/file-uri");
|
|
31
|
-
const types_1 = require("@theia/plugin-ext/lib/common/types");
|
|
32
|
-
const hosted_plugin_1 = require("@theia/plugin-ext/lib/hosted/node/hosted-plugin");
|
|
33
|
-
const metadata_scanner_1 = require("@theia/plugin-ext/lib/hosted/node/metadata-scanner");
|
|
34
|
-
const hosted_plugin_process_1 = require("@theia/plugin-ext/lib/hosted/node/hosted-plugin-process");
|
|
35
|
-
const errors_1 = require("@theia/plugin-ext/lib/common/errors");
|
|
36
|
-
const DEFAULT_HOSTED_PLUGIN_PORT = 3030;
|
|
37
|
-
exports.HostedInstanceManager = Symbol('HostedInstanceManager');
|
|
38
|
-
const HOSTED_INSTANCE_START_TIMEOUT_MS = 30000;
|
|
39
|
-
const THEIA_INSTANCE_REGEX = /.*Theia app listening on (.*).*\./;
|
|
40
|
-
const PROCESS_OPTIONS = {
|
|
41
|
-
cwd: process.cwd(),
|
|
42
|
-
env: { ...process.env }
|
|
43
|
-
};
|
|
44
|
-
let AbstractHostedInstanceManager = class AbstractHostedInstanceManager {
|
|
45
|
-
constructor() {
|
|
46
|
-
this.isPluginRunning = false;
|
|
47
|
-
}
|
|
48
|
-
isRunning() {
|
|
49
|
-
return this.isPluginRunning;
|
|
50
|
-
}
|
|
51
|
-
async run(pluginUri, port) {
|
|
52
|
-
return this.doRun(pluginUri, port);
|
|
53
|
-
}
|
|
54
|
-
async debug(pluginUri, debugConfig) {
|
|
55
|
-
return this.doRun(pluginUri, undefined, debugConfig);
|
|
56
|
-
}
|
|
57
|
-
async doRun(pluginUri, port, debugConfig) {
|
|
58
|
-
if (this.isPluginRunning) {
|
|
59
|
-
this.hostedPluginSupport.sendLog({ data: 'Hosted plugin instance is already running.', type: types_1.LogType.Info });
|
|
60
|
-
throw new Error('Hosted instance is already running.');
|
|
61
|
-
}
|
|
62
|
-
let command;
|
|
63
|
-
let processOptions;
|
|
64
|
-
if (pluginUri.scheme === 'file') {
|
|
65
|
-
processOptions = { ...PROCESS_OPTIONS };
|
|
66
|
-
// get filesystem path that work cross operating systems
|
|
67
|
-
processOptions.env.HOSTED_PLUGIN = file_uri_1.FileUri.fsPath(pluginUri.toString());
|
|
68
|
-
// Disable all the other plugins on this instance
|
|
69
|
-
processOptions.env.THEIA_PLUGINS = '';
|
|
70
|
-
command = await this.getStartCommand(port, debugConfig);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
throw new Error('Not supported plugin location: ' + pluginUri.toString());
|
|
74
|
-
}
|
|
75
|
-
this.instanceUri = await this.postProcessInstanceUri(await this.runHostedPluginTheiaInstance(command, processOptions));
|
|
76
|
-
this.pluginUri = pluginUri;
|
|
77
|
-
// disable redirect to grab the release
|
|
78
|
-
this.instanceOptions = {
|
|
79
|
-
followRedirects: 0
|
|
80
|
-
};
|
|
81
|
-
this.instanceOptions = await this.postProcessInstanceOptions(this.instanceOptions);
|
|
82
|
-
await this.checkInstanceUriReady();
|
|
83
|
-
return this.instanceUri;
|
|
84
|
-
}
|
|
85
|
-
terminate() {
|
|
86
|
-
if (this.isPluginRunning && !!this.hostedInstanceProcess.pid) {
|
|
87
|
-
this.hostedPluginProcess.killProcessTree(this.hostedInstanceProcess.pid);
|
|
88
|
-
this.hostedPluginSupport.sendLog({ data: 'Hosted instance has been terminated', type: types_1.LogType.Info });
|
|
89
|
-
this.isPluginRunning = false;
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
throw new Error('Hosted plugin instance is not running.');
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
getInstanceURI() {
|
|
96
|
-
if (this.isPluginRunning) {
|
|
97
|
-
return this.instanceUri;
|
|
98
|
-
}
|
|
99
|
-
throw new Error('Hosted plugin instance is not running.');
|
|
100
|
-
}
|
|
101
|
-
getPluginURI() {
|
|
102
|
-
if (this.isPluginRunning) {
|
|
103
|
-
return this.pluginUri;
|
|
104
|
-
}
|
|
105
|
-
throw new Error('Hosted plugin instance is not running.');
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Checks that the `instanceUri` is responding before exiting method
|
|
109
|
-
*/
|
|
110
|
-
async checkInstanceUriReady() {
|
|
111
|
-
return new Promise((resolve, reject) => this.pingLoop(60, resolve, reject));
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Start a loop to ping, if ping is OK return immediately, else start a new ping after 1second. We iterate for the given amount of loops provided in remainingCount
|
|
115
|
-
* @param remainingCount the number of occurrence to check
|
|
116
|
-
* @param resolve resolve function if ok
|
|
117
|
-
* @param reject reject function if error
|
|
118
|
-
*/
|
|
119
|
-
async pingLoop(remainingCount, resolve, reject) {
|
|
120
|
-
const isOK = await this.ping();
|
|
121
|
-
if (isOK) {
|
|
122
|
-
resolve();
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
if (remainingCount > 0) {
|
|
126
|
-
setTimeout(() => this.pingLoop(--remainingCount, resolve, reject), 1000);
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
reject(new Error('Unable to ping the remote server'));
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Ping the plugin URI (checking status of the head)
|
|
135
|
-
*/
|
|
136
|
-
async ping() {
|
|
137
|
-
try {
|
|
138
|
-
const url = this.instanceUri.toString();
|
|
139
|
-
// Wait that the status is OK
|
|
140
|
-
const response = await this.request.request({ url, type: 'HEAD', ...this.instanceOptions });
|
|
141
|
-
return response.res.statusCode === 200;
|
|
142
|
-
}
|
|
143
|
-
catch {
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
async isPluginValid(uri) {
|
|
148
|
-
const pckPath = path.join(file_uri_1.FileUri.fsPath(uri), 'package.json');
|
|
149
|
-
try {
|
|
150
|
-
const pck = await fs.readJSON(pckPath);
|
|
151
|
-
this.metadata.getScanner(pck);
|
|
152
|
-
return true;
|
|
153
|
-
}
|
|
154
|
-
catch (err) {
|
|
155
|
-
if (!(0, errors_1.isENOENT)(err)) {
|
|
156
|
-
console.error(err);
|
|
157
|
-
}
|
|
158
|
-
return false;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
async getStartCommand(port, debugConfig) {
|
|
162
|
-
const processArguments = process.argv;
|
|
163
|
-
let command;
|
|
164
|
-
if (core_1.environment.electron.is()) {
|
|
165
|
-
command = ['npm', 'run', 'theia', 'start'];
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
command = processArguments.filter((arg, index, args) => {
|
|
169
|
-
// remove --port=X and --port X arguments if set
|
|
170
|
-
// remove --plugins arguments
|
|
171
|
-
if (arg.startsWith('--port') || args[index - 1] === '--port') {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
return arg;
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
if (process.env.HOSTED_PLUGIN_HOSTNAME) {
|
|
180
|
-
command.push('--hostname=' + process.env.HOSTED_PLUGIN_HOSTNAME);
|
|
181
|
-
}
|
|
182
|
-
if (port) {
|
|
183
|
-
await this.validatePort(port);
|
|
184
|
-
command.push('--port=' + port);
|
|
185
|
-
}
|
|
186
|
-
if (debugConfig) {
|
|
187
|
-
if (debugConfig.debugPort === undefined) {
|
|
188
|
-
command.push(`--hosted-plugin-${debugConfig.debugMode || 'inspect'}=0.0.0.0`);
|
|
189
|
-
}
|
|
190
|
-
else if (typeof debugConfig.debugPort === 'string') {
|
|
191
|
-
command.push(`--hosted-plugin-${debugConfig.debugMode || 'inspect'}=0.0.0.0:${debugConfig.debugPort}`);
|
|
192
|
-
}
|
|
193
|
-
else if (Array.isArray(debugConfig.debugPort)) {
|
|
194
|
-
if (debugConfig.debugPort.length === 0) {
|
|
195
|
-
// treat empty array just like undefined
|
|
196
|
-
command.push(`--hosted-plugin-${debugConfig.debugMode || 'inspect'}=0.0.0.0`);
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
for (const serverToPort of debugConfig.debugPort) {
|
|
200
|
-
command.push(`--${serverToPort.serverName}-${debugConfig.debugMode || 'inspect'}=0.0.0.0:${serverToPort.debugPort}`);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
return command;
|
|
206
|
-
}
|
|
207
|
-
async postProcessInstanceUri(uri) {
|
|
208
|
-
return uri;
|
|
209
|
-
}
|
|
210
|
-
async postProcessInstanceOptions(options) {
|
|
211
|
-
return options;
|
|
212
|
-
}
|
|
213
|
-
runHostedPluginTheiaInstance(command, options) {
|
|
214
|
-
this.isPluginRunning = true;
|
|
215
|
-
return new Promise((resolve, reject) => {
|
|
216
|
-
let started = false;
|
|
217
|
-
const outputListener = (data) => {
|
|
218
|
-
const line = data.toString();
|
|
219
|
-
const match = THEIA_INSTANCE_REGEX.exec(line);
|
|
220
|
-
if (match) {
|
|
221
|
-
this.hostedInstanceProcess.stdout.removeListener('data', outputListener);
|
|
222
|
-
started = true;
|
|
223
|
-
resolve(new uri_1.default(match[1]));
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
if (core_1.isWindows) {
|
|
227
|
-
// Has to be set for running on windows (electron).
|
|
228
|
-
// See also: https://github.com/nodejs/node/issues/3675
|
|
229
|
-
options.shell = true;
|
|
230
|
-
}
|
|
231
|
-
this.hostedInstanceProcess = cp.spawn(command.shift(), command, options);
|
|
232
|
-
this.hostedInstanceProcess.on('error', () => { this.isPluginRunning = false; });
|
|
233
|
-
this.hostedInstanceProcess.on('exit', () => { this.isPluginRunning = false; });
|
|
234
|
-
this.hostedInstanceProcess.stdout.addListener('data', outputListener);
|
|
235
|
-
this.hostedInstanceProcess.stdout.addListener('data', data => {
|
|
236
|
-
this.hostedPluginSupport.sendLog({ data: data.toString(), type: types_1.LogType.Info });
|
|
237
|
-
});
|
|
238
|
-
this.hostedInstanceProcess.stderr.addListener('data', data => {
|
|
239
|
-
this.hostedPluginSupport.sendLog({ data: data.toString(), type: types_1.LogType.Error });
|
|
240
|
-
});
|
|
241
|
-
setTimeout(() => {
|
|
242
|
-
if (!started) {
|
|
243
|
-
this.terminate();
|
|
244
|
-
this.isPluginRunning = false;
|
|
245
|
-
reject(new Error('Timeout.'));
|
|
246
|
-
}
|
|
247
|
-
}, HOSTED_INSTANCE_START_TIMEOUT_MS);
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
async validatePort(port) {
|
|
251
|
-
if (port < 1 || port > 65535) {
|
|
252
|
-
throw new Error('Port value is incorrect.');
|
|
253
|
-
}
|
|
254
|
-
if (!await this.isPortFree(port)) {
|
|
255
|
-
throw new Error('Port ' + port + ' is already in use.');
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
isPortFree(port) {
|
|
259
|
-
return new Promise(resolve => {
|
|
260
|
-
const server = net.createServer();
|
|
261
|
-
server.listen(port, '0.0.0.0');
|
|
262
|
-
server.on('error', () => {
|
|
263
|
-
resolve(false);
|
|
264
|
-
});
|
|
265
|
-
server.on('listening', () => {
|
|
266
|
-
server.close();
|
|
267
|
-
resolve(true);
|
|
268
|
-
});
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
exports.AbstractHostedInstanceManager = AbstractHostedInstanceManager;
|
|
273
|
-
tslib_1.__decorate([
|
|
274
|
-
(0, inversify_1.inject)(hosted_plugin_1.HostedPluginSupport),
|
|
275
|
-
tslib_1.__metadata("design:type", hosted_plugin_1.HostedPluginSupport)
|
|
276
|
-
], AbstractHostedInstanceManager.prototype, "hostedPluginSupport", void 0);
|
|
277
|
-
tslib_1.__decorate([
|
|
278
|
-
(0, inversify_1.inject)(metadata_scanner_1.MetadataScanner),
|
|
279
|
-
tslib_1.__metadata("design:type", metadata_scanner_1.MetadataScanner)
|
|
280
|
-
], AbstractHostedInstanceManager.prototype, "metadata", void 0);
|
|
281
|
-
tslib_1.__decorate([
|
|
282
|
-
(0, inversify_1.inject)(hosted_plugin_process_1.HostedPluginProcess),
|
|
283
|
-
tslib_1.__metadata("design:type", hosted_plugin_process_1.HostedPluginProcess)
|
|
284
|
-
], AbstractHostedInstanceManager.prototype, "hostedPluginProcess", void 0);
|
|
285
|
-
tslib_1.__decorate([
|
|
286
|
-
(0, inversify_1.inject)(request_1.RequestService),
|
|
287
|
-
tslib_1.__metadata("design:type", Object)
|
|
288
|
-
], AbstractHostedInstanceManager.prototype, "request", void 0);
|
|
289
|
-
exports.AbstractHostedInstanceManager = AbstractHostedInstanceManager = tslib_1.__decorate([
|
|
290
|
-
(0, inversify_1.injectable)()
|
|
291
|
-
], AbstractHostedInstanceManager);
|
|
292
|
-
let NodeHostedPluginRunner = class NodeHostedPluginRunner extends AbstractHostedInstanceManager {
|
|
293
|
-
async postProcessInstanceUri(uri) {
|
|
294
|
-
for (const uriPostProcessor of this.uriPostProcessors.getContributions()) {
|
|
295
|
-
uri = await uriPostProcessor.processUri(uri);
|
|
296
|
-
}
|
|
297
|
-
return uri;
|
|
298
|
-
}
|
|
299
|
-
async postProcessInstanceOptions(options) {
|
|
300
|
-
for (const uriPostProcessor of this.uriPostProcessors.getContributions()) {
|
|
301
|
-
options = await uriPostProcessor.processOptions(options);
|
|
302
|
-
}
|
|
303
|
-
return options;
|
|
304
|
-
}
|
|
305
|
-
async getStartCommand(port, debugConfig) {
|
|
306
|
-
if (!port) {
|
|
307
|
-
port = process.env.HOSTED_PLUGIN_PORT ?
|
|
308
|
-
Number(process.env.HOSTED_PLUGIN_PORT) :
|
|
309
|
-
((debugConfig === null || debugConfig === void 0 ? void 0 : debugConfig.debugPort) ? Number(debugConfig.debugPort) : DEFAULT_HOSTED_PLUGIN_PORT);
|
|
310
|
-
}
|
|
311
|
-
return super.getStartCommand(port, debugConfig);
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
exports.NodeHostedPluginRunner = NodeHostedPluginRunner;
|
|
315
|
-
tslib_1.__decorate([
|
|
316
|
-
(0, inversify_1.inject)(contribution_provider_1.ContributionProvider),
|
|
317
|
-
(0, inversify_1.named)(Symbol.for(hosted_plugin_uri_postprocessor_1.HostedPluginUriPostProcessorSymbolName)),
|
|
318
|
-
tslib_1.__metadata("design:type", Object)
|
|
319
|
-
], NodeHostedPluginRunner.prototype, "uriPostProcessors", void 0);
|
|
320
|
-
exports.NodeHostedPluginRunner = NodeHostedPluginRunner = tslib_1.__decorate([
|
|
321
|
-
(0, inversify_1.injectable)()
|
|
322
|
-
], NodeHostedPluginRunner);
|
|
323
|
-
let ElectronNodeHostedPluginRunner = class ElectronNodeHostedPluginRunner extends AbstractHostedInstanceManager {
|
|
324
|
-
};
|
|
325
|
-
exports.ElectronNodeHostedPluginRunner = ElectronNodeHostedPluginRunner;
|
|
326
|
-
exports.ElectronNodeHostedPluginRunner = ElectronNodeHostedPluginRunner = tslib_1.__decorate([
|
|
327
|
-
(0, inversify_1.injectable)()
|
|
328
|
-
], ElectronNodeHostedPluginRunner);
|
|
329
|
-
//# sourceMappingURL=hosted-instance-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-instance-manager.js","sourceRoot":"","sources":["../../src/node/hosted-instance-manager.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;A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lB,IAAA,kBAAM,EAAC,4CAAoB,CAAC;IAAE,IAAA,iBAAK,EAAC,MAAM,CAAC,GAAG,CAAC,wEAAsC,CAAC,CAAC;;iEACC;iCAFhF,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CA0BlC;AAGM,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,6BAA6B;CAEhF,CAAA;AAFY,wEAA8B;yCAA9B,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAE1C"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application';
|
|
2
|
-
import { HostedPluginReader as PluginReaderHosted } from '@theia/plugin-ext/lib/hosted/node/plugin-reader';
|
|
3
|
-
import { PluginDeployerHandler, PluginMetadata } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
|
4
|
-
export declare class HostedPluginReader implements BackendApplicationContribution {
|
|
5
|
-
protected pluginReader: PluginReaderHosted;
|
|
6
|
-
private readonly hostedPlugin;
|
|
7
|
-
protected deployerHandler: PluginDeployerHandler;
|
|
8
|
-
initialize(): Promise<void>;
|
|
9
|
-
getPlugin(): Promise<PluginMetadata | undefined>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=hosted-plugin-reader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-plugin-reader.d.ts","sourceRoot":"","sources":["../../src/node/hosted-plugin-reader.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAE3G,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAGrG,qBACa,kBAAmB,YAAW,8BAA8B;IAGrE,SAAS,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAE3C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA8C;IAG3E,SAAS,CAAC,eAAe,EAAE,qBAAqB,CAAC;IAE3C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAmB3B,SAAS,IAAI,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;CAGzD"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2018 Red Hat, Inc. 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.HostedPluginReader = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const plugin_reader_1 = require("@theia/plugin-ext/lib/hosted/node/plugin-reader");
|
|
22
|
-
const promise_util_1 = require("@theia/core/lib/common/promise-util");
|
|
23
|
-
const plugin_protocol_1 = require("@theia/plugin-ext/lib/common/plugin-protocol");
|
|
24
|
-
const plugin_deployer_entry_impl_1 = require("@theia/plugin-ext/lib/main/node/plugin-deployer-entry-impl");
|
|
25
|
-
let HostedPluginReader = class HostedPluginReader {
|
|
26
|
-
constructor() {
|
|
27
|
-
this.hostedPlugin = new promise_util_1.Deferred();
|
|
28
|
-
}
|
|
29
|
-
async initialize() {
|
|
30
|
-
this.pluginReader.getPluginMetadata(process.env.HOSTED_PLUGIN)
|
|
31
|
-
.then(this.hostedPlugin.resolve.bind(this.hostedPlugin));
|
|
32
|
-
const pluginPath = process.env.HOSTED_PLUGIN;
|
|
33
|
-
if (pluginPath) {
|
|
34
|
-
const hostedPlugin = new plugin_deployer_entry_impl_1.PluginDeployerEntryImpl('Hosted Plugin', pluginPath, pluginPath);
|
|
35
|
-
hostedPlugin.storeValue('isUnderDevelopment', true);
|
|
36
|
-
const hostedMetadata = await this.hostedPlugin.promise;
|
|
37
|
-
if (hostedMetadata.model.entryPoint && (hostedMetadata.model.entryPoint.backend || hostedMetadata.model.entryPoint.headless)) {
|
|
38
|
-
this.deployerHandler.deployBackendPlugins([hostedPlugin]);
|
|
39
|
-
}
|
|
40
|
-
if (hostedMetadata.model.entryPoint && hostedMetadata.model.entryPoint.frontend) {
|
|
41
|
-
this.deployerHandler.deployFrontendPlugins([hostedPlugin]);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
async getPlugin() {
|
|
46
|
-
return this.hostedPlugin.promise;
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
exports.HostedPluginReader = HostedPluginReader;
|
|
50
|
-
tslib_1.__decorate([
|
|
51
|
-
(0, inversify_1.inject)(plugin_reader_1.HostedPluginReader),
|
|
52
|
-
tslib_1.__metadata("design:type", plugin_reader_1.HostedPluginReader)
|
|
53
|
-
], HostedPluginReader.prototype, "pluginReader", void 0);
|
|
54
|
-
tslib_1.__decorate([
|
|
55
|
-
(0, inversify_1.inject)(plugin_protocol_1.PluginDeployerHandler),
|
|
56
|
-
tslib_1.__metadata("design:type", Object)
|
|
57
|
-
], HostedPluginReader.prototype, "deployerHandler", void 0);
|
|
58
|
-
exports.HostedPluginReader = HostedPluginReader = tslib_1.__decorate([
|
|
59
|
-
(0, inversify_1.injectable)()
|
|
60
|
-
], HostedPluginReader);
|
|
61
|
-
//# sourceMappingURL=hosted-plugin-reader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-plugin-reader.js","sourceRoot":"","sources":["../../src/node/hosted-plugin-reader.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,4DAAkE;AAElE,mFAA2G;AAC3G,sEAA+D;AAC/D,kFAAqG;AACrG,2GAAqG;AAG9F,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAAxB;QAKc,iBAAY,GAAG,IAAI,uBAAQ,EAA8B,CAAC;IA2B/E,CAAC;IAtBG,KAAK,CAAC,UAAU;QACZ,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;aACzD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QAE7D,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;QAC7C,IAAI,UAAU,EAAE,CAAC;YACb,MAAM,YAAY,GAAG,IAAI,oDAAuB,CAAC,eAAe,EAAE,UAAW,EAAE,UAAU,CAAC,CAAC;YAC3F,YAAY,CAAC,UAAU,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;YACpD,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;YACvD,IAAI,cAAe,CAAC,KAAK,CAAC,UAAU,IAAI,CAAC,cAAe,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,IAAI,cAAe,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC9H,IAAI,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;YAC9D,CAAC;YAED,IAAI,cAAe,CAAC,KAAK,CAAC,UAAU,IAAI,cAAe,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;gBAChF,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;YAC/D,CAAC;QACL,CAAC;IACL,CAAC;IAED,KAAK,CAAC,SAAS;QACX,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;IACrC,CAAC;CACJ,CAAA;AAhCY,gDAAkB;AAGjB;IADT,IAAA,kBAAM,EAAC,kCAAkB,CAAC;sCACH,kCAAkB;wDAAC;AAKjC;IADT,IAAA,kBAAM,EAAC,uCAAqB,CAAC;;2DACmB;6BARxC,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CAgC9B"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import URI from '@theia/core/lib/common/uri';
|
|
2
|
-
export declare const HostedPluginUriPostProcessorSymbolName = "HostedPluginUriPostProcessor";
|
|
3
|
-
export interface HostedPluginUriPostProcessor {
|
|
4
|
-
processUri(uri: URI): Promise<URI>;
|
|
5
|
-
processOptions(options: object): Promise<object>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=hosted-plugin-uri-postprocessor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-plugin-uri-postprocessor.d.ts","sourceRoot":"","sources":["../../src/node/hosted-plugin-uri-postprocessor.ts"],"names":[],"mappings":"AAgBA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAU7C,eAAO,MAAM,sCAAsC,iCAAiC,CAAC;AAErF,MAAM,WAAW,4BAA4B;IACzC,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACnC,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACpD"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2018 Red Hat, Inc. 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.HostedPluginUriPostProcessorSymbolName = void 0;
|
|
19
|
-
// We export symbol name instead of symbol itself here because we need to provide
|
|
20
|
-
// a contribution point to which any extensions could contribute.
|
|
21
|
-
// In case of just symbols, symbol inside an extension won't be the same as here
|
|
22
|
-
// even if the extension imports this module.
|
|
23
|
-
// To solve this problem we should provide global symbol. So right way to use the contribution point is:
|
|
24
|
-
// ...
|
|
25
|
-
// bind(Symbol.for(HostedPluginUriPostProcessorSymbolName)).to(AContribution);
|
|
26
|
-
// ...
|
|
27
|
-
exports.HostedPluginUriPostProcessorSymbolName = 'HostedPluginUriPostProcessor';
|
|
28
|
-
//# sourceMappingURL=hosted-plugin-uri-postprocessor.js.map
|