@topgroup/diginext
Version:
A BUILD SERVER & CLI to deploy apps to any Kubernetes clusters.
59 lines • 2.27 kB
TypeScript
import type execa from "execa";
import type { ICloudDatabase } from "../entities/CloudDatabase";
import type { ICloudProvider } from "../entities/CloudProvider";
import type { ICluster } from "../entities/Cluster";
import type { IContainerRegistry } from "../entities/ContainerRegistry";
import type { IFramework } from "../entities/Framework";
import type { IGitProvider } from "../entities/GitProvider";
import type { IUser } from "../entities/User";
import type { IWorkspace } from "../entities/Workspace";
import type InputOptions from "../interfaces/InputOptions";
import type { ResourceQuotaSize } from "../interfaces/SystemTypes";
export declare const cliOpts: execa.Options;
export type ResourceQuota = {
requests: {
cpu: string | null;
memory: string | null;
};
limits: {
cpu: string | null;
memory: string | null;
};
};
export declare const containerCpus: string[];
export declare const containerMemories: string[];
export declare function getContainerResource(cpu: string | null, memory: string | null): ResourceQuota;
export declare const containerResources: Record<ResourceQuotaSize, ResourceQuota>;
export declare const getContainerResourceBySize: (size: ResourceQuotaSize) => ResourceQuota;
export type CliConfig = {
buildServerUrl?: string;
access_token?: string;
refresh_token?: string;
apiToken?: string;
currentUser?: IUser;
currentWorkspace?: IWorkspace;
defaultFramework?: IFramework;
github_access_token?: string;
currentGitProvider?: IGitProvider;
currentRegistry?: IContainerRegistry;
currentProvider?: ICloudProvider;
currentCluster?: ICluster;
currentDatabase?: ICloudDatabase;
gitProviders?: IGitProvider[];
k8sClusters?: ICluster[];
containerRegistries?: IContainerRegistry[];
providers?: ICloudProvider[];
databases?: ICloudDatabase[];
frameworks?: IFramework[];
};
/**
* Get local CLI config
*/
export declare const getCliConfig: () => CliConfig;
/**
* Save/update CLI config locally
* @param {CliConfig} updatedConfig
*/
export declare const saveCliConfig: (updatedConfig: CliConfig) => CliConfig;
export declare const execConfig: (options?: InputOptions) => Promise<void>;
//# sourceMappingURL=config.d.ts.map