@prisma/orm-framework 8.0.0-rc.1-dev.21 → 8.0.0-rc.1-dev.23

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 (49) hide show
  1. package/dist/config-types-BqhNxw0z.mjs +67 -0
  2. package/dist/config-types-BqhNxw0z.mjs.map +1 -0
  3. package/dist/{config-types-W-87vhZ4-DQk0SSmj.d.mts → config-types-gou0jUAD.d.mts} +19 -5
  4. package/dist/config-types-gou0jUAD.d.mts.map +1 -0
  5. package/dist/config-validation-DPt5hwQx.mjs +168 -0
  6. package/dist/config-validation-DPt5hwQx.mjs.map +1 -0
  7. package/dist/config-validation-Wiqew2J9.d.mts +21 -0
  8. package/dist/config-validation-Wiqew2J9.d.mts.map +1 -0
  9. package/dist/config.d.mts +3 -4
  10. package/dist/config.mjs +3 -3
  11. package/dist/config__config-types.d.mts +2 -3
  12. package/dist/config__config-types.mjs +2 -2
  13. package/dist/config__config-validation.d.mts +2 -2
  14. package/dist/config__config-validation.mjs +2 -2
  15. package/dist/{control-CwRPkRJ7-Dk0c6D_5.d.mts → control-BWHddgfQ-CHZkHCnz.d.mts} +17 -3
  16. package/dist/control-BWHddgfQ-CHZkHCnz.d.mts.map +1 -0
  17. package/dist/{control-NxsoLvV7-CEAZQk3h.mjs → control-C_8057XM-DMCFN-Wb.mjs} +33 -4
  18. package/dist/control-C_8057XM-DMCFN-Wb.mjs.map +1 -0
  19. package/dist/errors.d.mts +4 -4
  20. package/dist/errors.mjs +4 -4
  21. package/dist/errors__control.d.mts +2 -2
  22. package/dist/errors__control.mjs +2 -2
  23. package/dist/errors__execution.d.mts +1 -1
  24. package/dist/errors__execution.mjs +1 -1
  25. package/dist/errors__migration.d.mts +1 -1
  26. package/dist/errors__migration.mjs +1 -1
  27. package/dist/{execution-D1Tn68OX.mjs → execution-BRMViM_W.mjs} +2 -2
  28. package/dist/{execution-D1Tn68OX.mjs.map → execution-BRMViM_W.mjs.map} +1 -1
  29. package/dist/{execution-D_ARq2Yb.d.mts → execution-CStuUgUf.d.mts} +2 -2
  30. package/dist/{execution-D_ARq2Yb.d.mts.map → execution-CStuUgUf.d.mts.map} +1 -1
  31. package/dist/{migration-Ds6n8w-H.mjs → migration-DdUmzx06.mjs} +2 -2
  32. package/dist/{migration-Ds6n8w-H.mjs.map → migration-DdUmzx06.mjs.map} +1 -1
  33. package/dist/{migration-C02YXQMR.d.mts → migration-dka5vLtm.d.mts} +2 -2
  34. package/dist/{migration-C02YXQMR.d.mts.map → migration-dka5vLtm.d.mts.map} +1 -1
  35. package/dist/psl-parser__interpret.d.mts +1 -2
  36. package/dist/psl-parser__interpret.d.mts.map +1 -1
  37. package/package.json +15 -15
  38. package/dist/config-errors-CBdiX587-DwIyJIX9.mjs +0 -9
  39. package/dist/config-errors-CBdiX587-DwIyJIX9.mjs.map +0 -1
  40. package/dist/config-types-C9MZ-mH9.d.mts +0 -1
  41. package/dist/config-types-Cf9lVsHR.mjs +0 -62
  42. package/dist/config-types-Cf9lVsHR.mjs.map +0 -1
  43. package/dist/config-types-W-87vhZ4-DQk0SSmj.d.mts.map +0 -1
  44. package/dist/config-validation-9rldVCTn.d.mts +0 -14
  45. package/dist/config-validation-9rldVCTn.d.mts.map +0 -1
  46. package/dist/config-validation-ByGTw6zQ.mjs +0 -99
  47. package/dist/config-validation-ByGTw6zQ.mjs.map +0 -1
  48. package/dist/control-CwRPkRJ7-Dk0c6D_5.d.mts.map +0 -1
  49. package/dist/control-NxsoLvV7-CEAZQk3h.mjs.map +0 -1
@@ -0,0 +1,67 @@
1
+ //#region ../../../1-framework/1-core/config/dist/config-types.mjs
2
+ /**
3
+ * Default *source* directory for the contract file the user authors at `init`
4
+ * time. Output artefacts colocate with source per the same rule path-bearing
5
+ * providers apply.
6
+ */
7
+ const DEFAULT_CONTRACT_SOURCE_DIR = "src/prisma";
8
+ function normalizeContractConfig(contract) {
9
+ const inMemoryFallbackOutput = `${DEFAULT_CONTRACT_SOURCE_DIR}/contract.json`;
10
+ return {
11
+ source: contract.source,
12
+ output: contract.output ?? inMemoryFallbackOutput
13
+ };
14
+ }
15
+ /**
16
+ * Version of the config format produced by this `defineConfig`. Bumped when
17
+ * the config shape changes incompatibly.
18
+ */
19
+ const CONFIG_FORMAT_VERSION = 1;
20
+ const CONFIG_FORMAT_VERSION_KEY = Symbol.for("prisma-next.config-format-version");
21
+ function stampConfigFormatVersion(config) {
22
+ Object.defineProperty(config, CONFIG_FORMAT_VERSION_KEY, {
23
+ value: 1,
24
+ enumerable: false,
25
+ configurable: false,
26
+ writable: false
27
+ });
28
+ return config;
29
+ }
30
+ /**
31
+ * Reads the config-format version stamped by `defineConfig`, or `undefined`
32
+ * when the value was not produced by `defineConfig`. The marker is
33
+ * non-enumerable and does not survive spreads: configs must export the
34
+ * `defineConfig` result directly.
35
+ */
36
+ function readConfigFormatVersion(value) {
37
+ if (typeof value !== "object" || value === null) return;
38
+ const version = Reflect.get(value, CONFIG_FORMAT_VERSION_KEY);
39
+ return typeof version === "number" ? version : void 0;
40
+ }
41
+ function hasCurrentConfigFormatVersion(value) {
42
+ return readConfigFormatVersion(value) === 1;
43
+ }
44
+ /**
45
+ * Helper function to define a Prisma Next config.
46
+ * Normalizes the config and stamps it with the config-format version marker.
47
+ * Structural validation happens in the config loader, which reports
48
+ * per-section diagnostics instead of failing the whole load.
49
+ *
50
+ * Normalization:
51
+ * - contract.output defaults to a path colocated with DEFAULT_CONTRACT_SOURCE_DIR
52
+ * when missing (in-memory-only providers)
53
+ *
54
+ * @param config - Raw config input from user
55
+ * @returns Normalized config IR with defaults applied
56
+ */
57
+ function defineConfig(config) {
58
+ if (config.contract) return stampConfigFormatVersion({
59
+ ...config,
60
+ contract: normalizeContractConfig(config.contract)
61
+ });
62
+ return stampConfigFormatVersion(config);
63
+ }
64
+ //#endregion
65
+ export { normalizeContractConfig as a, hasCurrentConfigFormatVersion as i, DEFAULT_CONTRACT_SOURCE_DIR as n, readConfigFormatVersion as o, defineConfig as r, CONFIG_FORMAT_VERSION as t };
66
+
67
+ //# sourceMappingURL=config-types-BqhNxw0z.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-types-BqhNxw0z.mjs","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-types.mjs"],"sourcesContent":["//#region src/config-types.ts\n/**\n* Default *source* directory for the contract file the user authors at `init`\n* time. Output artefacts colocate with source per the same rule path-bearing\n* providers apply.\n*/\nconst DEFAULT_CONTRACT_SOURCE_DIR = \"src/prisma\";\nfunction normalizeContractConfig(contract) {\n\tconst inMemoryFallbackOutput = `${DEFAULT_CONTRACT_SOURCE_DIR}/contract.json`;\n\treturn {\n\t\tsource: contract.source,\n\t\toutput: contract.output ?? inMemoryFallbackOutput\n\t};\n}\n/**\n* Version of the config format produced by this `defineConfig`. Bumped when\n* the config shape changes incompatibly.\n*/\nconst CONFIG_FORMAT_VERSION = 1;\nconst CONFIG_FORMAT_VERSION_KEY = Symbol.for(\"prisma-next.config-format-version\");\nfunction stampConfigFormatVersion(config) {\n\tObject.defineProperty(config, CONFIG_FORMAT_VERSION_KEY, {\n\t\tvalue: 1,\n\t\tenumerable: false,\n\t\tconfigurable: false,\n\t\twritable: false\n\t});\n\treturn config;\n}\n/**\n* Reads the config-format version stamped by `defineConfig`, or `undefined`\n* when the value was not produced by `defineConfig`. The marker is\n* non-enumerable and does not survive spreads: configs must export the\n* `defineConfig` result directly.\n*/\nfunction readConfigFormatVersion(value) {\n\tif (typeof value !== \"object\" || value === null) return;\n\tconst version = Reflect.get(value, CONFIG_FORMAT_VERSION_KEY);\n\treturn typeof version === \"number\" ? version : void 0;\n}\nfunction hasCurrentConfigFormatVersion(value) {\n\treturn readConfigFormatVersion(value) === 1;\n}\n/**\n* Helper function to define a Prisma Next config.\n* Normalizes the config and stamps it with the config-format version marker.\n* Structural validation happens in the config loader, which reports\n* per-section diagnostics instead of failing the whole load.\n*\n* Normalization:\n* - contract.output defaults to a path colocated with DEFAULT_CONTRACT_SOURCE_DIR\n* when missing (in-memory-only providers)\n*\n* @param config - Raw config input from user\n* @returns Normalized config IR with defaults applied\n*/\nfunction defineConfig(config) {\n\tif (config.contract) return stampConfigFormatVersion({\n\t\t...config,\n\t\tcontract: normalizeContractConfig(config.contract)\n\t});\n\treturn stampConfigFormatVersion(config);\n}\n//#endregion\nexport { CONFIG_FORMAT_VERSION, DEFAULT_CONTRACT_SOURCE_DIR, defineConfig, hasCurrentConfigFormatVersion, normalizeContractConfig, readConfigFormatVersion };\n\n//# sourceMappingURL=config-types.mjs.map"],"mappings":";;;;;;AAMA,MAAM,8BAA8B;AACpC,SAAS,wBAAwB,UAAU;CAC1C,MAAM,yBAAyB,GAAG,4BAA4B;CAC9D,OAAO;EACN,QAAQ,SAAS;EACjB,QAAQ,SAAS,UAAU;CAC5B;AACD;;;;;AAKA,MAAM,wBAAwB;AAC9B,MAAM,4BAA4B,OAAO,IAAI,mCAAmC;AAChF,SAAS,yBAAyB,QAAQ;CACzC,OAAO,eAAe,QAAQ,2BAA2B;EACxD,OAAO;EACP,YAAY;EACZ,cAAc;EACd,UAAU;CACX,CAAC;CACD,OAAO;AACR;;;;;;;AAOA,SAAS,wBAAwB,OAAO;CACvC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM;CACjD,MAAM,UAAU,QAAQ,IAAI,OAAO,yBAAyB;CAC5D,OAAO,OAAO,YAAY,WAAW,UAAU,KAAK;AACrD;AACA,SAAS,8BAA8B,OAAO;CAC7C,OAAO,wBAAwB,KAAK,MAAM;AAC3C;;;;;;;;;;;;;;AAcA,SAAS,aAAa,QAAQ;CAC7B,IAAI,OAAO,UAAU,OAAO,yBAAyB;EACpD,GAAG;EACH,UAAU,wBAAwB,OAAO,QAAQ;CAClD,CAAC;CACD,OAAO,yBAAyB,MAAM;AACvC"}
@@ -6,7 +6,7 @@ import { u as ControlMutationDefaults } from "./framework-components-p8N1lyvE-Cg
6
6
  import "./components-CS6Hvdt6.mjs";
