Setu-TS
    Preparing search index...

    Interface CliDependencies

    Everything the CLI reaches the outside world through.

    There is deliberately no default: the process-level values (process.cwd(), console.log, the host filesystem) belong to src/main.ts, the one module that owns the process boundary. A defaulted fs here would let a misconfigured call silently degrade to "no filesystem" at runtime.

    interface CliDependencies {
        ask?: Prompter;
        cwd: string;
        error: (message: string) => void;
        fetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | Request | URL, init?: RequestInit): Promise<Response>;
        };
        fs: IFileSystem;
        interrupt?: AbortSignal;
        load?: ModuleLoader;
        loadApp?: ModuleLoader;
        log: (message: string) => void;
        logicalCwd?: string;
        now: () => number;
        portAvailable?: PortProbe;
        runCommand?: CommandRunner;
    }
    Index
    ask?: Prompter

    Asks the questions setu new already accepts as flags.

    OPTIONAL by construction: when absent — as in every gate, which reaches the CLI through an in-process runCli — no prompt is ever attempted and each absent flag takes its documented default. src/main.ts supplies the terminal implementation only when stdin is a terminal.

    cwd: string

    The working directory commands resolve relative paths against (absolute).

    error: (message: string) => void

    Writes a line of error output.

    fetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | Request | URL, init?: RequestInit): Promise<Response>;
    }

    Downloads version-tagged example files; defaults to globalThis.fetch.

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | Request | URL, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | Request | URL
        • Optionalinit: RequestInit

        Returns Promise<Response>

    The filesystem all reads and writes go through.

    interrupt?: AbortSignal

    Cooperative interruption signal supplied by the process boundary.

    Loads a custom schematic module; defaults to a real dynamic import().

    loadApp?: ModuleLoader

    Loads the target project's setu.config.ts; defaults to a real dynamic import(). Only the plugin-command paths use it.

    log: (message: string) => void

    Writes a line of normal output.

    logicalCwd?: string

    The shell's logical working directory, when it is absolute and its real path equals the real path of cwd — the shell's pwd -L rule.

    cwd is physical, so from inside a symlinked workspace member it names the link target and the workspace is invisible. This lets a command notice that the logical path is a listed member and REFUSE to write through the link; it never authorizes a write. Omit it when the shell supplies no such path (Windows, a forged or stale PWD, or a programmatic caller).

    now: () => number

    Wall-clock milliseconds, for timestamped output.

    portAvailable?: PortProbe

    Checks whether a workspace port can bind before the CLI assigns it.

    runCommand?: CommandRunner

    Runs docker, kind, kubectl and git for setu workspace build|deploy (M122).