src/vs/platform/extensionManagement/node/extensionManagementUtil.ts

37 LOC · 13 covered · 24 uncovered · 2 ranges · 5 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/extensionManagement/common/abstractExtensionManagementService.ts · 1141 LOCcommon/abstractExtension…src/vs/platform/extensionManagement/node/extensionDownloader.ts · 300 LOCnode/extensionDownloader…src/vs/platform/extensionManagement/node/extensionSignatureVerificationService.ts · 136 LOCnode/extensionSignatureV…extensionDownloader.ts ×10 · 52 introduced LOCextensionDownloader.ts ×…extensionDownloader.ts ×1 · 2 introduced LOCextensionDownloader.ts ×…extensionDownloader.ts ×1 · 2 introduced LOCextensionDownloader.ts ×…extensionDownloader.ts ×1 · 2 introduced LOCextensionDownloader.ts ×…abstractExtensionManagementService.ts ×32 · 395 introduced LOCabstractExtensionManagem…extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully for an unsigned extension even when signature verification throws error|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/extensionManagement/test/node/extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully for an unsigned extension even when signature verification throws error|occurrence=1extensionDownloader.test…extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully for unsigned extension|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/extensionManagement/test/node/extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully for unsigned extension|occurrence=1extensionDownloader.test…extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully if verification fails to execute|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/extensionManagement/test/node/extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully if verification fails to execute|occurrence=1extensionDownloader.test…extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully if verification fails|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/extensionManagement/test/node/extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully if verification fails|occurrence=1extensionDownloader.test…extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully if verification is disabled because the module is not loaded|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/extensionManagement/test/node/extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully if verification is disabled because the module is not loaded|occurrence=1extensionDownloader.test…extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully if verification is disabled by options|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/extensionManagement/test/node/extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully if verification is disabled by options|occurrence=1extensionDownloader.test…extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully if verification succeeds|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/extensionManagement/test/node/extensionDownloader.test|title=ExtensionDownloader Tests download completes successfully if verification succeeds|occurrence=1extensionDownloader.test…Focused file · src/vs/platform/extensionManagement/node/extensionManagementUtil.ts · 37 LOCnode/extensionManagement…

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 > /*--------------------------------------------------------------------------------------------- abstractExtensionManagementService.ts ×32
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 { buffer, ExtractError } from '../../../base/node/zip.js';
7 > import { localize } from '../../../nls.js';
8 > import { toExtensionManagementError } from '../common/abstractExtensionManagementService.js';
9 > import { ExtensionManagementError, ExtensionManagementErrorCode } from '../common/extensionManagement.js';
10 > import { IExtensionManifest } from '../../extensions/common/extensions.js';
11 >
12 > export function fromExtractError(e: Error): ExtensionManagementError {
13 let errorCode = ExtensionManagementErrorCode.Extract;
14 if (e instanceof ExtractError) {
15 if (e.type === 'CorruptZip') {
16 errorCode = ExtensionManagementErrorCode.CorruptZip;
17 } else if (e.type === 'Incomplete') {
18 errorCode = ExtensionManagementErrorCode.IncompleteZip;
19 }
20 }
21 return toExtensionManagementError(e, errorCode);
22 }
24 export async function getManifest(vsixPath: string): Promise<IExtensionManifest> {
25 let data;
26 try {
27 data = await buffer(vsixPath, 'extension/package.json');
28 } catch (e) {
29 throw fromExtractError(e);
30 }
31
32 try {
33 return JSON.parse(data.toString('utf8'));
34 } catch (err) {
35 throw new ExtensionManagementError(localize('invalidManifest', "VSIX invalid: package.json is not a JSON file."), ExtensionManagementErrorCode.Invalid);
36 }
37 }