@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
@@ -1,63 +1,63 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2021 Ericsson and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { nls } from '@theia/core/lib/common/nls';
18
- import { codicon } from '@theia/core/lib/browser';
19
- import { Command } from '@theia/core/lib/common';
20
-
21
- export namespace VSXExtensionsCommands {
22
-
23
- const EXTENSIONS_CATEGORY = 'Extensions';
24
-
25
- export const CLEAR_ALL = Command.toDefaultLocalizedCommand({
26
- id: 'vsxExtensions.clearAll',
27
- category: EXTENSIONS_CATEGORY,
28
- label: 'Clear Search Results',
29
- iconClass: codicon('clear-all')
30
- });
31
- export const INSTALL_FROM_VSIX: Command & { dialogLabel: string } = {
32
- id: 'vsxExtensions.installFromVSIX',
33
- category: nls.localizeByDefault(EXTENSIONS_CATEGORY),
34
- originalCategory: EXTENSIONS_CATEGORY,
35
- originalLabel: 'Install from VSIX...',
36
- label: nls.localizeByDefault('Install from VSIX') + '...',
37
- dialogLabel: nls.localizeByDefault('Install from VSIX')
38
- };
39
- export const INSTALL_ANOTHER_VERSION: Command = {
40
- id: 'vsxExtensions.installAnotherVersion'
41
- };
42
- export const COPY: Command = {
43
- id: 'vsxExtensions.copy'
44
- };
45
- export const COPY_EXTENSION_ID: Command = {
46
- id: 'vsxExtensions.copyExtensionId'
47
- };
48
- export const SHOW_BUILTINS = Command.toDefaultLocalizedCommand({
49
- id: 'vsxExtension.showBuiltins',
50
- label: 'Show Built-in Extensions',
51
- category: EXTENSIONS_CATEGORY,
52
- });
53
- export const SHOW_INSTALLED = Command.toDefaultLocalizedCommand({
54
- id: 'vsxExtension.showInstalled',
55
- label: 'Show Installed Extensions',
56
- category: EXTENSIONS_CATEGORY,
57
- });
58
- export const SHOW_RECOMMENDATIONS = Command.toDefaultLocalizedCommand({
59
- id: 'vsxExtension.showRecommendations',
60
- label: 'Show Recommended Extensions',
61
- category: EXTENSIONS_CATEGORY,
62
- });
63
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2021 Ericsson and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { nls } from '@theia/core/lib/common/nls';
18
+ import { codicon } from '@theia/core/lib/browser';
19
+ import { Command } from '@theia/core/lib/common';
20
+
21
+ export namespace VSXExtensionsCommands {
22
+
23
+ const EXTENSIONS_CATEGORY = 'Extensions';
24
+
25
+ export const CLEAR_ALL = Command.toDefaultLocalizedCommand({
26
+ id: 'vsxExtensions.clearAll',
27
+ category: EXTENSIONS_CATEGORY,
28
+ label: 'Clear Search Results',
29
+ iconClass: codicon('clear-all')
30
+ });
31
+ export const INSTALL_FROM_VSIX: Command & { dialogLabel: string } = {
32
+ id: 'vsxExtensions.installFromVSIX',
33
+ category: nls.localizeByDefault(EXTENSIONS_CATEGORY),
34
+ originalCategory: EXTENSIONS_CATEGORY,
35
+ originalLabel: 'Install from VSIX...',
36
+ label: nls.localizeByDefault('Install from VSIX') + '...',
37
+ dialogLabel: nls.localizeByDefault('Install from VSIX')
38
+ };
39
+ export const INSTALL_ANOTHER_VERSION: Command = {
40
+ id: 'vsxExtensions.installAnotherVersion'
41
+ };
42
+ export const COPY: Command = {
43
+ id: 'vsxExtensions.copy'
44
+ };
45
+ export const COPY_EXTENSION_ID: Command = {
46
+ id: 'vsxExtensions.copyExtensionId'
47
+ };
48
+ export const SHOW_BUILTINS = Command.toDefaultLocalizedCommand({
49
+ id: 'vsxExtension.showBuiltins',
50
+ label: 'Show Built-in Extensions',
51
+ category: EXTENSIONS_CATEGORY,
52
+ });
53
+ export const SHOW_INSTALLED = Command.toDefaultLocalizedCommand({
54
+ id: 'vsxExtension.showInstalled',
55
+ label: 'Show Installed Extensions',
56
+ category: EXTENSIONS_CATEGORY,
57
+ });
58
+ export const SHOW_RECOMMENDATIONS = Command.toDefaultLocalizedCommand({
59
+ id: 'vsxExtension.showRecommendations',
60
+ label: 'Show Recommended Extensions',
61
+ category: EXTENSIONS_CATEGORY,
62
+ });
63
+ }
@@ -1,42 +1,42 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2020 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { injectable } from '@theia/core/shared/inversify';
18
- import URI from '@theia/core/lib/common/uri';
19
- import { WidgetOpenHandler } from '@theia/core/lib/browser';
20
- import { VSXExtensionOptions } from './vsx-extension';
21
- import { VSCodeExtensionUri } from '@theia/plugin-ext-vscode/lib/common/plugin-vscode-uri';
22
- import { VSXExtensionEditor } from './vsx-extension-editor';
23
-
24
- @injectable()
25
- export class VSXExtensionEditorManager extends WidgetOpenHandler<VSXExtensionEditor> {
26
-
27
- readonly id = VSXExtensionEditor.ID;
28
-
29
- canHandle(uri: URI): number {
30
- const id = VSCodeExtensionUri.toId(uri);
31
- return !!id ? 500 : 0;
32
- }
33
-
34
- protected createWidgetOptions(uri: URI): VSXExtensionOptions {
35
- const id = VSCodeExtensionUri.toId(uri);
36
- if (!id) {
37
- throw new Error('Invalid URI: ' + uri.toString());
38
- }
39
- return { id };
40
- }
41
-
42
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2020 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { injectable } from '@theia/core/shared/inversify';
18
+ import URI from '@theia/core/lib/common/uri';
19
+ import { WidgetOpenHandler } from '@theia/core/lib/browser';
20
+ import { VSXExtensionOptions } from './vsx-extension';
21
+ import { VSCodeExtensionUri } from '@theia/plugin-ext-vscode/lib/common/plugin-vscode-uri';
22
+ import { VSXExtensionEditor } from './vsx-extension-editor';
23
+
24
+ @injectable()
25
+ export class VSXExtensionEditorManager extends WidgetOpenHandler<VSXExtensionEditor> {
26
+
27
+ readonly id = VSXExtensionEditor.ID;
28
+
29
+ canHandle(uri: URI): number {
30
+ const id = VSCodeExtensionUri.toId(uri);
31
+ return !!id ? 500 : 0;
32
+ }
33
+
34
+ protected createWidgetOptions(uri: URI): VSXExtensionOptions {
35
+ const id = VSCodeExtensionUri.toId(uri);
36
+ if (!id) {
37
+ throw new Error('Invalid URI: ' + uri.toString());
38
+ }
39
+ return { id };
40
+ }
41
+
42
+ }
@@ -1,96 +1,96 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2020 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import * as React from '@theia/core/shared/react';
18
- import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
19
- import { ReactWidget, Message, Widget, codicon } from '@theia/core/lib/browser';
20
- import { VSXExtension, VSXExtensionEditorComponent } from './vsx-extension';
21
- import { VSXExtensionsModel } from './vsx-extensions-model';
22
- import { Deferred } from '@theia/core/lib/common/promise-util';
23
- import { nls } from '@theia/core/lib/common/nls';
24
-
25
- @injectable()
26
- export class VSXExtensionEditor extends ReactWidget {
27
-
28
- static ID = 'vsx-extension-editor';
29
-
30
- @inject(VSXExtension)
31
- protected readonly extension: VSXExtension;
32
-
33
- @inject(VSXExtensionsModel)
34
- protected readonly model: VSXExtensionsModel;
35
-
36
- protected readonly deferredScrollContainer = new Deferred<HTMLElement>();
37
-
38
- @postConstruct()
39
- protected init(): void {
40
- this.addClass('theia-vsx-extension-editor');
41
- this.id = VSXExtensionEditor.ID + ':' + this.extension.id;
42
- this.title.closable = true;
43
- this.updateTitle();
44
- this.title.iconClass = codicon('list-selection');
45
- this.node.tabIndex = -1;
46
- this.update();
47
- this.toDispose.push(this.model.onDidChange(() => this.update()));
48
- }
49
-
50
- override getScrollContainer(): Promise<HTMLElement> {
51
- return this.deferredScrollContainer.promise;
52
- }
53
-
54
- protected override onActivateRequest(msg: Message): void {
55
- super.onActivateRequest(msg);
56
- this.node.focus();
57
- }
58
-
59
- protected override onUpdateRequest(msg: Message): void {
60
- super.onUpdateRequest(msg);
61
- this.updateTitle();
62
- }
63
-
64
- protected override onAfterShow(msg: Message): void {
65
- super.onAfterShow(msg);
66
- this.update();
67
- }
68
-
69
- protected updateTitle(): void {
70
- const label = nls.localizeByDefault('Extension: {0}', (this.extension.displayName || this.extension.name));
71
- this.title.label = label;
72
- this.title.caption = label;
73
- }
74
-
75
- protected override onResize(msg: Widget.ResizeMessage): void {
76
- super.onResize(msg);
77
- this.update();
78
- };
79
-
80
- protected resolveScrollContainer = (element: VSXExtensionEditorComponent | null) => {
81
- if (!element) {
82
- this.deferredScrollContainer.reject(new Error('element is null'));
83
- } else if (!element.scrollContainer) {
84
- this.deferredScrollContainer.reject(new Error('element.scrollContainer is undefined'));
85
- } else {
86
- this.deferredScrollContainer.resolve(element.scrollContainer);
87
- }
88
- };
89
-
90
- protected render(): React.ReactNode {
91
- return <VSXExtensionEditorComponent
92
- ref={this.resolveScrollContainer}
93
- extension={this.extension}
94
- />;
95
- }
96
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2020 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import * as React from '@theia/core/shared/react';
18
+ import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
19
+ import { ReactWidget, Message, Widget, codicon } from '@theia/core/lib/browser';
20
+ import { VSXExtension, VSXExtensionEditorComponent } from './vsx-extension';
21
+ import { VSXExtensionsModel } from './vsx-extensions-model';
22
+ import { Deferred } from '@theia/core/lib/common/promise-util';
23
+ import { nls } from '@theia/core/lib/common/nls';
24
+
25
+ @injectable()
26
+ export class VSXExtensionEditor extends ReactWidget {
27
+
28
+ static ID = 'vsx-extension-editor';
29
+
30
+ @inject(VSXExtension)
31
+ protected readonly extension: VSXExtension;
32
+
33
+ @inject(VSXExtensionsModel)
34
+ protected readonly model: VSXExtensionsModel;
35
+
36
+ protected readonly deferredScrollContainer = new Deferred<HTMLElement>();
37
+
38
+ @postConstruct()
39
+ protected init(): void {
40
+ this.addClass('theia-vsx-extension-editor');
41
+ this.id = VSXExtensionEditor.ID + ':' + this.extension.id;
42
+ this.title.closable = true;
43
+ this.updateTitle();
44
+ this.title.iconClass = codicon('list-selection');
45
+ this.node.tabIndex = -1;
46
+ this.update();
47
+ this.toDispose.push(this.model.onDidChange(() => this.update()));
48
+ }
49
+
50
+ override getScrollContainer(): Promise<HTMLElement> {
51
+ return this.deferredScrollContainer.promise;
52
+ }
53
+
54
+ protected override onActivateRequest(msg: Message): void {
55
+ super.onActivateRequest(msg);
56
+ this.node.focus();
57
+ }
58
+
59
+ protected override onUpdateRequest(msg: Message): void {
60
+ super.onUpdateRequest(msg);
61
+ this.updateTitle();
62
+ }
63
+
64
+ protected override onAfterShow(msg: Message): void {
65
+ super.onAfterShow(msg);
66
+ this.update();
67
+ }
68
+
69
+ protected updateTitle(): void {
70
+ const label = nls.localizeByDefault('Extension: {0}', (this.extension.displayName || this.extension.name));
71
+ this.title.label = label;
72
+ this.title.caption = label;
73
+ }
74
+
75
+ protected override onResize(msg: Widget.ResizeMessage): void {
76
+ super.onResize(msg);
77
+ this.update();
78
+ };
79
+
80
+ protected resolveScrollContainer = (element: VSXExtensionEditorComponent | null) => {
81
+ if (!element) {
82
+ this.deferredScrollContainer.reject(new Error('element is null'));
83
+ } else if (!element.scrollContainer) {
84
+ this.deferredScrollContainer.reject(new Error('element.scrollContainer is undefined'));
85
+ } else {
86
+ this.deferredScrollContainer.resolve(element.scrollContainer);
87
+ }
88
+ };
89
+
90
+ protected render(): React.ReactNode {
91
+ return <VSXExtensionEditorComponent
92
+ ref={this.resolveScrollContainer}
93
+ extension={this.extension}
94
+ />;
95
+ }
96
+ }