fix(cli): add "@zenstackhq/schema" package installation for "zenstack create" and "zen init" (#2437)

This commit is contained in:
Yiming Cao 2026-03-03 09:43:45 -08:00 committed by GitHub
parent 518cbb7ddf
commit a49c2da456
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 0 deletions

View file

@ -75,6 +75,10 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
- Kysely query builder as escape hatch instead of raw SQL
- Schema-first approach with ZModel DSL extension of Prisma schema language
## Pull Requests
- Always target the `dev` branch (not `main`) when creating PRs
## Development Notes
- Always run `zenstack generate` after modifying ZModel schemas

View file

@ -13,6 +13,7 @@ import { STARTER_ZMODEL } from './templates';
export async function run(projectPath: string) {
const packages = [
{ name: '@zenstackhq/cli@latest', dev: true },
{ name: '@zenstackhq/schema@latest', dev: false },
{ name: '@zenstackhq/orm@latest', dev: false },
];
let pm = await detect();

View file

@ -67,6 +67,7 @@ function initProject(name: string) {
// install packages
const packages = [
{ name: '@zenstackhq/cli@latest', dev: true },
{ name: '@zenstackhq/schema@latest', dev: false },
{ name: '@zenstackhq/orm@latest', dev: false },
{ name: 'better-sqlite3', dev: false },
{ name: '@types/better-sqlite3', dev: true },

View file

@ -27,6 +27,10 @@
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./package.json": {
"import": "./package.json",
"require": "./package.json"
}
},
"dependencies": {