mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make apiBase not an InjectionToken and make openNodeShellSession not special (#6774)
* Replace apiBaseInjectionToken with tokens for configuration instead Signed-off-by: Sebastian Malton <sebastian@malton.name> * Use new ordering to make openNodeShellSession non-special Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
de789ff955
commit
5c6402b60a
33 files changed
+175
-133
No files matched your search
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { Patch } from "rfc6902";
|
||||
import { apiBaseInjectionToken } from "../../api-base";
|
||||
import apiBaseInjectable from "../../api-base.injectable";
|
||||
import type { KubeJsonApiData } from "../../kube-json-api";
|
||||
|
||||
export type RequestKubeObjectPatch = (name: string, kind: string, ns: string | undefined, patch: Patch) => Promise<KubeJsonApiData>;
|
||||
@@ -12,7 +12,7 @@ export type RequestKubeObjectPatch = (name: string, kind: string, ns: string | u
|
||||
const requestKubeObjectPatchInjectable = getInjectable({
|
||||
id: "request-kube-object-patch",
|
||||
instantiate: (di): RequestKubeObjectPatch => {
|
||||
const apiBase = di.inject(apiBaseInjectionToken);
|
||||
const apiBase = di.inject(apiBaseInjectable);
|
||||
|
||||
return (name, kind, ns, patch) => (
|
||||
apiBase.patch("/stack", {
|
||||
|
||||
Reference in new issue
Block a user