You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): init offers to install @prisma/compute-sdk for config types
The generated config's typed import resolves at deploy time without a
local install, but editors need @prisma/compute-sdk locally for types.
After writing the config, init now detects an existing dependency,
otherwise offers the detected package manager's add command (pnpm add
-D / bun add -d / yarn add -D / npm install -D). --install forces it,
--no-install skips, non-interactive skips with the add command in
nextSteps, and a failed install downgrades to a visible warning with
the exact command; the config write always stands.
Also surfaces types/link failures in human output directly, since the
runner does not render success warnings in human mode.
Copy file name to clipboardExpand all lines: docs/product/command-spec.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -384,7 +384,7 @@ prisma-cli --version --json
384
384
385
385
`prisma-cli version` is the richer environment report; `prisma-cli --version` is the terse one-liner. Both report the same `cli.version`. Use the flag for quick checks, the subcommand for support tickets and bug reports.
- init never scaffolds application code, never creates schema or database resources, and never deploys
404
404
- with `--framework custom`, the config includes a commented `build` stub, since custom artifacts require `build.outputDirectory` and `build.entrypoint` before deploy can use them
405
405
- when detection fails and no `--framework` is passed: interactive mode prompts for the framework from the supported list; non-interactive and `--json` mode fail with `INIT_DETECTION_FAILED`, with `nextActions` enumerating the `--framework` choices
406
+
- types step, after the config is written: the generated config's typed import (`@prisma/compute-sdk/config`) is resolved by the CLI at deploy time without a local install, so a local `@prisma/compute-sdk` devDependency exists purely for editor types
407
+
- when the package is already a dependency or devDependency, the step is a no-op
-`--install` runs the install without prompting; `--no-install` skips the step; non-interactive and `--json` mode skip by default
410
+
- a skipped, declined, or failed install downgrades to a hint or warning with the exact add command in `nextSteps`; the config write stands and init exits 0
411
+
- a directory without a `package.json` skips the step with the hint
406
412
- link step, after the config is written:
407
413
- interactive mode asks `Link this directory to a Prisma Project now? (Y/n)` when the directory has no project binding; accepting enters the same picker `project link` uses
408
414
-`--no-link` suppresses the question; `--link` requires the step; `--project <id-or-name>` links to that project without prompting
0 commit comments