prisma 8.0.0-rc.5-dev.64 → 8.0.0-rc.5-dev.65

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 +27 -31
  2. package/dist/prisma.js +22 -18
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -15,15 +15,9 @@
15
15
  `prisma` 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
 
@@ -40,55 +34,59 @@ Run the binary exposed by this package:
40
34
  ```bash
41
35
  npx prisma --help
42
36
  npx prisma auth login
43
- npx prisma app deploy
37
+ npx prisma project create my-app
38
+ npx prisma 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 composer deploy` — there is no standalone deploy command.
43
+
46
44
  With `pnpm`:
47
45
 
48
46
  ```bash
49
- pnpm add -D prisma
47
+ pnpm add -D prisma@next
50
48
  pnpm prisma auth login
51
- pnpm prisma app deploy
49
+ pnpm prisma git connect
52
50
  ```
53
51
 
54
52
  Useful next commands:
55
53
 
56
54
  ```bash
57
- npx prisma app logs
58
- npx prisma app open
55
+ npx prisma service list
56
+ npx prisma service logs
59
57
  npx prisma project env add DATABASE_URL=postgresql://example --role preview
60
58
  npx prisma project env add --file .env --role preview
61
59
  npx prisma project env list
62
60
  npx prisma project env list --role preview
63
61
  ```
64
62
 
65
- The beta package exposes `prisma-cli` so it can coexist with the existing
66
- `prisma` executable.
67
-
68
63
  ---
69
64
 
70
65
  ## Commands
71
66
 
72
67
  | Group | What it does |
73
68
  | --- | --- |
74
- | `version` | Show the installed CLI build and host environment. |
75
69
  | `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. |
70
+ | `project` | List, create, link, and manage projects and their environment variables. |
71
+ | `git` | Connect or disconnect a project from a GitHub repository; pushes deploy. |
78
72
  | `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. |
73
+ | `postgres` | Create, inspect, restore, and remove Prisma Postgres databases and their connections. |
74
+ | `bucket` | Create, list, and delete object-store buckets and their access keys. |
75
+ | `service` | Inspect services: deployments, logs, domains, promote, roll back, remove. |
76
+ | `build` | Stream platform build logs. |
77
+ | `composer` | Deploy, destroy, and develop Composer apps. |
78
+ | `contract`, `db`, `migrate`, `migration`, `format`, `orm init`, `lsp` | The Prisma ORM workflow. |
79
+ | `init` | Write a committed compute config for the project. |
82
80
 
83
81
  Common examples:
84
82
 
85
83
  ```bash
86
- npx prisma version
84
+ npx prisma --version
87
85
  npx prisma auth whoami
88
86
  npx prisma project show
89
87
  npx prisma branch list
90
- npx prisma app deploy --branch feat-login --framework nextjs
91
- npx prisma app promote <deployment-id>
88
+ npx prisma service list
89
+ npx prisma service deployment promote DEPLOYMENT_ID
92
90
  ```
93
91
 
94
92
  ### Built for humans, CI, and agents
@@ -105,9 +103,9 @@ npx prisma app promote <deployment-id>
105
103
  ## Beta notes
106
104
 
107
105
  - Requires Node.js 22.18 or newer.
108
- - This is a beta package and may change quickly.
109
- - Official beta releases publish as `prisma`.
110
- - The package binary is `prisma-cli`, not `prisma`, during beta.
106
+ - This is a release-candidate package and may change quickly.
107
+ - The 8.0.0 release candidates publish as `prisma` on the `next` dist-tag.
108
+ - The package binary is `prisma`.
111
109
  - Local project context is cached in `.prisma/local.json`, which is gitignored and not a declarative repo config file.
112
110
 
113
111
  ---
@@ -115,9 +113,7 @@ npx prisma app promote <deployment-id>
115
113
  ## Documentation
116
114
 
117
115
  - [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
116
  - [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
117
  - [Output conventions](https://github.com/prisma/prisma-cli/blob/main/docs/product/output-conventions.md)
122
118
  - [Error conventions](https://github.com/prisma/prisma-cli/blob/main/docs/product/error-conventions.md)
123
119
 
package/dist/prisma.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 ../cli/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",
3
- "version": "8.0.0-rc.5-dev.64",
3
+ "version": "8.0.0-rc.5-dev.65",
4
4
  "description": "The Prisma CLI: one binary for the ORM, Composer, and the Prisma Developer Platform.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -51,9 +51,9 @@
51
51
  "open": "^11.0.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@prisma/cli": "8.0.0-rc.5-dev.64",
55
- "@repo/cli-telemetry": "8.0.0-rc.5-dev.64",
56
- "@repo/tsconfig": "8.0.0-rc.5-dev.64",
54
+ "@prisma/cli": "8.0.0-rc.5-dev.65",
55
+ "@repo/cli-telemetry": "8.0.0-rc.5-dev.65",
56
+ "@repo/tsconfig": "8.0.0-rc.5-dev.65",
57
57
  "@types/node": "^22.19.19",
58
58
  "tsdown": "^0.21.10",
59
59
  "typescript": "^6.0.3"