src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts/WebExtensionsScannerService/toScannedExtension
class WebExtensionsScannerService:	private async toScannedExtension(webExtension: IWebExtension, isBuiltin: boolean, type: ExtensionType = ExtensionType.User): Promise<IScannedExtension> {
		const url = joinPath(webExtension.location, 'package.json');

		const validations: [Severity, string][] = [];
		let content: string | undefined;
		try {
			content = await this.extensionResourceLoaderService.readExtensionResource(url);
			if (!content) {
				validations.push([Severity.Error, `Error while fetching package.json from the location '${url}'. Server returned no content`]);
			}
		} catch (error) {
			validations.push([Severity.Error, `Error while fetching package.json from the location '${url}'. ${getErrorMessage(error)}`]);
		}

		let manifest: IExtensionManifest | null = null;
		if (content) {
			try {
				manifest = JSON.parse(content);
			} catch (error) {
				validations.push([Severity.Error, `Error while parsing package.json. ${getErrorMessage(error)}`]);
			}
		}

		if (!manifest) {
			const [publisher, name] = webExtension.identifier.id.split('.');
			manifest = {
				name,
				publisher,
				version: webExtension.version,
				engines: { vscode: '*' },
			};
		}

		const packageNLSUri = webExtension.packageNLSUris?.get(Language.value());
		if (packageNLSUri || webExtension.fallbackPackageNLSUri) {
			manifest = packageNLSUri
				? await this.translateManifest(manifest, packageNLSUri, webExtension.fallbackPackageNLSUri)
				: await this.translateManifest(manifest, webExtension.fallbackPackageNLSUri!);
		}

		const uuid = (<IGalleryMetadata | undefined>webExtension.metadata)?.id;

		validations.push(...validateExtensionManifest(this.productService.version, this.productService.date, webExtension.location, manifest, false));
		let isValid = true;
		for (const [severity, message] of validations) {
			if (severity === Severity.Error) {
				isValid = false;
				this.logService.error(message);
			}
		}

		return {
			identifier: { id: webExtension.identifier.id, uuid: webExtension.identifier.uuid || uuid },
			location: webExtension.location,
			manifest,
			type,
			isBuiltin,
			readmeUrl: webExtension.readmeUri,
			changelogUrl: webExtension.changelogUri,
			metadata: webExtension.metadata,
			targetPlatform: TargetPlatform.WEB,
			validations,
			isValid
		};
	}