mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Bundle in-tree extensions as npm/tgz (#2807)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
08db118832
commit
f168f137e5
16 files changed
+1237
-698
No files matched your search
@@ -342,10 +342,13 @@ export class ExtensionDiscovery extends Singleton {
|
||||
const manifest = await fse.readJson(manifestPath);
|
||||
const installedManifestPath = this.getInstalledManifestPath(manifest.name);
|
||||
const isEnabled = isBundled || ExtensionsStore.getInstance().isEnabled(installedManifestPath);
|
||||
const extensionDir = path.dirname(manifestPath);
|
||||
const npmPackage = path.join(extensionDir, `${manifest.name}-${manifest.version}.tgz`);
|
||||
const absolutePath = (await fse.pathExists(npmPackage)) ? npmPackage : extensionDir;
|
||||
|
||||
return {
|
||||
id: installedManifestPath,
|
||||
absolutePath: path.dirname(manifestPath),
|
||||
absolutePath,
|
||||
manifestPath: installedManifestPath,
|
||||
manifest,
|
||||
isBundled,
|
||||
|
||||
Reference in new issue
Block a user