@prisma/cli 8.0.0-rc.11 → 8.0.0-rc.11-dev.87

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 (2) hide show
  1. package/dist/cli.js +18 -18
  2. package/package.json +7 -7
package/dist/cli.js CHANGED
@@ -4151,16 +4151,16 @@ function extractHttpStatus(error) {
4151
4151
  //#endregion
4152
4152
  //#region src/commands/project/context.ts
4153
4153
  /**
4154
- * Glue between the engine command context and the legacy project
4155
- * operations. The legacy resolution and env-file operations take a
4156
- * shell `CommandContext` but read only `runtime.cwd`, `runtime.env`
4154
+ * Glue between the engine command context and the project controllers.
4155
+ * The resolution and env-file operations take a controller
4156
+ * `CommandContext` but read only `runtime.cwd`, `runtime.env`
4157
4157
  * and `runtime.signal`, so the CLI hands them exactly that.
4158
4158
  */
4159
4159
  /**
4160
- * The legacy shell's `CommandContext` has many more fields than the
4161
- * three the CLI supplies, and the cast that makes the adapter compile also
4162
- * hides the day a legacy edit starts reading a fourth. Left alone that
4163
- * surfaces as `Cannot read properties of undefined`, worst case inside
4160
+ * The controllers' `CommandContext` is typed to the three fields the
4161
+ * CLI supplies today, but a controller edit could start reading a
4162
+ * fourth. Left alone that surfaces as
4163
+ * `Cannot read properties of undefined`, worst case inside
4164
4164
  * `project transfer` after the project has already moved. Refusing the
4165
4165
  * read here names the missing field at the moment it is read instead.
4166
4166
  * Probes pass through rather than throwing: symbols are how the language
@@ -4172,10 +4172,10 @@ const PROBE_KEYS = new Set(["then"]);
4172
4172
  function refuseUnknownReads(fields, prefix) {
4173
4173
  return new Proxy(fields, { get(target, key) {
4174
4174
  if (typeof key !== "string" || key in target || PROBE_KEYS.has(key)) return Reflect.get(target, key);
4175
- throw new Error(`the legacy-context adapter provides only runtime.cwd, runtime.env and runtime.signal; ${prefix}${key} was read`);
4175
+ throw new Error(`the operation-context adapter provides only runtime.cwd, runtime.env and runtime.signal; ${prefix}${key} was read`);
4176
4176
  } });
4177
4177
  }
4178
- function legacyOperationContext(ctx) {
4178
+ function operationContext(ctx) {
4179
4179
  return refuseUnknownReads({ runtime: refuseUnknownReads({
4180
4180
  cwd: ctx.cwd,
4181
4181
  env: ctx.env,
@@ -4191,7 +4191,7 @@ function listWorkspaceProjects$1(ctx) {
4191
4191
  * behavior. */
4192
4192
  async function resolvePinnedProject(ctx, workspace, explicitProject, commandName) {
4193
4193
  const target = await resolveProjectTarget({
4194
- context: legacyOperationContext(ctx),
4194
+ context: operationContext(ctx),
4195
4195
  workspace,
4196
4196
  explicitProject,
4197
4197
  listProjects: () => listWorkspaceProjects$1(ctx),
@@ -8649,7 +8649,7 @@ const projectDeleteCommand = defineCommand({
8649
8649
  const result = {
8650
8650
  workspace,
8651
8651
  project,
8652
- localPin: { cleared: await cleanupLocalPinForProject(legacyOperationContext(ctx), project.id, { onError: (message) => warnings.push(message) }) }
8652
+ localPin: { cleared: await cleanupLocalPinForProject(operationContext(ctx), project.id, { onError: (message) => warnings.push(message) }) }
8653
8653
  };
8654
8654
  const diagnostics = localPinDiagnostics(warnings);
8655
8655
  return ok(ctx.present({
@@ -9479,10 +9479,10 @@ const projectEnvAddCommand = defineCommand({
9479
9479
  handler: async (args, ctx) => {
9480
9480
  const source = resolveEnvWriteSource(args.positionals.assignment, args.flags.file, "add");
9481
9481
  const scope = requireEnvScope(args.flags, "add");
9482
- const input = await resolveEnvWriteInput(legacyOperationContext(ctx), source, "add");
9482
+ const input = await resolveEnvWriteInput(operationContext(ctx), source, "add");
9483
9483
  const { projectId, verboseContext, resolved } = await resolveEnvTarget(ctx, args.flags, scope, "project env add", true);
9484
9484
  if (input.kind === "file") {
9485
- const written = await runEnvAddFile(legacyOperationContext(ctx), ctx.api, projectId, resolved, input.filePath, input.assignments, verboseContext);
9485
+ const written = await runEnvAddFile(operationContext(ctx), ctx.api, projectId, resolved, input.filePath, input.assignments, verboseContext);
9486
9486
  const result = {
9487
9487
  projectId,
9488
9488
  scope: resolved.descriptor,
@@ -9743,10 +9743,10 @@ const projectEnvUpdateCommand = defineCommand({
9743
9743
  handler: async (args, ctx) => {
9744
9744
  const source = resolveEnvWriteSource(args.positionals.assignment, args.flags.file, "update");
9745
9745
  const scope = requireEnvScope(args.flags, "update");
9746
- const input = await resolveEnvWriteInput(legacyOperationContext(ctx), source, "update");
9746
+ const input = await resolveEnvWriteInput(operationContext(ctx), source, "update");
9747
9747
  const { projectId, verboseContext, resolved } = await resolveEnvTarget(ctx, args.flags, scope, "project env update", false);
9748
9748
  if (input.kind === "file") {
9749
- const written = await runEnvUpdateFile(legacyOperationContext(ctx), ctx.api, projectId, resolved, input.filePath, input.assignments, verboseContext);
9749
+ const written = await runEnvUpdateFile(operationContext(ctx), ctx.api, projectId, resolved, input.filePath, input.assignments, verboseContext);
9750
9750
  const result = {
9751
9751
  projectId,
9752
9752
  scope: resolved.descriptor,
@@ -10167,7 +10167,7 @@ const projectShowCommand = defineCommand({
10167
10167
  handler: async (args, ctx) => {
10168
10168
  const workspace = await resolveActiveWorkspace(ctx);
10169
10169
  const inspected = await inspectProjectBinding({
10170
- context: legacyOperationContext(ctx),
10170
+ context: operationContext(ctx),
10171
10171
  workspace,
10172
10172
  explicitProject: args.positionals.project,
10173
10173
  listProjects: () => listWorkspaceProjects$1(ctx),
@@ -10398,7 +10398,7 @@ const projectTransferCommand = defineCommand({
10398
10398
  signal: ctx.signal
10399
10399
  });
10400
10400
  const warnings = [];
10401
- const action = await rewriteOrClearLocalPinForProject(legacyOperationContext(ctx), project.id, recipient.workspaceId, { onError: (message) => warnings.push(message) });
10401
+ const action = await rewriteOrClearLocalPinForProject(operationContext(ctx), project.id, recipient.workspaceId, { onError: (message) => warnings.push(message) });
10402
10402
  const result = {
10403
10403
  workspace,
10404
10404
  project,
@@ -10472,7 +10472,7 @@ function serviceNameRequiredError() {
10472
10472
  });
10473
10473
  }
10474
10474
  function projectNotFoundError(projectId) {
10475
- return new CliStructuredError("SERVICE.PROJECT_NOT_FOUND", "Project not found", {
10475
+ return new CliStructuredError("PROJECT.NOT_FOUND", "Project not found", {
10476
10476
  why: `The resolved project "${projectId}" does not exist in the authenticated workspace or is no longer accessible.`,
10477
10477
  nextActions: [runCommandAction("Inspect the directory binding", "project show"), runCommandAction("Link a project", "project link <id-or-name>")]
10478
10478
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/cli",
3
- "version": "8.0.0-rc.11",
3
+ "version": "8.0.0-rc.11-dev.87",
4
4
  "description": "Command-line interface for the Prisma Developer Platform.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,10 +41,10 @@
41
41
  "dependencies": {
42
42
  "@manypkg/tools": "^2.1.2",
43
43
  "@prisma/cli-engine": "0.3.0",
44
- "@prisma/composer-cli": "0.15.0",
44
+ "@prisma/composer-cli": "0.15.0-dev.1",
45
45
  "@prisma/compute-sdk": "0.42.0",
46
46
  "@prisma/management-api-sdk": "1.69.0",
47
- "@prisma/orm-toolchain": "8.0.0-rc.8",
47
+ "@prisma/orm-toolchain": "8.0.0-rc.8-dev.1",
48
48
  "@vercel/detect-agent": "^1.2.3",
49
49
  "better-result": "^2.9.2",
50
50
  "dotenv": "^17.4.2",
@@ -52,11 +52,11 @@
52
52
  "open": "^11.0.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@prisma/composer": "0.14.0",
55
+ "@prisma/composer": "0.15.0-dev.1",
56
56
  "@prisma/credentials-store": "^7.8.0",
57
- "@repo/cli-conformance": "8.0.0-rc.11",
58
- "@repo/cli-telemetry": "8.0.0-rc.11",
59
- "@repo/tsconfig": "8.0.0-rc.11",
57
+ "@repo/cli-conformance": "8.0.0-rc.11-dev.87",
58
+ "@repo/cli-telemetry": "8.0.0-rc.11-dev.87",
59
+ "@repo/tsconfig": "8.0.0-rc.11-dev.87",
60
60
  "@types/node": "^22.19.19",
61
61
  "tsdown": "^0.21.10",
62
62
  "tsx": "^4.22.4",