mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Convert runMany and runManySync to use injectManyWithMeta + move to seperate package (#7244)
* Convert runMany and runManySync to use injectManyWithMeta Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup type errors due to new Runnable requirements Signed-off-by: Sebastian Malton <sebastian@malton.name> * Add documentation for verifyRunnablesAreDAG Signed-off-by: Sebastian Malton <sebastian@malton.name> * Simplify convertToWithIdWith Signed-off-by: Sebastian Malton <sebastian@malton.name> * Move all utility functions to separate package Signed-off-by: Sebastian Malton <sebastian@malton.name> * Move testing utilities to separate package Signed-off-by: Sebastian Malton <sebastian@malton.name> * Move run-many and run-many-sync to separate package Signed-off-by: Sebastian Malton <sebastian@malton.name> * Replace all internal uses of utilities with new packages Signed-off-by: Sebastian Malton <sebastian@malton.name> * Use new @k8slens/run-many package in core Signed-off-by: Sebastian Malton <sebastian@malton.name> * Add dep to open-lens Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup type errors Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup uses of @k8slens/test-utils Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup getGlobalOverride Signed-off-by: Sebastian Malton <sebastian@malton.name> * Move tests to new package too Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix type errors Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup uses of AsyncResult and autoBind Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup remaining import issues Signed-off-by: Sebastian Malton <sebastian@malton.name> * Finial fixups to fix build Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix lint Signed-off-by: Sebastian Malton <sebastian@malton.name> * Revert moving "testUsingFakeTime" to separate package - This fixes tests Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix integration tests Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix unit test failing due to spelling fix Signed-off-by: Sebastian Malton <sebastian@malton.name> --------- Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
ad9bafe2a5
commit
2789bcebcb
754 files changed
+2715
-2752
No files matched your search
@@ -8,14 +8,13 @@ import buildVersionInjectable from "./build-version.injectable";
|
||||
|
||||
const initializeBuildVersionInjectable = getInjectable({
|
||||
id: "initialize-build-version",
|
||||
instantiate: (di) => {
|
||||
const buildVersion = di.inject(buildVersionInjectable);
|
||||
instantiate: (di) => ({
|
||||
run: async () => {
|
||||
const buildVersion = di.inject(buildVersionInjectable);
|
||||
|
||||
return {
|
||||
id: "initialize-build-version",
|
||||
run: () => buildVersion.init(),
|
||||
};
|
||||
},
|
||||
await buildVersion.init();
|
||||
},
|
||||
}),
|
||||
injectionToken: beforeApplicationIsLoadingInjectionToken,
|
||||
});
|
||||
|
||||
|
||||
@@ -9,15 +9,14 @@ import defaultUpdateChannelInjectable from "../../../features/application-update
|
||||
|
||||
const initDefaultUpdateChannelInjectable = getInjectable({
|
||||
id: "init-default-update-channel",
|
||||
instantiate: (di) => {
|
||||
const defaultUpdateChannel = di.inject(defaultUpdateChannelInjectable);
|
||||
instantiate: (di) => ({
|
||||
run: async () => {
|
||||
const defaultUpdateChannel = di.inject(defaultUpdateChannelInjectable);
|
||||
|
||||
return {
|
||||
id: "init-default-update-channel",
|
||||
run: () => defaultUpdateChannel.init(),
|
||||
runAfter: di.inject(initReleaseChannelInjectable),
|
||||
};
|
||||
},
|
||||
await defaultUpdateChannel.init();
|
||||
},
|
||||
runAfter: initReleaseChannelInjectable,
|
||||
}),
|
||||
injectionToken: beforeApplicationIsLoadingInjectionToken,
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { getGlobalOverride } from "../../common/test-utils/get-global-override";
|
||||
import { getGlobalOverride } from "@k8slens/test-utils";
|
||||
import hardwareAccelerationShouldBeDisabledInjectable from "./hardware-acceleration-should-be-disabled.injectable";
|
||||
|
||||
export default getGlobalOverride(hardwareAccelerationShouldBeDisabledInjectable, () => false);
|
||||
@@ -9,15 +9,14 @@ import initSemanticBuildVersionInjectable from "../semantic-build-version/init.i
|
||||
|
||||
const initReleaseChannelInjectable = getInjectable({
|
||||
id: "init-release-channel",
|
||||
instantiate: (di) => {
|
||||
const releaseChannel = di.inject(releaseChannelInjectable);
|
||||
instantiate: (di) => ({
|
||||
run: async () => {
|
||||
const releaseChannel = di.inject(releaseChannelInjectable);
|
||||
|
||||
return {
|
||||
id: "init-release-channel",
|
||||
run: () => releaseChannel.init(),
|
||||
runAfter: di.inject(initSemanticBuildVersionInjectable),
|
||||
};
|
||||
},
|
||||
await releaseChannel.init();
|
||||
},
|
||||
runAfter: initSemanticBuildVersionInjectable,
|
||||
}),
|
||||
injectionToken: beforeApplicationIsLoadingInjectionToken,
|
||||
});
|
||||
|
||||
|
||||
@@ -10,12 +10,13 @@ import initializeBuildVersionInjectable from "../build-version/init.injectable";
|
||||
const initSemanticBuildVersionInjectable = getInjectable({
|
||||
id: "init-semantic-build-version",
|
||||
instantiate: (di) => {
|
||||
const buildSemanticVersion = di.inject(buildSemanticVersionInjectable);
|
||||
|
||||
return {
|
||||
id: "init-semantic-build-version",
|
||||
run: () => buildSemanticVersion.init(),
|
||||
runAfter: di.inject(initializeBuildVersionInjectable),
|
||||
run: async () => {
|
||||
const buildSemanticVersion = di.inject(buildSemanticVersionInjectable);
|
||||
|
||||
await buildSemanticVersion.init();
|
||||
},
|
||||
runAfter: initializeBuildVersionInjectable,
|
||||
};
|
||||
},
|
||||
injectionToken: beforeApplicationIsLoadingInjectionToken,
|
||||
|
||||
Reference in new issue
Block a user