strictKnownMarketplaces.ts ×10

Frontier kind: Code frontier

unlabeled · c_41bb8707dee0

9 tests · 22238 LOC · 121 files · introduces 0 tests · 15 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges15 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2507 ranges22238 lines · 121 files · Browse complete extent
All tests (intent)
9 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

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 native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 15 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.ts 15 introduced LOC · 10 ranges

Open complete file

53 return false;
54 }
55 > return allowlist.some(entry => matchesAllowlistEntry(entry, ref)); strictKnownMarketplaces.ts
56 > }
57
58 > function matchesAllowlistEntry(entry: IStrictMarketplaceSource, ref: IMarketplaceReference): boolean { strictKnownMarketplaces.ts
59 > switch (entry.source) {
60 > case 'github': {
61 // VS Code marketplace references do not model an in-repo path, so an
62 // entry that pins a `path` can never match.
67 return !!candidate && candidate.canonicalId === ref.canonicalId;
68 }
69 > case 'git': { strictKnownMarketplaces.ts
70 if (typeof entry.url !== 'string' || entry.path !== undefined) {
71 return false;
74 return !!candidate && candidate.canonicalId === ref.canonicalId;
75 }
76 > case 'url': { strictKnownMarketplaces.ts
77 if (typeof entry.url !== 'string') {
78 return false;
81 return !!candidate && candidate.canonicalId === ref.canonicalId;
82 }
83 > case 'npm': { strictKnownMarketplaces.ts
84 // npm is not a supported marketplace source in VS Code.
85 return false;
86 }
87 > case 'file': strictKnownMarketplaces.ts
88 > case 'directory': {
89 if (ref.kind !== MarketplaceReferenceKind.LocalFileUri || !ref.localRepositoryUri || typeof entry.path !== 'string') {
90 return false;
94 return isEqual(ref.localRepositoryUri, URI.file(entry.path));
95 }
96 > case 'hostPattern': { strictKnownMarketplaces.ts
97 if (typeof entry.hostPattern !== 'string') {
98 return false;
101 return !!host && testPattern(entry.hostPattern, host);
102 }
103 > case 'pathPattern': { strictKnownMarketplaces.ts
104 if (typeof entry.pathPattern !== 'string' || ref.kind !== MarketplaceReferenceKind.LocalFileUri || !ref.localRepositoryUri) {
105 return false;
107 return testPattern(entry.pathPattern, ref.localRepositoryUri.fsPath);
108 }
110 return false;
112 > }
113
114 /** Appends (or replaces) a `#ref` fragment on a marketplace value. */