/** * The variables the runner sets itself. `Variables.builtins` is the only way to * set them, so a new one has to be added here, and a UI never asks for one. */ export declare const BUILTIN_VARIABLES: readonly ["GIT_BRANCH", "PIPELINE_DIR", "PIPELINE_NAME", "PIPELINE_ROUND", "PIPELINE_RESUME", "STAGE_DIR", "ITEM", "ITEM_NAME"]; export type BuiltinVariable = (typeof BUILTIN_VARIABLES)[number]; /** The environment a pipeline runs in. Formulas read it as `vars`; a shell gets it as its environment. */ export declare class Variables { private readonly values; constructor(values: Env); /** * The variables a shell command reads: `$NAME`, `${NAME}`, `${NAME:-x}`, * `${NAME-x}`, `${NAME:+x}`. Not inside single quotes or after a backslash, * and not a name the command assigns itself, like `NAME=x cmd` or `for NAME in`. */ static shellReferences(text: string): Reference[]; /** Values only the runner sets. */ static builtins(values: Partial>): Env; private static reference; get(name: string): string | undefined; /** A copy with more variables, taken as they are. */ with(extra: Env): Variables; without(names: string[]): Variables; /** For a child process. */ toEnv(): Env; } export type Env = Record; export interface Reference { name: string; default?: string; }