@theia/vsx-registry 1.45.1 → 1.46.0-next.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/README.md +45 -45
  2. package/lib/browser/recommended-extensions/preference-provider-overrides.d.ts +17 -17
  3. package/lib/browser/recommended-extensions/preference-provider-overrides.js +95 -95
  4. package/lib/browser/recommended-extensions/recommended-extensions-json-schema.d.ts +14 -14
  5. package/lib/browser/recommended-extensions/recommended-extensions-json-schema.js +94 -94
  6. package/lib/browser/recommended-extensions/recommended-extensions-preference-contribution.d.ts +11 -11
  7. package/lib/browser/recommended-extensions/recommended-extensions-preference-contribution.js +59 -59
  8. package/lib/browser/vsx-extension-commands.d.ts +14 -13
  9. package/lib/browser/vsx-extension-commands.d.ts.map +1 -1
  10. package/lib/browser/vsx-extension-commands.js +68 -63
  11. package/lib/browser/vsx-extension-commands.js.map +1 -1
  12. package/lib/browser/vsx-extension-editor-manager.d.ts +9 -9
  13. package/lib/browser/vsx-extension-editor-manager.js +49 -49
  14. package/lib/browser/vsx-extension-editor.d.ts +21 -21
  15. package/lib/browser/vsx-extension-editor.js +109 -109
  16. package/lib/browser/vsx-extension.d.ts +146 -143
  17. package/lib/browser/vsx-extension.d.ts.map +1 -1
  18. package/lib/browser/vsx-extension.js +616 -596
  19. package/lib/browser/vsx-extension.js.map +1 -1
  20. package/lib/browser/vsx-extensions-contribution.d.ts +70 -60
  21. package/lib/browser/vsx-extensions-contribution.d.ts.map +1 -1
  22. package/lib/browser/vsx-extensions-contribution.js +375 -344
  23. package/lib/browser/vsx-extensions-contribution.js.map +1 -1
  24. package/lib/browser/vsx-extensions-model.d.ts +75 -72
  25. package/lib/browser/vsx-extensions-model.d.ts.map +1 -1
  26. package/lib/browser/vsx-extensions-model.js +437 -391
  27. package/lib/browser/vsx-extensions-model.js.map +1 -1
  28. package/lib/browser/vsx-extensions-preferences.d.ts +12 -0
  29. package/lib/browser/vsx-extensions-preferences.d.ts.map +1 -0
  30. package/lib/browser/vsx-extensions-preferences.js +47 -0
  31. package/lib/browser/vsx-extensions-preferences.js.map +1 -0
  32. package/lib/browser/vsx-extensions-search-bar.d.ts +22 -14
  33. package/lib/browser/vsx-extensions-search-bar.d.ts.map +1 -1
  34. package/lib/browser/vsx-extensions-search-bar.js +106 -75
  35. package/lib/browser/vsx-extensions-search-bar.js.map +1 -1
  36. package/lib/browser/vsx-extensions-search-model.d.ts +21 -21
  37. package/lib/browser/vsx-extensions-search-model.js +70 -70
  38. package/lib/browser/vsx-extensions-source.d.ts +19 -19
  39. package/lib/browser/vsx-extensions-source.js +102 -102
  40. package/lib/browser/vsx-extensions-view-container.d.ts +49 -49
  41. package/lib/browser/vsx-extensions-view-container.js +179 -179
  42. package/lib/browser/vsx-extensions-widget.d.ts +35 -34
  43. package/lib/browser/vsx-extensions-widget.d.ts.map +1 -1
  44. package/lib/browser/vsx-extensions-widget.js +164 -156
  45. package/lib/browser/vsx-extensions-widget.js.map +1 -1
  46. package/lib/browser/vsx-language-quick-pick-service.d.ts +15 -15
  47. package/lib/browser/vsx-language-quick-pick-service.js +121 -121
  48. package/lib/browser/vsx-registry-frontend-module.d.ts +4 -4
  49. package/lib/browser/vsx-registry-frontend-module.d.ts.map +1 -1
  50. package/lib/browser/vsx-registry-frontend-module.js +99 -97
  51. package/lib/browser/vsx-registry-frontend-module.js.map +1 -1
  52. package/lib/common/index.d.ts +3 -3
  53. package/lib/common/index.js +25 -25
  54. package/lib/common/ovsx-client-provider.d.ts +13 -13
  55. package/lib/common/ovsx-client-provider.js +29 -29
  56. package/lib/common/vsx-environment.d.ts +9 -9
  57. package/lib/common/vsx-environment.js +20 -20
  58. package/lib/common/vsx-extension-uri.d.ts +3 -3
  59. package/lib/common/vsx-extension-uri.js +20 -20
  60. package/lib/common/vsx-registry-common-module.d.ts +3 -3
  61. package/lib/common/vsx-registry-common-module.js +57 -57
  62. package/lib/node/vsx-cli.d.ts +9 -9
  63. package/lib/node/vsx-cli.js +41 -41
  64. package/lib/node/vsx-environment-impl.d.ts +14 -14
  65. package/lib/node/vsx-environment-impl.js +61 -61
  66. package/lib/node/vsx-extension-resolver.d.ts +20 -20
  67. package/lib/node/vsx-extension-resolver.js +154 -154
  68. package/lib/node/vsx-registry-backend-module.d.ts +3 -3
  69. package/lib/node/vsx-registry-backend-module.js +35 -35
  70. package/lib/package.spec.js +25 -25
  71. package/package.json +12 -12
  72. package/src/browser/recommended-extensions/preference-provider-overrides.ts +99 -99
  73. package/src/browser/recommended-extensions/recommended-extensions-json-schema.ts +74 -74
  74. package/src/browser/recommended-extensions/recommended-extensions-preference-contribution.ts +68 -68
  75. package/src/browser/style/extensions.svg +4 -4
  76. package/src/browser/style/index.css +436 -373
  77. package/src/browser/vsx-extension-commands.ts +68 -63
  78. package/src/browser/vsx-extension-editor-manager.ts +42 -42
  79. package/src/browser/vsx-extension-editor.tsx +96 -96
  80. package/src/browser/vsx-extension.tsx +704 -675
  81. package/src/browser/vsx-extensions-contribution.ts +361 -327
  82. package/src/browser/vsx-extensions-model.ts +436 -389
  83. package/src/browser/vsx-extensions-preferences.ts +58 -0
  84. package/src/browser/vsx-extensions-search-bar.tsx +107 -69
  85. package/src/browser/vsx-extensions-search-model.ts +61 -61
  86. package/src/browser/vsx-extensions-source.ts +83 -83
  87. package/src/browser/vsx-extensions-view-container.ts +179 -179
  88. package/src/browser/vsx-extensions-widget.tsx +165 -156
  89. package/src/browser/vsx-language-quick-pick-service.ts +110 -110
  90. package/src/browser/vsx-registry-frontend-module.ts +108 -106
  91. package/src/common/index.ts +19 -19
  92. package/src/common/ovsx-client-provider.ts +35 -35
  93. package/src/common/vsx-environment.ts +27 -27
  94. package/src/common/vsx-extension-uri.ts +20 -20
  95. package/src/common/vsx-registry-common-module.ts +63 -63
  96. package/src/node/vsx-cli.ts +38 -38
  97. package/src/node/vsx-environment-impl.ts +50 -50
  98. package/src/node/vsx-extension-resolver.ts +125 -125
  99. package/src/node/vsx-registry-backend-module.ts +35 -35
  100. package/src/package.spec.ts +29 -29
