@prisma-next/errors 0.12.0-dev.39 → 0.12.0-dev.40

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.
@@ -136,7 +136,8 @@ function errorDatabaseConnectionRequired(options) {
136
136
  return new CliStructuredError("4005", "Database connection is required", {
137
137
  domain: "CLI",
138
138
  why: options?.why ?? "Database connection is required for this command",
139
- fix: `${runHint}, or set \`db: { connection: "postgres://…" }\` in prisma-next.config.ts`
139
+ fix: `${runHint}, or set \`db: { connection: "postgres://…" }\` in prisma-next.config.ts`,
140
+ ...options?.missingFlags !== void 0 ? { meta: { missingFlags: [...options.missingFlags] } } : {}
140
141
  });
141
142
  }
142
143
  /**
@@ -308,4 +309,4 @@ function errorUnexpected(message, options) {
308
309
  //#endregion
309
310
  export { errorQueryRunnerFactoryRequired as _, errorContractMissingExtensionPacks as a, errorDriverRequired as c, errorInvalidOutputFormat as d, errorJsonFormatNotSupported as f, errorOutputFormatMutex as g, errorMigrationPlanningFailed as h, errorContractConfigMissing as i, errorFamilyReadMarkerSqlRequired as l, errorMigrationCliUnknownFlag as m, errorConfigFileNotFound as n, errorContractValidationFailed as o, errorMigrationCliInvalidConfigArg as p, errorConfigValidation as r, errorDatabaseConnectionRequired as s, CliStructuredError as t, errorFileNotFound as u, errorTargetMigrationNotSupported as v, errorUnexpected as y };
310
311
 
311
- //# sourceMappingURL=control-DOc6vx43.mjs.map
312
+ //# sourceMappingURL=control-BmidmC9l.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-BmidmC9l.mjs","names":[],"sources":["../src/control.ts"],"sourcesContent":["/**\n * CLI error envelope for output formatting.\n * This is the serialized form of a CliStructuredError.\n */\nexport interface CliErrorEnvelope {\n readonly ok: false;\n readonly code: string;\n readonly domain: string;\n readonly severity: 'error' | 'warn' | 'info';\n readonly summary: string;\n readonly why: string | undefined;\n readonly fix: string | undefined;\n readonly where:\n | {\n readonly path: string | undefined;\n readonly line: number | undefined;\n }\n | undefined;\n readonly meta: Record<string, unknown> | undefined;\n readonly docsUrl: string | undefined;\n}\n\n/**\n * Minimal conflict data structure expected by CLI output.\n */\nexport interface CliErrorConflict {\n readonly kind: string;\n readonly summary: string;\n readonly why?: string;\n}\n\n/**\n * Domain prefix for structured CLI error codes.\n *\n * The full envelope code is rendered as `PN-<domain>-<code>` (see\n * `CliStructuredError.toEnvelope`). The supported domains follow the\n * taxonomy documented in `docs/CLI Style Guide.md`:\n *\n * - `CLI` — CLI command processing (config, validation, planning)\n * - `MIG` — Migration subsystem (authoring, planning conflicts, runner)\n * - `RUN` — Application runtime (query execution, streaming)\n * - `CON` — Contract subsystem (validation, normalization)\n * - `SCHEMA` — Schema subsystem\n *\n * Sub-clustering within a domain is conveyed by the numeric code range; see\n * the per-domain source files for reserved ranges.\n */\nconst CLI_ERROR_DOMAINS = ['CLI', 'RUN', 'MIG', 'CON', 'SCHEMA'] as const;\n\nexport type CliErrorDomain = (typeof CLI_ERROR_DOMAINS)[number];\n\n/**\n * Structured CLI error that contains all information needed for error envelopes.\n * Call sites throw these errors with full context.\n */\nexport class CliStructuredError extends Error {\n readonly code: string;\n readonly domain: CliErrorDomain;\n readonly severity: 'error' | 'warn' | 'info';\n readonly why: string | undefined;\n readonly fix: string | undefined;\n readonly where:\n | {\n readonly path: string | undefined;\n readonly line: number | undefined;\n }\n | undefined;\n readonly meta: Record<string, unknown> | undefined;\n readonly docsUrl: string | undefined;\n\n constructor(\n code: string,\n summary: string,\n options?: {\n readonly domain?: CliErrorDomain;\n readonly severity?: 'error' | 'warn' | 'info';\n readonly why?: string;\n readonly fix?: string;\n readonly where?: { readonly path?: string; readonly line?: number };\n readonly meta?: Record<string, unknown>;\n readonly docsUrl?: string;\n },\n ) {\n super(summary);\n this.name = 'CliStructuredError';\n this.code = code;\n this.domain = options?.domain ?? 'CLI';\n this.severity = options?.severity ?? 'error';\n this.why = options?.why;\n this.fix = options?.fix === options?.why ? undefined : options?.fix;\n this.where = options?.where\n ? {\n path: options.where.path,\n line: options.where.line,\n }\n : undefined;\n this.meta = options?.meta;\n this.docsUrl = options?.docsUrl;\n }\n\n /**\n * Converts this error to a CLI error envelope for output formatting.\n */\n toEnvelope(): CliErrorEnvelope {\n return {\n ok: false as const,\n code: `PN-${this.domain}-${this.code}`,\n domain: this.domain,\n severity: this.severity,\n summary: this.message,\n why: this.why,\n fix: this.fix,\n where: this.where,\n meta: this.meta,\n docsUrl: this.docsUrl,\n };\n }\n\n /**\n * Type guard to check if an error is a CliStructuredError.\n * Uses duck-typing to work across module boundaries where instanceof may fail.\n */\n static is(error: unknown): error is CliStructuredError {\n if (!(error instanceof Error)) {\n return false;\n }\n const candidate = error as CliStructuredError;\n return (\n candidate.name === 'CliStructuredError' &&\n typeof candidate.code === 'string' &&\n isCliErrorDomain(candidate.domain) &&\n typeof candidate.toEnvelope === 'function'\n );\n }\n}\n\nconst CLI_ERROR_DOMAIN_SET: ReadonlySet<CliErrorDomain> = new Set(CLI_ERROR_DOMAINS);\n\nfunction isCliErrorDomain(value: unknown): value is CliErrorDomain {\n return typeof value === 'string' && CLI_ERROR_DOMAIN_SET.has(value as CliErrorDomain);\n}\n\n// ============================================================================\n// Numeric range conventions for `PN-CLI-NNNN`\n// ============================================================================\n//\n// Sub-clustering inside the `CLI` domain uses the numeric prefix:\n//\n// - `4xxx` — generic / cross-command CLI errors authored here (config\n// missing, file not found, contract validation, etc.).\n// - `5xxx` — command-specific CLI errors authored alongside the command\n// itself (e.g. `init` errors live in\n// `packages/1-framework/3-tooling/cli/src/commands/init/errors.ts`).\n// The 5xxx range avoids collisions with the shared 4xxx pool while\n// still belonging to the `CLI` domain — consumers branch on the full\n// `PN-CLI-5007` form, so the prefix is purely an authoring guide.\n//\n// See [`docs/CLI Style Guide.md` § Errors](../../../../../docs/CLI%20Style%20Guide.md#errors)\n// and the per-command error file for the live reservation list.\n\n// ============================================================================\n// Config Errors (PN-CLI-4001-4007)\n// ============================================================================\n\n/**\n * Config file not found or missing.\n */\nexport function errorConfigFileNotFound(\n configPath?: string,\n options?: {\n readonly why?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4001', 'Config file not found', {\n domain: 'CLI',\n ...(options?.why ? { why: options.why } : { why: 'Config file not found' }),\n fix: \"Run 'prisma-next init' to create a config file\",\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n ...(configPath ? { where: { path: configPath } } : {}),\n });\n}\n\n/**\n * Contract configuration missing from config.\n */\nexport function errorContractConfigMissing(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4002', 'Contract configuration missing', {\n domain: 'CLI',\n why: options?.why ?? 'The contract configuration is required for emit',\n fix: 'Add contract configuration to your prisma-next.config.ts',\n docsUrl: 'https://prisma-next.dev/docs/cli/contract-emit',\n });\n}\n\n/**\n * Contract validation failed.\n */\nexport function errorContractValidationFailed(\n reason: string,\n options?: {\n readonly where?: { readonly path?: string; readonly line?: number };\n },\n): CliStructuredError {\n return new CliStructuredError('4003', 'Contract validation failed', {\n domain: 'CLI',\n why: reason,\n fix: 'Re-run `prisma-next contract emit`, or fix the contract file and try again',\n docsUrl: 'https://prisma-next.dev/docs/contracts',\n ...(options?.where ? { where: options.where } : {}),\n });\n}\n\n/**\n * File not found.\n */\nexport function errorFileNotFound(\n filePath: string,\n options?: {\n readonly why?: string;\n readonly fix?: string;\n readonly docsUrl?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4004', 'File not found', {\n domain: 'CLI',\n why: options?.why ?? `File not found: ${filePath}`,\n fix: options?.fix ?? 'Check that the file path is correct',\n where: { path: filePath },\n ...(options?.docsUrl ? { docsUrl: options.docsUrl } : {}),\n });\n}\n\n/**\n * Database connection is required but not provided.\n */\nexport function errorDatabaseConnectionRequired(options?: {\n readonly why?: string;\n readonly commandName?: string;\n readonly retryCommand?: string;\n readonly missingFlags?: readonly string[];\n}): CliStructuredError {\n const runHint = options?.retryCommand\n ? `Run \\`${options.retryCommand}\\``\n : options?.commandName\n ? `Run \\`prisma-next ${options.commandName} --db <url>\\``\n : 'Provide `--db <url>`';\n return new CliStructuredError('4005', 'Database connection is required', {\n domain: 'CLI',\n why: options?.why ?? 'Database connection is required for this command',\n fix: `${runHint}, or set \\`db: { connection: \"postgres://…\" }\\` in prisma-next.config.ts`,\n ...(options?.missingFlags !== undefined\n ? { meta: { missingFlags: [...options.missingFlags] } }\n : {}),\n });\n}\n\n/**\n * Query runner factory is required but not provided in config.\n */\nexport function errorQueryRunnerFactoryRequired(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4006', 'Query runner factory is required', {\n domain: 'CLI',\n why: options?.why ?? 'Config.db.queryRunnerFactory is required for db verify',\n fix: 'Add db.queryRunnerFactory to prisma-next.config.ts',\n docsUrl: 'https://prisma-next.dev/docs/cli/db-verify',\n });\n}\n\n/**\n * Family verify.readMarker is required but not provided.\n */\nexport function errorFamilyReadMarkerSqlRequired(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4007', 'Family readMarker() is required', {\n domain: 'CLI',\n why: options?.why ?? 'Family verify.readMarker is required for db verify',\n fix: 'Ensure family.verify.readMarker() is exported by your family package',\n docsUrl: 'https://prisma-next.dev/docs/cli/db-verify',\n });\n}\n\n/**\n * JSON output format not supported.\n */\nexport function errorJsonFormatNotSupported(options: {\n readonly command: string;\n readonly format: string;\n readonly supportedFormats: readonly string[];\n}): CliStructuredError {\n return new CliStructuredError('4008', 'Unsupported JSON format', {\n domain: 'CLI',\n why: `The ${options.command} command does not support --json ${options.format}`,\n fix: `Use --json ${options.supportedFormats.join(' or ')}, or omit --json for human output`,\n meta: {\n command: options.command,\n format: options.format,\n supportedFormats: options.supportedFormats,\n },\n });\n}\n\n/**\n * Driver is required for DB-connected commands but not provided.\n */\nexport function errorDriverRequired(options?: { readonly why?: string }): CliStructuredError {\n return new CliStructuredError('4010', 'Driver is required for DB-connected commands', {\n domain: 'CLI',\n why: options?.why ?? 'Config.driver is required for DB-connected commands',\n fix: 'Add a control-plane driver to prisma-next.config.ts (e.g. import a driver descriptor and set `driver: postgresDriver`)',\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n });\n}\n\n/**\n * Contract requires extension packs that are not provided by config descriptors.\n */\nexport function errorContractMissingExtensionPacks(options: {\n readonly missingExtensionPacks: readonly string[];\n readonly providedComponentIds: readonly string[];\n}): CliStructuredError {\n const missing = [...options.missingExtensionPacks].sort();\n return new CliStructuredError('4011', 'Missing extension packs in config', {\n domain: 'CLI',\n why:\n missing.length === 1\n ? `Contract requires extension pack '${missing[0]}', but CLI config does not provide a matching descriptor.`\n : `Contract requires extension packs ${missing.map((p) => `'${p}'`).join(', ')}, but CLI config does not provide matching descriptors.`,\n fix: 'Add the missing extension descriptors to `extensions` in prisma-next.config.ts',\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n meta: {\n missingExtensionPacks: missing,\n providedComponentIds: [...options.providedComponentIds].sort(),\n },\n });\n}\n\n/**\n * Migration planning failed due to conflicts.\n */\nexport function errorMigrationPlanningFailed(options: {\n readonly conflicts: readonly CliErrorConflict[];\n readonly why?: string;\n}): CliStructuredError {\n const conflictSummaries = options.conflicts.map((c) => c.summary);\n const computedWhy = options.why ?? conflictSummaries.join('\\n');\n\n const conflictFixes = options.conflicts\n .map((c) => c.why)\n .filter((why): why is string => typeof why === 'string');\n const computedFix =\n conflictFixes.length > 0\n ? conflictFixes.join('\\n')\n : 'Use `db verify --schema-only` to inspect conflicts, or ensure the database is empty';\n\n return new CliStructuredError('4020', 'Migration planning failed', {\n domain: 'CLI',\n why: computedWhy,\n fix: computedFix,\n meta: { conflicts: options.conflicts },\n docsUrl: 'https://prisma-next.dev/docs/cli/db-init',\n });\n}\n\n/**\n * Target does not support migrations (missing createPlanner/createRunner).\n */\nexport function errorTargetMigrationNotSupported(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4021', 'Target does not support migrations', {\n domain: 'CLI',\n why: options?.why ?? 'The configured target does not provide migration planner/runner',\n fix: 'Select a target that provides migrations (it must export `target.migrations` for db init)',\n docsUrl: 'https://prisma-next.dev/docs/cli/db-init',\n });\n}\n\n/**\n * The migration-file CLI received `--config` without a path argument (either\n * a bare trailing `--config`, or `--config` followed by another flag like\n * `--config --dry-run`). Surfacing this as a structured error fails fast\n * rather than silently consuming the next flag as the config path or\n * falling back to default discovery against the wrong project.\n */\nexport function errorMigrationCliInvalidConfigArg(options?: {\n readonly nextToken?: string;\n}): CliStructuredError {\n const why =\n options?.nextToken !== undefined\n ? `\\`--config\\` was followed by another flag (\\`${options.nextToken}\\`) instead of a path argument.`\n : '`--config` was passed without a following path argument.';\n return new CliStructuredError('4012', '--config flag requires a path argument', {\n domain: 'CLI',\n why,\n fix: 'Pass a config path: `--config <path>` or `--config=<path>`.',\n meta: options?.nextToken !== undefined ? { nextToken: options.nextToken } : {},\n });\n}\n\n/**\n * The migration-file CLI received a flag it does not recognise. Surfaced as a\n * structured error so consumers can render their own \"did you mean\"\n * suggestions from `meta.knownFlags` rather than parsing the message.\n *\n * Designed to wrap clipanion's `UnknownSyntaxError` at the parser boundary:\n * pass the offending token as `flag` and the option declarations as\n * `knownFlags`.\n */\nexport function errorMigrationCliUnknownFlag(options: {\n readonly flag: string;\n readonly knownFlags: readonly string[];\n}): CliStructuredError {\n const knownList = options.knownFlags.join(', ');\n return new CliStructuredError('4013', 'Unknown migration CLI flag', {\n domain: 'CLI',\n why: `Unknown flag \\`${options.flag}\\`.`,\n fix: `Known flags: ${knownList}. Run with \\`--help\\` to see the full list.`,\n meta: { flag: options.flag, knownFlags: options.knownFlags },\n });\n}\n\n/**\n * The main CLI received an unsupported `--format` value.\n */\nexport function errorInvalidOutputFormat(value: string): CliStructuredError {\n return new CliStructuredError(\n '4014',\n `Invalid --format value \"${value}\". Allowed values: pretty, json.`,\n {\n domain: 'CLI',\n meta: { value, allowed: ['pretty', 'json'] as const },\n },\n );\n}\n\n/**\n * The main CLI received mutually exclusive output format flags\n * (`--format pretty` together with `--json`).\n */\nexport function errorOutputFormatMutex(): CliStructuredError {\n return new CliStructuredError(\n '4015',\n 'Cannot use --format pretty together with --json. Use --format json or --json alone for JSON output.',\n { domain: 'CLI' },\n );\n}\n\n/**\n * Config validation error (missing required fields).\n */\nexport function errorConfigValidation(\n field: string,\n options?: {\n readonly why?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4009', 'Config validation error', {\n domain: 'CLI',\n why: options?.why ?? `Config must have a \"${field}\" field`,\n fix: 'Check your prisma-next.config.ts and ensure all required fields are provided',\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n });\n}\n\n// ============================================================================\n// Generic Error\n// ============================================================================\n\n/**\n * Generic unexpected error.\n */\nexport function errorUnexpected(\n message: string,\n options?: {\n readonly why?: string;\n readonly fix?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4999', 'Unexpected error', {\n domain: 'CLI',\n why: options?.why ?? message,\n fix: options?.fix ?? 'Check the error message and try again',\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+CA,MAAM,oBAAoB;CAAC;CAAO;CAAO;CAAO;CAAO;AAAQ;;;;;AAQ/D,IAAa,qBAAb,cAAwC,MAAM;CAC5C;CACA;CACA;CACA;CACA;CACA;CAMA;CACA;CAEA,YACE,MACA,SACA,SASA;EACA,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,KAAK,SAAS,SAAS,UAAU;EACjC,KAAK,WAAW,SAAS,YAAY;EACrC,KAAK,MAAM,SAAS;EACpB,KAAK,MAAM,SAAS,QAAQ,SAAS,MAAM,KAAA,IAAY,SAAS;EAChE,KAAK,QAAQ,SAAS,QAClB;GACE,MAAM,QAAQ,MAAM;GACpB,MAAM,QAAQ,MAAM;EACtB,IACA,KAAA;EACJ,KAAK,OAAO,SAAS;EACrB,KAAK,UAAU,SAAS;CAC1B;;;;CAKA,aAA+B;EAC7B,OAAO;GACL,IAAI;GACJ,MAAM,MAAM,KAAK,OAAO,GAAG,KAAK;GAChC,QAAQ,KAAK;G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tB;CACrB,MAAM,YAAY,QAAQ,WAAW,KAAK,IAAI;CAC9C,OAAO,IAAI,mBAAmB,QAAQ,8BAA8B;EAClE,QAAQ;EACR,KAAK,kBAAkB,QAAQ,KAAK;EACpC,KAAK,gBAAgB,UAAU;EAC/B,MAAM;GAAE,MAAM,QAAQ;GAAM,YAAY,QAAQ;EAAW;CAC7D,CAAC;AACH;;;;AAKA,SAAgB,yBAAyB,OAAmC;CAC1E,OAAO,IAAI,mBACT,QACA,2BAA2B,MAAM,mCACjC;EACE,QAAQ;EACR,MAAM;GAAE;GAAO,SAAS,CAAC,UAAU,MAAM;EAAW;CACtD,CACF;AACF;;;;;AAMA,SAAgB,yBAA6C;CAC3D,OAAO,IAAI,mBACT,QACA,uGACA,EAAE,QAAQ,MAAM,CAClB;AACF;;;;AAKA,SAAgB,sBACd,OACA,SAGoB;CACpB,OAAO,IAAI,mBAAmB,QAAQ,2BAA2B;EAC/D,QAAQ;EACR,KAAK,SAAS,OAAO,uBAAuB,MAAM;EAClD,KAAK;EACL,SAAS;CACX,CAAC;AACH;;;;AASA,SAAgB,gBACd,SACA,SAIoB;CACpB,OAAO,IAAI,mBAAmB,QAAQ,oBAAoB;EACxD,QAAQ;EACR,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,OAAO;CACvB,CAAC;AACH"}
@@ -118,6 +118,7 @@ declare function errorDatabaseConnectionRequired(options?: {
118
118
  readonly why?: string;
119
119
  readonly commandName?: string;
120
120
  readonly retryCommand?: string;
121
+ readonly missingFlags?: readonly string[];
121
122
  }): CliStructuredError;
