@suluk/env - v0.2.0
    Preparing search index...

    Interface VarSpec

    interface VarSpec {
        secret?: boolean;
        required?: boolean;
        default?: string;
        surfaces?: Surface[];
        description?: string;
        example?: string;
        pattern?: string | RegExp;
        minLength?: number;
        requiredInSurface?: Surface[];
        forbidInSurface?: {
            pattern: string | RegExp;
            surfaces: Surface[];
            message?: string;
            severity?: IssueSeverity;
        }[];
    }
    Index

    Properties

    secret?: boolean

    a secret — its value must be ENCRYPTED at rest in the committed .env (plaintext is flagged).

    required?: boolean

    must be present (after defaults) — else parse() throws and health = "missing".

    default?: string

    fallback value when absent.

    surfaces?: Surface[]

    which surfaces need this var (default: every surface). Drives the deploy/vscode projections.

    description?: string
    example?: string
    pattern?: string | RegExp

    the value, when present, must match this regex (source string or RegExp).

    minLength?: number

    the value, when present, must be at least this long (a too-short secret is a real misconfiguration).

    requiredInSurface?: Surface[]

    required ONLY when validating for one of these surfaces (in addition to required, which is always).

    forbidInSurface?: {
        pattern: string | RegExp;
        surfaces: Surface[];
        message?: string;
        severity?: IssueSeverity;
    }[]

    value patterns that are FORBIDDEN on specific surfaces — e.g. a sk_test_ key on cloudflare. Default severity "warning" (a gated nudge); set "error" to fail closed.