@@ -1,58 +1,58 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2023 Ericsson 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
- const inversify_1 = require("@theia/core/shared/inversify");
19
- const common_1 = require("../common");
20
- const request_1 = require("@theia/core/shared/@theia/request");
21
- const ovsx_client_1 = require("@theia/ovsx-client");
22
- const vsx_environment_1 = require("./vsx-environment");
23
- exports.default = new inversify_1.ContainerModule(bind => {
24
- bind(common_1.OVSXUrlResolver)
25
- .toFunction(url => url);
26
- bind(common_1.OVSXClientProvider)
27
- .toDynamicValue(ctx => {
28
- var _a;
29
- const vsxEnvironment = ctx.container.get(vsx_environment_1.VSXEnvironment);
30
- const requestService = ctx.container.get(request_1.RequestService);
31
- const urlResolver = ctx.container.get(common_1.OVSXUrlResolver);
32
- const clientPromise = Promise
33
- .all([
34
- vsxEnvironment.getRegistryApiUri(),
35
- (_a = vsxEnvironment.getOvsxRouterConfig) === null || _a === void 0 ? void 0 : _a.call(vsxEnvironment),
36
- ])
37
- .then(async ([apiUrl, ovsxRouterConfig]) => {
38
- if (ovsxRouterConfig) {
39
- const clientFactory = ovsx_client_1.OVSXHttpClient.createClientFactory(requestService);
40
- return ovsx_client_1.OVSXRouterClient.FromConfig(ovsxRouterConfig, async (url) => clientFactory(await urlResolver(url)), [ovsx_client_1.RequestContainsFilterFactory, ovsx_client_1.ExtensionIdMatchesFilterFactory]);
41
- }
42
- return new ovsx_client_1.OVSXHttpClient(await urlResolver(apiUrl), requestService);
43
- });
44
- // reuse the promise for subsequent calls to this provider
45
- return () => clientPromise;
46
- })
47
- .inSingletonScope();
48
- bind(ovsx_client_1.OVSXApiFilter)
49
- .toDynamicValue(ctx => {
50
- const vsxEnvironment = ctx.container.get(vsx_environment_1.VSXEnvironment);
51
- const apiFilter = new ovsx_client_1.OVSXApiFilterImpl('-- temporary invalid version value --');
52
- vsxEnvironment.getVscodeApiVersion()
53
- .then(apiVersion => apiFilter.supportedApiVersion = apiVersion);
54
- return apiFilter;
55
- })
56
- .inSingletonScope();
57
- });
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2023 Ericsson 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
+ const inversify_1 = require("@theia/core/shared/inversify");
19
+ const common_1 = require("../common");
20
+ const request_1 = require("@theia/core/shared/@theia/request");
21
+ const ovsx_client_1 = require("@theia/ovsx-client");
22
+ const vsx_environment_1 = require("./vsx-environment");
23
+ exports.default = new inversify_1.ContainerModule(bind => {
24
+ bind(common_1.OVSXUrlResolver)
25
+ .toFunction(url => url);
26
+ bind(common_1.OVSXClientProvider)
27
+ .toDynamicValue(ctx => {
28
+ var _a;
29
+ const vsxEnvironment = ctx.container.get(vsx_environment_1.VSXEnvironment);
30
+ const requestService = ctx.container.get(request_1.RequestService);
31
+ const urlResolver = ctx.container.get(common_1.OVSXUrlResolver);
32
+ const clientPromise = Promise
33
+ .all([
34
+ vsxEnvironment.getRegistryApiUri(),
35
+ (_a = vsxEnvironment.getOvsxRouterConfig) === null || _a === void 0 ? void 0 : _a.call(vsxEnvironment),
36
+ ])
37
+ .then(async ([apiUrl, ovsxRouterConfig]) => {
38
+ if (ovsxRouterConfig) {
39
+ const clientFactory = ovsx_client_1.OVSXHttpClient.createClientFactory(requestService);
40
+ return ovsx_client_1.OVSXRouterClient.FromConfig(ovsxRouterConfig, async (url) => clientFactory(await urlResolver(url)), [ovsx_client_1.RequestContainsFilterFactory, ovsx_client_1.ExtensionIdMatchesFilterFactory]);
41
+ }
42
+ return new ovsx_client_1.OVSXHttpClient(await urlResolver(apiUrl), requestService);
43
+ });
44
+ // reuse the promise for subsequent calls to this provider
45
+ return () => clientPromise;
46
+ })
47
+ .inSingletonScope();
48
+ bind(ovsx_client_1.OVSXApiFilter)
49
+ .toDynamicValue(ctx => {
50
+ const vsxEnvironment = ctx.container.get(vsx_environment_1.VSXEnvironment);
51
+ const apiFilter = new ovsx_client_1.OVSXApiFilterImpl('-- temporary invalid version value --');
52
+ vsxEnvironment.getVscodeApiVersion()
53
+ .then(apiVersion => apiFilter.supportedApiVersion = apiVersion);
54
+ return apiFilter;
55
+ })
56
+ .inSingletonScope();
57
+ });
58
58
  //# sourceMappingURL=vsx-registry-common-module.js.map