122
123
  /**
123
124
  * Query runner factory is required but not provided in config.
@@ -212,4 +213,4 @@ declare function errorUnexpected(message: string, options?: {
212
213
  }): CliStructuredError;
213
214
  //#endregion
214
215
  export { errorMigrationPlanningFailed as _, errorConfigValidation as a, errorTargetMigrationNotSupported as b, errorContractValidationFailed as c, errorFamilyReadMarkerSqlRequired as d, errorFileNotFound as f, errorMigrationCliUnknownFlag as g, errorMigrationCliInvalidConfigArg as h, errorConfigFileNotFound as i, errorDatabaseConnectionRequired as l, errorJsonFormatNotSupported as m, CliErrorEnvelope as n, errorContractConfigMissing as o, errorInvalidOutputFormat as p, CliStructuredError as r, errorContractMissingExtensionPacks as s, CliErrorConflict as t, errorDriverRequired as u, errorOutputFormatMutex as v, errorUnexpected as x, errorQueryRunnerFactoryRequired as y };
215
- //# sourceMappingURL=control-_u-dzLnw.d.mts.map
216
+ //# sourceMappingURL=control-Dv8Jz9k2.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-_u-dzLnw.d.mts","names":[],"sources":["../src/control.ts"],"mappings":";;AAIA;;;UAAiB,gBAAA;EAAA,SACN,EAAA;EAAA,SACA,IAAA;EAAA,SACA,MAAA;EAAA,SACA,QAAA;EAAA,SACA,OAAA;EAAA,SACA,GAAA;EAAA,SACA,GAAA;EAAA,SACA,KAAA;IAAA,SAEM,IAAA;IAAA,SACA,IAAA;EAAA;EAAA,SAGN,IAAA,EAAM,MAAM;EAAA,SACZ,OAAA;AAAA;AAAO;AAMlB;;AANkB,UAMD,gBAAA;EAAA,SACN,IAAA;EAAA,SACA,OAAA;EAAA,SACA,GAAA;AAAA;;AAAG;AACb;;;;AAkBwE;AAEzE;;;;AAAsD;AAMtD;;;;cARM,iBAAA;AAAA,KAEM,cAAA,WAAyB,iBAAiB;;;;;cAMzC,kBAAA,SAA2B,KAAA;EAAA,SAC7B,IAAA;EAAA,SACA,MAAA,EAAQ,cAAA;EAAA,SACR,QAAA;EAAA,SACA,GAAA;EAAA,SACA,GAAA;EAAA,SACA,KAAA;IAAA,SAEM,IAAA;IAAA,SACA,IAAA;EAAA;EAAA,SAGN,IAAA,EAAM,MAAA;EAAA,SACN,OAAA;cAGP,IAAA,UACA,OAAA,UACA,OAAA;IAAA,SACW,MAAA,GAAS,cAAA;IAAA,SACT,QAAA;IAAA,SACA,GAAA;IAAA,SACA,GAAA;IAAA,SACA,KAAA;MAAA,SAAmB,IAAA;MAAA,SAAwB,IAAA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A;EAAA,SAAqB,GAAA;AAAA,IAAiB,kBAAkB;;;;iBAY5E,kCAAA,CAAmC,OAAA;EAAA,SACxC,qBAAA;EAAA,SACA,oBAAA;AAAA,IACP,kBAAkB;;;;iBAoBN,4BAAA,CAA6B,OAAA;EAAA,SAClC,SAAA,WAAoB,gBAAA;EAAA,SACpB,GAAA;AAAA,IACP,kBAAkB;;;;iBAwBN,gCAAA,CAAiC,OAAA;EAAA,SACtC,GAAA;AAAA,IACP,kBAAkB;;;;AAhFA;AAgBtB;;;iBAgFgB,iCAAA,CAAkC,OAAA;EAAA,SACvC,SAAA;AAAA,IACP,kBAAkB;;;AAlFsE;AAY5F;;;;;;iBA4FgB,4BAAA,CAA6B,OAAA;EAAA,SAClC,IAAA;EAAA,SACA,UAAA;AAAA,IACP,kBAAkB;AAxEtB;;;AAAA,iBAqFgB,wBAAA,CAAyB,KAAA,WAAgB,kBAAkB;;;;;iBAe3D,sBAAA,CAAA,GAA0B,kBAAkB;;AAjGtC;AAwBtB;iBAoFgB,qBAAA,CACd,KAAA,UACA,OAAA;EAAA,SACW,GAAA;AAAA,IAEV,kBAAkB;;;;iBAgBL,eAAA,CACd,OAAA,UACA,OAAA;EAAA,SACW,GAAA;EAAA,SACA,GAAA;AAAA,IAEV,kBAAkB"}
@@ -1,2 +1,2 @@
1
- import { _ as errorMigrationPlanningFailed, a as errorConfigValidation, b as errorTargetMigrationNotSupported, c as errorContractValidationFailed, d as errorFamilyReadMarkerSqlRequired, f as errorFileNotFound, g as errorMigrationCliUnknownFlag, h as errorMigrationCliInvalidConfigArg, i as errorConfigFileNotFound, l as errorDatabaseConnectionRequired, m as errorJsonFormatNotSupported, n as CliErrorEnvelope, o as errorContractConfigMissing, p as errorInvalidOutputFormat, r as CliStructuredError, s as errorContractMissingExtensionPacks, t as CliErrorConflict, u as errorDriverRequired, v as errorOutputFormatMutex, x as errorUnexpected, y as errorQueryRunnerFactoryRequired } from "./control-_u-dzLnw.mjs";
1
+ import { _ as errorMigrationPlanningFailed, a as errorConfigValidation, b as errorTargetMigrationNotSupported, c as errorContractValidationFailed, d as errorFamilyReadMarkerSqlRequired, f as errorFileNotFound, g as errorMigrationCliUnknownFlag, h as errorMigrationCliInvalidConfigArg, i as errorConfigFileNotFound, l as errorDatabaseConnectionRequired, m as errorJsonFormatNotSupported, n as CliErrorEnvelope, o as errorContractConfigMissing, p as errorInvalidOutputFormat, r as CliStructuredError, s as errorContractMissingExtensionPacks, t as CliErrorConflict, u as errorDriverRequired, v as errorOutputFormatMutex, x as errorUnexpected, y as errorQueryRunnerFactoryRequired } from "./control-Dv8Jz9k2.mjs";
2
2
  export { type CliErrorConflict, type CliErrorEnvelope, CliStructuredError, errorConfigFileNotFound, errorConfigValidation, errorContractConfigMissing, errorContractMissingExtensionPacks, errorContractValidationFailed, errorDatabaseConnectionRequired, errorDriverRequired, errorFamilyReadMarkerSqlRequired, errorFileNotFound, errorInvalidOutputFormat, errorJsonFormatNotSupported, errorMigrationCliInvalidConfigArg, errorMigrationCliUnknownFlag, errorMigrationPlanningFailed, errorOutputFormatMutex, errorQueryRunnerFactoryRequired, errorTargetMigrationNotSupported, errorUnexpected };
package/dist/control.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as errorQueryRunnerFactoryRequired, a as errorContractMissingExtensionPacks, c as errorDriverRequired, d as errorInvalidOutputFormat, f as errorJsonFormatNotSupported, g as errorOutputFormatMutex, h as errorMigrationPlanningFailed, i as errorContractConfigMissing, l as errorFamilyReadMarkerSqlRequired, m as errorMigrationCliUnknownFlag, n as errorConfigFileNotFound, o as errorContractValidationFailed, p as errorMigrationCliInvalidConfigArg, r as errorConfigValidation, s as errorDatabaseConnectionRequired, t as CliStructuredError, u as errorFileNotFound, v as errorTargetMigrationNotSupported, y as errorUnexpected } from "./control-DOc6vx43.mjs";
1
+ import { _ as errorQueryRunnerFactoryRequired, a as errorContractMissingExtensionPacks, c as errorDriverRequired, d as errorInvalidOutputFormat, f as errorJsonFormatNotSupported, g as errorOutputFormatMutex, h as errorMigrationPlanningFailed, i as errorContractConfigMissing, l as errorFamilyReadMarkerSqlRequired, m as errorMigrationCliUnknownFlag, n as errorConfigFileNotFound, o as errorContractValidationFailed, p as errorMigrationCliInvalidConfigArg, r as errorConfigValidation, s as errorDatabaseConnectionRequired, t as CliStructuredError, u as errorFileNotFound, v as errorTargetMigrationNotSupported, y as errorUnexpected } from "./control-BmidmC9l.mjs";
2
2
  export { CliStructuredError, errorConfigFileNotFound, errorConfigValidation, errorContractConfigMissing, errorContractMissingExtensionPacks, errorContractValidationFailed, errorDatabaseConnectionRequired, errorDriverRequired, errorFamilyReadMarkerSqlRequired, errorFileNotFound, errorInvalidOutputFormat, errorJsonFormatNotSupported, errorMigrationCliInvalidConfigArg, errorMigrationCliUnknownFlag, errorMigrationPlanningFailed, errorOutputFormatMutex, errorQueryRunnerFactoryRequired, errorTargetMigrationNotSupported, errorUnexpected };
@@ -1,4 +1,4 @@
1
- import { r as CliStructuredError } from "./control-_u-dzLnw.mjs";
1
+ import { r as CliStructuredError } from "./control-Dv8Jz9k2.mjs";
2
2
  import { SchemaIssue, VerifyDatabaseSchemaResult } from "@prisma-next/framework-components/control";
3
3
 
4
4
  //#region src/execution.d.ts
@@ -1,4 +1,4 @@
1
- import { t as CliStructuredError } from "./control-DOc6vx43.mjs";
1
+ import { t as CliStructuredError } from "./control-BmidmC9l.mjs";
2
2
  import { ifDefined } from "@prisma-next/utils/defined";
3
3
  //#region src/execution.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { r as CliStructuredError } from "./control-_u-dzLnw.mjs";
1
+ import { r as CliStructuredError } from "./control-Dv8Jz9k2.mjs";
2
2
 
3
3
  //#region src/migration.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as CliStructuredError } from "./control-DOc6vx43.mjs";
1
+ import { t as CliStructuredError } from "./control-BmidmC9l.mjs";
2
2
  //#region src/migration.ts
3
3
  /**
4
4
  * A scaffolded migration contains a placeholder slot that was never filled in.
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@prisma-next/errors",
3
- "version": "0.12.0-dev.39",
3
+ "version": "0.12.0-dev.40",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "description": "Structured error types for Prisma Next control and execution planes",
8
8
  "dependencies": {
9
- "@prisma-next/framework-components": "0.12.0-dev.39",
10
- "@prisma-next/utils": "0.12.0-dev.39"
9
+ "@prisma-next/framework-components": "0.12.0-dev.40",
10
+ "@prisma-next/utils": "0.12.0-dev.40"
11
11
  },
12
12
  "devDependencies": {
13
- "@prisma-next/tsconfig": "0.12.0-dev.39",
14
- "@prisma-next/tsdown": "0.12.0-dev.39",
13
+ "@prisma-next/tsconfig": "0.12.0-dev.40",
14
+ "@prisma-next/tsdown": "0.12.0-dev.40",
15
15
  "tsdown": "0.22.0",
16
16
  "typescript": "5.9.3",
17
17
  "vitest": "4.1.6"
package/src/control.ts CHANGED
@@ -239,6 +239,7 @@ export function errorDatabaseConnectionRequired(options?: {
239
239
  readonly why?: string;
240
240
  readonly commandName?: string;
241
241
  readonly retryCommand?: string;
242
+ readonly missingFlags?: readonly string[];
242
243
  }): CliStructuredError {
243
244
  const runHint = options?.retryCommand
244
245
  ? `Run \`${options.retryCommand}\``
@@ -249,6 +250,9 @@ export function errorDatabaseConnectionRequired(options?: {
249
250
  domain: 'CLI',
250
251
  why: options?.why ?? 'Database connection is required for this command',
251
252
  fix: `${runHint}, or set \`db: { connection: "postgres://…" }\` in prisma-next.config.ts`,
253
+ ...(options?.missingFlags !== undefined
254
+ ? { meta: { missingFlags: [...options.missingFlags] } }
255
+ : {}),
252
256
  });
253
257
  }
254
258
 
@@ -1 +0,0 @@
1
- {"version":3,"file":"control-DOc6vx43.mjs","names":[],"sources":["../src/control.ts"],"sourcesContent":["/**\n * CLI error envelope for output formatting.\n * This is the serialized form of a CliStructuredError.\n */\nexport interface CliErrorEnvelope {\n readonly ok: false;\n readonly code: string;\n readonly domain: string;\n readonly severity: 'error' | 'warn' | 'info';\n readonly summary: string;\n readonly why: string | undefined;\n readonly fix: string | undefined;\n readonly where:\n | {\n readonly path: string | undefined;\n readonly line: number | undefined;\n }\n | undefined;\n readonly meta: Record<string, unknown> | undefined;\n readonly docsUrl: string | undefined;\n}\n\n/**\n * Minimal conflict data structure expected by CLI output.\n */\nexport interface CliErrorConflict {\n readonly kind: string;\n readonly summary: string;\n readonly why?: string;\n}\n\n/**\n * Domain prefix for structured CLI error codes.\n *\n * The full envelope code is rendered as `PN-<domain>-<code>` (see\n * `CliStructuredError.toEnvelope`). The supported domains follow the\n * taxonomy documented in `docs/CLI Style Guide.md`:\n *\n * - `CLI` — CLI command processing (config, validation, planning)\n * - `MIG` — Migration subsystem (authoring, planning conflicts, runner)\n * - `RUN` — Application runtime (query execution, streaming)\n * - `CON` — Contract subsystem (validation, normalization)\n * - `SCHEMA` — Schema subsystem\n *\n * Sub-clustering within a domain is conveyed by the numeric code range; see\n * the per-domain source files for reserved ranges.\n */\nconst CLI_ERROR_DOMAINS = ['CLI', 'RUN', 'MIG', 'CON', 'SCHEMA'] as const;\n\nexport type CliErrorDomain = (typeof CLI_ERROR_DOMAINS)[number];\n\n/**\n * Structured CLI error that contains all information needed for error envelopes.\n * Call sites throw these errors with full context.\n */\nexport class CliStructuredError extends Error {\n readonly code: string;\n readonly domain: CliErrorDomain;\n readonly severity: 'error' | 'warn' | 'info';\n readonly why: string | undefined;\n readonly fix: string | undefined;\n readonly where:\n | {\n readonly path: string | undefined;\n readonly line: number | undefined;\n }\n | undefined;\n readonly meta: Record<string, unknown> | undefined;\n readonly docsUrl: string | undefined;\n\n constructor(\n code: string,\n summary: string,\n options?: {\n readonly domain?: CliErrorDomain;\n readonly severity?: 'error' | 'warn' | 'info';\n readonly why?: string;\n readonly fix?: string;\n readonly where?: { readonly path?: string; readonly line?: number };\n readonly meta?: Record<string, unknown>;\n readonly docsUrl?: string;\n },\n ) {\n super(summary);\n this.name = 'CliStructuredError';\n this.code = code;\n this.domain = options?.domain ?? 'CLI';\n this.severity = options?.severity ?? 'error';\n this.why = options?.why;\n this.fix = options?.fix === options?.why ? undefined : options?.fix;\n this.where = options?.where\n ? {\n path: options.where.path,\n line: options.where.line,\n }\n : undefined;\n this.meta = options?.meta;\n this.docsUrl = options?.docsUrl;\n }\n\n /**\n * Converts this error to a CLI error envelope for output formatting.\n */\n toEnvelope(): CliErrorEnvelope {\n return {\n ok: false as const,\n code: `PN-${this.domain}-${this.code}`,\n domain: this.domain,\n severity: this.severity,\n summary: this.message,\n why: this.why,\n fix: this.fix,\n where: this.where,\n meta: this.meta,\n docsUrl: this.docsUrl,\n };\n }\n\n /**\n * Type guard to check if an error is a CliStructuredError.\n * Uses duck-typing to work across module boundaries where instanceof may fail.\n */\n static is(error: unknown): error is CliStructuredError {\n if (!(error instanceof Error)) {\n return false;\n }\n const candidate = error as CliStructuredError;\n return (\n candidate.name === 'CliStructuredError' &&\n typeof candidate.code === 'string' &&\n isCliErrorDomain(candidate.domain) &&\n typeof candidate.toEnvelope === 'function'\n );\n }\n}\n\nconst CLI_ERROR_DOMAIN_SET: ReadonlySet<CliErrorDomain> = new Set(CLI_ERROR_DOMAINS);\n\nfunction isCliErrorDomain(value: unknown): value is CliErrorDomain {\n return typeof value === 'string' && CLI_ERROR_DOMAIN_SET.has(value as CliErrorDomain);\n}\n\n// ============================================================================\n// Numeric range conventions for `PN-CLI-NNNN`\n// ============================================================================\n//\n// Sub-clustering inside the `CLI` domain uses the numeric prefix:\n//\n// - `4xxx` — generic / cross-command CLI errors authored here (config\n// missing, file not found, contract validation, etc.).\n// - `5xxx` — command-specific CLI errors authored alongside the command\n// itself (e.g. `init` errors live in\n// `packages/1-framework/3-tooling/cli/src/commands/init/errors.ts`).\n// The 5xxx range avoids collisions with the shared 4xxx pool while\n// still belonging to the `CLI` domain — consumers branch on the full\n// `PN-CLI-5007` form, so the prefix is purely an authoring guide.\n//\n// See [`docs/CLI Style Guide.md` § Errors](../../../../../docs/CLI%20Style%20Guide.md#errors)\n// and the per-command error file for the live reservation list.\n\n// ============================================================================\n// Config Errors (PN-CLI-4001-4007)\n// ============================================================================\n\n/**\n * Config file not found or missing.\n */\nexport function errorConfigFileNotFound(\n configPath?: string,\n options?: {\n readonly why?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4001', 'Config file not found', {\n domain: 'CLI',\n ...(options?.why ? { why: options.why } : { why: 'Config file not found' }),\n fix: \"Run 'prisma-next init' to create a config file\",\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n ...(configPath ? { where: { path: configPath } } : {}),\n });\n}\n\n/**\n * Contract configuration missing from config.\n */\nexport function errorContractConfigMissing(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4002', 'Contract configuration missing', {\n domain: 'CLI',\n why: options?.why ?? 'The contract configuration is required for emit',\n fix: 'Add contract configuration to your prisma-next.config.ts',\n docsUrl: 'https://prisma-next.dev/docs/cli/contract-emit',\n });\n}\n\n/**\n * Contract validation failed.\n */\nexport function errorContractValidationFailed(\n reason: string,\n options?: {\n readonly where?: { readonly path?: string; readonly line?: number };\n },\n): CliStructuredError {\n return new CliStructuredError('4003', 'Contract validation failed', {\n domain: 'CLI',\n why: reason,\n fix: 'Re-run `prisma-next contract emit`, or fix the contract file and try again',\n docsUrl: 'https://prisma-next.dev/docs/contracts',\n ...(options?.where ? { where: options.where } : {}),\n });\n}\n\n/**\n * File not found.\n */\nexport function errorFileNotFound(\n filePath: string,\n options?: {\n readonly why?: string;\n readonly fix?: string;\n readonly docsUrl?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4004', 'File not found', {\n domain: 'CLI',\n why: options?.why ?? `File not found: ${filePath}`,\n fix: options?.fix ?? 'Check that the file path is correct',\n where: { path: filePath },\n ...(options?.docsUrl ? { docsUrl: options.docsUrl } : {}),\n });\n}\n\n/**\n * Database connection is required but not provided.\n */\nexport function errorDatabaseConnectionRequired(options?: {\n readonly why?: string;\n readonly commandName?: string;\n readonly retryCommand?: string;\n}): CliStructuredError {\n const runHint = options?.retryCommand\n ? `Run \\`${options.retryCommand}\\``\n : options?.commandName\n ? `Run \\`prisma-next ${options.commandName} --db <url>\\``\n : 'Provide `--db <url>`';\n return new CliStructuredError('4005', 'Database connection is required', {\n domain: 'CLI',\n why: options?.why ?? 'Database connection is required for this command',\n fix: `${runHint}, or set \\`db: { connection: \"postgres://…\" }\\` in prisma-next.config.ts`,\n });\n}\n\n/**\n * Query runner factory is required but not provided in config.\n */\nexport function errorQueryRunnerFactoryRequired(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4006', 'Query runner factory is required', {\n domain: 'CLI',\n why: options?.why ?? 'Config.db.queryRunnerFactory is required for db verify',\n fix: 'Add db.queryRunnerFactory to prisma-next.config.ts',\n docsUrl: 'https://prisma-next.dev/docs/cli/db-verify',\n });\n}\n\n/**\n * Family verify.readMarker is required but not provided.\n */\nexport function errorFamilyReadMarkerSqlRequired(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4007', 'Family readMarker() is required', {\n domain: 'CLI',\n why: options?.why ?? 'Family verify.readMarker is required for db verify',\n fix: 'Ensure family.verify.readMarker() is exported by your family package',\n docsUrl: 'https://prisma-next.dev/docs/cli/db-verify',\n });\n}\n\n/**\n * JSON output format not supported.\n */\nexport function errorJsonFormatNotSupported(options: {\n readonly command: string;\n readonly format: string;\n readonly supportedFormats: readonly string[];\n}): CliStructuredError {\n return new CliStructuredError('4008', 'Unsupported JSON format', {\n domain: 'CLI',\n why: `The ${options.command} command does not support --json ${options.format}`,\n fix: `Use --json ${options.supportedFormats.join(' or ')}, or omit --json for human output`,\n meta: {\n command: options.command,\n format: options.format,\n supportedFormats: options.supportedFormats,\n },\n });\n}\n\n/**\n * Driver is required for DB-connected commands but not provided.\n */\nexport function errorDriverRequired(options?: { readonly why?: string }): CliStructuredError {\n return new CliStructuredError('4010', 'Driver is required for DB-connected commands', {\n domain: 'CLI',\n why: options?.why ?? 'Config.driver is required for DB-connected commands',\n fix: 'Add a control-plane driver to prisma-next.config.ts (e.g. import a driver descriptor and set `driver: postgresDriver`)',\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n });\n}\n\n/**\n * Contract requires extension packs that are not provided by config descriptors.\n */\nexport function errorContractMissingExtensionPacks(options: {\n readonly missingExtensionPacks: readonly string[];\n readonly providedComponentIds: readonly string[];\n}): CliStructuredError {\n const missing = [...options.missingExtensionPacks].sort();\n return new CliStructuredError('4011', 'Missing extension packs in config', {\n domain: 'CLI',\n why:\n missing.length === 1\n ? `Contract requires extension pack '${missing[0]}', but CLI config does not provide a matching descriptor.`\n : `Contract requires extension packs ${missing.map((p) => `'${p}'`).join(', ')}, but CLI config does not provide matching descriptors.`,\n fix: 'Add the missing extension descriptors to `extensions` in prisma-next.config.ts',\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n meta: {\n missingExtensionPacks: missing,\n providedComponentIds: [...options.providedComponentIds].sort(),\n },\n });\n}\n\n/**\n * Migration planning failed due to conflicts.\n */\nexport function errorMigrationPlanningFailed(options: {\n readonly conflicts: readonly CliErrorConflict[];\n readonly why?: string;\n}): CliStructuredError {\n const conflictSummaries = options.conflicts.map((c) => c.summary);\n const computedWhy = options.why ?? conflictSummaries.join('\\n');\n\n const conflictFixes = options.conflicts\n .map((c) => c.why)\n .filter((why): why is string => typeof why === 'string');\n const computedFix =\n conflictFixes.length > 0\n ? conflictFixes.join('\\n')\n : 'Use `db verify --schema-only` to inspect conflicts, or ensure the database is empty';\n\n return new CliStructuredError('4020', 'Migration planning failed', {\n domain: 'CLI',\n why: computedWhy,\n fix: computedFix,\n meta: { conflicts: options.conflicts },\n docsUrl: 'https://prisma-next.dev/docs/cli/db-init',\n });\n}\n\n/**\n * Target does not support migrations (missing createPlanner/createRunner).\n */\nexport function errorTargetMigrationNotSupported(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4021', 'Target does not support migrations', {\n domain: 'CLI',\n why: options?.why ?? 'The configured target does not provide migration planner/runner',\n fix: 'Select a target that provides migrations (it must export `target.migrations` for db init)',\n docsUrl: 'https://prisma-next.dev/docs/cli/db-init',\n });\n}\n\n/**\n * The migration-file CLI received `--config` without a path argument (either\n * a bare trailing `--config`, or `--config` followed by another flag like\n * `--config --dry-run`). Surfacing this as a structured error fails fast\n * rather than silently consuming the next flag as the config path or\n * falling back to default discovery against the wrong project.\n */\nexport function errorMigrationCliInvalidConfigArg(options?: {\n readonly nextToken?: string;\n}): CliStructuredError {\n const why =\n options?.nextToken !== undefined\n ? `\\`--config\\` was followed by another flag (\\`${options.nextToken}\\`) instead of a path argument.`\n : '`--config` was passed without a following path argument.';\n return new CliStructuredError('4012', '--config flag requires a path argument', {\n domain: 'CLI',\n why,\n fix: 'Pass a config path: `--config <path>` or `--config=<path>`.',\n meta: options?.nextToken !== undefined ? { nextToken: options.nextToken } : {},\n });\n}\n\n/**\n * The migration-file CLI received a flag it does not recognise. Surfaced as a\n * structured error so consumers can render their own \"did you mean\"\n * suggestions from `meta.knownFlags` rather than parsing the message.\n *\n * Designed to wrap clipanion's `UnknownSyntaxError` at the parser boundary:\n * pass the offending token as `flag` and the option declarations as\n * `knownFlags`.\n */\nexport function errorMigrationCliUnknownFlag(options: {\n readonly flag: string;\n readonly knownFlags: readonly string[];\n}): CliStructuredError {\n const knownList = options.knownFlags.join(', ');\n return new CliStructuredError('4013', 'Unknown migration CLI flag', {\n domain: 'CLI',\n why: `Unknown flag \\`${options.flag}\\`.`,\n fix: `Known flags: ${knownList}. Run with \\`--help\\` to see the full list.`,\n meta: { flag: options.flag, knownFlags: options.knownFlags },\n });\n}\n\n/**\n * The main CLI received an unsupported `--format` value.\n */\nexport function errorInvalidOutputFormat(value: string): CliStructuredError {\n return new CliStructuredError(\n '4014',\n `Invalid --format value \"${value}\". Allowed values: pretty, json.`,\n {\n domain: 'CLI',\n meta: { value, allowed: ['pretty', 'json'] as const },\n },\n );\n}\n\n/**\n * The main CLI received mutually exclusive output format flags\n * (`--format pretty` together with `--json`).\n */\nexport function errorOutputFormatMutex(): CliStructuredError {\n return new CliStructuredError(\n '4015',\n 'Cannot use --format pretty together with --json. Use --format json or --json alone for JSON output.',\n { domain: 'CLI' },\n );\n}\n\n/**\n * Config validation error (missing required fields).\n */\nexport function errorConfigValidation(\n field: string,\n options?: {\n readonly why?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4009', 'Config validation error', {\n domain: 'CLI',\n why: options?.why ?? `Config must have a \"${field}\" field`,\n fix: 'Check your prisma-next.config.ts and ensure all required fields are provided',\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n });\n}\n\n// ============================================================================\n// Generic Error\n// ============================================================================\n\n/**\n * Generic unexpected error.\n */\nexport function errorUnexpected(\n message: string,\n options?: {\n readonly why?: string;\n readonly fix?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4999', 'Unexpected error', {\n domain: 'CLI',\n why: options?.why ?? message,\n fix: options?.fix ?? 'Check the error message and try again',\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+CA,MAAM,oBAAoB;CAAC;CAAO;CAAO;CAAO;CAAO;AAAQ;;;;;AAQ/D,IAAa,qBAAb,cAAwC,MAAM;CAC5C;CACA;CACA;CACA;CACA;CACA;CAMA;CACA;CAEA,YACE,MACA,SACA,SASA;EACA,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,KAAK,SAAS,SAAS,UAAU;EACjC,KAAK,WAAW,SAAS,YAAY;EACrC,KAAK,MAAM,SAAS;EACpB,KAAK,MAAM,SAAS,QAAQ,SAAS,MAAM,KAAA,IAAY,SAAS;EAChE,KAAK,QAAQ,SAAS,QAClB;GACE,MAAM,QAAQ,MAAM;GACpB,MAAM,QAAQ,MAAM;EACtB,IACA,KAAA;EACJ,KAAK,OAAO,SAAS;EACrB,KAAK,UAAU,SAAS;CAC1B;;;;CAKA,aAA+B;EAC7B,OAAO;GACL,IAAI;GACJ,MAAM,MAAM,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