发布

  • fix(misc): handle non-interactive mode and add template shorthand names for CNW (#35045)

    frostbyte_neo 发布于 2026-03-27 17:59:15 +00:00

    This PR address some common errors seen during CNW around --template
    and --preset during non-interactive flows that are not AI agents. Also
    sees that some template names are not qualified with
    nrwl/<name>-template so we can normal though (which also makes it
    shorter in docs).

    Current Behavior

    In non-interactive contexts (IDE terminals, scripts, SSH without -t),
    determineTemplate() returns 'custom' which routes to the preset
    flow. Without --preset provided, this throws "Preset is required",
    which affects ~15 users/day (~145 occurrences Mar 18-27).

    Users must also pass full template paths like
    --template=nrwl/angular-template.

    Expected Behavior

    Non-interactive mode defaults to nrwl/empty-template (template flow)
    instead of 'custom' (preset flow) when neither --preset nor
    --template is provided.

    Shorthand template names are supported:

    • --template=angularnrwl/angular-template
    • --template=reactnrwl/react-template
    • --template=typescriptnrwl/typescript-template
    • --template=emptynrwl/empty-template

    Related Issue(s)

    Fixes NXC-4153

    下载附件