@@ -1,10 +1,10 @@
1
- /// <reference types="yargs" />
2
- import { CliContribution } from '@theia/core/lib/node';
3
- import { Argv } from '@theia/core/shared/yargs';
4
- import { OVSXRouterConfig } from '@theia/ovsx-client';
5
- export declare class VsxCli implements CliContribution {
6
- ovsxRouterConfig: OVSXRouterConfig | undefined;
7
- configure(conf: Argv<{}>): void;
8
- setArguments(args: Record<string, unknown>): Promise<void>;
9
- }
1
+ /// <reference types="yargs" />
2
+ import { CliContribution } from '@theia/core/lib/node';
3
+ import { Argv } from '@theia/core/shared/yargs';
4
+ import { OVSXRouterConfig } from '@theia/ovsx-client';
5
+ export declare class VsxCli implements CliContribution {
6
+ ovsxRouterConfig: OVSXRouterConfig | undefined;
7
+ configure(conf: Argv<{}>): void;
8
+ setArguments(args: Record<string, unknown>): Promise<void>;
9
+ }
10
10
  //# sourceMappingURL=vsx-cli.d.ts.map
@@ -1,42 +1,42 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2023 Ericsson and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.VsxCli = void 0;
25
- const inversify_1 = require("@theia/core/shared/inversify");
26
- const fs = require("fs");
27
- let VsxCli = class VsxCli {
28
- configure(conf) {
29
- conf.option('ovsx-router-config', { description: 'JSON configuration file for the OVSX router client', type: 'string' });
30
- }
31
- async setArguments(args) {
32
- const { 'ovsx-router-config': ovsxRouterConfig } = args;
33
- if (typeof ovsxRouterConfig === 'string') {
34
- this.ovsxRouterConfig = JSON.parse(await fs.promises.readFile(ovsxRouterConfig, 'utf8'));
35
- }
36
- }
37
- };
38
- VsxCli = __decorate([
39
- (0, inversify_1.injectable)()
40
- ], VsxCli);
41
- exports.VsxCli = VsxCli;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2023 Ericsson and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.VsxCli = void 0;
25
+ const inversify_1 = require("@theia/core/shared/inversify");
26
+ const fs = require("fs");
27
+ let VsxCli = class VsxCli {
28
+ configure(conf) {
29
+ conf.option('ovsx-router-config', { description: 'JSON configuration file for the OVSX router client', type: 'string' });
30
+ }
31
+ async setArguments(args) {
32
+ const { 'ovsx-router-config': ovsxRouterConfig } = args;
33
+ if (typeof ovsxRouterConfig === 'string') {
34
+ this.ovsxRouterConfig = JSON.parse(await fs.promises.readFile(ovsxRouterConfig, 'utf8'));
35
+ }
36
+ }
37
+ };
38
+ VsxCli = __decorate([
39
+ (0, inversify_1.injectable)()
40
+ ], VsxCli);
41
+ exports.VsxCli = VsxCli;
42
42
  //# sourceMappingURL=vsx-cli.js.map
