@catladder/cli
Version:
Panter cli tool for cloud CI/CD and DevOps
27 lines (26 loc) • 1.24 kB
TypeScript
import type { ComponentContext, EnvironmentEnvVarPart as EnvironmentVariables } from "../types";
import type { CreateComponentContextContext } from "..";
import type { StringOrBashExpression } from "../bash/BashExpression";
import type { EnvironmentContext } from "../types/environmentContext";
export type SecretEnvVar = {
key: string;
hidden?: boolean;
};
declare const getBasePredefinedVariables: (ctx: EnvironmentContext) => {
ENV_SHORT: string;
APP_DIR: string;
ENV_TYPE: "stage" | "dev" | "review" | "prod" | "local";
};
type BasePredefinedVariables = ReturnType<typeof getBasePredefinedVariables>;
export type PredefinedVariables = BasePredefinedVariables & {
HOSTNAME: StringOrBashExpression;
ROOT_URL: StringOrBashExpression;
HOSTNAME_INTERNAL: StringOrBashExpression;
ROOT_URL_INTERNAL: StringOrBashExpression;
};
export declare const getEnvironmentVariables: (ctx: CreateComponentContextContext, options?: {
shouldResolveReferences?: boolean;
}) => Promise<EnvironmentVariables>;
export declare const getSecretVarName: (env: string, componentName: string, key: string) => string;
export declare const getSecretVarNameForContext: (context: ComponentContext, key: string) => string;
export {};