create-prisma 0.7.1-pr.51.166.1 → 0.7.1-pr.52.167.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -12
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-DEsFPSPI.mjs → src-BZW88NIr.mjs} +320 -315
- package/package.json +1 -1
- package/templates/create/astro/README.md.hbs +9 -7
- package/templates/create/astro/astro.config.mjs.hbs +11 -14
- package/templates/create/astro/module.ts.hbs +32 -0
- package/templates/create/astro/prisma-composer.config.ts.hbs +10 -0
- package/templates/create/astro/service.ts.hbs +21 -0
- package/templates/create/astro/src/lib/prisma.ts.hbs +23 -0
- package/templates/create/elysia/README.md.hbs +9 -9
- package/templates/create/elysia/module.ts.hbs +32 -0
- package/templates/create/elysia/package.json.hbs +2 -2
- package/templates/create/elysia/prisma-composer.config.ts.hbs +10 -0
- package/templates/create/elysia/service.ts.hbs +21 -0
- package/templates/create/elysia/src/lib/prisma.ts.hbs +23 -0
- package/templates/create/hono/README.md.hbs +9 -9
- package/templates/create/hono/module.ts.hbs +32 -0
- package/templates/create/hono/package.json.hbs +2 -2
- package/templates/create/hono/prisma-composer.config.ts.hbs +10 -0
- package/templates/create/hono/service.ts.hbs +21 -0
- package/templates/create/hono/src/lib/prisma.ts.hbs +23 -0
- package/templates/create/nest/README.md.hbs +8 -8
- package/templates/create/nest/module.ts.hbs +32 -0
- package/templates/create/nest/package.json.hbs +2 -2
- package/templates/create/nest/prisma-composer.config.ts.hbs +10 -0
- package/templates/create/nest/src/lib/prisma.ts.hbs +23 -0
- package/templates/create/nest/src/service.ts.hbs +21 -0
- package/templates/create/next/README.md.hbs +9 -7
- package/templates/create/next/module.ts.hbs +32 -0
- package/templates/create/next/package.json.hbs +2 -2
- package/templates/create/next/prisma-composer.config.ts.hbs +10 -0
- package/templates/create/next/service.ts.hbs +21 -0
- package/templates/create/next/src/lib/prisma.ts.hbs +23 -0
- package/templates/create/nuxt/README.md.hbs +9 -7
- package/templates/create/nuxt/module.ts.hbs +32 -0
- package/templates/create/nuxt/prisma-composer.config.ts.hbs +10 -0
- package/templates/create/nuxt/server/utils/prisma.ts.hbs +23 -0
- package/templates/create/nuxt/service.ts.hbs +21 -0
- package/templates/create/svelte/README.md.hbs +0 -11
- package/templates/create/tanstack-start/README.md.hbs +9 -7
- package/templates/create/tanstack-start/module.ts.hbs +32 -0
- package/templates/create/tanstack-start/prisma-composer.config.ts.hbs +10 -0
- package/templates/create/tanstack-start/service.ts.hbs +21 -0
- package/templates/create/tanstack-start/src/lib/prisma.server.ts.hbs +23 -0
- package/templates/create/turborepo/README.md.hbs +9 -7
- package/templates/create/turborepo/apps/api/package.json.hbs +2 -2
- package/templates/create/turborepo/apps/api/src/index.ts.hbs +25 -1
- package/templates/create/turborepo/apps/api/src/service.ts.hbs +21 -0
- package/templates/create/turborepo/module.ts.hbs +32 -0
- package/templates/create/turborepo/packages/db/src/client.ts.hbs +3 -11
- package/templates/create/turborepo/prisma-composer.config.ts.hbs +10 -0
- package/templates/create/turborepo/turbo.json +0 -1
- package/templates/create/astro/prisma.compute.ts.hbs +0 -10
- package/templates/create/elysia/prisma.compute.ts.hbs +0 -11
- package/templates/create/hono/prisma.compute.ts.hbs +0 -10
- package/templates/create/nest/prisma.compute.ts.hbs +0 -10
- package/templates/create/next/prisma.compute.ts.hbs +0 -9
- package/templates/create/nuxt/prisma.compute.ts.hbs +0 -9
- package/templates/create/tanstack-start/prisma.compute.ts.hbs +0 -9
- package/templates/create/turborepo/prisma.compute.ts.hbs +0 -14
package/README.md
CHANGED
|
@@ -8,12 +8,12 @@ Scaffold a new app with Prisma already wired up.
|
|
|
8
8
|
|
|
9
9
|
- creates a new app from a supported template
|
|
10
10
|
- adds Prisma 7 dependencies for your database
|
|
11
|
-
- scaffolds `prisma/schema.prisma`, `prisma/seed.ts`, `prisma.config.ts`, and
|
|
11
|
+
- scaffolds `prisma/schema.prisma`, `prisma/seed.ts`, `prisma.config.ts`, and a Composer application graph for supported templates
|
|
12
12
|
- writes a Prisma client singleton in the right place for the selected template
|
|
13
13
|
- adds `db:generate`, `db:migrate`, and `db:seed` scripts
|
|
14
14
|
- creates or updates the template env file with `DATABASE_URL`
|
|
15
15
|
- can install dependencies and run `prisma generate` for you
|
|
16
|
-
- can deploy the finished app
|
|
16
|
+
- can deploy the finished app and its Prisma Postgres database with Prisma Composer
|
|
17
17
|
|
|
18
18
|
## Quick Start
|
|
19
19
|
|
|
@@ -77,13 +77,13 @@ Use Prisma Postgres auto-provisioning:
|
|
|
77
77
|
create-prisma --name my-app --template nest --provider postgresql --prisma-postgres
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
Deploy a supported app
|
|
80
|
+
Deploy a supported app with Prisma Composer:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
83
|
create-prisma --name my-api --template hono --provider postgresql --deploy
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
With PostgreSQL and no `--database-url`, the
|
|
86
|
+
With PostgreSQL and no `--database-url`, the deploy flow asks whether to use Prisma Postgres. If accepted, or if `--prisma-postgres` is passed, Composer provisions the database as part of the application graph, injects its connection into the service, and deploys both together. Pass `--no-prisma-postgres` to bind an existing database URL instead.
|
|
87
87
|
|
|
88
88
|
## Supported Templates
|
|
89
89
|
|
|
@@ -97,7 +97,7 @@ With PostgreSQL and no `--database-url`, the Compute flow asks whether to use Pr
|
|
|
97
97
|
- `tanstack-start`
|
|
98
98
|
- `turborepo`
|
|
99
99
|
|
|
100
|
-
Prisma
|
|
100
|
+
Prisma Composer files are included by default, and deployment is supported for:
|
|
101
101
|
|
|
102
102
|
- `hono`
|
|
103
103
|
- `elysia`
|
|
@@ -124,6 +124,8 @@ Prisma Compute deployment is currently supported for:
|
|
|
124
124
|
- `bun`
|
|
125
125
|
- `deno`
|
|
126
126
|
|
|
127
|
+
Composer generation and deployment currently apply to the Node-compatible package manager choices (`npm`, `pnpm`, `yarn`, and `bun`). Deno scaffolding remains available without Composer.
|
|
128
|
+
|
|
127
129
|
## Useful Flags
|
|
128
130
|
|
|
129
131
|
- `--name` project name or relative path
|
|
@@ -131,7 +133,7 @@ Prisma Compute deployment is currently supported for:
|
|
|
131
133
|
- `--provider` choose the database provider
|
|
132
134
|
- `--package-manager` choose the package manager/runtime
|
|
133
135
|
- `--schema-preset empty|basic`
|
|
134
|
-
- `--deploy` deploy supported templates
|
|
136
|
+
- `--deploy` deploy supported templates with Prisma Composer
|
|
135
137
|
- `--yes` accept defaults and skip prompts
|
|
136
138
|
- `--no-install` scaffold only
|
|
137
139
|
- `--no-generate` skip `prisma generate`
|
|
@@ -149,11 +151,11 @@ Prisma Compute deployment is currently supported for:
|
|
|
149
151
|
- Prisma IDE extension install
|
|
150
152
|
|
|
151
153
|
These can be selected interactively or enabled with flags.
|
|
152
|
-
When
|
|
154
|
+
When Composer deployment is selected, the skills add-on recommends the `prisma-compute` skill too.
|
|
153
155
|
|
|
154
|
-
## Deploy
|
|
156
|
+
## Deploy with Prisma Composer
|
|
155
157
|
|
|
156
|
-
|
|
158
|
+
Supported templates include Composer by default: `module.ts` declares the application graph, `service.ts` declares the Compute service and its dependencies, and `prisma-composer.config.ts` selects the Prisma Cloud target. The generated project is ready to deploy whether or not you deploy during creation.
|
|
157
159
|
|
|
158
160
|
Accept the deploy prompt when it appears, or pass the flag:
|
|
159
161
|
|
|
@@ -161,11 +163,11 @@ Accept the deploy prompt when it appears, or pass the flag:
|
|
|
161
163
|
create-prisma --name my-api --template hono --provider postgresql --deploy
|
|
162
164
|
```
|
|
163
165
|
|
|
164
|
-
|
|
166
|
+
Deployment requires `PRISMA_SERVICE_TOKEN` and `PRISMA_WORKSPACE_ID`. With PostgreSQL and no `--database-url`, create-prisma asks whether to use Prisma Postgres. If accepted, Composer provisions the database and passes its connection through `service.load()`. After the first deployment, create-prisma writes a direct connection to the Prisma env file and runs the requested migration and seed. Other database configurations are passed through a secret Composer service input.
|
|
165
167
|
|
|
166
|
-
A `
|
|
168
|
+
A `deploy` script is generated for npm, pnpm, Yarn, and Bun. It applies existing migrations for a Composer-managed database, builds the framework artifact, and runs `prisma-composer deploy module.ts`.
|
|
167
169
|
|
|
168
|
-
The
|
|
170
|
+
The only Composer-specific prompt asks whether to deploy immediately. It is skipped in `--yes` runs unless you pass `--deploy`; the Composer files are still generated.
|
|
169
171
|
|
|
170
172
|
## Local Development
|
|
171
173
|
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as createCreatePrismaCli } from "./src-
|
|
2
|
+
import { n as createCreatePrismaCli } from "./src-BZW88NIr.mjs";
|
|
3
3
|
//#region src/cli.ts
|
|
4
4
|
await createCreatePrismaCli().run({ formatError: (error) => error instanceof Error ? error.message : String(error) });
|
|
5
5
|
if (process.exitCode && process.exitCode !== 0) process.exit(process.exitCode);
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as CreateTemplateSchema, c as PackageManagerSchema, i as CreateCommandInputSchema, l as SchemaPresetSchema, n as createCreatePrismaCli, o as DatabaseProviderSchema, r as router, s as DatabaseUrlSchema, t as create } from "./src-
|
|
2
|
+
import { a as CreateTemplateSchema, c as PackageManagerSchema, i as CreateCommandInputSchema, l as SchemaPresetSchema, n as createCreatePrismaCli, o as DatabaseProviderSchema, r as router, s as DatabaseUrlSchema, t as create } from "./src-BZW88NIr.mjs";
|
|
3
3
|
export { CreateCommandInputSchema, CreateTemplateSchema, DatabaseProviderSchema, DatabaseUrlSchema, PackageManagerSchema, SchemaPresetSchema, create, createCreatePrismaCli, router };
|