@@ -1,15 +1,15 @@
1
- import URI from '@theia/core/lib/common/uri';
2
- import { OVSXRouterConfig } from '@theia/ovsx-client';
3
- import { PluginVsCodeCliContribution } from '@theia/plugin-ext-vscode/lib/node/plugin-vscode-cli-contribution';
4
- import { VSXEnvironment } from '../common/vsx-environment';
5
- import { VsxCli } from './vsx-cli';
6
- export declare class VSXEnvironmentImpl implements VSXEnvironment {
7
- protected _registryUri: URI;
8
- protected readonly pluginVscodeCli: PluginVsCodeCliContribution;
9
- protected vsxCli: VsxCli;
10
- getRegistryUri(): Promise<string>;
11
- getRegistryApiUri(): Promise<string>;
12
- getVscodeApiVersion(): Promise<string>;
13
- getOvsxRouterConfig(): Promise<OVSXRouterConfig | undefined>;
14
- }
1
+ import URI from '@theia/core/lib/common/uri';
2
+ import { OVSXRouterConfig } from '@theia/ovsx-client';
3
+ import { PluginVsCodeCliContribution } from '@theia/plugin-ext-vscode/lib/node/plugin-vscode-cli-contribution';
4
+ import { VSXEnvironment } from '../common/vsx-environment';
5
+ import { VsxCli } from './vsx-cli';
6
+ export declare class VSXEnvironmentImpl implements VSXEnvironment {
7
+ protected _registryUri: URI;
8
+ protected readonly pluginVscodeCli: PluginVsCodeCliContribution;
9
+ protected vsxCli: VsxCli;
10
+ getRegistryUri(): Promise<string>;
11
+ getRegistryApiUri(): Promise<string>;
12
+ getVscodeApiVersion(): Promise<string>;
13
+ getOvsxRouterConfig(): Promise<OVSXRouterConfig | undefined>;
14
+ }
15
15
  //# sourceMappingURL=vsx-environment-impl.d.ts.map
