fix(create): honor non-interactive mode in scaffolded generators - #2677
Draft
SaKaNa-Y wants to merge 1 commit into
Draft
fix(create): honor non-interactive mode in scaffolded generators#2677SaKaNa-Y wants to merge 1 commit into
SaKaNa-Y wants to merge 1 commit into
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.