@prisma/cli-engine 0.10.2 → 0.10.4

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.
@@ -4124,7 +4124,7 @@ function strayFlagLines(state, subjects) {
4124
4124
  return [...state.statementValues.filter((value) => !value.consumed && longestSubjectNamed(value.values[0], subjects) === void 0).map((value) => `${flagForm(value.verb, value.values)} answers no question; the questions are about ${subjects.join(", ")}.`), ...state.confirmValues.map((token) => `${flagForm("confirm", [token])} answers no consent in this run; a statement flag is what answers these questions.`)];
4125
4125
  }
4126
4126
  function statementUnavailable(unanswered, subjects, state) {
4127
- const summary = state.yes ? "This command requires explicit consent, and --yes does not give it." : "This command requires explicit consent, but it was not provided.";
4127
+ const summary = consentMissing(state);
4128
4128
  const listed = unanswered.map(({ subject, verbs }) => ({
4129
4129
  subject,
4130
4130
  verbs
@@ -4280,13 +4280,19 @@ function answerWithoutAsking(question, fallback, state) {
4280
4280
  if (fallback === void 0) throw promptUnanswerable(question, state);
4281
4281
  return fallback;
4282
4282
  }
4283
+ function consentMissing(state) {
4284
+ return state.yes ? "This command requires explicit consent for which --yes is not sufficient." : "This command requires explicit consent, but it was not provided.";
4285
+ }
4283
4286
  function consentUnavailable(question, state, token) {
4284
- const situation = state.yes ? `"${question}" requires explicit consent, which --yes cannot grant.` : `"${question}" requires explicit consent, and the session is not interactive.`;
4285
- if (token === void 0) return new CliStructuredError("CLI.CONSENT_REQUIRED", situation, { nextActions: [{
4286
- kind: "user-choice",
4287
- label: "Run the command interactively. Consent can only be granted outside an interactive terminal when the command declares a consent token."
4288
- }] });
4289
- return new CliStructuredError("CLI.CONSENT_REQUIRED", `${situation} Grant it by passing --confirm ${token}.`, {
4287
+ if (token === void 0) return new CliStructuredError("CLI.CONSENT_REQUIRED", consentMissing(state), {
4288
+ why: question,
4289
+ nextActions: [{
4290
+ kind: "user-choice",
4291
+ label: "Run the command interactively. Consent can only be granted outside an interactive terminal when the command declares a consent token."
4292
+ }]
4293
+ });
4294
+ return new CliStructuredError("CLI.CONSENT_REQUIRED", consentMissing(state), {
4295
+ why: question,
4290
4296
  nextActions: [{
4291
4297
  kind: "user-choice",
4292
4298
  label: `Run the command interactively and type ${token}, or pass --confirm ${token}.`
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { i as ok, r as notOk, t as CliStructuredError } from "./protocol-TtNVkeVS.js";
2
- import { A as noSessionForWorkspaceError, C as claimedIdentity, D as credentialWorkspaceMismatchError, E as credentialRejectedError, O as credentialsRequiredError, S as claimedExpiresAt, T as authServiceError, _ as exitWithChildStatus, a as definePrismaConfig, b as positional, c as PRISMA_CONFIG_VERSION, d as PRESENTED, f as noDataLines, g as resolveGating, h as writeUserConfig, k as emptyServiceTokenError, l as SERVICE_TOKEN_ENV_VAR, m as userConfigPath, n as resolveSectionOverChain, o as loadConfig, p as readUserConfig, r as resolveSectionPath, s as realpathOr, t as buildEngine, u as WORKSPACE_ID_ENV_VAR, v as detectCI, w as credentialWorkspaceId, x as readActiveAccessToken, y as flag } from "./engine-Bww33dTJ.js";
2
+ import { A as noSessionForWorkspaceError, C as claimedIdentity, D as credentialWorkspaceMismatchError, E as credentialRejectedError, O as credentialsRequiredError, S as claimedExpiresAt, T as authServiceError, _ as exitWithChildStatus, a as definePrismaConfig, b as positional, c as PRISMA_CONFIG_VERSION, d as PRESENTED, f as noDataLines, g as resolveGating, h as writeUserConfig, k as emptyServiceTokenError, l as SERVICE_TOKEN_ENV_VAR, m as userConfigPath, n as resolveSectionOverChain, o as loadConfig, p as readUserConfig, r as resolveSectionPath, s as realpathOr, t as buildEngine, u as WORKSPACE_ID_ENV_VAR, v as detectCI, w as credentialWorkspaceId, x as readActiveAccessToken, y as flag } from "./engine-CBu6_cKn.js";
3
3
  import { dirname, isAbsolute, resolve } from "node:path";
4
4
  import { scope, type } from "arktype";
5
5
  //#region src/cli.ts
package/dist/testing.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as noSessionForWorkspaceError, C as claimedIdentity, D as credentialWorkspaceMismatchError, O as credentialsRequiredError, S as claimedExpiresAt, t as buildEngine, w as credentialWorkspaceId, x as readActiveAccessToken } from "./engine-Bww33dTJ.js";
1
+ import { A as noSessionForWorkspaceError, C as claimedIdentity, D as credentialWorkspaceMismatchError, O as credentialsRequiredError, S as claimedExpiresAt, t as buildEngine, w as credentialWorkspaceId, x as readActiveAccessToken } from "./engine-CBu6_cKn.js";
2
2
  import { Buffer } from "node:buffer";
3
3
  import { resolve } from "node:path";
4
4
  //#region src/in-memory-credential-manager.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/cli-engine",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "The execution engine of the unified Prisma CLI.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -53,8 +53,8 @@
53
53
  },
54
54
  "devDependencies": {
55
55
  "@prisma/management-api-sdk": "1.80.0",
56
- "@repo/cli-conformance": "8.0.0-rc.34-dev.192",
57
- "@repo/tsconfig": "8.0.0-rc.34-dev.192",
56
+ "@repo/cli-conformance": "8.0.0-rc.34-dev.194",
57
+ "@repo/tsconfig": "8.0.0-rc.34-dev.194",
58
58
  "@types/node": "^22.19.19",
59
59
  "ci-info": "^4.3.1",
60
60
  "tsdown": "^0.21.10",