src/vs/platform/extensionManagement/common/extensionGalleryManifestService.ts

228 LOC · 44 covered · 184 uncovered · 2 ranges · 20 concepts · 1 introducers · 7 tests

File neighbourhood

The centred file is linked to every concept that introduces one of its ranges, every test that runs code from the file, and the gray connector concepts standing between those tests and the file's own introducer concepts. Undirected links join concepts to every file where they introduce source and concepts to the tests they introduce; arrows show specialization between the displayed concepts and bridge only concepts omitted from this view. Concept colors match the source ranges below; connector concepts have no source color and are shown in gray.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the file

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the related-file, concept, and source links on this page.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the filesrc/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts · 171 LOCcommon/extensionResource…src/vs/platform/extensionResourceLoader/common/extensionResourceLoaderService.ts · 46 LOCcommon/extensionResource…src/vs/platform/theme/common/tokenClassificationRegistry.ts · 632 LOCcommon/tokenClassificati…src/vs/workbench/services/themes/common/colorThemeData.ts · 1083 LOCcommon/colorThemeData.tssrc/vs/workbench/services/themes/common/plistParser.ts · 492 LOCcommon/plistParser.tssrc/vs/workbench/services/themes/common/textMateScopeMatcher.ts · 134 LOCcommon/textMateScopeMatc…src/vs/workbench/services/themes/common/themeCompatibility.ts · 76 LOCcommon/themeCompatibilit…colorThemeData.ts ×16 · 64 introduced LOCcolorThemeData.ts ×16tokenClassificationRegistry.ts ×1 · 3 introduced LOCtokenClassificationRegis…tokenClassificationRegistry.ts ×2 · 7 introduced LOCtokenClassificationRegis…tokenStyleResolving.test|title=Themes - TokenStyleResolving language|occurrence=1 · 0 introduced LOCtokenStyleResolving.test…colorThemeData.ts ×1 · 2 introduced LOCcolorThemeData.ts ×1colorThemeData.ts ×12 · 57 introduced LOCcolorThemeData.ts ×12tokenClassificationRegistry.ts ×2 · 6 introduced LOCtokenClassificationRegis…colorThemeData.ts ×5 · 21 introduced LOCcolorThemeData.ts ×5colorThemeData.ts ×1 · 6 introduced LOCcolorThemeData.ts ×1colorThemeData.ts ×33 · 242 introduced LOCcolorThemeData.ts ×33colorThemeData.ts ×2 · 5 introduced LOCcolorThemeData.ts ×2tokenStyleResolving.test|title=Themes - TokenStyleResolving resolveScopes - match most specific|occurrence=1 · 0 introduced LOCtokenStyleResolving.test…colorThemeData.ts ×5 · 33 introduced LOCcolorThemeData.ts ×5colorThemeData.ts ×1 · 4 introduced LOCcolorThemeData.ts ×1tokenClassificationRegistry.ts ×1 · 16 introduced LOCtokenClassificationRegis…colorThemeData.ts ×1 · 1 introduced LOCcolorThemeData.ts ×1colorThemeData.ts ×13 · 114 introduced LOCcolorThemeData.ts ×13colorThemeData.ts ×1 · 1 introduced LOCcolorThemeData.ts ×1colorThemeData.ts ×4 · 15 introduced LOCcolorThemeData.ts ×4colorThemeData.ts ×57 · 483 introduced LOCcolorThemeData.ts ×57tokenStyleResolving.test|title=Themes - TokenStyleResolving color defaults|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving color defaults|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving language - scope resolving|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving language - scope resolving|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving language|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving language|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving resolveScopes - match most specific|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving resolveScopes - match most specific|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving resolveScopes|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving resolveScopes|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving rule matching|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving rule matching|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving super type|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving super type|occurrence=1tokenStyleResolving.test…Focused file · src/vs/platform/extensionManagement/common/extensionGalleryManifestService.ts · 228 LOCcommon/extensionGalleryM…

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the related-file, concept, and source links on this page while the interactive map is unavailable.