7
7
  import { r as Result } from "./result-Bpupv5vO.mjs";
8
8
  import { d as ControlExtensionDescriptor, g as ControlTargetDescriptor, l as ControlDriverDescriptor, n as AssembledAuthoringContributions, p as ControlFamilyDescriptor, s as ControlAdapterDescriptor, u as ControlDriverInstance } from "./control-tgMv-peQ.mjs";
9
- //#region ../../../1-framework/1-core/config/dist/config-types-W-87vhZ4.d.mts
9
+ //#region ../../../1-framework/1-core/config/dist/config-types.d.mts
10
10
  //#region src/contract-source-types.d.ts
11
11
  interface ContractSourceDiagnosticPosition {
12
12
  readonly offset: number;
@@ -144,9 +144,24 @@ interface PrismaNextConfig<TFamilyId extends string = string, TTargetId extends
144
144
  };
145
145
  readonly formatter?: FormatterConfig;
146
146
  }
147
+ /**
148
+ * Version of the config format produced by this `defineConfig`. Bumped when
149
+ * the config shape changes incompatibly.
150
+ */
151
+ declare const CONFIG_FORMAT_VERSION = 1;
152
+ /**
153
+ * Reads the config-format version stamped by `defineConfig`, or `undefined`
154
+ * when the value was not produced by `defineConfig`. The marker is
155
+ * non-enumerable and does not survive spreads: configs must export the
156
+ * `defineConfig` result directly.
157
+ */
158
+ declare function readConfigFormatVersion(value: unknown): number | undefined;
159
+ declare function hasCurrentConfigFormatVersion(value: unknown): boolean;
147
160
  /**
148
161
  * Helper function to define a Prisma Next config.
149
- * Validates and normalizes the config using Arktype, then returns the normalized IR.
162
+ * Normalizes the config and stamps it with the config-format version marker.
163
+ * Structural validation happens in the config loader, which reports
164
+ * per-section diagnostics instead of failing the whole load.
150
165
  *
151
166
  * Normalization:
152
167
  * - contract.output defaults to a path colocated with DEFAULT_CONTRACT_SOURCE_DIR
@@ -154,9 +169,8 @@ interface PrismaNextConfig<TFamilyId extends string = string, TTargetId extends
154
169
  *
155
170
  * @param config - Raw config input from user
156
171
  * @returns Normalized config IR with defaults applied
157
- * @throws Error if config structure is invalid
158
172
  */
159
173
  declare function defineConfig<TFamilyId extends string = string, TTargetId extends string = string>(config: PrismaNextConfig<TFamilyId, TTargetId>): PrismaNextConfig<TFamilyId, TTargetId>;
160
174
  //#endregion
