mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Clean up versioning and packageJson uses (#6196)
This commit is contained in:
1 parent
cfe35ded90
commit
67ac1692b2
116 files changed
+1154
-644
No files matched your search
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { createInitializableState } from "../../../common/initializable-state/create";
|
||||
import { buildVersionInjectionToken } from "../../../common/vars/build-semantic-version.injectable";
|
||||
import getBuildVersionInjectable from "./get-build-version.injectable";
|
||||
|
||||
const buildVersionInjectable = createInitializableState({
|
||||
id: "build-version",
|
||||
init: (di) => {
|
||||
const getBuildVersion = di.inject(getBuildVersionInjectable);
|
||||
|
||||
return getBuildVersion();
|
||||
},
|
||||
injectionToken: buildVersionInjectionToken,
|
||||
});
|
||||
|
||||
export default buildVersionInjectable;
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* 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 electronAppInjectable from "../../electron-app/electron-app.injectable";
|
||||
|
||||
const getBuildVersionInjectable = getInjectable({
|
||||
id: "get-build-version",
|
||||
instantiate: (di) => {
|
||||
const electronApp = di.inject(electronAppInjectable);
|
||||
|
||||
return () => electronApp.getVersion();
|
||||
},
|
||||
});
|
||||
|
||||
export default getBuildVersionInjectable;
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 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 { beforeApplicationIsLoadingInjectionToken } from "../../start-main-application/runnable-tokens/before-application-is-loading-injection-token";
|
||||
import buildVersionInjectable from "./build-version.injectable";
|
||||
|
||||
const initializeBuildVersionAsyncSyncBoxInjectable = getInjectable({
|
||||
id: "initialize-build-version-async-sync-box",
|
||||
instantiate: (di) => {
|
||||
const buildVersion = di.inject(buildVersionInjectable);
|
||||
|
||||
return {
|
||||
run: () => buildVersion.init(),
|
||||
};
|
||||
},
|
||||
injectionToken: beforeApplicationIsLoadingInjectionToken,
|
||||
});
|
||||
|
||||
export default initializeBuildVersionAsyncSyncBoxInjectable;
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* 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 defaultUpdateChannelInjectable from "../../../common/application-update/selected-update-channel/default-update-channel.injectable";
|
||||
import initSemanticBuildVersionInjectable from "../../../renderer/vars/semantic-build-version/init.injectable";
|
||||
import { beforeApplicationIsLoadingInjectionToken } from "../../start-main-application/runnable-tokens/before-application-is-loading-injection-token";
|
||||
|
||||
const initDefaultUpdateChannelInjectableInjectable = getInjectable({
|
||||
id: "init-default-update-channel-injectable",
|
||||
instantiate: (di) => {
|
||||
const defaultUpdateChannel = di.inject(defaultUpdateChannelInjectable);
|
||||
|
||||
return {
|
||||
run: () => defaultUpdateChannel.init(),
|
||||
runAfter: di.inject(initSemanticBuildVersionInjectable),
|
||||
};
|
||||
},
|
||||
injectionToken: beforeApplicationIsLoadingInjectionToken,
|
||||
});
|
||||
|
||||
export default initDefaultUpdateChannelInjectableInjectable;
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* 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 buildSemanticVersionInjectable from "../../../common/vars/build-semantic-version.injectable";
|
||||
import { beforeApplicationIsLoadingInjectionToken } from "../../start-main-application/runnable-tokens/before-application-is-loading-injection-token";
|
||||
import initializeBuildVersionInjectable from "../build-version/init.injectable";
|
||||
|
||||
const initSemanticBuildVersionInjectable = getInjectable({
|
||||
id: "init-semantic-build-version",
|
||||
instantiate: (di) => {
|
||||
const buildSemanticVersion = di.inject(buildSemanticVersionInjectable);
|
||||
|
||||
return {
|
||||
run: () => buildSemanticVersion.init(),
|
||||
runAfter: di.inject(initializeBuildVersionInjectable),
|
||||
};
|
||||
},
|
||||
injectionToken: beforeApplicationIsLoadingInjectionToken,
|
||||
});
|
||||
|
||||
export default initSemanticBuildVersionInjectable;
|
||||
Reference in new issue
Block a user