Setu-TS
    Preparing search index...

    0.2.0

    interface FromConfigOptions {
        config?: ConfigPluginOptions;
        env?: Readonly<Record<string, unknown>>;
    }
    Index

    Loading options — .env paths, variable expansion, validation schema.

    Forwarded to the loader and carried into the application's own config arm, so one options object governs both.

    env?: Readonly<Record<string, unknown>>

    The environment to read configuration from, instead of the platform's.

    Required on Cloudflare Workers, and the only way this factory works there: Workers bindings arrive as the env argument of the fetch handler, never as a process-wide global, so runtime services built outside a request report an EMPTY environment. Without this the application composes from no configuration at all — and a resolver calling getOrThrow then fails on the first request and, because the boot promise is memoised, on every request after it.

    Omit it on Node, Deno, and Bun: those expose the environment process-wide, and the detected runtime already reads it.

    Non-string values are ignored, so a Workers env carrying KV, D1, or R2 bindings alongside its string variables can be passed verbatim.

    Explicitly | undefined under exactOptionalPropertyTypes: callers forward an optional binding straight through ({ env } where env may be undefined), which would not otherwise type-check against an optional property. The generated Workers entry does exactly that on all four targets.

    Example: A Cloudflare Workers entry

    export default {
    async fetch(request: Request, env: Record<string, unknown>): Promise<Response> {
    const app = await createFullStackAppFromConfig(build, { env });
    await app.start();
    return await app.fetch(request);
    },
    };