mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Use default export to fix issue with package lying with types (#6081)
Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
df1cc8b788
commit
03d2389f01
@ -14,7 +14,7 @@ import { DeploymentApi, Ingress, IngressApi, Pod, PodApi } from "../endpoints";
|
||||
import { getDiForUnitTesting } from "../../../renderer/getDiForUnitTesting";
|
||||
import apiManagerInjectable from "../api-manager/manager.injectable";
|
||||
import autoRegistrationInjectable from "../api-manager/auto-registration.injectable";
|
||||
import { AbortController } from "abort-controller";
|
||||
import AbortController from "abort-controller";
|
||||
|
||||
jest.mock("../api-manager");
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ import logger from "../logger";
|
||||
import assert from "assert";
|
||||
import type { PartialDeep } from "type-fest";
|
||||
import { entries } from "../utils/objects";
|
||||
import { AbortController } from "abort-controller";
|
||||
import AbortController from "abort-controller";
|
||||
|
||||
export type OnLoadFailure = (error: unknown) => void;
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { AbortController } from "abort-controller";
|
||||
import AbortController from "abort-controller";
|
||||
|
||||
/**
|
||||
* This is like an `AbortController` but will also abort if the parent aborts,
|
||||
|
||||
@ -9,11 +9,7 @@ import { once } from "lodash";
|
||||
import type { ClusterFrameContext } from "../cluster-frame-context/cluster-frame-context";
|
||||
import logger from "../../common/logger";
|
||||
import type { KubeObjectStoreLoadAllParams, KubeObjectStoreSubscribeParams } from "../../common/k8s-api/kube-object.store";
|
||||
import type { RequestInit } from "node-fetch";
|
||||
import { AbortController } from "abort-controller";
|
||||
|
||||
// TODO: upgrade node-fetch once we are starting to use ES modules
|
||||
type LegacyAbortSignal = NonNullable<RequestInit["signal"]>;
|
||||
import AbortController from "abort-controller";
|
||||
|
||||
// Kubernetes watch-api client
|
||||
// API: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Using_readable_streams
|
||||
@ -107,7 +103,7 @@ export class KubeWatchApi {
|
||||
|
||||
const loadThenSubscribe = async (namespaces: string[] | undefined) => {
|
||||
try {
|
||||
await store.loadAll({ namespaces, reqInit: { signal: childController.signal as LegacyAbortSignal }, onLoadFailure });
|
||||
await store.loadAll({ namespaces, reqInit: { signal: childController.signal }, onLoadFailure });
|
||||
unsubscribe.push(store.subscribe({ onLoadFailure, abortController: childController }));
|
||||
} catch (error) {
|
||||
if (!(error instanceof DOMException)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user