src/vs/workbench/services/extensionManagement/common/webExtensionsScannerService.ts/WebExtensionsScannerService/toExtension
class WebExtensionsScannerService:	private async toExtension(webExtension: IWebExtension, isBuiltin: boolean): Promise<IExtension> {
		const context = await this.requestService.request({ type: 'GET', url: joinPath(webExtension.location, 'package.json').toString() }, CancellationToken.None);
		if (!isSuccess(context)) {
			throw new Error(`Error while fetching package.json for extension '${webExtension.identifier.id}'. Server returned ${context.res.statusCode}`);
		}
		const content = await asText(context);
		if (!content) {
			throw new Error(`Error while fetching package.json for extension '${webExtension.identifier.id}'. Server returned no content`);
		}

		let manifest: IExtensionManifest = JSON.parse(content);
		if (webExtension.packageNLSUri) {
			manifest = await this.translateManifest(manifest, webExtension.packageNLSUri);
		}

		return {
			identifier: webExtension.identifier,
			location: webExtension.location,
			manifest,
			type: ExtensionType.User,
			isBuiltin,
			readmeUrl: webExtension.readmeUri,
			changelogUrl: webExtension.changelogUri,
		};
	}