jstack
jstack copied to clipboard
feat(cli): Optional dev enhancements (mprocs)
This pull request adds first-class support for Cloudflare Workers (Wrangler) to the CLI project scaffolding process. It introduces a new CLI prompt to ask users if their API will run on Cloudflare Workers, and, if so, configures the generated project with appropriate scripts, dependencies, and a wrangler.json configuration file. It also updates several package versions and resolves some dependency version conflicts.
Cloudflare Workers integration:
- Adds a new prompt to the CLI (
runCli) asking if the API will run on Cloudflare Workers, and passes this choice through the scaffolding process (cli/src/cli/index.ts,cli/src/helpers/scaffold-project.ts,cli/src/index.ts). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] - Adds a new helper (
configureWranglerDev) that updatespackage.jsonscripts and devDependencies, creates anmprocs.yamlfor concurrent development, and is invoked if Cloudflare Workers is selected (cli/src/helpers/configure-wrangler-dev.ts). - Adds a default
wrangler.jsonconfiguration file for Cloudflare Workers to the project template (cli/template/base/wrangler.json).
Dependency and template updates:
- Updates several dependencies and devDependencies in
base-package.json, including@tailwindcss/postcss,@tanstack/react-query,superjson,tailwind-merge,zod, and others. Also resolves merge conflicts in dependency versions. [1] [2]
These changes streamline the process for users who want to deploy their API on Cloudflare Workers, ensuring the generated project is ready to use with Wrangler out of the box.