mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Switch to using applicationInformationInjectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
66c4da26ca
commit
ea70e7decc
@ -1,8 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
||||||
*/
|
|
||||||
import { getGlobalOverride } from "../../../test-utils/get-global-override";
|
|
||||||
import welcomeRouteConfig from "./welcome-route-config.injectable";
|
|
||||||
|
|
||||||
export default getGlobalOverride(welcomeRouteConfig, () => "/welcome");
|
|
||||||
@ -3,16 +3,12 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import packageJsonInjectable from "../../../vars/package-json.injectable";
|
import applicationInformationInjectable from "../../../vars/application-information.injectable";
|
||||||
|
|
||||||
const welcomeRouteConfigInjectable = getInjectable({
|
const welcomeRouteConfigInjectable = getInjectable({
|
||||||
id: "welcome-route-config",
|
id: "welcome-route-config",
|
||||||
|
|
||||||
instantiate: (di) => {
|
instantiate: (di) => di.inject(applicationInformationInjectable).config.welcomeRoute,
|
||||||
const packageJson = di.inject(packageJsonInjectable);
|
|
||||||
|
|
||||||
return packageJson.config.welcomeRoute;
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default welcomeRouteConfigInjectable;
|
export default welcomeRouteConfigInjectable;
|
||||||
|
|||||||
@ -16,6 +16,7 @@ export default getGlobalOverride(applicationInformationInjectable, () => ({
|
|||||||
bundledHelmVersion: "3.7.2",
|
bundledHelmVersion: "3.7.2",
|
||||||
sentryDsn: "",
|
sentryDsn: "",
|
||||||
contentSecurityPolicy: "script-src 'unsafe-eval' 'self'; frame-src http://*.localhost:*/; img-src * data:",
|
contentSecurityPolicy: "script-src 'unsafe-eval' 'self'; frame-src http://*.localhost:*/; img-src * data:",
|
||||||
|
welcomeRoute: "/welcome",
|
||||||
},
|
},
|
||||||
copyright: "some-copyright-information",
|
copyright: "some-copyright-information",
|
||||||
description: "some-descriptive-text",
|
description: "some-descriptive-text",
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
||||||
*/
|
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
|
||||||
import packageJson from "../../../package.json";
|
|
||||||
|
|
||||||
const packageJsonInjectable = getInjectable({
|
|
||||||
id: "package-json",
|
|
||||||
instantiate: () => packageJson,
|
|
||||||
causesSideEffects: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
export default packageJsonInjectable;
|
|
||||||
Loading…
Reference in New Issue
Block a user