161
- export { normalizeContractConfig as _, ContractSourceDiagnosticSpan as a, ContractSourceProvider as c, FormatterConfig as d, OpaqueContractSourceProvider as f, defineConfig as g, TypeScriptContractSourceProvider as h, ContractSourceDiagnosticPosition as i, ContractSourceProviderBase as l, PslContractSourceProvider as m, ContractSourceContext as n, ContractSourceDiagnostics as o, PrismaNextConfig as p, ContractSourceDiagnostic as r, ContractSourceFormat as s, ContractConfig as t, DEFAULT_CONTRACT_SOURCE_DIR as u };
162
- //# sourceMappingURL=config-types-W-87vhZ4-DQk0SSmj.d.mts.map
175
+ export { defineConfig as _, ContractSourceDiagnosticPosition as a, readConfigFormatVersion as b, ContractSourceFormat as c, DEFAULT_CONTRACT_SOURCE_DIR as d, FormatterConfig as f, TypeScriptContractSourceProvider as g, PslContractSourceProvider as h, ContractSourceDiagnostic as i, ContractSourceProvider as l, PrismaNextConfig as m, ContractConfig as n, ContractSourceDiagnosticSpan as o, OpaqueContractSourceProvider as p, ContractSourceContext as r, ContractSourceDiagnostics as s, CONFIG_FORMAT_VERSION as t, ContractSourceProviderBase as u, hasCurrentConfigFormatVersion as v, normalizeContractConfig as y };
176
+ //# sourceMappingURL=config-types-gou0jUAD.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-types-gou0jUAD.d.mts","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-types.d.mts"],"mappings":";;;;;;;;;;UAMU;WACC;WACA;WACA;;UAED;WACC,OAAO;WACP,KAAK;;UAEN;WACC;WACA;WACA;WACA,OAAO;;;;;;WAMP,OAAO,SAAS;;UAEjB;WACC;WACA,sBAAsB;WACtB,OAAO;;UAER;WACC;;WAEA,4BAA4B,oBAAoB;WAChD,wBAAwB;WACxB,aAAa;WACb,yBAAyB;WACzB;WACA,cAAc;;;KAGpB;UACK;WACC;WACA,OAAO,SAAS,0BAA0B,QAAQ,OAAO,UAAU;;UAEpE,kCAAkC;WACjC;;UAED,yCAAyC;WACxC;;;;;;;;UAQD,qCAAqC;WACpC;;KAEN,yBAAyB,4BAA4B,mCAAmC;;;;;;UAMnF;;;;;WAKC,QAAQ;;;;;;;WAOR;;UAED;WACC;WACA;;;;;;;cAOG;iBACG,wBAAwB,UAAU,iBAAiB;WACzD;;;;;;;;;;UAUD,iBAAiB,mCAAmC,mCAAmC;WACtF,QAAQ,wBAAwB;WAChC,QAAQ,wBAAwB,WAAW;WAC3C,SAAS,yBAAyB,WAAW;WAC7C,sBAAsB,2BAA2B,WAAW;;;;;;;WAO5D,SAAS,wBAAwB,WAAW,WAAW,sBAAsB,WAAW,YAAY;;;;;WAKpG;;;;;;aAME,aAAa;;;;;;WAMf,WAAW;;;;WAIX;;aAEE;;WAEF,YAAY;;;;;;cAMT;;;;;;;iBAOG,wBAAwB;iBACxB,8BAA8B;;;;;;;;;;;;;;iBAc9B,aAAa,mCAAmC,mCAAmC,QAAQ,iBAAiB,WAAW,aAAa,iBAAiB,WAAW"}
@@ -0,0 +1,168 @@
1
+ //#region ../../../1-framework/1-core/config/dist/config-validation.mjs
2
+ var IssueCollector = class {
3
+ issues = [];
4
+ add(section, field, message) {
5
+ this.issues.push({
6
+ section,
7
+ field,
8
+ message: message ?? `Config must have a "${field}" field`
9
+ });
10
+ }
11
+ };
12
+ function isObject(value) {
13
+ return typeof value === "object" && value !== null;
14
+ }
15
+ function validateFamily(config, issues) {
16
+ const family = config["family"];
17
+ if (!family) {
18
+ issues.add("family", "family");
19
+ return;
20
+ }
21
+ if (!isObject(family)) {
22
+ issues.add("family", "family", "Config.family must be an object");
23
+ return;
24
+ }
25
+ if (family["kind"] !== "family") issues.add("family", "family.kind", "Config.family must have kind: \"family\"");
26
+ if (typeof family["id"] !== "string") issues.add("family", "family.id", "Config.family must have id: string");
27
+ if (typeof family["familyId"] !== "string") issues.add("family", "family.familyId", "Config.family must have familyId: string");
28
+ if (typeof family["version"] !== "string") issues.add("family", "family.version", "Config.family must have version: string");
29
+ if (!family["emission"] || typeof family["emission"] !== "object") issues.add("family", "family.emission", "Config.family must have emission: EmissionSpi");
30
+ if (typeof family["create"] !== "function") issues.add("family", "family.create", "Config.family must have create: function");
31
+ return typeof family["familyId"] === "string" ? family["familyId"] : void 0;
32
+ }
33
+ function validateTargetLikeDescriptor(descriptor, fieldPrefix, expectations, issues) {
34
+ const { section, kind, label, familyId, targetId } = expectations;
35
+ const describe = (suffix, requirement) => issues.add(section, `${fieldPrefix}.${suffix}`, `${label} must have ${requirement}`);
36
+ if (descriptor["kind"] !== kind) describe("kind", `kind: "${kind}"`);
37
+ if (typeof descriptor["id"] !== "string") describe("id", "id: string");
38
+ if (typeof descriptor["familyId"] !== "string") describe("familyId", "familyId: string");
39
+ else if (familyId !== void 0 && descriptor["familyId"] !== familyId) issues.add(section, `${fieldPrefix}.familyId`, `Config.${fieldPrefix}.familyId must match Config.family.familyId (expected: ${familyId}, got: ${descriptor["familyId"]})`);
40
+ if (typeof descriptor["version"] !== "string") describe("version", "version: string");
41
+ if (typeof descriptor["targetId"] !== "string") describe("targetId", "targetId: string");
42
+ else if (targetId !== void 0 && descriptor["targetId"] !== targetId) issues.add(section, `${fieldPrefix}.targetId`, `Config.${fieldPrefix}.targetId must match Config.target.targetId (expected: ${targetId}, got: ${descriptor["targetId"]})`);
43
+ if (typeof descriptor["create"] !== "function") describe("create", "create: function");
44
+ }
45
+ function validateTarget(config, familyId, issues) {
46
+ const target = config["target"];
47
+ if (!target) {
48
+ issues.add("target", "target");
49
+ return;
50
+ }
51
+ if (!isObject(target)) {
52
+ issues.add("target", "target", "Config.target must be an object");
53
+ return;
54
+ }
55
+ validateTargetLikeDescriptor(target, "target", {
56
+ section: "target",
57
+ kind: "target",
58
+ label: "Config.target",
59
+ familyId,
60
+ targetId: void 0
61
+ }, issues);
62
+ return typeof target["targetId"] === "string" ? target["targetId"] : void 0;
63
+ }
64
+ function validateExtensions(config, familyId, targetId, issues) {
65
+ if (config["extensionPacks"] !== void 0) issues.add("extensions", "extensionPacks", "Config.extensionPacks is no longer supported; rename it to Config.extensions");
66
+ if (config["extensions"] === void 0) return;
67
+ if (!Array.isArray(config["extensions"])) {
68
+ issues.add("extensions", "extensions", "Config.extensions must be an array");
69
+ return;
70
+ }
71
+ for (const ext of config["extensions"]) {
72
+ if (!isObject(ext)) {
73
+ issues.add("extensions", "extensions[]", "Config.extensions must contain ControlExtensionDescriptor objects");
74
+ continue;
75
+ }
76
+ validateTargetLikeDescriptor(ext, "extensions[]", {
77
+ section: "extensions",
78
+ kind: "extension",
79
+ label: "Config.extensions items",
80
+ familyId,
81
+ targetId
82
+ }, issues);
83
+ }
84
+ }
85
+ function validateContract(config, issues) {
86
+ if (config["contract"] === void 0) return;
87
+ if (!isObject(config["contract"])) {
88
+ issues.add("contract", "contract", "Config.contract must be an object");
89
+ return;
90
+ }
91
+ const contract = config["contract"];
92
+ if (!Object.hasOwn(contract, "source")) {
93
+ issues.add("contract", "contract.source", "Config.contract.source is required when contract is provided");
94
+ return;
95
+ }
96
+ const source = contract["source"];
97
+ if (!isObject(source)) {
98
+ issues.add("contract", "contract.source", "Config.contract.source must be a provider object");
99
+ return;
100
+ }
101
+ const inputs = Object.hasOwn(source, "inputs") ? source["inputs"] : void 0;
102
+ if (inputs !== void 0) {
103
+ if (!Array.isArray(inputs)) issues.add("contract", "contract.source.inputs", "Config.contract.source.inputs must be an array of strings when provided");
104
+ else if (inputs.some((input) => typeof input !== "string")) issues.add("contract", "contract.source.inputs[]", "Config.contract.source.inputs must contain only strings");
105
+ }
106
+ const format = Object.hasOwn(source, "format") ? source["format"] : void 0;
107
+ if (format !== void 0 && typeof format !== "string") issues.add("contract", "contract.source.format", "Config.contract.source.format must be a string when provided");
108
+ if (!Object.hasOwn(source, "load") || typeof source["load"] !== "function") issues.add("contract", "contract.source.load", "Config.contract.source.load must be a function");
109
+ const output = Object.hasOwn(contract, "output") ? contract["output"] : void 0;
110
+ if (output !== void 0 && typeof output !== "string") issues.add("contract", "contract.output", "Config.contract.output must be a string when provided");
111
+ }
112
+ function validateMigrations(config, issues) {
113
+ if (config["migrations"] === void 0) return;
114
+ if (!isObject(config["migrations"])) {
115
+ issues.add("migrations", "migrations", "Config.migrations must be an object");
116
+ return;
117
+ }
118
+ const dir = config["migrations"]["dir"];
119
+ if (dir !== void 0 && typeof dir !== "string") issues.add("migrations", "migrations.dir", "Config.migrations.dir must be a string");
120
+ }
121
+ function validateFormatter(config, issues) {
122
+ if (config["formatter"] === void 0) return;
123
+ if (!isObject(config["formatter"])) {
124
+ issues.add("formatter", "formatter", "Config.formatter must be an object");
125
+ return;
126
+ }
127
+ const { indent, newline } = config["formatter"];
128
+ if (!(indent === void 0 || indent === "tab" || typeof indent === "number" && Number.isInteger(indent) && indent >= 1)) issues.add("formatter", "formatter.indent", "Config.formatter.indent must be an integer >= 1 or \"tab\"");
129
+ if (newline !== void 0 && newline !== "LF" && newline !== "CRLF") issues.add("formatter", "formatter.newline", "Config.formatter.newline must be \"LF\" or \"CRLF\"");
130
+ }
131
+ /**
132
+ * Validates the config structure and returns every problem found, each tagged
133
+ * with the config section it concerns. Pure validation logic with no file I/O
134
+ * or CLI awareness; it never throws.
135
+ */
136
+ function collectConfigIssues(config) {
137
+ const issues = new IssueCollector();
138
+ const familyId = validateFamily(config, issues);
139
+ const targetId = validateTarget(config, familyId, issues);
140
+ const adapter = config["adapter"];
141
+ if (!adapter) issues.add("adapter", "adapter");
142
+ else if (!isObject(adapter)) issues.add("adapter", "adapter", "Config.adapter must be an object");
143
+ else validateTargetLikeDescriptor(adapter, "adapter", {
144
+ section: "adapter",
145
+ kind: "adapter",
146
+ label: "Config.adapter",
147
+ familyId,
148
+ targetId
149
+ }, issues);
150
+ const driver = config["driver"];
151
+ if (driver !== void 0) if (!isObject(driver)) issues.add("driver", "driver", "Config.driver must be an object");
152
+ else validateTargetLikeDescriptor(driver, "driver", {
153
+ section: "driver",
154
+ kind: "driver",
155
+ label: "Config.driver",
156
+ familyId,
157
+ targetId
158
+ }, issues);
159
+ validateExtensions(config, familyId, targetId, issues);
160
+ validateContract(config, issues);
161
+ validateMigrations(config, issues);
162
+ validateFormatter(config, issues);
163
+ return issues.issues;
164
+ }
165
+ //#endregion
166
+ export { collectConfigIssues as t };
167
+
168
+ //# sourceMappingURL=config-validation-DPt5hwQx.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-validation-DPt5hwQx.mjs","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-validation.mjs"],"sourcesContent":["//#region src/config-validation.ts\nvar IssueCollector = class {\n\tissues = [];\n\tadd(section, field, message) {\n\t\tthis.issues.push({\n\t\t\tsection,\n\t\t\tfield,\n\t\t\tmessage: message ?? `Config must have a \"${field}\" field`\n\t\t});\n\t}\n};\nfunction isObject(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction validateFamily(config, issues) {\n\tconst family = config[\"family\"];\n\tif (!family) {\n\t\tissues.add(\"family\", \"family\");\n\t\treturn;\n\t}\n\tif (!isObject(family)) {\n\t\tissues.add(\"family\", \"family\", \"Config.family must be an object\");\n\t\treturn;\n\t}\n\tif (family[\"kind\"] !== \"family\") issues.add(\"family\", \"family.kind\", \"Config.family must have kind: \\\"family\\\"\");\n\tif (typeof family[\"id\"] !== \"string\") issues.add(\"family\", \"family.id\", \"Config.family must have id: string\");\n\tif (typeof family[\"familyId\"] !== \"string\") issues.add(\"family\", \"family.familyId\", \"Config.family must have familyId: string\");\n\tif (typeof family[\"version\"] !== \"string\") issues.add(\"family\", \"family.version\", \"Config.family must have version: string\");\n\tif (!family[\"emission\"] || typeof family[\"emission\"] !== \"object\") issues.add(\"family\", \"family.emission\", \"Config.family must have emission: EmissionSpi\");\n\tif (typeof family[\"create\"] !== \"function\") issues.add(\"family\", \"family.create\", \"Config.family must have create: function\");\n\treturn typeof family[\"familyId\"] === \"string\" ? family[\"familyId\"] : void 0;\n}\nfunction validateTargetLikeDescriptor(descriptor, fieldPrefix, expectations, issues) {\n\tconst { section, kind, label, familyId, targetId } = expectations;\n\tconst describe = (suffix, requirement) => issues.add(section, `${fieldPrefix}.${suffix}`, `${label} must have ${requirement}`);\n\tif (descriptor[\"kind\"] !== kind) describe(\"kind\", `kind: \"${kind}\"`);\n\tif (typeof descriptor[\"id\"] !== \"string\") describe(\"id\", \"id: string\");\n\tif (typeof descriptor[\"familyId\"] !== \"string\") describe(\"familyId\", \"familyId: string\");\n\telse if (familyId !== void 0 && descriptor[\"familyId\"] !== familyId) issues.add(section, `${fieldPrefix}.familyId`, `Config.${fieldPrefix}.familyId must match Config.family.familyId (expected: ${familyId}, got: ${descriptor[\"familyId\"]})`);\n\tif (typeof descriptor[\"version\"] !== \"string\") describe(\"version\", \"version: string\");\n\tif (typeof descriptor[\"targetId\"] !== \"string\") describe(\"targetId\", \"targetId: string\");\n\telse if (targetId !== void 0 && descriptor[\"targetId\"] !== targetId) issues.add(section, `${fieldPrefix}.targetId`, `Config.${fieldPrefix}.targetId must match Config.target.targetId (expected: ${targetId}, got: ${descriptor[\"targetId\"]})`);\n\tif (typeof descriptor[\"create\"] !== \"function\") describe(\"create\", \"create: function\");\n}\nfunction validateTarget(config, familyId, issues) {\n\tconst target = config[\"target\"];\n\tif (!target) {\n\t\tissues.add(\"target\", \"target\");\n\t\treturn;\n\t}\n\tif (!isObject(target)) {\n\t\tissues.add(\"target\", \"target\", \"Config.target must be an object\");\n\t\treturn;\n\t}\n\tvalidateTargetLikeDescriptor(target, \"target\", {\n\t\tsection: \"target\",\n\t\tkind: \"target\",\n\t\tlabel: \"Config.target\",\n\t\tfamilyId,\n\t\ttargetId: void 0\n\t}, issues);\n\treturn typeof target[\"targetId\"] === \"string\" ? target[\"targetId\"] : void 0;\n}\nfunction validateExtensions(config, familyId, targetId, issues) {\n\tif (config[\"extensionPacks\"] !== void 0) issues.add(\"extensions\", \"extensionPacks\", \"Config.extensionPacks is no longer supported; rename it to Config.extensions\");\n\tif (config[\"extensions\"] === void 0) return;\n\tif (!Array.isArray(config[\"extensions\"])) {\n\t\tissues.add(\"extensions\", \"extensions\", \"Config.extensions must be an array\");\n\t\treturn;\n\t}\n\tfor (const ext of config[\"extensions\"]) {\n\t\tif (!isObject(ext)) {\n\t\t\tissues.add(\"extensions\", \"extensions[]\", \"Config.extensions must contain ControlExtensionDescriptor objects\");\n\t\t\tcontinue;\n\t\t}\n\t\tvalidateTargetLikeDescriptor(ext, \"extensions[]\", {\n\t\t\tsection: \"extensions\",\n\t\t\tkind: \"extension\",\n\t\t\tlabel: \"Config.extensions items\",\n\t\t\tfamilyId,\n\t\t\ttargetId\n\t\t}, issues);\n\t}\n}\nfunction validateContract(config, issues) {\n\tif (config[\"contract\"] === void 0) return;\n\tif (!isObject(config[\"contract\"])) {\n\t\tissues.add(\"contract\", \"contract\", \"Config.contract must be an object\");\n\t\treturn;\n\t}\n\tconst contract = config[\"contract\"];\n\tif (!Object.hasOwn(contract, \"source\")) {\n\t\tissues.add(\"contract\", \"contract.source\", \"Config.contract.source is required when contract is provided\");\n\t\treturn;\n\t}\n\tconst source = contract[\"source\"];\n\tif (!isObject(source)) {\n\t\tissues.add(\"contract\", \"contract.source\", \"Config.contract.source must be a provider object\");\n\t\treturn;\n\t}\n\tconst inputs = Object.hasOwn(source, \"inputs\") ? source[\"inputs\"] : void 0;\n\tif (inputs !== void 0) {\n\t\tif (!Array.isArray(inputs)) issues.add(\"contract\", \"contract.source.inputs\", \"Config.contract.source.inputs must be an array of strings when provided\");\n\t\telse if (inputs.some((input) => typeof input !== \"string\")) issues.add(\"contract\", \"contract.source.inputs[]\", \"Config.contract.source.inputs must contain only strings\");\n\t}\n\tconst format = Object.hasOwn(source, \"format\") ? source[\"format\"] : void 0;\n\tif (format !== void 0 && typeof format !== \"string\") issues.add(\"contract\", \"contract.source.format\", \"Config.contract.source.format must be a string when provided\");\n\tif (!Object.hasOwn(source, \"load\") || typeof source[\"load\"] !== \"function\") issues.add(\"contract\", \"contract.source.load\", \"Config.contract.source.load must be a function\");\n\tconst output = Object.hasOwn(contract, \"output\") ? contract[\"output\"] : void 0;\n\tif (output !== void 0 && typeof output !== \"string\") issues.add(\"contract\", \"contract.output\", \"Config.contract.output must be a string when provided\");\n}\nfunction validateMigrations(config, issues) {\n\tif (config[\"migrations\"] === void 0) return;\n\tif (!isObject(config[\"migrations\"])) {\n\t\tissues.add(\"migrations\", \"migrations\", \"Config.migrations must be an object\");\n\t\treturn;\n\t}\n\tconst dir = config[\"migrations\"][\"dir\"];\n\tif (dir !== void 0 && typeof dir !== \"string\") issues.add(\"migrations\", \"migrations.dir\", \"Config.migrations.dir must be a string\");\n}\nfunction validateFormatter(config, issues) {\n\tif (config[\"formatter\"] === void 0) return;\n\tif (!isObject(config[\"formatter\"])) {\n\t\tissues.add(\"formatter\", \"formatter\", \"Config.formatter must be an object\");\n\t\treturn;\n\t}\n\tconst { indent, newline } = config[\"formatter\"];\n\tif (!(indent === void 0 || indent === \"tab\" || typeof indent === \"number\" && Number.isInteger(indent) && indent >= 1)) issues.add(\"formatter\", \"formatter.indent\", \"Config.formatter.indent must be an integer >= 1 or \\\"tab\\\"\");\n\tif (newline !== void 0 && newline !== \"LF\" && newline !== \"CRLF\") issues.add(\"formatter\", \"formatter.newline\", \"Config.formatter.newline must be \\\"LF\\\" or \\\"CRLF\\\"\");\n}\n/**\n* Validates the config structure and returns every problem found, each tagged\n* with the config section it concerns. Pure validation logic with no file I/O\n* or CLI awareness; it never throws.\n*/\nfunction collectConfigIssues(config) {\n\tconst issues = new IssueCollector();\n\tconst familyId = validateFamily(config, issues);\n\tconst targetId = validateTarget(config, familyId, issues);\n\tconst adapter = config[\"adapter\"];\n\tif (!adapter) issues.add(\"adapter\", \"adapter\");\n\telse if (!isObject(adapter)) issues.add(\"adapter\", \"adapter\", \"Config.adapter must be an object\");\n\telse validateTargetLikeDescriptor(adapter, \"adapter\", {\n\t\tsection: \"adapter\",\n\t\tkind: \"adapter\",\n\t\tlabel: \"Config.adapter\",\n\t\tfamilyId,\n\t\ttargetId\n\t}, issues);\n\tconst driver = config[\"driver\"];\n\tif (driver !== void 0) if (!isObject(driver)) issues.add(\"driver\", \"driver\", \"Config.driver must be an object\");\n\telse validateTargetLikeDescriptor(driver, \"driver\", {\n\t\tsection: \"driver\",\n\t\tkind: \"driver\",\n\t\tlabel: \"Config.driver\",\n\t\tfamilyId,\n\t\ttargetId\n\t}, issues);\n\tvalidateExtensions(config, familyId, targetId, issues);\n\tvalidateContract(config, issues);\n\tvalidateMigrations(config, issues);\n\tvalidateFormatter(config, issues);\n\treturn issues.issues;\n}\n//#endregion\nexport { collectConfigIssues };\n\n//# sourceMappingURL=config-validation.mjs.map"],"mappings":";AACA,IAAI,iBAAiB,MAAM;CAC1B,SAAS,CAAC;CACV,IAAI,SAAS,OAAO,SAAS;EAC5B,KAAK,OAAO,KAAK;GAChB;GACA;GACA,SAAS,WAAW,uBAAuB,MAAM;EAClD,CAAC;CACF;AACD;AACA,SAAS,SAAS,OAAO;CACxB,OAAO,OAAO,UAAU,YAAY,UAAU;AAC/C;AACA,SAAS,eAAe,QAAQ,QAAQ;CACvC,MAAM,SAAS,OAAO;CACtB,IAAI,CAAC,QAAQ;EACZ,OAAO,IAAI,UAAU,QAAQ;EAC7B;CACD;CACA,IAAI,CAAC,SAAS,MAAM,GAAG;EACtB,OAAO,IAAI,UAAU,UAAU,iCAAiC;EAChE;CACD;CACA,IAAI,OAAO,YAAY,UAAU,OAAO,IAAI,UAAU,eAAe,0CAA0C;CAC/G,IAAI,OAAO,OAAO,UAAU,UAAU,OAAO,IAAI,UAAU,aAAa,oCAAoC;CAC5G,IAAI,OAAO,OAAO,gBAAgB,UAAU,OAAO,IAAI,UAAU,mBAAmB,0CAA0C;CAC9H,IAAI,OAAO,OAAO,eAAe,UAAU,OAAO,IAAI,UAAU,kBAAkB,yCAAyC;CAC3H,IAAI,CAAC,OAAO,eAAe,OAAO,OAAO,gBAAgB,UAAU,OAAO,IAAI,UAAU,mBAAmB,+CAA+C;CAC1J,IAAI,OAAO,OAAO,cAAc,YAAY,OAAO,IAAI,UAAU,iBAAiB,0CAA0C;C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AU,MAAM;CACxD,MAAM,UAAU,OAAO;CACvB,IAAI,CAAC,SAAS,OAAO,IAAI,WAAW,SAAS;MACxC,IAAI,CAAC,SAAS,OAAO,GAAG,OAAO,IAAI,WAAW,WAAW,kCAAkC;MAC3F,6BAA6B,SAAS,WAAW;EACrD,SAAS;EACT,MAAM;EACN,OAAO;EACP;EACA;CACD,GAAG,MAAM;CACT,MAAM,SAAS,OAAO;CACtB,IAAI,WAAW,KAAK,GAAG,IAAI,CAAC,SAAS,MAAM,GAAG,OAAO,IAAI,UAAU,UAAU,iCAAiC;MACzG,6BAA6B,QAAQ,UAAU;EACnD,SAAS;EACT,MAAM;EACN,OAAO;EACP;EACA;CACD,GAAG,MAAM;CACT,mBAAmB,QAAQ,UAAU,UAAU,MAAM;CACrD,iBAAiB,QAAQ,MAAM;CAC/B,mBAAmB,QAAQ,MAAM;CACjC,kBAAkB,QAAQ,MAAM;CAChC,OAAO,OAAO;AACf"}
@@ -0,0 +1,21 @@
1
+ //#region ../../../1-framework/1-core/config/dist/config-validation.d.mts
2
+ //#region src/config-validation.d.ts
3
+ /**
4
+ * Top-level config sections. Diagnostics carry the section they concern so
5
+ * commands can fail on the sections they read and ignore the rest.
6
+ */
7
+ type ConfigSection = 'family' | 'target' | 'adapter' | 'driver' | 'extensions' | 'db' | 'contract' | 'migrations' | 'formatter';
8
+ interface ConfigValidationIssue {
9
+ readonly section: ConfigSection;
10
+ readonly field: string;
11
+ readonly message: string;
12
+ }
13
+ /**
14
+ * Validates the config structure and returns every problem found, each tagged
15
+ * with the config section it concerns. Pure validation logic with no file I/O
16
+ * or CLI awareness; it never throws.
17
+ */
18
+ declare function collectConfigIssues(config: Record<string, unknown>): readonly ConfigValidationIssue[];
19
+ //#endregion
20
+ export { ConfigValidationIssue as n, collectConfigIssues as r, ConfigSection as t };
21
+ //# sourceMappingURL=config-validation-Wiqew2J9.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-validation-Wiqew2J9.d.mts","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-validation.d.mts"],"mappings":";;;;;;KAKK;UACK;WACC,SAAS;WACT;WACA;;;;;;;iBAOM,oBAAoB,QAAQ,mCAAmC"}
package/dist/config.d.mts CHANGED
@@ -1,4 +1,3 @@
1
- import { _ as normalizeContractConfig, a as ContractSourceDiagnosticSpan, c as ContractSourceProvider, d as FormatterConfig, f as OpaqueContractSourceProvider, g as defineConfig, h as TypeScriptContractSourceProvider, i as ContractSourceDiagnosticPosition, l as ContractSourceProviderBase, m as PslContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PrismaNextConfig, r as ContractSourceDiagnostic, s as ContractSourceFormat, t as ContractConfig, u as DEFAULT_CONTRACT_SOURCE_DIR } from "./config-types-W-87vhZ4-DQk0SSmj.mjs";
2
- import "./config-types-C9MZ-mH9.mjs";
3
- import { t as validateConfig } from "./config-validation-9rldVCTn.mjs";
4
- export { type ContractConfig, type ContractSourceContext, type ContractSourceDiagnostic, type ContractSourceDiagnosticPosition, type ContractSourceDiagnosticSpan, type ContractSourceDiagnostics, type ContractSourceFormat, type ContractSourceProvider, type ContractSourceProviderBase, DEFAULT_CONTRACT_SOURCE_DIR, type FormatterConfig, type OpaqueContractSourceProvider, type PrismaNextConfig, type PslContractSourceProvider, type TypeScriptContractSourceProvider, defineConfig, normalizeContractConfig, validateConfig };
1
+ import { _ as defineConfig, a as ContractSourceDiagnosticPosition, b as readConfigFormatVersion, c as ContractSourceFormat, d as DEFAULT_CONTRACT_SOURCE_DIR, f as FormatterConfig, g as TypeScriptContractSourceProvider, h as PslContractSourceProvider, i as ContractSourceDiagnostic, l as ContractSourceProvider, m as PrismaNextConfig, n as ContractConfig, o as ContractSourceDiagnosticSpan, p as OpaqueContractSourceProvider, r as ContractSourceContext, s as ContractSourceDiagnostics, t as CONFIG_FORMAT_VERSION, u as ContractSourceProviderBase, v as hasCurrentConfigFormatVersion, y as normalizeContractConfig } from "./config-types-gou0jUAD.mjs";
2
+ import { n as ConfigValidationIssue, r as collectConfigIssues, t as ConfigSection } from "./config-validation-Wiqew2J9.mjs";
3
+ export { CONFIG_FORMAT_VERSION, type ConfigSection, type ConfigValidationIssue, type ContractConfig, type ContractSourceContext, type ContractSourceDiagnostic, type ContractSourceDiagnosticPosition, type ContractSourceDiagnosticSpan, type ContractSourceDiagnostics, type ContractSourceFormat, type ContractSourceProvider, type ContractSourceProviderBase, DEFAULT_CONTRACT_SOURCE_DIR, type FormatterConfig, type OpaqueContractSourceProvider, type PrismaNextConfig, type PslContractSourceProvider, type TypeScriptContractSourceProvider, collectConfigIssues, defineConfig, hasCurrentConfigFormatVersion, normalizeContractConfig, readConfigFormatVersion };
package/dist/config.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { n as defineConfig, r as normalizeContractConfig, t as DEFAULT_CONTRACT_SOURCE_DIR } from "./config-types-Cf9lVsHR.mjs";
2
- import { t as validateConfig } from "./config-validation-ByGTw6zQ.mjs";
3
- export { DEFAULT_CONTRACT_SOURCE_DIR, defineConfig, normalizeContractConfig, validateConfig };
1
+ import { a as normalizeContractConfig, i as hasCurrentConfigFormatVersion, n as DEFAULT_CONTRACT_SOURCE_DIR, o as readConfigFormatVersion, r as defineConfig, t as CONFIG_FORMAT_VERSION } from "./config-types-BqhNxw0z.mjs";
2
+ import { t as collectConfigIssues } from "./config-validation-DPt5hwQx.mjs";
3
+ export { CONFIG_FORMAT_VERSION, DEFAULT_CONTRACT_SOURCE_DIR, collectConfigIssues, defineConfig, hasCurrentConfigFormatVersion, normalizeContractConfig, readConfigFormatVersion };
@@ -1,3 +1,2 @@
1
- import { _ as normalizeContractConfig, a as ContractSourceDiagnosticSpan, c as ContractSourceProvider, d as FormatterConfig, f as OpaqueContractSourceProvider, g as defineConfig, h as TypeScriptContractSourceProvider, i as ContractSourceDiagnosticPosition, l as ContractSourceProviderBase, m as PslContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PrismaNextConfig, r as ContractSourceDiagnostic, s as ContractSourceFormat, t as ContractConfig, u as DEFAULT_CONTRACT_SOURCE_DIR } from "./config-types-W-87vhZ4-DQk0SSmj.mjs";
2
- import "./config-types-C9MZ-mH9.mjs";
3
- export { type ContractConfig, type ContractSourceContext, type ContractSourceDiagnostic, type ContractSourceDiagnosticPosition, type ContractSourceDiagnosticSpan, type ContractSourceDiagnostics, type ContractSourceFormat, type ContractSourceProvider, type ContractSourceProviderBase, DEFAULT_CONTRACT_SOURCE_DIR, type FormatterConfig, type OpaqueContractSourceProvider, type PrismaNextConfig, type PslContractSourceProvider, type TypeScriptContractSourceProvider, defineConfig, normalizeContractConfig };
1
+ import { _ as defineConfig, a as ContractSourceDiagnosticPosition, b as readConfigFormatVersion, c as ContractSourceFormat, d as DEFAULT_CONTRACT_SOURCE_DIR, f as FormatterConfig, g as TypeScriptContractSourceProvider, h as PslContractSourceProvider, i as ContractSourceDiagnostic, l as ContractSourceProvider, m as PrismaNextConfig, n as ContractConfig, o as ContractSourceDiagnosticSpan, p as OpaqueContractSourceProvider, r as ContractSourceContext, s as ContractSourceDiagnostics, t as CONFIG_FORMAT_VERSION, u as ContractSourceProviderBase, v as hasCurrentConfigFormatVersion, y as normalizeContractConfig } from "./config-types-gou0jUAD.mjs";
2
+ export { CONFIG_FORMAT_VERSION, type ContractConfig, type ContractSourceContext, type ContractSourceDiagnostic, type ContractSourceDiagnosticPosition, type ContractSourceDiagnosticSpan, type ContractSourceDiagnostics, type ContractSourceFormat, type ContractSourceProvider, type ContractSourceProviderBase, DEFAULT_CONTRACT_SOURCE_DIR, type FormatterConfig, type OpaqueContractSourceProvider, type PrismaNextConfig, type PslContractSourceProvider, type TypeScriptContractSourceProvider, defineConfig, hasCurrentConfigFormatVersion, normalizeContractConfig, readConfigFormatVersion };
@@ -1,2 +1,2 @@
1
- import { n as defineConfig, r as normalizeContractConfig, t as DEFAULT_CONTRACT_SOURCE_DIR } from "./config-types-Cf9lVsHR.mjs";
2
- export { DEFAULT_CONTRACT_SOURCE_DIR, defineConfig, normalizeContractConfig };
1
+ import { a as normalizeContractConfig, i as hasCurrentConfigFormatVersion, n as DEFAULT_CONTRACT_SOURCE_DIR, o as readConfigFormatVersion, r as defineConfig, t as CONFIG_FORMAT_VERSION } from "./config-types-BqhNxw0z.mjs";
2
+ export { CONFIG_FORMAT_VERSION, DEFAULT_CONTRACT_SOURCE_DIR, defineConfig, hasCurrentConfigFormatVersion, normalizeContractConfig, readConfigFormatVersion };
@@ -1,2 +1,2 @@
1
- import { t as validateConfig } from "./config-validation-9rldVCTn.mjs";
2
- export { validateConfig };
1
+ import { n as ConfigValidationIssue, r as collectConfigIssues, t as ConfigSection } from "./config-validation-Wiqew2J9.mjs";
2
+ export { type ConfigSection, type ConfigValidationIssue, collectConfigIssues };
@@ -1,2 +1,2 @@
1
- import { t as validateConfig } from "./config-validation-ByGTw6zQ.mjs";
2
- export { validateConfig };
1
+ import { t as collectConfigIssues } from "./config-validation-DPt5hwQx.mjs";
2
+ export { collectConfigIssues };
@@ -1,5 +1,5 @@
1
1
  import { r as StructuredError } from "./structured-error-BVmv2aPB.mjs";
