@theia/plugin-ext-vscode 1.67.0-next.56 → 1.67.0-next.86

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.
Files changed (69) hide show
  1. package/lib/browser/plugin-vscode-commands-contribution.d.ts +89 -0
  2. package/lib/browser/plugin-vscode-commands-contribution.d.ts.map +1 -0
  3. package/lib/browser/plugin-vscode-commands-contribution.js +895 -0
  4. package/lib/browser/plugin-vscode-commands-contribution.js.map +1 -0
  5. package/lib/browser/plugin-vscode-contribution.d.ts +6 -0
  6. package/lib/browser/plugin-vscode-contribution.d.ts.map +1 -0
  7. package/lib/browser/plugin-vscode-contribution.js +49 -0
  8. package/lib/browser/plugin-vscode-contribution.js.map +1 -0
  9. package/lib/browser/plugin-vscode-frontend-module.d.ts +4 -0
  10. package/lib/browser/plugin-vscode-frontend-module.d.ts.map +1 -0
  11. package/lib/browser/plugin-vscode-frontend-module.js +31 -0
  12. package/lib/browser/plugin-vscode-frontend-module.js.map +1 -0
  13. package/lib/common/plugin-vscode-environment.d.ts +12 -0
  14. package/lib/common/plugin-vscode-environment.d.ts.map +1 -0
  15. package/lib/common/plugin-vscode-environment.js +57 -0
  16. package/lib/common/plugin-vscode-environment.js.map +1 -0
  17. package/lib/common/plugin-vscode-types.d.ts +3 -0
  18. package/lib/common/plugin-vscode-types.d.ts.map +1 -0
  19. package/lib/common/plugin-vscode-types.js +22 -0
  20. package/lib/common/plugin-vscode-types.js.map +1 -0
  21. package/lib/common/plugin-vscode-uri.d.ts +15 -0
  22. package/lib/common/plugin-vscode-uri.d.ts.map +1 -0
  23. package/lib/common/plugin-vscode-uri.js +49 -0
  24. package/lib/common/plugin-vscode-uri.js.map +1 -0
  25. package/lib/node/context/plugin-vscode-init-fe.d.ts +3 -0
  26. package/lib/node/context/plugin-vscode-init-fe.d.ts.map +1 -0
  27. package/lib/node/context/plugin-vscode-init-fe.js +38 -0
  28. package/lib/node/context/plugin-vscode-init-fe.js.map +1 -0
  29. package/lib/node/local-vsix-file-plugin-deployer-resolver.d.ts +12 -0
  30. package/lib/node/local-vsix-file-plugin-deployer-resolver.d.ts.map +1 -0
  31. package/lib/node/local-vsix-file-plugin-deployer-resolver.js +54 -0
  32. package/lib/node/local-vsix-file-plugin-deployer-resolver.js.map +1 -0
  33. package/lib/node/package.spec.d.ts +1 -0
  34. package/lib/node/package.spec.d.ts.map +1 -0
  35. package/lib/node/package.spec.js +26 -0
  36. package/lib/node/package.spec.js.map +1 -0
  37. package/lib/node/plugin-vscode-backend-module.d.ts +4 -0
  38. package/lib/node/plugin-vscode-backend-module.d.ts.map +1 -0
  39. package/lib/node/plugin-vscode-backend-module.js +41 -0
  40. package/lib/node/plugin-vscode-backend-module.js.map +1 -0
  41. package/lib/node/plugin-vscode-cli-contribution.d.ts +22 -0
  42. package/lib/node/plugin-vscode-cli-contribution.d.ts.map +1 -0
  43. package/lib/node/plugin-vscode-cli-contribution.js +63 -0
  44. package/lib/node/plugin-vscode-cli-contribution.js.map +1 -0
  45. package/lib/node/plugin-vscode-deployer-participant.d.ts +7 -0
  46. package/lib/node/plugin-vscode-deployer-participant.d.ts.map +1 -0
  47. package/lib/node/plugin-vscode-deployer-participant.js +51 -0
  48. package/lib/node/plugin-vscode-deployer-participant.js.map +1 -0
  49. package/lib/node/plugin-vscode-directory-handler.d.ts +21 -0
  50. package/lib/node/plugin-vscode-directory-handler.d.ts.map +1 -0
  51. package/lib/node/plugin-vscode-directory-handler.js +112 -0
  52. package/lib/node/plugin-vscode-directory-handler.js.map +1 -0
  53. package/lib/node/plugin-vscode-file-handler.d.ts +10 -0
  54. package/lib/node/plugin-vscode-file-handler.d.ts.map +1 -0
  55. package/lib/node/plugin-vscode-file-handler.js +67 -0
  56. package/lib/node/plugin-vscode-file-handler.js.map +1 -0
  57. package/lib/node/plugin-vscode-init.d.ts +3 -0
  58. package/lib/node/plugin-vscode-init.d.ts.map +1 -0
  59. package/lib/node/plugin-vscode-init.js +69 -0
  60. package/lib/node/plugin-vscode-init.js.map +1 -0
  61. package/lib/node/plugin-vscode-utils.d.ts +8 -0
  62. package/lib/node/plugin-vscode-utils.d.ts.map +1 -0
  63. package/lib/node/plugin-vscode-utils.js +105 -0
  64. package/lib/node/plugin-vscode-utils.js.map +1 -0
  65. package/lib/node/scanner-vscode.d.ts +13 -0
  66. package/lib/node/scanner-vscode.d.ts.map +1 -0
  67. package/lib/node/scanner-vscode.js +112 -0
  68. package/lib/node/scanner-vscode.js.map +1 -0
  69. package/package.json +16 -16
