Repository navigation
fix: 1.1.2 with the healthcheck, scoped names and install fixes - #6
Merged
Merged
Conversation
The healthcheck called http://localhost:3000. On Alpine, localhost can resolve to ::1 first, and the server only listens on IPv4, so the container never became healthy. Nothing in CI waited for the healthcheck, so it went unnoticed.
Gatekeeper counts per clock minute. When the 100 requests crossed the boundary, the count dropped and the 101st request got through, which failed the check now and then.
`create-api-starterkit @acme/api` created ./@acme/api, and the README told you to `docker build -t @acme/api`, which Docker refuses. The project now goes in ./api, package.json keeps @acme/api, and the Docker commands use the folder's name.
The install ran with execSync, which blocks the process, so the spinner froze on its first frame for the whole install. It now runs in the background. npm or pnpm runs without a shell around it (except on Windows, which needs one for npm.cmd), so the timeout stops the install itself, and a timeout now says so instead of looking like any other failure. Only the last 64 KB of output is kept, for showing why an install failed.
After a failed install, the CLI still said "Your API is ready!" and exited with 0, so a script or CI job carried on with a project that couldn't run. It now says the dependencies aren't installed, shows how to finish, and exits with 1. The project files are kept.
A terminal with no size, such as `docker run -t` started from a script, reports 0 columns. ora then works out that it has infinitely many lines to clear, and the CLI used 100% CPU writing escape codes forever once the install finished. The spinner is off there, and the steps print as plain lines.
SibilSoren
force-pushed
the
fix/cli-1.1.2
branch
from
November 17, 2026 06:09
864a0ad to
50fb4cb
Compare
8 of 12 tasks
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.
Description
A patch release with five fixes, so they reach npm before Drizzle (#5) ships in 1.2.0. Two of the commits are the same as in #5 (the healthcheck and the CI flake). I'll rebase #5 onto main once this is merged.
Type of Change
Changes Made
localhost, which can resolve to IPv6 first in the Alpine image while the server listens on IPv4, so containers never became healthy. It now calls127.0.0.1. The docker compose job in feat: PostgreSQL with Drizzle (--db drizzle) #5 found this.@acme/apicreated./@acme/api, and the README'sdocker build -t @acme/apifails because Docker image names can't contain@. The project now goes in./api,package.jsonkeeps@acme/api, and the Docker commands use the folder's name through a new{{IMAGE_NAME}}placeholder.execSync, which blocks the process, so the spinner stayed on its first frame. It now runs throughexecAsyncinsrc/utils/exec.ts. npm or pnpm runs without a shell around it, except on Windows, which needs one fornpm.cmd. That way the 5 minute timeout stops the install itself. The first CI run showed why this matters: on Ubuntu,sh -cstarted the command as a child and only the shell was stopped. Only the last 64 KB of output is kept for the error message, and a timeout says so.--skip-install.docker run -tstarted from a script, makes ora work out infinitely many lines to clear, so the CLI hangs at 100% CPU once the install ends. 1.1.1 does this too. The spinner is now off there.Testing
npx tsx src/index.ts test-project)npm run dev)npm test)npm run lintwith no errorsNew tests cover the scoped folder and names, the Docker image name, a failed install, a terminal with 0 columns, and
execAsyncon its own, including a timeout while a child process still holds the output open. The install tests put a fakenpmfirst onPATH. The spinner test checks that timers keep firing during the install: they fired 0 times on the old code. The 0-column test throws instead of hanging the test run on the old code.Every commit passes lint, typecheck, tests and build. On the last commit, generated projects with and without Gatekeeper pass typecheck, build, tests, lint, the format check and the boot checks from ci.yml.
Screenshots / Logs
By hand, with the built CLI:
@acme/apiinstall with git: the folder isapi, the lockfile is in the first commit, and the generated project builds and passes its 22 tests. A real pnpm install works too, withpnpm-lock.yamlin the first commit.Checklist