2
- //#region ../../../1-framework/1-core/errors/dist/control-CwRPkRJ7.d.mts
2
+ //#region ../../../1-framework/1-core/errors/dist/control-BWHddgfQ.d.mts
3
3
  //#region src/control.d.ts
4
4
  /**
5
5
  * CLI error envelope for output formatting.
@@ -77,6 +77,19 @@ declare class CliStructuredError extends Error implements StructuredError {
77
77
  declare function errorConfigFileNotFound(configPath?: string, options?: {
78
78
  readonly why?: string;
79
79
  }): CliStructuredError;
80
+ /**
81
+ * Config module failed to evaluate (syntax error, module threw during import).
82
+ */
83
+ declare function errorConfigEvaluationFailed(configPath: string | undefined, options: {
84
+ readonly why: string;
85
+ readonly cause?: unknown;
86
+ }): CliStructuredError;
87
+ /**
88
+ * Config module evaluated, but its export does not carry the defineConfig
89
+ * version marker (plain object export, or a config produced by a different
90
+ * defineConfig such as classic Prisma's).
91
+ */
92
+ declare function errorConfigVersionMarkerMissing(configPath?: string): CliStructuredError;
80
93
  /**
81
94
  * Contract configuration missing from config.
82
95
  */
@@ -194,6 +207,7 @@ declare function errorOutputFormatMutex(): CliStructuredError;
194
207
  */
