Fix bundled extensions not being loaded

- Also show that this fixes it by added an example bundled
  extension to 'open-lens'

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-03-15 10:11:48 -04:00
1 parent 121a50ecf3
commit c1e88a8a3b
51 files changed
+510 -159

No files matched your search

+2
View File
@@ -201,6 +201,8 @@
"@k8slens/ensure-binaries": "^6.5.0-alpha.1",
"@k8slens/feature-core": "^6.5.0-alpha.1",
"@k8slens/generate-tray-icons": "^6.5.0-alpha.1",
"@k8slens/legacy-extension-example": "^1.0.0-alpha.0",
"@k8slens/legacy-extensions": "^1.0.0-alpha.0",
"@k8slens/run-many": "^1.0.0-alpha.1",
"@k8slens/test-utils": "^1.0.0-alpha.1",
"@k8slens/utilities": "^1.0.0-alpha.1",
@@ -0,0 +1,15 @@
import { bundledExtensionInjectionToken } from "@k8slens/legacy-extensions";
import { getInjectable } from "@ogre-tools/injectable";
import exampleBundledExtensionManifest from "@k8slens/legacy-extension-example/package.json";
const exampleBundledExtensionInjectable = getInjectable({
id: "example-bundled-extension",
instantiate: (di) => ({
manifest: exampleBundledExtensionManifest,
main: () => require("@k8slens/legacy-extension-example/main").default,
renderer: () => require("@k8slens/legacy-extension-example/renderer").default,
}),
injectionToken: bundledExtensionInjectionToken,
});
export default exampleBundledExtensionInjectable;