@theia/plugin-ext 1.75.0-next.29 → 1.75.0-next.34
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/plugin-protocol.d.ts +8 -0
- package/lib/common/plugin-protocol.d.ts.map +1 -1
- package/lib/common/plugin-protocol.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts +2 -1
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +8 -3
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/common/hosted-plugin.js +10 -9
- package/lib/hosted/common/hosted-plugin.js.map +1 -1
- package/lib/hosted/common/hosted-plugin.spec.js +2 -0
- package/lib/hosted/common/hosted-plugin.spec.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-process.js +1 -0
- package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
- package/lib/hosted/node/hosted-plugin.js +1 -0
- package/lib/hosted/node/hosted-plugin.js.map +1 -1
- package/lib/hosted/node/plugin-reader.js +2 -1
- package/lib/hosted/node/plugin-reader.js.map +1 -1
- package/lib/hosted/node/plugin-service.js +1 -0
- package/lib/hosted/node/plugin-service.js.map +1 -1
- package/lib/main/browser/comments/comments-service.d.ts +2 -0
- package/lib/main/browser/comments/comments-service.d.ts.map +1 -1
- package/lib/main/browser/comments/comments-service.js +7 -1
- package/lib/main/browser/comments/comments-service.js.map +1 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts +2 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js +6 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-contribution-registry.d.ts +2 -0
- package/lib/main/browser/debug/plugin-debug-session-contribution-registry.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-contribution-registry.js +7 -1
- package/lib/main/browser/debug/plugin-debug-session-contribution-registry.js.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.d.ts +2 -1
- package/lib/main/browser/menus/menus-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.js +9 -4
- package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
- package/lib/main/browser/text-editor-model-service.d.ts +2 -1
- package/lib/main/browser/text-editor-model-service.d.ts.map +1 -1
- package/lib/main/browser/text-editor-model-service.js +6 -1
- package/lib/main/browser/text-editor-model-service.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.d.ts +2 -0
- package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +14 -9
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +3 -0
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +17 -6
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +4 -2
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/main/browser/webview-views/webview-views-main.d.ts.map +1 -1
- package/lib/main/browser/webview-views/webview-views-main.js +3 -2
- package/lib/main/browser/webview-views/webview-views-main.js.map +1 -1
- package/lib/main/node/handlers/plugin-theia-directory-handler.d.ts +2 -1
- package/lib/main/node/handlers/plugin-theia-directory-handler.d.ts.map +1 -1
- package/lib/main/node/handlers/plugin-theia-directory-handler.js +10 -4
- package/lib/main/node/handlers/plugin-theia-directory-handler.js.map +1 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.d.ts +2 -0
- package/lib/main/node/handlers/plugin-theia-file-handler.d.ts.map +1 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.js +9 -3
- package/lib/main/node/handlers/plugin-theia-file-handler.js.map +1 -1
- package/lib/main/node/paths/plugin-paths-service.js +1 -0
- package/lib/main/node/paths/plugin-paths-service.js.map +1 -1
- package/lib/main/node/plugin-deployer-contribution.js +1 -0
- package/lib/main/node/plugin-deployer-contribution.js.map +1 -1
- package/lib/main/node/plugin-deployer-impl.d.ts.map +1 -1
- package/lib/main/node/plugin-deployer-impl.js +16 -13
- package/lib/main/node/plugin-deployer-impl.js.map +1 -1
- package/lib/main/node/plugin-service.d.ts +2 -0
- package/lib/main/node/plugin-service.d.ts.map +1 -1
- package/lib/main/node/plugin-service.js +7 -1
- package/lib/main/node/plugin-service.js.map +1 -1
- package/lib/main/node/plugin-uninstallation-manager.d.ts +2 -1
- package/lib/main/node/plugin-uninstallation-manager.d.ts.map +1 -1
- package/lib/main/node/plugin-uninstallation-manager.js +6 -1
- package/lib/main/node/plugin-uninstallation-manager.js.map +1 -1
- package/lib/main/node/plugins-key-value-storage.d.ts +2 -0
- package/lib/main/node/plugins-key-value-storage.d.ts.map +1 -1
- package/lib/main/node/plugins-key-value-storage.js +9 -3
- package/lib/main/node/plugins-key-value-storage.js.map +1 -1
- package/lib/main/node/resolvers/local-plugin-deployer-resolver.d.ts +2 -0
- package/lib/main/node/resolvers/local-plugin-deployer-resolver.d.ts.map +1 -1
- package/lib/main/node/resolvers/local-plugin-deployer-resolver.js +7 -1
- package/lib/main/node/resolvers/local-plugin-deployer-resolver.js.map +1 -1
- package/lib/main/node/webview-backend-security-warnings.d.ts +2 -0
- package/lib/main/node/webview-backend-security-warnings.d.ts.map +1 -1
- package/lib/main/node/webview-backend-security-warnings.js +7 -1
- package/lib/main/node/webview-backend-security-warnings.js.map +1 -1
- package/package.json +31 -31
- package/src/common/plugin-protocol.ts +8 -0
- package/src/hosted/browser/hosted-plugin.ts +8 -5
- package/src/hosted/common/hosted-plugin.spec.ts +2 -0
- package/src/hosted/common/hosted-plugin.ts +10 -10
- package/src/hosted/node/hosted-plugin-process.ts +1 -1
- package/src/hosted/node/hosted-plugin.ts +2 -2
- package/src/hosted/node/plugin-reader.ts +3 -3
- package/src/hosted/node/plugin-service.ts +1 -1
- package/src/main/browser/comments/comments-service.ts +6 -2
- package/src/main/browser/custom-editors/plugin-custom-editor-registry.ts +6 -3
- package/src/main/browser/debug/plugin-debug-session-contribution-registry.ts +5 -1
- package/src/main/browser/menus/menus-contribution-handler.ts +9 -6
- package/src/main/browser/text-editor-model-service.ts +6 -3
- package/src/main/browser/view/plugin-view-registry.ts +14 -11
- package/src/main/browser/view/tree-view-widget.tsx +14 -7
- package/src/main/browser/webview/webview.ts +4 -2
- package/src/main/browser/webview-views/webview-views-main.ts +4 -4
- package/src/main/node/handlers/plugin-theia-directory-handler.ts +9 -6
- package/src/main/node/handlers/plugin-theia-file-handler.ts +8 -5
- package/src/main/node/paths/plugin-paths-service.ts +2 -2
- package/src/main/node/plugin-deployer-contribution.ts +2 -2
- package/src/main/node/plugin-deployer-impl.ts +20 -14
- package/src/main/node/plugin-service.ts +6 -2
- package/src/main/node/plugin-uninstallation-manager.ts +7 -4
- package/src/main/node/plugins-key-value-storage.ts +8 -4
- package/src/main/node/resolvers/local-plugin-deployer-resolver.ts +7 -2
- package/src/main/node/webview-backend-security-warnings.ts +6 -2
|
@@ -26,6 +26,7 @@ const promise_util_1 = require("@theia/core/lib/common/promise-util");
|
|
|
26
26
|
const env_variables_1 = require("@theia/core/lib/common/env-variables");
|
|
27
27
|
const const_1 = require("./paths/const");
|
|
28
28
|
const plugin_paths_protocol_1 = require("../common/plugin-paths-protocol");
|
|
29
|
+
const core_1 = require("@theia/core");
|
|
29
30
|
let PluginsKeyValueStorage = class PluginsKeyValueStorage {
|
|
30
31
|
constructor() {
|
|
31
32
|
this.stores = Object.create(null);
|
|
@@ -34,7 +35,7 @@ let PluginsKeyValueStorage = class PluginsKeyValueStorage {
|
|
|
34
35
|
}
|
|
35
36
|
init() {
|
|
36
37
|
this.deferredGlobalDataPath.resolve(this.getGlobalDataPath().catch(error => {
|
|
37
|
-
|
|
38
|
+
this.logger.error('Failed to initialize global state path:', error);
|
|
38
39
|
return undefined;
|
|
39
40
|
}));
|
|
40
41
|
process.once('beforeExit', () => this.dispose());
|
|
@@ -43,7 +44,7 @@ let PluginsKeyValueStorage = class PluginsKeyValueStorage {
|
|
|
43
44
|
async set(key, value, kind) {
|
|
44
45
|
const store = await this.getStore(kind);
|
|
45
46
|
if (!store) {
|
|
46
|
-
|
|
47
|
+
this.logger.warn('Cannot save data: no opened workspace');
|
|
47
48
|
return false;
|
|
48
49
|
}
|
|
49
50
|
if (value === undefined || Object.keys(value).length === 0) {
|
|
@@ -118,7 +119,7 @@ let PluginsKeyValueStorage = class PluginsKeyValueStorage {
|
|
|
118
119
|
return await fs.readJSON(pathToFile);
|
|
119
120
|
}
|
|
120
121
|
catch (error) {
|
|
121
|
-
|
|
122
|
+
this.logger.error('Failed to parse data from "', pathToFile, '". Reason:', error);
|
|
122
123
|
return {};
|
|
123
124
|
}
|
|
124
125
|
}
|
|
@@ -144,6 +145,11 @@ tslib_1.__decorate([
|
|
|
144
145
|
(0, inversify_1.inject)(node_1.FileSystemLocking),
|
|
145
146
|
tslib_1.__metadata("design:type", Object)
|
|
146
147
|
], PluginsKeyValueStorage.prototype, "fsLocking", void 0);
|
|
148
|
+
tslib_1.__decorate([
|
|
149
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
150
|
+
(0, inversify_1.named)('plugin-ext:PluginsKeyValueStorage'),
|
|
151
|
+
tslib_1.__metadata("design:type", Object)
|
|
152
|
+
], PluginsKeyValueStorage.prototype, "logger", void 0);
|
|
147
153
|
tslib_1.__decorate([
|
|
148
154
|
(0, inversify_1.postConstruct)(),
|
|
149
155
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-key-value-storage.js","sourceRoot":"","sources":["../../../src/main/node/plugins-key-value-storage.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,
|
|
1
|
+
{"version":3,"file":"plugins-key-value-storage.js","sourceRoot":"","sources":["../../../src/main/node/plugins-key-value-storage.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,4DAAwF;AACxF,+CAAyD;AACzD,kDAAkD;AAClD,6BAA6B;AAC7B,8DAA0D;AAC1D,sEAA+D;AAC/D,wEAA0E;AAC1E,yCAA4C;AAC5C,2EAAqE;AAGrE,sCAAsC;AAQ/B,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAA5B;QAEK,WAAM,GAA0B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpD,iBAAY,GAAG,IAAI,GAAG,EAAS,CAAC;QAGhC,2BAAsB,GAAG,IAAI,uBAAQ,EAAsB,CAAC;IA2HxE,CAAC;IA5Ga,IAAI;QACV,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;YACvE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,EAAE,KAAK,CAAC,CAAC;YACpE,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC,CAAC,CAAC;QACJ,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAED,KA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YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACrC,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC;IACvC,CAAC;CACJ,CAAA;AAjIY,wDAAsB;AASvB;IADP,IAAA,kBAAM,EAAC,0CAAkB,CAAC;;kEACoB;AAGvC;IADP,IAAA,kBAAM,EAAC,kCAAkB,CAAC;;yDACW;AAG9B;IADP,IAAA,kBAAM,EAAC,wBAAiB,CAAC;;yDACW;AAGlB;IADlB,IAAA,kBAAM,EAAC,cAAO,CAAC;IAAE,IAAA,iBAAK,EAAC,mCAAmC,CAAC;;sDACzB;AAGzB;IADT,IAAA,yBAAa,GAAE;;;;kDAQf;iCA5BQ,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAiIlC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { PluginDeployerResolver, PluginDeployerResolverContext } from '../../../common/plugin-protocol';
|
|
2
|
+
import { ILogger } from '@theia/core';
|
|
2
3
|
export declare abstract class LocalPluginDeployerResolver implements PluginDeployerResolver {
|
|
4
|
+
protected readonly logger: ILogger;
|
|
3
5
|
resolve(pluginResolverContext: PluginDeployerResolverContext): Promise<void>;
|
|
4
6
|
accept(pluginId: string): boolean;
|
|
5
7
|
protected abstract get supportedScheme(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-plugin-deployer-resolver.d.ts","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-plugin-deployer-resolver.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"local-plugin-deployer-resolver.d.ts","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-plugin-deployer-resolver.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAKxG,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,8BACsB,2BAA4B,YAAW,sBAAsB;IAG/E,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAE7B,OAAO,CAAC,qBAAqB,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlF,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIjC,SAAS,CAAC,QAAQ,KAAK,eAAe,IAAI,MAAM,CAAC;IAEjD,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,qBAAqB,EAAE,6BAA6B,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAEjH,sBAAsB;CAevC"}
|
|
@@ -22,6 +22,7 @@ const fs = require("@theia/core/shared/fs-extra");
|
|
|
22
22
|
const path = require("path");
|
|
23
23
|
const node_1 = require("@theia/core/lib/node");
|
|
24
24
|
const uri_1 = require("@theia/core/lib/common/uri");
|
|
25
|
+
const core_1 = require("@theia/core");
|
|
25
26
|
let LocalPluginDeployerResolver = class LocalPluginDeployerResolver {
|
|
26
27
|
async resolve(pluginResolverContext) {
|
|
27
28
|
const localPath = await this.resolveLocalPluginPath(pluginResolverContext, this.supportedScheme);
|
|
@@ -42,13 +43,18 @@ let LocalPluginDeployerResolver = class LocalPluginDeployerResolver {
|
|
|
42
43
|
fsPath = path.resolve(process.cwd(), fsPath);
|
|
43
44
|
}
|
|
44
45
|
if (!await fs.pathExists(fsPath)) {
|
|
45
|
-
|
|
46
|
+
this.logger.warn(`The local plugin referenced by ${pluginResolverContext.getOriginId()} does not exist.`);
|
|
46
47
|
return null;
|
|
47
48
|
}
|
|
48
49
|
return fsPath;
|
|
49
50
|
}
|
|
50
51
|
};
|
|
51
52
|
exports.LocalPluginDeployerResolver = LocalPluginDeployerResolver;
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
55
|
+
(0, inversify_1.named)('plugin-ext:LocalPluginDeployerResolver'),
|
|
56
|
+
tslib_1.__metadata("design:type", Object)
|
|
57
|
+
], LocalPluginDeployerResolver.prototype, "logger", void 0);
|
|
52
58
|
exports.LocalPluginDeployerResolver = LocalPluginDeployerResolver = tslib_1.__decorate([
|
|
53
59
|
(0, inversify_1.injectable)()
|
|
54
60
|
], LocalPluginDeployerResolver);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-plugin-deployer-resolver.js","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-plugin-deployer-resolver.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,
|
|
1
|
+
{"version":3,"file":"local-plugin-deployer-resolver.js","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-plugin-deployer-resolver.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,4DAAyE;AAEzE,kDAAkD;AAClD,6BAA6B;AAC7B,+CAA+C;AAC/C,oDAA6C;AAC7C,sCAAsC;AAG/B,IAAe,2BAA2B,GAA1C,MAAe,2BAA2B;IAK7C,KAAK,CAAC,OAAO,CAAC,qBAAoD;QAC9D,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,qBAAqB,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QACjG,IAAI,SAAS,EAAE,CAAC;YACZ,MAAM,IAAI,CAAC,oBAAoB,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC;QACtE,CAAC;IACL,CAAC;IAED,MAAM,CAAC,QAAgB;QACnB,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACrD,CAAC;IAMO,KAAK,CAAC,sBAAsB,CAAC,qBAAoD,EAAE,cAAsB;QAC7G,MAAM,QAAQ,GAAG,IAAI,aAAG,CAAC,qBAAqB,CAAC,WAAW,EAAE,CAAC,CAAC;QAC9D,IAAI,QAAQ,CAAC,MAAM,KAAK,cAAc,EAAE,CAAC;YACrC,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,IAAI,MAAM,GAAG,cAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kCAAkC,qBAAqB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;YAC1G,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;AAnCqB,kEAA2B;AAG1B;IADlB,IAAA,kBAAM,EAAC,cAAO,CAAC;IAAE,IAAA,iBAAK,EAAC,wCAAwC,CAAC;;2DAC9B;sCAHjB,2BAA2B;IADhD,IAAA,sBAAU,GAAE;GACS,2BAA2B,CAmChD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { BackendApplicationContribution } from '@theia/core/lib/node';
|
|
2
|
+
import { ILogger } from '@theia/core';
|
|
2
3
|
export declare class WebviewBackendSecurityWarnings implements BackendApplicationContribution {
|
|
4
|
+
protected readonly logger: ILogger;
|
|
3
5
|
initialize(): void;
|
|
4
6
|
protected checkHostPattern(): Promise<void>;
|
|
5
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webview-backend-security-warnings.d.ts","sourceRoot":"","sources":["../../../src/main/node/webview-backend-security-warnings.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"webview-backend-security-warnings.d.ts","sourceRoot":"","sources":["../../../src/main/node/webview-backend-security-warnings.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAItE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,qBACa,8BAA+B,YAAW,8BAA8B;IAGjF,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEnC,UAAU,IAAI,IAAI;cAIF,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;CAgBpD"}
|
|
@@ -20,6 +20,7 @@ const tslib_1 = require("tslib");
|
|
|
20
20
|
const backend_application_config_provider_1 = require("@theia/core/lib/node/backend-application-config-provider");
|
|
21
21
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
22
|
const webview_protocol_1 = require("../common/webview-protocol");
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
23
24
|
let WebviewBackendSecurityWarnings = class WebviewBackendSecurityWarnings {
|
|
24
25
|
initialize() {
|
|
25
26
|
this.checkHostPattern();
|
|
@@ -30,7 +31,7 @@ let WebviewBackendSecurityWarnings = class WebviewBackendSecurityWarnings {
|
|
|
30
31
|
}
|
|
31
32
|
const envHostPattern = process.env[webview_protocol_1.WebviewExternalEndpoint.pattern];
|
|
32
33
|
if (envHostPattern && envHostPattern !== webview_protocol_1.WebviewExternalEndpoint.defaultPattern) {
|
|
33
|
-
|
|
34
|
+
this.logger.warn(`\
|
|
34
35
|
WEBVIEW SECURITY WARNING
|
|
35
36
|
|
|
36
37
|
Changing the @theia/plugin-ext webview host pattern can lead to security vulnerabilities.
|
|
@@ -41,6 +42,11 @@ WEBVIEW SECURITY WARNING
|
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
44
|
exports.WebviewBackendSecurityWarnings = WebviewBackendSecurityWarnings;
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
47
|
+
(0, inversify_1.named)('plugin-ext:WebviewBackendSecurityWarnings'),
|
|
48
|
+
tslib_1.__metadata("design:type", Object)
|
|
49
|
+
], WebviewBackendSecurityWarnings.prototype, "logger", void 0);
|
|
44
50
|
exports.WebviewBackendSecurityWarnings = WebviewBackendSecurityWarnings = tslib_1.__decorate([
|
|
45
51
|
(0, inversify_1.injectable)()
|
|
46
52
|
], WebviewBackendSecurityWarnings);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webview-backend-security-warnings.js","sourceRoot":"","sources":["../../../src/main/node/webview-backend-security-warnings.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAGhF,kHAA4G;AAC5G,
|
|
1
|
+
{"version":3,"file":"webview-backend-security-warnings.js","sourceRoot":"","sources":["../../../src/main/node/webview-backend-security-warnings.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAGhF,kHAA4G;AAC5G,4DAAyE;AACzE,iEAAqE;AACrE,sCAAsC;AAG/B,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAKvC,UAAU;QACN,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC5B,CAAC;IAES,KAAK,CAAC,gBAAgB;QAC5B,IAAI,sEAAgC,CAAC,GAAG,EAAE,CAAC,sCAAsC,CAAC,KAAK,KAAK,EAAE,CAAC;YAC3F,OAAO;QACX,CAAC;QACD,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,0CAAuB,CAAC,OAAO,CAAC,CAAC;QACpE,IAAI,cAAc,IAAI,cAAc,KAAK,0CAAuB,CAAC,cAAc,EAAE,CAAC;YAC9E,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;;;;4BAID,cAAc;;CAEzC,CACY,CAAC;QACN,CAAC;IACL,CAAC;CACJ,CAAA;AAzBY,wEAA8B;AAGpB;IADlB,IAAA,kBAAM,EAAC,cAAO,CAAC;IAAE,IAAA,iBAAK,EAAC,2CAA2C,CAAC;;8DACjC;yCAH1B,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAyB1C"}
|
package/package.json
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin-ext",
|
|
3
|
-
"version": "1.75.0-next.
|
|
3
|
+
"version": "1.75.0-next.34+11fb66739",
|
|
4
4
|
"description": "Theia - Plugin Extension",
|
|
5
5
|
"main": "lib/common/index.js",
|
|
6
6
|
"typings": "lib/common/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@theia/ai-core": "1.75.0-next.
|
|
9
|
-
"@theia/ai-mcp": "1.75.0-next.
|
|
10
|
-
"@theia/bulk-edit": "1.75.0-next.
|
|
11
|
-
"@theia/callhierarchy": "1.75.0-next.
|
|
12
|
-
"@theia/console": "1.75.0-next.
|
|
13
|
-
"@theia/core": "1.75.0-next.
|
|
14
|
-
"@theia/debug": "1.75.0-next.
|
|
15
|
-
"@theia/editor": "1.75.0-next.
|
|
16
|
-
"@theia/editor-preview": "1.75.0-next.
|
|
17
|
-
"@theia/file-search": "1.75.0-next.
|
|
18
|
-
"@theia/filesystem": "1.75.0-next.
|
|
19
|
-
"@theia/markers": "1.75.0-next.
|
|
20
|
-
"@theia/messages": "1.75.0-next.
|
|
21
|
-
"@theia/monaco": "1.75.0-next.
|
|
8
|
+
"@theia/ai-core": "1.75.0-next.34+11fb66739",
|
|
9
|
+
"@theia/ai-mcp": "1.75.0-next.34+11fb66739",
|
|
10
|
+
"@theia/bulk-edit": "1.75.0-next.34+11fb66739",
|
|
11
|
+
"@theia/callhierarchy": "1.75.0-next.34+11fb66739",
|
|
12
|
+
"@theia/console": "1.75.0-next.34+11fb66739",
|
|
13
|
+
"@theia/core": "1.75.0-next.34+11fb66739",
|
|
14
|
+
"@theia/debug": "1.75.0-next.34+11fb66739",
|
|
15
|
+
"@theia/editor": "1.75.0-next.34+11fb66739",
|
|
16
|
+
"@theia/editor-preview": "1.75.0-next.34+11fb66739",
|
|
17
|
+
"@theia/file-search": "1.75.0-next.34+11fb66739",
|
|
18
|
+
"@theia/filesystem": "1.75.0-next.34+11fb66739",
|
|
19
|
+
"@theia/markers": "1.75.0-next.34+11fb66739",
|
|
20
|
+
"@theia/messages": "1.75.0-next.34+11fb66739",
|
|
21
|
+
"@theia/monaco": "1.75.0-next.34+11fb66739",
|
|
22
22
|
"@theia/monaco-editor-core": "1.108.201",
|
|
23
|
-
"@theia/navigator": "1.75.0-next.
|
|
24
|
-
"@theia/notebook": "1.75.0-next.
|
|
25
|
-
"@theia/output": "1.75.0-next.
|
|
26
|
-
"@theia/plugin": "1.75.0-next.
|
|
27
|
-
"@theia/plugin-utils": "1.75.0-next.
|
|
28
|
-
"@theia/preferences": "1.75.0-next.
|
|
29
|
-
"@theia/scm": "1.75.0-next.
|
|
30
|
-
"@theia/search-in-workspace": "1.75.0-next.
|
|
31
|
-
"@theia/task": "1.75.0-next.
|
|
32
|
-
"@theia/terminal": "1.75.0-next.
|
|
33
|
-
"@theia/test": "1.75.0-next.
|
|
34
|
-
"@theia/timeline": "1.75.0-next.
|
|
35
|
-
"@theia/typehierarchy": "1.75.0-next.
|
|
36
|
-
"@theia/variable-resolver": "1.75.0-next.
|
|
37
|
-
"@theia/workspace": "1.75.0-next.
|
|
23
|
+
"@theia/navigator": "1.75.0-next.34+11fb66739",
|
|
24
|
+
"@theia/notebook": "1.75.0-next.34+11fb66739",
|
|
25
|
+
"@theia/output": "1.75.0-next.34+11fb66739",
|
|
26
|
+
"@theia/plugin": "1.75.0-next.34+11fb66739",
|
|
27
|
+
"@theia/plugin-utils": "1.75.0-next.34+11fb66739",
|
|
28
|
+
"@theia/preferences": "1.75.0-next.34+11fb66739",
|
|
29
|
+
"@theia/scm": "1.75.0-next.34+11fb66739",
|
|
30
|
+
"@theia/search-in-workspace": "1.75.0-next.34+11fb66739",
|
|
31
|
+
"@theia/task": "1.75.0-next.34+11fb66739",
|
|
32
|
+
"@theia/terminal": "1.75.0-next.34+11fb66739",
|
|
33
|
+
"@theia/test": "1.75.0-next.34+11fb66739",
|
|
34
|
+
"@theia/timeline": "1.75.0-next.34+11fb66739",
|
|
35
|
+
"@theia/typehierarchy": "1.75.0-next.34+11fb66739",
|
|
36
|
+
"@theia/variable-resolver": "1.75.0-next.34+11fb66739",
|
|
37
|
+
"@theia/workspace": "1.75.0-next.34+11fb66739",
|
|
38
38
|
"@types/mime": "^2.0.3",
|
|
39
39
|
"@vscode/debugprotocol": "^1.68.0",
|
|
40
40
|
"@vscode/proxy-agent": "^0.13.2",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"nyc": {
|
|
100
100
|
"extends": "../../configs/nyc.json"
|
|
101
101
|
},
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "11fb667399ac7df64df9edc0c835ace6b0e88c2e"
|
|
103
103
|
}
|
|
@@ -552,7 +552,15 @@ export interface PluginDependencies {
|
|
|
552
552
|
|
|
553
553
|
export const PluginDeployerHandler = Symbol('PluginDeployerHandler');
|
|
554
554
|
export interface PluginDeployerHandler {
|
|
555
|
+
/**
|
|
556
|
+
* May be called concurrently with {@link deployBackendPlugins}. Implementations must ensure
|
|
557
|
+
* the two calls can run in parallel.
|
|
558
|
+
*/
|
|
555
559
|
deployFrontendPlugins(frontendPlugins: PluginDeployerEntry[]): Promise<number | undefined>;
|
|
560
|
+
/**
|
|
561
|
+
* May be called concurrently with {@link deployFrontendPlugins}. Implementations must ensure
|
|
562
|
+
* the two calls can run in parallel.
|
|
563
|
+
*/
|
|
556
564
|
deployBackendPlugins(backendPlugins: PluginDeployerEntry[]): Promise<number | undefined>;
|
|
557
565
|
getDeployedPluginIds(): Promise<readonly PluginIdentifiers.VersionedId[]>;
|
|
558
566
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
23
23
|
|
|
24
24
|
import { generateUuid } from '@theia/core/lib/common/uuid';
|
|
25
|
-
import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
|
|
25
|
+
import { injectable, inject, postConstruct, named } from '@theia/core/shared/inversify';
|
|
26
26
|
import { PluginWorker } from './plugin-worker';
|
|
27
27
|
import { getPluginId, DeployedPlugin, HostedPluginServer } from '../../common/plugin-protocol';
|
|
28
28
|
import { HostedPluginWatcher } from './hosted-plugin-watcher';
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
Disposable, DisposableCollection, isCancelled,
|
|
34
34
|
CommandRegistry, WillExecuteCommandEvent,
|
|
35
35
|
CancellationTokenSource, ProgressService, nls,
|
|
36
|
-
RpcProxy
|
|
36
|
+
RpcProxy, ILogger
|
|
37
37
|
} from '@theia/core';
|
|
38
38
|
import { PreferenceServiceImpl, PreferenceProviderProvider } from '@theia/core/lib/common/preferences';
|
|
39
39
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
@@ -183,6 +183,9 @@ export class HostedPluginSupport extends AbstractHostedPluginSupport<PluginManag
|
|
|
183
183
|
@inject(WorkspaceTrustService)
|
|
184
184
|
protected readonly workspaceTrustService: WorkspaceTrustService;
|
|
185
185
|
|
|
186
|
+
@inject(ILogger) @named('plugin-ext:HostedPluginSupport')
|
|
187
|
+
protected override readonly logger: ILogger;
|
|
188
|
+
|
|
186
189
|
constructor() {
|
|
187
190
|
super(generateUuid());
|
|
188
191
|
}
|
|
@@ -290,7 +293,7 @@ export class HostedPluginSupport extends AbstractHostedPluginSupport<PluginManag
|
|
|
290
293
|
await this.viewRegistry.initWidgets();
|
|
291
294
|
// remove restored plugin widgets which were not registered by contributions
|
|
292
295
|
this.viewRegistry.removeStaleWidgets();
|
|
293
|
-
}).catch(
|
|
296
|
+
}).catch(e => this.logger.error(e));
|
|
294
297
|
this.workspaceTrustService.refreshRestrictedModeIndicator();
|
|
295
298
|
}
|
|
296
299
|
|
|
@@ -583,7 +586,7 @@ export class HostedPluginSupport extends AbstractHostedPluginSupport<PluginManag
|
|
|
583
586
|
return result.length > 0;
|
|
584
587
|
} catch (e) {
|
|
585
588
|
if (!isCancelled(e)) {
|
|
586
|
-
|
|
589
|
+
this.logger.error(e);
|
|
587
590
|
}
|
|
588
591
|
return false;
|
|
589
592
|
} finally {
|
|
@@ -644,7 +647,7 @@ export class HostedPluginSupport extends AbstractHostedPluginSupport<PluginManag
|
|
|
644
647
|
webview.setHTML(this.getDeserializationFailedContents(`
|
|
645
648
|
An error occurred while restoring '${webview.viewType}' view. Please check logs.
|
|
646
649
|
`));
|
|
647
|
-
|
|
650
|
+
this.logger.error('Failed to restore the webview', e);
|
|
648
651
|
}
|
|
649
652
|
}
|
|
650
653
|
}
|
|
@@ -19,6 +19,7 @@ import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposa
|
|
|
19
19
|
import { DeployedPlugin, PluginIdentifiers } from '../../common/plugin-protocol';
|
|
20
20
|
import { AbstractHostedPluginSupport, PluginContributions } from './hosted-plugin';
|
|
21
21
|
import { Measurement } from '@theia/core/lib/common/performance/measurement';
|
|
22
|
+
import { MockLogger } from '@theia/core/lib/common/test/mock-logger';
|
|
22
23
|
|
|
23
24
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
24
25
|
|
|
@@ -64,6 +65,7 @@ function createNoopMeasurement(): Measurement {
|
|
|
64
65
|
class TestHostedPluginSupport extends AbstractHostedPluginSupport<any, any> {
|
|
65
66
|
constructor() {
|
|
66
67
|
super('test-client');
|
|
68
|
+
(this as unknown as { logger: MockLogger }).logger = new MockLogger();
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
protected createTheiaReadyPromise(): Promise<unknown> {
|
|
@@ -54,7 +54,7 @@ export abstract class AbstractHostedPluginSupport<PM extends AbstractPluginManag
|
|
|
54
54
|
|
|
55
55
|
protected container: interfaces.Container;
|
|
56
56
|
|
|
57
|
-
@inject(ILogger)
|
|
57
|
+
@inject(ILogger) @named('plugin-ext:AbstractHostedPluginSupport')
|
|
58
58
|
protected readonly logger: ILogger;
|
|
59
59
|
|
|
60
60
|
@inject(HostedPluginServer)
|
|
@@ -147,7 +147,7 @@ export abstract class AbstractHostedPluginSupport<PM extends AbstractPluginManag
|
|
|
147
147
|
try {
|
|
148
148
|
await this.runOperation(() => this.doLoad());
|
|
149
149
|
} catch (e) {
|
|
150
|
-
|
|
150
|
+
this.logger.error('Failed to load plugins:', e);
|
|
151
151
|
// Resolve the startup deferreds so that clients awaiting `willStart` or `didStart`,
|
|
152
152
|
// e.g. file system provider activations, do not hang forever on a failed load.
|
|
153
153
|
this.deferredWillStart.resolve();
|
|
@@ -316,7 +316,7 @@ export abstract class AbstractHostedPluginSupport<PM extends AbstractPluginManag
|
|
|
316
316
|
const loadPluginsMeasurement = this.measure('loadPlugins');
|
|
317
317
|
|
|
318
318
|
const hostContributions = new Map<PluginHost, PluginContributions[]>();
|
|
319
|
-
|
|
319
|
+
this.logger.info(`[${this.clientId}] Loading plugin contributions`);
|
|
320
320
|
for (const contributions of this.contributions.values()) {
|
|
321
321
|
if (!this.workspaceTrusted && contributions.plugin.metadata.model.untrustedWorkspacesSupport === false) {
|
|
322
322
|
this._disabledByTrust.add(PluginIdentifiers.componentsToUnversionedId(contributions.plugin.metadata.model));
|
|
@@ -327,10 +327,10 @@ export abstract class AbstractHostedPluginSupport<PM extends AbstractPluginManag
|
|
|
327
327
|
const pluginId = plugin.model.id;
|
|
328
328
|
if (contributions.state === PluginContributions.State.INITIALIZING) {
|
|
329
329
|
contributions.state = PluginContributions.State.LOADING;
|
|
330
|
-
contributions.push(Disposable.create(() =>
|
|
330
|
+
contributions.push(Disposable.create(() => this.logger.info(`[${pluginId}]: Unloaded plugin.`)));
|
|
331
331
|
contributions.push(this.handleContributions(contributions.plugin));
|
|
332
332
|
contributions.state = PluginContributions.State.LOADED;
|
|
333
|
-
|
|
333
|
+
this.logger.debug(`[${this.clientId}][${pluginId}]: Loaded contributions.`);
|
|
334
334
|
loaded++;
|
|
335
335
|
}
|
|
336
336
|
|
|
@@ -342,7 +342,7 @@ export abstract class AbstractHostedPluginSupport<PM extends AbstractPluginManag
|
|
|
342
342
|
hostContributions.set(host, dynamicContributions);
|
|
343
343
|
toDisconnect.push(Disposable.create(() => {
|
|
344
344
|
contributions!.state = PluginContributions.State.LOADED;
|
|
345
|
-
|
|
345
|
+
this.logger.debug(`[${this.clientId}][${pluginId}]: Disconnected.`);
|
|
346
346
|
}));
|
|
347
347
|
}
|
|
348
348
|
}
|
|
@@ -398,22 +398,22 @@ export abstract class AbstractHostedPluginSupport<PM extends AbstractPluginManag
|
|
|
398
398
|
if (toDisconnect.disposed) {
|
|
399
399
|
return;
|
|
400
400
|
}
|
|
401
|
-
|
|
401
|
+
this.logger.info(`[${this.clientId}] Starting plugins.`);
|
|
402
402
|
for (const contributions of hostContributions) {
|
|
403
403
|
started++;
|
|
404
404
|
const plugin = contributions.plugin;
|
|
405
405
|
const id = plugin.metadata.model.id;
|
|
406
406
|
contributions.state = PluginContributions.State.STARTED;
|
|
407
|
-
|
|
407
|
+
this.logger.debug(`[${this.clientId}][${id}]: Started plugin.`);
|
|
408
408
|
toDisconnect.push(contributions.push(Disposable.create(() => {
|
|
409
|
-
|
|
409
|
+
this.logger.debug(`[${this.clientId}][${id}]: Stopped plugin.`);
|
|
410
410
|
manager.$stop(id);
|
|
411
411
|
})));
|
|
412
412
|
|
|
413
413
|
this.handlePluginStarted(manager, plugin);
|
|
414
414
|
}
|
|
415
415
|
} catch (e) {
|
|
416
|
-
|
|
416
|
+
this.logger.error(`Failed to start plugins for '${host}' host`, e);
|
|
417
417
|
}
|
|
418
418
|
})());
|
|
419
419
|
}
|
|
@@ -46,7 +46,7 @@ export class HostedPluginProcess implements ServerPluginRunner {
|
|
|
46
46
|
@inject(HostedPluginProcessConfiguration)
|
|
47
47
|
protected configuration: HostedPluginProcessConfiguration;
|
|
48
48
|
|
|
49
|
-
@inject(ILogger)
|
|
49
|
+
@inject(ILogger) @named('plugin-ext:HostedPluginProcess')
|
|
50
50
|
protected readonly logger: ILogger;
|
|
51
51
|
|
|
52
52
|
@inject(HostedPluginCliContribution)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { injectable, inject, multiInject, postConstruct, optional } from '@theia/core/shared/inversify';
|
|
17
|
+
import { injectable, inject, multiInject, postConstruct, optional, named } from '@theia/core/shared/inversify';
|
|
18
18
|
import { ILogger, ConnectionErrorHandler } from '@theia/core/lib/common';
|
|
19
19
|
import { HostedPluginClient, PluginModel, ServerPluginRunner } from '../../common/plugin-protocol';
|
|
20
20
|
import { LogPart } from '../../common/types';
|
|
@@ -32,7 +32,7 @@ export class HostedPluginSupport {
|
|
|
32
32
|
private isPluginProcessRunning = false;
|
|
33
33
|
private client: HostedPluginClient;
|
|
34
34
|
|
|
35
|
-
@inject(ILogger)
|
|
35
|
+
@inject(ILogger) @named('plugin-ext:HostedPluginSupport')
|
|
36
36
|
protected readonly logger: ILogger;
|
|
37
37
|
|
|
38
38
|
@inject(HostedPluginProcess)
|
|
@@ -19,7 +19,7 @@ import * as express from '@theia/core/shared/express';
|
|
|
19
19
|
import * as escape_html from 'escape-html';
|
|
20
20
|
import { realpath, stat } from 'fs/promises';
|
|
21
21
|
import { ILogger } from '@theia/core';
|
|
22
|
-
import { inject, injectable, optional, multiInject } from '@theia/core/shared/inversify';
|
|
22
|
+
import { inject, injectable, optional, multiInject, named } from '@theia/core/shared/inversify';
|
|
23
23
|
import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application';
|
|
24
24
|
import { PluginMetadata, getPluginId, MetadataProcessor, PluginPackage, PluginContribution } from '../../common/plugin-protocol';
|
|
25
25
|
import { MetadataScanner } from './metadata-scanner';
|
|
@@ -29,7 +29,7 @@ import { PLUGINS_BASE_PATH } from '@theia/plugin-utils/lib/common/constants';
|
|
|
29
29
|
@injectable()
|
|
30
30
|
export class HostedPluginReader implements BackendApplicationContribution {
|
|
31
31
|
|
|
32
|
-
@inject(ILogger)
|
|
32
|
+
@inject(ILogger) @named('plugin-ext:HostedPluginReader')
|
|
33
33
|
protected readonly logger: ILogger;
|
|
34
34
|
|
|
35
35
|
@inject(MetadataScanner)
|
|
@@ -60,7 +60,7 @@ export class HostedPluginReader implements BackendApplicationContribution {
|
|
|
60
60
|
// the file was found and successfully transferred
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
this.logger.error(`Could not transfer '${filePath}' file from '${pluginId}'`, e);
|
|
64
64
|
if (res.headersSent) {
|
|
65
65
|
// the request was already closed
|
|
66
66
|
return;
|
|
@@ -37,7 +37,7 @@ export type BackendPluginHostableFilter = (plugin: DeployedPlugin) => boolean;
|
|
|
37
37
|
*/
|
|
38
38
|
@injectable()
|
|
39
39
|
export class HostedPluginServerImpl implements HostedPluginServer {
|
|
40
|
-
@inject(ILogger)
|
|
40
|
+
@inject(ILogger) @named('plugin-ext:HostedPluginServerImpl')
|
|
41
41
|
protected readonly logger: ILogger;
|
|
42
42
|
|
|
43
43
|
@inject(PluginDeployerHandlerImpl)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { injectable } from '@theia/core/shared/inversify';
|
|
17
|
+
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
18
18
|
import { URI } from '@theia/core/shared/vscode-uri';
|
|
19
19
|
import { Event, Emitter } from '@theia/core/lib/common/event';
|
|
20
20
|
import {
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
} from '../../../common/plugin-api-rpc-model';
|
|
28
28
|
import { CommentController } from './comments-main';
|
|
29
29
|
import { CancellationToken } from '@theia/core/lib/common/cancellation';
|
|
30
|
+
import { ILogger } from '@theia/core';
|
|
30
31
|
|
|
31
32
|
/*---------------------------------------------------------------------------------------------
|
|
32
33
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -90,6 +91,9 @@ export interface CommentsService {
|
|
|
90
91
|
@injectable()
|
|
91
92
|
export class PluginCommentService implements CommentsService {
|
|
92
93
|
|
|
94
|
+
@inject(ILogger) @named('plugin-ext:PluginCommentService')
|
|
95
|
+
protected readonly logger: ILogger;
|
|
96
|
+
|
|
93
97
|
private readonly onDidSetDataProviderEmitter: Emitter<void> = new Emitter<void>();
|
|
94
98
|
readonly onDidSetDataProvider: Event<void> = this.onDidSetDataProviderEmitter.event;
|
|
95
99
|
|
|
@@ -181,7 +185,7 @@ export class PluginCommentService implements CommentsService {
|
|
|
181
185
|
this.commentControls.forEach(control => {
|
|
182
186
|
commentControlResult.push(control.getDocumentComments(resource, CancellationToken.None)
|
|
183
187
|
.catch(e => {
|
|
184
|
-
|
|
188
|
+
this.logger.info(e);
|
|
185
189
|
return null;
|
|
186
190
|
}));
|
|
187
191
|
});
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
|
|
17
|
+
import { injectable, inject, postConstruct, named } from '@theia/core/shared/inversify';
|
|
18
18
|
import { CustomEditor, DeployedPlugin } from '../../../common';
|
|
19
19
|
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
20
20
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
21
21
|
import { CustomEditorOpener } from './custom-editor-opener';
|
|
22
|
-
import { Emitter, PreferenceService } from '@theia/core';
|
|
22
|
+
import { Emitter, PreferenceService, ILogger } from '@theia/core';
|
|
23
23
|
import { ApplicationShell, DefaultOpenerService, OpenWithService, WidgetManager } from '@theia/core/lib/browser';
|
|
24
24
|
import { CustomEditorWidget } from './custom-editor-widget';
|
|
25
25
|
|
|
@@ -47,6 +47,9 @@ export class PluginCustomEditorRegistry {
|
|
|
47
47
|
@inject(PreferenceService)
|
|
48
48
|
protected readonly preferenceService: PreferenceService;
|
|
49
49
|
|
|
50
|
+
@inject(ILogger) @named('plugin-ext:PluginCustomEditorRegistry')
|
|
51
|
+
protected readonly logger: ILogger;
|
|
52
|
+
|
|
50
53
|
@postConstruct()
|
|
51
54
|
protected init(): void {
|
|
52
55
|
this.widgetManager.onDidCreateWidget(({ factoryId, widget }) => {
|
|
@@ -67,7 +70,7 @@ export class PluginCustomEditorRegistry {
|
|
|
67
70
|
|
|
68
71
|
registerCustomEditor(editor: CustomEditor, plugin: DeployedPlugin): Disposable {
|
|
69
72
|
if (this.editors.has(editor.viewType)) {
|
|
70
|
-
|
|
73
|
+
this.logger.warn('editor with such id already registered: ', JSON.stringify(editor));
|
|
71
74
|
return Disposable.NULL;
|
|
72
75
|
}
|
|
73
76
|
this.editors.set(editor.viewType, editor);
|
|
@@ -18,6 +18,7 @@ import { DebugSessionContributionRegistry, DebugSessionContribution } from '@the
|
|
|
18
18
|
import { injectable, inject, named, postConstruct } from '@theia/core/shared/inversify';
|
|
19
19
|
import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
|
|
20
20
|
import { Disposable } from '@theia/core/lib/common/disposable';
|
|
21
|
+
import { ILogger } from '@theia/core';
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* Debug session contribution registrator.
|
|
@@ -47,6 +48,9 @@ export class PluginDebugSessionContributionRegistry implements DebugSessionContr
|
|
|
47
48
|
@inject(ContributionProvider) @named(DebugSessionContribution)
|
|
48
49
|
protected readonly contributions: ContributionProvider<DebugSessionContribution>;
|
|
49
50
|
|
|
51
|
+
@inject(ILogger) @named('plugin-ext:PluginDebugSessionContributionRegistry')
|
|
52
|
+
protected readonly logger: ILogger;
|
|
53
|
+
|
|
50
54
|
@postConstruct()
|
|
51
55
|
protected init(): void {
|
|
52
56
|
for (const contrib of this.contributions.getContributions()) {
|
|
@@ -62,7 +66,7 @@ export class PluginDebugSessionContributionRegistry implements DebugSessionContr
|
|
|
62
66
|
const { debugType } = contrib;
|
|
63
67
|
|
|
64
68
|
if (this.contribs.has(debugType)) {
|
|
65
|
-
|
|
69
|
+
this.logger.warn(`Debug session contribution already registered for ${debugType}`);
|
|
66
70
|
return Disposable.NULL;
|
|
67
71
|
}
|
|
68
72
|
|