mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fixup remaining import issues
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
f8aa389930
commit
a72f2005fc
71 files changed
+82
-81
No files matched your search
@@ -8,10 +8,9 @@ import loggerInjectable from "../../common/logger.injectable";
|
||||
import type { KubeApiResource } from "../../common/rbac";
|
||||
import type { Cluster } from "../../common/cluster/cluster";
|
||||
import { requestApiVersionsInjectionToken } from "./request-api-versions";
|
||||
import { withConcurrencyLimit } from "@k8slens/utilities";
|
||||
import { backoffCaller, withConcurrencyLimit } from "@k8slens/utilities";
|
||||
import requestKubeApiResourcesForInjectable from "./request-kube-api-resources-for.injectable";
|
||||
import type { AsyncResult } from "@k8slens/utilities";
|
||||
import { backoffCaller } from "../../common/utils/backoff-caller";
|
||||
import broadcastConnectionUpdateInjectable from "./broadcast-connection-update.injectable";
|
||||
|
||||
export type RequestApiResources = (cluster: Cluster) => AsyncResult<KubeApiResource[], Error>;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import type { V1APIGroupList } from "@kubernetes/client-node";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { chain } from "@k8slens/utilities";
|
||||
import { iter } from "@k8slens/utilities";
|
||||
import k8sRequestInjectable from "../k8s-request.injectable";
|
||||
import { requestApiVersionsInjectionToken } from "./request-api-versions";
|
||||
|
||||
@@ -19,7 +19,7 @@ const requestNonCoreApiVersionsInjectable = getInjectable({
|
||||
|
||||
return {
|
||||
callWasSuccessful: true,
|
||||
response: chain(groups.values())
|
||||
response: iter.chain(groups.values())
|
||||
.flatMap(group => group.versions.map(version => ({
|
||||
group: group.name,
|
||||
path: `/apis/${version.groupVersion}`,
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { getGlobalOverrideForFunction } from "../../../../../utility-features/test-utils/src/get-global-override-for-function";
|
||||
import { getGlobalOverrideForFunction } from "@k8slens/test-utils";
|
||||
import showOpenDialogInjectable from "./show-open-dialog.injectable";
|
||||
|
||||
export default getGlobalOverrideForFunction(showOpenDialogInjectable);
|
||||
+1
-2
@@ -4,7 +4,6 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { JsonObject } from "type-fest";
|
||||
import { json } from "@k8slens/utilities";
|
||||
import yaml from "js-yaml";
|
||||
import execFileWithInputInjectable from "./exec-file-with-input/exec-file-with-input.injectable";
|
||||
import { getErrorMessage } from "../../../../../common/utils/get-error-message";
|
||||
@@ -60,7 +59,7 @@ const callForKubeResourcesByManifestInjectable = getInjectable({
|
||||
throw new Error(errorMessage);
|
||||
}
|
||||
|
||||
const output = json.parse(result.response) as { items: JsonObject[] };
|
||||
const output = JSON.parse(result.response) as { items: JsonObject[] };
|
||||
|
||||
return output.items;
|
||||
};
|
||||
|
||||
@@ -18,6 +18,8 @@ import getDirnameOfPathInjectable from "../../common/path/get-dirname.injectable
|
||||
import joinPathsInjectable from "../../common/path/join-paths.injectable";
|
||||
import getBasenameOfPathInjectable from "../../common/path/get-basename.injectable";
|
||||
import loggerInjectable from "../../common/logger.injectable";
|
||||
import execFileInjectable from "../../common/fs/exec-file.injectable";
|
||||
import unlinkInjectable from "../../common/fs/unlink.injectable";
|
||||
|
||||
export type CreateKubectl = (version: string) => Kubectl;
|
||||
|
||||
@@ -39,6 +41,8 @@ const createKubectlInjectable = getInjectable({
|
||||
getDirnameOfPath: di.inject(getDirnameOfPathInjectable),
|
||||
joinPaths: di.inject(joinPathsInjectable),
|
||||
getBasenameOfPath: di.inject(getBasenameOfPathInjectable),
|
||||
execFile: di.inject(execFileInjectable),
|
||||
unlink: di.inject(unlinkInjectable),
|
||||
};
|
||||
|
||||
return (version) => new Kubectl(dependencies, version);
|
||||
|
||||
Reference in new issue
Block a user