@@ -1,62 +1,62 @@
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
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.VSXEnvironmentImpl = void 0;
28
- const uri_1 = require("@theia/core/lib/common/uri");
29
- const inversify_1 = require("@theia/core/shared/inversify");
30
- const plugin_vscode_cli_contribution_1 = require("@theia/plugin-ext-vscode/lib/node/plugin-vscode-cli-contribution");
31
- const vsx_cli_1 = require("./vsx-cli");
32
- let VSXEnvironmentImpl = class VSXEnvironmentImpl {
33
- constructor() {
34
- var _a;
35
- this._registryUri = new uri_1.default(((_a = process.env['VSX_REGISTRY_URL']) === null || _a === void 0 ? void 0 : _a.trim()) || 'https://open-vsx.org');
36
- }
37
- async getRegistryUri() {
38
- return this._registryUri.toString(true);
39
- }
40
- async getRegistryApiUri() {
41
- return this._registryUri.resolve('api').toString(true);
42
- }
43
- async getVscodeApiVersion() {
44
- return this.pluginVscodeCli.vsCodeApiVersionPromise;
45
- }
46
- async getOvsxRouterConfig() {
47
- return this.vsxCli.ovsxRouterConfig;
48
- }
49
- };
50
- __decorate([
51
- (0, inversify_1.inject)(plugin_vscode_cli_contribution_1.PluginVsCodeCliContribution),
52
- __metadata("design:type", plugin_vscode_cli_contribution_1.PluginVsCodeCliContribution)
53
- ], VSXEnvironmentImpl.prototype, "pluginVscodeCli", void 0);
54
- __decorate([
55
- (0, inversify_1.inject)(vsx_cli_1.VsxCli),
56
- __metadata("design:type", vsx_cli_1.VsxCli)
57
- ], VSXEnvironmentImpl.prototype, "vsxCli", void 0);
58
- VSXEnvironmentImpl = __decorate([
59
- (0, inversify_1.injectable)()
60
- ], VSXEnvironmentImpl);
61
- exports.VSXEnvironmentImpl = VSXEnvironmentImpl;
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
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.VSXEnvironmentImpl = void 0;
28
+ const uri_1 = require("@theia/core/lib/common/uri");
29
+ const inversify_1 = require("@theia/core/shared/inversify");
30
+ const plugin_vscode_cli_contribution_1 = require("@theia/plugin-ext-vscode/lib/node/plugin-vscode-cli-contribution");
31
+ const vsx_cli_1 = require("./vsx-cli");
32
+ let VSXEnvironmentImpl = class VSXEnvironmentImpl {
33
+ constructor() {
34
+ var _a;
35
+ this._registryUri = new uri_1.default(((_a = process.env['VSX_REGISTRY_URL']) === null || _a === void 0 ? void 0 : _a.trim()) || 'https://open-vsx.org');
36
+ }
37
+ async getRegistryUri() {
38
+ return this._registryUri.toString(true);
39
+ }
40
+ async getRegistryApiUri() {
41
+ return this._registryUri.resolve('api').toString(true);
42
+ }
43
+ async getVscodeApiVersion() {
44
+ return this.pluginVscodeCli.vsCodeApiVersionPromise;
45
+ }
46
+ async getOvsxRouterConfig() {
47
+ return this.vsxCli.ovsxRouterConfig;
48
+ }
49
+ };
50
+ __decorate([
51
+ (0, inversify_1.inject)(plugin_vscode_cli_contribution_1.PluginVsCodeCliContribution),
52
+ __metadata("design:type", plugin_vscode_cli_contribution_1.PluginVsCodeCliContribution)
53
+ ], VSXEnvironmentImpl.prototype, "pluginVscodeCli", void 0);
54
+ __decorate([
55
+ (0, inversify_1.inject)(vsx_cli_1.VsxCli),
56
+ __metadata("design:type", vsx_cli_1.VsxCli)
57
+ ], VSXEnvironmentImpl.prototype, "vsxCli", void 0);
58
+ VSXEnvironmentImpl = __decorate([
59
+ (0, inversify_1.injectable)()
60
+ ], VSXEnvironmentImpl);
61
+ exports.VSXEnvironmentImpl = VSXEnvironmentImpl;
62
62
  //# sourceMappingURL=vsx-environment-impl.js.map