195
208
  declare function errorConfigValidation(field: string, options?: {
196
209
  readonly why?: string;
210
+ readonly section?: string;
197
211
  }): CliStructuredError;
198
212
  /**
199
213
  * An enum declares a codecId that no component in the contract's pack stack provides,
@@ -213,5 +227,5 @@ declare function errorUnexpected(message: string, options?: {
213
227
  readonly cause?: unknown;
214
228
  }): CliStructuredError;
215
229
  //#endregion
216
- export { errorUnexpected as S, errorMigrationCliUnknownFlag as _, errorConfigValidation as a, errorQueryRunnerFactoryRequired as b, errorContractValidationFailed as c, errorEnumCodecNotInPackStack as d, errorFamilyReadMarkerSqlRequired as f, errorMigrationCliInvalidConfigArg as g, errorJsonFormatNotSupported as h, errorConfigFileNotFound as i, errorDatabaseConnectionRequired as l, errorInvalidOutputFormat as m, CliErrorEnvelope as n, errorContractConfigMissing as o, errorFileNotFound as p, CliStructuredError as r, errorContractMissingExtensions as s, CliErrorConflict as t, errorDriverRequired as u, errorMigrationPlanningFailed as v, errorTargetMigrationNotSupported as x, errorOutputFormatMutex as y };
217
- //# sourceMappingURL=control-CwRPkRJ7-Dk0c6D_5.d.mts.map
230
+ export { errorTargetMigrationNotSupported as C, errorQueryRunnerFactoryRequired as S, errorJsonFormatNotSupported as _, errorConfigFileNotFound as a, errorMigrationPlanningFailed as b, errorContractConfigMissing as c, errorDatabaseConnectionRequired as d, errorDriverRequired as f, errorInvalidOutputFormat as g, errorFileNotFound as h, errorConfigEvaluationFailed as i, errorContractMissingExtensions as l, errorFamilyReadMarkerSqlRequired as m, CliErrorEnvelope as n, errorConfigValidation as o, errorEnumCodecNotInPackStack as p, CliStructuredError as r, errorConfigVersionMarkerMissing as s, CliErrorConflict as t, errorContractValidationFailed as u, errorMigrationCliInvalidConfigArg as v, errorUnexpected as w, errorOutputFormatMutex as x, errorMigrationCliUnknownFlag as y };
231
+ //# sourceMappingURL=control-BWHddgfQ-CHZkHCnz.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-BWHddgfQ-CHZkHCnz.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/control-BWHddgfQ.d.mts"],"mappings":";;;;;;;UAMU;WACC;WACA;WACA;WACA;WACA;WACA;WACA;aACE;aACA;;WAEF,OAAO;WACP;;;;;UAKD;WACC;WACA;WACA;;;;;;;;;;;;;cAaG,2BAA2B,iBAAiB;WAC/C;WACA;WACA;WACA;WACA;aACE;aACA;;WAEF,OAAO;WACP;EACT,YAAY,6BAA6B,iBAAiB;aAC/C;aACA;aACA;aACA;eACE;eACA;;aAEF,OAAO;aACP;aACA;;;;;EAKX,cAAc;;;;;SAKP,GAAG,iBAAiB,SAAS;;;;;iBAKrB,wBAAwB,qBAAqB;WACnD;IACP;;;;iBAIa,4BAA4B,gCAAgC;WAClE;WACA;IACP;;;;;;iBAMa,gCAAgC,sBAAsB;;;;iBAItD,2BAA2B;WACjC;IACP;;;;iBAIa,8BAA8B,gBAAgB;WACpD;aACE;aACA;;WAEF;IACP;;;;iBAIa,kBAAkB,kBAAkB;WAC1C;WACA;WACA;WACA;IACP;;;;iBAIa,gCAAgC;WACtC;WACA;WACA;WACA;IACP;;;;iBAIa,gCAAgC;WACtC;IACP;;;;iBAIa,iCAAiC;WACvC;IACP;;;;iBAIa,4BAA4B;WAClC;WACA;WACA;IACP;;;;iBAIa,oBAAoB;WAC1B;IACP;;;;iBAIa,+BAA+B;WACrC;WACA;IACP;;;;iBAIa,6BAA6B;WACnC,oBAAoB;WACpB;IACP;;;;iBAIa,iCAAiC;WACvC;IACP;;;;;;;;iBAQa,kCAAkC;WACxC;IACP;;;;;;;;;;iBAUa,6BAA6B;WACnC;WACA;IACP;;;;iBAIa,yBAAyB,gBAAgB;;;;;iBAKzC,0BAA0B;;;;iBAI1B,sBAAsB,eAAe;WAC3C;WACA;IACP;;;;;;;iBAOa,6BAA6B;WACnC;IACP;;;;iBAIa,gBAAgB,iBAAiB;WACvC;WACA;WACA;IACP"}
@@ -1,6 +1,6 @@
1
1
  import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
2
2
  import { r as docsUrlFor } from "./structured-error-H6WU9Kjt.mjs";
3
- //#region ../../../1-framework/1-core/errors/dist/control-NxsoLvV7.mjs
3
+ //#region ../../../1-framework/1-core/errors/dist/control-C_8057XM.mjs
4
4
  /**
5
5
  * Structured CLI error that contains all information needed for error envelopes.
6
6
  * Call sites throw these errors with full context.
@@ -71,6 +71,31 @@ function errorConfigFileNotFound(configPath, options) {
71
71
  });
72
72
  }
73
73
  /**
74
+ * Config module failed to evaluate (syntax error, module threw during import).
75
+ */
76
+ function errorConfigEvaluationFailed(configPath, options) {
77
+ return new CliStructuredError("CONFIG.EVALUATION_FAILED", "Config file could not be evaluated", {
78
+ why: options.why,
79
+ fix: "Fix the error in your prisma-next.config.ts so the module evaluates, then rerun the command",
80
+ docsUrl: docsUrlFor("CONFIG.EVALUATION_FAILED"),
81
+ ...configPath ? { where: { path: configPath } } : {},
82
+ ...options.cause !== void 0 ? { cause: options.cause } : {}
83
+ });
84
+ }
85
+ /**
86
+ * Config module evaluated, but its export does not carry the defineConfig
87
+ * version marker (plain object export, or a config produced by a different
88
+ * defineConfig such as classic Prisma's).
89
+ */
90
+ function errorConfigVersionMarkerMissing(configPath) {
91
+ return new CliStructuredError("CONFIG.VERSION_MARKER_MISSING", "Config is not a defineConfig result", {
92
+ why: "The config module evaluated, but its default export was not created by a current defineConfig",
93
+ fix: "Create the config with defineConfig (imported from your target's '/config' entrypoint) and export its return value directly",
94
+ docsUrl: docsUrlFor("CONFIG.VERSION_MARKER_MISSING"),
95
+ ...configPath ? { where: { path: configPath } } : {}
96
+ });
97
+ }
98
+ /**
74
99
  * Contract configuration missing from config.
75
100
  */
