1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/packages/technical-features/application/legacy-extensions/src/bundled-extension.ts
Sebastian Malton 2c3c88be04
Fix bundled extensions not being loaded (#7359)
* 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>

* Fix build

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add explanatory comment for inline require

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-15 18:16:09 +02:00

17 lines
462 B
TypeScript

import { getInjectionToken } from "@ogre-tools/injectable";
import type {
LensExtensionConstructor,
LensExtensionManifest,
} from "./lens-extension";
export interface BundledExtension {
readonly manifest: LensExtensionManifest;
main: () => LensExtensionConstructor | null;
renderer: () => LensExtensionConstructor | null;
}
export const bundledExtensionInjectionToken =
getInjectionToken<BundledExtension>({
id: "bundled-extension-path",
});