717
};
718
}
720
>
delete manifest.__metadata;
721
>
const id = getGalleryExtensionId(manifest.publisher, manifest.name);
722
>
const identifier = metadata?.id ? { id, uuid: metadata.id } : { id };
723
>
const type = metadata?.isSystem ? ExtensionType.System : input.type;
724
>
const isBuiltin = type === ExtensionType.System || !!metadata?.isBuiltin;
725
>
try {
726
>
manifest = await this.translateManifest(input.location, manifest, ExtensionScannerInput.createNlsConfiguration(input));
727
>
} catch (error) {
728
this.logService.warn('Failed to translate manifest', getErrorMessage(error));
729
}
731
>
type,
732
>
identifier,
733
>
manifest,
734
>
location: input.location,
735
>
isBuiltin,
736
>
targetPlatform: metadata?.targetPlatform ?? TargetPlatform.UNDEFINED,
737
>
publisherDisplayName: metadata?.publisherDisplayName,
738
>
metadata,
739
>
isValid,
740
>
validations,
741
>
preRelease: !!metadata?.preRelease,
742
>
forceAutoUpdate: this.productBuiltInExtensionsEnabledWithAutoUpdates.has(id.toLowerCase()) && this.productQuality === 'stable',
743
>
};
744
>
if (input.validate) {
745
>
extension = this.validate(extension, input);
746
>
}
747
>
if (manifest.enabledApiProposals) {
748
manifest.originalEnabledApiProposals = manifest.enabledApiProposals;
749
manifest.enabledApiProposals = parseEnabledApiProposalNames([...manifest.enabledApiProposals]);
750
}
752
>
}
753
754
validate(extension: IRelaxedScannedExtension, input: ExtensionScannerInput): IRelaxedScannedExtension {
756
>
const validations = validateExtensionManifest(input.productVersion, input.productDate, input.location, extension.manifest, extension.isBuiltin);
757
>
for (const [severity, message] of validations) {
758
if (severity === Severity.Error) {
759
isValid = false;