@@ -0,0 +1,22 @@
1
+ /// <reference types="yargs" />
2
+ /// <reference types="node" />
3
+ import { Argv, Arguments } from '@theia/core/shared/yargs';
4
+ import { CliContribution } from '@theia/core/lib/node/cli';
5
+ import { PluginHostEnvironmentVariable } from '@theia/plugin-ext/lib/common';
6
+ import { Deferred } from '@theia/core/lib/common/promise-util';
7
+ /**
8
+ * CLI Contribution allowing to override the VS Code API version which is returned by `vscode.version` API call.
9
+ */
10
+ export declare class PluginVsCodeCliContribution implements CliContribution, PluginHostEnvironmentVariable {
11
+ /**
12
+ * CLI argument name to define the supported VS Code API version.
13
+ */
14
+ static VSCODE_API_VERSION: string;
15
+ protected vsCodeApiVersion?: string;
16
+ protected vsCodeApiVersionDeferred: Deferred<string>;
17
+ get vsCodeApiVersionPromise(): Promise<string>;
18
+ configure(conf: Argv): void;
19
+ setArguments(args: Arguments): void;
20
+ process(env: NodeJS.ProcessEnv): void;
21
+ }
22
+ //# sourceMappingURL=plugin-vscode-cli-contribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-vscode-cli-contribution.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-cli-contribution.ts"],"names":[],"mappings":";;AAiBA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE/D;;GAEG;AACH,qBACa,2BAA4B,YAAW,eAAe,EAAE,6BAA6B;IAE9F;;OAEG;IACH,MAAM,CAAC,kBAAkB,SAAwB;IAEjD,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACpC,SAAS,CAAC,wBAAwB,mBAA0B;IAE5D,IAAI,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC,CAE7C;IAED,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAS3B,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;IAOnC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,IAAI;CAMxC"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2019 Red Hat, Inc. and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var PluginVsCodeCliContribution_1;
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.PluginVsCodeCliContribution = void 0;
20
+ const tslib_1 = require("tslib");
21
+ const inversify_1 = require("@theia/core/shared/inversify");
22
+ const plugin_vscode_types_1 = require("../common/plugin-vscode-types");
23
+ const promise_util_1 = require("@theia/core/lib/common/promise-util");
24
+ /**
25
+ * CLI Contribution allowing to override the VS Code API version which is returned by `vscode.version` API call.
26
+ */
27
+ let PluginVsCodeCliContribution = PluginVsCodeCliContribution_1 = class PluginVsCodeCliContribution {
28
+ constructor() {
29
+ this.vsCodeApiVersionDeferred = new promise_util_1.Deferred();
30
+ }
31
+ get vsCodeApiVersionPromise() {
32
+ return this.vsCodeApiVersionDeferred.promise;
33
+ }
34
+ configure(conf) {
35
+ conf.option(PluginVsCodeCliContribution_1.VSCODE_API_VERSION, {
36
+ // eslint-disable-next-line max-len
37
+ description: `Overrides the version returned by VSCode API 'vscode.version'. Example: --${PluginVsCodeCliContribution_1.VSCODE_API_VERSION}=<Wanted Version>. Default [${plugin_vscode_types_1.VSCODE_DEFAULT_API_VERSION}]`,
38
+ type: 'string',
39
+ nargs: 1
40
+ });
41
+ }
42
+ setArguments(args) {
43
+ var _a;
44
+ const arg = args[PluginVsCodeCliContribution_1.VSCODE_API_VERSION];
45
+ this.vsCodeApiVersion = (arg === null || arg === void 0 ? void 0 : arg.trim()) || ((_a = process.env['VSCODE_API_VERSION']) === null || _a === void 0 ? void 0 : _a.trim()) || plugin_vscode_types_1.VSCODE_DEFAULT_API_VERSION;
46
+ process.env['VSCODE_API_VERSION'] = this.vsCodeApiVersion;
47
+ this.vsCodeApiVersionDeferred.resolve(this.vsCodeApiVersion);
48
+ }
49
+ process(env) {
50
+ if (this.vsCodeApiVersion) {
51
+ env['VSCODE_API_VERSION'] = this.vsCodeApiVersion;
52
+ }
53
+ }
54
+ };
55
+ exports.PluginVsCodeCliContribution = PluginVsCodeCliContribution;
56
+ /**
57
+ * CLI argument name to define the supported VS Code API version.
58
+ */
59
+ PluginVsCodeCliContribution.VSCODE_API_VERSION = 'vscode-api-version';
60
+ exports.PluginVsCodeCliContribution = PluginVsCodeCliContribution = PluginVsCodeCliContribution_1 = tslib_1.__decorate([
61
+ (0, inversify_1.injectable)()
62
+ ], PluginVsCodeCliContribution);
63
+ //# sourceMappingURL=plugin-vscode-cli-contribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-vscode-cli-contribution.js","sourceRoot":"","sources":["../../src/node/plugin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AAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxB,GAAG,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACtD,CAAC;IACL,CAAC;;AAlCQ,kEAA2B;AAEpC;;GAEG;AACI,8CAAkB,GAAG,oBAAoB,AAAvB,CAAwB;sCALxC,2BAA2B;IADvC,IAAA,sBAAU,GAAE;GACA,2BAA2B,CAoCvC"}
@@ -0,0 +1,7 @@
1
+ import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment';
2
+ import { PluginDeployerParticipant, PluginDeployerStartContext } from '@theia/plugin-ext/lib/common/plugin-protocol';
3
+ export declare class PluginVSCodeDeployerParticipant implements PluginDeployerParticipant {
4
+ protected readonly environments: PluginVSCodeEnvironment;
5
+ onWillStart(context: PluginDeployerStartContext): Promise<void>;
6
+ }
7
+ //# sourceMappingURL=plugin-vscode-deployer-participant.d.ts.map
@@ -0,0 +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,qCAAqC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAGrH,qBACa,+BAAgC,YAAW,yBAAyB;IAG7E,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC;IAEnD,WAAW,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;CAkBxE"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2020 TypeFox 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.PluginVSCodeDeployerParticipant = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const inversify_1 = require("@theia/core/shared/inversify");
21
+ const fs = require("@theia/core/shared/fs-extra");
22
+ const node_1 = require("@theia/core/lib/node");
23
+ const plugin_vscode_environment_1 = require("../common/plugin-vscode-environment");
24
+ const local_vsix_file_plugin_deployer_resolver_1 = require("./local-vsix-file-plugin-deployer-resolver");
25
+ let PluginVSCodeDeployerParticipant = class PluginVSCodeDeployerParticipant {
26
+ async onWillStart(context) {
27
+ const extensionDeploymentDirUri = await this.environments.getDeploymentDirUri();
28
+ context.userEntries.push(extensionDeploymentDirUri.withScheme('local-dir').toString());
29
+ const userExtensionDirUri = await this.environments.getUserExtensionsDirUri();
30
+ const userExtensionDirPath = node_1.FileUri.fsPath(userExtensionDirUri);
31
+ if (await fs.pathExists(userExtensionDirPath)) {
32
+ const files = await fs.readdir(userExtensionDirPath);
33
+ for (const file of files) {
34
+ if (file.endsWith(local_vsix_file_plugin_deployer_resolver_1.LocalVSIXFilePluginDeployerResolver.FILE_EXTENSION)) {
35
+ const extensionUri = userExtensionDirUri.resolve(file).withScheme('local-file').toString();
36
+ console.log(`found drop-in extension "${extensionUri}"`);
37
+ context.userEntries.push(extensionUri);
38
+ }
39
+ }
40
+ }
41
+ }
42
+ };
43
+ exports.PluginVSCodeDeployerParticipant = PluginVSCodeDeployerParticipant;
44
+ tslib_1.__decorate([
45
+ (0, inversify_1.inject)(plugin_vscode_environment_1.PluginVSCodeEnvironment),
46
+ tslib_1.__metadata("design:type", plugin_vscode_environment_1.PluginVSCodeEnvironment)
47
+ ], PluginVSCodeDeployerParticipant.prototype, "environments", void 0);
48
+ exports.PluginVSCodeDeployerParticipant = PluginVSCodeDeployerParticipant = tslib_1.__decorate([
49
+ (0, inversify_1.injectable)()
50
+ ], PluginVSCodeDeployerParticipant);
51
+ //# sourceMappingURL=plugin-vscode-deployer-participant.js.map
@@ -0,0 +1 @@
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,4DAAkE;AAClE,kDAAkD;AAClD,+CAA+C;AAC/C,mFAA8E;AAE9E,yGAAiG;AAG1F,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAKxC,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,cAAO,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,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,8EAAmC,CAAC,cAAc,CAAC,EAAE,CAAC;oBACpE,MAAM,YAAY,GAAG,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC;oBAC3F,OAAO,CAAC,GAAG,CAAC,4BAA4B,YAAY,GAAG,CAAC,CAAC;oBACzD,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBAC3C,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ,CAAA;AAvBY,0EAA+B;AAGrB;IADlB,IAAA,kBAAM,EAAC,mDAAuB,CAAC;sCACC,mDAAuB;qEAAC;0CAHhD,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CAuB3C"}
@@ -0,0 +1,21 @@
1
+ import type { RecursivePartial, URI } from '@theia/core';
2
+ import { Deferred } from '@theia/core/lib/common/promise-util';
3
+ import { PluginDeployerDirectoryHandler, PluginDeployerEntry, PluginDeployerDirectoryHandlerContext, PluginPackage } from '@theia/plugin-ext';
4
+ import { PluginCliContribution } from '@theia/plugin-ext/lib/main/node/plugin-cli-contribution';
5
+ export declare class PluginVsCodeDirectoryHandler implements PluginDeployerDirectoryHandler {
6
+ protected readonly deploymentDirectory: Deferred<URI>;
7
+ protected readonly pluginCli: PluginCliContribution;
8
+ accept(plugin: PluginDeployerEntry): Promise<boolean>;
9
+ protected attemptResolution(plugin: PluginDeployerEntry): Promise<boolean>;
10
+ protected deriveMetadata(plugin: PluginDeployerEntry): Promise<boolean>;
11
+ handle(context: PluginDeployerDirectoryHandlerContext): Promise<void>;
12
+ protected resolveFromSources(plugin: PluginDeployerEntry): Promise<boolean>;
13
+ protected resolveFromVSIX(plugin: PluginDeployerEntry): Promise<boolean>;
14
+ protected resolveFromNpmTarball(plugin: PluginDeployerEntry): Promise<boolean>;
15
+ protected resolvePackage(plugin: PluginDeployerEntry, options?: {
16
+ pluginPath: string;
17
+ pck?: RecursivePartial<PluginPackage>;
18
+ }): boolean;
19
+ protected requirePackage(pluginPath: string): Promise<PluginPackage | undefined>;
20
+ }
21
+ //# sourceMappingURL=plugin-vscode-directory-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-vscode-directory-handler.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-directory-handler.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAa,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EACH,8BAA8B,EAAE,mBAAmB,EAAE,qCAAqC,EACjE,aAAa,EACzC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAC;AAGhG,qBACa,4BAA6B,YAAW,8BAA8B;IAE/E,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEvB,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAC;IAE7E,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;cAS3C,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;cAOhE,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAQvE,MAAM,CAAC,OAAO,EAAE,qCAAqC,GAAG,OAAO,CAAC,IAAI,CAAC;cAY3D,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;cAMjE,eAAe,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;cAS9D,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAMpF,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE;QAC5D,UAAU,EAAE,MAAM,CAAA;QAClB,GAAG,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;KACxC,GAAG,OAAO;cAkBK,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CASzF"}
@@ -0,0 +1,112 @@
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.PluginVsCodeDirectoryHandler = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const path = require("path");
21
+ const fs = require("@theia/core/shared/fs-extra");
22
+ const inversify_1 = require("@theia/core/shared/inversify");
23
+ const promise_util_1 = require("@theia/core/lib/common/promise-util");
24
+ const plugin_ext_1 = require("@theia/plugin-ext");
25
+ const plugin_cli_contribution_1 = require("@theia/plugin-ext/lib/main/node/plugin-cli-contribution");
26
+ const plugin_vscode_utils_1 = require("./plugin-vscode-utils");
27
+ let PluginVsCodeDirectoryHandler = class PluginVsCodeDirectoryHandler {
28
+ async accept(plugin) {
29
+ console.debug(`Resolving "${plugin.id()}" as a VS Code extension...`);
30
+ if (plugin.path().startsWith(plugin_vscode_utils_1.TMP_DIR_PREFIX)) {
31
+ // avoid adding corrupted plugins from temporary directories
32
+ return false;
33
+ }
34
+ return this.attemptResolution(plugin);
35
+ }
36
+ async attemptResolution(plugin) {
37
+ if (this.resolvePackage(plugin)) {
38
+ return true;
39
+ }
40
+ return this.deriveMetadata(plugin);
41
+ }
42
+ async deriveMetadata(plugin) {
43
+ return (0, promise_util_1.firstTrue)(this.resolveFromSources(plugin), this.resolveFromVSIX(plugin), this.resolveFromNpmTarball(plugin));
44
+ }
45
+ async handle(context) {
46
+ const types = [];
47
+ const packageJson = context.pluginEntry().getValue('package.json');
48
+ if (packageJson.browser) {
49
+ types.push(plugin_ext_1.PluginDeployerEntryType.FRONTEND);
50
+ }
51
+ if (packageJson.main || !packageJson.browser) {
52
+ types.push(plugin_ext_1.PluginDeployerEntryType.BACKEND);
53
+ }
54
+ context.pluginEntry().accept(...types);
55
+ }
56
+ async resolveFromSources(plugin) {
57
+ const pluginPath = plugin.path();
58
+ const pck = await this.requirePackage(pluginPath);
59
+ return this.resolvePackage(plugin, { pluginPath, pck });
60
+ }
61
+ async resolveFromVSIX(plugin) {
62
+ if (!(await fs.pathExists(path.join(plugin.path(), 'extension.vsixmanifest')))) {
63
+ return false;
64
+ }
65
+ const pluginPath = path.join(plugin.path(), 'extension');
66
+ const pck = await this.requirePackage(pluginPath);
67
+ return this.resolvePackage(plugin, { pluginPath, pck });
68
+ }
69
+ async resolveFromNpmTarball(plugin) {
70
+ const pluginPath = path.join(plugin.path(), 'package');
71
+ const pck = await this.requirePackage(pluginPath);
72
+ return this.resolvePackage(plugin, { pluginPath, pck });
73
+ }
74
+ resolvePackage(plugin, options) {
75
+ var _a;
76
+ const { pluginPath, pck } = options || {
77
+ pluginPath: plugin.path(),
78
+ pck: plugin.getValue('package.json')
79
+ };
80
+ if (!pck || !pck.name || !pck.version || !pck.engines || !pck.engines.vscode) {
81
+ return false;
82
+ }
83
+ (_a = pck.publisher) !== null && _a !== void 0 ? _a : (pck.publisher = plugin_ext_1.PluginIdentifiers.UNPUBLISHED);
84
+ if (options) {
85
+ plugin.storeValue('package.json', pck);
86
+ plugin.rootPath = plugin.path();
87
+ plugin.updatePath(pluginPath);
88
+ }
89
+ console.debug(`Resolved "${plugin.id()}" to a VS Code extension "${pck.name}@${pck.version}" with engines:`, pck.engines);
90
+ return true;
91
+ }
92
+ async requirePackage(pluginPath) {
93
+ var _a;
94
+ try {
95
+ const plugin = await fs.readJSON(path.join(pluginPath, 'package.json'));
96
+ (_a = plugin.publisher) !== null && _a !== void 0 ? _a : (plugin.publisher = plugin_ext_1.PluginIdentifiers.UNPUBLISHED);
97
+ return plugin;
98
+ }
99
+ catch {
100
+ return undefined;
101
+ }
102
+ }
103
+ };
104
+ exports.PluginVsCodeDirectoryHandler = PluginVsCodeDirectoryHandler;
105
+ tslib_1.__decorate([
106
+ (0, inversify_1.inject)(plugin_cli_contribution_1.PluginCliContribution),
107
+ tslib_1.__metadata("design:type", plugin_cli_contribution_1.PluginCliContribution)
108
+ ], PluginVsCodeDirectoryHandler.prototype, "pluginCli", void 0);
109
+ exports.PluginVsCodeDirectoryHandler = PluginVsCodeDirectoryHandler = tslib_1.__decorate([
110
+ (0, inversify_1.injectable)()
111
+ ], PluginVsCodeDirectoryHandler);
112
+ //# sourceMappingURL=plugin-vscode-directory-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-vscode-directory-handler.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-directory-handler.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,6BAA6B;AAC7B,kDAAkD;AAClD,4DAAkE;AAElE,sEAA0E;AAC1E,kDAG2B;AAC3B,qGAAgG;AAChG,+DAAuD;AAGhD,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAMrC,KAAK,CAAC,MAAM,CAAC,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,4BAA4B,CA6FxC"}
@@ -0,0 +1,10 @@
1
+ import { PluginDeployerFileHandler, PluginDeployerEntry, PluginDeployerFileHandlerContext } from '@theia/plugin-ext';
2
+ import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment';
3
+ export declare const isVSCodePluginFile: (pluginPath?: string) => boolean;
4
+ export declare class PluginVsCodeFileHandler implements PluginDeployerFileHandler {
5
+ protected readonly environment: PluginVSCodeEnvironment;
6
+ accept(resolvedPlugin: PluginDeployerEntry): Promise<boolean>;
7
+ handle(context: PluginDeployerFileHandlerContext): Promise<void>;
8
+ protected getNormalizedExtensionId(pluginId: string): string;
9
+ }
10
+ //# sourceMappingURL=plugin-vscode-file-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-vscode-file-handler.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-file-handler.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAIrH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAI9E,eAAO,MAAM,kBAAkB,gBAAiB,MAAM,YAAyF,CAAC;AAEhJ,qBACa,uBAAwB,YAAW,yBAAyB;IAErE,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,uBAAuB,CAAC;IAElD,MAAM,CAAC,cAAc,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAS7D,MAAM,CAAC,OAAO,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBtE,SAAS,CAAC,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;CAG/D"}
@@ -0,0 +1,67 @@
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.PluginVsCodeFileHandler = exports.isVSCodePluginFile = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const filenamify = require("filenamify");
21
+ const inversify_1 = require("@theia/core/shared/inversify");
22
+ const fs = require("@theia/core/shared/fs-extra");
23
+ const plugin_vscode_environment_1 = require("../common/plugin-vscode-environment");
24
+ const file_uri_1 = require("@theia/core/lib/common/file-uri");
25
+ const plugin_vscode_utils_1 = require("./plugin-vscode-utils");
26
+ const isVSCodePluginFile = (pluginPath) => Boolean(pluginPath && (pluginPath.endsWith('.vsix') || pluginPath.endsWith('.tgz')));
27
+ exports.isVSCodePluginFile = isVSCodePluginFile;
28
+ let PluginVsCodeFileHandler = class PluginVsCodeFileHandler {
29
+ async accept(resolvedPlugin) {
30
+ return resolvedPlugin.isFile().then(file => {
31
+ if (!file) {
32
+ return false;
33
+ }
34
+ return (0, exports.isVSCodePluginFile)(resolvedPlugin.path());
35
+ });
36
+ }
37
+ async handle(context) {
38
+ const id = this.getNormalizedExtensionId(context.pluginEntry().id());
39
+ const extensionDeploymentDir = await (0, plugin_vscode_utils_1.unpackToDeploymentDir)(this.environment, context.pluginEntry().path(), id);
40
+ context.pluginEntry().updatePath(extensionDeploymentDir);
41
+ console.log(`root path: ${context.pluginEntry().rootPath}`);
42
+ const originalPath = context.pluginEntry().originalPath();
43
+ if (originalPath && originalPath !== extensionDeploymentDir) {
44
+ const tempDirUri = await this.environment.getTempDirUri();
45
+ if (originalPath.startsWith(file_uri_1.FileUri.fsPath(tempDirUri))) {
46
+ try {
47
+ await fs.remove(file_uri_1.FileUri.fsPath(originalPath));
48
+ }
49
+ catch (e) {
50
+ console.error(`[${id}]: failed to remove temporary files: "${originalPath}"`, e);
51
+ }
52
+ }
53
+ }
54
+ }
55
+ getNormalizedExtensionId(pluginId) {
56
+ return filenamify(pluginId, { replacement: '_' }).replace(/\.vsix$/, '');
57
+ }
58
+ };
59
+ exports.PluginVsCodeFileHandler = PluginVsCodeFileHandler;
60
+ tslib_1.__decorate([
61
+ (0, inversify_1.inject)(plugin_vscode_environment_1.PluginVSCodeEnvironment),
62
+ tslib_1.__metadata("design:type", plugin_vscode_environment_1.PluginVSCodeEnvironment)
63
+ ], PluginVsCodeFileHandler.prototype, "environment", void 0);
64
+ exports.PluginVsCodeFileHandler = PluginVsCodeFileHandler = tslib_1.__decorate([
65
+ (0, inversify_1.injectable)()
66
+ ], PluginVsCodeFileHandler);
67
+ //# sourceMappingURL=plugin-vscode-file-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-vscode-file-handler.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-file-handler.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;;;;AAGhF,yCAAyC;AACzC,4DAAkE;AAClE,kDAAkD;AAClD,mFAA8E;AAC9E,8DAA0D;AAC1D,+DAA8D;AAEvD,MAAM,kBAAkB,GAAG,CAAC,UAAmB,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAAnI,QAAA,kBAAkB,sBAAiH;AAGzI,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KAAK,CAAC,IAAI,EAAE,yCAAyC,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC;gBACrF,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAES,wBAAwB,CAAC,QAAgB;QAC/C,OAAO,UAAU,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC7E,CAAC;CACJ,CAAA;AAlCY,0DAAuB;AAEb;IADlB,IAAA,kBAAM,EAAC,mDAAuB,CAAC;sCACA,mDAAuB;4DAAC;kCAF/C,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAkCnC"}
@@ -0,0 +1,3 @@
1
+ import { BackendInitializationFn } from '@theia/plugin-ext';
2
+ export declare const doInitialization: BackendInitializationFn;
3
+ //# sourceMappingURL=plugin-vscode-init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-vscode-init.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-init.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,uBAAuB,EAAyC,MAAM,mBAAmB,CAAC;AAWnG,eAAO,MAAM,gBAAgB,EAAE,uBAS9B,CAAC"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2018-2019 Red Hat, Inc.
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.doInitialization = void 0;
19
+ const plugin_ext_1 = require("@theia/plugin-ext");
20
+ const plugin_vscode_types_1 = require("../common/plugin-vscode-types");
21
+ process.env['VSCODE_PID'] = process.env['THEIA_PARENT_PID'];
22
+ const pluginsApiImpl = new Map();
23
+ const plugins = new Array();
24
+ let defaultApi;
25
+ let isLoadOverride = false;
26
+ let pluginApiFactory;
27
+ const doInitialization = (apiFactory, plugin) => {
28
+ pluginsApiImpl.set(plugin.model.id, createVSCodeAPI(apiFactory, plugin));
29
+ plugins.push(plugin);
30
+ pluginApiFactory = apiFactory;
31
+ if (!isLoadOverride) {
32
+ overrideInternalLoad();
33
+ isLoadOverride = true;
34
+ }
35
+ };
36
+ exports.doInitialization = doInitialization;
37
+ function createVSCodeAPI(apiFactory, plugin) {
38
+ const vscode = apiFactory(plugin);
39
+ // override the version for vscode to be a VSCode version
40
+ vscode.version = process.env['VSCODE_API_VERSION'] || plugin_vscode_types_1.VSCODE_DEFAULT_API_VERSION;
41
+ return vscode;
42
+ }
43
+ function overrideInternalLoad() {
44
+ const module = require('module');
45
+ const vscodeModuleName = 'vscode';
46
+ // save original load method
47
+ const internalLoad = module._load;
48
+ // if we try to resolve theia module, return the filename entry to use cache.
49
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
50
+ module._load = function (request, parent, isMain) {
51
+ if (request !== vscodeModuleName) {
52
+ return internalLoad.apply(this, arguments);
53
+ }
54
+ const plugin = findPlugin(parent.filename);
55
+ if (plugin) {
56
+ const apiImpl = pluginsApiImpl.get(plugin.model.id);
57
+ return apiImpl;
58
+ }
59
+ if (!defaultApi) {
60
+ console.warn(`Could not identify plugin for 'Theia' require call from ${parent.filename}`);
61
+ defaultApi = createVSCodeAPI(pluginApiFactory, plugin_ext_1.emptyPlugin);
62
+ }
63
+ return defaultApi;
64
+ };
65
+ }
66
+ function findPlugin(filePath) {
67
+ return plugins.find(plugin => filePath.startsWith(plugin.pluginFolder));
68
+ }
69
+ //# sourceMappingURL=plugin-vscode-init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-vscode-init.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-init.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,wCAAwC;AACxC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAKhF,kDAAmG;AACnG,uEAA2E;AAE3E,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;AAE5D,MAAM,cAAc,GAAG,IAAI,GAAG,EAAwB,CAAC;AACvD,MAAM,OAAO,GAAG,IAAI,KAAK,EAAU,CAAC;AACpC,IAAI,UAAwB,CAAC;AAC7B,IAAI,cAAc,GAAG,KAAK,CAAC;AAC3B,IAAI,gBAAkC,CAAC;AAEhC,MAAM,gBAAgB,GAA4B,CAAC,UAA4B,EAAE,MAAc,EAAE,EAAE;IACtG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IACzE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrB,gBAAgB,GAAG,UAAU,CAAC;IAE9B,IAAI,CAAC,cAAc,EAAE,CAAC;QAClB,oBAAoB,EAAE,CAAC;QACvB,cAAc,GAAG,IAAI,CAAC;IAC1B,CAAC;AACL,CAAC,CAAC;AATW,QAAA,gBAAgB,oBAS3B;AAEF,SAAS,eAAe,CAAC,UAA4B,EAAE,MAAc;IACjE,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAElC,yDAAyD;IACnD,MAAO,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,gDAA0B,CAAC;IACxF,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAS,oBAAoB;IACzB,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IAClC,4BAA4B;IAC5B,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC;IAElC,6EAA6E;IAC7E,8DAA8D;IAC9D,MAAM,CAAC,KAAK,GAAG,UAAU,OAAe,EAAE,MAAW,EAAE,MAAU;QAC7D,IAAI,OAAO,KAAK,gBAAgB,EAAE,CAAC;YAC/B,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC/C,CAAC;QAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,MAAM,EAAE,CAAC;YACT,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpD,OAAO,OAAO,CAAC;QACnB,CAAC;QAED,IAAI,CAAC,UAAU,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,2DAA2D,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC3F,UAAU,GAAG,eAAe,CAAC,gBAAgB,EAAE,wBAAW,CAAC,CAAC;QAChE,CAAC;QAED,OAAO,UAAU,CAAC;IACtB,CAAC,CAAC;AACN,CAAC;AAED,SAAS,UAAU,CAAC,QAAgB;IAChC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;AAC5E,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment';
2
+ export declare function decompressExtension(sourcePath: string, destPath: string): Promise<boolean>;
3
+ export declare function existsInDeploymentDir(env: PluginVSCodeEnvironment, extensionId: string): Promise<boolean>;
4
+ export declare const TMP_DIR_PREFIX = "tmp-vscode-unpacked-";
5
+ export declare function unpackToDeploymentDir(env: PluginVSCodeEnvironment, sourcePath: string, extensionId: string): Promise<string>;
6
+ export declare function getExtensionDeploymentDir(env: PluginVSCodeEnvironment, extensionId: string): Promise<string>;
7
+ export declare function getTempDir(env: PluginVSCodeEnvironment, prefix: string): Promise<string>;
8
+ //# sourceMappingURL=plugin-vscode-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-vscode-utils.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-utils.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAgBhG;AAED,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/G;AAED,eAAO,MAAM,cAAc,yBAAyB,CAAC;AACrD,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiClI;AAED,wBAAsB,yBAAyB,CAAC,GAAG,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKlH;AAED,wBAAsB,UAAU,CAAC,GAAG,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAY9F"}
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2023 STMicroelectronics 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.getTempDir = exports.getExtensionDeploymentDir = exports.unpackToDeploymentDir = exports.TMP_DIR_PREFIX = exports.existsInDeploymentDir = exports.decompressExtension = void 0;
19
+ const decompress = require("decompress");
20
+ const path = require("path");
21
+ const filenamify = require("filenamify");
22
+ const node_1 = require("@theia/core/lib/node");
23
+ const fs = require("@theia/core/shared/fs-extra");
24
+ async function decompressExtension(sourcePath, destPath) {
25
+ try {
26
+ await decompress(sourcePath, destPath);
27
+ if (sourcePath.endsWith('.tgz')) {
28
+ // unzip node_modules from built-in extensions, see https://github.com/eclipse-theia/theia/issues/5756
29
+ const extensionPath = path.join(destPath, 'package');
30
+ const vscodeNodeModulesPath = path.join(extensionPath, 'vscode_node_modules.zip');
31
+ if (await fs.pathExists(vscodeNodeModulesPath)) {
32
+ await decompress(vscodeNodeModulesPath, path.join(extensionPath, 'node_modules'));
33
+ }
34
+ }
35
+ return true;
36
+ }
37
+ catch (error) {
38
+ console.error(`Failed to decompress ${sourcePath} to ${destPath}: ${error}`);
39
+ throw error;
40
+ }
41
+ }
42
+ exports.decompressExtension = decompressExtension;
43
+ async function existsInDeploymentDir(env, extensionId) {
44
+ return fs.pathExists(await getExtensionDeploymentDir(env, extensionId));
45
+ }
46
+ exports.existsInDeploymentDir = existsInDeploymentDir;
47
+ exports.TMP_DIR_PREFIX = 'tmp-vscode-unpacked-';
48
+ async function unpackToDeploymentDir(env, sourcePath, extensionId) {
49
+ const extensionDeploymentDir = await getExtensionDeploymentDir(env, extensionId);
50
+ if (await fs.pathExists(extensionDeploymentDir)) {
51
+ console.log(`[${extensionId}]: deployment dir "${extensionDeploymentDir}" already exists`);
52
+ return extensionDeploymentDir;
53
+ }
54
+ const tempDir = await getTempDir(env, exports.TMP_DIR_PREFIX);
55
+ try {
56
+ console.log(`[${extensionId}]: trying to decompress "${sourcePath}" into "${tempDir}"...`);
57
+ if (!await decompressExtension(sourcePath, tempDir)) {
58
+ await fs.remove(tempDir);
59
+ const msg = `[${extensionId}]: decompressing "${sourcePath}" to "${tempDir}" failed`;
60
+ console.error(msg);
61
+ throw new Error(msg);
62
+ }
63
+ }
64
+ catch (e) {
65
+ await fs.remove(tempDir);
66
+ const msg = `[${extensionId}]: error while decompressing "${sourcePath}" to "${tempDir}"`;
67
+ console.error(msg, e);
68
+ throw e;
69
+ }
70
+ console.log(`[${extensionId}]: decompressed to temp dir "${tempDir}"`);
71
+ try {
72
+ console.log(`[${extensionId}]: renaming to extension dir "${extensionDeploymentDir}"...`);
73
+ await fs.rename(tempDir, extensionDeploymentDir);
74
+ return extensionDeploymentDir;
75
+ }
76
+ catch (e) {
77
+ await fs.remove(tempDir);
78
+ console.error(`[${extensionId}]: error while renaming "${tempDir}" to "${extensionDeploymentDir}"`, e);
79
+ throw e;
80
+ }
81
+ }
82
+ exports.unpackToDeploymentDir = unpackToDeploymentDir;
83
+ async function getExtensionDeploymentDir(env, extensionId) {
84
+ const deployedPluginsDirUri = await env.getDeploymentDirUri();
85
+ const normalizedExtensionId = filenamify(extensionId, { replacement: '_' });
86
+ const extensionDeploymentDirPath = node_1.FileUri.fsPath(deployedPluginsDirUri.resolve(normalizedExtensionId));
87
+ return extensionDeploymentDirPath;
88
+ }
89
+ exports.getExtensionDeploymentDir = getExtensionDeploymentDir;
90
+ async function getTempDir(env, prefix) {
91
+ const deploymentDirPath = node_1.FileUri.fsPath(await env.getDeploymentDirUri());
92
+ try {
93
+ if (!await fs.pathExists(deploymentDirPath)) {
94
+ console.log(`Creating deployment dir ${deploymentDirPath}`);
95
+ await fs.mkdirs(deploymentDirPath);
96
+ }
97
+ return await fs.mkdtemp(path.join(deploymentDirPath, prefix));
98
+ }
99
+ catch (error) {
100
+ console.error(`Failed to create deployment dir ${deploymentDirPath}: ${error}`);
101
+ throw error;
102
+ }
103
+ }
104
+ exports.getTempDir = getTempDir;
105
+ //# sourceMappingURL=plugin-vscode-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-vscode-utils.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-utils.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,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,yCAAyC;AACzC,6BAA6B;AAC7B,yCAAyC;AACzC,+CAA+C;AAC/C,kDAAkD;AAG3C,KAAK,UAAU,mBAAmB,CAAC,UAAkB,EAAE,QAAgB;IAC1E,IAAI,CAAC;QACD,MAAM,UAAU,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACvC,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC9B,sGAAsG;YACtG,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;YACrD,MAAM,qBAAqB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAC;YAClF,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,qBAAqB,CAAC,EAAE,CAAC;gBAC7C,MAAM,UAAU,CAAC,qBAAqB,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC;YACtF,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,C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