pkg:create-deepcrawl:feat add jwt onboarding and dry-run preview - #24
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAdds a new "npm create deepcrawl" self-hosting guide and CLI post-deploy quick-test flow; implements HS256 JWT minting, env-file upsert and dual-file local JWT persistence, quick-test runner (with curl preview), deployment parsing, CLI card rendering, UI components, and many unit tests. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant FS as FileSystem
participant JWT as JWT_Generator
participant Worker
User->>CLI: run "npm create deepcrawl" / accept "Try your API now?"
CLI->>FS: prepare local project (patch wrangler, upsert env files)
FS-->>CLI: return local JWT secret file paths
CLI->>CLI: prompt quick-test input (kind, targetUrl)
alt authMode == jwt
CLI->>JWT: mintHs256Jwt(secret, iss?, aud?)
JWT-->>CLI: temporary Bearer token (15m)
CLI->>Worker: fetch workerUrl + path with Authorization header
else
CLI->>Worker: fetch workerUrl + path without Authorization
end
Worker-->>CLI: response (status, body)
CLI->>CLI: format/truncate preview, build curl command
CLI-->>User: render success/failure card with preview and curl
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds an improved post-deployment onboarding experience for create-deepcrawl, including JWT-focused guidance, a “success” summary card, and an interactive quick-test flow (plus a dry-run preview path).
Changes:
- Add success/preview CLI “cards” and a post-deploy quick test (with optional JWT auto-minting).
- Persist
JWT_SECRETinto local Wrangler env files (.dev.vars+.dev.vars.production) and optionally show generated secrets once. - Improve deployment parsing to extract Worker name/URL/version, and expand docs to cover the new onboarding flow.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/create-deepcrawl/src/ui/terminal-style.ts | Adds additional terminal styling helpers (yellow/bold/highlight). |
| packages/create-deepcrawl/src/ui/render-card.ts | Introduces CLI box/card renderer that accounts for ANSI styling. |
| packages/create-deepcrawl/src/ui/card-format.ts | Adds wrapping/indent helpers and secret “box” rendering. |
| packages/create-deepcrawl/src/ui/quick-test.ts | Implements interactive prompt flow + formatting for quick test results. |
| packages/create-deepcrawl/src/ui/prompt-answers.ts | Tracks whether JWT secret was generated; defaults “Deploy now?” to yes. |
| packages/create-deepcrawl/src/ui/deployment-success.ts | Builds the post-deploy success card (docs link, JWT guidance, file locations). |
| packages/create-deepcrawl/src/lib/jwt-token.ts | Adds HS256 JWT minting for quick tests. |
| packages/create-deepcrawl/src/lib/env-file.ts | Adds env-file upsert helper used to persist JWT secrets locally. |
| packages/create-deepcrawl/src/steps/write-v0-local-jwt-secret.ts | Writes JWT_SECRET to both local and production .dev.vars* files. |
| packages/create-deepcrawl/src/steps/quick-test-v0-worker.ts | Runs real quick tests + builds simulated preview results; mints JWT when needed. |
| packages/create-deepcrawl/src/steps/patch-v0-wrangler.ts | Aligns root vars with env.production.vars from an allowlist. |
| packages/create-deepcrawl/src/steps/deploy-v0-worker.ts | Captures deploy output for parsing and returns deployment metadata. |
| packages/create-deepcrawl/src/run.ts | Orchestrates preview-mode flow + post-deploy success + optional quick test. |
| packages/create-deepcrawl/src/tests/* | Adds coverage for JWT minting, env file upserts, deploy output parsing, and quick tests. |
| packages/create-deepcrawl/docs/v0/*.md | Updates internal CLI flow docs to include secret persistence + quick test. |
| packages/create-deepcrawl/docs/README.md | Updates package docs to reflect the new onboarding/quick test behavior. |
| apps/app/content/docs/reference/self-hosting/meta.json | Adds the new public doc page to navigation. |
| apps/app/content/docs/reference/self-hosting/index.mdx | Points users to the new “create-deepcrawl” deployment path. |
| apps/app/content/docs/reference/self-hosting/create-deepcrawl.mdx | Adds a new public doc page for npm create deepcrawl. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 381e89f3a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
…uccess card formatting
…ation with new CLI features
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78bff6c38c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
…nhance static route generation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99f8926f6d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
Summary by CodeRabbit
New Features
Website
Documentation
Tests