@theia/vsx-registry 1.34.2 → 1.34.3

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 (73) hide show
  1. package/LICENSE +641 -641
  2. package/README.md +36 -36
  3. package/lib/browser/recommended-extensions/preference-provider-overrides.d.ts +17 -17
  4. package/lib/browser/recommended-extensions/preference-provider-overrides.js +95 -95
  5. package/lib/browser/recommended-extensions/recommended-extensions-json-schema.d.ts +14 -14
  6. package/lib/browser/recommended-extensions/recommended-extensions-json-schema.js +94 -94
  7. package/lib/browser/recommended-extensions/recommended-extensions-preference-contribution.d.ts +11 -11
  8. package/lib/browser/recommended-extensions/recommended-extensions-preference-contribution.js +59 -59
  9. package/lib/browser/vsx-extension-commands.d.ts +13 -13
  10. package/lib/browser/vsx-extension-commands.js +63 -63
  11. package/lib/browser/vsx-extension-editor-manager.d.ts +9 -9
  12. package/lib/browser/vsx-extension-editor-manager.js +49 -49
  13. package/lib/browser/vsx-extension-editor.d.ts +21 -21
  14. package/lib/browser/vsx-extension-editor.js +109 -109
  15. package/lib/browser/vsx-extension.d.ts +141 -141
  16. package/lib/browser/vsx-extension.js +581 -581
  17. package/lib/browser/vsx-extensions-contribution.d.ts +54 -54
  18. package/lib/browser/vsx-extensions-contribution.js +328 -328
  19. package/lib/browser/vsx-extensions-model.d.ts +67 -67
  20. package/lib/browser/vsx-extensions-model.js +368 -368
  21. package/lib/browser/vsx-extensions-search-bar.d.ts +14 -14
  22. package/lib/browser/vsx-extensions-search-bar.js +75 -75
  23. package/lib/browser/vsx-extensions-search-model.d.ts +21 -21
  24. package/lib/browser/vsx-extensions-search-model.js +70 -70
  25. package/lib/browser/vsx-extensions-source.d.ts +19 -19
  26. package/lib/browser/vsx-extensions-source.js +102 -102
  27. package/lib/browser/vsx-extensions-view-container.d.ts +49 -49
  28. package/lib/browser/vsx-extensions-view-container.js +179 -179
  29. package/lib/browser/vsx-extensions-widget.d.ts +29 -29
  30. package/lib/browser/vsx-extensions-widget.js +143 -143
  31. package/lib/browser/vsx-language-quick-pick-service.d.ts +13 -13
  32. package/lib/browser/vsx-language-quick-pick-service.js +103 -103
  33. package/lib/browser/vsx-registry-frontend-module.d.ts +4 -4
  34. package/lib/browser/vsx-registry-frontend-module.js +101 -101
  35. package/lib/common/ovsx-client-provider.d.ts +6 -6
  36. package/lib/common/ovsx-client-provider.js +28 -28
  37. package/lib/common/vsx-environment.d.ts +7 -7
  38. package/lib/common/vsx-environment.js +20 -20
  39. package/lib/common/vsx-extension-uri.d.ts +3 -3
  40. package/lib/common/vsx-extension-uri.js +20 -20
  41. package/lib/node/vsx-environment-impl.d.ts +10 -10
  42. package/lib/node/vsx-environment-impl.js +53 -53
  43. package/lib/node/vsx-extension-resolver.d.ts +17 -17
  44. package/lib/node/vsx-extension-resolver.js +137 -137
  45. package/lib/node/vsx-registry-backend-module.d.ts +3 -3
  46. package/lib/node/vsx-registry-backend-module.js +35 -35
  47. package/lib/package.spec.js +25 -25
  48. package/package.json +10 -10
  49. package/src/browser/recommended-extensions/preference-provider-overrides.ts +99 -99
  50. package/src/browser/recommended-extensions/recommended-extensions-json-schema.ts +74 -74
  51. package/src/browser/recommended-extensions/recommended-extensions-preference-contribution.ts +68 -68
  52. package/src/browser/style/extensions.svg +4 -4
  53. package/src/browser/style/index.css +354 -354
  54. package/src/browser/vsx-extension-commands.ts +63 -63
  55. package/src/browser/vsx-extension-editor-manager.ts +42 -42
  56. package/src/browser/vsx-extension-editor.tsx +96 -96
  57. package/src/browser/vsx-extension.tsx +662 -662
  58. package/src/browser/vsx-extensions-contribution.ts +315 -315
  59. package/src/browser/vsx-extensions-model.ts +366 -366
  60. package/src/browser/vsx-extensions-search-bar.tsx +69 -69
  61. package/src/browser/vsx-extensions-search-model.ts +61 -61
  62. package/src/browser/vsx-extensions-source.ts +83 -83
  63. package/src/browser/vsx-extensions-view-container.ts +179 -179
  64. package/src/browser/vsx-extensions-widget.tsx +138 -138
  65. package/src/browser/vsx-language-quick-pick-service.ts +97 -97
  66. package/src/browser/vsx-registry-frontend-module.ts +113 -113
  67. package/src/common/ovsx-client-provider.ts +30 -30
  68. package/src/common/vsx-environment.ts +24 -24
  69. package/src/common/vsx-extension-uri.ts +20 -20
  70. package/src/node/vsx-environment-impl.ts +41 -41
  71. package/src/node/vsx-extension-resolver.ts +111 -111
  72. package/src/node/vsx-registry-backend-module.ts +37 -37
  73. package/src/package.spec.ts +29 -29
