feat(cli): prisma template
This pull request adds Prisma ORM support to the CLI, alongside Drizzle, and introduces several improvements to dependency management and project scaffolding. The most significant changes are the addition of a Prisma installer, updates to prompts and types to support Prisma, and the use of wildcard dependency versions for greater flexibility. The PR also improves the developer experience by automatically initializing a git repository for new projects.
Prisma ORM Integration:
- Added Prisma as a supported ORM in the CLI prompts, types, and installer map, allowing users to select Prisma during project setup. (
cli/src/cli/index.ts[1] [2] [3]cli/src/installers/index.ts[4] [5] - Implemented a
prismaInstallerthat sets up all required Prisma dependencies, copies configuration and helper files, adds JStack middleware, and updatespackage.jsonscripts for Prisma workflows. (cli/src/installers/prisma.tscli/src/installers/prisma.tsR1-R64)
Dependency Management Improvements:
- Changed all dependency versions in both the CLI's dependency map and the base project templates to use wildcards (
*), ensuring the latest versions are always installed. (cli/src/installers/dep-version-map.ts[1]cli/template/base-assets/base-package.json[2] - Added new dependencies to support Prisma and CLI enhancements, such as
picocolorsandexeca. (cli/package.json[1]cli/src/helpers/install-base-template.ts[2]
Project Scaffolding Enhancements:
- The CLI now automatically initializes a git repository and makes an initial commit after scaffolding a new project, streamlining the setup process for users. (
cli/src/helpers/install-base-template.tscli/src/helpers/install-base-template.tsR107-R115) - Added a default
wrangler.jsonconfiguration to the base template to facilitate Cloudflare Workers compatibility. (cli/template/base/wrangler.jsoncli/template/base/wrangler.jsonR1-R30)
These changes provide a more flexible and modern developer experience, making it easier to start projects with either Drizzle or Prisma ORM and ensuring up-to-date dependencies by default.