76
101
  function errorContractConfigMissing(options) {
@@ -255,7 +280,11 @@ function errorConfigValidation(field, options) {
255
280
  return new CliStructuredError("CONFIG.VALIDATION_FAILED", "Config validation error", {
256
281
  why: options?.why ?? `Config must have a "${field}" field`,
257
282
  fix: "Check your prisma-next.config.ts and ensure all required fields are provided",
258
- docsUrl: docsUrlFor("CONFIG.VALIDATION_FAILED")
283
+ docsUrl: docsUrlFor("CONFIG.VALIDATION_FAILED"),
284
+ meta: {
285
+ field,
286
+ ...options?.section !== void 0 ? { section: options.section } : {}
287
+ }
259
288
  });
260
289
  }
261
290
  /**
@@ -282,6 +311,6 @@ function errorUnexpected(message, options) {
282
311
  });
283
312
  }
284
313
  //#endregion
285
- export { errorOutputFormatMutex as _, errorContractMissingExtensions as a, errorUnexpected as b, errorDriverRequired as c, errorFileNotFound as d, errorInvalidOutputFormat as f, errorMigrationPlanningFailed as g, errorMigrationCliUnknownFlag as h, errorContractConfigMissing as i, errorEnumCodecNotInPackStack as l, errorMigrationCliInvalidConfigArg as m, errorConfigFileNotFound as n, errorContractValidationFailed as o, errorJsonFormatNotSupported as p, errorConfigValidation as r, errorDatabaseConnectionRequired as s, CliStructuredError as t, errorFamilyReadMarkerSqlRequired as u, errorQueryRunnerFactoryRequired as v, errorTargetMigrationNotSupported as y };
314
+ export { errorUnexpected as S, errorMigrationCliUnknownFlag as _, errorConfigVersionMarkerMissing as a, errorQueryRunnerFactoryRequired as b, errorContractValidationFailed as c, errorEnumCodecNotInPackStack as d, errorFamilyReadMarkerSqlRequired as f, errorMigrationCliInvalidConfigArg as g, errorJsonFormatNotSupported as h, errorConfigValidation as i, errorDatabaseConnectionRequired as l, errorInvalidOutputFormat as m, errorConfigEvaluationFailed as n, errorContractConfigMissing as o, errorFileNotFound as p, errorConfigFileNotFound as r, errorContractMissingExtensions as s, CliStructuredError as t, errorDriverRequired as u, errorMigrationPlanningFailed as v, errorTargetMigrationNotSupported as x, errorOutputFormatMutex as y };
286
315
 
287
- //# sourceMappingURL=control-NxsoLvV7-CEAZQk3h.mjs.map
316
+ //# sourceMappingURL=control-C_8057XM-DMCFN-Wb.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-C_8057XM-DMCFN-Wb.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/control-C_8057XM.mjs"],"sourcesContent":["import { ifDefined } from \"@internal/utils/defined\";\nimport { docsUrlFor } from \"@internal/utils/structured-error\";\n//#region src/control.ts\n/**\n* Structured CLI error that contains all information needed for error envelopes.\n* Call sites throw these errors with full context.\n*\n* A `CliStructuredError` is a `StructuredError` (see\n* `@internal/utils/structured-error`): `code` is a dotted\n* `NAMESPACE.SUBCODE` string, and the namespace prefix is the error's\n* category — there is no separate `domain` field. See\n* [ADR 239](../../../../../docs/architecture%20docs/adrs/ADR%20239%20-%20Errors%20are%20structural%20envelopes%20with%20dotted%20namespace%20codes.md)\n* for the namespace taxonomy.\n*/\nvar CliStructuredError = class extends Error {\n\tcode;\n\tseverity;\n\tconstructor(code, summary, options) {\n\t\tsuper(summary, options?.cause !== void 0 ? { cause: options.cause } : void 0);\n\t\tthis.name = \"CliStructuredError\";\n\t\tthis.code = code;\n\t\tthis.severity = options?.severity ?? \"error\";\n\t\tconst fix = options?.fix === options?.why ? void 0 : options?.fix;\n\t\tconst where = options?.where ? {\n\t\t\t...ifDefined(\"path\", options.where.path),\n\t\t\t...ifDefined(\"line\", options.where.line)\n\t\t} : void 0;\n\t\tObject.assign(this, {\n\t\t\t...ifDefined(\"why\", options?.why),\n\t\t\t...ifDefined(\"fix\", fix),\n\t\t\t...ifDefined(\"where\", where),\n\t\t\t...ifDefined(\"meta\", options?.meta),\n\t\t\t...ifDefined(\"docsUrl\", options?.docsUrl)\n\t\t});\n\t}\n\t/**\n\t* Converts this error to a CLI error envelope for output formatting.\n\t*/\n\ttoEnvelope() {\n\t\treturn {\n\t\t\tok: false,\n\t\t\tcode: this.code,\n\t\t\tseverity: this.severity,\n\t\t\tsummary: this.message,\n\t\t\t...ifDefined(\"why\", this.why),\n\t\t\t...ifDefined(\"fix\", this.fix),\n\t\t\t...ifDefined(\"where\", this.where),\n\t\t\t...ifDefined(\"meta\", this.meta),\n\t\t\t...ifDefined(\"docsUrl\", this.docsUrl)\n\t\t};\n\t}\n\t/**\n\t* Type guard to check if an error is a CliStructuredError.\n\t* Uses duck-typing to work across module boundaries where instanceof may fail.\n\t*/\n\tstatic is(error) {\n\t\tif (!(error instanceof Error)) return false;\n\t\tconst candidate = error;\n\t\treturn candidate.name === \"CliStructuredError\" && typeof candidate.code === \"string\" && typeof candidate.toEnvelope === \"function\";\n\t}\n};\n/**\n* Config file not found or missing.\n*/\nfunction errorConfigFileNotFound(configPath, options) {\n\treturn new CliStructuredError(\"CONFIG.FILE_NOT_FOUND\", \"Config file not found\", {\n\t\t...options?.why ? { why: options.why } : { why: \"Config file not found\" },\n\t\tfix: \"Run 'prisma-next init' to create a config file\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.FILE_NOT_FOUND\"),\n\t\t...configPath ? { where: { path: configPath } } : {}\n\t});\n}\n/**\n* Config module failed to evaluate (syntax error, module threw during import).\n*/\nfunction errorConfigEvaluationFailed(configPath, options) {\n\treturn new CliStructuredError(\"CONFIG.EVALUATION_FAILED\", \"Config file could not be evaluated\", {\n\t\twhy: options.why,\n\t\tfix: \"Fix the error in your prisma-next.config.ts so the module evaluates, then rerun the command\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.EVALUATION_FAILED\"),\n\t\t...configPath ? { where: { path: configPath } } : {},\n\t\t...options.cause !== void 0 ? { cause: options.cause } : {}\n\t});\n}\n/**\n* Config module evaluated, but its export does not carry the defineConfig\n* version marker (plain object export, or a config produced by a different\n* defineConfig such as classic Prisma's).\n*/\nfunction errorConfigVersionMarkerMissing(configPath) {\n\treturn new CliStructuredError(\"CONFIG.VERSION_MARKER_MISSING\", \"Config is not a defineConfig result\", {\n\t\twhy: \"The config module evaluated, but its default export was not created by a current defineConfig\",\n\t\tfix: \"Create the config with defineConfig (imported from your target's '/config' entrypoint) and export its return value directly\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.VERSION_MARKER_MISSING\"),\n\t\t...configPath ? { where: { path: configPath } } : {}\n\t});\n}\n/**\n* Contract configuration missing from config.\n*/\nfunction errorContractConfigMissing(options) {\n\treturn new CliStructuredError(\"CONFIG.CONTRACT_MISSING\", \"Contract configuration missing\", {\n\t\twhy: options?.why ?? \"The contract configuration is required for emit\",\n\t\tfix: \"Add contract configuration to your prisma-next.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.CONTRACT_MISSING\")\n\t});\n}\n/**\n* Contract validation failed.\n*/\nfunction errorContractValidationFailed(reason, options) {\n\treturn new CliStructuredError(\"CONTRACT.VALIDATION_FAILED\", \"Contract validation failed\", {\n\t\twhy: reason,\n\t\tfix: \"Re-run `prisma-next contract emit`, or fix the contract file and try again\",\n\t\tdocsUrl: docsUrlFor(\"CONTRACT.VALIDATION_FAILED\"),\n\t\t...options?.where ? { where: options.where } : {},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n/**\n* File not found.\n*/\nfunction errorFileNotFound(filePath, options) {\n\treturn new CliStructuredError(\"CLI.FILE_NOT_FOUND\", \"File not found\", {\n\t\twhy: options?.why ?? `File not found: ${filePath}`,\n\t\tfix: options?.fix ?? \"Check that the file path is correct\",\n\t\twhere: { path: filePath },\n\t\t...options?.docsUrl ? { docsUrl: options.docsUrl } : {},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n/**\n* Database connection is required but not provided.\n*/\nfunction errorDatabaseConnectionRequired(options) {\n\tconst runHint = options?.retryCommand ? `Run \\`${options.retryCommand}\\`` : options?.commandName ? `Run \\`prisma-next ${options.commandName} --db <url>\\`` : \"Provide `--db <url>`\";\n\treturn new CliStructuredError(\"CONFIG.DB_CONNECTION_REQUIRED\", \"Database connection is required\", {\n\t\twhy: options?.why ?? \"Database connection is required for this command\",\n\t\tfix: `${runHint}, or set \\`db: { connection: \"postgres://…\" }\\` in prisma-next.config.ts`,\n\t\t...options?.missingFlags !== void 0 ? { meta: { missingFlags: [...options.missingFlags] } } : {}\n\t});\n}\n/**\n* Query runner factory is required but not provided in config.\n*/\nfunction errorQueryRunnerFactoryRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.QUERY_RUNNER_FACTORY_REQUIRED\", \"Query runner factory is required\", {\n\t\twhy: options?.why ?? \"Config.db.queryRunnerFactory is required for db verify\",\n\t\tfix: \"Add db.queryRunnerFactory to prisma-next.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.QUERY_RUNNER_FACTORY_REQUIRED\")\n\t});\n}\n/**\n* Family verify.readMarker is required but not provided.\n*/\nfunction errorFamilyReadMarkerSqlRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.FAMILY_READ_MARKER_REQUIRED\", \"Family readMarker() is required\", {\n\t\twhy: options?.why ?? \"Family verify.readMarker is required for db verify\",\n\t\tfix: \"Ensure family.verify.readMarker() is exported by your family package\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.FAMILY_READ_MARKER_REQUIRED\")\n\t});\n}\n/**\n* JSON output format not supported.\n*/\nfunction errorJsonFormatNotSupported(options) {\n\treturn new CliStructuredError(\"CLI.JSON_FORMAT_UNSUPPORTED\", \"Unsupported JSON format\", {\n\t\twhy: `The ${options.command} command does not support --json ${options.format}`,\n\t\tfix: `Use --json ${options.supportedFormats.join(\" or \")}, or omit --json for human output`,\n\t\tmeta: {\n\t\t\tcommand: options.command,\n\t\t\tformat: options.format,\n\t\t\tsupportedFormats: options.supportedFormats\n\t\t}\n\t});\n}\n/**\n* Driver is required for DB-connected commands but not provided.\n*/\nfunction errorDriverRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.DRIVER_REQUIRED\", \"Driver is required for DB-connected commands\", {\n\t\twhy: options?.why ?? \"Config.driver is required for DB-connected commands\",\n\t\tfix: \"Add a control-plane driver to prisma-next.config.ts (e.g. import a driver descriptor and set `driver: postgresDriver`)\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.DRIVER_REQUIRED\")\n\t});\n}\n/**\n* Contract requires extension packs that are not provided by config descriptors.\n*/\nfunction errorContractMissingExtensions(options) {\n\tconst missing = [...options.missingExtensions].sort();\n\treturn new CliStructuredError(\"CONFIG.MISSING_EXTENSION_PACKS\", \"Missing extension packs in config\", {\n\t\twhy: missing.length === 1 ? `Contract requires extension pack '${missing[0]}', but CLI config does not provide a matching descriptor.` : `Contract requires extension packs ${missing.map((p) => `'${p}'`).join(\", \")}, but CLI config does not provide matching descriptors.`,\n\t\tfix: \"Add the missing extension descriptors to `extensions` in prisma-next.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.MISSING_EXTENSION_PACKS\"),\n\t\tmeta: {\n\t\t\tmissingExtensions: missing,\n\t\t\tprovidedComponentIds: [...options.providedComponentIds].sort()\n\t\t}\n\t});\n}\n/**\n* Migration planning failed due to conflicts.\n*/\nfunction errorMigrationPlanningFailed(options) {\n\tconst conflictSummaries = options.conflicts.map((c) => c.summary);\n\tconst computedWhy = options.why ?? conflictSummaries.join(\"\\n\");\n\tconst conflictFixes = options.conflicts.map((c) => c.why).filter((why) => typeof why === \"string\");\n\treturn new CliStructuredError(\"MIGRATION.PLANNING_FAILED\", \"Migration planning failed\", {\n\t\twhy: computedWhy,\n\t\tfix: conflictFixes.length > 0 ? conflictFixes.join(\"\\n\") : \"Use `db verify --schema-only` to inspect conflicts, or ensure the database is empty\",\n\t\tmeta: { conflicts: options.conflicts },\n\t\tdocsUrl: docsUrlFor(\"MIGRATION.PLANNING_FAILED\")\n\t});\n}\n/**\n* Target does not support migrations (missing createPlanner/createRunner).\n*/\nfunction errorTargetMigrationNotSupported(options) {\n\treturn new CliStructuredError(\"MIGRATION.TARGET_UNSUPPORTED\", \"Target does not support migrations\", {\n\t\twhy: options?.why ?? \"The configured target does not provide migration planner/runner\",\n\t\tfix: \"Select a target that provides migrations (it must export `target.migrations` for db init)\",\n\t\tdocsUrl: docsUrlFor(\"MIGRATION.TARGET_UNSUPPORTED\")\n\t});\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*/\nfunction errorMigrationCliInvalidConfigArg(options) {\n\treturn new CliStructuredError(\"CLI.CONFIG_ARG_MISSING_PATH\", \"--config flag requires a path argument\", {\n\t\twhy: options?.nextToken !== void 0 ? `\\`--config\\` was followed by another flag (\\`${options.nextToken}\\`) instead of a path argument.` : \"`--config` was passed without a following path argument.\",\n\t\tfix: \"Pass a config path: `--config <path>` or `--config=<path>`.\",\n\t\tmeta: options?.nextToken !== void 0 ? { nextToken: options.nextToken } : {}\n\t});\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*/\nfunction errorMigrationCliUnknownFlag(options) {\n\tconst knownList = options.knownFlags.join(\", \");\n\treturn new CliStructuredError(\"CLI.UNKNOWN_FLAG\", \"Unknown migration CLI flag\", {\n\t\twhy: `Unknown flag \\`${options.flag}\\`.`,\n\t\tfix: `Known flags: ${knownList}. Run with \\`--help\\` to see the full list.`,\n\t\tmeta: {\n\t\t\tflag: options.flag,\n\t\t\tknownFlags: options.knownFlags\n\t\t}\n\t});\n}\n/**\n* The main CLI received an unsupported `--format` value.\n*/\nfunction errorInvalidOutputFormat(value) {\n\treturn new CliStructuredError(\"CLI.INVALID_OUTPUT_FORMAT\", `Invalid --format value \"${value}\". Allowed values: pretty, json.`, { meta: {\n\t\tvalue,\n\t\tallowed: [\"pretty\", \"json\"]\n\t} });\n}\n/**\n* The main CLI received mutually exclusive output format flags\n* (`--format pretty` together with `--json`).\n*/\nfunction errorOutputFormatMutex() {\n\treturn new CliStructuredError(\"CLI.OUTPUT_FORMAT_CONFLICT\", \"Cannot use --format pretty together with --json. Use --format json or --json alone for JSON output.\");\n}\n/**\n* Config validation error (missing required fields).\n*/\nfunction errorConfigValidation(field, options) {\n\treturn new CliStructuredError(\"CONFIG.VALIDATION_FAILED\", \"Config validation error\", {\n\t\twhy: options?.why ?? `Config must have a \"${field}\" field`,\n\t\tfix: \"Check your prisma-next.config.ts and ensure all required fields are provided\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.VALIDATION_FAILED\"),\n\t\tmeta: {\n\t\t\tfield,\n\t\t\t...options?.section !== void 0 ? { section: options.section } : {}\n\t\t}\n\t});\n}\n/**\n* An enum declares a codecId that no component in the contract's pack stack provides,\n* so its member values cannot be encoded. Thrown by both authoring paths (TS `defineContract`\n* and PSL interpretation) when the codec lookup built from the contract's packs has no\n* descriptor for the codecId.\n*/\nfunction errorEnumCodecNotInPackStack(options) {\n\treturn new CliStructuredError(\"CONTRACT.ENUM_CODEC_NOT_IN_PACK_STACK\", `Enum codec \"${options.codecId}\" is not part of the contract's pack stack`, {\n\t\twhy: `An enum uses codec \"${options.codecId}\", but no family, target, or extension pack in the contract provides it.`,\n\t\tfix: \"Use a codec provided by the contract's target/extension packs, or add the pack that supplies this codec.\",\n\t\tmeta: { codecId: options.codecId }\n\t});\n}\n/**\n* Generic unexpected error.\n*/\nfunction errorUnexpected(message, options) {\n\treturn new CliStructuredError(\"CLI.UNEXPECTED\", \"Unexpected error\", {\n\t\twhy: options?.why ?? message,\n\t\tfix: options?.fix ?? \"Check the error message and try again\",\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n//#endregion\nexport { errorUnexpected as S, errorMigrationCliUnknownFlag as _, errorConfigVersionMarkerMissing as a, errorQueryRunnerFactoryRequired as b, errorContractValidationFailed as c, errorEnumCodecNotInPackStack as d, errorFamilyReadMarkerSqlRequired as f, errorMigrationCliInvalidConfigArg as g, errorJsonFormatNotSupported as h, errorConfigValidation as i, errorDatabaseConnectionRequired as l, errorInvalidOutputFormat as m, errorConfigEvaluationFailed as n, errorContractConfigMissing as o, errorFileNotFound as p, errorConfigFileNotFound as r, errorContractMissingExtensions as s, CliStructuredError as t, errorDriverRequired as u, errorMigrationPlanningFailed as v, errorTargetMigrationNotSupported as x, errorOutputFormatMutex as y };\n\n//# sourceMappingURL=control-C_8057XM.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,IAAI,qBAAqB,cAAc,MAAM;CAC5C;CACA;CACA,YAAY,MAAM,SAAS,SAAS;EACnC,MAAM,SAAS,SAAS,UAAU,KAAK,IAAI,EAAE,OAAO,QAAQ,MAAM,IAAI,KAAK,CAAC;EAC5E,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,KAAK,WAAW,SAAS,YAAY;EACrC,MAAM,MAAM,SAAS,QAAQ,SAAS,MAAM,KAAK,IAAI,SAAS;EAC9D,MAAM,QAAQ,SAAS,QAAQ;GAC9B,GAAG,UAAU,QAAQ,QAAQ,MAAM,IAAI;GACvC,GAAG,UAAU,QAAQ,QAAQ,MAAM,IAAI;EACxC,IAAI,KAAK;EACT,OAAO,OAAO,MAAM;GACnB,GAAG,UAAU,OAAO,SAAS,GAAG;GAChC,GAAG,UAAU,OAAO,GAAG;GACvB,GAAG,UAAU,SAAS,KAAK;GAC3B,GAAG,UAAU,QAAQ,SAAS,IAAI;GAClC,GAAG,UAAU,WAAW,SAAS,OAAO;EACzC,CAAC;CACF;;;;CAIA,aAAa;EACZ,OAAO;GACN,IAAI;GACJ,MAAM,KAAK;GACX,UAAU,KAAK;GACf,SAAS,KAAK;GACd,GAAG,UAAU,OAAO,KAAK,GAAG;GAC5B,GAAG,UAAU,OAAO,KAAK,GAAG;GAC5B,GAAG,UAAU,SAAS,KAAK,KAAK;GAChC,GAAG,UAAU,QAAQ,KAAK,IAAI;GAC9B,GAAG,UAAU,WAAW,KAAK,OAAO;EACrC;CACD;;;;;CAKA,OAAO,GAAG,OAAO;EAChB,IAAI,EAAE,iBAAiB,QAAQ,OAAO;EACtC,MAAM,YAAY;EAClB,OAAO,UAAU,SAAS,wBAAwB,OAAO,UAAU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AO;EACrB,GAAG,UAAU,SAAS,SAAS,KAAK;CACrC,CAAC;AACF"}
package/dist/errors.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as errorUnexpected, _ as errorMigrationCliUnknownFlag, a as errorConfigValidation, b as errorQueryRunnerFactoryRequired, c as errorContractValidationFailed, d as errorEnumCodecNotInPackStack, f as errorFamilyReadMarkerSqlRequired, g as errorMigrationCliInvalidConfigArg, h as errorJsonFormatNotSupported, i as errorConfigFileNotFound, l as errorDatabaseConnectionRequired, m as errorInvalidOutputFormat, n as CliErrorEnvelope, o as errorContractConfigMissing, p as errorFileNotFound, r as CliStructuredError, s as errorContractMissingExtensions, t as CliErrorConflict, u as errorDriverRequired, v as errorMigrationPlanningFailed, x as errorTargetMigrationNotSupported, y as errorOutputFormatMutex } from "./control-CwRPkRJ7-Dk0c6D_5.mjs";
2
- import { a as errorMarkerReadFailed, c as errorRunnerFailed, d as errorTargetMismatch, f as parseMarkerRowSafely, i as errorMarkerMissing, l as errorRuntime, m as withMarkerReadErrorHandling, n as errorDestructiveChanges, o as errorMarkerRequired, p as rethrowMarkerReadError, r as errorHashMismatch, s as errorMarkerRowCorrupt, t as ERROR_CODE_DESTRUCTIVE_CHANGES, u as errorSchemaVerificationFailed } from "./execution-D_ARq2Yb.mjs";
3
- import { a as errorMigrationTargetMismatch, i as errorMigrationPlanNotArray, n as errorMigrationFileMissing, o as errorUnfilledPlaceholder, r as errorMigrationInvalidDefaultExport, s as placeholder, t as errorDataTransformContractMismatch } from "./migration-C02YXQMR.mjs";
4
- export { type CliErrorConflict, type CliErrorEnvelope, CliStructuredError, ERROR_CODE_DESTRUCTIVE_CHANGES, errorConfigFileNotFound, errorConfigValidation, errorContractConfigMissing, errorContractMissingExtensions, errorContractValidationFailed, errorDataTransformContractMismatch, errorDatabaseConnectionRequired, errorDestructiveChanges, errorDriverRequired, errorEnumCodecNotInPackStack, errorFamilyReadMarkerSqlRequired, errorFileNotFound, errorHashMismatch, errorInvalidOutputFormat, errorJsonFormatNotSupported, errorMarkerMissing, errorMarkerReadFailed, errorMarkerRequired, errorMarkerRowCorrupt, errorMigrationCliInvalidConfigArg, errorMigrationCliUnknownFlag, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationPlanNotArray, errorMigrationPlanningFailed, errorMigrationTargetMismatch, errorOutputFormatMutex, errorQueryRunnerFactoryRequired, errorRunnerFailed, errorRuntime, errorSchemaVerificationFailed, errorTargetMigrationNotSupported, errorTargetMismatch, errorUnexpected, errorUnfilledPlaceholder, parseMarkerRowSafely, placeholder, rethrowMarkerReadError, withMarkerReadErrorHandling };
1
+ import { C as errorTargetMigrationNotSupported, S as errorQueryRunnerFactoryRequired, _ as errorJsonFormatNotSupported, a as errorConfigFileNotFound, b as errorMigrationPlanningFailed, c as errorContractConfigMissing, d as errorDatabaseConnectionRequired, f as errorDriverRequired, g as errorInvalidOutputFormat, h as errorFileNotFound, i as errorConfigEvaluationFailed, l as errorContractMissingExtensions, m as errorFamilyReadMarkerSqlRequired, n as CliErrorEnvelope, o as errorConfigValidation, p as errorEnumCodecNotInPackStack, r as CliStructuredError, s as errorConfigVersionMarkerMissing, t as CliErrorConflict, u as errorContractValidationFailed, v as errorMigrationCliInvalidConfigArg, w as errorUnexpected, x as errorOutputFormatMutex, y as errorMigrationCliUnknownFlag } from "./control-BWHddgfQ-CHZkHCnz.mjs";
2
+ import { a as errorMarkerReadFailed, c as errorRunnerFailed, d as errorTargetMismatch, f as parseMarkerRowSafely, i as errorMarkerMissing, l as errorRuntime, m as withMarkerReadErrorHandling, n as errorDestructiveChanges, o as errorMarkerRequired, p as rethrowMarkerReadError, r as errorHashMismatch, s as errorMarkerRowCorrupt, t as ERROR_CODE_DESTRUCTIVE_CHANGES, u as errorSchemaVerificationFailed } from "./execution-CStuUgUf.mjs";
3
+ import { a as errorMigrationTargetMismatch, i as errorMigrationPlanNotArray, n as errorMigrationFileMissing, o as errorUnfilledPlaceholder, r as errorMigrationInvalidDefaultExport, s as placeholder, t as errorDataTransformContractMismatch } from "./migration-dka5vLtm.mjs";
4
+ export { type CliErrorConflict, type CliErrorEnvelope, CliStructuredError, ERROR_CODE_DESTRUCTIVE_CHANGES, errorConfigEvaluationFailed, errorConfigFileNotFound, errorConfigValidation, errorConfigVersionMarkerMissing, errorContractConfigMissing, errorContractMissingExtensions, errorContractValidationFailed, errorDataTransformContractMismatch, errorDatabaseConnectionRequired, errorDestructiveChanges, errorDriverRequired, errorEnumCodecNotInPackStack, errorFamilyReadMarkerSqlRequired, errorFileNotFound, errorHashMismatch, errorInvalidOutputFormat, errorJsonFormatNotSupported, errorMarkerMissing, errorMarkerReadFailed, errorMarkerRequired, errorMarkerRowCorrupt, errorMigrationCliInvalidConfigArg, errorMigrationCliUnknownFlag, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationPlanNotArray, errorMigrationPlanningFailed, errorMigrationTargetMismatch, errorOutputFormatMutex, errorQueryRunnerFactoryRequired, errorRunnerFailed, errorRuntime, errorSchemaVerificationFailed, errorTargetMigrationNotSupported, errorTargetMismatch, errorUnexpected, errorUnfilledPlaceholder, parseMarkerRowSafely, placeholder, rethrowMarkerReadError, withMarkerReadErrorHandling };