UNPKG

trigger.dev

Version:

A Command-Line Interface for Trigger.dev projects

27 lines (26 loc) • 1.01 kB
/** * Sanitizes environment variables by removing entries with empty or undefined values. * * @param obj - An object containing environment variables as key-value pairs * @returns A new object containing only non-empty string values * * @example * const envVars = { * API_KEY: "123", * EMPTY_VAR: "", * UNDEFINED_VAR: undefined, * WHITESPACE: " " * }; * sanitizeEnvVars(envVars); // Returns { API_KEY: "123" } */ export declare const sanitizeEnvVars: (obj: Record<string, string | undefined>) => Record<string, string>; /** * Keep machine defaults, fresh project values, and local overrides separate. * The worker's merged startup environment must not override fresh project values. */ export declare const buildDevRunEnv: ({ resolvedEnvVars, processEnv, envOverrides, projectRef, }: { resolvedEnvVars: Record<string, string> | undefined; processEnv: Record<string, string>; envOverrides: Record<string, string>; projectRef: string; }) => Record<string, string>;