mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enable consistent-type-imports eslint rule (#5205)
This commit is contained in:
1 parent
93a8d0f157
commit
1a29759bff
402 files changed
+991
-503
No files matched your search
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { CatalogCategory, CatalogCategoryRegistry, CatalogCategorySpec } from "../catalog";
|
||||
import type { CatalogCategorySpec } from "../catalog";
|
||||
import { CatalogCategory, CatalogCategoryRegistry } from "../catalog";
|
||||
|
||||
class TestCatalogCategoryRegistry extends CatalogCategoryRegistry { }
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { CatalogCategory, CatalogCategorySpec } from "../catalog";
|
||||
import { CatalogCategory } from "../catalog";
|
||||
import type { CatalogCategorySpec } from "../catalog";
|
||||
|
||||
class TestCatalogCategoryWithoutBadge extends CatalogCategory {
|
||||
public readonly apiVersion = "catalog.k8slens.dev/v1alpha1";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { appEventBus, AppEvent } from "../app-event-bus/event-bus";
|
||||
import type { AppEvent } from "../app-event-bus/event-bus";
|
||||
import { appEventBus } from "../app-event-bus/event-bus";
|
||||
import { Console } from "console";
|
||||
import { stdout, stderr } from "process";
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { DiContainer } from "@ogre-tools/injectable";
|
||||
import { AppPaths, appPathsInjectionToken } from "./app-path-injection-token";
|
||||
import type { AppPaths } from "./app-path-injection-token";
|
||||
import { appPathsInjectionToken } from "./app-path-injection-token";
|
||||
import getElectronAppPathInjectable from "../../main/app-paths/get-electron-app-path/get-electron-app-path.injectable";
|
||||
import { getDisForUnitTesting } from "../../test-utils/get-dis-for-unit-testing";
|
||||
import type { PathName } from "./app-path-names";
|
||||
|
||||
@@ -7,8 +7,10 @@ import path from "path";
|
||||
import type Config from "conf";
|
||||
import type { Options as ConfOptions } from "conf/dist/source/types";
|
||||
import { ipcMain, ipcRenderer } from "electron";
|
||||
import { IEqualsComparer, makeObservable, reaction, runInAction } from "mobx";
|
||||
import { getAppVersion, Singleton, toJS, Disposer } from "./utils";
|
||||
import type { IEqualsComparer } from "mobx";
|
||||
import { makeObservable, reaction, runInAction } from "mobx";
|
||||
import type { Disposer } from "./utils";
|
||||
import { getAppVersion, Singleton, toJS } from "./utils";
|
||||
import logger from "../main/logger";
|
||||
import { broadcastMessage, ipcMainOn, ipcRendererOn } from "./ipc";
|
||||
import isEqual from "lodash/isEqual";
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
|
||||
import { navigate } from "../../renderer/navigation";
|
||||
import { CatalogCategory, CatalogEntity, CatalogEntityMetadata, CatalogEntitySpec, CatalogEntityStatus } from "../catalog";
|
||||
import type { CatalogEntityMetadata, CatalogEntitySpec, CatalogEntityStatus } from "../catalog";
|
||||
import { CatalogCategory, CatalogEntity } from "../catalog";
|
||||
import { catalogCategoryRegistry } from "../catalog/catalog-category-registry";
|
||||
|
||||
interface GeneralEntitySpec extends CatalogEntitySpec {
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
|
||||
import { catalogCategoryRegistry } from "../catalog/catalog-category-registry";
|
||||
import { CatalogEntity, CatalogEntityActionContext, CatalogEntityContextMenuContext, CatalogEntityMetadata, CatalogEntityStatus, CatalogCategory, CatalogCategorySpec } from "../catalog";
|
||||
import type { CatalogEntityActionContext, CatalogEntityContextMenuContext, CatalogEntityMetadata, CatalogEntityStatus, CatalogCategorySpec } from "../catalog";
|
||||
import { CatalogEntity, CatalogCategory } from "../catalog";
|
||||
import { ClusterStore } from "../cluster-store/cluster-store";
|
||||
import { broadcastMessage } from "../ipc";
|
||||
import { app } from "electron";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { CatalogCategory, CatalogEntity, CatalogEntityContextMenuContext, CatalogEntityMetadata, CatalogEntityStatus } from "../catalog";
|
||||
import type { CatalogEntityContextMenuContext, CatalogEntityMetadata, CatalogEntityStatus } from "../catalog";
|
||||
import { CatalogCategory, CatalogEntity } from "../catalog";
|
||||
import { catalogCategoryRegistry } from "../catalog/catalog-category-registry";
|
||||
import { productName } from "../vars";
|
||||
import { WeblinkStore } from "../weblink-store";
|
||||
|
||||
@@ -7,7 +7,7 @@ import { action, computed, observable, makeObservable } from "mobx";
|
||||
import { once } from "lodash";
|
||||
import { iter, getOrInsertMap, strictSet } from "../utils";
|
||||
import type { Disposer } from "../utils";
|
||||
import { CatalogCategory, CatalogEntityData, CatalogEntityKindData } from "./catalog-entity";
|
||||
import type { CatalogCategory, CatalogEntityData, CatalogEntityKindData } from "./catalog-entity";
|
||||
|
||||
export type CategoryFilter = (category: CatalogCategory) => any;
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ import EventEmitter from "events";
|
||||
import type TypedEmitter from "typed-emitter";
|
||||
import { observable, makeObservable } from "mobx";
|
||||
import { once } from "lodash";
|
||||
import { iter, Disposer } from "../utils";
|
||||
import type { Disposer } from "../utils";
|
||||
import { iter } from "../utils";
|
||||
import type { CategoryColumnRegistration } from "../../renderer/components/+catalog/custom-category-columns";
|
||||
|
||||
type ExtractEntityMetadataType<Entity> = Entity extends CatalogEntity<infer Metadata> ? Metadata : never;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { AuthorizationV1Api, KubeConfig, V1ResourceAttributes } from "@kubernetes/client-node";
|
||||
import type { KubeConfig, V1ResourceAttributes } from "@kubernetes/client-node";
|
||||
import { AuthorizationV1Api } from "@kubernetes/client-node";
|
||||
import logger from "../logger";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
|
||||
|
||||
@@ -7,11 +7,13 @@ import { ipcMain } from "electron";
|
||||
import { action, comparer, computed, makeObservable, observable, reaction, when } from "mobx";
|
||||
import { broadcastMessage } from "../ipc";
|
||||
import type { ContextHandler } from "../../main/context-handler/context-handler";
|
||||
import { HttpError, KubeConfig } from "@kubernetes/client-node";
|
||||
import type { KubeConfig } from "@kubernetes/client-node";
|
||||
import { HttpError } from "@kubernetes/client-node";
|
||||
import type { Kubectl } from "../../main/kubectl/kubectl";
|
||||
import type { KubeconfigManager } from "../../main/kubeconfig-manager/kubeconfig-manager";
|
||||
import { loadConfigFromFile, loadConfigFromFileSync, validateKubeConfig } from "../kube-helpers";
|
||||
import { apiResourceRecord, apiResources, KubeApiResource, KubeResource } from "../rbac";
|
||||
import type { KubeApiResource, KubeResource } from "../rbac";
|
||||
import { apiResourceRecord, apiResources } from "../rbac";
|
||||
import logger from "../../main/logger";
|
||||
import { VersionDetector } from "../../main/cluster-detectors/version-detector";
|
||||
import { DetectorRegistry } from "../../main/cluster-detectors/detector-registry";
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { CoreV1Api, KubeConfig } from "@kubernetes/client-node";
|
||||
import type { KubeConfig } from "@kubernetes/client-node";
|
||||
import { CoreV1Api } from "@kubernetes/client-node";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
|
||||
export type ListNamespaces = () => Promise<string[]>;
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import { Route, routeInjectionToken } from "../../route-injection-token";
|
||||
import type { Route } from "../../route-injection-token";
|
||||
import { routeInjectionToken } from "../../route-injection-token";
|
||||
|
||||
export interface CatalogPathParameters {
|
||||
group?: string;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import catalogRouteInjectable, { CatalogPathParameters } from "./catalog-route.injectable";
|
||||
import type { CatalogPathParameters } from "./catalog-route.injectable";
|
||||
import catalogRouteInjectable from "./catalog-route.injectable";
|
||||
import { navigateToRouteInjectionToken } from "../../navigate-to-route-injection-token";
|
||||
|
||||
export type NavigateToCatalog = (parameters?: CatalogPathParameters) => void;
|
||||
|
||||
+2
-1
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import { Route, routeInjectionToken } from "../../../../route-injection-token";
|
||||
import type { Route } from "../../../../route-injection-token";
|
||||
import { routeInjectionToken } from "../../../../route-injection-token";
|
||||
|
||||
export interface CustomResourcesPathParameters {
|
||||
group?: string;
|
||||
|
||||
+2
-1
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import customResourcesRouteInjectable, { CustomResourcesPathParameters } from "./custom-resources-route.injectable";
|
||||
import type { CustomResourcesPathParameters } from "./custom-resources-route.injectable";
|
||||
import customResourcesRouteInjectable from "./custom-resources-route.injectable";
|
||||
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
|
||||
|
||||
const navigateToCustomResourcesInjectable = getInjectable({
|
||||
|
||||
+2
-1
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import { Route, routeInjectionToken } from "../../../../route-injection-token";
|
||||
import type { Route } from "../../../../route-injection-token";
|
||||
import { routeInjectionToken } from "../../../../route-injection-token";
|
||||
|
||||
export interface HelmChartsPathParameters {
|
||||
repo?: string;
|
||||
|
||||
+2
-1
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import helmChartsRouteInjectable, { HelmChartsPathParameters } from "./helm-charts-route.injectable";
|
||||
import type { HelmChartsPathParameters } from "./helm-charts-route.injectable";
|
||||
import helmChartsRouteInjectable from "./helm-charts-route.injectable";
|
||||
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
|
||||
|
||||
export type NavigateToHelmCharts = (parameters?: HelmChartsPathParameters) => void;
|
||||
|
||||
+2
-1
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import { Route, routeInjectionToken } from "../../../../route-injection-token";
|
||||
import type { Route } from "../../../../route-injection-token";
|
||||
import { routeInjectionToken } from "../../../../route-injection-token";
|
||||
|
||||
export interface HelmReleasesPathParameters {
|
||||
namespace?: string;
|
||||
|
||||
+2
-1
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import helmReleasesRouteInjectable, { HelmReleasesPathParameters } from "./helm-releases-route.injectable";
|
||||
import type { HelmReleasesPathParameters } from "./helm-releases-route.injectable";
|
||||
import helmReleasesRouteInjectable from "./helm-releases-route.injectable";
|
||||
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
|
||||
|
||||
export type NavigateToHelmReleases = (parameters?: HelmReleasesPathParameters) => void;
|
||||
|
||||
+2
-1
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import portForwardsRouteInjectable, { PortForwardsPathParameters } from "./port-forwards-route.injectable";
|
||||
import type { PortForwardsPathParameters } from "./port-forwards-route.injectable";
|
||||
import portForwardsRouteInjectable from "./port-forwards-route.injectable";
|
||||
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
|
||||
|
||||
export type NavigateToPortForwards = (parameters?: PortForwardsPathParameters) => void;
|
||||
|
||||
+2
-1
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import { Route, routeInjectionToken } from "../../../../route-injection-token";
|
||||
import type { Route } from "../../../../route-injection-token";
|
||||
import { routeInjectionToken } from "../../../../route-injection-token";
|
||||
|
||||
export interface PortForwardsPathParameters {
|
||||
forwardport?: string;
|
||||
|
||||
+2
-1
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import { Route, routeInjectionToken } from "../../route-injection-token";
|
||||
import type { Route } from "../../route-injection-token";
|
||||
import { routeInjectionToken } from "../../route-injection-token";
|
||||
|
||||
export interface EntitySettingsPathParameters {
|
||||
entityId: string;
|
||||
|
||||
@@ -7,15 +7,16 @@ import { action, comparer, observable, makeObservable, computed } from "mobx";
|
||||
import { BaseStore } from "./base-store";
|
||||
import migrations from "../migrations/hotbar-store";
|
||||
import { toJS } from "./utils";
|
||||
import { CatalogEntity } from "./catalog";
|
||||
import type { CatalogEntity } from "./catalog";
|
||||
import logger from "../main/logger";
|
||||
import { broadcastMessage } from "./ipc";
|
||||
import type {
|
||||
Hotbar,
|
||||
CreateHotbarData,
|
||||
CreateHotbarOptions } from "./hotbar-types";
|
||||
import {
|
||||
defaultHotbarCells,
|
||||
getEmptyHotbar,
|
||||
Hotbar,
|
||||
CreateHotbarData,
|
||||
CreateHotbarOptions,
|
||||
} from "./hotbar-types";
|
||||
import { hotbarTooManyItemsChannel } from "./ipc/hotbar";
|
||||
import type { GeneralEntity } from "./catalog-entities";
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
|
||||
import * as uuid from "uuid";
|
||||
import { tuple, Tuple } from "./utils";
|
||||
import type { Tuple } from "./utils";
|
||||
import { tuple } from "./utils";
|
||||
|
||||
export interface HotbarItem {
|
||||
entity: {
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
import { ipcMain, ipcRenderer, webContents } from "electron";
|
||||
import { toJS } from "../utils/toJS";
|
||||
import logger from "../../main/logger";
|
||||
import { ClusterFrameInfo, clusterFrameMap } from "../cluster-frames";
|
||||
import type { ClusterFrameInfo } from "../cluster-frames";
|
||||
import { clusterFrameMap } from "../cluster-frames";
|
||||
import type { Disposer } from "../utils";
|
||||
|
||||
export const broadcastMainChannel = "ipc:broadcast-main";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { CustomResourceDefinition, CustomResourceDefinitionSpec } from "../endpoints";
|
||||
import type { CustomResourceDefinitionSpec } from "../endpoints";
|
||||
import { CustomResourceDefinition } from "../endpoints";
|
||||
|
||||
describe("Crds", () => {
|
||||
describe("getVersion()", () => {
|
||||
|
||||
@@ -13,7 +13,8 @@ jest.mock("../api-manager", () => ({
|
||||
},
|
||||
}));
|
||||
|
||||
import { IKubeApiParsed, parseKubeApi } from "../kube-api-parse";
|
||||
import type { IKubeApiParsed } from "../kube-api-parse";
|
||||
import { parseKubeApi } from "../kube-api-parse";
|
||||
|
||||
/**
|
||||
* [<input-url>, <expected-result>]
|
||||
|
||||
@@ -10,7 +10,8 @@ import { KubeObject } from "../kube-object";
|
||||
import AbortController from "abort-controller";
|
||||
import { delay } from "../../utils/delay";
|
||||
import { PassThrough } from "stream";
|
||||
import { ApiManager, apiManager } from "../api-manager";
|
||||
import type { ApiManager } from "../api-manager";
|
||||
import { apiManager } from "../api-manager";
|
||||
import { Ingress, Pod } from "../endpoints";
|
||||
|
||||
jest.mock("../api-manager");
|
||||
|
||||
@@ -9,7 +9,8 @@ import { action, observable, makeObservable } from "mobx";
|
||||
import { autoBind, iter } from "../utils";
|
||||
import type { KubeApi } from "./kube-api";
|
||||
import type { KubeObject } from "./kube-object";
|
||||
import { IKubeObjectRef, parseKubeApi, createKubeApiURL } from "./kube-api-parse";
|
||||
import type { IKubeObjectRef } from "./kube-api-parse";
|
||||
import { parseKubeApi, createKubeApiURL } from "./kube-api-parse";
|
||||
|
||||
export class ApiManager {
|
||||
private apis = observable.map<string, KubeApi<KubeObject>>();
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { IMetrics, IMetricsReqParams, metricsApi } from "./metrics.api";
|
||||
import type { IMetrics, IMetricsReqParams } from "./metrics.api";
|
||||
import { metricsApi } from "./metrics.api";
|
||||
import { KubeObject } from "../kube-object";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import { isClusterPageContext } from "../../utils/cluster-id-url-parsing";
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
|
||||
import get from "lodash/get";
|
||||
import { IAffinity, WorkloadKubeObject } from "../workload-kube-object";
|
||||
import type { IAffinity } from "../workload-kube-object";
|
||||
import { WorkloadKubeObject } from "../workload-kube-object";
|
||||
import { autoBind } from "../../utils";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import { metricsApi } from "./metrics.api";
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
import moment from "moment";
|
||||
|
||||
import { IAffinity, WorkloadKubeObject } from "../workload-kube-object";
|
||||
import type { IAffinity } from "../workload-kube-object";
|
||||
import { WorkloadKubeObject } from "../workload-kube-object";
|
||||
import { autoBind } from "../../utils";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import { metricsApi } from "./metrics.api";
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { KubeObject, TypedLocalObjectReference } from "../kube-object";
|
||||
import type { TypedLocalObjectReference } from "../kube-object";
|
||||
import { KubeObject } from "../kube-object";
|
||||
import { autoBind, hasTypedProperty, isString, iter } from "../../utils";
|
||||
import { IMetrics, metricsApi } from "./metrics.api";
|
||||
import type { IMetrics } from "./metrics.api";
|
||||
import { metricsApi } from "./metrics.api";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import type { KubeJsonApiData } from "../kube-json-api";
|
||||
import { isClusterPageContext } from "../../utils/cluster-id-url-parsing";
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
import get from "lodash/get";
|
||||
import { autoBind } from "../../utils";
|
||||
import { IAffinity, WorkloadKubeObject } from "../workload-kube-object";
|
||||
import type { IAffinity } from "../workload-kube-object";
|
||||
import { WorkloadKubeObject } from "../workload-kube-object";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import { metricsApi } from "./metrics.api";
|
||||
import type { KubeJsonApiData } from "../kube-json-api";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { KubeObject, LabelSelector } from "../kube-object";
|
||||
import type { LabelSelector } from "../kube-object";
|
||||
import { KubeObject } from "../kube-object";
|
||||
import { autoBind } from "../../utils";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import type { KubeJsonApiData } from "../kube-json-api";
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
import { KubeObject } from "../kube-object";
|
||||
import { autoBind, cpuUnitsToNumber, iter, unitsToBytes } from "../../../renderer/utils";
|
||||
import { IMetrics, metricsApi } from "./metrics.api";
|
||||
import type { IMetrics } from "./metrics.api";
|
||||
import { metricsApi } from "./metrics.api";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import type { KubeJsonApiData } from "../kube-json-api";
|
||||
import { isClusterPageContext } from "../../utils/cluster-id-url-parsing";
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { KubeObject, LabelSelector } from "../kube-object";
|
||||
import type { LabelSelector } from "../kube-object";
|
||||
import { KubeObject } from "../kube-object";
|
||||
import { autoBind } from "../../utils";
|
||||
import { IMetrics, metricsApi } from "./metrics.api";
|
||||
import type { IMetrics } from "./metrics.api";
|
||||
import { metricsApi } from "./metrics.api";
|
||||
import type { Pod } from "./pods.api";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import type { KubeJsonApiData } from "../kube-json-api";
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
|
||||
import { autoBind } from "../../utils";
|
||||
import { KubeObject, LabelSelector } from "../kube-object";
|
||||
import type { LabelSelector } from "../kube-object";
|
||||
import { KubeObject } from "../kube-object";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import type { KubeJsonApiData } from "../kube-json-api";
|
||||
import { isClusterPageContext } from "../../utils/cluster-id-url-parsing";
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { IAffinity, WorkloadKubeObject } from "../workload-kube-object";
|
||||
import type { IAffinity } from "../workload-kube-object";
|
||||
import { WorkloadKubeObject } from "../workload-kube-object";
|
||||
import { autoBind } from "../../utils";
|
||||
import { IMetrics, metricsApi } from "./metrics.api";
|
||||
import type { IMetrics } from "./metrics.api";
|
||||
import { metricsApi } from "./metrics.api";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import type { KubeJsonApiData } from "../kube-json-api";
|
||||
import { isClusterPageContext } from "../../utils/cluster-id-url-parsing";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { IAffinity, WorkloadKubeObject } from "../workload-kube-object";
|
||||
import type { IAffinity } from "../workload-kube-object";
|
||||
import { WorkloadKubeObject } from "../workload-kube-object";
|
||||
import { autoBind } from "../../utils";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import { metricsApi } from "./metrics.api";
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
import { Agent as HttpAgent } from "http";
|
||||
import { Agent as HttpsAgent } from "https";
|
||||
import { merge } from "lodash";
|
||||
import fetch, { Response, RequestInit } from "node-fetch";
|
||||
import type { Response, RequestInit } from "node-fetch";
|
||||
import fetch from "node-fetch";
|
||||
import { stringify } from "querystring";
|
||||
import { EventEmitter } from "../../common/event-emitter";
|
||||
import logger from "../../common/logger";
|
||||
|
||||
@@ -12,14 +12,17 @@ import logger from "../../main/logger";
|
||||
import { apiManager } from "./api-manager";
|
||||
import { apiBase, apiKube } from "./index";
|
||||
import { createKubeApiURL, parseKubeApi } from "./kube-api-parse";
|
||||
import { KubeObjectConstructor, KubeObject, KubeStatus } from "./kube-object";
|
||||
import type { KubeObjectConstructor } from "./kube-object";
|
||||
import { KubeObject, KubeStatus } from "./kube-object";
|
||||
import byline from "byline";
|
||||
import type { IKubeWatchEvent } from "./kube-watch-event";
|
||||
import { KubeJsonApi, KubeJsonApiData } from "./kube-json-api";
|
||||
import type { KubeJsonApiData } from "./kube-json-api";
|
||||
import { KubeJsonApi } from "./kube-json-api";
|
||||
import { noop, WrappedAbortController } from "../utils";
|
||||
import type { RequestInit } from "node-fetch";
|
||||
import type AbortController from "abort-controller";
|
||||
import { Agent, AgentOptions } from "https";
|
||||
import type { AgentOptions } from "https";
|
||||
import { Agent } from "https";
|
||||
import type { Patch } from "rfc6902";
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { JsonApi, JsonApiData, JsonApiError } from "./json-api";
|
||||
import type { JsonApiData, JsonApiError } from "./json-api";
|
||||
import { JsonApi } from "./json-api";
|
||||
import type { Response } from "node-fetch";
|
||||
import { apiKubePrefix, isDebugging } from "../vars";
|
||||
import { apiBase } from "./api-base";
|
||||
|
||||
@@ -6,11 +6,14 @@
|
||||
import type { ClusterContext } from "./cluster-context";
|
||||
|
||||
import { action, computed, makeObservable, observable, reaction, when } from "mobx";
|
||||
import { autoBind, Disposer, noop, rejectPromiseBy } from "../utils";
|
||||
import { KubeObject, KubeStatus } from "./kube-object";
|
||||
import type { Disposer } from "../utils";
|
||||
import { autoBind, noop, rejectPromiseBy } from "../utils";
|
||||
import type { KubeObject } from "./kube-object";
|
||||
import { KubeStatus } from "./kube-object";
|
||||
import type { IKubeWatchEvent } from "./kube-watch-event";
|
||||
import { ItemStore } from "../item.store";
|
||||
import { ensureObjectSelfLink, IKubeApiQueryParams, KubeApi } from "./kube-api";
|
||||
import type { IKubeApiQueryParams, KubeApi } from "./kube-api";
|
||||
import { ensureObjectSelfLink } from "./kube-api";
|
||||
import { parseKubeApi } from "./kube-api-parse";
|
||||
import type { KubeJsonApiData } from "./kube-json-api";
|
||||
import type { RequestInit } from "node-fetch";
|
||||
|
||||
@@ -9,7 +9,8 @@ import path from "path";
|
||||
import os from "os";
|
||||
import yaml from "js-yaml";
|
||||
import logger from "../main/logger";
|
||||
import { Cluster, Context, newClusters, newContexts, newUsers, User } from "@kubernetes/client-node/dist/config_types";
|
||||
import type { Cluster, Context, User } from "@kubernetes/client-node/dist/config_types";
|
||||
import { newClusters, newContexts, newUsers } from "@kubernetes/client-node/dist/config_types";
|
||||
import { resolvePath } from "./utils";
|
||||
import Joi from "joi";
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import logger, { Logger } from "./logger";
|
||||
import type { Logger } from "./logger";
|
||||
import logger from "./logger";
|
||||
|
||||
const loggerInjectable = getInjectable({
|
||||
id: "logger",
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { match, matchPath } from "react-router";
|
||||
import type { match } from "react-router";
|
||||
import { matchPath } from "react-router";
|
||||
import { countBy } from "lodash";
|
||||
import { iter } from "../utils";
|
||||
import { pathToRegexp } from "path-to-regexp";
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
|
||||
import { boundMethod, boundClass } from "autobind-decorator";
|
||||
import autoBindClass, { Options } from "auto-bind";
|
||||
import type { Options } from "auto-bind";
|
||||
import autoBindClass from "auto-bind";
|
||||
import autoBindReactClass from "auto-bind/react";
|
||||
|
||||
// Automatically bind methods to their class instance
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { action, IInterceptable, IInterceptor, IListenable, ISetWillChange, observable, ObservableMap, ObservableSet } from "mobx";
|
||||
import type { IInterceptable, IInterceptor, IListenable, ISetWillChange, ObservableMap } from "mobx";
|
||||
import { action, observable, ObservableSet } from "mobx";
|
||||
|
||||
export function makeIterableIterator<T>(iterator: Iterator<T>): IterableIterator<T> {
|
||||
(iterator as IterableIterator<T>)[Symbol.iterator] = () => iterator as IterableIterator<T>;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import semver, { coerce, SemVer } from "semver";
|
||||
import type { SemVer } from "semver";
|
||||
import semver, { coerce } from "semver";
|
||||
import * as iter from "./iter";
|
||||
import type { RawHelmChart } from "../k8s-api/endpoints/helm-charts.api";
|
||||
import logger from "../logger";
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
// Helper for working with tarball files (.tar, .tgz)
|
||||
// Docs: https://github.com/npm/node-tar
|
||||
import tar, { ExtractOptions, FileStat } from "tar";
|
||||
import type { ExtractOptions, FileStat } from "tar";
|
||||
import tar from "tar";
|
||||
import path from "path";
|
||||
|
||||
export interface ReadFileFromTarOpts {
|
||||
|
||||
Reference in new issue
Block a user