@theia/plugin-dev 1.45.1 → 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.
- package/README.md +31 -31
- package/lib/browser/hosted-plugin-controller.d.ts +74 -74
- package/lib/browser/hosted-plugin-controller.js +352 -352
- package/lib/browser/hosted-plugin-frontend-contribution.d.ts +6 -6
- package/lib/browser/hosted-plugin-frontend-contribution.js +56 -56
- package/lib/browser/hosted-plugin-informer.d.ts +25 -25
- package/lib/browser/hosted-plugin-informer.js +102 -102
- package/lib/browser/hosted-plugin-log-viewer.d.ts +14 -14
- package/lib/browser/hosted-plugin-log-viewer.js +69 -69
- package/lib/browser/hosted-plugin-manager-client.d.ts +80 -80
- package/lib/browser/hosted-plugin-manager-client.js +410 -410
- package/lib/browser/hosted-plugin-preferences.d.ts +13 -13
- package/lib/browser/hosted-plugin-preferences.js +60 -60
- package/lib/browser/plugin-dev-frontend-module.d.ts +3 -3
- package/lib/browser/plugin-dev-frontend-module.js +42 -42
- package/lib/common/index.d.ts +2 -2
- package/lib/common/index.js +31 -31
- package/lib/common/plugin-dev-protocol.d.ts +24 -24
- package/lib/common/plugin-dev-protocol.js +20 -20
- package/lib/node/hosted-instance-manager.d.ts +104 -104
- package/lib/node/hosted-instance-manager.js +320 -320
- package/lib/node/hosted-instance-manager.js.map +1 -1
- package/lib/node/hosted-plugin-reader.d.ts +11 -11
- package/lib/node/hosted-plugin-reader.js +68 -68
- package/lib/node/hosted-plugin-reader.js.map +1 -1
- package/lib/node/hosted-plugin-uri-postprocessor.d.ts +6 -6
- package/lib/node/hosted-plugin-uri-postprocessor.js +27 -27
- package/lib/node/hosted-plugins-manager.d.ts +41 -41
- package/lib/node/hosted-plugins-manager.js +119 -119
- package/lib/node/plugin-dev-backend-module.d.ts +4 -4
- package/lib/node/plugin-dev-backend-module.js +53 -53
- package/lib/node/plugin-dev-service.d.ts +25 -25
- package/lib/node/plugin-dev-service.js +108 -108
- package/lib/node-electron/plugin-dev-electron-backend-module.d.ts +3 -3
- package/lib/node-electron/plugin-dev-electron-backend-module.js +28 -28
- package/lib/package.spec.js +25 -25
- package/package.json +9 -9
- package/src/browser/hosted-plugin-controller.ts +356 -356
- package/src/browser/hosted-plugin-frontend-contribution.ts +45 -45
- package/src/browser/hosted-plugin-informer.ts +93 -93
- package/src/browser/hosted-plugin-log-viewer.ts +52 -52
- package/src/browser/hosted-plugin-manager-client.ts +430 -430
- package/src/browser/hosted-plugin-preferences.ts +71 -71
- package/src/browser/plugin-dev-frontend-module.ts +45 -45
- package/src/common/index.ts +21 -21
- package/src/common/plugin-dev-protocol.ts +45 -45
- package/src/node/hosted-instance-manager.ts +382 -382
- package/src/node/hosted-plugin-reader.ts +58 -58
- package/src/node/hosted-plugin-uri-postprocessor.ts +32 -32
- package/src/node/hosted-plugins-manager.ts +146 -146
- package/src/node/plugin-dev-backend-module.ts +54 -54
- package/src/node/plugin-dev-service.ts +107 -107
- package/src/node-electron/plugin-dev-electron-backend-module.ts +29 -29
- package/src/package.spec.ts +28 -28
|
@@ -1 +1 @@
|
|
|
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;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;;;;;;;;AAEhF,+DAAmF;AACnF,4DAAyE;AACzE,oCAAoC;AACpC,kDAAkD;AAClD,2BAA2B;AAC3B,6BAA6B;AAC7B,oDAA6C;AAC7C,wFAAoF;AACpF,uFAAyH;AACzH,sCAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"hosted-instance-manager.js","sourceRoot":"","sources":["../../src/node/hosted-instance-manager.ts"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B,CAAC,CAAC,CAAC;gBACxC,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,EAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC;SAC7F;QACD,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACpD,CAAC;CACJ,CAAA;AAxBG;IADC,IAAA,kBAAM,EAAC,4CAAoB,CAAC;IAAE,IAAA,iBAAK,EAAC,MAAM,CAAC,GAAG,CAAC,wEAAsC,CAAC,CAAC;;iEACC;AAFhF,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CA0BlC;AA1BY,wDAAsB;AA6BnC,IAAa,8BAA8B,GAA3C,MAAa,8BAA+B,SAAQ,6BAA6B;CAEhF,CAAA;AAFY,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAE1C;AAFY,wEAA8B"}
|
|
@@ -1,12 +1,12 @@
|
|
|
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 { PluginMetadata } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
|
4
|
-
import { HostedPluginDeployerHandler } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin-deployer-handler';
|
|
5
|
-
export declare class HostedPluginReader implements BackendApplicationContribution {
|
|
6
|
-
protected pluginReader: PluginReaderHosted;
|
|
7
|
-
private readonly hostedPlugin;
|
|
8
|
-
protected deployerHandler: HostedPluginDeployerHandler;
|
|
9
|
-
initialize(): Promise<void>;
|
|
10
|
-
getPlugin(): Promise<PluginMetadata | undefined>;
|
|
11
|
-
}
|
|
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 { PluginMetadata } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
|
4
|
+
import { HostedPluginDeployerHandler } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin-deployer-handler';
|
|
5
|
+
export declare class HostedPluginReader implements BackendApplicationContribution {
|
|
6
|
+
protected pluginReader: PluginReaderHosted;
|
|
7
|
+
private readonly hostedPlugin;
|
|
8
|
+
protected deployerHandler: HostedPluginDeployerHandler;
|
|
9
|
+
initialize(): Promise<void>;
|
|
10
|
+
getPlugin(): Promise<PluginMetadata | undefined>;
|
|
11
|
+
}
|
|
12
12
|
//# sourceMappingURL=hosted-plugin-reader.d.ts.map
|
|
@@ -1,69 +1,69 @@
|
|
|
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
|
-
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
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.HostedPluginReader = void 0;
|
|
28
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
-
const plugin_reader_1 = require("@theia/plugin-ext/lib/hosted/node/plugin-reader");
|
|
30
|
-
const promise_util_1 = require("@theia/core/lib/common/promise-util");
|
|
31
|
-
const plugin_deployer_entry_impl_1 = require("@theia/plugin-ext/lib/main/node/plugin-deployer-entry-impl");
|
|
32
|
-
const hosted_plugin_deployer_handler_1 = require("@theia/plugin-ext/lib/hosted/node/hosted-plugin-deployer-handler");
|
|
33
|
-
let HostedPluginReader = class HostedPluginReader {
|
|
34
|
-
constructor() {
|
|
35
|
-
this.hostedPlugin = new promise_util_1.Deferred();
|
|
36
|
-
}
|
|
37
|
-
async initialize() {
|
|
38
|
-
this.pluginReader.getPluginMetadata(process.env.HOSTED_PLUGIN)
|
|
39
|
-
.then(this.hostedPlugin.resolve.bind(this.hostedPlugin));
|
|
40
|
-
const pluginPath = process.env.HOSTED_PLUGIN;
|
|
41
|
-
if (pluginPath) {
|
|
42
|
-
const hostedPlugin = new plugin_deployer_entry_impl_1.PluginDeployerEntryImpl('Hosted Plugin', pluginPath, pluginPath);
|
|
43
|
-
hostedPlugin.storeValue('isUnderDevelopment', true);
|
|
44
|
-
const hostedMetadata = await this.hostedPlugin.promise;
|
|
45
|
-
if (hostedMetadata.model.entryPoint && hostedMetadata.model.entryPoint.backend) {
|
|
46
|
-
this.deployerHandler.deployBackendPlugins([hostedPlugin]);
|
|
47
|
-
}
|
|
48
|
-
if (hostedMetadata.model.entryPoint && hostedMetadata.model.entryPoint.frontend) {
|
|
49
|
-
this.deployerHandler.deployFrontendPlugins([hostedPlugin]);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
async getPlugin() {
|
|
54
|
-
return this.hostedPlugin.promise;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, inversify_1.inject)(plugin_reader_1.HostedPluginReader),
|
|
59
|
-
__metadata("design:type", plugin_reader_1.HostedPluginReader)
|
|
60
|
-
], HostedPluginReader.prototype, "pluginReader", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, inversify_1.inject)(hosted_plugin_deployer_handler_1.HostedPluginDeployerHandler),
|
|
63
|
-
__metadata("design:type", hosted_plugin_deployer_handler_1.HostedPluginDeployerHandler)
|
|
64
|
-
], HostedPluginReader.prototype, "deployerHandler", void 0);
|
|
65
|
-
HostedPluginReader = __decorate([
|
|
66
|
-
(0, inversify_1.injectable)()
|
|
67
|
-
], HostedPluginReader);
|
|
68
|
-
exports.HostedPluginReader = HostedPluginReader;
|
|
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
|
+
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.HostedPluginReader = void 0;
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const plugin_reader_1 = require("@theia/plugin-ext/lib/hosted/node/plugin-reader");
|
|
30
|
+
const promise_util_1 = require("@theia/core/lib/common/promise-util");
|
|
31
|
+
const plugin_deployer_entry_impl_1 = require("@theia/plugin-ext/lib/main/node/plugin-deployer-entry-impl");
|
|
32
|
+
const hosted_plugin_deployer_handler_1 = require("@theia/plugin-ext/lib/hosted/node/hosted-plugin-deployer-handler");
|
|
33
|
+
let HostedPluginReader = class HostedPluginReader {
|
|
34
|
+
constructor() {
|
|
35
|
+
this.hostedPlugin = new promise_util_1.Deferred();
|
|
36
|
+
}
|
|
37
|
+
async initialize() {
|
|
38
|
+
this.pluginReader.getPluginMetadata(process.env.HOSTED_PLUGIN)
|
|
39
|
+
.then(this.hostedPlugin.resolve.bind(this.hostedPlugin));
|
|
40
|
+
const pluginPath = process.env.HOSTED_PLUGIN;
|
|
41
|
+
if (pluginPath) {
|
|
42
|
+
const hostedPlugin = new plugin_deployer_entry_impl_1.PluginDeployerEntryImpl('Hosted Plugin', pluginPath, pluginPath);
|
|
43
|
+
hostedPlugin.storeValue('isUnderDevelopment', true);
|
|
44
|
+
const hostedMetadata = await this.hostedPlugin.promise;
|
|
45
|
+
if (hostedMetadata.model.entryPoint && (hostedMetadata.model.entryPoint.backend || hostedMetadata.model.entryPoint.headless)) {
|
|
46
|
+
this.deployerHandler.deployBackendPlugins([hostedPlugin]);
|
|
47
|
+
}
|
|
48
|
+
if (hostedMetadata.model.entryPoint && hostedMetadata.model.entryPoint.frontend) {
|
|
49
|
+
this.deployerHandler.deployFrontendPlugins([hostedPlugin]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async getPlugin() {
|
|
54
|
+
return this.hostedPlugin.promise;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, inversify_1.inject)(plugin_reader_1.HostedPluginReader),
|
|
59
|
+
__metadata("design:type", plugin_reader_1.HostedPluginReader)
|
|
60
|
+
], HostedPluginReader.prototype, "pluginReader", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, inversify_1.inject)(hosted_plugin_deployer_handler_1.HostedPluginDeployerHandler),
|
|
63
|
+
__metadata("design:type", hosted_plugin_deployer_handler_1.HostedPluginDeployerHandler)
|
|
64
|
+
], HostedPluginReader.prototype, "deployerHandler", void 0);
|
|
65
|
+
HostedPluginReader = __decorate([
|
|
66
|
+
(0, inversify_1.injectable)()
|
|
67
|
+
], HostedPluginReader);
|
|
68
|
+
exports.HostedPluginReader = HostedPluginReader;
|
|
69
69
|
//# sourceMappingURL=hosted-plugin-reader.js.map
|
|
@@ -1 +1 @@
|
|
|
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,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,CAAA;AA7BG;IADC,IAAA,kBAAM,EAAC,kCAAkB,CAAC;8BACH,kCAAkB;wDAAC;AAK3C;IADC,IAAA,kBAAM,EAAC,4DAA2B,CAAC;8BACT,4DAA2B;2DAAC;AAR9C,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CAgC9B;AAhCY,gDAAkB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
}
|
|
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
7
|
//# sourceMappingURL=hosted-plugin-uri-postprocessor.d.ts.map
|
|
@@ -1,28 +1,28 @@
|
|
|
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';
|
|
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
28
|
//# sourceMappingURL=hosted-plugin-uri-postprocessor.js.map
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import * as cp from 'child_process';
|
|
3
|
-
import { HostedPluginSupport } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin';
|
|
4
|
-
export declare const HostedPluginsManager: unique symbol;
|
|
5
|
-
export interface HostedPluginsManager {
|
|
6
|
-
/**
|
|
7
|
-
* Runs watcher script to recompile plugin on any changes along given path.
|
|
8
|
-
*
|
|
9
|
-
* @param uri uri to plugin root folder.
|
|
10
|
-
*/
|
|
11
|
-
runWatchCompilation(uri: string): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Stops watcher script.
|
|
14
|
-
*
|
|
15
|
-
* @param uri uri to plugin root folder.
|
|
16
|
-
*/
|
|
17
|
-
stopWatchCompilation(uri: string): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* Checks if watcher script to recompile plugin is running.
|
|
20
|
-
*
|
|
21
|
-
* @param uri uri to plugin root folder.
|
|
22
|
-
*/
|
|
23
|
-
isWatchCompilationRunning(uri: string): Promise<boolean>;
|
|
24
|
-
}
|
|
25
|
-
export declare class HostedPluginsManagerImpl implements HostedPluginsManager {
|
|
26
|
-
protected readonly hostedPluginSupport: HostedPluginSupport;
|
|
27
|
-
protected watchCompilationRegistry: Map<string, cp.ChildProcess>;
|
|
28
|
-
constructor();
|
|
29
|
-
runWatchCompilation(uri: string): Promise<void>;
|
|
30
|
-
private killProcessTree;
|
|
31
|
-
stopWatchCompilation(uri: string): Promise<void>;
|
|
32
|
-
isWatchCompilationRunning(uri: string): Promise<boolean>;
|
|
33
|
-
protected runWatchScript(pluginRootPath: string): Promise<void>;
|
|
34
|
-
protected unregisterWatchScript(pluginRootPath: string): void;
|
|
35
|
-
/**
|
|
36
|
-
* Checks whether watch script is present into package.json by given parent folder.
|
|
37
|
-
*
|
|
38
|
-
* @param pluginPath path to plugin's root directory
|
|
39
|
-
*/
|
|
40
|
-
protected checkWatchScript(pluginPath: string): Promise<boolean>;
|
|
41
|
-
}
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import * as cp from 'child_process';
|
|
3
|
+
import { HostedPluginSupport } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin';
|
|
4
|
+
export declare const HostedPluginsManager: unique symbol;
|
|
5
|
+
export interface HostedPluginsManager {
|
|
6
|
+
/**
|
|
7
|
+
* Runs watcher script to recompile plugin on any changes along given path.
|
|
8
|
+
*
|
|
9
|
+
* @param uri uri to plugin root folder.
|
|
10
|
+
*/
|
|
11
|
+
runWatchCompilation(uri: string): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Stops watcher script.
|
|
14
|
+
*
|
|
15
|
+
* @param uri uri to plugin root folder.
|
|
16
|
+
*/
|
|
17
|
+
stopWatchCompilation(uri: string): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Checks if watcher script to recompile plugin is running.
|
|
20
|
+
*
|
|
21
|
+
* @param uri uri to plugin root folder.
|
|
22
|
+
*/
|
|
23
|
+
isWatchCompilationRunning(uri: string): Promise<boolean>;
|
|
24
|
+
}
|
|
25
|
+
export declare class HostedPluginsManagerImpl implements HostedPluginsManager {
|
|
26
|
+
protected readonly hostedPluginSupport: HostedPluginSupport;
|
|
27
|
+
protected watchCompilationRegistry: Map<string, cp.ChildProcess>;
|
|
28
|
+
constructor();
|
|
29
|
+
runWatchCompilation(uri: string): Promise<void>;
|
|
30
|
+
private killProcessTree;
|
|
31
|
+
stopWatchCompilation(uri: string): Promise<void>;
|
|
32
|
+
isWatchCompilationRunning(uri: string): Promise<boolean>;
|
|
33
|
+
protected runWatchScript(pluginRootPath: string): Promise<void>;
|
|
34
|
+
protected unregisterWatchScript(pluginRootPath: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* Checks whether watch script is present into package.json by given parent folder.
|
|
37
|
+
*
|
|
38
|
+
* @param pluginPath path to plugin's root directory
|
|
39
|
+
*/
|
|
40
|
+
protected checkWatchScript(pluginPath: string): Promise<boolean>;
|
|
41
|
+
}
|
|
42
42
|
//# sourceMappingURL=hosted-plugins-manager.d.ts.map
|
|
@@ -1,120 +1,120 @@
|
|
|
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
|
-
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
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.HostedPluginsManagerImpl = exports.HostedPluginsManager = void 0;
|
|
28
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
-
const cp = require("child_process");
|
|
30
|
-
const processTree = require("ps-tree");
|
|
31
|
-
const fs = require("@theia/core/shared/fs-extra");
|
|
32
|
-
const path = require("path");
|
|
33
|
-
const node_1 = require("@theia/core/lib/node");
|
|
34
|
-
const hosted_plugin_1 = require("@theia/plugin-ext/lib/hosted/node/hosted-plugin");
|
|
35
|
-
const types_1 = require("@theia/plugin-ext/lib/common/types");
|
|
36
|
-
exports.HostedPluginsManager = Symbol('HostedPluginsManager');
|
|
37
|
-
let HostedPluginsManagerImpl = class HostedPluginsManagerImpl {
|
|
38
|
-
constructor() {
|
|
39
|
-
this.watchCompilationRegistry = new Map();
|
|
40
|
-
}
|
|
41
|
-
runWatchCompilation(uri) {
|
|
42
|
-
const pluginRootPath = node_1.FileUri.fsPath(uri);
|
|
43
|
-
if (this.watchCompilationRegistry.has(pluginRootPath)) {
|
|
44
|
-
throw new Error('Watcher is already running in ' + pluginRootPath);
|
|
45
|
-
}
|
|
46
|
-
if (!this.checkWatchScript(pluginRootPath)) {
|
|
47
|
-
this.hostedPluginSupport.sendLog({
|
|
48
|
-
data: 'Plugin in ' + uri + ' doesn\'t have watch script',
|
|
49
|
-
type: types_1.LogType.Error
|
|
50
|
-
});
|
|
51
|
-
throw new Error('Watch script doesn\'t exist in ' + pluginRootPath + 'package.json');
|
|
52
|
-
}
|
|
53
|
-
return this.runWatchScript(pluginRootPath);
|
|
54
|
-
}
|
|
55
|
-
killProcessTree(parentPid) {
|
|
56
|
-
processTree(parentPid, (err, childProcesses) => {
|
|
57
|
-
childProcesses.forEach((p) => {
|
|
58
|
-
process.kill(parseInt(p.PID));
|
|
59
|
-
});
|
|
60
|
-
process.kill(parentPid);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
stopWatchCompilation(uri) {
|
|
64
|
-
const pluginPath = node_1.FileUri.fsPath(uri);
|
|
65
|
-
const watchProcess = this.watchCompilationRegistry.get(pluginPath);
|
|
66
|
-
if (!watchProcess) {
|
|
67
|
-
throw new Error('Watcher is not running in ' + pluginPath);
|
|
68
|
-
}
|
|
69
|
-
this.killProcessTree(watchProcess.pid);
|
|
70
|
-
return Promise.resolve();
|
|
71
|
-
}
|
|
72
|
-
isWatchCompilationRunning(uri) {
|
|
73
|
-
const pluginPath = node_1.FileUri.fsPath(uri);
|
|
74
|
-
return new Promise(resolve => resolve(this.watchCompilationRegistry.has(pluginPath)));
|
|
75
|
-
}
|
|
76
|
-
runWatchScript(pluginRootPath) {
|
|
77
|
-
const watchProcess = cp.spawn('yarn', ['run', 'watch'], { cwd: pluginRootPath, shell: true });
|
|
78
|
-
watchProcess.on('exit', () => this.unregisterWatchScript(pluginRootPath));
|
|
79
|
-
this.watchCompilationRegistry.set(pluginRootPath, watchProcess);
|
|
80
|
-
this.hostedPluginSupport.sendLog({
|
|
81
|
-
data: 'Compilation watcher has been started in ' + pluginRootPath,
|
|
82
|
-
type: types_1.LogType.Info
|
|
83
|
-
});
|
|
84
|
-
return Promise.resolve();
|
|
85
|
-
}
|
|
86
|
-
unregisterWatchScript(pluginRootPath) {
|
|
87
|
-
this.watchCompilationRegistry.delete(pluginRootPath);
|
|
88
|
-
this.hostedPluginSupport.sendLog({
|
|
89
|
-
data: 'Compilation watcher has been stopped in ' + pluginRootPath,
|
|
90
|
-
type: types_1.LogType.Info
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Checks whether watch script is present into package.json by given parent folder.
|
|
95
|
-
*
|
|
96
|
-
* @param pluginPath path to plugin's root directory
|
|
97
|
-
*/
|
|
98
|
-
async checkWatchScript(pluginPath) {
|
|
99
|
-
const pluginPackageJsonPath = path.join(pluginPath, 'package.json');
|
|
100
|
-
try {
|
|
101
|
-
const packageJson = await fs.readJSON(pluginPackageJsonPath);
|
|
102
|
-
const scripts = packageJson['scripts'];
|
|
103
|
-
if (scripts && scripts['watch']) {
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
catch { }
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
__decorate([
|
|
112
|
-
(0, inversify_1.inject)(hosted_plugin_1.HostedPluginSupport),
|
|
113
|
-
__metadata("design:type", hosted_plugin_1.HostedPluginSupport)
|
|
114
|
-
], HostedPluginsManagerImpl.prototype, "hostedPluginSupport", void 0);
|
|
115
|
-
HostedPluginsManagerImpl = __decorate([
|
|
116
|
-
(0, inversify_1.injectable)(),
|
|
117
|
-
__metadata("design:paramtypes", [])
|
|
118
|
-
], HostedPluginsManagerImpl);
|
|
119
|
-
exports.HostedPluginsManagerImpl = HostedPluginsManagerImpl;
|
|
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
|
+
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.HostedPluginsManagerImpl = exports.HostedPluginsManager = void 0;
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const cp = require("child_process");
|
|
30
|
+
const processTree = require("ps-tree");
|
|
31
|
+
const fs = require("@theia/core/shared/fs-extra");
|
|
32
|
+
const path = require("path");
|
|
33
|
+
const node_1 = require("@theia/core/lib/node");
|
|
34
|
+
const hosted_plugin_1 = require("@theia/plugin-ext/lib/hosted/node/hosted-plugin");
|
|
35
|
+
const types_1 = require("@theia/plugin-ext/lib/common/types");
|
|
36
|
+
exports.HostedPluginsManager = Symbol('HostedPluginsManager');
|
|
37
|
+
let HostedPluginsManagerImpl = class HostedPluginsManagerImpl {
|
|
38
|
+
constructor() {
|
|
39
|
+
this.watchCompilationRegistry = new Map();
|
|
40
|
+
}
|
|
41
|
+
runWatchCompilation(uri) {
|
|
42
|
+
const pluginRootPath = node_1.FileUri.fsPath(uri);
|
|
43
|
+
if (this.watchCompilationRegistry.has(pluginRootPath)) {
|
|
44
|
+
throw new Error('Watcher is already running in ' + pluginRootPath);
|
|
45
|
+
}
|
|
46
|
+
if (!this.checkWatchScript(pluginRootPath)) {
|
|
47
|
+
this.hostedPluginSupport.sendLog({
|
|
48
|
+
data: 'Plugin in ' + uri + ' doesn\'t have watch script',
|
|
49
|
+
type: types_1.LogType.Error
|
|
50
|
+
});
|
|
51
|
+
throw new Error('Watch script doesn\'t exist in ' + pluginRootPath + 'package.json');
|
|
52
|
+
}
|
|
53
|
+
return this.runWatchScript(pluginRootPath);
|
|
54
|
+
}
|
|
55
|
+
killProcessTree(parentPid) {
|
|
56
|
+
processTree(parentPid, (err, childProcesses) => {
|
|
57
|
+
childProcesses.forEach((p) => {
|
|
58
|
+
process.kill(parseInt(p.PID));
|
|
59
|
+
});
|
|
60
|
+
process.kill(parentPid);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
stopWatchCompilation(uri) {
|
|
64
|
+
const pluginPath = node_1.FileUri.fsPath(uri);
|
|
65
|
+
const watchProcess = this.watchCompilationRegistry.get(pluginPath);
|
|
66
|
+
if (!watchProcess) {
|
|
67
|
+
throw new Error('Watcher is not running in ' + pluginPath);
|
|
68
|
+
}
|
|
69
|
+
this.killProcessTree(watchProcess.pid);
|
|
70
|
+
return Promise.resolve();
|
|
71
|
+
}
|
|
72
|
+
isWatchCompilationRunning(uri) {
|
|
73
|
+
const pluginPath = node_1.FileUri.fsPath(uri);
|
|
74
|
+
return new Promise(resolve => resolve(this.watchCompilationRegistry.has(pluginPath)));
|
|
75
|
+
}
|
|
76
|
+
runWatchScript(pluginRootPath) {
|
|
77
|
+
const watchProcess = cp.spawn('yarn', ['run', 'watch'], { cwd: pluginRootPath, shell: true });
|
|
78
|
+
watchProcess.on('exit', () => this.unregisterWatchScript(pluginRootPath));
|
|
79
|
+
this.watchCompilationRegistry.set(pluginRootPath, watchProcess);
|
|
80
|
+
this.hostedPluginSupport.sendLog({
|
|
81
|
+
data: 'Compilation watcher has been started in ' + pluginRootPath,
|
|
82
|
+
type: types_1.LogType.Info
|
|
83
|
+
});
|
|
84
|
+
return Promise.resolve();
|
|
85
|
+
}
|
|
86
|
+
unregisterWatchScript(pluginRootPath) {
|
|
87
|
+
this.watchCompilationRegistry.delete(pluginRootPath);
|
|
88
|
+
this.hostedPluginSupport.sendLog({
|
|
89
|
+
data: 'Compilation watcher has been stopped in ' + pluginRootPath,
|
|
90
|
+
type: types_1.LogType.Info
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Checks whether watch script is present into package.json by given parent folder.
|
|
95
|
+
*
|
|
96
|
+
* @param pluginPath path to plugin's root directory
|
|
97
|
+
*/
|
|
98
|
+
async checkWatchScript(pluginPath) {
|
|
99
|
+
const pluginPackageJsonPath = path.join(pluginPath, 'package.json');
|
|
100
|
+
try {
|
|
101
|
+
const packageJson = await fs.readJSON(pluginPackageJsonPath);
|
|
102
|
+
const scripts = packageJson['scripts'];
|
|
103
|
+
if (scripts && scripts['watch']) {
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch { }
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, inversify_1.inject)(hosted_plugin_1.HostedPluginSupport),
|
|
113
|
+
__metadata("design:type", hosted_plugin_1.HostedPluginSupport)
|
|
114
|
+
], HostedPluginsManagerImpl.prototype, "hostedPluginSupport", void 0);
|
|
115
|
+
HostedPluginsManagerImpl = __decorate([
|
|
116
|
+
(0, inversify_1.injectable)(),
|
|
117
|
+
__metadata("design:paramtypes", [])
|
|
118
|
+
], HostedPluginsManagerImpl);
|
|
119
|
+
exports.HostedPluginsManagerImpl = HostedPluginsManagerImpl;
|
|
120
120
|
//# sourceMappingURL=hosted-plugins-manager.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ContainerModule, interfaces } from '@theia/core/shared/inversify';
|
|
2
|
-
export declare function bindCommonHostedBackend(bind: interfaces.Bind): void;
|
|
3
|
-
declare const _default: ContainerModule;
|
|
4
|
-
export default _default;
|
|
1
|
+
import { ContainerModule, interfaces } from '@theia/core/shared/inversify';
|
|
2
|
+
export declare function bindCommonHostedBackend(bind: interfaces.Bind): void;
|
|
3
|
+
declare const _default: ContainerModule;
|
|
4
|
+
export default _default;
|
|
5
5
|
//# sourceMappingURL=plugin-dev-backend-module.d.ts.map
|