feat(fullstack init --next): auto-run bun run rename after nest-base clone#83
Merged
pascal-klesse merged 1 commit intomainfrom Apr 30, 2026
Merged
feat(fullstack init --next): auto-run bun run rename after nest-base clone#83pascal-klesse merged 1 commit intomainfrom
bun run rename after nest-base clone#83pascal-klesse merged 1 commit intomainfrom
Conversation
…e clone The experimental nest-base template hard-codes `nest-base` in four files (package.json, README.md, portless.yml, docker-compose.yml). The repo ships `bun run rename <name>` to patch them all idempotently, but until now consumers had to remember to invoke it themselves. Friction-log runs kept surfacing the gap: agents skip the manual step, half the workspace still says "nest-base". The CLI already knows the desired name from --name, so it now runs the rename automatically after the API clone. Failure is non-fatal — the workspace is still usable and the warning prints the exact command to retry. Restore the package.json `name` to "nest-base" first: setupServer- ForFullstack pre-patches it to projectDir, which would make the rename planner treat projectDir as the old slug and skip the README/portless/ compose rewrites. Resetting before the run gives the planner a coherent canonical starting state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
lt fullstack init --nextnow runsbun run rename <projectDir>insideprojects/api/automatically after the nest-base clone, removing a manual follow-up step that agents and humans repeatedly skipped.setupServerForFullstackpatchespackage.jsontoname = projectDir, which would make the rename planner treatprojectDiras the old slug and silently skip the README/portless/compose rewrites. To work around that without changingserver.ts, init.ts resets the name back to"nest-base"immediately before invoking the rename, so the planner sees the canonical starting state across all four files.Why
The nest-base template ships hard-coded
nest-basereferences in four files (package.json,README.md,portless.yml,docker-compose.yml). The repo'sbun run renamepatches all four idempotently, but until now consumers had to remember to invoke it themselves. Friction-log driven tests kept surfacing the gap.The script depends only on
node:fs,node:path, and project-local TS files, so Bun runs it cleanly beforebun installhas to happen — verified againstscripts/rename-project.tsandsrc/core/setup/project-rename-runner.tsin the nest-server-reload sources.Test plan
__tests__/fullstack-init-next-rename.test.tscovering: rename invocation is wired in, the experimental flag gates it, the Next-section no longer prompts the user to rename manually, and the package.json reset preserves description/version while flipping name.npm run lintcleannpm test— 157 passed, 1 skipped (the previously-flakyconfig-json-validity.test.tsTS2451 conflict actually clears on this branch because the new test scopes itsgluegunimport inside thedescribe)Out of scope
lt fullstack init --nextflow belongs in a separate PR.🤖 Generated with Claude Code