mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Upgrade versions of @ogre-tools/* to 15.3.0
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
7dc0ce7192
commit
ba8f7f916d
27 files changed
+5445
-17542
No files matched your search
@@ -33,9 +33,9 @@
|
||||
"peerDependencies": {
|
||||
"@k8slens/feature-core": "^6.5.0-alpha.0",
|
||||
"@k8slens/run-many": "^1.0.0-alpha.1",
|
||||
"@ogre-tools/fp": "^15.1.2",
|
||||
"@ogre-tools/injectable": "^15.1.2",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.1.2",
|
||||
"@ogre-tools/fp": "^15.3.0",
|
||||
"@ogre-tools/injectable": "^15.3.0",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.3.0",
|
||||
"lodash": "^4.17.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
"@k8slens/application": "^6.5.0-alpha.0",
|
||||
"@k8slens/feature-core": "^6.5.0-alpha.0",
|
||||
"@k8slens/run-many": "^1.0.0-alpha.1",
|
||||
"@ogre-tools/injectable": "^15.1.2",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.1.2",
|
||||
"@ogre-tools/injectable": "^15.3.0",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.3.0",
|
||||
"electron": "^22.3.3",
|
||||
"lodash": "^4.17.21"
|
||||
},
|
||||
|
||||
+25
-30
@@ -1,44 +1,39 @@
|
||||
import { DiContainer, getInjectable, instantiationDecoratorToken, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import {
|
||||
getInjectable,
|
||||
instantiationDecoratorToken,
|
||||
createInstantiationTargetDecorator,
|
||||
} from "@ogre-tools/injectable";
|
||||
import { startApplicationInjectionToken } from "@k8slens/application";
|
||||
import whenAppIsReadyInjectable from "./when-app-is-ready.injectable";
|
||||
import { beforeAnythingInjectionToken, beforeElectronIsReadyInjectionToken } from "./time-slots";
|
||||
import { runManySyncFor } from "@k8slens/run-many";
|
||||
import { curry } from "lodash";
|
||||
|
||||
type ToBeDecorated = (di: DiContainer, ...args: unknown[]) => (...args: unknown[]) => unknown;
|
||||
|
||||
const decorator = (toBeDecorated: unknown, di: DiContainer, ...args: unknown[]) => {
|
||||
const whenAppIsReady = di.inject(whenAppIsReadyInjectable);
|
||||
const runManySync = runManySyncFor(di);
|
||||
const beforeAnything = runManySync(beforeAnythingInjectionToken);
|
||||
const beforeElectronIsReady = runManySync(beforeElectronIsReadyInjectionToken);
|
||||
const startApplication = (toBeDecorated as ToBeDecorated)(di, ...args);
|
||||
|
||||
return (...startApplicationArgs: unknown[]) => {
|
||||
beforeAnything();
|
||||
beforeElectronIsReady();
|
||||
|
||||
return (async () => {
|
||||
await whenAppIsReady();
|
||||
|
||||
return startApplication(...startApplicationArgs);
|
||||
})();
|
||||
};
|
||||
};
|
||||
|
||||
const startElectronApplicationInjectable = getInjectable({
|
||||
id: "start-electron-application",
|
||||
instantiate: () =>
|
||||
createInstantiationTargetDecorator({
|
||||
target: startApplicationInjectionToken,
|
||||
decorate: (targetInstantiate) => (di) => {
|
||||
const whenAppIsReady = di.inject(whenAppIsReadyInjectable);
|
||||
const runManySync = runManySyncFor(di);
|
||||
const beforeAnything = runManySync(beforeAnythingInjectionToken);
|
||||
const beforeElectronIsReady = runManySync(beforeElectronIsReadyInjectionToken);
|
||||
const startApplication = targetInstantiate(di);
|
||||
|
||||
instantiate: () => ({
|
||||
decorate: curry(decorator),
|
||||
target: startApplicationInjectionToken,
|
||||
}),
|
||||
return () => {
|
||||
beforeAnything();
|
||||
beforeElectronIsReady();
|
||||
|
||||
return (async () => {
|
||||
await whenAppIsReady();
|
||||
|
||||
return startApplication();
|
||||
})();
|
||||
};
|
||||
},
|
||||
}),
|
||||
decorable: false,
|
||||
|
||||
injectionToken: instantiationDecoratorToken,
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
export default startElectronApplicationInjectable;
|
||||
@@ -30,7 +30,7 @@
|
||||
"lint:fix": "lens-lint --fix"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ogre-tools/injectable": "^15.1.2"
|
||||
"@ogre-tools/injectable": "^15.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@k8slens/eslint-config": "^6.5.0-alpha.2"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"lint:fix": "lens-lint --fix"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ogre-tools/injectable": "^15.1.2"
|
||||
"@ogre-tools/injectable": "^15.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@k8slens/eslint-config": "^6.5.0-alpha.2"
|
||||
|
||||
@@ -109,7 +109,9 @@ describe("register-feature", () => {
|
||||
instantiate: (di) => di.inject(someInjectable),
|
||||
});
|
||||
|
||||
const di = createContainer("some-container");
|
||||
const di = createContainer("some-container", {
|
||||
detectCycles: false,
|
||||
});
|
||||
|
||||
const someFeature = getFeature({
|
||||
id: "some-feature-1",
|
||||
@@ -132,9 +134,9 @@ describe("register-feature", () => {
|
||||
expect(() => {
|
||||
di.inject(someInjectable);
|
||||
}).toThrow(
|
||||
// 'Cycle of injectables encountered: "some-container" -> "some-feature-1:some-injectable-1"
|
||||
// -> "some-feature-2:some-injectable-2" -> "some-feature-1:some-injectable-1"'
|
||||
"Maximum call stack size exceeded",
|
||||
// eslint-disable-next-line max-len
|
||||
// 'Cycle of injectables encountered: "some-feature-1:some-injectable-1" -> "some-feature-2:some-injectable-2" -> "some-feature-1:some-injectable-1"',
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -34,9 +34,9 @@
|
||||
"@k8slens/application": "^6.5.0-alpha.0",
|
||||
"@k8slens/feature-core": "^6.5.0-alpha.0",
|
||||
"@k8slens/startable-stoppable": "^1.0.0-alpha.1",
|
||||
"@ogre-tools/injectable": "^15.1.2",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.1.2",
|
||||
"@ogre-tools/injectable-extension-for-mobx": "^15.1.2",
|
||||
"@ogre-tools/injectable": "^15.3.0",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.3.0",
|
||||
"@ogre-tools/injectable-extension-for-mobx": "^15.3.0",
|
||||
"lodash": "^4.17.21",
|
||||
"mobx": "^6.7.0"
|
||||
},
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
"@k8slens/application": "^6.5.0-alpha.0",
|
||||
"@k8slens/feature-core": "^6.5.0-alpha.0",
|
||||
"@k8slens/messaging": "^1.0.0-alpha.1",
|
||||
"@ogre-tools/fp": "^15.1.2",
|
||||
"@ogre-tools/injectable": "^15.1.2",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.1.2",
|
||||
"@ogre-tools/injectable-extension-for-mobx": "^15.1.2",
|
||||
"@ogre-tools/fp": "^15.3.0",
|
||||
"@ogre-tools/injectable": "^15.3.0",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.3.0",
|
||||
"@ogre-tools/injectable-extension-for-mobx": "^15.3.0",
|
||||
"lodash": "^4.17.21",
|
||||
"mobx": "^6.8.0"
|
||||
},
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
"@k8slens/application": "^6.5.0-alpha.0",
|
||||
"@k8slens/feature-core": "^6.5.0-alpha.0",
|
||||
"@k8slens/messaging": "^1.0.0-alpha.1",
|
||||
"@ogre-tools/injectable": "^15.1.2",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.1.2",
|
||||
"@ogre-tools/injectable": "^15.3.0",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.3.0",
|
||||
"@ogre-tools/fp": "^15.1.2",
|
||||
"electron": "^22.3.3",
|
||||
"lodash": "^4.17.21"
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
"@k8slens/messaging": "^1.0.0-alpha.1",
|
||||
"@k8slens/run-many": "^1.0.0-alpha.1",
|
||||
"@k8slens/startable-stoppable": "^1.0.0-alpha.1",
|
||||
"@ogre-tools/injectable": "^15.1.2",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.1.2",
|
||||
"@ogre-tools/injectable": "^15.3.0",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.3.0",
|
||||
"electron": "^22.3.3",
|
||||
"lodash": "^4.17.21"
|
||||
},
|
||||
|
||||
@@ -32,15 +32,15 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@async-fn/jest": "^1.6.4",
|
||||
"@k8slens/feature-core": "^6.5.0-alpha.2",
|
||||
"@k8slens/messaging": "^1.0.0-alpha.1",
|
||||
"@ogre-tools/fp": "^15.1.2",
|
||||
"@ogre-tools/injectable": "^15.1.2",
|
||||
"lodash": "^4.17.21"
|
||||
"@ogre-tools/fp": "^15.3.0",
|
||||
"@ogre-tools/injectable": "^15.3.0",
|
||||
"@ogre-tools/injectable-extension-for-mobx": "^15.3.0",
|
||||
"lodash": "^4.17.21",
|
||||
"mobx": "^6.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@k8slens/eslint-config": "^6.5.0-alpha.2",
|
||||
"@k8slens/feature-core": "^6.5.0-alpha.2",
|
||||
"@ogre-tools/injectable-extension-for-mobx": "^15.3.0",
|
||||
"mobx": "^6.7.0"
|
||||
"@k8slens/eslint-config": "^6.5.0-alpha.2"
|
||||
}
|
||||
}
|
||||
@@ -33,11 +33,11 @@
|
||||
"peerDependencies": {
|
||||
"@k8slens/application": "^6.5.0-alpha.2",
|
||||
"@k8slens/feature-core": "^6.5.0-alpha.0",
|
||||
"@ogre-tools/fp": "^15.1.2",
|
||||
"@ogre-tools/injectable": "^15.1.2",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.1.2",
|
||||
"@ogre-tools/injectable-extension-for-mobx": "^15.1.2",
|
||||
"@ogre-tools/injectable-react": "^15.1.2",
|
||||
"@ogre-tools/fp": "^15.3.0",
|
||||
"@ogre-tools/injectable": "^15.3.0",
|
||||
"@ogre-tools/injectable-extension-for-auto-registration": "^15.3.0",
|
||||
"@ogre-tools/injectable-extension-for-mobx": "^15.3.0",
|
||||
"@ogre-tools/injectable-react": "^15.3.0",
|
||||
"lodash": "^4.17.15",
|
||||
"mobx": "^6.8.0",
|
||||
"mobx-react": "^7.6.0",
|
||||
|
||||
Reference in new issue
Block a user