studiocms
Version:
Astro Native CMS for AstroDB. Built from the ground up by the Astro community.
18 lines (17 loc) • 1.03 kB
TypeScript
import { Effect } from '../../effect.js';
/**
* @deprecated Use `checkRequiredEnvVarsEffect` instead.
*/
export declare const checkRequiredEnvVars: (envVars: string[]) => Promise<void>;
/**
* Checks for the presence of required environment variables and logs an error if any are missing.
*
* Iterates over the provided list of environment variable names, collecting any that are not set
* in the current process environment. If any required variables are missing, logs an error message
* listing the missing variables and exits the process with a non-zero status code.
*
* @param envVars - An array of environment variable names to check for presence.
* @yields Logs an error and exits the process if any required environment variables are missing.
* @returns `void` if all required environment variables are present.
*/
export declare const checkRequiredEnvVarsEffect: (envVars: string[]) => Effect.Effect<undefined, import("effect/Cause").UnknownException | import("@withstudiocms/effect/clack").ClackError, never>;