Make typing of HelmRepo shared

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen committed 2022-06-09 14:37:45 +03:00
1 parent 0ba16a81de
commit 0d83d6b6ee
3 files changed
+18 -2

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
export type HelmRepo = {
name: string;
url: string;
cacheFilePath?: string;
caFile?: string;
certFile?: string;
insecureSkipTlsVerify?: boolean;
keyFile?: string;
username?: string;
password?: string;
};
@@ -4,7 +4,7 @@
*/
import { sortCharts } from "../../../common/utils";
import type { HelmRepo } from "../helm-repo-manager";
import type { HelmRepo } from "../../../common/helm-repo";
const charts = new Map([
["stable", {
+1 -1
View File
@@ -5,13 +5,13 @@
import fs from "fs";
import * as yaml from "js-yaml";
import type { HelmRepo } from "./helm-repo-manager";
import logger from "../logger";
import type { RepoHelmChartList } from "../../common/k8s-api/endpoints/helm-charts.api";
import { iter, put, sortCharts } from "../../common/utils";
import { execHelm } from "./exec";
import type { SetRequired } from "type-fest";
import { assert } from "console";
import type { HelmRepo } from "../../common/helm-repo";
interface ChartCacheEntry {
data: string; // serialized JSON