@prisma/orm-toolchain 8.0.0-rc.20-dev.15 → 8.0.0-rc.21-dev.1

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.
@@ -1,4 +1,3 @@
1
- import { s as PrismaNextConfig$1 } from "./index-CWPFeYyi.mjs";
2
1
  import { t as MigrationMetadata$1 } from "./metadata-2nbOAGsV-uYNeq2Cp.mjs";
3
2
  import { n as OnDiskMigrationPackage, t as MigrationOps } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
4
3
  import { n as SnapshotContentVerifier } from "./contract-snapshot-store-Bok5nQYi-D3g_P7im.mjs";
@@ -7,6 +6,7 @@ import { i as Refs, n as RefEntry } from "./refs-BNCUu58Y-BIso5Jfg.mjs";
7
6
  import { n as MigrationGraph } from "./graph-bDjJ4GL9-BhFevsJS.mjs";
8
7
  import { a as MigrationRef, t as ContractRef } from "./ref-resolution-BPhR-kta.mjs";
9
8
  import { A as ExecuteDbSignResult, B as RenderContractDtsFailure, C as EmitContractConfig, D as EmitResult, E as EmitOptions, F as OnControlProgress, G as SchemaVerifyOptions, H as RenderContractDtsOptions, I as PlanAnswer, J as TemporaryValueReport, K as StatementText, L as PlanQuestion, M as ExecuteDbVerifyResult, N as IntrospectOptions, O as EmitSuccess, R as PlanQuestionVerb, S as DbUpdateSuccess, T as EmitFailureCode, U as RenderContractDtsResult, V as RenderContractDtsFailureCode, W as RenderContractDtsSuccess, X as executeDbSign, Y as VerifyOptions, Z as executeDbVerify, _ as DbSignOptions, a as CliInvocation, b as DbUpdateOptions, c as ContractEmitResult, d as ControlClientOptions, f as ControlProgressEvent, g as DbInitSuccess, h as DbInitResult, i as AskedSubject, j as ExecuteDbVerifyOptions, k as ExecuteDbSignOptions, l as ControlActionName, m as DbInitOptions, n as AppliedStatementReport, o as CliStructuredError$2, p as CreateControlClient, q as StatementVerb, r as AskedDataLoss, s as ContractEmitOptions, t as AnswerPlanQuestions, u as ControlClient, v as DbSignSpaceFailure, w as EmitFailure, x as DbUpdateResult, y as DbSignSpaceOutcome, z as PlannerWarningsListener } from "./db-sign-DRaumhgX-DUsGYByK.mjs";
9
+ import { s as PrismaNextConfig$1 } from "./index-CWPFeYyi.mjs";
10
10
  import { a as emit } from "./index-tAySVPvZ.mjs";
11
11
  import { f as IntegrityQueryOptions, l as ContractSpaceAggregate, m as IntegrityViolation, t as AggregateContractSpace } from "./aggregate-L_KguJXL.mjs";
12
12
  import "./metadata-BtscDay2.mjs";
@@ -1,8 +1,8 @@
1
1
  import { a as expandContractInputs, g as requireConfigSections, s as findNearestConfigPathForFile, u as loadConfig } from "./exports-BlYTE3-J.mjs";
2
2
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
3
- import { CliStructuredError } from "@prisma/orm-framework/errors/control";
4
3
  import { createControlStack } from "@prisma/orm-framework/components/control";
5
4
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
5
+ import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
6
6
  import { join } from "pathe";
7
7
  import { randomUUID } from "node:crypto";
8
8
  import { blindCast } from "@prisma/orm-framework/utils/casts";
@@ -3366,7 +3366,7 @@ var Project = class {
3366
3366
  character: 1
3367
3367
  }
3368
3368
  },
3369
- message: CliStructuredError.is(error) ? error.why ?? error.message : error instanceof Error ? error.message : String(error),
3369
+ message: configFailureMessage(error),
3370
3370
  code: CONFIG_LOAD_FAILED_CODE,
3371
3371
  severity: DiagnosticSeverity.Error,
3372
3372
  source: "prisma"
@@ -3380,6 +3380,11 @@ var Project = class {
3380
3380
  });
3381
3381
  }
3382
3382
  };
3383
+ /** A failed config load as the user reads it: the cause (`why`, or the message), then the fix when the error carries one. */
3384
+ function configFailureMessage(error) {
3385
+ if (!isStructuredError(error)) return error instanceof Error ? error.message : String(error);
3386
+ return [error.why ?? error.message, ...error.fix === void 0 ? [] : [error.fix]].join("\n");
3387
+ }
3383
3388
  function toDiagnostics(computed) {
3384
3389
  return computed.map((diagnostic) => ({
3385
3390
  range: diagnostic.range,
@@ -3959,4 +3964,4 @@ function startServer(streams) {
3959
3964
  //#endregion
3960
3965
  export { startServer };
3961
3966
 
3962
- //# sourceMappingURL=exports-CnTIYbnR.mjs.map
3967
+ //# sourceMappingURL=exports-DET_AbNt.mjs.map