@theia/plugin-ext-vscode 1.77.0-next.1 → 1.77.0-next.101
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/browser/plugin-vscode-commands-contribution.d.ts +6 -0
- package/lib/browser/plugin-vscode-commands-contribution.d.ts.map +1 -1
- package/lib/browser/plugin-vscode-commands-contribution.js +273 -258
- package/lib/browser/plugin-vscode-commands-contribution.js.map +1 -1
- package/lib/browser/plugin-vscode-commands-contribution.spec.js +210 -15
- package/lib/browser/plugin-vscode-commands-contribution.spec.js.map +1 -1
- package/lib/browser/plugin-vscode-contribution.js +11 -14
- package/lib/browser/plugin-vscode-contribution.js.map +1 -1
- package/lib/browser/plugin-vscode-frontend-module.js +12 -14
- package/lib/browser/plugin-vscode-frontend-module.js.map +1 -1
- package/lib/common/plugin-vscode-environment.js +12 -16
- package/lib/common/plugin-vscode-environment.js.map +1 -1
- package/lib/common/plugin-vscode-types.js +3 -6
- package/lib/common/plugin-vscode-types.js.map +1 -1
- package/lib/common/plugin-vscode-uri.js +5 -8
- package/lib/common/plugin-vscode-uri.js.map +1 -1
- package/lib/node/context/plugin-vscode-init-fe.d.ts +1 -2
- package/lib/node/context/plugin-vscode-init-fe.d.ts.map +1 -1
- package/lib/node/context/plugin-vscode-init-fe.js +3 -1
- package/lib/node/context/plugin-vscode-init-fe.js.map +1 -1
- package/lib/node/local-vsix-file-plugin-deployer-resolver.d.ts +1 -1
- package/lib/node/local-vsix-file-plugin-deployer-resolver.d.ts.map +1 -1
- package/lib/node/local-vsix-file-plugin-deployer-resolver.js +27 -34
- package/lib/node/local-vsix-file-plugin-deployer-resolver.js.map +1 -1
- package/lib/node/package.spec.d.ts +1 -0
- package/lib/node/package.spec.js +1 -0
- package/lib/node/plugin-vscode-backend-module.js +22 -24
- package/lib/node/plugin-vscode-backend-module.js.map +1 -1
- package/lib/node/plugin-vscode-cli-contribution.js +10 -13
- package/lib/node/plugin-vscode-cli-contribution.js.map +1 -1
- package/lib/node/plugin-vscode-deployer-participant.d.ts +1 -1
- package/lib/node/plugin-vscode-deployer-participant.d.ts.map +1 -1
- package/lib/node/plugin-vscode-deployer-participant.js +17 -22
- package/lib/node/plugin-vscode-deployer-participant.js.map +1 -1
- package/lib/node/plugin-vscode-directory-handler.js +23 -28
- package/lib/node/plugin-vscode-directory-handler.js.map +1 -1
- package/lib/node/plugin-vscode-file-handler.d.ts +1 -1
- package/lib/node/plugin-vscode-file-handler.d.ts.map +1 -1
- package/lib/node/plugin-vscode-file-handler.js +21 -27
- package/lib/node/plugin-vscode-file-handler.js.map +1 -1
- package/lib/node/plugin-vscode-init.d.ts.map +1 -1
- package/lib/node/plugin-vscode-init.js +12 -16
- package/lib/node/plugin-vscode-init.js.map +1 -1
- package/lib/node/plugin-vscode-init.spec.js +8 -10
- package/lib/node/plugin-vscode-init.spec.js.map +1 -1
- package/lib/node/plugin-vscode-utils.d.ts +1 -1
- package/lib/node/plugin-vscode-utils.d.ts.map +1 -1
- package/lib/node/plugin-vscode-utils.js +15 -24
- package/lib/node/plugin-vscode-utils.js.map +1 -1
- package/lib/node/scanner-vscode.js +19 -22
- package/lib/node/scanner-vscode.js.map +1 -1
- package/lib/node/scanner-vscode.spec.js +12 -14
- package/lib/node/scanner-vscode.spec.js.map +1 -1
- package/package.json +25 -17
- package/src/browser/plugin-vscode-commands-contribution.spec.ts +224 -1
- package/src/browser/plugin-vscode-commands-contribution.ts +97 -45
- package/src/browser/plugin-vscode-frontend-module.ts +3 -3
- package/src/node/context/plugin-vscode-init-fe.ts +2 -1
- package/src/node/local-vsix-file-plugin-deployer-resolver.ts +5 -9
- package/src/node/plugin-vscode-backend-module.ts +7 -7
- package/src/node/plugin-vscode-cli-contribution.ts +1 -1
- package/src/node/plugin-vscode-deployer-participant.ts +2 -2
- package/src/node/plugin-vscode-directory-handler.ts +1 -1
- package/src/node/plugin-vscode-file-handler.ts +3 -3
- package/src/node/plugin-vscode-init.spec.ts +1 -1
- package/src/node/plugin-vscode-init.ts +4 -3
- package/src/node/plugin-vscode-utils.ts +3 -3
- package/src/node/scanner-vscode.spec.ts +1 -1
- package/src/node/scanner-vscode.ts +2 -2
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2020 TypeFox and others.
|
|
4
3
|
//
|
|
@@ -14,30 +13,28 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const env_variables_1 = require("@theia/core/lib/common/env-variables");
|
|
22
|
-
const uri_1 = require("@theia/core/lib/common/uri");
|
|
16
|
+
import { __decorate } from "tslib";
|
|
17
|
+
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
18
|
+
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
19
|
+
import URI from '@theia/core/lib/common/uri';
|
|
23
20
|
let PluginVSCodeEnvironment = class PluginVSCodeEnvironment {
|
|
24
21
|
async getUserExtensionsDirUri() {
|
|
25
22
|
if (!this._userExtensionsDirUri) {
|
|
26
|
-
const configDir = new
|
|
23
|
+
const configDir = new URI(await this.environments.getConfigDirUri());
|
|
27
24
|
this._userExtensionsDirUri = configDir.resolve('extensions');
|
|
28
25
|
}
|
|
29
26
|
return this._userExtensionsDirUri;
|
|
30
27
|
}
|
|
31
28
|
async getDeploymentDirUri() {
|
|
32
29
|
if (!this._deployedPluginsUri) {
|
|
33
|
-
const configDir = new
|
|
30
|
+
const configDir = new URI(await this.environments.getConfigDirUri());
|
|
34
31
|
this._deployedPluginsUri = configDir.resolve('deployedPlugins');
|
|
35
32
|
}
|
|
36
33
|
return this._deployedPluginsUri;
|
|
37
34
|
}
|
|
38
35
|
async getTempDirUri(prefix) {
|
|
39
36
|
if (!this._tmpDirUri) {
|
|
40
|
-
const configDir = new
|
|
37
|
+
const configDir = new URI(await this.environments.getConfigDirUri());
|
|
41
38
|
this._tmpDirUri = configDir.resolve('tmp');
|
|
42
39
|
}
|
|
43
40
|
if (prefix) {
|
|
@@ -46,12 +43,11 @@ let PluginVSCodeEnvironment = class PluginVSCodeEnvironment {
|
|
|
46
43
|
return this._tmpDirUri;
|
|
47
44
|
}
|
|
48
45
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
(0, inversify_1.inject)(env_variables_1.EnvVariablesServer),
|
|
52
|
-
tslib_1.__metadata("design:type", Object)
|
|
46
|
+
__decorate([
|
|
47
|
+
inject(EnvVariablesServer)
|
|
53
48
|
], PluginVSCodeEnvironment.prototype, "environments", void 0);
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
PluginVSCodeEnvironment = __decorate([
|
|
50
|
+
injectable()
|
|
56
51
|
], PluginVSCodeEnvironment);
|
|
52
|
+
export { PluginVSCodeEnvironment };
|
|
57
53
|
//# sourceMappingURL=plugin-vscode-environment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-environment.js","sourceRoot":"","sources":["../../src/common/plugin-vscode-environment.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-vscode-environment.js","sourceRoot":"","sources":["../../src/common/plugin-vscode-environment.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yCAAyC;AACzC,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,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAGtC,IAA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-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2020 Ericsson and others.
|
|
4
3
|
//
|
|
@@ -14,9 +13,7 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
exports.VSCODE_DEFAULT_API_VERSION = api_1.DEFAULT_SUPPORTED_API_VERSION;
|
|
21
|
-
exports.VSX_REGISTRY_URL_DEFAULT = 'https://open-vsx.org';
|
|
16
|
+
import { DEFAULT_SUPPORTED_API_VERSION } from '@theia/core/shared/@theia/application-package/lib/api';
|
|
17
|
+
export const VSCODE_DEFAULT_API_VERSION = DEFAULT_SUPPORTED_API_VERSION;
|
|
18
|
+
export const VSX_REGISTRY_URL_DEFAULT = 'https://open-vsx.org';
|
|
22
19
|
//# sourceMappingURL=plugin-vscode-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-types.js","sourceRoot":"","sources":["../../src/common/plugin-vscode-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-vscode-types.js","sourceRoot":"","sources":["../../src/common/plugin-vscode-types.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;AAEhF,OAAO,EAAE,6BAA6B,EAAE,MAAM,uDAAuD,CAAC;AAEtG,MAAM,CAAC,MAAM,0BAA0B,GAAG,6BAA6B,CAAC;AACxE,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2022 Ericsson and others.
|
|
4
3
|
//
|
|
@@ -14,22 +13,20 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
exports.VSCodeExtensionUri = void 0;
|
|
19
|
-
const uri_1 = require("@theia/core/lib/common/uri");
|
|
16
|
+
import URI from '@theia/core/lib/common/uri';
|
|
20
17
|
/**
|
|
21
18
|
* Static methods for identifying a plugin as the target of the VSCode deployment system.
|
|
22
19
|
* In practice, this means that it will be resolved and deployed by the Open-VSX system.
|
|
23
20
|
*/
|
|
24
|
-
var VSCodeExtensionUri;
|
|
21
|
+
export var VSCodeExtensionUri;
|
|
25
22
|
(function (VSCodeExtensionUri) {
|
|
26
23
|
VSCodeExtensionUri.SCHEME = 'vscode-extension';
|
|
27
24
|
function fromId(id, version) {
|
|
28
25
|
if (typeof version === 'string') {
|
|
29
|
-
return new
|
|
26
|
+
return new URI().withScheme(VSCodeExtensionUri.SCHEME).withAuthority(id).withPath(`/${version}`);
|
|
30
27
|
}
|
|
31
28
|
else {
|
|
32
|
-
return new
|
|
29
|
+
return new URI().withScheme(VSCodeExtensionUri.SCHEME).withAuthority(id);
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
32
|
VSCodeExtensionUri.fromId = fromId;
|
|
@@ -45,5 +42,5 @@ var VSCodeExtensionUri;
|
|
|
45
42
|
return undefined;
|
|
46
43
|
}
|
|
47
44
|
VSCodeExtensionUri.toId = toId;
|
|
48
|
-
})(VSCodeExtensionUri || (
|
|
45
|
+
})(VSCodeExtensionUri || (VSCodeExtensionUri = {}));
|
|
49
46
|
//# sourceMappingURL=plugin-vscode-uri.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-uri.js","sourceRoot":"","sources":["../../src/common/plugin-vscode-uri.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-vscode-uri.js","sourceRoot":"","sources":["../../src/common/plugin-vscode-uri.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;AAEhF,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAE7C;;;GAGG;AACH,MAAM,KAAW,kBAAkB,CAsBlC;AAtBD,WAAiB,kBAAkB;IAClB,yBAAM,GAAG,kBAAkB,CAAC;IAEzC,SAAgB,MAAM,CAAC,EAAU,EAAE,OAAgB;QAC/C,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC;QACrG,CAAC;aAAM,CAAC;YACJ,OAAO,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;QAC7E,CAAC;IACL,CAAC;IANe,yBAAM,SAMrB,CAAA;IAED,SAAgB,eAAe,CAAC,WAAmB;QAC/C,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5C,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IAHe,kCAAe,kBAG9B,CAAA;IAED,SAAgB,IAAI,CAAC,GAAQ;QACzB,IAAI,GAAG,CAAC,MAAM,KAAK,kBAAkB,CAAC,MAAM,EAAE,CAAC;YAC3C,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACvF,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IALe,uBAAI,OAKnB,CAAA;AACL,CAAC,EAtBgB,kBAAkB,KAAlB,kBAAkB,QAsBlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-init-fe.d.ts","sourceRoot":"","sources":["../../../src/node/context/plugin-vscode-init-fe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-vscode-init-fe.d.ts","sourceRoot":"","sources":["../../../src/node/context/plugin-vscode-init-fe.ts"],"names":[],"mappings":""}
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
//
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
|
+
// The scope of the plugin worker, which loads this script with `importScripts`.
|
|
16
17
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
-
const _scope =
|
|
18
|
+
const _scope = self;
|
|
18
19
|
_scope.exports = {};
|
|
19
20
|
const _getModule = () => {
|
|
20
21
|
if (!_scope[_scope.frontendModuleName]) {
|
|
@@ -35,4 +36,5 @@ _scope.require = (moduleName) => {
|
|
|
35
36
|
return _scope.theia._empty;
|
|
36
37
|
}
|
|
37
38
|
};
|
|
39
|
+
export {};
|
|
38
40
|
//# sourceMappingURL=plugin-vscode-init-fe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-init-fe.js","sourceRoot":"","sources":["../../../src/node/context/plugin-vscode-init-fe.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,qCAAqC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/main/node/resolvers/local-plugin-deployer-resolver';
|
|
3
|
-
import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment';
|
|
3
|
+
import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment.js';
|
|
4
4
|
import { ILogger } from '@theia/core';
|
|
5
5
|
export declare class LocalVSIXFilePluginDeployerResolver extends LocalPluginDeployerResolver {
|
|
6
6
|
static LOCAL_FILE: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-vsix-file-plugin-deployer-resolver.d.ts","sourceRoot":"","sources":["../../src/node/local-vsix-file-plugin-deployer-resolver.ts"],"names":[],"mappings":"AAkBA,OAAO,
|
|
1
|
+
{"version":3,"file":"local-vsix-file-plugin-deployer-resolver.d.ts","sourceRoot":"","sources":["../../src/node/local-vsix-file-plugin-deployer-resolver.ts"],"names":[],"mappings":"AAkBA,OAAO,EAA2B,6BAA6B,EAAqB,MAAM,mBAAmB,CAAC;AAC9G,OAAO,EAAE,2BAA2B,EAAE,MAAM,0EAA0E,CAAC;AACvH,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAGjF,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,qBACa,mCAAoC,SAAQ,2BAA2B;IAChF,MAAM,CAAC,UAAU,SAAgB;IACjC,MAAM,CAAC,cAAc,SAAW;IAEC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,uBAAuB,CAAC;IAEzF,mBAC4B,MAAM,EAAE,OAAO,CAAC;IAE5C,SAAS,KAAK,eAAe,IAAI,MAAM,CAEtC;IAEQ,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIpC,oBAAoB,CAAC,qBAAqB,EAAE,6BAA6B,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAiCrH"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2018 Red Hat, Inc. and others.
|
|
4
3
|
//
|
|
@@ -15,18 +14,16 @@
|
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
16
|
var LocalVSIXFilePluginDeployerResolver_1;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const core_1 = require("@theia/core");
|
|
29
|
-
let LocalVSIXFilePluginDeployerResolver = class LocalVSIXFilePluginDeployerResolver extends local_plugin_deployer_resolver_1.LocalPluginDeployerResolver {
|
|
17
|
+
import { __decorate } from "tslib";
|
|
18
|
+
import * as path from 'path';
|
|
19
|
+
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
|
20
|
+
import { DuplicateExtensionError, PluginIdentifiers } from '@theia/plugin-ext';
|
|
21
|
+
import { LocalPluginDeployerResolver } from '@theia/plugin-ext/lib/main/node/resolvers/local-plugin-deployer-resolver';
|
|
22
|
+
import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment.js';
|
|
23
|
+
import { isVSCodePluginFile } from './plugin-vscode-file-handler.js';
|
|
24
|
+
import { existsInDeploymentDir, unpackToDeploymentDir, extractExtensionIdentityFromVsix } from './plugin-vscode-utils.js';
|
|
25
|
+
import { ILogger } from '@theia/core';
|
|
26
|
+
let LocalVSIXFilePluginDeployerResolver = class LocalVSIXFilePluginDeployerResolver extends LocalPluginDeployerResolver {
|
|
30
27
|
static { LocalVSIXFilePluginDeployerResolver_1 = this; }
|
|
31
28
|
static { this.LOCAL_FILE = 'local-file'; }
|
|
32
29
|
static { this.FILE_EXTENSION = '.vsix'; }
|
|
@@ -34,49 +31,45 @@ let LocalVSIXFilePluginDeployerResolver = class LocalVSIXFilePluginDeployerResol
|
|
|
34
31
|
return LocalVSIXFilePluginDeployerResolver_1.LOCAL_FILE;
|
|
35
32
|
}
|
|
36
33
|
accept(pluginId) {
|
|
37
|
-
return super.accept(pluginId) &&
|
|
34
|
+
return super.accept(pluginId) && isVSCodePluginFile(pluginId);
|
|
38
35
|
}
|
|
39
36
|
async resolveFromLocalPath(pluginResolverContext, localPath) {
|
|
40
37
|
// Extract the true extension identity from the VSIX package.json
|
|
41
38
|
// This prevents duplicate installations when the same extension is installed from VSIX files with different filenames
|
|
42
39
|
// See: https://github.com/eclipse-theia/theia/issues/16845
|
|
43
|
-
const components = await
|
|
40
|
+
const components = await extractExtensionIdentityFromVsix(localPath);
|
|
44
41
|
if (!components) {
|
|
45
42
|
// Fallback to filename-based ID if package.json cannot be read
|
|
46
43
|
// This maintains backward compatibility for edge cases
|
|
47
44
|
const fallbackId = path.basename(localPath, LocalVSIXFilePluginDeployerResolver_1.FILE_EXTENSION);
|
|
48
45
|
this.logger.warn(`[${pluginResolverContext.getOriginId()}]: Could not read extension identity from VSIX, falling back to filename: ${fallbackId}`);
|
|
49
|
-
if (await
|
|
46
|
+
if (await existsInDeploymentDir(this.environment, fallbackId)) {
|
|
50
47
|
this.logger.info(`[${pluginResolverContext.getOriginId()}]: Target dir already exists in plugin deployment dir`);
|
|
51
48
|
return;
|
|
52
49
|
}
|
|
53
|
-
const fallbackDeploymentDir = await
|
|
50
|
+
const fallbackDeploymentDir = await unpackToDeploymentDir(this.environment, localPath, fallbackId);
|
|
54
51
|
pluginResolverContext.addPlugin(fallbackId, fallbackDeploymentDir);
|
|
55
52
|
return;
|
|
56
53
|
}
|
|
57
|
-
const versionedId =
|
|
54
|
+
const versionedId = PluginIdentifiers.componentsToVersionedId(components);
|
|
58
55
|
// Check if the deployment directory already exists on disk
|
|
59
|
-
if (await
|
|
60
|
-
const unversionedId =
|
|
61
|
-
|
|
62
|
-
error.name = 'DuplicateExtensionError';
|
|
63
|
-
throw error;
|
|
56
|
+
if (await existsInDeploymentDir(this.environment, versionedId)) {
|
|
57
|
+
const unversionedId = PluginIdentifiers.componentsToUnversionedId(components);
|
|
58
|
+
throw DuplicateExtensionError.create(`Extension ${unversionedId} is already installed (version: ${components.version}).`);
|
|
64
59
|
}
|
|
65
|
-
const extensionDeploymentDir = await
|
|
60
|
+
const extensionDeploymentDir = await unpackToDeploymentDir(this.environment, localPath, versionedId);
|
|
66
61
|
pluginResolverContext.addPlugin(versionedId, extensionDeploymentDir);
|
|
67
62
|
}
|
|
68
63
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
(0, inversify_1.inject)(plugin_vscode_environment_1.PluginVSCodeEnvironment),
|
|
72
|
-
tslib_1.__metadata("design:type", plugin_vscode_environment_1.PluginVSCodeEnvironment)
|
|
64
|
+
__decorate([
|
|
65
|
+
inject(PluginVSCodeEnvironment)
|
|
73
66
|
], LocalVSIXFilePluginDeployerResolver.prototype, "environment", void 0);
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
tslib_1.__metadata("design:type", Object)
|
|
67
|
+
__decorate([
|
|
68
|
+
inject(ILogger),
|
|
69
|
+
named('plugin-ext-vscode:LocalVSIXFilePluginDeployerResolver')
|
|
78
70
|
], LocalVSIXFilePluginDeployerResolver.prototype, "logger", void 0);
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
LocalVSIXFilePluginDeployerResolver = LocalVSIXFilePluginDeployerResolver_1 = __decorate([
|
|
72
|
+
injectable()
|
|
81
73
|
], LocalVSIXFilePluginDeployerResolver);
|
|
74
|
+
export { LocalVSIXFilePluginDeployerResolver };
|
|
82
75
|
//# sourceMappingURL=local-vsix-file-plugin-deployer-resolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-vsix-file-plugin-deployer-resolver.js","sourceRoot":"","sources":["../../src/node/local-vsix-file-plugin-deployer-resolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-vsix-file-plugin-deployer-resolver.js","sourceRoot":"","sources":["../../src/node/local-vsix-file-plugin-deployer-resolver.ts"],"names":[],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,CAAC;IAAE,KAAK,CAAC,uDAAuD,CAAC;mEACpC;AAPnC,mCAAmC;IAD/C,UAAU,EAAE;GACA,mCAAmC,CAkD/C"}
|
package/lib/node/package.spec.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2018 Red Hat, Inc. and others.
|
|
4
3
|
//
|
|
@@ -14,28 +13,27 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
bind(
|
|
31
|
-
bind(
|
|
32
|
-
bind(
|
|
33
|
-
bind(
|
|
34
|
-
bind(
|
|
35
|
-
bind(
|
|
36
|
-
bind(
|
|
37
|
-
bind(
|
|
38
|
-
bind(
|
|
39
|
-
bind(plugin_ext_1.PluginDeployerResolver).to(local_vsix_file_plugin_deployer_resolver_1.LocalVSIXFilePluginDeployerResolver).inSingletonScope();
|
|
16
|
+
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
17
|
+
import { PluginDeployerFileHandler, PluginDeployerDirectoryHandler, PluginScanner, PluginDeployerParticipant, PluginDeployerResolver } from '@theia/plugin-ext';
|
|
18
|
+
import { PluginVsCodeFileHandler } from './plugin-vscode-file-handler.js';
|
|
19
|
+
import { PluginVsCodeDirectoryHandler } from './plugin-vscode-directory-handler.js';
|
|
20
|
+
import { VsCodePluginScanner } from './scanner-vscode.js';
|
|
21
|
+
import { PluginVsCodeCliContribution } from './plugin-vscode-cli-contribution.js';
|
|
22
|
+
import { CliContribution } from '@theia/core/lib/node';
|
|
23
|
+
import { PluginHostEnvironmentVariable } from '@theia/plugin-ext/lib/common';
|
|
24
|
+
import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment.js';
|
|
25
|
+
import { PluginVSCodeDeployerParticipant } from './plugin-vscode-deployer-participant.js';
|
|
26
|
+
import { LocalVSIXFilePluginDeployerResolver } from './local-vsix-file-plugin-deployer-resolver.js';
|
|
27
|
+
export default new ContainerModule(bind => {
|
|
28
|
+
bind(PluginVSCodeEnvironment).toSelf().inSingletonScope();
|
|
29
|
+
bind(PluginVSCodeDeployerParticipant).toSelf().inSingletonScope();
|
|
30
|
+
bind(PluginDeployerParticipant).toService(PluginVSCodeDeployerParticipant);
|
|
31
|
+
bind(PluginDeployerFileHandler).to(PluginVsCodeFileHandler).inSingletonScope();
|
|
32
|
+
bind(PluginDeployerDirectoryHandler).to(PluginVsCodeDirectoryHandler).inSingletonScope();
|
|
33
|
+
bind(PluginScanner).to(VsCodePluginScanner).inSingletonScope();
|
|
34
|
+
bind(PluginVsCodeCliContribution).toSelf().inSingletonScope();
|
|
35
|
+
bind(CliContribution).toService(PluginVsCodeCliContribution);
|
|
36
|
+
bind(PluginHostEnvironmentVariable).toService(PluginVsCodeCliContribution);
|
|
37
|
+
bind(PluginDeployerResolver).to(LocalVSIXFilePluginDeployerResolver).inSingletonScope();
|
|
40
38
|
});
|
|
41
39
|
//# sourceMappingURL=plugin-vscode-backend-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-backend-module.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-backend-module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-vscode-backend-module.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-backend-module.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAA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C;IAE/D,IAAI,CAAC,2BAA2B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC9D,IAAI,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,2BAA2B,CAAC,CAAC;IAC7D,IAAI,CAAC,6BAA6B,CAAC,CAAC,SAAS,CAAC,2BAA2B,CAAC,CAAC;IAE3E,IAAI,CAAC,sBAAsB,CAAC,CAAC,EAAE,CAAC,mCAAmC,CAAC,CAAC,gBAAgB,EAAE,CAAC;AAC5F,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2019 Red Hat, Inc. and others.
|
|
4
3
|
//
|
|
@@ -15,18 +14,16 @@
|
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
16
|
var PluginVsCodeCliContribution_1;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const plugin_vscode_types_1 = require("../common/plugin-vscode-types");
|
|
23
|
-
const promise_util_1 = require("@theia/core/lib/common/promise-util");
|
|
17
|
+
import { __decorate } from "tslib";
|
|
18
|
+
import { injectable } from '@theia/core/shared/inversify';
|
|
19
|
+
import { VSCODE_DEFAULT_API_VERSION } from '../common/plugin-vscode-types.js';
|
|
20
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
24
21
|
/**
|
|
25
22
|
* CLI Contribution allowing to override the VS Code API version which is returned by `vscode.version` API call.
|
|
26
23
|
*/
|
|
27
24
|
let PluginVsCodeCliContribution = class PluginVsCodeCliContribution {
|
|
28
25
|
constructor() {
|
|
29
|
-
this.vsCodeApiVersionDeferred = new
|
|
26
|
+
this.vsCodeApiVersionDeferred = new Deferred();
|
|
30
27
|
}
|
|
31
28
|
static { PluginVsCodeCliContribution_1 = this; }
|
|
32
29
|
/**
|
|
@@ -39,14 +36,14 @@ let PluginVsCodeCliContribution = class PluginVsCodeCliContribution {
|
|
|
39
36
|
configure(conf) {
|
|
40
37
|
conf.option(PluginVsCodeCliContribution_1.VSCODE_API_VERSION, {
|
|
41
38
|
// eslint-disable-next-line max-len
|
|
42
|
-
description: `Overrides the version returned by VSCode API 'vscode.version'. Example: --${PluginVsCodeCliContribution_1.VSCODE_API_VERSION}=<Wanted Version>. Default [${
|
|
39
|
+
description: `Overrides the version returned by VSCode API 'vscode.version'. Example: --${PluginVsCodeCliContribution_1.VSCODE_API_VERSION}=<Wanted Version>. Default [${VSCODE_DEFAULT_API_VERSION}]`,
|
|
43
40
|
type: 'string',
|
|
44
41
|
nargs: 1
|
|
45
42
|
});
|
|
46
43
|
}
|
|
47
44
|
setArguments(args) {
|
|
48
45
|
const arg = args[PluginVsCodeCliContribution_1.VSCODE_API_VERSION];
|
|
49
|
-
this.vsCodeApiVersion = arg?.trim() || process.env['VSCODE_API_VERSION']?.trim() ||
|
|
46
|
+
this.vsCodeApiVersion = arg?.trim() || process.env['VSCODE_API_VERSION']?.trim() || VSCODE_DEFAULT_API_VERSION;
|
|
50
47
|
process.env['VSCODE_API_VERSION'] = this.vsCodeApiVersion;
|
|
51
48
|
this.vsCodeApiVersionDeferred.resolve(this.vsCodeApiVersion);
|
|
52
49
|
}
|
|
@@ -56,8 +53,8 @@ let PluginVsCodeCliContribution = class PluginVsCodeCliContribution {
|
|
|
56
53
|
}
|
|
57
54
|
}
|
|
58
55
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
(0, inversify_1.injectable)()
|
|
56
|
+
PluginVsCodeCliContribution = PluginVsCodeCliContribution_1 = __decorate([
|
|
57
|
+
injectable()
|
|
62
58
|
], PluginVsCodeCliContribution);
|
|
59
|
+
export { PluginVsCodeCliContribution };
|
|
63
60
|
//# sourceMappingURL=plugin-vscode-cli-contribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-cli-contribution.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-cli-contribution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-vscode-cli-contribution.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-cli-contribution.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE/D;;GAEG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAAjC;QAQO,6BAAwB,GAAG,IAAI,QAAQ,EAAU,CAAC;IA4BhE,CAAC;;IAlCG;;OAEG;aACI,uBAAkB,GAAG,oBAAoB,AAAvB,CAAwB;IAKjD,IAAI,uBAAuB;QACvB,OAAO,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC;IACjD,CAAC;IAED,SAAS,CAAC,IAAU;QAChB,IAAI,CAAC,MAAM,CAAC,6BAA2B,CAAC,kBAAkB,EAAE;YACxD,mCAAmC;YACnC,WAAW,EAAE,6EAA6E,6BAA2B,CAAC,kBAAkB,+BAA+B,0BAA0B,GAAG;YACpM,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,CAAC;SACX,CAAC,CAAC;IACP,CAAC;IAED,YAAY,CAAC,IAAe;QACxB,MAAM,GAAG,GAAG,IAAI,CAAC,6BAA2B,CAAC,kBAAkB,CAAuB,CAAC;QACvF,IAAI,CAAC,gBAAgB,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,IAAI,EAAE,IAAI,0BAA0B,CAAC;QAC/G,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAC1D,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,CAAC,GAAsB;QAC1B,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxB,GAAG,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACtD,CAAC;IACL,CAAC;;AAlCQ,2BAA2B;IADvC,UAAU,EAAE;GACA,2BAA2B,CAoCvC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment';
|
|
1
|
+
import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment.js';
|
|
2
2
|
import { PluginDeployerParticipant, PluginDeployerStartContext } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
|
3
3
|
import { ILogger } from '@theia/core';
|
|
4
4
|
export declare class PluginVSCodeDeployerParticipant implements PluginDeployerParticipant {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-deployer-participant.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-deployer-participant.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"plugin-vscode-deployer-participant.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-deployer-participant.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAErH,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,qBACa,+BAAgC,YAAW,yBAAyB;IAG7E,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC;IAGzD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAE7B,WAAW,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;CAkBxE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2020 TypeFox and others.
|
|
4
3
|
//
|
|
@@ -14,25 +13,23 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const local_vsix_file_plugin_deployer_resolver_1 = require("./local-vsix-file-plugin-deployer-resolver");
|
|
25
|
-
const core_1 = require("@theia/core");
|
|
16
|
+
import { __decorate } from "tslib";
|
|
17
|
+
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
18
|
+
import * as fs from '@theia/core/shared/fs-extra';
|
|
19
|
+
import { FileUri } from '@theia/core/lib/node';
|
|
20
|
+
import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment.js';
|
|
21
|
+
import { LocalVSIXFilePluginDeployerResolver } from './local-vsix-file-plugin-deployer-resolver.js';
|
|
22
|
+
import { ILogger } from '@theia/core';
|
|
26
23
|
let PluginVSCodeDeployerParticipant = class PluginVSCodeDeployerParticipant {
|
|
27
24
|
async onWillStart(context) {
|
|
28
25
|
const extensionDeploymentDirUri = await this.environments.getDeploymentDirUri();
|
|
29
26
|
context.userEntries.push(extensionDeploymentDirUri.withScheme('local-dir').toString());
|
|
30
27
|
const userExtensionDirUri = await this.environments.getUserExtensionsDirUri();
|
|
31
|
-
const userExtensionDirPath =
|
|
28
|
+
const userExtensionDirPath = FileUri.fsPath(userExtensionDirUri);
|
|
32
29
|
if (await fs.pathExists(userExtensionDirPath)) {
|
|
33
30
|
const files = await fs.readdir(userExtensionDirPath);
|
|
34
31
|
for (const file of files) {
|
|
35
|
-
if (file.endsWith(
|
|
32
|
+
if (file.endsWith(LocalVSIXFilePluginDeployerResolver.FILE_EXTENSION)) {
|
|
36
33
|
const extensionUri = userExtensionDirUri.resolve(file).withScheme('local-file').toString();
|
|
37
34
|
this.logger.info(`found drop-in extension "${extensionUri}"`);
|
|
38
35
|
context.userEntries.push(extensionUri);
|
|
@@ -41,17 +38,15 @@ let PluginVSCodeDeployerParticipant = class PluginVSCodeDeployerParticipant {
|
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
(0, inversify_1.inject)(plugin_vscode_environment_1.PluginVSCodeEnvironment),
|
|
47
|
-
tslib_1.__metadata("design:type", plugin_vscode_environment_1.PluginVSCodeEnvironment)
|
|
41
|
+
__decorate([
|
|
42
|
+
inject(PluginVSCodeEnvironment)
|
|
48
43
|
], PluginVSCodeDeployerParticipant.prototype, "environments", void 0);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
tslib_1.__metadata("design:type", Object)
|
|
44
|
+
__decorate([
|
|
45
|
+
inject(ILogger),
|
|
46
|
+
named('plugin-ext-vscode:PluginVSCodeDeployerParticipant')
|
|
53
47
|
], PluginVSCodeDeployerParticipant.prototype, "logger", void 0);
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
PluginVSCodeDeployerParticipant = __decorate([
|
|
49
|
+
injectable()
|
|
56
50
|
], PluginVSCodeDeployerParticipant);
|
|
51
|
+
export { PluginVSCodeDeployerParticipant };
|
|
57
52
|
//# sourceMappingURL=plugin-vscode-deployer-participant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-deployer-participant.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-deployer-participant.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-vscode-deployer-participant.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-deployer-participant.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yCAAyC;AACzC,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,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,OAAO,EAAE,mCAAmC,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG/B,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAQxC,KAAK,CAAC,WAAW,CAAC,OAAmC;QACjD,MAAM,yBAAyB,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,mBAAmB,EAAE,CAAC;QAChF,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEvF,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,uBAAuB,EAAE,CAAC;QAC9E,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAEjE,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE,CAAC;YAC5C,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;YACrD,KAAK,M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