package/README.md CHANGED
@@ -1,36 +1,36 @@
1
- <div align='center'>
2
-
3
- <br />
4
-
5
- <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
-
7
- <h2>ECLIPSE THEIA - Open VSX Registry Extension</h2>
8
-
9
- <hr />
10
-
11
- </div>
12
-
13
- ## Description
14
-
15
- The `@theia/vsx-registry` extension provides integration with the Open VSX Registry.
16
-
17
- ### Configuration
18
-
19
- The extension connects to the public Open VSX Registry hosted on `http://open-vsx.org/`.
20
- One can host own instance of a [registry](https://github.com/eclipse/openvsx#eclipse-open-vsx)
21
- and configure `VSX_REGISTRY_URL` environment variable to use it.
22
-
23
- ## Additional Information
24
-
25
- - [API documentation for `@theia/vsx-registry`](https://eclipse-theia.github.io/theia/docs/next/modules/vsx-registry.html)
26
- - [Theia - GitHub](https://github.com/eclipse-theia/theia)
27
- - [Theia - Website](https://theia-ide.org/)
28
-
29
- ## License
30
-
31
- - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
32
- - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
33
-
34
- ## Trademark
35
- "Theia" is a trademark of the Eclipse Foundation
36
- https://www.eclipse.org/theia
1
+ <div align='center'>
2
+
3
+ <br />
4
+
5
+ <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
+
7
+ <h2>ECLIPSE THEIA - Open VSX Registry Extension</h2>
8
+
9
+ <hr />
10
+
11
+ </div>
12
+
13
+ ## Description
14
+
15
+ The `@theia/vsx-registry` extension provides integration with the Open VSX Registry.
16
+
17
+ ### Configuration
18
+
19
+ The extension connects to the public Open VSX Registry hosted on `http://open-vsx.org/`.
20
+ One can host own instance of a [registry](https://github.com/eclipse/openvsx#eclipse-open-vsx)
21
+ and configure `VSX_REGISTRY_URL` environment variable to use it.
22
+
23
+ ## Additional Information
24
+
25
+ - [API documentation for `@theia/vsx-registry`](https://eclipse-theia.github.io/theia/docs/next/modules/vsx-registry.html)
26
+ - [Theia - GitHub](https://github.com/eclipse-theia/theia)
27
+ - [Theia - Website](https://theia-ide.org/)
28
+
29
+ ## License
30
+
31
+ - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
32
+ - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
33
+
34
+ ## Trademark
35
+ "Theia" is a trademark of the Eclipse Foundation
36
+ https://www.eclipse.org/theia
@@ -1,18 +1,18 @@
1
- import { FolderPreferenceProvider, UserPreferenceProvider } from '@theia/preferences/lib/browser';
2
- import { interfaces } from '@theia/core/shared/inversify';
3
- import { WorkspaceFilePreferenceProvider } from '@theia/preferences/lib/browser/workspace-file-preference-provider';
4
- /**
5
- * The overrides in this file are required because the base preference providers assume that a
6
- * section name (extensions) will not be used as a prefix (extensions.ignoreRecommendations).
7
- */
8
- export declare class FolderPreferenceProviderWithExtensions extends FolderPreferenceProvider {
9
- protected getPath(preferenceName: string): string[] | undefined;
10
- }
11
- export declare class UserPreferenceProviderWithExtensions extends UserPreferenceProvider {
12
- protected getPath(preferenceName: string): string[] | undefined;
13
- }
14
- export declare class WorkspaceFilePreferenceProviderWithExtensions extends WorkspaceFilePreferenceProvider {
15
- protected belongsInSection(firstSegment: string, remainder: string): boolean;
16
- }
17
- export declare function bindPreferenceProviderOverrides(bind: interfaces.Bind, unbind: interfaces.Unbind): void;
1
+ import { FolderPreferenceProvider, UserPreferenceProvider } from '@theia/preferences/lib/browser';
2
+ import { interfaces } from '@theia/core/shared/inversify';
3
+ import { WorkspaceFilePreferenceProvider } from '@theia/preferences/lib/browser/workspace-file-preference-provider';
4
+ /**
5
+ * The overrides in this file are required because the base preference providers assume that a
6
+ * section name (extensions) will not be used as a prefix (extensions.ignoreRecommendations).
7
+ */
8
+ export declare class FolderPreferenceProviderWithExtensions extends FolderPreferenceProvider {
9
+ protected getPath(preferenceName: string): string[] | undefined;
10
+ }
11
+ export declare class UserPreferenceProviderWithExtensions extends UserPreferenceProvider {
12
+ protected getPath(preferenceName: string): string[] | undefined;
13
+ }
14
+ export declare class WorkspaceFilePreferenceProviderWithExtensions extends WorkspaceFilePreferenceProvider {
15
+ protected belongsInSection(firstSegment: string, remainder: string): boolean;
16
+ }
17
+ export declare function bindPreferenceProviderOverrides(bind: interfaces.Bind, unbind: interfaces.Unbind): void;
18
18
  //# sourceMappingURL=preference-provider-overrides.d.ts.map
@@ -1,96 +1,96 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2021 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 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.bindPreferenceProviderOverrides = exports.WorkspaceFilePreferenceProviderWithExtensions = exports.UserPreferenceProviderWithExtensions = exports.FolderPreferenceProviderWithExtensions = void 0;
25
- const browser_1 = require("@theia/preferences/lib/browser");
26
- const inversify_1 = require("@theia/core/shared/inversify");
27
- const recommended_extensions_json_schema_1 = require("./recommended-extensions-json-schema");
28
- const workspace_file_preference_provider_1 = require("@theia/preferences/lib/browser/workspace-file-preference-provider");
29
- const preference_bindings_1 = require("@theia/preferences/lib/browser/preference-bindings");
30
- const section_preference_provider_1 = require("@theia/preferences/lib/browser/section-preference-provider");
31
- /**
32
- * The overrides in this file are required because the base preference providers assume that a
33
- * section name (extensions) will not be used as a prefix (extensions.ignoreRecommendations).
34
- */
35
- let FolderPreferenceProviderWithExtensions = class FolderPreferenceProviderWithExtensions extends browser_1.FolderPreferenceProvider {
36
- getPath(preferenceName) {
37
- const path = super.getPath(preferenceName);
38
- if (this.section !== 'extensions' || !(path === null || path === void 0 ? void 0 : path.length)) {
39
- return path;
40
- }
41
- const isExtensionsField = path[0] in recommended_extensions_json_schema_1.extensionsConfigurationSchema.properties;
42
- if (isExtensionsField) {
43
- return path;
44
- }
45
- return undefined;
46
- }
47
- };
48
- FolderPreferenceProviderWithExtensions = __decorate([
49
- (0, inversify_1.injectable)()
50
- ], FolderPreferenceProviderWithExtensions);
51
- exports.FolderPreferenceProviderWithExtensions = FolderPreferenceProviderWithExtensions;
52
- let UserPreferenceProviderWithExtensions = class UserPreferenceProviderWithExtensions extends browser_1.UserPreferenceProvider {
53
- getPath(preferenceName) {
54
- const path = super.getPath(preferenceName);
55
- if (this.section !== 'extensions' || !(path === null || path === void 0 ? void 0 : path.length)) {
56
- return path;
57
- }
58
- const isExtensionsField = path[0] in recommended_extensions_json_schema_1.extensionsConfigurationSchema.properties;
59
- if (isExtensionsField) {
60
- return path;
61
- }
62
- return undefined;
63
- }
64
- };
65
- UserPreferenceProviderWithExtensions = __decorate([
66
- (0, inversify_1.injectable)()
67
- ], UserPreferenceProviderWithExtensions);
68
- exports.UserPreferenceProviderWithExtensions = UserPreferenceProviderWithExtensions;
69
- let WorkspaceFilePreferenceProviderWithExtensions = class WorkspaceFilePreferenceProviderWithExtensions extends workspace_file_preference_provider_1.WorkspaceFilePreferenceProvider {
70
- belongsInSection(firstSegment, remainder) {
71
- if (firstSegment === 'extensions') {
72
- return remainder in recommended_extensions_json_schema_1.extensionsConfigurationSchema.properties;
73
- }
74
- return this.configurations.isSectionName(firstSegment);
75
- }
76
- };
77
- WorkspaceFilePreferenceProviderWithExtensions = __decorate([
78
- (0, inversify_1.injectable)()
79
- ], WorkspaceFilePreferenceProviderWithExtensions);
80
- exports.WorkspaceFilePreferenceProviderWithExtensions = WorkspaceFilePreferenceProviderWithExtensions;
81
- function bindPreferenceProviderOverrides(bind, unbind) {
82
- unbind(browser_1.UserPreferenceProviderFactory);
83
- unbind(browser_1.FolderPreferenceProviderFactory);
84
- unbind(workspace_file_preference_provider_1.WorkspaceFilePreferenceProviderFactory);
85
- (0, preference_bindings_1.bindFactory)(bind, browser_1.UserPreferenceProviderFactory, UserPreferenceProviderWithExtensions, section_preference_provider_1.SectionPreferenceProviderUri, section_preference_provider_1.SectionPreferenceProviderSection);
86
- (0, preference_bindings_1.bindFactory)(bind, browser_1.FolderPreferenceProviderFactory, FolderPreferenceProviderWithExtensions, section_preference_provider_1.SectionPreferenceProviderUri, section_preference_provider_1.SectionPreferenceProviderSection, browser_1.FolderPreferenceProviderFolder);
87
- bind(workspace_file_preference_provider_1.WorkspaceFilePreferenceProviderFactory).toFactory(ctx => (options) => {
88
- const child = new inversify_1.Container({ defaultScope: 'Singleton' });
89
- child.parent = ctx.container;
90
- child.bind(workspace_file_preference_provider_1.WorkspaceFilePreferenceProvider).to(WorkspaceFilePreferenceProviderWithExtensions);
91
- child.bind(workspace_file_preference_provider_1.WorkspaceFilePreferenceProviderOptions).toConstantValue(options);
92
- return child.get(workspace_file_preference_provider_1.WorkspaceFilePreferenceProvider);
93
- });
94
- }
95
- exports.bindPreferenceProviderOverrides = bindPreferenceProviderOverrides;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2021 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 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.bindPreferenceProviderOverrides = exports.WorkspaceFilePreferenceProviderWithExtensions = exports.UserPreferenceProviderWithExtensions = exports.FolderPreferenceProviderWithExtensions = void 0;
25
+ const browser_1 = require("@theia/preferences/lib/browser");
26
+ const inversify_1 = require("@theia/core/shared/inversify");
27
+ const recommended_extensions_json_schema_1 = require("./recommended-extensions-json-schema");
28
+ const workspace_file_preference_provider_1 = require("@theia/preferences/lib/browser/workspace-file-preference-provider");
29
+ const preference_bindings_1 = require("@theia/preferences/lib/browser/preference-bindings");
30
+ const section_preference_provider_1 = require("@theia/preferences/lib/browser/section-preference-provider");
31
+ /**
32
+ * The overrides in this file are required because the base preference providers assume that a
33
+ * section name (extensions) will not be used as a prefix (extensions.ignoreRecommendations).
34
+ */
35
+ let FolderPreferenceProviderWithExtensions = class FolderPreferenceProviderWithExtensions extends browser_1.FolderPreferenceProvider {
36
+ getPath(preferenceName) {
37
+ const path = super.getPath(preferenceName);
38
+ if (this.section !== 'extensions' || !(path === null || path === void 0 ? void 0 : path.length)) {
39
+ return path;
40
+ }
41
+ const isExtensionsField = path[0] in recommended_extensions_json_schema_1.extensionsConfigurationSchema.properties;
42
+ if (isExtensionsField) {
43
+ return path;
44
+ }
45
+ return undefined;
46
+ }
47
+ };
48
+ FolderPreferenceProviderWithExtensions = __decorate([
49
+ (0, inversify_1.injectable)()
50
+ ], FolderPreferenceProviderWithExtensions);
51
+ exports.FolderPreferenceProviderWithExtensions = FolderPreferenceProviderWithExtensions;
52
+ let UserPreferenceProviderWithExtensions = class UserPreferenceProviderWithExtensions extends browser_1.UserPreferenceProvider {
53
+ getPath(preferenceName) {
54
+ const path = super.getPath(preferenceName);
55
+ if (this.section !== 'extensions' || !(path === null || path === void 0 ? void 0 : path.length)) {
56
+ return path;
57
+ }
58
+ const isExtensionsField = path[0] in recommended_extensions_json_schema_1.extensionsConfigurationSchema.properties;
59
+ if (isExtensionsField) {
60
+ return path;
61
+ }
62
+ return undefined;
63
+ }
64
+ };
65
+ UserPreferenceProviderWithExtensions = __decorate([
66
+ (0, inversify_1.injectable)()
67
+ ], UserPreferenceProviderWithExtensions);
68
+ exports.UserPreferenceProviderWithExtensions = UserPreferenceProviderWithExtensions;
69
+ let WorkspaceFilePreferenceProviderWithExtensions = class WorkspaceFilePreferenceProviderWithExtensions extends workspace_file_preference_provider_1.WorkspaceFilePreferenceProvider {
70
+ belongsInSection(firstSegment, remainder) {
71
+ if (firstSegment === 'extensions') {
72
+ return remainder in recommended_extensions_json_schema_1.extensionsConfigurationSchema.properties;
73
+ }
74
+ return this.configurations.isSectionName(firstSegment);
75
+ }
76
+ };
77
+ WorkspaceFilePreferenceProviderWithExtensions = __decorate([
78
+ (0, inversify_1.injectable)()
79
+ ], WorkspaceFilePreferenceProviderWithExtensions);
80
+ exports.WorkspaceFilePreferenceProviderWithExtensions = WorkspaceFilePreferenceProviderWithExtensions;
81
+ function bindPreferenceProviderOverrides(bind, unbind) {
82
+ unbind(browser_1.UserPreferenceProviderFactory);
83
+ unbind(browser_1.FolderPreferenceProviderFactory);
84
+ unbind(workspace_file_preference_provider_1.WorkspaceFilePreferenceProviderFactory);
85
+ (0, preference_bindings_1.bindFactory)(bind, browser_1.UserPreferenceProviderFactory, UserPreferenceProviderWithExtensions, section_preference_provider_1.SectionPreferenceProviderUri, section_preference_provider_1.SectionPreferenceProviderSection);
86
+ (0, preference_bindings_1.bindFactory)(bind, browser_1.FolderPreferenceProviderFactory, FolderPreferenceProviderWithExtensions, section_preference_provider_1.SectionPreferenceProviderUri, section_preference_provider_1.SectionPreferenceProviderSection, browser_1.FolderPreferenceProviderFolder);
87
+ bind(workspace_file_preference_provider_1.WorkspaceFilePreferenceProviderFactory).toFactory(ctx => (options) => {
88
+ const child = new inversify_1.Container({ defaultScope: 'Singleton' });
89
+ child.parent = ctx.container;
90
+ child.bind(workspace_file_preference_provider_1.WorkspaceFilePreferenceProvider).to(WorkspaceFilePreferenceProviderWithExtensions);
91
+ child.bind(workspace_file_preference_provider_1.WorkspaceFilePreferenceProviderOptions).toConstantValue(options);
92
+ return child.get(workspace_file_preference_provider_1.WorkspaceFilePreferenceProvider);
93
+ });
94
+ }
95
+ exports.bindPreferenceProviderOverrides = bindPreferenceProviderOverrides;
96
96
  //# sourceMappingURL=preference-provider-overrides.js.map
@@ -1,15 +1,15 @@
1
- import { InMemoryResources } from '@theia/core';
2
- import { JsonSchemaContribution, JsonSchemaRegisterContext } from '@theia/core/lib/browser/json-schema-store';
3
- import { IJSONSchema } from '@theia/core/lib/common/json-schema';
4
- import URI from '@theia/core/lib/common/uri';
5
- import { WorkspaceService } from '@theia/workspace/lib/browser';
6
- export declare const extensionsSchemaID = "vscode://schemas/extensions";
7
- export declare const extensionsConfigurationSchema: IJSONSchema;
8
- export declare class ExtensionSchemaContribution implements JsonSchemaContribution {
9
- protected readonly uri: URI;
10
- protected readonly inmemoryResources: InMemoryResources;
11
- protected readonly workspaceService: WorkspaceService;
12
- protected init(): void;
13
- registerSchemas(context: JsonSchemaRegisterContext): void;
14
- }
1
+ import { InMemoryResources } from '@theia/core';
2
+ import { JsonSchemaContribution, JsonSchemaRegisterContext } from '@theia/core/lib/browser/json-schema-store';
3
+ import { IJSONSchema } from '@theia/core/lib/common/json-schema';
4
+ import URI from '@theia/core/lib/common/uri';
5
+ import { WorkspaceService } from '@theia/workspace/lib/browser';
6
+ export declare const extensionsSchemaID = "vscode://schemas/extensions";
7
+ export declare const extensionsConfigurationSchema: IJSONSchema;
8
+ export declare class ExtensionSchemaContribution implements JsonSchemaContribution {
9
+ protected readonly uri: URI;
10
+ protected readonly inmemoryResources: InMemoryResources;
11
+ protected readonly workspaceService: WorkspaceService;
12
+ protected init(): void;
13
+ registerSchemas(context: JsonSchemaRegisterContext): void;
14
+ }
15
15
  //# sourceMappingURL=recommended-extensions-json-schema.d.ts.map
@@ -1,95 +1,95 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2021 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 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.ExtensionSchemaContribution = exports.extensionsConfigurationSchema = exports.extensionsSchemaID = void 0;
28
- const inversify_1 = require("@theia/core/shared/inversify");
29
- const core_1 = require("@theia/core");
30
- const uri_1 = require("@theia/core/lib/common/uri");
31
- const browser_1 = require("@theia/workspace/lib/browser");
32
- exports.extensionsSchemaID = 'vscode://schemas/extensions';
33
- exports.extensionsConfigurationSchema = {
34
- $id: exports.extensionsSchemaID,
35
- default: { recommendations: [] },
36
- type: 'object',
37
- properties: {
38
- recommendations: {
39
- title: 'A list of extensions recommended for users of this workspace. Should use the form "<publisher>.<extension name>"',
40
- type: 'array',
41
- items: {
42
- type: 'string',
43
- pattern: '^\\w[\\w-]+\\.\\w[\\w-]+$',
44
- patternErrorMessage: "Expected format '${publisher}.${name}'. Example: 'eclipse.theia'."
45
- },
46
- default: [],
47
- },
48
- unwantedRecommendations: {
49
- title: 'A list of extensions recommended by default that should not be recommended to users of this workspace. Should use the form "<publisher>.<extension name>"',
50
- type: 'array',
51
- items: {
52
- type: 'string',
53
- pattern: '^\\w[\\w-]+\\.\\w[\\w-]+$',
54
- patternErrorMessage: "Expected format '${publisher}.${name}'. Example: 'eclipse.theia'."
55
- },
56
- default: [],
57
- }
58
- },
59
- allowComments: true,
60
- allowTrailingCommas: true,
61
- };
62
- let ExtensionSchemaContribution = class ExtensionSchemaContribution {
63
- constructor() {
64
- this.uri = new uri_1.default(exports.extensionsSchemaID);
65
- }
66
- init() {
67
- this.inmemoryResources.add(this.uri, JSON.stringify(exports.extensionsConfigurationSchema));
68
- }
69
- registerSchemas(context) {
70
- context.registerSchema({
71
- fileMatch: ['extensions.json'],
72
- url: this.uri.toString(),
73
- });
74
- this.workspaceService.updateSchema('extensions', { $ref: this.uri.toString() });
75
- }
76
- };
77
- __decorate([
78
- (0, inversify_1.inject)(core_1.InMemoryResources),
79
- __metadata("design:type", core_1.InMemoryResources)
80
- ], ExtensionSchemaContribution.prototype, "inmemoryResources", void 0);
81
- __decorate([
82
- (0, inversify_1.inject)(browser_1.WorkspaceService),
83
- __metadata("design:type", browser_1.WorkspaceService)
84
- ], ExtensionSchemaContribution.prototype, "workspaceService", void 0);
85
- __decorate([
86
- (0, inversify_1.postConstruct)(),
87
- __metadata("design:type", Function),
88
- __metadata("design:paramtypes", []),
89
- __metadata("design:returntype", void 0)
90
- ], ExtensionSchemaContribution.prototype, "init", null);
91
- ExtensionSchemaContribution = __decorate([
92
- (0, inversify_1.injectable)()
93
- ], ExtensionSchemaContribution);
94
- exports.ExtensionSchemaContribution = ExtensionSchemaContribution;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2021 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 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.ExtensionSchemaContribution = exports.extensionsConfigurationSchema = exports.extensionsSchemaID = void 0;
28
+ const inversify_1 = require("@theia/core/shared/inversify");
29
+ const core_1 = require("@theia/core");
30
+ const uri_1 = require("@theia/core/lib/common/uri");
31
+ const browser_1 = require("@theia/workspace/lib/browser");
32
+ exports.extensionsSchemaID = 'vscode://schemas/extensions';
33
+ exports.extensionsConfigurationSchema = {
34
+ $id: exports.extensionsSchemaID,
35
+ default: { recommendations: [] },
36
+ type: 'object',
37
+ properties: {
38
+ recommendations: {
39
+ title: 'A list of extensions recommended for users of this workspace. Should use the form "<publisher>.<extension name>"',
40
+ type: 'array',
41
+ items: {
42
+ type: 'string',
43
+ pattern: '^\\w[\\w-]+\\.\\w[\\w-]+$',
44
+ patternErrorMessage: "Expected format '${publisher}.${name}'. Example: 'eclipse.theia'."
45
+ },
46
+ default: [],
47
+ },
48
+ unwantedRecommendations: {
49
+ title: 'A list of extensions recommended by default that should not be recommended to users of this workspace. Should use the form "<publisher>.<extension name>"',
50
+ type: 'array',
51
+ items: {
52
+ type: 'string',
53
+ pattern: '^\\w[\\w-]+\\.\\w[\\w-]+$',
54
+ patternErrorMessage: "Expected format '${publisher}.${name}'. Example: 'eclipse.theia'."
55
+ },
56
+ default: [],
57
+ }
58
+ },
59
+ allowComments: true,
60
+ allowTrailingCommas: true,
61
+ };
62
+ let ExtensionSchemaContribution = class ExtensionSchemaContribution {
63
+ constructor() {
64
+ this.uri = new uri_1.default(exports.extensionsSchemaID);
65
+ }
66
+ init() {
67
+ this.inmemoryResources.add(this.uri, JSON.stringify(exports.extensionsConfigurationSchema));
68
+ }
69
+ registerSchemas(context) {
70
+ context.registerSchema({
71
+ fileMatch: ['extensions.json'],
72
+ url: this.uri.toString(),
73
+ });
74
+ this.workspaceService.updateSchema('extensions', { $ref: this.uri.toString() });
75
+ }
76
+ };
77
+ __decorate([
78
+ (0, inversify_1.inject)(core_1.InMemoryResources),
79
+ __metadata("design:type", core_1.InMemoryResources)
80
+ ], ExtensionSchemaContribution.prototype, "inmemoryResources", void 0);
81
+ __decorate([
82
+ (0, inversify_1.inject)(browser_1.WorkspaceService),
83
+ __metadata("design:type", browser_1.WorkspaceService)
84
+ ], ExtensionSchemaContribution.prototype, "workspaceService", void 0);
85
+ __decorate([
86
+ (0, inversify_1.postConstruct)(),
87
+ __metadata("design:type", Function),
88
+ __metadata("design:paramtypes", []),
89
+ __metadata("design:returntype", void 0)
90
+ ], ExtensionSchemaContribution.prototype, "init", null);
91
+ ExtensionSchemaContribution = __decorate([
92
+ (0, inversify_1.injectable)()
93
+ ], ExtensionSchemaContribution);
94
+ exports.ExtensionSchemaContribution = ExtensionSchemaContribution;
95
95
  //# sourceMappingURL=recommended-extensions-json-schema.js.map
@@ -1,12 +1,12 @@
1
- import { PreferenceSchema } from '@theia/core/lib/browser';
2
- import { interfaces } from '@theia/core/shared/inversify';
3
- export interface RecommendedExtensions {
4
- recommendations?: string[];
5
- unwantedRecommendations?: string[];
6
- }
7
- export declare const recommendedExtensionsPreferencesSchema: PreferenceSchema;
8
- export declare const IGNORE_RECOMMENDATIONS_ID = "extensions.ignoreRecommendations";
9
- export declare const recommendedExtensionNotificationPreferencesSchema: PreferenceSchema;
10
- export declare const ExtensionNotificationPreferences: unique symbol;
11
- export declare function bindExtensionPreferences(bind: interfaces.Bind): void;
1
+ import { PreferenceSchema } from '@theia/core/lib/browser';
2
+ import { interfaces } from '@theia/core/shared/inversify';
3
+ export interface RecommendedExtensions {
4
+ recommendations?: string[];
5
+ unwantedRecommendations?: string[];
6
+ }
7
+ export declare const recommendedExtensionsPreferencesSchema: PreferenceSchema;
8
+ export declare const IGNORE_RECOMMENDATIONS_ID = "extensions.ignoreRecommendations";
9
+ export declare const recommendedExtensionNotificationPreferencesSchema: PreferenceSchema;
10
+ export declare const ExtensionNotificationPreferences: unique symbol;
11
+ export declare function bindExtensionPreferences(bind: interfaces.Bind): void;
12
12
  //# sourceMappingURL=recommended-extensions-preference-contribution.d.ts.map