-
fix(misc): handle non-interactive mode and add template shorthand names for CNW (#35045)
发布于
2026-03-27 17:59:15 +00:00 This PR address some common errors seen during CNW around
--template
and--presetduring non-interactive flows that are not AI agents. Also
sees that some template names are not qualified with
nrwl/<name>-templateso 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--presetprovided, 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--presetnor
--templateis provided.Shorthand template names are supported:
--template=angular→nrwl/angular-template--template=react→nrwl/react-template--template=typescript→nrwl/typescript-template--template=empty→nrwl/empty-template
Related Issue(s)
Fixes NXC-4153
下载附件