@prisma/cli 8.0.0-rc.5-dev.64 → 8.0.0-rc.6-dev.66

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.
Files changed (3) hide show
  1. package/README.md +28 -29
  2. package/dist/cli.js +22 -18
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -15,15 +15,9 @@
15
15
  `@prisma/cli` is the public beta of the new CLI for the
16
16
  Prisma Developer Platform.
17
17
 
18
- It is the terminal surface managing your platform projects, branches, apps,
19
- deployments, and environment variables.
20
-
21
- The command model is under active development to include tooling for your
22
- schema, database, migration, and broader platform workflows.
23
-
24
- Looking for Prisma ORM commands such as `prisma generate`, `prisma migrate`, or
25
- `prisma studio`? Use the [`prisma`](https://www.npmjs.com/package/prisma)
26
- package.
18
+ It is one binary for the ORM, Composer, and the Prisma Developer
19
+ Platform: projects, branches, services, deployments, environment
20
+ variables, and the Prisma ORM schema and migration workflow.
27
21
 
28
22
  ---
29
23
 
@@ -32,7 +26,7 @@ package.
32
26
  Install the beta package locally:
33
27
 
34
28
  ```bash
35
- npm install --save-dev @prisma/cli
29
+ npm install --save-dev @prisma/cli@next
36
30
  ```
37
31
 
38
32
  Run the binary exposed by this package:
@@ -40,22 +34,26 @@ Run the binary exposed by this package:
40
34
  ```bash
41
35
  npx prisma-cli --help
42
36
  npx prisma-cli auth login
43
- npx prisma-cli app deploy
37
+ npx prisma-cli project create my-app
38
+ npx prisma-cli git connect git@github.com:owner/repo.git
44
39
  ```
45
40
 
41
+ Deployments start from pushing the connected repository, the Console, or
42
+ `prisma-cli composer deploy` — there is no standalone deploy command.
43
+
46
44
  With `pnpm`:
47
45
 
48
46
  ```bash
49
- pnpm add -D @prisma/cli
47
+ pnpm add -D @prisma/cli@next
50
48
  pnpm prisma-cli auth login
51
- pnpm prisma-cli app deploy
49
+ pnpm prisma-cli git connect
52
50
  ```
53
51
 
54
52
  Useful next commands:
55
53
 
56
54
  ```bash
57
- npx prisma-cli app logs
58
- npx prisma-cli app open
55
+ npx prisma-cli service list
56
+ npx prisma-cli service logs
59
57
  npx prisma-cli project env add DATABASE_URL=postgresql://example --role preview
60
58
  npx prisma-cli project env add --file .env --role preview
61
59
  npx prisma-cli project env list
@@ -71,24 +69,27 @@ The beta package exposes `prisma-cli` so it can coexist with the existing
71
69
 
72
70
  | Group | What it does |
73
71
  | --- | --- |
74
- | `version` | Show the installed CLI build and host environment. |
75
72
  | `auth` | Log in, log out, and inspect the active Prisma account. |
76
- | `project` | List projects, show the resolved project, and manage project environment variables. |
77
- | `git` | Connect or disconnect a project from a GitHub repository. |
73
+ | `project` | List, create, link, and manage projects and their environment variables. |
74
+ | `git` | Connect or disconnect a project from a GitHub repository; pushes deploy. |
78
75
  | `branch` | List Prisma branches for the resolved project. |
79
- | `database` | Create, inspect, and remove Prisma Postgres databases and their connection strings. |
80
- | `bucket` | Create, list, and delete Tigris object-store buckets and their access keys. |
81
- | `app` | Build, run, deploy, inspect, open, stream logs, promote, roll back, and remove apps. |
76
+ | `postgres` | Create, inspect, restore, and remove Prisma Postgres databases and their connections. |
77
+ | `bucket` | Create, list, and delete object-store buckets and their access keys. |
78
+ | `service` | Inspect services: deployments, logs, domains, promote, roll back, remove. |
79
+ | `build` | Stream platform build logs. |
80
+ | `composer` | Deploy, destroy, and develop Composer apps. |
81
+ | `contract`, `db`, `migrate`, `migration`, `format`, `orm init`, `lsp` | The Prisma ORM workflow. |
82
+ | `init` | Write a committed compute config for the project. |
82
83
 
83
84
  Common examples:
84
85
 
85
86
  ```bash
86
- npx prisma-cli version
87
+ npx prisma-cli --version
87
88
  npx prisma-cli auth whoami
88
89
  npx prisma-cli project show
89
90
  npx prisma-cli branch list
90
- npx prisma-cli app deploy --branch feat-login --framework nextjs
91
- npx prisma-cli app promote <deployment-id>
91
+ npx prisma-cli service list
92
+ npx prisma-cli service deployment promote DEPLOYMENT_ID
92
93
  ```
93
94
 
94
95
  ### Built for humans, CI, and agents
@@ -105,9 +106,9 @@ npx prisma-cli app promote <deployment-id>
105
106
  ## Beta notes
106
107
 
107
108
  - Requires Node.js 22.18 or newer.
108
- - This is a beta package and may change quickly.
109
- - Official beta releases publish as `@prisma/cli`.
110
- - The package binary is `prisma-cli`, not `prisma`, during beta.
109
+ - This is a release-candidate package and may change quickly.
110
+ - The 8.0.0 release candidates publish as `@prisma/cli` on the `next` dist-tag.
111
+ - The package binary is `prisma-cli`; the sibling `prisma` package ships the same CLI under the `prisma` binary.
111
112
  - Local project context is cached in `.prisma/local.json`, which is gitignored and not a declarative repo config file.
112
113
 
113
114
  ---
@@ -115,9 +116,7 @@ npx prisma-cli app promote <deployment-id>
115
116
  ## Documentation
116
117
 
117
118
  - [CLI docs index](https://github.com/prisma/prisma-cli/blob/main/docs/README.md)
118
- - [Resource model](https://github.com/prisma/prisma-cli/blob/main/docs/product/resource-model.md)
119
119
  - [Command principles](https://github.com/prisma/prisma-cli/blob/main/docs/product/command-principles.md)
120
- - [Command spec](https://github.com/prisma/prisma-cli/blob/main/docs/product/command-spec.md)
121
120
  - [Output conventions](https://github.com/prisma/prisma-cli/blob/main/docs/product/output-conventions.md)
122
121
  - [Error conventions](https://github.com/prisma/prisma-cli/blob/main/docs/product/error-conventions.md)
123
122
 
package/dist/cli.js CHANGED
@@ -34,9 +34,12 @@ import { pipeline } from "node:stream/promises";
34
34
  * this constant rather than restating the name.
35
35
  */
36
36
  const CLI_NAME = "prisma-cli";
37
- /** The CLI docs page (also the update-check fallback instruction URL). */
38
- const CLI_DOCS_URL = "https://www.prisma.io/docs/orm/tools/prisma-cli";
39
- const PRISMA_CLI_PACKAGE_SPEC = `@prisma/cli@latest`;
37
+ /** The CLI docs page (also the update-check fallback instruction URL).
38
+ * The old /docs/orm/tools/prisma-cli path 308-redirects to the ORM CLI
39
+ * reference the wrong docs for the unified CLI — so this points at
40
+ * the docs root until the unified CLI has its own page. */
41
+ const CLI_DOCS_URL = "https://www.prisma.io/docs";
42
+ const PRISMA_CLI_PACKAGE_SPEC = `@prisma/cli@next`;
40
43
  const DEFAULT_PRISMA_CLI_PACKAGE_RUNNER = ["npx", "-y"];
41
44
  const PRISMA_CLI_BINARY = "prisma-cli";
42
45
  function formatPrismaCliCommand(args, options = {}) {
@@ -2805,12 +2808,11 @@ function projectRemoveBlockedError(projectId, error) {
2805
2808
  domain: "project",
2806
2809
  summary: "Project cannot be removed yet",
2807
2810
  why: error?.error?.message ?? `Project "${projectId}" still has active deployments.`,
2808
- fix: "Remove the project's apps first, then retry the removal.",
2811
+ fix: "Remove the project's services first, then retry the removal.",
2809
2812
  exitCode: 1,
2810
2813
  nextSteps: [formatPrismaCliCommand([
2811
- "app",
2814
+ "service",
2812
2815
  "remove",
2813
- "--app",
2814
2816
  "<name>"
2815
2817
  ])]
2816
2818
  });
@@ -2951,7 +2953,7 @@ function projectAmbiguousError(projectRef, matches) {
2951
2953
  function projectAmbiguousCliError(projectRef, matches) {
2952
2954
  const firstMatch = matches[0];
2953
2955
  const nextSteps = ["prisma-cli project list"];
2954
- if (firstMatch) nextSteps.push(`prisma-cli app deploy --project ${firstMatch.id}`);
2956
+ if (firstMatch) nextSteps.push(`prisma-cli project link ${firstMatch.id}`);
2955
2957
  return new CliError({
2956
2958
  code: "PROJECT_AMBIGUOUS",
2957
2959
  domain: "project",
@@ -3618,7 +3620,7 @@ function localStateWriteFailedError(error, options) {
3618
3620
  debug: formatDebugDetails(error.cause),
3619
3621
  meta: options.meta,
3620
3622
  exitCode: 1,
3621
- nextSteps: ["prisma-cli project link <id-or-name>", "prisma-cli app deploy --project <id-or-name>"]
3623
+ nextSteps: ["prisma-cli project link <id-or-name>"]
3622
3624
  });
3623
3625
  }
3624
3626
  function toProjectSummary(project) {
@@ -6515,10 +6517,12 @@ function toAbsoluteUrl(url) {
6515
6517
  }
6516
6518
  //#endregion
6517
6519
  //#region src/commands/project/presentation.ts
6518
- const DEPLOY_NEXT_ACTION = {
6520
+ /** Deploys come from pushing a connected repository, so the step after
6521
+ * creating or linking a Project is connecting one. */
6522
+ const CONNECT_REPO_NEXT_ACTION = {
6519
6523
  kind: "run-command",
6520
- label: `${CLI_NAME} app deploy`,
6521
- command: `${CLI_NAME} app deploy`
6524
+ label: `${CLI_NAME} git connect`,
6525
+ command: `${CLI_NAME} git connect`
6522
6526
  };
6523
6527
  /** The legacy local-pin warnings of `project remove` / `project
6524
6528
  * transfer`: the operation succeeded, so they are warn diagnostics
@@ -6563,7 +6567,7 @@ function setupPresentations(result) {
6563
6567
  }
6564
6568
  ],
6565
6569
  json: () => serializeProjectSetup(result),
6566
- next: () => [DEPLOY_NEXT_ACTION]
6570
+ next: () => [CONNECT_REPO_NEXT_ACTION]
6567
6571
  };
6568
6572
  }
6569
6573
  //#endregion
@@ -6810,7 +6814,7 @@ function initPresentations(result, formatCommand) {
6810
6814
  stdout: () => [result.configPath],
6811
6815
  next: () => [
6812
6816
  ...typesMissing(result) && result.types.installCommand ? [runCommand(result.types.installCommand)] : [],
6813
- runCommand(formatCommand(["app", "deploy"])),
6817
+ runCommand(formatCommand(["git", "connect"])),
6814
6818
  ...isLinked(result) ? [] : [runCommand(formatCommand(["project", "link"]))]
6815
6819
  ]
6816
6820
  };
@@ -9313,7 +9317,7 @@ async function readEnvFileAssignments(cwd, filePath, command) {
9313
9317
  try {
9314
9318
  contents = await readFile(resolvedPath, "utf8");
9315
9319
  } catch (error) {
9316
- throw usageError(`Failed to read env file "${filePath}"`, error instanceof Error ? error.message : "The file could not be read.", "Pass a readable dotenv file path.", [command === "deploy" ? "prisma-cli app deploy --env .env" : `prisma-cli project env ${command} --file .env --role preview`], "app");
9320
+ throw usageError(`Failed to read env file "${filePath}"`, error instanceof Error ? error.message : "The file could not be read.", "Pass a readable dotenv file path.", [`prisma-cli project env ${command} --file .env --role preview`], "app");
9317
9321
  }
9318
9322
  return parseEnvFileContents(contents, filePath, command);
9319
9323
  }
@@ -9365,7 +9369,7 @@ function extractParsedKeys(contents) {
9365
9369
  }
9366
9370
  function validateEnvFileKey(key, line, filePath, command) {
9367
9371
  try {
9368
- validateKey(key, command === "deploy" ? "add" : command);
9372
+ validateKey(key, command);
9369
9373
  } catch (error) {
9370
9374
  const reason = error instanceof Error && error.message.length > 0 ? error.message : "Invalid environment variable key.";
9371
9375
  throw usageError(`Invalid environment variable "${key}" in "${filePath}"`, `Line ${line}: ${reason}`, "Use a valid env-var key and retry the import.", [], "app");
@@ -9701,7 +9705,7 @@ async function resolveOrCreateBranch(client, projectId, branchName, signal) {
9701
9705
  why: "Creating the first branch would make it the project default, but branch overrides are preview-only.",
9702
9706
  fix: "Create or deploy the default branch first, then add the branch override.",
9703
9707
  exitCode: 1,
9704
- nextSteps: ["prisma-cli app deploy --branch main"]
9708
+ nextSteps: ["prisma-cli git connect <repository-url>"]
9705
9709
  });
9706
9710
  const { data, error, response } = await client.POST("/v1/projects/{projectId}/branches", {
9707
9711
  params: { path: { projectId } },
@@ -12053,8 +12057,8 @@ function domainWaitPresentations(result) {
12053
12057
  async function loadComputeConfig$1(cwd, signal) {
12054
12058
  return loadComputeConfig(cwd, { signal });
12055
12059
  }
12056
- function computeConfigErrorToCliError(error, commandName = "deploy") {
12057
- const command = `prisma-cli app ${commandName}`;
12060
+ function computeConfigErrorToCliError(error, commandName) {
12061
+ const command = `prisma-cli service ${commandName}`;
12058
12062
  return matchError(error, {
12059
12063
  ComputeConfigAmbiguousError: (ambiguous) => new CliError({
12060
12064
  code: "COMPUTE_CONFIG_INVALID",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/cli",
3
- "version": "8.0.0-rc.5-dev.64",
3
+ "version": "8.0.0-rc.6-dev.66",
4
4
  "description": "Command-line interface for the Prisma Developer Platform.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -40,11 +40,11 @@
40
40
  "license": "Apache-2.0",
41
41
  "dependencies": {
42
42
  "@prisma/cli-engine": "0.2.0",
43
- "@prisma/composer-cli": "0.9.0-dev.1",
43
+ "@prisma/composer-cli": "0.10.0-dev.1",
44
44
  "@prisma/compute-sdk": "0.39.0",
45
45
  "@prisma/credentials-store": "^7.8.0",
46
46
  "@prisma/management-api-sdk": "1.55.0",
47
- "@prisma/orm-toolchain": "8.0.0-rc.3-dev.3",
47
+ "@prisma/orm-toolchain": "8.0.0-rc.3-dev.9",
48
48
  "@vercel/detect-agent": "^1.2.3",
49
49
  "better-result": "^2.9.2",
50
50
  "dotenv": "^17.4.2",
@@ -52,10 +52,10 @@
52
52
  "open": "^11.0.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@prisma/composer": "0.9.0-dev.1",
56
- "@repo/cli-conformance": "8.0.0-rc.5-dev.64",
57
- "@repo/cli-telemetry": "8.0.0-rc.5-dev.64",
58
- "@repo/tsconfig": "8.0.0-rc.5-dev.64",
55
+ "@prisma/composer": "0.10.0-dev.1",
56
+ "@repo/cli-conformance": "8.0.0-rc.6-dev.66",
57
+ "@repo/cli-telemetry": "8.0.0-rc.6-dev.66",
58
+ "@repo/tsconfig": "8.0.0-rc.6-dev.66",
59
59
  "@types/node": "^22.19.19",
60
60
  "tsdown": "^0.21.10",
61
61
  "tsx": "^4.22.4",