mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove multiple usages of shared global state
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
8204dc5a9a
commit
4eb4edaed9
48 files changed
+529
-257
No files matched your search
@@ -14,11 +14,15 @@ const createClusterInjectable = getInjectable({
|
||||
instantiate: (di) => {
|
||||
const dependencies: ClusterDependencies = {
|
||||
directoryForKubeConfigs: di.inject(directoryForKubeConfigsInjectable),
|
||||
|
||||
// TODO: Dismantle wrong abstraction
|
||||
createKubeconfigManager: () => { throw new Error("Tried to access back-end feature in front-end."); },
|
||||
createKubectl: () => { throw new Error("Tried to access back-end feature in front-end.");},
|
||||
createContextHandler: () => { throw new Error("Tried to access back-end feature in front-end."); },
|
||||
createAuthorizationReview: () => { throw new Error("Tried to access back-end feature in front-end."); },
|
||||
createListNamespaces: () => { throw new Error("Tried to access back-end feature in front-end."); },
|
||||
detectorRegistry: null,
|
||||
createVersionDetector: () => { throw new Error("Tried to access back-end feature in front-end."); },
|
||||
};
|
||||
|
||||
return (model) => new Cluster(dependencies, model);
|
||||
|
||||
Reference in new issue
Block a user