1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Add new Result type to complement AsyncResult

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-01-13 10:48:02 -05:00
parent 63ad078d63
commit cb9d978e5a
36 changed files with 44 additions and 35 deletions

View File

@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import execFileInjectable from "../fs/exec-file.injectable"; import execFileInjectable from "../fs/exec-file.injectable";
import loggerInjectable from "../logger.injectable"; import loggerInjectable from "../logger.injectable";
import type { AsyncResult } from "../utils/async-result"; import type { AsyncResult } from "../utils/result";
import { requestSystemCAsInjectionToken } from "./request-system-cas-token"; import { requestSystemCAsInjectionToken } from "./request-system-cas-token";
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet#other_assertions // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet#other_assertions

View File

@ -4,7 +4,7 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { RequestInit, Response } from "node-fetch"; import type { RequestInit, Response } from "node-fetch";
import type { AsyncResult } from "../utils/async-result"; import type { AsyncResult } from "../utils/result";
import fetchInjectable from "./fetch.injectable"; import fetchInjectable from "./fetch.injectable";
export interface DownloadBinaryOptions { export interface DownloadBinaryOptions {

View File

@ -2,7 +2,7 @@
* Copyright (c) OpenLens Authors. All rights reserved. * Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import type { AsyncResult } from "../../utils/async-result"; import type { AsyncResult } from "../../utils/result";
import type { Fetch } from "../fetch.injectable"; import type { Fetch } from "../fetch.injectable";
import type { RequestInit, Response } from "node-fetch"; import type { RequestInit, Response } from "node-fetch";

View File

@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { ExecFileException, ExecFileOptions } from "child_process"; import type { ExecFileException, ExecFileOptions } from "child_process";
import { execFile } from "child_process"; import { execFile } from "child_process";
import type { AsyncResult } from "../utils/async-result"; import type { AsyncResult } from "../utils/result";
export type ExecFileError = ExecFileException & { stderr: string }; export type ExecFileError = ExecFileException & { stderr: string };

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { AsyncResult } from "../utils/async-result"; import type { AsyncResult } from "../utils/result";
import { isErrnoException } from "../utils"; import { isErrnoException } from "../utils";
import type { Stats } from "fs-extra"; import type { Stats } from "fs-extra";
import { lowerFirst } from "lodash/fp"; import { lowerFirst } from "lodash/fp";

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import type { HelmRepo } from "./helm-repo"; import type { HelmRepo } from "./helm-repo";
import type { AsyncResult } from "../utils/async-result"; import type { AsyncResult } from "../utils/result";
import type { RequestChannel } from "../utils/channel/request-channel-listener-injection-token"; import type { RequestChannel } from "../utils/channel/request-channel-listener-injection-token";
export type AddHelmRepositoryChannel = RequestChannel<HelmRepo, AsyncResult<void, string>>; export type AddHelmRepositoryChannel = RequestChannel<HelmRepo, AsyncResult<void, string>>;

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import type { HelmRepo } from "./helm-repo"; import type { HelmRepo } from "./helm-repo";
import type { AsyncResult } from "../utils/async-result"; import type { AsyncResult } from "../utils/result";
import type { RequestChannel } from "../utils/channel/request-channel-listener-injection-token"; import type { RequestChannel } from "../utils/channel/request-channel-listener-injection-token";
export type GetActiveHelmRepositoriesChannel = RequestChannel<void, AsyncResult<HelmRepo[]>>; export type GetActiveHelmRepositoriesChannel = RequestChannel<void, AsyncResult<HelmRepo[]>>;

View File

@ -2,7 +2,7 @@
* Copyright (c) OpenLens Authors. All rights reserved. * Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import type { AsyncResult } from "../utils/async-result"; import type { AsyncResult } from "../utils/result";
import type { RequestChannel } from "../utils/channel/request-channel-listener-injection-token"; import type { RequestChannel } from "../utils/channel/request-channel-listener-injection-token";
import type { HelmRepo } from "./helm-repo"; import type { HelmRepo } from "./helm-repo";

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { AsyncResult } from "../../../utils/async-result"; import type { AsyncResult } from "../../../utils/result";
import { urlBuilderFor } from "../../../utils/buildUrl"; import { urlBuilderFor } from "../../../utils/buildUrl";
import apiBaseInjectable from "../../api-base.injectable"; import apiBaseInjectable from "../../api-base.injectable";

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { AsyncResult } from "../../../utils/async-result"; import type { AsyncResult } from "../../../utils/result";
import { urlBuilderFor } from "../../../utils/buildUrl"; import { urlBuilderFor } from "../../../utils/buildUrl";
import apiBaseInjectable from "../../api-base.injectable"; import apiBaseInjectable from "../../api-base.injectable";

View File

@ -4,7 +4,7 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { urlBuilderFor } from "../../../utils/buildUrl"; import { urlBuilderFor } from "../../../utils/buildUrl";
import type { AsyncResult } from "../../../utils/async-result"; import type { AsyncResult } from "../../../utils/result";
import apiBaseInjectable from "../../api-base.injectable"; import apiBaseInjectable from "../../api-base.injectable";
interface HelmReleaseUpdatePayload { interface HelmReleaseUpdatePayload {

View File

@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { Patch } from "rfc6902"; import type { Patch } from "rfc6902";
import apiBaseInjectable from "../../api-base.injectable"; import apiBaseInjectable from "../../api-base.injectable";
import type { AsyncResult } from "../../../utils/async-result"; import type { AsyncResult } from "../../../utils/result";
import type { KubeJsonApiData } from "../../kube-json-api"; import type { KubeJsonApiData } from "../../kube-json-api";
export type RequestKubeObjectPatch = (name: string, kind: string, ns: string | undefined, patch: Patch) => Promise<AsyncResult<KubeJsonApiData, string>>; export type RequestKubeObjectPatch = (name: string, kind: string, ns: string | undefined, patch: Patch) => Promise<AsyncResult<KubeJsonApiData, string>>;

View File

@ -4,7 +4,7 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import apiBaseInjectable from "../../api-base.injectable"; import apiBaseInjectable from "../../api-base.injectable";
import type { AsyncResult } from "../../../utils/async-result"; import type { AsyncResult } from "../../../utils/result";
import type { KubeJsonApiData } from "../../kube-json-api"; import type { KubeJsonApiData } from "../../kube-json-api";
export type RequestKubeObjectCreation = (resourceDescriptor: string) => Promise<AsyncResult<KubeJsonApiData, string>>; export type RequestKubeObjectCreation = (resourceDescriptor: string) => Promise<AsyncResult<KubeJsonApiData, string>>;

View File

@ -7,7 +7,7 @@ import type { KubernetesCluster } from "../catalog-entities";
import yaml from "js-yaml"; import yaml from "js-yaml";
import { getLegacyGlobalDiForExtensionApi } from "../../extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api"; import { getLegacyGlobalDiForExtensionApi } from "../../extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api";
import productNameInjectable from "../vars/product-name.injectable"; import productNameInjectable from "../vars/product-name.injectable";
import type { AsyncResult } from "../utils/async-result"; import type { AsyncResult } from "../utils/result";
import type { Logger } from "../logger"; import type { Logger } from "../logger";
import type { KubectlApplyAll, KubectlDeleteAll } from "../kube-helpers/channels"; import type { KubectlApplyAll, KubectlDeleteAll } from "../kube-helpers/channels";
import type { ReadDirectory } from "../fs/read-directory.injectable"; import type { ReadDirectory } from "../fs/read-directory.injectable";

View File

@ -7,7 +7,7 @@ import { getInjectionToken } from "@ogre-tools/injectable";
import type { Asyncify } from "type-fest"; import type { Asyncify } from "type-fest";
import type { RequestChannelHandler } from "../../main/utils/channel/channel-listeners/listener-tokens"; import type { RequestChannelHandler } from "../../main/utils/channel/channel-listeners/listener-tokens";
import type { ClusterId } from "../cluster-types"; import type { ClusterId } from "../cluster-types";
import type { AsyncResult } from "../utils/async-result"; import type { AsyncResult } from "../utils/result";
import type { RequestChannel } from "../utils/channel/request-channel-listener-injection-token"; import type { RequestChannel } from "../utils/channel/request-channel-listener-injection-token";
export interface KubectlApplyAllArgs { export interface KubectlApplyAllArgs {

View File

@ -2,6 +2,15 @@
* Copyright (c) OpenLens Authors. All rights reserved. * Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
export type Result<Value, Error = string> =
| (
Value extends void
? { isOk: true; value?: undefined; error?: never }
: { isOk: true; value: Value; error?: never }
)
| { isOk: false; value?: never; error: Error };
export type AsyncResult<Response, Error = string> = export type AsyncResult<Response, Error = string> =
| ( | (
Response extends void Response extends void

View File

@ -17,7 +17,7 @@ import requestPublicHelmRepositoriesInjectable from "./child-features/preference
import isPathInjectable from "../../renderer/components/input/validators/is-path.injectable"; import isPathInjectable from "../../renderer/components/input/validators/is-path.injectable";
import showSuccessNotificationInjectable from "../../renderer/components/notifications/show-success-notification.injectable"; import showSuccessNotificationInjectable from "../../renderer/components/notifications/show-success-notification.injectable";
import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable"; import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable";
import type { AsyncResult } from "../../common/utils/async-result"; import type { AsyncResult } from "../../common/utils/result";
describe("add custom helm repository in preferences", () => { describe("add custom helm repository in preferences", () => {
let builder: ApplicationBuilder; let builder: ApplicationBuilder;

View File

@ -15,7 +15,7 @@ import type { HelmRepo } from "../../common/helm/helm-repo";
import requestPublicHelmRepositoriesInjectable from "./child-features/preferences/renderer/adding-of-public-helm-repository/public-helm-repositories/request-public-helm-repositories.injectable"; import requestPublicHelmRepositoriesInjectable from "./child-features/preferences/renderer/adding-of-public-helm-repository/public-helm-repositories/request-public-helm-repositories.injectable";
import showSuccessNotificationInjectable from "../../renderer/components/notifications/show-success-notification.injectable"; import showSuccessNotificationInjectable from "../../renderer/components/notifications/show-success-notification.injectable";
import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable"; import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable";
import type { AsyncResult } from "../../common/utils/async-result"; import type { AsyncResult } from "../../common/utils/result";
describe("add helm repository from list in preferences", () => { describe("add helm repository from list in preferences", () => {
let builder: ApplicationBuilder; let builder: ApplicationBuilder;

View File

@ -14,7 +14,7 @@ import helmBinaryPathInjectable from "../../main/helm/helm-binary-path.injectabl
import getActiveHelmRepositoriesInjectable from "../../main/helm/repositories/get-active-helm-repositories/get-active-helm-repositories.injectable"; import getActiveHelmRepositoriesInjectable from "../../main/helm/repositories/get-active-helm-repositories/get-active-helm-repositories.injectable";
import type { HelmRepo } from "../../common/helm/helm-repo"; import type { HelmRepo } from "../../common/helm/helm-repo";
import requestPublicHelmRepositoriesInjectable from "./child-features/preferences/renderer/adding-of-public-helm-repository/public-helm-repositories/request-public-helm-repositories.injectable"; import requestPublicHelmRepositoriesInjectable from "./child-features/preferences/renderer/adding-of-public-helm-repository/public-helm-repositories/request-public-helm-repositories.injectable";
import type { AsyncResult } from "../../common/utils/async-result"; import type { AsyncResult } from "../../common/utils/result";
describe("remove helm repository from list of active repositories in preferences", () => { describe("remove helm repository from list of active repositories in preferences", () => {
let builder: ApplicationBuilder; let builder: ApplicationBuilder;

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import type { AsyncResult } from "../../../common/utils/async-result"; import type { AsyncResult } from "../../../common/utils/result";
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import isWindowsInjectable from "../../../common/vars/is-windows.injectable"; import isWindowsInjectable from "../../../common/vars/is-windows.injectable";
import computeUnixShellEnvironmentInjectable from "./compute-unix-shell-environment.injectable"; import computeUnixShellEnvironmentInjectable from "./compute-unix-shell-environment.injectable";

View File

@ -11,7 +11,7 @@ import loggerInjectable from "../../../common/logger.injectable";
import processExecPathInjectable from "./execPath.injectable"; import processExecPathInjectable from "./execPath.injectable";
import processEnvInjectable from "./env.injectable"; import processEnvInjectable from "./env.injectable";
import { object } from "../../../common/utils"; import { object } from "../../../common/utils";
import type { AsyncResult } from "../../../common/utils/async-result"; import type { AsyncResult } from "../../../common/utils/result";
export interface UnixShellEnvOptions { export interface UnixShellEnvOptions {
signal: AbortSignal; signal: AbortSignal;

View File

@ -6,7 +6,7 @@
import { getDiForUnitTesting } from "../../getDiForUnitTesting"; import { getDiForUnitTesting } from "../../getDiForUnitTesting";
import listHelmChartsInjectable from "../helm-service/list-helm-charts.injectable"; import listHelmChartsInjectable from "../helm-service/list-helm-charts.injectable";
import getActiveHelmRepositoriesInjectable from "../repositories/get-active-helm-repositories/get-active-helm-repositories.injectable"; import getActiveHelmRepositoriesInjectable from "../repositories/get-active-helm-repositories/get-active-helm-repositories.injectable";
import type { AsyncResult } from "../../../common/utils/async-result"; import type { AsyncResult } from "../../../common/utils/result";
import type { HelmRepo } from "../../../common/helm/helm-repo"; import type { HelmRepo } from "../../../common/helm/helm-repo";
import { sortBySemverVersion } from "../../../common/utils"; import { sortBySemverVersion } from "../../../common/utils";
import helmChartManagerInjectable from "../helm-chart-manager.injectable"; import helmChartManagerInjectable from "../helm-chart-manager.injectable";

View File

@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { ExecFileException } from "child_process"; import type { ExecFileException } from "child_process";
import execFileInjectable from "../../../common/fs/exec-file.injectable"; import execFileInjectable from "../../../common/fs/exec-file.injectable";
import type { AsyncResult } from "../../../common/utils/async-result"; import type { AsyncResult } from "../../../common/utils/result";
import helmBinaryPathInjectable from "../helm-binary-path.injectable"; import helmBinaryPathInjectable from "../helm-binary-path.injectable";
import execHelmEnvInjectable from "./exec-env.injectable"; import execHelmEnvInjectable from "./exec-env.injectable";

View File

@ -4,7 +4,7 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import execHelmInjectable from "../exec-helm/exec-helm.injectable"; import execHelmInjectable from "../exec-helm/exec-helm.injectable";
import type { AsyncResult } from "../../../common/utils/async-result"; import type { AsyncResult } from "../../../common/utils/result";
export type HelmEnv = Record<string, string> & { export type HelmEnv = Record<string, string> & {
HELM_REPOSITORY_CACHE?: string; HELM_REPOSITORY_CACHE?: string;

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { AsyncResult } from "../../../../../common/utils/async-result"; import type { AsyncResult } from "../../../../../common/utils/result";
import execHelmInjectable from "../../../exec-helm/exec-helm.injectable"; import execHelmInjectable from "../../../exec-helm/exec-helm.injectable";
import yaml from "js-yaml"; import yaml from "js-yaml";
import type { KubeJsonApiData, KubeJsonApiDataList } from "../../../../../common/k8s-api/kube-json-api"; import type { KubeJsonApiData, KubeJsonApiDataList } from "../../../../../common/k8s-api/kube-json-api";

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { AsyncResult } from "../../../../../../common/utils/async-result"; import type { AsyncResult } from "../../../../../../common/utils/result";
import nonPromiseExecFileInjectable from "./non-promise-exec-file.injectable"; import nonPromiseExecFileInjectable from "./non-promise-exec-file.injectable";
import { isNumber } from "../../../../../../common/utils"; import { isNumber } from "../../../../../../common/utils";
import assert from "assert"; import assert from "assert";

View File

@ -5,7 +5,7 @@
import { getDiForUnitTesting } from "../../../../../getDiForUnitTesting"; import { getDiForUnitTesting } from "../../../../../getDiForUnitTesting";
import type { ExecFileWithInput } from "./exec-file-with-input.injectable"; import type { ExecFileWithInput } from "./exec-file-with-input.injectable";
import execFileWithInputInjectable from "./exec-file-with-input.injectable"; import execFileWithInputInjectable from "./exec-file-with-input.injectable";
import type { AsyncResult } from "../../../../../../common/utils/async-result"; import type { AsyncResult } from "../../../../../../common/utils/result";
import nonPromiseExecFileInjectable from "./non-promise-exec-file.injectable"; import nonPromiseExecFileInjectable from "./non-promise-exec-file.injectable";
import { getPromiseStatus } from "../../../../../../common/test-utils/get-promise-status"; import { getPromiseStatus } from "../../../../../../common/test-utils/get-promise-status";
import EventEmitter from "events"; import EventEmitter from "events";

View File

@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import callForHelmManifestInjectable from "./call-for-helm-manifest/call-for-helm-manifest.injectable"; import callForHelmManifestInjectable from "./call-for-helm-manifest/call-for-helm-manifest.injectable";
import type { KubeJsonApiData, KubeJsonApiDataList } from "../../../../common/k8s-api/kube-json-api"; import type { KubeJsonApiData, KubeJsonApiDataList } from "../../../../common/k8s-api/kube-json-api";
import type { AsyncResult } from "../../../../common/utils/async-result"; import type { AsyncResult } from "../../../../common/utils/result";
export type GetHelmReleaseResources = ( export type GetHelmReleaseResources = (
name: string, name: string,

View File

@ -12,7 +12,7 @@ import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest"; import asyncFn from "@async-fn/jest";
import type { ExecFileWithInput } from "./call-for-kube-resources-by-manifest/exec-file-with-input/exec-file-with-input.injectable"; import type { ExecFileWithInput } from "./call-for-kube-resources-by-manifest/exec-file-with-input/exec-file-with-input.injectable";
import execFileWithInputInjectable from "./call-for-kube-resources-by-manifest/exec-file-with-input/exec-file-with-input.injectable"; import execFileWithInputInjectable from "./call-for-kube-resources-by-manifest/exec-file-with-input/exec-file-with-input.injectable";
import type { AsyncResult } from "../../../../common/utils/async-result"; import type { AsyncResult } from "../../../../common/utils/result";
import type { KubeJsonApiData } from "../../../../common/k8s-api/kube-json-api"; import type { KubeJsonApiData } from "../../../../common/k8s-api/kube-json-api";
describe("get helm release resources", () => { describe("get helm release resources", () => {

View File

@ -9,7 +9,7 @@ import readYamlFileInjectable from "../../../../common/fs/read-yaml-file.injecta
import getHelmEnvInjectable from "../../get-helm-env/get-helm-env.injectable"; import getHelmEnvInjectable from "../../get-helm-env/get-helm-env.injectable";
import execHelmInjectable from "../../exec-helm/exec-helm.injectable"; import execHelmInjectable from "../../exec-helm/exec-helm.injectable";
import loggerInjectable from "../../../../common/logger.injectable"; import loggerInjectable from "../../../../common/logger.injectable";
import type { AsyncResult } from "../../../../common/utils/async-result"; import type { AsyncResult } from "../../../../common/utils/result";
interface HelmRepositoryFromYaml { interface HelmRepositoryFromYaml {
name: string; name: string;

View File

@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable";
import execHelmInjectable from "../../exec-helm/exec-helm.injectable"; import execHelmInjectable from "../../exec-helm/exec-helm.injectable";
import type { HelmRepo } from "../../../../common/helm/helm-repo"; import type { HelmRepo } from "../../../../common/helm/helm-repo";
import loggerInjectable from "../../../../common/logger.injectable"; import loggerInjectable from "../../../../common/logger.injectable";
import type { AsyncResult } from "../../../../common/utils/async-result"; import type { AsyncResult } from "../../../../common/utils/result";
const removeHelmRepositoryInjectable = getInjectable({ const removeHelmRepositoryInjectable = getInjectable({
id: "remove-helm-repository", id: "remove-helm-repository",

View File

@ -14,7 +14,7 @@ import type { WriteFile } from "../../common/fs/write-file.injectable";
import type { RemovePath } from "../../common/fs/remove.injectable"; import type { RemovePath } from "../../common/fs/remove.injectable";
import type { ExecFile } from "../../common/fs/exec-file.injectable"; import type { ExecFile } from "../../common/fs/exec-file.injectable";
import type { JoinPaths } from "../../common/path/join-paths.injectable"; import type { JoinPaths } from "../../common/path/join-paths.injectable";
import type { AsyncResult } from "../../common/utils/async-result"; import type { AsyncResult } from "../../common/utils/result";
export interface ResourceApplierDependencies { export interface ResourceApplierDependencies {
emitAppEvent: EmitAppEvent; emitAppEvent: EmitAppEvent;

View File

@ -7,7 +7,7 @@ import type { HelmReleaseDto } from "../../../../../common/k8s-api/endpoints/hel
import requestHelmReleasesInjectable from "../../../../../common/k8s-api/endpoints/helm-releases.api/request-releases.injectable"; import requestHelmReleasesInjectable from "../../../../../common/k8s-api/endpoints/helm-releases.api/request-releases.injectable";
import type { HelmReleaseDetails } from "../../../../../common/k8s-api/endpoints/helm-releases.api/request-details.injectable"; import type { HelmReleaseDetails } from "../../../../../common/k8s-api/endpoints/helm-releases.api/request-details.injectable";
import requestHelmReleaseDetailsInjectable from "../../../../../common/k8s-api/endpoints/helm-releases.api/request-details.injectable"; import requestHelmReleaseDetailsInjectable from "../../../../../common/k8s-api/endpoints/helm-releases.api/request-details.injectable";
import type { AsyncResult } from "../../../../../common/utils/async-result"; import type { AsyncResult } from "../../../../../common/utils/result";
export interface DetailedHelmRelease { export interface DetailedHelmRelease {
release: HelmReleaseDto; release: HelmReleaseDto;

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { AsyncResult } from "../../../../../../common/utils/async-result"; import type { AsyncResult } from "../../../../../../common/utils/result";
import apiManagerInjectable from "../../../../../../common/k8s-api/api-manager/manager.injectable"; import apiManagerInjectable from "../../../../../../common/k8s-api/api-manager/manager.injectable";
import type { JsonPatch } from "../../../../../../common/k8s-api/kube-object.store"; import type { JsonPatch } from "../../../../../../common/k8s-api/kube-object.store";
import type { KubeObject } from "../../../../../../common/k8s-api/kube-object"; import type { KubeObject } from "../../../../../../common/k8s-api/kube-object";

View File

@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { KubeObject } from "../../../../../../common/k8s-api/kube-object"; import type { KubeObject } from "../../../../../../common/k8s-api/kube-object";
import { parseKubeApi } from "../../../../../../common/k8s-api/kube-api-parse"; import { parseKubeApi } from "../../../../../../common/k8s-api/kube-api-parse";
import type { AsyncResult } from "../../../../../../common/utils/async-result"; import type { AsyncResult } from "../../../../../../common/utils/result";
import { getErrorMessage } from "../../../../../../common/utils/get-error-message"; import { getErrorMessage } from "../../../../../../common/utils/get-error-message";
import apiManagerInjectable from "../../../../../../common/k8s-api/api-manager/manager.injectable"; import apiManagerInjectable from "../../../../../../common/k8s-api/api-manager/manager.injectable";
import { waitUntilDefined } from "../../../../../../common/utils"; import { waitUntilDefined } from "../../../../../../common/utils";

View File

@ -13,7 +13,7 @@ import releasesInjectable from "../../+helm-releases/releases.injectable";
import updateReleaseInjectable from "../../+helm-releases/update-release/update-release.injectable"; import updateReleaseInjectable from "../../+helm-releases/update-release/update-release.injectable";
import type { HelmRelease } from "../../../../common/k8s-api/endpoints/helm-releases.api"; import type { HelmRelease } from "../../../../common/k8s-api/endpoints/helm-releases.api";
import requestHelmReleaseConfigurationInjectable from "../../../../common/k8s-api/endpoints/helm-releases.api/request-configuration.injectable"; import requestHelmReleaseConfigurationInjectable from "../../../../common/k8s-api/endpoints/helm-releases.api/request-configuration.injectable";
import type { AsyncResult } from "../../../../common/utils/async-result"; import type { AsyncResult } from "../../../../common/utils/result";
import { waitUntilDefined } from "../../../utils"; import { waitUntilDefined } from "../../../utils";
import type { SelectOption } from "../../select"; import type { SelectOption } from "../../select";
import type { DockTab } from "../dock/store"; import type { DockTab } from "../dock/store";