Repository navigation
feat: setup questions with Gatekeeper rate limiting, release 1.1.0 - #2
Merged
Merged
Conversation
The wizard's Gatekeeper option generated code that didn't compile (a default import; gatekeeper only has a named export), set `window: 60`, which is 60 milliseconds, and installed ^1.0.0. - Named import, `window: '1m'` and ^2.0.0, added after request logging - Throw if the app.ts template stops matching instead of skipping silently - --gatekeeper/--no-gatekeeper skip the question; --yes now includes it, the same default as the wizard - Validate the project name inside the prompt instead of exiting after
It installed Prisma 5, which crashes on Node 23 and later, and ran prisma init after the project was committed. A database option with Drizzle and Prisma 7 will come as its own feature.
Creates real projects without installing for each option and combination, and checks the files. A new option now can't quietly change what the others generate.
Checks the rate limit headers are there only when Gatekeeper was chosen, so the project without extras keeps working as features are added.
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
The interactive setup on
mainwas never released, and its options didn't work: the Gatekeeper option generated code that didn't compile, and the Prisma option installed a Prisma version that crashes on Node 23 and later. This PR fixes the Gatekeeper option, drops Prisma for now, adds flags so every question can be answered from the command line, and adds tests so new options can't break the existing ones. It ends with the 1.1.0 release commit.Type of Change
Changes Made
window: '1m'instead of60(which meant 60 milliseconds), and gatekeeper^2.0.0. It goes after request logging, so rate-limited requests are still logged.--gatekeeper/--no-gatekeeper.--yesand CI now use the same default as the question: rate limiting on.Testing
I've tested the CLI tool locally (
npx tsx src/index.ts test-project)The generated project boots successfully (
npm run dev)The generated project's tests pass (
npm test)I've run
npm run lintwith no errorsThe interactive setup was driven with
expect, like a person typing. It rejectedBad Namein the prompt, accepted the corrected name, kept the Gatekeeper default and switched to pnpm with the arrow key.A generated project with Gatekeeper allows 100 requests, then returns 429 with
Retry-Afterand theX-RateLimit-*headers.Every commit in this PR passes typecheck, tests and lint on its own.
Screenshots / Logs
Checklist