src/vs/platform/extensionManagement/common/extensionsScannerService.ts/ExtensionsScanner/scanExtension
class ExtensionsScanner:	async scanExtension(input: ExtensionScannerInput, metadata?: Metadata): Promise<IRelaxedScannedExtension | null> {
		try {
			let manifest = await this.scanExtensionManifest(input.location);
			if (manifest) {
				// allow publisher to be undefined to make the initial extension authoring experience smoother
				if (!manifest.publisher) {
					manifest.publisher = UNDEFINED_PUBLISHER;
				}
				metadata = metadata ?? manifest.__metadata;
				delete manifest.__metadata;
				const id = getGalleryExtensionId(manifest.publisher, manifest.name);
				const identifier = metadata?.id ? { id, uuid: metadata.id } : { id };
				const type = metadata?.isSystem ? ExtensionType.System : input.type;
				const isBuiltin = type === ExtensionType.System || !!metadata?.isBuiltin;
				manifest = await this.translateManifest(input.location, manifest, ExtensionScannerInput.createNlsConfiguration(input));
				const extension = {
					type,
					identifier,
					manifest,
					location: input.location,
					isBuiltin,
					targetPlatform: metadata?.targetPlatform ?? TargetPlatform.UNDEFINED,
					metadata,
					isValid: true,
					validations: []
				};
				return input.validate ? this.validate(extension, input) : extension;
			}
		} catch (e) {
			if (input.type !== ExtensionType.System) {
				this.logService.error(e);
			}
		}
		return null;
	}