-
Notifications
You must be signed in to change notification settings - Fork 986
docs(compute): update CLI commands to Prisma 8 #8149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,13 +6,13 @@ metaTitle: "prisma.compute.ts configuration | Prisma Compute" | |
| metaDescription: "Reference for the prisma.compute.ts file: declare your app's framework, root, port, environment, and build settings, or several apps in a monorepo, with full type safety." | ||
| --- | ||
|
|
||
| `prisma.compute.ts` is an optional, committed file that declares what you deploy. [`app deploy`](/compute/cli-reference#app) already works with zero config (it detects your framework and builds), so reach for a config file when you want one of these: | ||
| `prisma.compute.ts` is an optional, committed file that declares what you deploy. [`composer deploy`](/compute/cli-reference#app) already works with zero config (it detects your framework and builds), so reach for a config file when you want one of these: | ||
|
|
||
| - **Reproducible deploys.** Pin the framework, port, and build settings so every deploy (yours, a teammate's, or [deploy-on-push](/compute/github)) does the same thing without re-passing flags. | ||
| - **A monorepo.** Declare several apps in one repository and deploy them together, or one at a time. | ||
| - **Type safety.** Catch a typo'd field or an invalid framework in your editor, before you deploy. | ||
|
|
||
| The file is read by `app deploy` and `app build`. It never selects your project, branch, or production; those stay explicit. It also does not configure a database; that stays on the [`--db` flag](/compute/cli-reference#app-deploy-options). | ||
| The file is read by `composer deploy` and `app build`. It never selects your project, branch, or production; those stay explicit. It also does not configure a database; that stays on the [`--db` flag](/compute/cli-reference#app-deploy-options). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 2 'composer deploy options|app-deploy-options|composer-deploy-options' \
apps/docs/content/docs/compute/cli-reference.mdx \
apps/docs/content/docs/compute/configuration.mdxRepository: prisma/web Length of output: 1608 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- relevant headings and links ---'
rg -n -C 4 '^#{1,6} .*deploy options|app-deploy-options|composer-deploy-options|composer deploy options' \
apps/docs/content/docs/compute/cli-reference.mdx \
apps/docs/content/docs/compute/configuration.mdx
printf '%s\n' '--- all matching links in compute documentation ---'
rg -n 'href=|]\([^)]*cli-reference[^)]*\)' apps/docs/content/docs/compute \
| rg 'app-deploy-options|composer-deploy-options|cli-reference'Repository: prisma/web Length of output: 5628 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- CLI reference headings ---'
rg -n '^#{1,6} ' apps/docs/content/docs/compute/cli-reference.mdx
printf '%s\n' '--- deployment option references ---'
rg -n -C 3 'deploy|--db|options' apps/docs/content/docs/compute/cli-reference.mdx \
| rg -C 3 'deploy|--db|options'Repository: prisma/web Length of output: 8771 Update both stale CLI reference links to 🤖 Prompt for AI Agents |
||
|
|
||
| ## A minimal config | ||
|
|
||
|
|
@@ -30,7 +30,7 @@ export default defineComputeConfig({ | |
| }); | ||
| ``` | ||
|
|
||
| Every field is optional. An empty `app: {}` is valid and defers entirely to detection. The values you do set become the defaults for `app deploy`; explicit flags still win over them. | ||
| Every field is optional. An empty `app: {}` is valid and defers entirely to detection. The values you do set become the defaults for `composer deploy`; explicit flags still win over them. | ||
|
|
||
| :::info | ||
|
|
||
|
|
@@ -135,7 +135,7 @@ Without a `build` block, the CLI infers everything (running your `package.json` | |
|
|
||
| ## Where the file lives | ||
|
|
||
| `app deploy` reads the **nearest** config file, searching from your current directory up to the repository or workspace root (the closest ancestor with a `.git`, `pnpm-workspace.yaml`, `bun.lock`, `bun.lockb`, or a `workspaces` field). Discovery never escapes the repository. | ||
| `composer deploy` reads the **nearest** config file, searching from your current directory up to the repository or workspace root (the closest ancestor with a `.git`, `pnpm-workspace.yaml`, `bun.lock`, `bun.lockb`, or a `workspaces` field). Discovery never escapes the repository. | ||
|
|
||
| Per directory, exactly one of `prisma.compute.ts`, `prisma.compute.mts`, `prisma.compute.js`, `prisma.compute.mjs`, `prisma.compute.cjs`, or `prisma.compute.json` may exist. | ||
|
|
||
|
|
@@ -165,20 +165,20 @@ export default defineComputeConfig({ | |
|
|
||
| All the apps live in one project, deploying to the same branch. From here: | ||
|
|
||
| - **Deploy everything** with a bare `app deploy`, which deploys every app in order. This is the default when no target is named or inferred: | ||
| - **Deploy everything** with a bare `composer deploy`, which deploys every app in order. This is the default when no target is named or inferred: | ||
|
|
||
| ```npm | ||
| npx @prisma/cli@latest app deploy | ||
| npx @prisma/cli@next composer deploy | ||
| ``` | ||
|
|
||
| - **Deploy one app** by naming its target, or by running from inside its `root` (the deepest matching root wins): | ||
|
|
||
| ```npm | ||
| npx @prisma/cli@latest app deploy api | ||
| npx @prisma/cli@next composer deploy api | ||
| ``` | ||
|
|
||
| ```npm | ||
| cd apps/api && npx @prisma/cli@latest app deploy | ||
| cd apps/api && npx @prisma/cli@next composer deploy | ||
| ``` | ||
|
|
||
| When you deploy everything at once, per-app flags like `--framework` or `--entry` are rejected as ambiguous. Pass a target to apply them to one app. Project- and branch-level flags (`--branch`, `--db`, `--prod`, `--yes`) apply to the whole run. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: prisma/web
Length of output: 5773
🏁 Script executed:
Repository: prisma/web
Length of output: 27379
🏁 Script executed:
Repository: prisma/web
Length of output: 12689
Complete the command-namespace migration.
The
@prisma/cli@nexthelp listscomposer,service, andmigrate, but notapp,database, orversion. Update the command inventory, headings, and rows to match the supported namespaces. Remove the incorrect statement that the beta has nomigratecommand.🤖 Prompt for AI Agents