fix(create): honor non-interactive mode in scaffolded generators - #2677
Conversation
Pass the interaction mode to local Bingo generators and validate starter arguments before invoking the programmatic API. Preserve the interactive CLI path and document the update needed for existing generators.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
When |
Running a scaffolded local generator with
vp create <generator> --no-interactivestill entered Bingo's prompts when required arguments were missing. With closed stdin, this exited with an unsettled top-level await instead of an actionable validation error. Bingo's--skip-requestsflag does not disable prompts.Pass
VP_CREATE_INTERACTIVEto local Bingo generators. The starter uses Bingo's programmatic API in non-interactive mode, validates CLI arguments and required template options before generation, and rejects existing output directories. Interactive runs, help, and version requests retain the Bingo CLI path.This applies to newly scaffolded generators. Existing copied entrypoints require an update, and custom template options need corresponding CLI argument declarations; the starter README documents both requirements.
Validation:
pnpm exec vitest run packages/cli/src/create/__tests__: 194 tests passed.pnpm exec tsc --project packages/cli/templates/generator/tsconfig.json: passed.cargo test -p vp_cli_snapshots -- create_generator_: both generator cases passed in comparison mode after recording and reviewing the updated snapshot.The regression covers missing arguments without prompts, no output directory on validation failure, preservation of existing files, successful file generation, and the interactive execution path. Validation was scoped to generator behavior; the full repository test suite was not run.