1 > /*--------------------------------------------------------------------------------------------- colorThemeData.ts ×57
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import { Event } from '../../../base/common/event.js';
7 > import { Disposable } from '../../../base/common/lifecycle.js';
8 > import { IProductService } from '../../product/common/productService.js';
9 > import { ExtensionGalleryResourceType, Flag, IExtensionGalleryManifest, IExtensionGalleryManifestService, ExtensionGalleryManifestStatus } from './extensionGalleryManifest.js';
10 > import { FilterType, SortBy } from './extensionManagement.js';
11 >
12 > type ExtensionGalleryConfig = {
13 > readonly serviceUrl: string;
14 > readonly itemUrl: string;
15 > readonly publisherUrl: string;
16 > readonly resourceUrlTemplate: string;
17 > readonly extensionUrlTemplate: string;
18 > readonly controlUrl: string;
19 > readonly nlsBaseUrl: string;
20 > };
21 >
22 > export class ExtensionGalleryManifestService extends Disposable implements IExtensionGalleryManifestService {
23 >
24 > readonly _serviceBrand: undefined;
25 > readonly onDidChangeExtensionGalleryManifest = Event.None;
26 > readonly onDidChangeExtensionGalleryManifestStatus = Event.None;
27 >
28 > get extensionGalleryManifestStatus(): ExtensionGalleryManifestStatus {
29 > return !!this.productService.extensionsGallery?.serviceUrl ? ExtensionGalleryManifestStatus.Available : ExtensionGalleryManifestStatus.Unavailable;
30 > }
31 >
32 > constructor(
33 > @IProductService protected readonly productService: IProductService,
34 > ) {
35 > super();
36 > }
37 >
38 > async getExtensionGalleryManifest(): Promise<IExtensionGalleryManifest | null> {
39 > const extensionsGallery = this.productService.extensionsGallery as ExtensionGalleryConfig | undefined;
40 > if (!extensionsGallery?.serviceUrl) {
41 > return null;
42 > }
43
44 const resources = [
45 {
46 id: `${extensionsGallery.serviceUrl}/extensionquery`,
47 type: ExtensionGalleryResourceType.ExtensionQueryService
48 },
49 {
50 id: `${extensionsGallery.serviceUrl}/vscode/{publisher}/{name}/latest`,
51 type: ExtensionGalleryResourceType.ExtensionLatestVersionUri
52 },
53 {
54 id: `${extensionsGallery.serviceUrl}/publishers/{publisher}/extensions/{name}/{version}/stats?statType={statTypeName}`,
55 type: ExtensionGalleryResourceType.ExtensionStatisticsUri
56 },
57 ];
58
59 if (extensionsGallery.publisherUrl) {
60 resources.push({
61 id: `${extensionsGallery.publisherUrl}/{publisher}`,
62 type: ExtensionGalleryResourceType.PublisherViewUri
63 });
64 }
65
66 if (extensionsGallery.itemUrl) {
67 resources.push({
68 id: `${extensionsGallery.itemUrl}?itemName={publisher}.{name}`,
69 type: ExtensionGalleryResourceType.ExtensionDetailsViewUri
70 });
71 resources.push({
72 id: `${extensionsGallery.itemUrl}?itemName={publisher}.{name}&ssr=false#review-details`,
73 type: ExtensionGalleryResourceType.ExtensionRatingViewUri
74 });
75 }
76
77 if (extensionsGallery.resourceUrlTemplate) {
78 resources.push({
79 id: extensionsGallery.resourceUrlTemplate,
80 type: ExtensionGalleryResourceType.ExtensionResourceUri
81 });
82 }
83
84 const filtering = [
85 {
86 name: FilterType.Tag,
87 value: 1,
88 },
89 {
90 name: FilterType.ExtensionId,
91 value: 4,
92 },
93 {
94 name: FilterType.Category,
95 value: 5,
96 },
97 {
98 name: FilterType.ExtensionName,
99 value: 7,
100 },
101 {
102 name: FilterType.Target,
103 value: 8,
104 },
105 {
106 name: FilterType.Featured,
107 value: 9,
108 },
109 {
110 name: FilterType.SearchText,
111 value: 10,
112 },
113 {
114 name: FilterType.ExcludeWithFlags,
115 value: 12,
116 },
117 ];
118
119 const sorting = [
120 {
121 name: SortBy.NoneOrRelevance,
122 value: 0,
123 },
124 {
125 name: SortBy.LastUpdatedDate,
126 value: 1,
127 },
128 {
129 name: SortBy.Title,
130 value: 2,
131 },
132 {
133 name: SortBy.PublisherName,
134 value: 3,
135 },
136 {
137 name: SortBy.InstallCount,
138 value: 4,
139 },
140 {
141 name: SortBy.AverageRating,
142 value: 6,
143 },
144 {
145 name: SortBy.PublishedDate,
146 value: 10,
147 },
148 {
149 name: SortBy.WeightedRating,
150 value: 12,
151 },
152 ];
153
154 const flags = [
155 {
156 name: Flag.None,
157 value: 0x0,
158 },
159 {
160 name: Flag.IncludeVersions,
161 value: 0x1,
162 },
163 {
164 name: Flag.IncludeFiles,
165 value: 0x2,
166 },
167 {
168 name: Flag.IncludeCategoryAndTags,
169 value: 0x4,
170 },
171 {
172 name: Flag.IncludeSharedAccounts,
173 value: 0x8,
174 },
175 {
176 name: Flag.IncludeVersionProperties,
177 value: 0x10,
178 },
179 {
180 name: Flag.ExcludeNonValidated,
181 value: 0x20,
182 },
183 {
184 name: Flag.IncludeInstallationTargets,
185 value: 0x40,
186 },
187 {
188 name: Flag.IncludeAssetUri,
189 value: 0x80,
190 },
191 {
192 name: Flag.IncludeStatistics,
193 value: 0x100,
194 },
195 {
196 name: Flag.IncludeLatestVersionOnly,
197 value: 0x200,
198 },
199 {
200 name: Flag.Unpublished,
201 value: 0x1000,
202 },
203 {
204 name: Flag.IncludeNameConflictInfo,
205 value: 0x8000,
206 },
207 {
208 name: Flag.IncludeLatestPrereleaseAndStableVersionOnly,
209 value: 0x10000,
210 },
211 ];
212
213 return {
214 version: '',
215 resources,
216 capabilities: {
217 extensionQuery: {
218 filtering,
219 sorting,
220 flags,
221 },
222 signing: {
223 allPublicRepositorySigned: true,
224 }
225 }
226 };
228 > }