605
606
async scanExtensions(input: ExtensionScannerInput): Promise<IRelaxedScannedExtension[]> {
608
? this.scanExtensionsFromProfile(input)
610
>
}
611
612
private async scanExtensionsFromLocation(input: ExtensionScannerInput): Promise<IRelaxedScannedExtension[]> {
614
>
if (!stat.children?.length) {
615
return [];
616
}
618
>
stat.children.map(async c => {
619
>
if (!c.isDirectory) {
620
return null;
621
}
623
>
if (input.type === ExtensionType.User && basename(c.resource).indexOf('.') === 0) {
624
return null;
625
}
626
>
const extensionScannerInput = new ExtensionScannerInput(c.resource, input.mtime, input.applicationExtensionslocation, input.applicationExtensionslocationMtime, input.profile, input.profileScanOptions, input.type, input.validate, input.productVersion, input.productDate, input.productCommit, input.devMode, input.language, input.translations);
extensionsScannerService.ts
627
>
return this.scanExtension(extensionScannerInput);
628
>
}));
629
>
return coalesce(extensions)
630
>
// Sort: Make sure extensions are in the same order always. Helps cache invalidation even if the order changes.
631
>
.sort((a, b) => a.location.path < b.location.path ? -1 : 1);
632
>
}
633
634
private async scanExtensionsFromProfile(input: ExtensionScannerInput): Promise<IRelaxedScannedExtension[]> {