1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix discovering extensions with with scopes

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-09-09 14:15:23 -04:00
parent 2d6239123b
commit 01b1bdc66f

View File

@ -363,7 +363,8 @@ export class ExtensionDiscovery {
const id = this.getInstalledManifestPath(manifest.name);
const isEnabled = this.dependencies.extensionsStore.isEnabled({ id, isBundled });
const extensionDir = path.dirname(manifestPath);
const npmPackage = path.join(extensionDir, `${manifest.name}-${manifest.version}.tgz`);
const packedName = manifest.name.replaceAll("@", "").replaceAll("/", "-");
const npmPackage = path.join(extensionDir, `${packedName}-${manifest.version}.tgz`);
const absolutePath = (isProduction && await this.dependencies.pathExists(npmPackage)) ? npmPackage : extensionDir;
const isCompatible = isBundled || this.dependencies.isCompatibleExtension(manifest);