@@ -1,21 +1,21 @@
1
- import { PluginDeployerHandler, PluginDeployerResolver, PluginDeployerResolverContext, PluginDeployOptions } from '@theia/plugin-ext/lib/common/plugin-protocol';
2
- import { OVSXClientProvider } from '../common/ovsx-client-provider';
3
- import { OVSXApiFilter, VSXExtensionRaw } from '@theia/ovsx-client';
4
- import { RequestService } from '@theia/core/shared/@theia/request';
5
- import { PluginVSCodeEnvironment } from '@theia/plugin-ext-vscode/lib/common/plugin-vscode-environment';
6
- import { PluginUninstallationManager } from '@theia/plugin-ext/lib/main/node/plugin-uninstallation-manager';
7
- export declare class VSXExtensionResolver implements PluginDeployerResolver {
8
- protected clientProvider: OVSXClientProvider;
9
- protected pluginDeployerHandler: PluginDeployerHandler;
10
- protected requestService: RequestService;
11
- protected readonly environment: PluginVSCodeEnvironment;
12
- protected readonly uninstallationManager: PluginUninstallationManager;
13
- protected vsxApiFilter: OVSXApiFilter;
14
- accept(pluginId: string): boolean;
15
- static readonly TEMP_DIR_PREFIX = "vscode-download";
16
- resolve(context: PluginDeployerResolverContext, options?: PluginDeployOptions): Promise<void>;
17
- protected getTempDir(): Promise<string>;
18
- protected hasSameOrNewerVersion(id: string, extension: VSXExtensionRaw): string | undefined;
19
- protected download(downloadUrl: string, downloadPath: string): Promise<boolean>;
20
- }
1
+ import { PluginDeployerHandler, PluginDeployerResolver, PluginDeployerResolverContext, PluginDeployOptions } from '@theia/plugin-ext/lib/common/plugin-protocol';
2
+ import { OVSXClientProvider } from '../common/ovsx-client-provider';
3
+ import { OVSXApiFilter, VSXExtensionRaw } from '@theia/ovsx-client';
4
+ import { RequestService } from '@theia/core/shared/@theia/request';
5
+ import { PluginVSCodeEnvironment } from '@theia/plugin-ext-vscode/lib/common/plugin-vscode-environment';
6
+ import { PluginUninstallationManager } from '@theia/plugin-ext/lib/main/node/plugin-uninstallation-manager';
7
+ export declare class VSXExtensionResolver implements PluginDeployerResolver {
8
+ protected clientProvider: OVSXClientProvider;
9
+ protected pluginDeployerHandler: PluginDeployerHandler;
10
+ protected requestService: RequestService;
11
+ protected readonly environment: PluginVSCodeEnvironment;
12
+ protected readonly uninstallationManager: PluginUninstallationManager;
13
+ protected vsxApiFilter: OVSXApiFilter;
14
+ accept(pluginId: string): boolean;
15
+ static readonly TEMP_DIR_PREFIX = "vscode-download";
16
+ resolve(context: PluginDeployerResolverContext, options?: PluginDeployOptions): Promise<void>;
17
+ protected getTempDir(): Promise<string>;
18
+ protected hasSameOrNewerVersion(id: string, extension: VSXExtensionRaw): string | undefined;
19
+ protected download(downloadUrl: string, downloadPath: string): Promise<boolean>;
20
+ }
21
21
  //# sourceMappingURL=vsx-extension-resolver.d.ts.map