@prisma/orm-family-sql 8.0.0-rc.18-dev.37 → 8.0.0-rc.18-dev.39

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 (93) hide show
  1. package/dist/{attribute-specs-CKPSK8oZ.d.mts → attribute-specs-D_fUYNiw.d.mts} +15 -8
  2. package/dist/attribute-specs-D_fUYNiw.d.mts.map +1 -0
  3. package/dist/{authoring-entity-types-DUQLeBf_-DmXuN7I3.d.mts → authoring-entity-types-DUQLeBf_-BZ1zRWGY.d.mts} +2 -2
  4. package/dist/{authoring-entity-types-DUQLeBf_-DmXuN7I3.d.mts.map → authoring-entity-types-DUQLeBf_-BZ1zRWGY.d.mts.map} +1 -1
  5. package/dist/{config-types-Dc7u9onO.mjs → config-types-CUWdUm6B.mjs} +2 -2
  6. package/dist/{config-types-Dc7u9onO.mjs.map → config-types-CUWdUm6B.mjs.map} +1 -1
  7. package/dist/{contract-builder-C7X80029.d.mts → contract-builder-Di-2-fFO.d.mts} +2 -2
  8. package/dist/{contract-builder-C7X80029.d.mts.map → contract-builder-Di-2-fFO.d.mts.map} +1 -1
  9. package/dist/{contract-builder-CKfnPa4C.mjs → contract-builder-DzzgwCZd.mjs} +20 -9
  10. package/dist/contract-builder-DzzgwCZd.mjs.map +1 -0
  11. package/dist/contract-prisma7__provider.mjs +69 -44
  12. package/dist/contract-prisma7__provider.mjs.map +1 -1
  13. package/dist/contract-psl.d.mts +2 -2
  14. package/dist/contract-psl.mjs +1 -1
  15. package/dist/contract-psl__attribute-specs.d.mts +2 -2
  16. package/dist/contract-psl__attribute-specs.mjs +2 -2
  17. package/dist/contract-psl__provider.mjs +2 -2
  18. package/dist/contract-psl__provider.mjs.map +1 -1
  19. package/dist/contract-ts.d.mts +1 -1
  20. package/dist/contract-ts.mjs +3 -3
  21. package/dist/contract-ts__config-types.mjs +1 -1
  22. package/dist/contract-ts__contract-builder.d.mts +1 -1
  23. package/dist/contract-ts__contract-builder.mjs +2 -2
  24. package/dist/contract.d.mts +2 -2
  25. package/dist/contract.mjs +4 -4
  26. package/dist/contract__data-type.d.mts +2 -2
  27. package/dist/contract__data-type.mjs +3 -3
  28. package/dist/contract__validators.mjs +1 -1
  29. package/dist/{control-B1Nyqky-.d.mts → control-LkQLqHHL.d.mts} +14 -31
  30. package/dist/control-LkQLqHHL.d.mts.map +1 -0
  31. package/dist/{control-adapter-BX5COBWO.mjs → control-adapter-DRlEXxsv.mjs} +2 -2
  32. package/dist/{control-adapter-BX5COBWO.mjs.map → control-adapter-DRlEXxsv.mjs.map} +1 -1
  33. package/dist/{control-jtTYvP_4.mjs → control-d-Dlrhh4.mjs} +38 -9
  34. package/dist/control-d-Dlrhh4.mjs.map +1 -0
  35. package/dist/{data-type-DMk-fLAZ.d.mts → data-type-BacIoCfv.d.mts} +11 -2
  36. package/dist/data-type-BacIoCfv.d.mts.map +1 -0
  37. package/dist/{data-type-HNhSslwG.mjs → data-type-CUJMZOHo.mjs} +2 -2
  38. package/dist/data-type-CUJMZOHo.mjs.map +1 -0
  39. package/dist/{derived-checks-CwbSfZ8d-B3-zWGv_.mjs → derived-checks-CwbSfZ8d-B91zqK6B.mjs} +3 -3
  40. package/dist/{derived-checks-CwbSfZ8d-B3-zWGv_.mjs.map → derived-checks-CwbSfZ8d-B91zqK6B.mjs.map} +1 -1
  41. package/dist/{diff-DDjcnhgw.d.mts → diff-CzUyZmJi.d.mts} +2 -2
  42. package/dist/{diff-DDjcnhgw.d.mts.map → diff-CzUyZmJi.d.mts.map} +1 -1
  43. package/dist/family.d.mts +7 -7
  44. package/dist/family.mjs +8 -8
  45. package/dist/family__control-adapter.mjs +1 -1
  46. package/dist/family__control.d.mts +3 -3
  47. package/dist/family__control.mjs +4 -4
  48. package/dist/family__diff.d.mts +1 -1
  49. package/dist/family__diff.mjs +1 -1
  50. package/dist/family__ir.mjs +1 -1
  51. package/dist/family__migration.d.mts +1 -1
  52. package/dist/family__pack.d.mts +2 -2
  53. package/dist/family__pack.mjs +3 -3
  54. package/dist/family__pack.mjs.map +1 -1
  55. package/dist/family__psl-build.d.mts +1 -1
  56. package/dist/family__psl-build.mjs +1 -1
  57. package/dist/{generator-functions-DIXj2u8w-B_EpEY8t.mjs → generator-functions-DErXcNG5-nKYm5qLY.mjs} +124 -67
  58. package/dist/generator-functions-DErXcNG5-nKYm5qLY.mjs.map +1 -0
  59. package/dist/{interpreter-Dq32sxoS-BcLhPY0_.mjs → interpreter-MPFufRkd-D0QvlLTq.mjs} +72 -18
  60. package/dist/interpreter-MPFufRkd-D0QvlLTq.mjs.map +1 -0
  61. package/dist/{migration-BZJFz90J.d.mts → migration-tfMTDejH.d.mts} +2 -2
  62. package/dist/{migration-BZJFz90J.d.mts.map → migration-tfMTDejH.d.mts.map} +1 -1
  63. package/dist/{pack-C4yN9ooT.d.mts → pack-74uFuOgh.d.mts} +48 -30
  64. package/dist/{pack-C4yN9ooT.d.mts.map → pack-74uFuOgh.d.mts.map} +1 -1
  65. package/dist/{psl-build-DzdzY3o1.mjs → psl-build-BSZQ8lC1.mjs} +5 -4
  66. package/dist/{psl-build-DzdzY3o1.mjs.map → psl-build-BSZQ8lC1.mjs.map} +1 -1
  67. package/dist/{psl-build-DETsH_kq.d.mts → psl-build-BkNvqSMz.d.mts} +4 -2
  68. package/dist/{psl-build-DETsH_kq.d.mts.map → psl-build-BkNvqSMz.d.mts.map} +1 -1
  69. package/dist/{psl-column-resolution-DNdqpUxt-CL8m5aC4.d.mts → psl-column-resolution-DNdqpUxt-DlQwgbqn.d.mts} +3 -3
  70. package/dist/{psl-column-resolution-DNdqpUxt-CL8m5aC4.d.mts.map → psl-column-resolution-DNdqpUxt-DlQwgbqn.d.mts.map} +1 -1
  71. package/dist/{psl-field-resolution-C8s57hFC-Bv6NiK8J.mjs → psl-field-resolution-BLtSah2i-BuuJ5H70.mjs} +21 -15
  72. package/dist/psl-field-resolution-BLtSah2i-BuuJ5H70.mjs.map +1 -0
  73. package/dist/{schema-verify-BwRdzbHb-BzdgK4xv.mjs → schema-verify-BwRdzbHb-DfFAS0EC.mjs} +2 -2
  74. package/dist/{schema-verify-BwRdzbHb-BzdgK4xv.mjs.map → schema-verify-BwRdzbHb-DfFAS0EC.mjs.map} +1 -1
  75. package/dist/{sql-contract-serializer-sMY3prTx-D-xfnqyD.mjs → sql-contract-serializer-sMY3prTx-CpZa5Nlt.mjs} +2 -2
  76. package/dist/{sql-contract-serializer-sMY3prTx-D-xfnqyD.mjs.map → sql-contract-serializer-sMY3prTx-CpZa5Nlt.mjs.map} +1 -1
  77. package/dist/{sql-data-type-D5cI3M07-DIcPP8s1.mjs → sql-data-type-D7M-YTTY-C9oWGZ3z.mjs} +16 -3
  78. package/dist/sql-data-type-D7M-YTTY-C9oWGZ3z.mjs.map +1 -0
  79. package/dist/{types-DKSRuPhK-DuxW_ceI.d.mts → types-CI5lled6-CDV4aYNB.d.mts} +2 -2
  80. package/dist/{types-DKSRuPhK-DuxW_ceI.d.mts.map → types-CI5lled6-CDV4aYNB.d.mts.map} +1 -1
  81. package/dist/{validators-BlONfdFH.mjs → validators-Cfy0jmZ2.mjs} +2 -2
  82. package/dist/{validators-BlONfdFH.mjs.map → validators-Cfy0jmZ2.mjs.map} +1 -1
  83. package/package.json +18 -18
  84. package/dist/attribute-specs-CKPSK8oZ.d.mts.map +0 -1
  85. package/dist/contract-builder-CKfnPa4C.mjs.map +0 -1
  86. package/dist/control-B1Nyqky-.d.mts.map +0 -1
  87. package/dist/control-jtTYvP_4.mjs.map +0 -1
  88. package/dist/data-type-DMk-fLAZ.d.mts.map +0 -1
  89. package/dist/data-type-HNhSslwG.mjs.map +0 -1
  90. package/dist/generator-functions-DIXj2u8w-B_EpEY8t.mjs.map +0 -1
  91. package/dist/interpreter-Dq32sxoS-BcLhPY0_.mjs.map +0 -1
  92. package/dist/psl-field-resolution-C8s57hFC-Bv6NiK8J.mjs.map +0 -1
  93. package/dist/sql-data-type-D5cI3M07-DIcPP8s1.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-data-type-D7M-YTTY-C9oWGZ3z.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/sql-data-type-D7M-YTTY.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { assertDataTypeParams, dataType, dataTypeParams, objectSchemaKeys, schemaKeysAllowing } from \"@internal/framework-components/codec\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { type } from \"arktype\";\n//#region src/sql-data-type.ts\nconst PLACEHOLDER = /\\{([A-Za-z][A-Za-z0-9]*)\\}/g;\nconst LITERAL_CHARACTERS = /^[a-z0-9_ (),.]*$/;\nconst REGEXP_SPECIAL = /[.*+?^${}()|[\\]\\\\]/g;\nfunction paramKeysOf(id, schema) {\n\tif (schema === void 0) return [];\n\tconst keys = objectSchemaKeys(schema);\n\tif (keys === void 0) refuseDeclaration(id, \"its parameter schema must be an arktype object schema.\");\n\treturn keys;\n}\nfunction placeholdersOf(text) {\n\treturn [...text.matchAll(PLACEHOLDER)].map((match) => match[1] ?? \"\");\n}\nfunction placeholderSetOf(text) {\n\treturn [...placeholdersOf(text)].sort().join(\",\");\n}\nfunction patternOf(text, signedKeys = []) {\n\tconst placeholders = text.replace(REGEXP_SPECIAL, \"\\\\$&\").replace(/\\\\\\{([A-Za-z][A-Za-z0-9]*)\\\\\\}/g, (_, name) => signedKeys.includes(name) ? \"(-?\\\\d+)\" : \"(\\\\d+)\");\n\treturn new RegExp(`^${placeholders}$`);\n}\nfunction refuseDeclaration(id, why) {\n\tthrow new InternalError(`Data type ${id}: ${why}`);\n}\nfunction checkText(id, text, paramKeys) {\n\tconst quoted = JSON.stringify(text.text);\n\tconst refuse = (why) => refuseDeclaration(id, `the text ${quoted} ${why}.`);\n\tif (text.text === \"\") refuse(\"is empty\");\n\tif (text.text !== text.text.trim()) refuse(\"starts or ends with a space\");\n\tif (text.text.includes(\" \")) refuse(\"has two spaces in a row\");\n\tconst literal = text.text.replace(PLACEHOLDER, \"\");\n\tif (literal.includes(\"{\") || literal.includes(\"}\")) refuse(\"has a placeholder that is not written {name}\");\n\tif (!LITERAL_CHARACTERS.test(literal)) refuse(\"must be lower case and contain only letters, digits, spaces, brackets, commas, dots, underscores and placeholders\");\n\tfor (const name of placeholdersOf(text.text)) if (!paramKeys.includes(name)) refuse(`names the parameter {${name}}, which the type does not declare`);\n\tif (text.display === void 0) return;\n\tconst display = JSON.stringify(text.display);\n\tif (text.display.toLowerCase() !== text.text.toLowerCase()) refuse(`has the display ${display}, which differs from it beyond letter case`);\n\tif (placeholdersOf(text.display).join(\",\") !== placeholdersOf(text.text).join(\",\")) refuse(`has the display ${display}, which writes a placeholder differently`);\n}\nfunction checkMarks(id, texts) {\n\tconst marked = /* @__PURE__ */ new Map();\n\tfor (const text of texts) {\n\t\tconst key = placeholderSetOf(text.text);\n\t\tconst entry = marked.get(key) ?? {};\n\t\tfor (const mark of [\"written\", \"catalog\"]) {\n\t\t\tif (text[mark] !== true) continue;\n\t\t\tconst other = entry[mark];\n\t\t\tif (other !== void 0) refuseDeclaration(id, `the texts ${JSON.stringify(other)} and ${JSON.stringify(text.text)} have the same placeholders and are both ${mark}.`);\n\t\t\tentry[mark] = text.text;\n\t\t}\n\t\tmarked.set(key, entry);\n\t}\n}\nfunction checkKindClaim(id, spec) {\n\tif (spec.nameIsCatalogText === true) {\n\t\tif (spec.render === void 0) refuseDeclaration(id, \"a type whose name is its catalog text declares render.\");\n\t\tif (spec.texts !== void 0 || spec.claimsKind !== void 0) refuseDeclaration(id, \"a type whose name is its catalog text declares no texts and claims no kind.\");\n\t}\n\tif (spec.claimsKind === void 0) {\n\t\tif (spec.render !== void 0 && spec.nameIsCatalogText !== true) refuseDeclaration(id, \"render is allowed only together with claimsKind or nameIsCatalogText.\");\n\t\tif (spec.fromReported !== void 0) refuseDeclaration(id, \"fromReported is allowed only together with claimsKind.\");\n\t\treturn;\n\t}\n\tif (spec.texts !== void 0) refuseDeclaration(id, \"a type that claims a kind declares no texts.\");\n}\nfunction checkStoredAs(id, spec) {\n\tif (spec.storedAs === void 0) return;\n\tif (spec.texts !== void 0) refuseDeclaration(id, \"a type stored as another declares no texts; its name is the name of the type it is stored as.\");\n\tif (spec.claimsKind !== void 0) refuseDeclaration(id, \"a type stored as another claims no kind.\");\n}\nconst identity = (params) => params;\nfunction isParamsOf(schema, params) {\n\treturn schema === void 0 || !(schema(params) instanceof type.errors);\n}\nfunction checkNormalFormsWritten(type) {\n\tconst written = new Set(type.sql.texts.filter((text) => text.written === true).map((text) => placeholderSetOf(text.text)));\n\tif (written.size === 0) return;\n\tconst probes = [{}, ...type.sql.texts.map((text) => Object.fromEntries(placeholdersOf(text.text).map((name) => [name, 1])))];\n\tfor (const probe of probes) {\n\t\tif (!isParamsOf(type.params, probe)) continue;\n\t\tconst normalKeys = presentKeys(type.sql.normalize(probe));\n\t\tif (!written.has([...normalKeys].sort().join(\",\"))) refuseDeclaration(type.id, `the parameters ${formatKeys(Object.keys(probe))} have the normal form ${formatKeys(normalKeys)}, which no written text takes.`);\n\t}\n}\n/** Declare a SQL data type, refusing a declaration that breaks a rule of the module. */\nfunction sqlDataType(id, spec) {\n\tconst declaredNormalize = spec.normalize ?? identity;\n\tconst normalize = (params) => isParamsOf(spec.params, params) ? declaredNormalize(params) : params;\n\tconst { params: _untypedParams, ...declared } = dataType(id, {\n\t\t...spec,\n\t\tnormalize\n\t});\n\tconst texts = spec.texts ?? [];\n\tconst paramKeys = paramKeysOf(declared.id, spec.params);\n\tfor (const text of texts) checkText(declared.id, text, paramKeys);\n\tcheckMarks(declared.id, texts);\n\tcheckKindClaim(declared.id, spec);\n\tcheckStoredAs(declared.id, spec);\n\tconst type = {\n\t\t...declared,\n\t\t...ifDefined(\"params\", spec.params),\n\t\tsql: {\n\t\t\ttexts,\n\t\t\tclaimsKind: spec.claimsKind,\n\t\t\tstoredAs: spec.storedAs,\n\t\t\tnormalize,\n\t\t\trender: spec.render,\n\t\t\tfromReported: spec.fromReported,\n\t\t\tnameIsCatalogText: spec.nameIsCatalogText === true\n\t\t}\n\t};\n\tcheckNormalFormsWritten(type);\n\treturn type;\n}\n/** Whether the name of `type` is the text the database catalog prints, as declared by {@link SqlDataTypeSpec.nameIsCatalogText}. */\nfunction nameIsCatalogText(type) {\n\treturn type.sql.nameIsCatalogText;\n}\n/** Whether `type` is a data type a SQL column can have. `sql/expression` is the one data type no column has. */\nfunction isSqlDataType(type) {\n\treturn \"sql\" in type;\n}\nfunction presentKeys(params) {\n\treturn Object.keys(params).filter((key) => params[key] !== void 0);\n}\nfunction formatKeys(keys) {\n\treturn `[${[...keys].sort().join(\", \")}]`;\n}\n/** The parameters, when `type` accepts them; otherwise `CONTRACT.TYPE_PARAMS_INVALID` naming each parameter it refuses. */\nfunction validateSqlTypeParams(type, params) {\n\tassertDataTypeParams(type, params);\n\treturn blindCast(params);\n}\nfunction pickText(type, mark, keys) {\n\tconst candidates = type.sql.texts.filter((text) => text[mark] === true);\n\tconst wanted = [...keys].sort().join(\",\");\n\tconst found = candidates.find((text) => placeholderSetOf(text.text) === wanted);\n\tif (found !== void 0) return found;\n\tconst verb = mark === \"written\" ? \"written\" : \"reported\";\n\tconst takes = candidates.length === 0 ? `it is never ${verb}` : `it is ${verb} with ${candidates.map((text) => formatKeys(placeholdersOf(text.text))).join(\", \")}`;\n\tthrow contractError(\"CONTRACT.TYPE_PARAMS_INVALID\", `${type.id} cannot be ${verb} with parameters ${formatKeys(keys)}; ${takes}`, { meta: {\n\t\tdataType: type.id,\n\t\tparameters: [...keys]\n\t} });\n}\nfunction substitute(type, text, params) {\n\treturn (text.display ?? text.text).replace(PLACEHOLDER, (_, name) => {\n\t\tconst value = params[name];\n\t\tif (!Number.isSafeInteger(value)) throw contractError(\"CONTRACT.TYPE_PARAMS_INVALID\", `${type.id}: the parameter ${name} is written into the type name and must be an integer`, { meta: {\n\t\t\tdataType: type.id,\n\t\t\tparameters: [name]\n\t\t} });\n\t\treturn String(value);\n\t});\n}\n/**\n* The name of `type` with no parameters, for places where parameters must not appear, such as a\n* cast. A type whose name is its catalog text has none: its parameters cannot be separated from its\n* name, so it is refused.\n*/\nfunction sqlBaseName(type, params) {\n\tif (type.sql.nameIsCatalogText) throw new InternalError(`Data type ${type.id} names its type by its catalog text, so it has no base name.`);\n\tif (type.sql.render !== void 0) return type.sql.render(validateSqlTypeParams(type, params));\n\tconst fewest = type.sql.texts.filter((text) => text.written === true).reduce((best, text) => best === void 0 || placeholdersOf(text.text).length < placeholdersOf(best.text).length ? text : best, void 0);\n\tif (fewest === void 0) throw new InternalError(`Data type ${type.id} has no written text and no render, so it has no base name.`);\n\tconst name = fewest.display ?? fewest.text;\n\tif (placeholdersOf(fewest.text).length === 0) return name;\n\tconst bracket = name.indexOf(\"(\");\n\treturn bracket === -1 ? name : name.slice(0, bracket);\n}\n/**\n* The base name of `type` with `params`, unquoted, for display. It differs from {@link sqlBaseName}\n* for a type that claims a kind, where it is the `typeName` parameter as written (`app.status`)\n* while `sqlBaseName` gives the quoted name `render` writes into SQL (`\"app\".\"status\"`), and for a\n* type whose name is its catalog text, where it is that whole text.\n*/\nfunction unquotedSqlBaseName(type, params) {\n\tif (type.sql.nameIsCatalogText) return renderSqlTypeName(type, params);\n\tif (type.sql.claimsKind === void 0) return sqlBaseName(type, params);\n\tconst { typeName } = validateSqlTypeParams(type, params);\n\tif (typeof typeName !== \"string\") throw new InternalError(`Data type ${type.id} claims the kind \"${type.sql.claimsKind}\" but declares no string typeName parameter.`);\n\treturn typeName;\n}\nconst ADD_THE_CODEC_PACK = \"Add the pack that provides the codec, and so declares its data type, to the configuration: to `extensions` in prisma.config or in defineContract.\";\n/** The SQL data type the codec `codecId` represents. */\nfunction sqlDataTypeOfCodec(codecId, lookups) {\n\tconst descriptor = lookups.codecLookup.descriptorFor(codecId);\n\tif (descriptor === void 0) throw contractError(\"CONTRACT.CODEC_DESCRIPTOR_MISSING\", `No codec \"${codecId}\" is registered, so its column type cannot be named.`, {\n\t\tfix: ADD_THE_CODEC_PACK,\n\t\tmeta: { codecId }\n\t});\n\tconst type = lookups.dataTypeLookup.get(descriptor.dataType);\n\tif (type === void 0) throw contractError(\"CONTRACT.DATA_TYPE_UNREGISTERED\", `Codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers.`, {\n\t\tfix: ADD_THE_CODEC_PACK,\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\tdataType: descriptor.dataType\n\t\t}\n\t});\n\tif (!isSqlDataType(type)) throw new InternalError(`Data type ${type.id} is not a SQL data type, so it has no type name.`);\n\treturn type;\n}\n/**\n* The length of a column of data type `type` with `typeParams`, in the type's normal form, as verify compares it: a bare Postgres `character` holds 1. `undefined` when the column has no length, or when its data type drops the length because the database does not limit it, as SQLite's text types do.\n*/\nfunction sqlColumnLength(type, typeParams) {\n\tif (type === void 0 || !isSqlDataType(type)) return void 0;\n\tconst length = type.sql.normalize(dataTypeParams(type, typeParams ?? {}))[\"length\"];\n\treturn typeof length === \"number\" ? length : void 0;\n}\n/** The length of a column of `codecId` in its data type's normal form, or `undefined` for a column with no length or one whose database does not limit it. */\nfunction sqlCodecColumnLength(dataTypes, codecId, typeParams) {\n\tconst dataTypeId = dataTypes.dataTypeOfCodec(codecId);\n\treturn sqlColumnLength(dataTypeId === void 0 ? void 0 : dataTypes.lookup.get(dataTypeId), typeParams);\n}\n/** The type a column of `type` is stored as, whose name DDL writes and the database reports: `type` itself unless it names another. */\nfunction sqlStorageType(type, lookup) {\n\tif (type.sql.storedAs === void 0) return type;\n\tconst storage = lookup.get(type.sql.storedAs);\n\tif (storage === void 0 || !isSqlDataType(storage)) throw contractError(\"CONTRACT.DATA_TYPE_UNREGISTERED\", `Data type \"${type.id}\" is stored as \"${type.sql.storedAs}\", which no component registers as a SQL data type.`, { meta: {\n\t\tdataType: type.sql.storedAs,\n\t\tstoredBy: type.id\n\t} });\n\treturn storage;\n}\n/** The id of the type a column of the data type `dataTypeId` is stored as: {@link sqlStorageType} of it, which refuses a storage type the lookup does not register, or `dataTypeId` itself when the lookup does not know it as a SQL data type. */\nfunction sqlStorageTypeId(dataTypeId, lookup) {\n\tconst type = lookup.get(dataTypeId);\n\treturn type !== void 0 && isSqlDataType(type) ? sqlStorageType(type, lookup).id : dataTypeId;\n}\n/** The type a column is stored as, with its parameters in normal form, or the column's own id and parameters as written when the lookup does not know its data type as a SQL data type. */\nfunction storedColumnType(column, lookup) {\n\tconst type = lookup.get(column.dataType);\n\tif (type === void 0 || !isSqlDataType(type)) return {\n\t\tid: column.dataType,\n\t\tparams: column.typeParams ?? {}\n\t};\n\tconst storage = sqlStorageType(type, lookup);\n\treturn {\n\t\tid: storage.id,\n\t\tparams: storage.sql.normalize(dataTypeParams(storage, column.typeParams ?? {}))\n\t};\n}\n/**\n* Whether two contract columns have the same type: the types their data types are stored as are one type, those types' parameters are equal in normal form, and both or neither are lists. ADR 254.\n*/\nfunction sameSqlColumnType(a, b, lookup) {\n\tconst isList = (column) => column.many !== void 0 && column.many !== false;\n\tconst left = storedColumnType(a, lookup);\n\tconst right = storedColumnType(b, lookup);\n\treturn left.id === right.id && canonicalizeJson(left.params) === canonicalizeJson(right.params) && isList(a) === isList(b);\n}\n/** The type a column of the codec `codecId` is stored as: {@link sqlStorageType} of the data type it represents. */\nfunction sqlStorageTypeOfCodec(codecId, lookups) {\n\treturn sqlStorageType(sqlDataTypeOfCodec(codecId, lookups), lookups.dataTypeLookup);\n}\n/** {@link unquotedSqlBaseName} of the type a column of the codec `codecId` is stored as. */\nfunction unquotedSqlBaseNameOfCodec(codecId, typeParams, lookups) {\n\tconst type = sqlStorageTypeOfCodec(codecId, lookups);\n\treturn unquotedSqlBaseName(type, dataTypeParams(type, typeParams));\n}\n/** The text a migration writes for `type` with the raw `params`. */\nfunction renderSqlTypeName(type, params) {\n\tconst validated = validateSqlTypeParams(type, params);\n\tif (type.sql.render !== void 0) return type.sql.render(validated);\n\tconst normalized = type.sql.normalize(validated);\n\treturn substitute(type, pickText(type, \"written\", presentKeys(params).filter((key) => Object.hasOwn(normalized, key))), params);\n}\n/** The text the database catalog prints for `type` with `params`, in their normal form. */\nfunction renderSqlCatalogText(type, params) {\n\tconst validated = validateSqlTypeParams(type, params);\n\tif (type.sql.claimsKind !== void 0) throw new InternalError(`Data type ${type.id} claims the kind \"${type.sql.claimsKind}\" and has no catalog text.`);\n\tif (type.sql.render !== void 0) return type.sql.render(validated);\n\tconst normalized = type.sql.normalize(validated);\n\treturn substitute(type, pickText(type, \"catalog\", presentKeys(normalized)), normalized);\n}\nfunction prepareReportedText(text) {\n\tlet prepared = \"\";\n\tlet quoted = false;\n\tlet spacePending = false;\n\tfor (const character of text.trim()) {\n\t\tif (!quoted && /\\s/.test(character)) {\n\t\t\tspacePending = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (spacePending && !/[(,]$/.test(prepared) && character !== \")\") prepared += \" \";\n\t\tspacePending = false;\n\t\tif (character === \"\\\"\") quoted = !quoted;\n\t\tprepared += quoted ? character : character.toLowerCase();\n\t}\n\treturn prepared;\n}\nfunction claims(text) {\n\treturn text.catalog === true || text.written !== true;\n}\nfunction claimingTexts(type) {\n\treturn type.sql.texts.filter(claims).map((text) => text.text);\n}\nfunction textsCollide(a, b) {\n\tconst withOnes = (text) => text.replace(PLACEHOLDER, \"1\");\n\treturn patternOf(a).test(withOnes(b)) || patternOf(b).test(withOnes(a));\n}\nfunction collisionBetween(first, second) {\n\tconst kind = first.sql.claimsKind;\n\tif (kind !== void 0 && kind === second.sql.claimsKind) return {\n\t\tby: \"kind\",\n\t\tkind\n\t};\n\tfor (const a of claimingTexts(first)) {\n\t\tconst b = claimingTexts(second).find((text) => textsCollide(a, text));\n\t\tif (b !== void 0) return {\n\t\t\tby: \"text\",\n\t\t\tfirst: a,\n\t\t\tsecond: b\n\t\t};\n\t}\n}\n/**\n* The first two SQL data types in `types` that would both recognise one reported type: a claiming\n* text of each collides, or both claim the same kind. Two texts collide when either one's pattern\n* matches the other with each placeholder written as 1.\n*/\nfunction findSqlDataTypeCollision(types) {\n\tconst sqlTypes = types.filter(isSqlDataType);\n\tfor (const [index, first] of sqlTypes.entries()) for (const second of sqlTypes.slice(index + 1)) {\n\t\tconst claims = collisionBetween(first, second);\n\t\tif (claims !== void 0) return {\n\t\t\tfirst,\n\t\t\tsecond,\n\t\t\tclaims\n\t\t};\n\t}\n}\n/**\n* The data type that claims a reported type, with its parameters in normal form, or undefined when\n* no type in `dataTypes` claims it or its parameters fail the type's schema.\n*/\nfunction resolveReportedSqlType(reported, dataTypes) {\n\tconst sqlTypes = dataTypes.filter(isSqlDataType);\n\tif (reported.kind !== void 0) {\n\t\tconst claimant = sqlTypes.find((type) => type.sql.claimsKind === reported.kind);\n\t\tif (claimant === void 0) return void 0;\n\t\treturn resolvedWith(claimant, claimant.sql.fromReported?.(reported) ?? {});\n\t}\n\tconst text = prepareReportedText(reported.text);\n\tfor (const type of sqlTypes) for (const candidate of type.sql.texts) {\n\t\tif (!claims(candidate)) continue;\n\t\tconst params = paramsMatching(type, candidate, text);\n\t\tif (params !== void 0) return resolvedWith(type, params);\n\t}\n}\nconst signedParamKeysByType = /* @__PURE__ */ new WeakMap();\n/** The parameters of `type` that may be negative, whose placeholders read a leading minus. */\nfunction signedParamKeys(type) {\n\tconst known = signedParamKeysByType.get(type);\n\tif (known !== void 0) return known;\n\tconst keys = schemaKeysAllowing(type.params, -1) ?? [];\n\tsignedParamKeysByType.set(type, keys);\n\treturn keys;\n}\nfunction paramsMatching(type, candidate, text) {\n\tconst match = patternOf(candidate.text, signedParamKeys(type)).exec(text);\n\tif (match === null) return void 0;\n\treturn Object.fromEntries(placeholdersOf(candidate.text).map((name, index) => [name, Number.parseInt(match[index + 1] ?? \"\", 10)]));\n}\n/**\n* Every data type in `dataTypes` that reads `text` as a migration may write it, with its parameters\n* in normal form: any of a type's texts counts, whether written, printed by the catalog or only\n* claimed. Empty when no type reads it or its parameters fail the type's schema. A type that claims\n* a kind has no texts, so it never reads one.\n*/\nfunction resolveWrittenSqlTypes(text, dataTypes) {\n\tconst prepared = prepareReportedText(text);\n\treturn dataTypes.filter(isSqlDataType).flatMap((type) => {\n\t\tfor (const candidate of type.sql.texts) {\n\t\t\tconst params = paramsMatching(type, candidate, prepared);\n\t\t\tif (params === void 0) continue;\n\t\t\tconst resolved = resolvedWith(type, params);\n\t\t\tif (resolved !== void 0) return [resolved];\n\t\t}\n\t\treturn [];\n\t});\n}\nfunction resolvedWith(type$1, params) {\n\tif (type$1.params !== void 0 && type$1.params(params) instanceof type.errors) return void 0;\n\treturn {\n\t\tdataType: type$1,\n\t\ttypeParams: type$1.sql.normalize(params)\n\t};\n}\n//#endregion\nexport { unquotedSqlBaseName as _, renderSqlTypeName as a, sameSqlColumnType as c, sqlColumnLength as d, sqlDataType as f, sqlStorageTypeOfCodec as g, sqlStorageTypeId as h, renderSqlCatalogText as i, sqlBaseName as l, sqlStorageType as m, isSqlDataType as n, resolveReportedSqlType as o, sqlDataTypeOfCodec as p, nameIsCatalogText as r, resolveWrittenSqlTypes as s, findSqlDataTypeCollision as t, sqlCodecColumnLength as u, unquotedSqlBaseNameOfCodec as v, validateSqlTypeParams as y };\n\n//# sourceMappingURL=sql-data-type-D7M-YTTY.mjs.map"],"mappings":";;;;;;;;AAQA,MAAM,cAAc;AACpB,MAAM,qBAAqB;AAC3B,MAAM,iBAAiB;AACvB,SAAS,YAAY,IAAI,QAAQ;CAChC,IAAI,WAAW,KAAK,GAAG,OAAO,CAAC;CAC/B,MAAM,OAAO,iBAAiB,MAAM;CACpC,IAAI,SAAS,KAAK,GAAG,kBAAkB,IAAI,wDAAwD;CACnG,OAAO;AACR;AACA,SAAS,eAAe,MAAM;CAC7B,OAAO,CAAC,GAAG,KAAK,SAAS,WAAW,CAAC,CAAC,CAAC,KAAK,UAAU,MAAM,MAAM,EAAE;AACrE;AACA,SAAS,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O,CAAC;CACT,CAAC;AACF;AACA,SAAS,aAAa,QAAQ,QAAQ;CACrC,IAAI,OAAO,WAAW,KAAK,KAAK,OAAO,OAAO,MAAM,aAAa,KAAK,QAAQ,OAAO,KAAK;CAC1F,OAAO;EACN,UAAU;EACV,YAAY,OAAO,IAAI,UAAU,MAAM;CACxC;AACD"}
@@ -11,7 +11,7 @@ import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components
11
11
  import { Result } from "@prisma/orm-framework/utils/result";
12
12
  import { ContractSpace, ControlAdapterDescriptor, ControlExtensionDescriptor, MigrationOperationPolicy, MigrationPlan, MigrationPlanOperation, MigrationPlannerConflict, MigrationPlannerFailureResult, MigrationPlannerSuccessResult, MigrationRunnerExecutionChecks, MigrationRunnerFailure, MigrationRunnerPerSpaceSuccessValue, MigrationRunnerResult, OpFactoryCall, OperationContext, PlanOrigin, ResolvedMigrationStatement, SchemaDiffIssue, SchemaOwnership } from "@prisma/orm-framework/components/control";
13
13
  import { AggregateMigrationEdgeRef } from "@prisma/orm-toolchain/migration-tools/aggregate";
14
- //#region ../../../2-sql/9-family/dist/types-DKSRuPhK.d.mts
14
+ //#region ../../../2-sql/9-family/dist/types-CI5lled6.d.mts
15
15
  //#region src/core/migrations/types.d.ts
16
16
  type AnyRecord = Readonly<Record<string, unknown>>;
17
17
  interface StorageTypePlanResult<TTargetDetails> {
@@ -407,4 +407,4 @@ interface CreateSqlMigrationPlanOptions<TTargetDetails> {
407
407
  }
408
408
  //#endregion
409
409
  export { SqlPlannerConflict as C, SqlPlannerResult as D, SqlPlannerFailureResult as E, SqlPlannerSuccessResult as O, SqlPlanTargetDetails as S, SqlPlannerConflictLocation as T, SqlMigrationRunnerExecuteCallbacks as _, ResolveIdentityValueInput as a, SqlMigrationRunnerResult as b, SqlMigrationPlan as c, SqlMigrationPlanOperationStep as d, SqlMigrationPlanOperationTarget as f, SqlMigrationRunnerErrorCode as g, SqlMigrationRunner as h, FieldEventContext as i, StorageTypePlanResult as k, SqlMigrationPlanContractInfo as l, SqlMigrationPlannerPlanOptions as m, CreateSqlMigrationPlanOptions as n, SqlControlAdapterDescriptor as o, SqlMigrationPlanner as p, FieldEvent as r, SqlControlExtensionDescriptor as s, CodecControlHooks as t, SqlMigrationPlanOperation as u, SqlMigrationRunnerExecuteOptions as v, SqlPlannerConflictKind as w, SqlMigrationRunnerSuccessValue as x, SqlMigrationRunnerFailure as y };
410
- //# sourceMappingURL=types-DKSRuPhK-DuxW_ceI.d.mts.map
410
+ //# sourceMappingURL=types-CI5lled6-CDV4aYNB.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-DKSRuPhK-DuxW_ceI.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/types-DKSRuPhK.d.mts"],"mappings":";;;;;;;;;;;;;;;KAUK,YAAY,SAAS;UAChB,sBAAsB;WACrB,qBAAqB,0BAA0B;;;;;;;;;UAShD;;WAEC;WACA;WACA,aAAa;;;;;;;;;;;;;;;;KAgBnB;;;;;;;;;;;;;UAaK;WACC;WACA;WACA;WACA,aAAa;WACb,WAAW;WACX,aAAa;WACb,WAAW;;UAEZ,kBAAkB;;;;;;;;;EAS1B,sBAAsB;aACX;aACA,cAAc;aACd,UAAU,SAAS;aACnB,QAAQ;aACR;aACA,QAAQ;QACb,sBAAsB;EAC5B,cAAc;aACH;aACA,cAAc;aACd,QAAQ;aACR;iBACI;EACf,mBAAmB;aACR,QAAQ;aACR;QACL,QAAQ,eAAe;;;;;;;;;;EAU7B,wBAAwB,OAAO;;;;;;;;;;;;;;;EAe/B,gBAAgB,OAAO,YAAY,KAAK,+BAA+B;;UAE/D,8BAA8B,kCAAkC,kCAAkC;WACjG,wBAAwB;;;;;;;;;;;;WAYxB,gBAAgB,cAAc,SAAS;;UAExC,4BAA4B,kCAAkC,gCAAgC,WAAW,kBAAkB;WAC1H,wBAAwB;;UAEzB;WACC;WACA;;;;;;;;;WASA;WACA,OAAO;;;;;;;;;UASR;WACC;WACA;;UAED,gCAAgC;WAC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;MACvE,QAAQ;;;;;;;;;;;EAWZ,oBAAoB,SAAS,iCAAiC,kBAAkB,QAAQ;;UAEhF,8BAA8B;WAC7B;;;;WAIA;WACA,SAAS;WACT,aAAa;WACb,qBAAqB,0BAA0B;;;;;;WAM/C;WACA,OAAO"}
1
+ {"version":3,"file":"types-CI5lled6-CDV4aYNB.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/types-CI5lled6.d.mts"],"mappings":";;;;;;;;;;;;;;;KAUK,YAAY,SAAS;UAChB,sBAAsB;WACrB,qBAAqB,0BAA0B;;;;;;;;;UAShD;;WAEC;WACA;WACA,aAAa;;;;;;;;;;;;;;;;KAgBnB;;;;;;;;;;;;;UAaK;WACC;WACA;WACA;WACA,aAAa;WACb,WAAW;WACX,aAAa;WACb,WAAW;;UAEZ,kBAAkB;;;;;;;;;EAS1B,sBAAsB;aACX;aACA,cAAc;aACd,UAAU,SAAS;aACnB,QAAQ;aACR;aACA,QAAQ;QACb,sBAAsB;EAC5B,cAAc;aACH;aACA,cAAc;aACd,QAAQ;aACR;iBACI;EACf,mBAAmB;aACR,QAAQ;aACR;QACL,QAAQ,eAAe;;;;;;;;;;EAU7B,wBAAwB,OAAO;;;;;;;;;;;;;;;EAe/B,gBAAgB,OAAO,YAAY,KAAK,+BAA+B;;UAE/D,8BAA8B,kCAAkC,kCAAkC;WACjG,wBAAwB;;;;;;;;;;;;WAYxB,gBAAgB,cAAc,SAAS;;UAExC,4BAA4B,kCAAkC,gCAAgC,WAAW,kBAAkB;WAC1H,wBAAwB;;UAEzB;WACC;WACA;;;;;;;;;WASA;WACA,OAAO;;;;;;;;;UASR;WACC;WACA;;UAED,gCAAgC;WAC/B;WACA,UAAU;;UAEX,0BAA0B,wBAAwB;WACjD;WACA,QAAQ,gCAAgC;WACxC,mBAAmB;WACnB,kBAAkB;WAClB,oBAAoB;WACpB,OAAO;;UAER;WACC;WACA;;UAED,iBAAiB,wBAAwB;;;;;;;;;;;;;;;WAexC;;;;;WAKA,SA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1
1
  import { t as contractError } from "./contract-errors-BCN6RVI5-5IHBF_lg.mjs";
2
2
  import { a as computeIndexContentHash, i as computeCheckContentHash } from "./naming-bM5qm5PY-DdginUhA.mjs";
3
- import { c as sameSqlColumnType } from "./sql-data-type-D5cI3M07-DIcPP8s1.mjs";
3
+ import { c as sameSqlColumnType } from "./sql-data-type-D7M-YTTY-C9oWGZ3z.mjs";
4
4
  import { f as composeSqlEntityKinds } from "./entity-kinds-CQ_jwgYv-DoOBWwvX.mjs";
5
5
  import { a as sameColumns$1, s as startsWithColumns } from "./index-equivalence-DswCiq5l-D5VK0qTy.mjs";
6
6
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
@@ -769,4 +769,4 @@ function validateRelationThroughConsistency(contract, dataTypes) {
769
769
  //#endregion
770
770
  export { createSqlStorageSchema as a, validateExecutionDefaultsTargetMappedColumns as c, validateRelationJoinFields as d, validateSqlContractFully as f, valueObjectStorageTypeMissingMessage as g, validateStorageSemantics as h, createSqlContractSchema as i, validateModel as l, validateStorage as m, checkSqlDefaultText as n, reservedSqlDefaultText as o, validateSqlStorageConsistency as p, createNamespaceEntrySchema as r, resolveSqlToOneRelationStorage as s, ContractEnumSchema as t, validateModelStorageReferences as u };
771
771
 
772
- //# sourceMappingURL=validators-BlONfdFH.mjs.map
772
+ //# sourceMappingURL=validators-Cfy0jmZ2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"validators-BlONfdFH.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/validators.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { c as sameSqlColumnType } from \"./sql-data-type-D5cI3M07.mjs\";\nimport { a as ColumnDefaultFunctionSchema, c as ForeignKeyReferenceSchema, d as IndexSchema, f as ReferentialActionSchema, i as CheckConstraintSchema, l as ForeignKeySchema, m as StorageValueSetSchema, o as ColumnDefaultLiteralSchema, p as StorageTableSchema, s as ColumnDefaultSchema, t as composeSqlEntityKinds, u as ForeignKeySourceSchema } from \"./entity-kinds-CQ_jwgYv.mjs\";\nimport { a as sameColumns$1, s as startsWithColumns } from \"./index-equivalence-DswCiq5l.mjs\";\nimport { computeCheckContentHash, computeIndexContentHash } from \"@internal/sql-schema-ir/naming\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { isPlainRecord } from \"@internal/framework-components/ir\";\nimport { DATA_TYPE_ID_PATTERN, createDataTypeLookup } from \"@internal/framework-components/codec\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { type } from \"arktype\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { ContractExecutionSectionSchema, CrossReferenceSchema } from \"@internal/contract/types\";\nimport { validateContractDomain } from \"@internal/contract/validate-domain\";\n//#region src/default-sql-text.ts\nconst UNSAFE_DEFAULT_TEXT = /;|--|\\/\\*|\\$\\$|\\bSELECT\\b/i;\n/** Returns undefined when the text may be rendered as `DEFAULT (<text>)`, else the reason. */\nfunction checkSqlDefaultText(text) {\n\treturn UNSAFE_DEFAULT_TEXT.test(text) ? \"Default SQL must not contain semicolons, SQL comment tokens, dollar-quoting, or subqueries.\" : void 0;\n}\n/**\n* Names the Prisma default function that raw SQL text is exactly, ignoring surrounding whitespace. The planners treat the contract expressions `now()` and `autoincrement()` as those functions, so raw SQL with that text would not be used as written.\n*/\nfunction reservedSqlDefaultText(text) {\n\tswitch (text.trim()) {\n\t\tcase \"now()\": return \"now\";\n\t\tcase \"autoincrement()\": return \"autoincrement\";\n\t\tdefault: return;\n\t}\n}\n//#endregion\n//#region src/relation-storage.ts\nfunction sameColumns(left, right) {\n\treturn left.length === right.length && left.every((column, index) => column === right[index]);\n}\n/**\n* The storage facts behind a same-space to-one relation's nullability: which side owns the\n* foreign key, and whether each local column is nullable.\n*/\nfunction resolveSqlToOneRelationStorage(contract, modelStorage, relation) {\n\tconst table = blindCast(contract.storage.namespaces[modelStorage.namespaceId]?.entries.table?.[modelStorage.table]);\n\tconst columns = relation.on.localFields.map((fieldName) => {\n\t\tconst columnName = modelStorage.fields[fieldName]?.column;\n\t\tconst column = columnName === void 0 ? void 0 : table?.columns[columnName];\n\t\treturn {\n\t\t\tname: columnName ?? fieldName,\n\t\t\tnullable: column?.nullable ?? true\n\t\t};\n\t});\n\tconst columnNames = columns.map((column) => column.name);\n\treturn {\n\t\townsForeignKey: relation.cardinality === \"N:1\" || (table?.foreignKeys ?? []).some((foreignKey) => sameColumns(foreignKey.source.columns, columnNames)),\n\t\tcolumns\n\t};\n}\n//#endregion\n//#region src/validators.ts\nconst ControlPolicySchema = type(\"'managed' | 'tolerated' | 'external' | 'observed'\");\nconst DomainEnumRefSchema = type({\n\tplane: \"'domain'\",\n\tnamespaceId: \"string\",\n\tentityKind: \"'enum'\",\n\tentityName: \"string\",\n\t\"spaceId?\": \"string\"\n});\n/** Document-scoped `storage.types`: codec triples only. */\nconst DocumentScopedStorageTypeSchema = type.declare().type({\n\tkind: \"'codec-instance'\",\n\tcodecId: \"string\",\n\tdataType: DATA_TYPE_ID_PATTERN,\n\t\"typeParams?\": \"Record<string, unknown>\"\n});\n/**\n* Domain enum entry under `domain.namespaces[id].enum[name]`.\n* Carries the codec id and an ordered `members` array of `{name, value}` pairs.\n*/\nconst ContractEnumSchema = type({\n\t\"+\": \"reject\",\n\tcodecId: \"string\",\n\tmembers: type({\n\t\tname: \"string\",\n\t\tvalue: \"string | number | boolean | null | unknown[] | Record<string, unknown>\"\n\t}).array().readonly()\n});\n/**\n* Derives a schema map from a descriptor map: maps each kind's key to its\n* `schema` field. Used by validation functions to validate entries.\n*/\nfunction schemaViewOf(kinds) {\n\treturn new Map([...kinds].map(([k, d]) => [k, d.schema]));\n}\nconst DEFAULT_SQL_KINDS = composeSqlEntityKinds();\n/**\n* Builds the per-namespace entry schema for `storage.namespaces[id]`.\n*\n* Validation is descriptor-driven: the `kinds` map carries both the schema\n* (used here for structural validation) and the construct function (used at\n* hydration time). An unregistered key fails validation naming the kind and\n* the namespace id, so validation fails closed.\n*/\nfunction createNamespaceEntrySchema(kinds) {\n\tconst schemas = schemaViewOf(kinds);\n\tconst knownKinds = new Set(kinds.keys());\n\treturn type({\n\t\t\"+\": \"reject\",\n\t\tid: \"string\",\n\t\t\"kind?\": \"string\",\n\t\tentries: \"object\"\n\t}).narrow((ns, ctx) => {\n\t\tif (!isPlainRecord(ns.entries)) return ctx.mustBe(\"an entries object\");\n\t\tfor (const [key, innerMap] of Object.entries(ns.entries)) {\n\t\t\tif (!knownKinds.has(key)) return ctx.reject({ expected: `entries key \"${key}\" in namespace \"${ns.id}\" is not a registered entity kind` });\n\t\t\tif (!isPlainRecord(innerMap)) return ctx.reject({ expected: `entries[\"${key}\"] in namespace \"${ns.id}\" must be an object` });\n\t\t\tconst entrySchema = blindCast(schemas.get(key));\n\t\t\tfor (const [, value] of Object.entries(innerMap)) {\n\t\t\t\tconst parsed = entrySchema(value);\n\t\t\t\tif (parsed instanceof type.errors) return ctx.reject({ expected: parsed.summary });\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n}\n/**\n* Builds the storage schema. Pack contributions reach the per-namespace\n* entry shape through {@link createNamespaceEntrySchema}; the\n* document-scoped `storage.types` field (codec triples only) and the\n* storage hash stay family-shared.\n*/\nfunction createSqlStorageSchema(kinds) {\n\tconst namespaceEntry = createNamespaceEntrySchema(kinds);\n\treturn type({\n\t\t\"+\": \"reject\",\n\t\tstorageHash: \"string\",\n\t\t\"types?\": type({ \"[string]\": DocumentScopedStorageTypeSchema }),\n\t\t\"namespaces?\": type({ \"[string]\": namespaceEntry })\n\t});\n}\nconst StorageSchema = createSqlStorageSchema(DEFAULT_SQL_KINDS);\n/** The refusal of a value-object column when the stack declares no value-object storage type. */\nfunction valueObjectStorageTypeMissingMessage(columnPath) {\n\treturn `${columnPath}: a value-object column needs the stack's value-object storage type, and the stack declares none`;\n}\nconst LISTED_REMOVED_KEYS = 5;\nfunction fieldOf(value, key) {\n\treturn isPlainRecord(value) ? value[key] : void 0;\n}\nfunction entriesOf(value) {\n\treturn isPlainRecord(value) ? Object.entries(value) : [];\n}\nfunction storedColumnEntries(storage) {\n\treturn entriesOf(fieldOf(storage, \"namespaces\")).flatMap(([namespaceId, namespace]) => entriesOf(fieldOf(fieldOf(namespace, \"entries\"), \"table\")).flatMap(([tableName, table]) => entriesOf(fieldOf(table, \"columns\")).map(([columnName, column]) => ({\n\t\tpath: `storage.namespaces.${namespaceId}.entries.table.${tableName}.columns.${columnName}`,\n\t\tentry: column\n\t}))));\n}\nfunction pathsHolding(entries, key) {\n\treturn entries.filter(({ entry }) => isPlainRecord(entry) && Object.hasOwn(entry, key)).map(({ path }) => path);\n}\nfunction listedProblems(paths, describe) {\n\tconst listed = paths.slice(0, LISTED_REMOVED_KEYS).map(describe);\n\tconst unlisted = paths.length - listed.length;\n\treturn unlisted > 0 ? [...listed, `and ${unlisted} more ${unlisted === 1 ? \"path\" : \"paths\"} (${paths.length} in all)`] : listed;\n}\n/**\n* Contracts emitted before a column named its data type stored the database type name in `nativeType` on columns and `storage.types` entries. The first five such keys are reported with their paths and the rest are counted, so an old contract is refused with a short message that says what changed.\n*/\nfunction storedTypeNameProblems(storage) {\n\tconst types = entriesOf(fieldOf(storage, \"types\")).map(([typeName, entry]) => ({\n\t\tpath: `storage.types.${typeName}`,\n\t\tentry\n\t}));\n\treturn listedProblems(pathsHolding([...storedColumnEntries(storage), ...types], \"nativeType\"), (path) => `${path}.nativeType: contracts no longer store a column's database type name; the column names its data type in \"dataType\"`);\n}\n/**\n* Contracts emitted before generated checks became mandatory stored the checks a column waived in `noCheck`. One sentence says what to do, followed by the first five such columns and a count of the rest.\n*/\nfunction checkWaiverProblems(storage) {\n\tconst paths = pathsHolding(storedColumnEntries(storage), \"noCheck\");\n\tif (paths.length === 0) return [];\n\tconst listed = paths.slice(0, LISTED_REMOVED_KEYS).map((path) => `${path}.noCheck`);\n\tconst unlisted = paths.length - listed.length;\n\tconst more = unlisted > 0 ? `, and ${unlisted} more (${paths.length} in all)` : \"\";\n\treturn [`contracts no longer store check waivers in \"noCheck\", so re-emit the contract from its source, or rewrite a stored contract such as a migration snapshot with remove-nocheck.ts, which ships in the remove-nocheck scripts of the Prisma 8 upgrade guide. Columns: ${listed.join(\", \")}${more}`];\n}\n/** The removed keys of the oldest format the contract is in: a contract that still stores `nativeType` is refused for that first, since its `noCheck` keys are rewritten at a later step of the upgrade. */\nfunction removedKeyProblems(storage) {\n\tconst storedTypeNames = storedTypeNameProblems(storage);\n\treturn storedTypeNames.length > 0 ? storedTypeNames : checkWaiverProblems(storage);\n}\n/**\n* Any entries entity that declares both a `tableName` and a physical `name`\n* (e.g. a target's RLS policy entities) shares one physical-name space per\n* table: two such entries of one kind on the same table would collide as\n* DDL (`CREATE POLICY \"<name>\" ON <table>` fails on the second), while the\n* same name on different tables is legal. Structural — no entry-kind\n* vocabulary; `table` entries are keyed by name already and are excluded.\n*/\nfunction validateTableScopedEntryNames(storage, errors) {\n\tfor (const [namespaceId, ns] of Object.entries(storage.namespaces)) {\n\t\tif (!isPlainRecord(ns.entries)) continue;\n\t\tfor (const [entriesKind, slot] of Object.entries(ns.entries)) {\n\t\t\tif (entriesKind === \"table\" || !isPlainRecord(slot)) continue;\n\t\t\tconst seen = /* @__PURE__ */ new Map();\n\t\t\tfor (const entity of Object.values(slot)) {\n\t\t\t\tif (typeof entity !== \"object\" || entity === null) continue;\n\t\t\t\tconst record = blindCast(entity);\n\t\t\t\tconst name = record[\"name\"];\n\t\t\t\tconst tableName = record[\"tableName\"];\n\t\t\t\tif (typeof name !== \"string\" || typeof tableName !== \"string\") continue;\n\t\t\t\tconst key = JSON.stringify([tableName, name]);\n\t\t\t\tseen.set(key, (seen.get(key) ?? 0) + 1);\n\t\t\t\tif (seen.get(key) === 2) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": ${entriesKind} \"${name}\" is declared multiple times`);\n\t\t\t}\n\t\t}\n\t}\n}\nfunction eachStorageTable(storage) {\n\treturn Object.entries(storage.namespaces).flatMap(([namespaceId, ns]) => Object.entries(ns.entries[\"table\"] ?? {}).map(([tableName, table]) => ({\n\t\tnamespaceId,\n\t\ttableName,\n\t\ttable\n\t})));\n}\nfunction findDuplicateValue(values) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const value of values) {\n\t\tif (seen.has(value)) return value;\n\t\tseen.add(value);\n\t}\n}\n/** A column may appear at most once in one index's element tuple. */\nfunction rejectRepeatedIndexColumns(indexes, coordinate, errors) {\n\tfor (const index of indexes) {\n\t\tconst duplicateColumn = findDuplicateValue(index.columns ?? []);\n\t\tif (duplicateColumn !== void 0) errors.push(`${coordinate}: index contains duplicate column \"${duplicateColumn}\"`);\n\t}\n}\n/**\n* Two wire-named indexes with the same content are one index written twice —\n* the content hash is their identity, so neither spelling can survive. An\n* exact-named index is identified by its name instead, so content twins under\n* two names are legal and a repeated name is rejected by the named-object\n* check.\n*/\nfunction rejectDuplicateWireNamedIndexContent(indexes, coordinate, errors) {\n\tconst seenContent = /* @__PURE__ */ new Set();\n\tfor (const index of indexes) {\n\t\tif (index.prefix === void 0) continue;\n\t\tconst content = computeIndexContentHash(index);\n\t\tif (seenContent.has(content)) {\n\t\t\terrors.push(`${coordinate}: duplicate index definition on columns [${(index.columns ?? []).join(\", \")}]`);\n\t\t\tcontinue;\n\t\t}\n\t\tseenContent.add(content);\n\t}\n}\n/**\n* Two wire-named checks with the same predicate are one check written twice —\n* the content hash is their identity, so neither spelling can survive, and\n* whitespace variants of one predicate collapse onto the same hash. An\n* exact-named check is identified by its name instead, so content twins under\n* two names are legal (the legacy shape a database adopts from) and a repeated\n* name is rejected by the named-object check.\n*/\nfunction rejectDuplicateWireNamedCheckContent(checks, coordinate, errors) {\n\tconst seenContent = /* @__PURE__ */ new Set();\n\tfor (const check of checks) {\n\t\tif (check.prefix === void 0) continue;\n\t\tconst content = computeCheckContentHash(check.expression);\n\t\tif (seenContent.has(content)) {\n\t\t\terrors.push(`${coordinate}: duplicate check constraint definition (expression \"${check.expression}\")`);\n\t\t\tcontinue;\n\t\t}\n\t\tseenContent.add(content);\n\t}\n}\nfunction isContractFieldType(value) {\n\tif (!isPlainRecord(value)) return false;\n\tconst kind = value[\"kind\"];\n\tif (kind === \"scalar\") {\n\t\tif (typeof value[\"codecId\"] !== \"string\") return false;\n\t\tconst typeParams = value[\"typeParams\"];\n\t\tif (typeParams !== void 0 && !isPlainRecord(typeParams)) return false;\n\t\treturn true;\n\t}\n\tif (kind === \"valueObject\") return typeof value[\"name\"] === \"string\";\n\tif (kind === \"union\") {\n\t\tconst members = value[\"members\"];\n\t\tif (!Array.isArray(members)) return false;\n\t\treturn members.every((m) => isContractFieldType(m));\n\t}\n\treturn false;\n}\nconst ModelFieldSchema = type({\n\t\"+\": \"reject\",\n\tnullable: \"boolean\",\n\ttype: type(\"unknown\").narrow((value, ctx) => isContractFieldType(value) ? true : ctx.mustBe(\"scalar, valueObject, or union field type\")),\n\tmany: type(\"false\").or({\n\t\t\"+\": \"reject\",\n\t\telementNullable: \"boolean\"\n\t}).default(false),\n\t\"dict?\": \"true\",\n\t\"valueSet?\": DomainEnumRefSchema\n});\nconst ModelStorageSchema = type({\n\ttable: \"string\",\n\tnamespaceId: \"string\",\n\tfields: type({ \"[string]\": type({\n\t\tcolumn: \"string\",\n\t\t\"codecId?\": \"string\",\n\t\t\"nullable?\": \"boolean\"\n\t}) })\n});\nconst ContractRelationThroughSchema = type({\n\t\"+\": \"reject\",\n\ttable: \"string\",\n\tnamespaceId: \"string\",\n\tparentColumns: type.string.array().readonly(),\n\tchildColumns: type.string.array().readonly(),\n\ttargetColumns: type.string.array().readonly()\n});\nconst ContractRelationOnSchema = type({\n\t\"+\": \"reject\",\n\tlocalFields: type.string.array().readonly(),\n\ttargetFields: type.string.array().readonly()\n});\nconst ContractManyToManyRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'N:M'\",\n\ton: ContractRelationOnSchema,\n\tthrough: ContractRelationThroughSchema\n});\nconst ContractToOneRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:1' | 'N:1'\",\n\t\"nullable?\": \"boolean\",\n\ton: ContractRelationOnSchema\n});\nconst ContractToManyRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:N'\",\n\ton: ContractRelationOnSchema\n});\nconst ContractReferenceRelationSchema = ContractManyToManyRelationSchema.or(ContractToOneRelationSchema).or(ContractToManyRelationSchema);\nconst ContractEmbedRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:1' | '1:N'\"\n});\nconst ContractRelationSchema = ContractReferenceRelationSchema.or(ContractEmbedRelationSchema);\nconst ModelSchema = type({\n\tstorage: ModelStorageSchema,\n\t\"fields?\": type({ \"[string]\": ModelFieldSchema }),\n\t\"relations?\": type({ \"[string]\": ContractRelationSchema }),\n\t\"discriminator?\": type({ field: \"string\" }),\n\t\"variants?\": type({ \"[string]\": CrossReferenceSchema }),\n\t\"base?\": CrossReferenceSchema,\n\t\"owner?\": \"string\"\n});\nconst ContractMetaSchema = type({ \"[string]\": \"unknown\" });\n/**\n* Builds the full SQL contract schema. The storage subtree threads\n* pack contributions through {@link createSqlStorageSchema}; the rest\n* of the contract envelope is family-shared.\n*/\nfunction createSqlContractSchema(kinds) {\n\tconst storage = createSqlStorageSchema(kinds);\n\treturn type({\n\t\t\"+\": \"reject\",\n\t\ttarget: \"string\",\n\t\ttargetFamily: \"'sql'\",\n\t\t\"coreHash?\": \"string\",\n\t\tprofileHash: \"string\",\n\t\t\"capabilities?\": \"Record<string, Record<string, boolean>>\",\n\t\t\"extensions?\": \"Record<string, unknown>\",\n\t\t\"meta?\": ContractMetaSchema,\n\t\t\"defaultControlPolicy?\": ControlPolicySchema,\n\t\t\"roots?\": type({ \"[string]\": CrossReferenceSchema }),\n\t\tdomain: type({ namespaces: type({ \"[string]\": type({\n\t\t\tmodels: type({ \"[string]\": ModelSchema }),\n\t\t\t\"valueObjects?\": type({ \"[string]\": type({ fields: type({ \"[string]\": ModelFieldSchema }) }) }),\n\t\t\t\"enum?\": type({ \"[string]\": ContractEnumSchema })\n\t\t}) }) }),\n\t\tstorage,\n\t\t\"execution?\": ContractExecutionSectionSchema\n\t});\n}\nconst SqlContractSchema = createSqlContractSchema(DEFAULT_SQL_KINDS);\n/**\n* Validates the structural shape of SqlStorage using Arktype. Pure\n* structural check: namespace IR is never materialized here (that needs\n* a target concretion via the serializer hydration path), so this throws\n* on invalid input and constructs nothing.\n*\n* @param value - The storage value to validate\n* @throws Error if the storage structure is invalid\n*/\nfunction validateStorage(value) {\n\tconst removedKeys = removedKeyProblems(value);\n\tconst result = StorageSchema(value);\n\tconst errors = removedKeys.length > 0 ? [...removedKeys] : result instanceof type.errors ? result.map((p) => p.message) : [];\n\tif (errors.length > 0) throw contractError(\"CONTRACT.VALIDATION_FAILED\", `Storage validation failed: ${errors.join(\"; \")}`, { meta: { errors } });\n}\nfunction validateModel(value) {\n\tconst result = ModelSchema(value);\n\tif (result instanceof type.errors) {\n\t\tconst errors = result.map((p) => p.message);\n\t\tthrow contractError(\"CONTRACT.VALIDATION_FAILED\", `Model validation failed: ${errors.join(\"; \")}`, { meta: { errors } });\n\t}\n\treturn result;\n}\n/**\n* Structural arktype validation of an SQL contract envelope. Internal\n* helper for {@link validateSqlContractFully} — exposed only inside\n* this module, since the family seam-of-record is the\n* `SqlContractSerializerBase.deserializeContract` SPI.\n*/\nfunction validateSqlContractStructure(value, contractSchema) {\n\tif (typeof value !== \"object\" || value === null) throw new ContractValidationError(\"Contract structural validation failed: value must be an object\", \"structural\");\n\tconst targetFamily = \"targetFamily\" in value ? value.targetFamily : void 0;\n\tif (targetFamily !== void 0 && targetFamily !== \"sql\") throw new ContractValidationError(`Unsupported target family: ${targetFamily}`, \"structural\");\n\tconst removedKeys = removedKeyProblems(fieldOf(value, \"storage\"));\n\tif (removedKeys.length > 0) throw new ContractValidationError(`Contract structural validation failed: ${removedKeys.join(\"; \")}`, \"structural\");\n\tconst contractResult = contractSchema(value);\n\tif (contractResult instanceof type.errors) throw new ContractValidationError(`Contract structural validation failed: ${contractResult.map((p) => p.message).join(\"; \")}`, \"structural\");\n\treturn blindCast(contractResult);\n}\nfunction foreignKeyBackingError(table, fk) {\n\tconst { index } = fk;\n\tif (index === void 0) return void 0;\n\tconst columns = fk.source.columns;\n\tif (\"name\" in index) {\n\t\tconst named = table.indexes.find((candidate) => candidate.name === index.name);\n\t\tif (named === void 0) return `is indexed by \"${index.name}\", but the table has no index with that name`;\n\t\treturn named.columns !== void 0 && startsWithColumns(named.columns, columns) ? void 0 : `is indexed by \"${index.name}\", but that index does not start with those columns`;\n\t}\n\tif (\"primaryKey\" in index) return table.primaryKey !== void 0 && startsWithColumns(table.primaryKey.columns, columns) ? void 0 : \"is indexed by the primary key, but the table's primary key does not start with those columns\";\n\tconst described = `the unique constraint on [${index.unique.join(\", \")}]`;\n\tif (!table.uniques.some((unique) => sameColumns$1(unique.columns, index.unique))) return `is indexed by ${described}, but the table has no unique constraint on those columns`;\n\treturn startsWithColumns(index.unique, columns) ? void 0 : `is indexed by ${described}, which does not start with those columns`;\n}\n/**\n* Validates semantic constraints on SqlStorage that cannot be expressed in Arktype schemas.\n*\n* Returns an array of human-readable error strings. Empty array = valid.\n*\n* Currently checks:\n* - duplicate named primary key / unique / index / foreign key objects within a table\n* - duplicate unique, index, or foreign key declarations within a table\n* - duplicate columns within primary key / unique / index definitions\n* - nullable columns in primary key definitions\n* - `setNull` referential action on a non-nullable FK column (would fail at runtime)\n* - `setDefault` referential action on a non-nullable FK column without a DEFAULT (would fail at runtime)\n* - a foreign key whose `index` is an index, primary key or unique constraint its table does not have\n*/\nfunction validateStorageSemantics(storage) {\n\tconst errors = [];\n\tvalidateTableScopedEntryNames(storage, errors);\n\tfor (const { namespaceId, tableName, table: rawTable } of eachStorageTable(storage)) {\n\t\tconst table = blindCast(rawTable);\n\t\tconst namedObjects = /* @__PURE__ */ new Map();\n\t\tconst registerNamedObject = (kind, name) => {\n\t\t\tif (!name) return;\n\t\t\tnamedObjects.set(name, [...namedObjects.get(name) ?? [], kind]);\n\t\t};\n\t\tregisterNamedObject(\"primary key\", table.primaryKey?.name);\n\t\tfor (const unique of table.uniques) registerNamedObject(\"unique constraint\", unique.name);\n\t\tfor (const index of table.indexes) registerNamedObject(\"index\", index.name);\n\t\tfor (const fk of table.foreignKeys) registerNamedObject(\"foreign key\", fk.name);\n\t\tfor (const check of table.checks ?? []) registerNamedObject(\"check constraint\", check.name);\n\t\tfor (const [name, kinds] of namedObjects) if (kinds.length > 1) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": named object \"${name}\" is declared multiple times (${kinds.join(\", \")})`);\n\t\tif (table.primaryKey) {\n\t\t\tconst duplicateColumn = findDuplicateValue(table.primaryKey.columns);\n\t\t\tif (duplicateColumn !== void 0) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": primary key contains duplicate column \"${duplicateColumn}\"`);\n\t\t\tfor (const columnName of table.primaryKey.columns) if (table.columns[columnName]?.nullable === true) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": primary key column \"${columnName}\" is nullable; primary key columns must be NOT NULL`);\n\t\t}\n\t\tconst seenUniqueDefinitions = /* @__PURE__ */ new Set();\n\t\tfor (const unique of table.uniques) {\n\t\t\tconst duplicateColumn = findDuplicateValue(unique.columns);\n\t\t\tif (duplicateColumn !== void 0) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": unique constraint contains duplicate column \"${duplicateColumn}\"`);\n\t\t\tconst signature = JSON.stringify({ columns: unique.columns });\n\t\t\tif (seenUniqueDefinitions.has(signature)) {\n\t\t\t\terrors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": duplicate unique constraint definition on columns [${unique.columns.join(\", \")}]`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseenUniqueDefinitions.add(signature);\n\t\t}\n\t\tconst tableCoordinate = `Namespace \"${namespaceId}\" table \"${tableName}\"`;\n\t\trejectRepeatedIndexColumns(table.indexes, tableCoordinate, errors);\n\t\trejectDuplicateWireNamedIndexContent(table.indexes, tableCoordinate, errors);\n\t\tfor (const fk of table.foreignKeys) {\n\t\t\tconst error = foreignKeyBackingError(table, fk);\n\t\t\tif (error !== void 0) errors.push(`${tableCoordinate}: foreign key on columns [${fk.source.columns.join(\", \")}] ${error}`);\n\t\t}\n\t\tconst seenForeignKeyDefinitions = /* @__PURE__ */ new Set();\n\t\tfor (const fk of table.foreignKeys) {\n\t\t\tconst signature = JSON.stringify({\n\t\t\t\tsource: fk.source,\n\t\t\t\ttarget: fk.target,\n\t\t\t\tonDelete: fk.onDelete ?? null,\n\t\t\t\tonUpdate: fk.onUpdate ?? null\n\t\t\t});\n\t\t\tif (seenForeignKeyDefinitions.has(signature)) {\n\t\t\t\terrors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": duplicate foreign key definition on columns [${fk.source.columns.join(\", \")}]`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseenForeignKeyDefinitions.add(signature);\n\t\t}\n\t\tfor (const fk of table.foreignKeys) for (const colName of fk.source.columns) {\n\t\t\tconst column = table.columns[colName];\n\t\t\tif (!column) continue;\n\t\t\tif (fk.onDelete === \"setNull\" && !column.nullable) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": onDelete setNull on foreign key column \"${colName}\" which is NOT NULL`);\n\t\t\tif (fk.onUpdate === \"setNull\" && !column.nullable) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": onUpdate setNull on foreign key column \"${colName}\" which is NOT NULL`);\n\t\t\tif (fk.onDelete === \"setDefault\" && !column.nullable && column.default === void 0) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": onDelete setDefault on foreign key column \"${colName}\" which is NOT NULL and has no DEFAULT`);\n\t\t\tif (fk.onUpdate === \"setDefault\" && !column.nullable && column.default === void 0) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": onUpdate setDefault on foreign key column \"${colName}\" which is NOT NULL and has no DEFAULT`);\n\t\t}\n\t\trejectDuplicateWireNamedCheckContent(table.checks ?? [], tableCoordinate, errors);\n\t}\n\treturn errors;\n}\n/**\n* SQL storage logical-consistency checks: every model.storage.table resolves to a real table, every domain field has a model.storage.fields entry, and every model.storage.fields[*].column resolves to a real column. Throws `ContractValidationError` on the first mismatch.\n*/\nfunction validateModelStorageReferences(contract) {\n\tfor (const [namespaceId, namespace] of Object.entries(contract.domain.namespaces)) for (const [modelName, model] of Object.entries(namespace.models)) {\n\t\tconst modelStorage = blindCast(model.storage);\n\t\tconst qualifiedName = `${namespaceId}:${modelName}`;\n\t\tconst storageNamespaceId = modelStorage.namespaceId;\n\t\tif (storageNamespaceId !== namespaceId) throw new ContractValidationError(`Model \"${qualifiedName}\" storage.namespaceId \"${storageNamespaceId}\" does not match domain namespace \"${namespaceId}\"`, \"storage\");\n\t\tconst storageTable = modelStorage.table;\n\t\tconst rawTable = contract.storage.namespaces[storageNamespaceId]?.entries.table?.[storageTable];\n\t\tif (rawTable === void 0) throw new ContractValidationError(`Model \"${qualifiedName}\" references non-existent table \"${storageNamespaceId}.${storageTable}\"`, \"storage\");\n\t\tconst table = blindCast(rawTable);\n\t\tfor (const fieldName of Object.keys(model.fields)) if (!Object.hasOwn(modelStorage.fields, fieldName)) throw new ContractValidationError(`Model \"${qualifiedName}\" field \"${fieldName}\" has no entry in storage.fields, so no column holds it`, \"storage\");\n\t\tconst columnNames = new Set(Object.keys(table.columns));\n\t\tfor (const [fieldName, field] of Object.entries(modelStorage.fields)) if (!columnNames.has(field.column)) throw new ContractValidationError(`Model \"${qualifiedName}\" field \"${fieldName}\" references non-existent column \"${field.column}\" in table \"${storageTable}\"`, \"storage\");\n\t}\n}\n/** The names of a model's own fields and of the fields it inherits from its base models. */\nfunction fieldNamesWithInherited(contract, namespaceId, modelName) {\n\tconst names = /* @__PURE__ */ new Set();\n\tconst seen = /* @__PURE__ */ new Set();\n\tlet coordinate = {\n\t\tnamespace: namespaceId,\n\t\tmodel: modelName\n\t};\n\twhile (coordinate !== void 0) {\n\t\tconst key = JSON.stringify([coordinate.namespace, coordinate.model]);\n\t\tif (seen.has(key)) break;\n\t\tseen.add(key);\n\t\tconst model = contract.domain.namespaces[coordinate.namespace]?.models[coordinate.model];\n\t\tif (model === void 0) break;\n\t\tfor (const name of Object.keys(model.fields)) names.add(name);\n\t\tcoordinate = model.base;\n\t}\n\treturn names;\n}\n/**\n* Every relation joins on fields: its local fields are fields of the model that declares it, and its target fields are fields of the target model. The target side of a many-to-many relation names columns of its junction table instead. A cross-space relation's target is in another contract, so its target side is not checked. Throws `ContractValidationError` on the first name that is not a field.\n*/\nfunction validateRelationJoinFields(contract) {\n\tfor (const [namespaceId, namespace] of Object.entries(contract.domain.namespaces)) for (const [modelName, model] of Object.entries(namespace.models)) for (const [relationName, relation] of Object.entries(model.relations)) {\n\t\tif (!(\"on\" in relation)) continue;\n\t\tconst location = `Relation \"${relationName}\" on model \"${namespaceId}:${modelName}\"`;\n\t\tconst localFields = fieldNamesWithInherited(contract, namespaceId, modelName);\n\t\tfor (const field of relation.on.localFields) if (!localFields.has(field)) throw new ContractValidationError(`${location} joins on \"${field}\", which is not a field of model \"${namespaceId}:${modelName}\"`, \"domain\");\n\t\tif (relation.cardinality === \"N:M\") {\n\t\t\tconst { namespaceId: junctionNamespaceId, table: junctionTable } = relation.through;\n\t\t\tfor (const column of relation.on.targetFields) if (!lookupStorageColumn(contract, junctionNamespaceId, junctionTable, column)) throw new ContractValidationError(`${location} joins on \"${column}\", which is not a column of junction table \"${junctionNamespaceId}.${junctionTable}\"`, \"domain\");\n\t\t\tcontinue;\n\t\t}\n\t\tif (relation.to.space !== void 0) continue;\n\t\tconst targetFields = fieldNamesWithInherited(contract, relation.to.namespace, relation.to.model);\n\t\tfor (const field of relation.on.targetFields) if (!targetFields.has(field)) throw new ContractValidationError(`${location} joins on \"${field}\", which is not a field of model \"${relation.to.namespace}:${relation.to.model}\"`, \"domain\");\n\t}\n}\n/**\n* Every execution default targets a column some model's field maps: an execution default is declared on a field, and it belongs to that field. Throws `ContractValidationError` on the first default on a column no field maps.\n*/\nfunction validateExecutionDefaultsTargetMappedColumns(contract) {\n\tconst mappedColumns = /* @__PURE__ */ new Set();\n\tfor (const namespace of Object.values(contract.domain.namespaces)) for (const model of Object.values(namespace.models)) {\n\t\tconst modelStorage = blindCast(model.storage);\n\t\tfor (const field of Object.values(modelStorage.fields)) mappedColumns.add(JSON.stringify([\n\t\t\tmodelStorage.namespaceId,\n\t\t\tmodelStorage.table,\n\t\t\tfield.column\n\t\t]));\n\t}\n\tfor (const { ref } of contract.execution?.mutations.defaults ?? []) if (!mappedColumns.has(JSON.stringify([\n\t\tref.namespace,\n\t\tref.entry,\n\t\tref.field\n\t]))) throw new ContractValidationError(`Execution default for column \"${ref.field}\" of table \"${ref.namespace}.${ref.entry}\" targets a column no field maps; execution defaults are declared on fields. Give the column a database default instead.`, \"storage\");\n}\n/**\n* Cross-table consistency checks for SQL storage: primary key, unique,\n* index, and foreign key column references resolve to real columns;\n* NOT NULL columns don't carry a literal `null` default; FK column\n* counts match their referenced columns. Throws on the first mismatch.\n*/\nfunction validateSqlStorageConsistency(contract) {\n\tfor (const { namespaceId, tableName, table: rawTable } of eachStorageTable(contract.storage)) {\n\t\tconst table = blindCast(rawTable);\n\t\tconst columnNames = new Set(Object.keys(table.columns));\n\t\tif (table.primaryKey) {\n\t\t\tfor (const colName of table.primaryKey.columns) if (!columnNames.has(colName)) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" primaryKey references non-existent column \"${colName}\"`, \"storage\");\n\t\t}\n\t\tfor (const unique of table.uniques) for (const colName of unique.columns) if (!columnNames.has(colName)) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" unique constraint references non-existent column \"${colName}\"`, \"storage\");\n\t\tfor (const index of table.indexes) for (const colName of index.columns ?? []) if (!columnNames.has(colName)) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" index references non-existent column \"${colName}\"`, \"storage\");\n\t\tfor (const [colName, column] of Object.entries(table.columns)) if (!column.nullable && column.default?.kind === \"literal\" && column.default.value === null) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" column \"${colName}\" is NOT NULL but has a literal null default`, \"storage\");\n\t\tfor (const fk of table.foreignKeys) {\n\t\t\tif (fk.source.namespaceId !== namespaceId || fk.source.tableName !== tableName) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" contains foreignKey with mismatched source coordinates (${fk.source.namespaceId}.${fk.source.tableName})`, \"storage\");\n\t\t\tfor (const colName of fk.source.columns) if (!columnNames.has(colName)) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" foreignKey references non-existent column \"${colName}\"`, \"storage\");\n\t\t\tif (fk.target.spaceId === void 0) {\n\t\t\t\tconst referencedRaw = contract.storage.namespaces[fk.target.namespaceId]?.entries.table?.[fk.target.tableName];\n\t\t\t\tif (referencedRaw === void 0) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" foreignKey references non-existent table \"${fk.target.namespaceId}.${fk.target.tableName}\"`, \"storage\");\n\t\t\t\tconst referencedTable = blindCast(referencedRaw);\n\t\t\t\tconst referencedColumnNames = new Set(Object.keys(referencedTable.columns));\n\t\t\t\tfor (const colName of fk.target.columns) if (!referencedColumnNames.has(colName)) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" foreignKey references non-existent column \"${colName}\" in table \"${fk.target.tableName}\"`, \"storage\");\n\t\t\t}\n\t\t\tif (fk.source.columns.length !== fk.target.columns.length) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" foreignKey column count (${fk.source.columns.length}) does not match referenced column count (${fk.target.columns.length})`, \"storage\");\n\t\t}\n\t}\n}\n/**\n* Full SQL contract validation: structural (arktype) +\n* framework-shared domain + SQL storage logical-consistency + SQL\n* storage semantic + model ↔ storage reference checks. Throws\n* `ContractValidationError` on the first failure. Returns the\n* validated flat-data shape; IR class hydration happens in the SPI\n* base on top of this helper.\n*/\nfunction validateSqlContractFully(value, options) {\n\tconst validated = validateSqlContractStructure(typeof value === \"object\" && value !== null ? (() => {\n\t\tconst { schemaVersion: _, _generated: _g, ...rest } = blindCast(value);\n\t\treturn rest;\n\t})() : value, options?.contractSchema ?? SqlContractSchema);\n\tvalidateContractDomain({\n\t\troots: validated.roots,\n\t\tdomain: validated.domain\n\t});\n\tvalidateSqlStorageConsistency(validated);\n\tconst semanticErrors = validateStorageSemantics(validated.storage);\n\tif (semanticErrors.length > 0) throw new ContractValidationError(`Contract semantic validation failed: ${semanticErrors.join(\"; \")}`, \"storage\");\n\tvalidateModelStorageReferences(validated);\n\tvalidateExecutionDefaultsTargetMappedColumns(validated);\n\tvalidateRelationJoinFields(validated);\n\tvalidateRelationThroughConsistency(validated, options?.dataTypes ?? createDataTypeLookup([]));\n\tvalidateToOneRelationNullabilityAgainstStorage(validated);\n\treturn validated;\n}\n/**\n* A same-space to-one relation that states `nullable` must agree with its local FK columns:\n* nullable exactly when one of them is nullable (a column that cannot be resolved counts as\n* nullable). A relation without the flag is left to hydration, which derives it the same way.\n*/\nfunction validateToOneRelationNullabilityAgainstStorage(contract) {\n\tfor (const [namespaceId, namespace] of Object.entries(contract.domain.namespaces)) for (const [modelName, model] of Object.entries(namespace.models)) {\n\t\tconst storage = blindCast(model.storage);\n\t\tfor (const [relationName, relation] of Object.entries(model.relations)) {\n\t\t\tif (!(\"on\" in relation && (relation.cardinality === \"1:1\" || relation.cardinality === \"N:1\") && relation.to.space === void 0) || relation.nullable === void 0) continue;\n\t\t\tconst location = `Relation \"${relationName}\" on model \"${namespaceId}:${modelName}\"`;\n\t\t\tconst { ownsForeignKey, columns } = resolveSqlToOneRelationStorage(contract, storage, relation);\n\t\t\tif (!ownsForeignKey) {\n\t\t\t\tif (relation.nullable) continue;\n\t\t\t\tthrow new ContractValidationError(`${location} is required but does not own the foreign key, so nothing in storage guarantees the related row exists`, \"storage\");\n\t\t\t}\n\t\t\tconst anyNullable = columns.some((column) => column.nullable);\n\t\t\tif (relation.nullable === anyNullable) continue;\n\t\t\tconst columnList = columns.filter((column) => column.nullable !== relation.nullable).map((column) => `\"${column.name}\"`).join(\", \");\n\t\t\tthrow new ContractValidationError(relation.nullable ? `${location} is nullable but every local FK column is NOT NULL (columns ${columnList})` : `${location} is required but a local FK column is nullable (columns ${columnList})`, \"storage\");\n\t\t}\n\t}\n}\n/** Storage column lookup for through-consistency validation. */\nfunction lookupStorageColumn(contract, namespaceId, tableName, columnName) {\n\tconst rawTable = contract.storage.namespaces[namespaceId]?.entries.table?.[tableName];\n\tif (rawTable === void 0) return;\n\treturn blindCast(rawTable).columns[columnName];\n}\nfunction describeColumnType(column) {\n\treturn column.typeParams === void 0 ? column.dataType : `${column.dataType} ${canonicalizeJson(column.typeParams)}`;\n}\n/**\n* Validates one side of an N:M join: the junction columns and the model\n* columns they pair against positionally must be equal in number, exist in\n* their tables, and have the same type by `sameSqlColumnType`.\n* The junction's storage foreign keys already guarantee this for user-declared\n* FK constraints, but `through` is a logical descriptor never tied to them by\n* the rest of validation — and the TS builder accepts explicit join columns\n* without requiring a junction FK at all — so this checks the columns directly\n* against storage, one path regardless of how the junction was authored.\n*\n* Joined columns must be the *same* storage type, not merely compatible:\n* relying on implicit conversion (e.g. `text`↔`character`) is unsafe on writes\n* — `character(n)` space-padding makes such coercions non-associative — and no\n* ADR sanctions heterogeneous junction columns. Equality is the conservative\n* default; it can be relaxed deliberately if a real use case ever appears.\n*/\nfunction validateThroughJoinSide(input) {\n\tconst fail = (detail) => new ContractValidationError(`Many-to-many relation \"${input.qualifiedName}\" ${detail}`, \"storage\");\n\tif (input.junctionColumns.length !== input.modelColumns.length) throw fail(`pairs ${input.junctionColumnsLabel} (${input.junctionColumns.length}) with ${input.modelColumnsLabel} (${input.modelColumns.length}) of differing length; they join positionally and must match.`);\n\tfor (const [index, junctionColumnName] of input.junctionColumns.entries()) {\n\t\tconst modelColumnRef = input.modelColumns[index];\n\t\tif (modelColumnRef === void 0) continue;\n\t\tconst junctionColumn = lookupStorageColumn(input.contract, input.junctionNamespaceId, input.junctionTable, junctionColumnName);\n\t\tif (junctionColumn === void 0) throw fail(`${input.junctionColumnsLabel} references column \"${junctionColumnName}\" absent from junction table \"${input.junctionNamespaceId}.${input.junctionTable}\".`);\n\t\tconst model = input.model;\n\t\tif (model === void 0) continue;\n\t\tlet modelColumnName = modelColumnRef;\n\t\tif (model.fieldToColumn !== void 0) {\n\t\t\tconst mapped = model.fieldToColumn[modelColumnRef];\n\t\t\tif (mapped === void 0) throw fail(`${input.modelColumnsLabel} references field \"${modelColumnRef}\" absent from model on table \"${model.namespaceId}.${model.table}\".`);\n\t\t\tmodelColumnName = mapped.column;\n\t\t}\n\t\tconst modelColumn = lookupStorageColumn(input.contract, model.namespaceId, model.table, modelColumnName);\n\t\tif (modelColumn === void 0) throw fail(`${input.modelColumnsLabel} references column \"${modelColumnName}\" absent from table \"${model.namespaceId}.${model.table}\".`);\n\t\tif (!sameSqlColumnType(junctionColumn, modelColumn, input.dataTypes)) throw fail(`joins \"${input.junctionTable}.${junctionColumnName}\" (${describeColumnType(junctionColumn)}) with \"${model.table}.${modelColumnName}\" (${describeColumnType(modelColumn)}) of differing storage type; junction columns must match the type of the column they reference.`);\n\t}\n}\n/**\n* Validates that every N:M relation's `through` descriptor is consistent with\n* the storage columns it joins: both join sides match in column count,\n* reference columns that exist in their tables, and pair columns of the same\n* storage type. Without this, a `through` that disagrees with storage surfaces\n* as a silently wrong JOIN at query time rather than a validation error here.\n*/\nfunction validateRelationThroughConsistency(contract, dataTypes) {\n\tfor (const [namespaceId, namespace] of Object.entries(contract.domain.namespaces)) for (const [modelName, model] of Object.entries(namespace.models)) for (const [relationName, relation] of Object.entries(model.relations)) {\n\t\tif (relation.cardinality !== \"N:M\") continue;\n\t\tconst qualifiedName = `${namespaceId}.${modelName}.${relationName}`;\n\t\tconst { on, through } = relation;\n\t\tconst modelStorage = blindCast(model.storage);\n\t\tvalidateThroughJoinSide({\n\t\t\tdataTypes,\n\t\t\tcontract,\n\t\t\tqualifiedName,\n\t\t\tmodelColumns: on.localFields,\n\t\t\tmodelColumnsLabel: \"on.localFields\",\n\t\t\tmodel: {\n\t\t\t\tnamespaceId,\n\t\t\t\ttable: modelStorage.table,\n\t\t\t\tfieldToColumn: modelStorage.fields\n\t\t\t},\n\t\t\tjunctionColumns: through.parentColumns,\n\t\t\tjunctionColumnsLabel: \"through.parentColumns\",\n\t\t\tjunctionNamespaceId: through.namespaceId,\n\t\t\tjunctionTable: through.table\n\t\t});\n\t\tconst targetModel = relation.to.space === void 0 ? contract.domain.namespaces[relation.to.namespace]?.models[relation.to.model] : void 0;\n\t\tconst targetModelSide = targetModel === void 0 ? void 0 : {\n\t\t\tnamespaceId: relation.to.namespace,\n\t\t\ttable: blindCast(targetModel.storage).table\n\t\t};\n\t\tvalidateThroughJoinSide({\n\t\t\tdataTypes,\n\t\t\tcontract,\n\t\t\tqualifiedName,\n\t\t\tmodelColumns: through.targetColumns,\n\t\t\tmodelColumnsLabel: \"through.targetColumns\",\n\t\t\t...ifDefined(\"model\", targetModelSide),\n\t\t\tjunctionColumns: through.childColumns,\n\t\t\tjunctionColumnsLabel: \"through.childColumns\",\n\t\t\tjunctionNamespaceId: through.namespaceId,\n\t\t\tjunctionTable: through.table\n\t\t});\n\t}\n}\n//#endregion\nexport { CheckConstraintSchema, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, IndexSchema, ReferentialActionSchema, StorageTableSchema, StorageValueSetSchema, checkSqlDefaultText, createNamespaceEntrySchema, createSqlContractSchema, createSqlStorageSchema, reservedSqlDefaultText, resolveSqlToOneRelationStorage, validateExecutionDefaultsTargetMappedColumns, validateModel, validateModelStorageReferences, validateRelationJoinFields, validateSqlContractFully, validateSqlStorageConsistency, validateStorage, validateStorageSemantics, valueObjectStorageTypeMissingMessage };\n\n//# sourceMappingURL=validators.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,sBAAsB;;AAE5B,SAAS,oBAAoB,MAAM;CAClC,OAAO,oBAAoB,KAAK,IAAI,IAAI,gGAAgG,KAAK;AAC9I;;;;AAIA,SAAS,uBAAuB,MAAM;CACrC,QAAQ,KAAK,KAAK,GAAlB;EACC,KAAK,SAAS,OAAO;EACrB,KAAK,mBAAmB,OAAO;EAC/B,SAAS;CACV;AACD;AAGA,SAAS,YAAY,MAAM,OAAO;CACjC,OAAO,KAAK,WAAW,MAAM,UAAU,KAAK,OAAO,QAAQ,UAAU,WAAW,MAAM,MAAM;AAC7F;;;;;AAKA,SAAS,+BAA+B,UAAU,cAAc,UAAU;CACzE,MAAM,QAAQ,UAAU,SAAS,QAAQ,WAAW,aAAa,YAAY,EAAE,QAAQ,QAAQ,aAAa,MAAM;CAClH,MAAM,UAAU,SAAS,GAAG,YAAY,KAAK,cAAc;EAC1D,MAAM,aAAa,aAAa,OAAO,UAAU,EAAE;EACnD,MAAM,SAAS,eAAe,KAAK,IAAI,KAAK,IAAI,OAAO,QAAQ;EAC/D,OAAO;GACN,MAAM,cAAc;GACpB,UAAU,QAAQ,YAAY;EAC/B;CACD,CAAC;CACD,MAAM,cAAc,QAAQ,KAAK,WAAW,OAAO,IAAI;CACvD,OAAO;EACN,gBAAgB,SAAS,gBAAgB,UAAU,OAAO,eAAe,CAAC,EAAA,CAAG,MAAM,eAAe,YAAY,WAAW,OAAO,SAAS,WAAW,CAAC;EACrJ;CACD;AACD;AAGA,MAAM,sBAAsB,KAAK,mDAAmD;AACpF,MAAM,sBAAsB,KAAK;CAChC,OAAO;CACP,aAAa;CACb,YAAY;CACZ,YAAY;CACZ,YAAY;AACb,CAAC;;AAED,MAAM,kCAAkC,KAAK,QAAQ,CAAC,CAAC,KAAK;CAC3D,MAAM;CACN,SAAS;CAC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,KAAK,IAAI,KAAK,IAAI;GACzD,aAAa,SAAS,GAAG;GACzB,OAAO,UAAU,YAAY,OAAO,CAAC,CAAC;EACvC;EACA,wBAAwB;GACvB;GACA;GACA;GACA,cAAc,QAAQ;GACtB,mBAAmB;GACnB,GAAG,UAAU,SAAS,eAAe;GACrC,iBAAiB,QAAQ;GACzB,sBAAsB;GACtB,qBAAqB,QAAQ;GAC7B,eAAe,QAAQ;EACxB,CAAC;CACF;AACD"}
1
+ {"version":3,"file":"validators-Cfy0jmZ2.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/validators.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { c as sameSqlColumnType } from \"./sql-data-type-D7M-YTTY.mjs\";\nimport { a as ColumnDefaultFunctionSchema, c as ForeignKeyReferenceSchema, d as IndexSchema, f as ReferentialActionSchema, i as CheckConstraintSchema, l as ForeignKeySchema, m as StorageValueSetSchema, o as ColumnDefaultLiteralSchema, p as StorageTableSchema, s as ColumnDefaultSchema, t as composeSqlEntityKinds, u as ForeignKeySourceSchema } from \"./entity-kinds-CQ_jwgYv.mjs\";\nimport { a as sameColumns$1, s as startsWithColumns } from \"./index-equivalence-DswCiq5l.mjs\";\nimport { computeCheckContentHash, computeIndexContentHash } from \"@internal/sql-schema-ir/naming\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { isPlainRecord } from \"@internal/framework-components/ir\";\nimport { DATA_TYPE_ID_PATTERN, createDataTypeLookup } from \"@internal/framework-components/codec\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { type } from \"arktype\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { ContractExecutionSectionSchema, CrossReferenceSchema } from \"@internal/contract/types\";\nimport { validateContractDomain } from \"@internal/contract/validate-domain\";\n//#region src/default-sql-text.ts\nconst UNSAFE_DEFAULT_TEXT = /;|--|\\/\\*|\\$\\$|\\bSELECT\\b/i;\n/** Returns undefined when the text may be rendered as `DEFAULT (<text>)`, else the reason. */\nfunction checkSqlDefaultText(text) {\n\treturn UNSAFE_DEFAULT_TEXT.test(text) ? \"Default SQL must not contain semicolons, SQL comment tokens, dollar-quoting, or subqueries.\" : void 0;\n}\n/**\n* Names the Prisma default function that raw SQL text is exactly, ignoring surrounding whitespace. The planners treat the contract expressions `now()` and `autoincrement()` as those functions, so raw SQL with that text would not be used as written.\n*/\nfunction reservedSqlDefaultText(text) {\n\tswitch (text.trim()) {\n\t\tcase \"now()\": return \"now\";\n\t\tcase \"autoincrement()\": return \"autoincrement\";\n\t\tdefault: return;\n\t}\n}\n//#endregion\n//#region src/relation-storage.ts\nfunction sameColumns(left, right) {\n\treturn left.length === right.length && left.every((column, index) => column === right[index]);\n}\n/**\n* The storage facts behind a same-space to-one relation's nullability: which side owns the\n* foreign key, and whether each local column is nullable.\n*/\nfunction resolveSqlToOneRelationStorage(contract, modelStorage, relation) {\n\tconst table = blindCast(contract.storage.namespaces[modelStorage.namespaceId]?.entries.table?.[modelStorage.table]);\n\tconst columns = relation.on.localFields.map((fieldName) => {\n\t\tconst columnName = modelStorage.fields[fieldName]?.column;\n\t\tconst column = columnName === void 0 ? void 0 : table?.columns[columnName];\n\t\treturn {\n\t\t\tname: columnName ?? fieldName,\n\t\t\tnullable: column?.nullable ?? true\n\t\t};\n\t});\n\tconst columnNames = columns.map((column) => column.name);\n\treturn {\n\t\townsForeignKey: relation.cardinality === \"N:1\" || (table?.foreignKeys ?? []).some((foreignKey) => sameColumns(foreignKey.source.columns, columnNames)),\n\t\tcolumns\n\t};\n}\n//#endregion\n//#region src/validators.ts\nconst ControlPolicySchema = type(\"'managed' | 'tolerated' | 'external' | 'observed'\");\nconst DomainEnumRefSchema = type({\n\tplane: \"'domain'\",\n\tnamespaceId: \"string\",\n\tentityKind: \"'enum'\",\n\tentityName: \"string\",\n\t\"spaceId?\": \"string\"\n});\n/** Document-scoped `storage.types`: codec triples only. */\nconst DocumentScopedStorageTypeSchema = type.declare().type({\n\tkind: \"'codec-instance'\",\n\tcodecId: \"string\",\n\tdataType: DATA_TYPE_ID_PATTERN,\n\t\"typeParams?\": \"Record<string, unknown>\"\n});\n/**\n* Domain enum entry under `domain.namespaces[id].enum[name]`.\n* Carries the codec id and an ordered `members` array of `{name, value}` pairs.\n*/\nconst ContractEnumSchema = type({\n\t\"+\": \"reject\",\n\tcodecId: \"string\",\n\tmembers: type({\n\t\tname: \"string\",\n\t\tvalue: \"string | number | boolean | null | unknown[] | Record<string, unknown>\"\n\t}).array().readonly()\n});\n/**\n* Derives a schema map from a descriptor map: maps each kind's key to its\n* `schema` field. Used by validation functions to validate entries.\n*/\nfunction schemaViewOf(kinds) {\n\treturn new Map([...kinds].map(([k, d]) => [k, d.schema]));\n}\nconst DEFAULT_SQL_KINDS = composeSqlEntityKinds();\n/**\n* Builds the per-namespace entry schema for `storage.namespaces[id]`.\n*\n* Validation is descriptor-driven: the `kinds` map carries both the schema\n* (used here for structural validation) and the construct function (used at\n* hydration time). An unregistered key fails validation naming the kind and\n* the namespace id, so validation fails closed.\n*/\nfunction createNamespaceEntrySchema(kinds) {\n\tconst schemas = schemaViewOf(kinds);\n\tconst knownKinds = new Set(kinds.keys());\n\treturn type({\n\t\t\"+\": \"reject\",\n\t\tid: \"string\",\n\t\t\"kind?\": \"string\",\n\t\tentries: \"object\"\n\t}).narrow((ns, ctx) => {\n\t\tif (!isPlainRecord(ns.entries)) return ctx.mustBe(\"an entries object\");\n\t\tfor (const [key, innerMap] of Object.entries(ns.entries)) {\n\t\t\tif (!knownKinds.has(key)) return ctx.reject({ expected: `entries key \"${key}\" in namespace \"${ns.id}\" is not a registered entity kind` });\n\t\t\tif (!isPlainRecord(innerMap)) return ctx.reject({ expected: `entries[\"${key}\"] in namespace \"${ns.id}\" must be an object` });\n\t\t\tconst entrySchema = blindCast(schemas.get(key));\n\t\t\tfor (const [, value] of Object.entries(innerMap)) {\n\t\t\t\tconst parsed = entrySchema(value);\n\t\t\t\tif (parsed instanceof type.errors) return ctx.reject({ expected: parsed.summary });\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n}\n/**\n* Builds the storage schema. Pack contributions reach the per-namespace\n* entry shape through {@link createNamespaceEntrySchema}; the\n* document-scoped `storage.types` field (codec triples only) and the\n* storage hash stay family-shared.\n*/\nfunction createSqlStorageSchema(kinds) {\n\tconst namespaceEntry = createNamespaceEntrySchema(kinds);\n\treturn type({\n\t\t\"+\": \"reject\",\n\t\tstorageHash: \"string\",\n\t\t\"types?\": type({ \"[string]\": DocumentScopedStorageTypeSchema }),\n\t\t\"namespaces?\": type({ \"[string]\": namespaceEntry })\n\t});\n}\nconst StorageSchema = createSqlStorageSchema(DEFAULT_SQL_KINDS);\n/** The refusal of a value-object column when the stack declares no value-object storage type. */\nfunction valueObjectStorageTypeMissingMessage(columnPath) {\n\treturn `${columnPath}: a value-object column needs the stack's value-object storage type, and the stack declares none`;\n}\nconst LISTED_REMOVED_KEYS = 5;\nfunction fieldOf(value, key) {\n\treturn isPlainRecord(value) ? value[key] : void 0;\n}\nfunction entriesOf(value) {\n\treturn isPlainRecord(value) ? Object.entries(value) : [];\n}\nfunction storedColumnEntries(storage) {\n\treturn entriesOf(fieldOf(storage, \"namespaces\")).flatMap(([namespaceId, namespace]) => entriesOf(fieldOf(fieldOf(namespace, \"entries\"), \"table\")).flatMap(([tableName, table]) => entriesOf(fieldOf(table, \"columns\")).map(([columnName, column]) => ({\n\t\tpath: `storage.namespaces.${namespaceId}.entries.table.${tableName}.columns.${columnName}`,\n\t\tentry: column\n\t}))));\n}\nfunction pathsHolding(entries, key) {\n\treturn entries.filter(({ entry }) => isPlainRecord(entry) && Object.hasOwn(entry, key)).map(({ path }) => path);\n}\nfunction listedProblems(paths, describe) {\n\tconst listed = paths.slice(0, LISTED_REMOVED_KEYS).map(describe);\n\tconst unlisted = paths.length - listed.length;\n\treturn unlisted > 0 ? [...listed, `and ${unlisted} more ${unlisted === 1 ? \"path\" : \"paths\"} (${paths.length} in all)`] : listed;\n}\n/**\n* Contracts emitted before a column named its data type stored the database type name in `nativeType` on columns and `storage.types` entries. The first five such keys are reported with their paths and the rest are counted, so an old contract is refused with a short message that says what changed.\n*/\nfunction storedTypeNameProblems(storage) {\n\tconst types = entriesOf(fieldOf(storage, \"types\")).map(([typeName, entry]) => ({\n\t\tpath: `storage.types.${typeName}`,\n\t\tentry\n\t}));\n\treturn listedProblems(pathsHolding([...storedColumnEntries(storage), ...types], \"nativeType\"), (path) => `${path}.nativeType: contracts no longer store a column's database type name; the column names its data type in \"dataType\"`);\n}\n/**\n* Contracts emitted before generated checks became mandatory stored the checks a column waived in `noCheck`. One sentence says what to do, followed by the first five such columns and a count of the rest.\n*/\nfunction checkWaiverProblems(storage) {\n\tconst paths = pathsHolding(storedColumnEntries(storage), \"noCheck\");\n\tif (paths.length === 0) return [];\n\tconst listed = paths.slice(0, LISTED_REMOVED_KEYS).map((path) => `${path}.noCheck`);\n\tconst unlisted = paths.length - listed.length;\n\tconst more = unlisted > 0 ? `, and ${unlisted} more (${paths.length} in all)` : \"\";\n\treturn [`contracts no longer store check waivers in \"noCheck\", so re-emit the contract from its source, or rewrite a stored contract such as a migration snapshot with remove-nocheck.ts, which ships in the remove-nocheck scripts of the Prisma 8 upgrade guide. Columns: ${listed.join(\", \")}${more}`];\n}\n/** The removed keys of the oldest format the contract is in: a contract that still stores `nativeType` is refused for that first, since its `noCheck` keys are rewritten at a later step of the upgrade. */\nfunction removedKeyProblems(storage) {\n\tconst storedTypeNames = storedTypeNameProblems(storage);\n\treturn storedTypeNames.length > 0 ? storedTypeNames : checkWaiverProblems(storage);\n}\n/**\n* Any entries entity that declares both a `tableName` and a physical `name`\n* (e.g. a target's RLS policy entities) shares one physical-name space per\n* table: two such entries of one kind on the same table would collide as\n* DDL (`CREATE POLICY \"<name>\" ON <table>` fails on the second), while the\n* same name on different tables is legal. Structural — no entry-kind\n* vocabulary; `table` entries are keyed by name already and are excluded.\n*/\nfunction validateTableScopedEntryNames(storage, errors) {\n\tfor (const [namespaceId, ns] of Object.entries(storage.namespaces)) {\n\t\tif (!isPlainRecord(ns.entries)) continue;\n\t\tfor (const [entriesKind, slot] of Object.entries(ns.entries)) {\n\t\t\tif (entriesKind === \"table\" || !isPlainRecord(slot)) continue;\n\t\t\tconst seen = /* @__PURE__ */ new Map();\n\t\t\tfor (const entity of Object.values(slot)) {\n\t\t\t\tif (typeof entity !== \"object\" || entity === null) continue;\n\t\t\t\tconst record = blindCast(entity);\n\t\t\t\tconst name = record[\"name\"];\n\t\t\t\tconst tableName = record[\"tableName\"];\n\t\t\t\tif (typeof name !== \"string\" || typeof tableName !== \"string\") continue;\n\t\t\t\tconst key = JSON.stringify([tableName, name]);\n\t\t\t\tseen.set(key, (seen.get(key) ?? 0) + 1);\n\t\t\t\tif (seen.get(key) === 2) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": ${entriesKind} \"${name}\" is declared multiple times`);\n\t\t\t}\n\t\t}\n\t}\n}\nfunction eachStorageTable(storage) {\n\treturn Object.entries(storage.namespaces).flatMap(([namespaceId, ns]) => Object.entries(ns.entries[\"table\"] ?? {}).map(([tableName, table]) => ({\n\t\tnamespaceId,\n\t\ttableName,\n\t\ttable\n\t})));\n}\nfunction findDuplicateValue(values) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const value of values) {\n\t\tif (seen.has(value)) return value;\n\t\tseen.add(value);\n\t}\n}\n/** A column may appear at most once in one index's element tuple. */\nfunction rejectRepeatedIndexColumns(indexes, coordinate, errors) {\n\tfor (const index of indexes) {\n\t\tconst duplicateColumn = findDuplicateValue(index.columns ?? []);\n\t\tif (duplicateColumn !== void 0) errors.push(`${coordinate}: index contains duplicate column \"${duplicateColumn}\"`);\n\t}\n}\n/**\n* Two wire-named indexes with the same content are one index written twice —\n* the content hash is their identity, so neither spelling can survive. An\n* exact-named index is identified by its name instead, so content twins under\n* two names are legal and a repeated name is rejected by the named-object\n* check.\n*/\nfunction rejectDuplicateWireNamedIndexContent(indexes, coordinate, errors) {\n\tconst seenContent = /* @__PURE__ */ new Set();\n\tfor (const index of indexes) {\n\t\tif (index.prefix === void 0) continue;\n\t\tconst content = computeIndexContentHash(index);\n\t\tif (seenContent.has(content)) {\n\t\t\terrors.push(`${coordinate}: duplicate index definition on columns [${(index.columns ?? []).join(\", \")}]`);\n\t\t\tcontinue;\n\t\t}\n\t\tseenContent.add(content);\n\t}\n}\n/**\n* Two wire-named checks with the same predicate are one check written twice —\n* the content hash is their identity, so neither spelling can survive, and\n* whitespace variants of one predicate collapse onto the same hash. An\n* exact-named check is identified by its name instead, so content twins under\n* two names are legal (the legacy shape a database adopts from) and a repeated\n* name is rejected by the named-object check.\n*/\nfunction rejectDuplicateWireNamedCheckContent(checks, coordinate, errors) {\n\tconst seenContent = /* @__PURE__ */ new Set();\n\tfor (const check of checks) {\n\t\tif (check.prefix === void 0) continue;\n\t\tconst content = computeCheckContentHash(check.expression);\n\t\tif (seenContent.has(content)) {\n\t\t\terrors.push(`${coordinate}: duplicate check constraint definition (expression \"${check.expression}\")`);\n\t\t\tcontinue;\n\t\t}\n\t\tseenContent.add(content);\n\t}\n}\nfunction isContractFieldType(value) {\n\tif (!isPlainRecord(value)) return false;\n\tconst kind = value[\"kind\"];\n\tif (kind === \"scalar\") {\n\t\tif (typeof value[\"codecId\"] !== \"string\") return false;\n\t\tconst typeParams = value[\"typeParams\"];\n\t\tif (typeParams !== void 0 && !isPlainRecord(typeParams)) return false;\n\t\treturn true;\n\t}\n\tif (kind === \"valueObject\") return typeof value[\"name\"] === \"string\";\n\tif (kind === \"union\") {\n\t\tconst members = value[\"members\"];\n\t\tif (!Array.isArray(members)) return false;\n\t\treturn members.every((m) => isContractFieldType(m));\n\t}\n\treturn false;\n}\nconst ModelFieldSchema = type({\n\t\"+\": \"reject\",\n\tnullable: \"boolean\",\n\ttype: type(\"unknown\").narrow((value, ctx) => isContractFieldType(value) ? true : ctx.mustBe(\"scalar, valueObject, or union field type\")),\n\tmany: type(\"false\").or({\n\t\t\"+\": \"reject\",\n\t\telementNullable: \"boolean\"\n\t}).default(false),\n\t\"dict?\": \"true\",\n\t\"valueSet?\": DomainEnumRefSchema\n});\nconst ModelStorageSchema = type({\n\ttable: \"string\",\n\tnamespaceId: \"string\",\n\tfields: type({ \"[string]\": type({\n\t\tcolumn: \"string\",\n\t\t\"codecId?\": \"string\",\n\t\t\"nullable?\": \"boolean\"\n\t}) })\n});\nconst ContractRelationThroughSchema = type({\n\t\"+\": \"reject\",\n\ttable: \"string\",\n\tnamespaceId: \"string\",\n\tparentColumns: type.string.array().readonly(),\n\tchildColumns: type.string.array().readonly(),\n\ttargetColumns: type.string.array().readonly()\n});\nconst ContractRelationOnSchema = type({\n\t\"+\": \"reject\",\n\tlocalFields: type.string.array().readonly(),\n\ttargetFields: type.string.array().readonly()\n});\nconst ContractManyToManyRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'N:M'\",\n\ton: ContractRelationOnSchema,\n\tthrough: ContractRelationThroughSchema\n});\nconst ContractToOneRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:1' | 'N:1'\",\n\t\"nullable?\": \"boolean\",\n\ton: ContractRelationOnSchema\n});\nconst ContractToManyRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:N'\",\n\ton: ContractRelationOnSchema\n});\nconst ContractReferenceRelationSchema = ContractManyToManyRelationSchema.or(ContractToOneRelationSchema).or(ContractToManyRelationSchema);\nconst ContractEmbedRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:1' | '1:N'\"\n});\nconst ContractRelationSchema = ContractReferenceRelationSchema.or(ContractEmbedRelationSchema);\nconst ModelSchema = type({\n\tstorage: ModelStorageSchema,\n\t\"fields?\": type({ \"[string]\": ModelFieldSchema }),\n\t\"relations?\": type({ \"[string]\": ContractRelationSchema }),\n\t\"discriminator?\": type({ field: \"string\" }),\n\t\"variants?\": type({ \"[string]\": CrossReferenceSchema }),\n\t\"base?\": CrossReferenceSchema,\n\t\"owner?\": \"string\"\n});\nconst ContractMetaSchema = type({ \"[string]\": \"unknown\" });\n/**\n* Builds the full SQL contract schema. The storage subtree threads\n* pack contributions through {@link createSqlStorageSchema}; the rest\n* of the contract envelope is family-shared.\n*/\nfunction createSqlContractSchema(kinds) {\n\tconst storage = createSqlStorageSchema(kinds);\n\treturn type({\n\t\t\"+\": \"reject\",\n\t\ttarget: \"string\",\n\t\ttargetFamily: \"'sql'\",\n\t\t\"coreHash?\": \"string\",\n\t\tprofileHash: \"string\",\n\t\t\"capabilities?\": \"Record<string, Record<string, boolean>>\",\n\t\t\"extensions?\": \"Record<string, unknown>\",\n\t\t\"meta?\": ContractMetaSchema,\n\t\t\"defaultControlPolicy?\": ControlPolicySchema,\n\t\t\"roots?\": type({ \"[string]\": CrossReferenceSchema }),\n\t\tdomain: type({ namespaces: type({ \"[string]\": type({\n\t\t\tmodels: type({ \"[string]\": ModelSchema }),\n\t\t\t\"valueObjects?\": type({ \"[string]\": type({ fields: type({ \"[string]\": ModelFieldSchema }) }) }),\n\t\t\t\"enum?\": type({ \"[string]\": ContractEnumSchema })\n\t\t}) }) }),\n\t\tstorage,\n\t\t\"execution?\": ContractExecutionSectionSchema\n\t});\n}\nconst SqlContractSchema = createSqlContractSchema(DEFAULT_SQL_KINDS);\n/**\n* Validates the structural shape of SqlStorage using Arktype. Pure\n* structural check: namespace IR is never materialized here (that needs\n* a target concretion via the serializer hydration path), so this throws\n* on invalid input and constructs nothing.\n*\n* @param value - The storage value to validate\n* @throws Error if the storage structure is invalid\n*/\nfunction validateStorage(value) {\n\tconst removedKeys = removedKeyProblems(value);\n\tconst result = StorageSchema(value);\n\tconst errors = removedKeys.length > 0 ? [...removedKeys] : result instanceof type.errors ? result.map((p) => p.message) : [];\n\tif (errors.length > 0) throw contractError(\"CONTRACT.VALIDATION_FAILED\", `Storage validation failed: ${errors.join(\"; \")}`, { meta: { errors } });\n}\nfunction validateModel(value) {\n\tconst result = ModelSchema(value);\n\tif (result instanceof type.errors) {\n\t\tconst errors = result.map((p) => p.message);\n\t\tthrow contractError(\"CONTRACT.VALIDATION_FAILED\", `Model validation failed: ${errors.join(\"; \")}`, { meta: { errors } });\n\t}\n\treturn result;\n}\n/**\n* Structural arktype validation of an SQL contract envelope. Internal\n* helper for {@link validateSqlContractFully} — exposed only inside\n* this module, since the family seam-of-record is the\n* `SqlContractSerializerBase.deserializeContract` SPI.\n*/\nfunction validateSqlContractStructure(value, contractSchema) {\n\tif (typeof value !== \"object\" || value === null) throw new ContractValidationError(\"Contract structural validation failed: value must be an object\", \"structural\");\n\tconst targetFamily = \"targetFamily\" in value ? value.targetFamily : void 0;\n\tif (targetFamily !== void 0 && targetFamily !== \"sql\") throw new ContractValidationError(`Unsupported target family: ${targetFamily}`, \"structural\");\n\tconst removedKeys = removedKeyProblems(fieldOf(value, \"storage\"));\n\tif (removedKeys.length > 0) throw new ContractValidationError(`Contract structural validation failed: ${removedKeys.join(\"; \")}`, \"structural\");\n\tconst contractResult = contractSchema(value);\n\tif (contractResult instanceof type.errors) throw new ContractValidationError(`Contract structural validation failed: ${contractResult.map((p) => p.message).join(\"; \")}`, \"structural\");\n\treturn blindCast(contractResult);\n}\nfunction foreignKeyBackingError(table, fk) {\n\tconst { index } = fk;\n\tif (index === void 0) return void 0;\n\tconst columns = fk.source.columns;\n\tif (\"name\" in index) {\n\t\tconst named = table.indexes.find((candidate) => candidate.name === index.name);\n\t\tif (named === void 0) return `is indexed by \"${index.name}\", but the table has no index with that name`;\n\t\treturn named.columns !== void 0 && startsWithColumns(named.columns, columns) ? void 0 : `is indexed by \"${index.name}\", but that index does not start with those columns`;\n\t}\n\tif (\"primaryKey\" in index) return table.primaryKey !== void 0 && startsWithColumns(table.primaryKey.columns, columns) ? void 0 : \"is indexed by the primary key, but the table's primary key does not start with those columns\";\n\tconst described = `the unique constraint on [${index.unique.join(\", \")}]`;\n\tif (!table.uniques.some((unique) => sameColumns$1(unique.columns, index.unique))) return `is indexed by ${described}, but the table has no unique constraint on those columns`;\n\treturn startsWithColumns(index.unique, columns) ? void 0 : `is indexed by ${described}, which does not start with those columns`;\n}\n/**\n* Validates semantic constraints on SqlStorage that cannot be expressed in Arktype schemas.\n*\n* Returns an array of human-readable error strings. Empty array = valid.\n*\n* Currently checks:\n* - duplicate named primary key / unique / index / foreign key objects within a table\n* - duplicate unique, index, or foreign key declarations within a table\n* - duplicate columns within primary key / unique / index definitions\n* - nullable columns in primary key definitions\n* - `setNull` referential action on a non-nullable FK column (would fail at runtime)\n* - `setDefault` referential action on a non-nullable FK column without a DEFAULT (would fail at runtime)\n* - a foreign key whose `index` is an index, primary key or unique constraint its table does not have\n*/\nfunction validateStorageSemantics(storage) {\n\tconst errors = [];\n\tvalidateTableScopedEntryNames(storage, errors);\n\tfor (const { namespaceId, tableName, table: rawTable } of eachStorageTable(storage)) {\n\t\tconst table = blindCast(rawTable);\n\t\tconst namedObjects = /* @__PURE__ */ new Map();\n\t\tconst registerNamedObject = (kind, name) => {\n\t\t\tif (!name) return;\n\t\t\tnamedObjects.set(name, [...namedObjects.get(name) ?? [], kind]);\n\t\t};\n\t\tregisterNamedObject(\"primary key\", table.primaryKey?.name);\n\t\tfor (const unique of table.uniques) registerNamedObject(\"unique constraint\", unique.name);\n\t\tfor (const index of table.indexes) registerNamedObject(\"index\", index.name);\n\t\tfor (const fk of table.foreignKeys) registerNamedObject(\"foreign key\", fk.name);\n\t\tfor (const check of table.checks ?? []) registerNamedObject(\"check constraint\", check.name);\n\t\tfor (const [name, kinds] of namedObjects) if (kinds.length > 1) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": named object \"${name}\" is declared multiple times (${kinds.join(\", \")})`);\n\t\tif (table.primaryKey) {\n\t\t\tconst duplicateColumn = findDuplicateValue(table.primaryKey.columns);\n\t\t\tif (duplicateColumn !== void 0) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": primary key contains duplicate column \"${duplicateColumn}\"`);\n\t\t\tfor (const columnName of table.primaryKey.columns) if (table.columns[columnName]?.nullable === true) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": primary key column \"${columnName}\" is nullable; primary key columns must be NOT NULL`);\n\t\t}\n\t\tconst seenUniqueDefinitions = /* @__PURE__ */ new Set();\n\t\tfor (const unique of table.uniques) {\n\t\t\tconst duplicateColumn = findDuplicateValue(unique.columns);\n\t\t\tif (duplicateColumn !== void 0) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": unique constraint contains duplicate column \"${duplicateColumn}\"`);\n\t\t\tconst signature = JSON.stringify({ columns: unique.columns });\n\t\t\tif (seenUniqueDefinitions.has(signature)) {\n\t\t\t\terrors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": duplicate unique constraint definition on columns [${unique.columns.join(\", \")}]`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseenUniqueDefinitions.add(signature);\n\t\t}\n\t\tconst tableCoordinate = `Namespace \"${namespaceId}\" table \"${tableName}\"`;\n\t\trejectRepeatedIndexColumns(table.indexes, tableCoordinate, errors);\n\t\trejectDuplicateWireNamedIndexContent(table.indexes, tableCoordinate, errors);\n\t\tfor (const fk of table.foreignKeys) {\n\t\t\tconst error = foreignKeyBackingError(table, fk);\n\t\t\tif (error !== void 0) errors.push(`${tableCoordinate}: foreign key on columns [${fk.source.columns.join(\", \")}] ${error}`);\n\t\t}\n\t\tconst seenForeignKeyDefinitions = /* @__PURE__ */ new Set();\n\t\tfor (const fk of table.foreignKeys) {\n\t\t\tconst signature = JSON.stringify({\n\t\t\t\tsource: fk.source,\n\t\t\t\ttarget: fk.target,\n\t\t\t\tonDelete: fk.onDelete ?? null,\n\t\t\t\tonUpdate: fk.onUpdate ?? null\n\t\t\t});\n\t\t\tif (seenForeignKeyDefinitions.has(signature)) {\n\t\t\t\terrors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": duplicate foreign key definition on columns [${fk.source.columns.join(\", \")}]`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseenForeignKeyDefinitions.add(signature);\n\t\t}\n\t\tfor (const fk of table.foreignKeys) for (const colName of fk.source.columns) {\n\t\t\tconst column = table.columns[colName];\n\t\t\tif (!column) continue;\n\t\t\tif (fk.onDelete === \"setNull\" && !column.nullable) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": onDelete setNull on foreign key column \"${colName}\" which is NOT NULL`);\n\t\t\tif (fk.onUpdate === \"setNull\" && !column.nullable) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": onUpdate setNull on foreign key column \"${colName}\" which is NOT NULL`);\n\t\t\tif (fk.onDelete === \"setDefault\" && !column.nullable && column.default === void 0) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": onDelete setDefault on foreign key column \"${colName}\" which is NOT NULL and has no DEFAULT`);\n\t\t\tif (fk.onUpdate === \"setDefault\" && !column.nullable && column.default === void 0) errors.push(`Namespace \"${namespaceId}\" table \"${tableName}\": onUpdate setDefault on foreign key column \"${colName}\" which is NOT NULL and has no DEFAULT`);\n\t\t}\n\t\trejectDuplicateWireNamedCheckContent(table.checks ?? [], tableCoordinate, errors);\n\t}\n\treturn errors;\n}\n/**\n* SQL storage logical-consistency checks: every model.storage.table resolves to a real table, every domain field has a model.storage.fields entry, and every model.storage.fields[*].column resolves to a real column. Throws `ContractValidationError` on the first mismatch.\n*/\nfunction validateModelStorageReferences(contract) {\n\tfor (const [namespaceId, namespace] of Object.entries(contract.domain.namespaces)) for (const [modelName, model] of Object.entries(namespace.models)) {\n\t\tconst modelStorage = blindCast(model.storage);\n\t\tconst qualifiedName = `${namespaceId}:${modelName}`;\n\t\tconst storageNamespaceId = modelStorage.namespaceId;\n\t\tif (storageNamespaceId !== namespaceId) throw new ContractValidationError(`Model \"${qualifiedName}\" storage.namespaceId \"${storageNamespaceId}\" does not match domain namespace \"${namespaceId}\"`, \"storage\");\n\t\tconst storageTable = modelStorage.table;\n\t\tconst rawTable = contract.storage.namespaces[storageNamespaceId]?.entries.table?.[storageTable];\n\t\tif (rawTable === void 0) throw new ContractValidationError(`Model \"${qualifiedName}\" references non-existent table \"${storageNamespaceId}.${storageTable}\"`, \"storage\");\n\t\tconst table = blindCast(rawTable);\n\t\tfor (const fieldName of Object.keys(model.fields)) if (!Object.hasOwn(modelStorage.fields, fieldName)) throw new ContractValidationError(`Model \"${qualifiedName}\" field \"${fieldName}\" has no entry in storage.fields, so no column holds it`, \"storage\");\n\t\tconst columnNames = new Set(Object.keys(table.columns));\n\t\tfor (const [fieldName, field] of Object.entries(modelStorage.fields)) if (!columnNames.has(field.column)) throw new ContractValidationError(`Model \"${qualifiedName}\" field \"${fieldName}\" references non-existent column \"${field.column}\" in table \"${storageTable}\"`, \"storage\");\n\t}\n}\n/** The names of a model's own fields and of the fields it inherits from its base models. */\nfunction fieldNamesWithInherited(contract, namespaceId, modelName) {\n\tconst names = /* @__PURE__ */ new Set();\n\tconst seen = /* @__PURE__ */ new Set();\n\tlet coordinate = {\n\t\tnamespace: namespaceId,\n\t\tmodel: modelName\n\t};\n\twhile (coordinate !== void 0) {\n\t\tconst key = JSON.stringify([coordinate.namespace, coordinate.model]);\n\t\tif (seen.has(key)) break;\n\t\tseen.add(key);\n\t\tconst model = contract.domain.namespaces[coordinate.namespace]?.models[coordinate.model];\n\t\tif (model === void 0) break;\n\t\tfor (const name of Object.keys(model.fields)) names.add(name);\n\t\tcoordinate = model.base;\n\t}\n\treturn names;\n}\n/**\n* Every relation joins on fields: its local fields are fields of the model that declares it, and its target fields are fields of the target model. The target side of a many-to-many relation names columns of its junction table instead. A cross-space relation's target is in another contract, so its target side is not checked. Throws `ContractValidationError` on the first name that is not a field.\n*/\nfunction validateRelationJoinFields(contract) {\n\tfor (const [namespaceId, namespace] of Object.entries(contract.domain.namespaces)) for (const [modelName, model] of Object.entries(namespace.models)) for (const [relationName, relation] of Object.entries(model.relations)) {\n\t\tif (!(\"on\" in relation)) continue;\n\t\tconst location = `Relation \"${relationName}\" on model \"${namespaceId}:${modelName}\"`;\n\t\tconst localFields = fieldNamesWithInherited(contract, namespaceId, modelName);\n\t\tfor (const field of relation.on.localFields) if (!localFields.has(field)) throw new ContractValidationError(`${location} joins on \"${field}\", which is not a field of model \"${namespaceId}:${modelName}\"`, \"domain\");\n\t\tif (relation.cardinality === \"N:M\") {\n\t\t\tconst { namespaceId: junctionNamespaceId, table: junctionTable } = relation.through;\n\t\t\tfor (const column of relation.on.targetFields) if (!lookupStorageColumn(contract, junctionNamespaceId, junctionTable, column)) throw new ContractValidationError(`${location} joins on \"${column}\", which is not a column of junction table \"${junctionNamespaceId}.${junctionTable}\"`, \"domain\");\n\t\t\tcontinue;\n\t\t}\n\t\tif (relation.to.space !== void 0) continue;\n\t\tconst targetFields = fieldNamesWithInherited(contract, relation.to.namespace, relation.to.model);\n\t\tfor (const field of relation.on.targetFields) if (!targetFields.has(field)) throw new ContractValidationError(`${location} joins on \"${field}\", which is not a field of model \"${relation.to.namespace}:${relation.to.model}\"`, \"domain\");\n\t}\n}\n/**\n* Every execution default targets a column some model's field maps: an execution default is declared on a field, and it belongs to that field. Throws `ContractValidationError` on the first default on a column no field maps.\n*/\nfunction validateExecutionDefaultsTargetMappedColumns(contract) {\n\tconst mappedColumns = /* @__PURE__ */ new Set();\n\tfor (const namespace of Object.values(contract.domain.namespaces)) for (const model of Object.values(namespace.models)) {\n\t\tconst modelStorage = blindCast(model.storage);\n\t\tfor (const field of Object.values(modelStorage.fields)) mappedColumns.add(JSON.stringify([\n\t\t\tmodelStorage.namespaceId,\n\t\t\tmodelStorage.table,\n\t\t\tfield.column\n\t\t]));\n\t}\n\tfor (const { ref } of contract.execution?.mutations.defaults ?? []) if (!mappedColumns.has(JSON.stringify([\n\t\tref.namespace,\n\t\tref.entry,\n\t\tref.field\n\t]))) throw new ContractValidationError(`Execution default for column \"${ref.field}\" of table \"${ref.namespace}.${ref.entry}\" targets a column no field maps; execution defaults are declared on fields. Give the column a database default instead.`, \"storage\");\n}\n/**\n* Cross-table consistency checks for SQL storage: primary key, unique,\n* index, and foreign key column references resolve to real columns;\n* NOT NULL columns don't carry a literal `null` default; FK column\n* counts match their referenced columns. Throws on the first mismatch.\n*/\nfunction validateSqlStorageConsistency(contract) {\n\tfor (const { namespaceId, tableName, table: rawTable } of eachStorageTable(contract.storage)) {\n\t\tconst table = blindCast(rawTable);\n\t\tconst columnNames = new Set(Object.keys(table.columns));\n\t\tif (table.primaryKey) {\n\t\t\tfor (const colName of table.primaryKey.columns) if (!columnNames.has(colName)) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" primaryKey references non-existent column \"${colName}\"`, \"storage\");\n\t\t}\n\t\tfor (const unique of table.uniques) for (const colName of unique.columns) if (!columnNames.has(colName)) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" unique constraint references non-existent column \"${colName}\"`, \"storage\");\n\t\tfor (const index of table.indexes) for (const colName of index.columns ?? []) if (!columnNames.has(colName)) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" index references non-existent column \"${colName}\"`, \"storage\");\n\t\tfor (const [colName, column] of Object.entries(table.columns)) if (!column.nullable && column.default?.kind === \"literal\" && column.default.value === null) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" column \"${colName}\" is NOT NULL but has a literal null default`, \"storage\");\n\t\tfor (const fk of table.foreignKeys) {\n\t\t\tif (fk.source.namespaceId !== namespaceId || fk.source.tableName !== tableName) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" contains foreignKey with mismatched source coordinates (${fk.source.namespaceId}.${fk.source.tableName})`, \"storage\");\n\t\t\tfor (const colName of fk.source.columns) if (!columnNames.has(colName)) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" foreignKey references non-existent column \"${colName}\"`, \"storage\");\n\t\t\tif (fk.target.spaceId === void 0) {\n\t\t\t\tconst referencedRaw = contract.storage.namespaces[fk.target.namespaceId]?.entries.table?.[fk.target.tableName];\n\t\t\t\tif (referencedRaw === void 0) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" foreignKey references non-existent table \"${fk.target.namespaceId}.${fk.target.tableName}\"`, \"storage\");\n\t\t\t\tconst referencedTable = blindCast(referencedRaw);\n\t\t\t\tconst referencedColumnNames = new Set(Object.keys(referencedTable.columns));\n\t\t\t\tfor (const colName of fk.target.columns) if (!referencedColumnNames.has(colName)) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" foreignKey references non-existent column \"${colName}\" in table \"${fk.target.tableName}\"`, \"storage\");\n\t\t\t}\n\t\t\tif (fk.source.columns.length !== fk.target.columns.length) throw new ContractValidationError(`Namespace \"${namespaceId}\" table \"${tableName}\" foreignKey column count (${fk.source.columns.length}) does not match referenced column count (${fk.target.columns.length})`, \"storage\");\n\t\t}\n\t}\n}\n/**\n* Full SQL contract validation: structural (arktype) +\n* framework-shared domain + SQL storage logical-consistency + SQL\n* storage semantic + model ↔ storage reference checks. Throws\n* `ContractValidationError` on the first failure. Returns the\n* validated flat-data shape; IR class hydration happens in the SPI\n* base on top of this helper.\n*/\nfunction validateSqlContractFully(value, options) {\n\tconst validated = validateSqlContractStructure(typeof value === \"object\" && value !== null ? (() => {\n\t\tconst { schemaVersion: _, _generated: _g, ...rest } = blindCast(value);\n\t\treturn rest;\n\t})() : value, options?.contractSchema ?? SqlContractSchema);\n\tvalidateContractDomain({\n\t\troots: validated.roots,\n\t\tdomain: validated.domain\n\t});\n\tvalidateSqlStorageConsistency(validated);\n\tconst semanticErrors = validateStorageSemantics(validated.storage);\n\tif (semanticErrors.length > 0) throw new ContractValidationError(`Contract semantic validation failed: ${semanticErrors.join(\"; \")}`, \"storage\");\n\tvalidateModelStorageReferences(validated);\n\tvalidateExecutionDefaultsTargetMappedColumns(validated);\n\tvalidateRelationJoinFields(validated);\n\tvalidateRelationThroughConsistency(validated, options?.dataTypes ?? createDataTypeLookup([]));\n\tvalidateToOneRelationNullabilityAgainstStorage(validated);\n\treturn validated;\n}\n/**\n* A same-space to-one relation that states `nullable` must agree with its local FK columns:\n* nullable exactly when one of them is nullable (a column that cannot be resolved counts as\n* nullable). A relation without the flag is left to hydration, which derives it the same way.\n*/\nfunction validateToOneRelationNullabilityAgainstStorage(contract) {\n\tfor (const [namespaceId, namespace] of Object.entries(contract.domain.namespaces)) for (const [modelName, model] of Object.entries(namespace.models)) {\n\t\tconst storage = blindCast(model.storage);\n\t\tfor (const [relationName, relation] of Object.entries(model.relations)) {\n\t\t\tif (!(\"on\" in relation && (relation.cardinality === \"1:1\" || relation.cardinality === \"N:1\") && relation.to.space === void 0) || relation.nullable === void 0) continue;\n\t\t\tconst location = `Relation \"${relationName}\" on model \"${namespaceId}:${modelName}\"`;\n\t\t\tconst { ownsForeignKey, columns } = resolveSqlToOneRelationStorage(contract, storage, relation);\n\t\t\tif (!ownsForeignKey) {\n\t\t\t\tif (relation.nullable) continue;\n\t\t\t\tthrow new ContractValidationError(`${location} is required but does not own the foreign key, so nothing in storage guarantees the related row exists`, \"storage\");\n\t\t\t}\n\t\t\tconst anyNullable = columns.some((column) => column.nullable);\n\t\t\tif (relation.nullable === anyNullable) continue;\n\t\t\tconst columnList = columns.filter((column) => column.nullable !== relation.nullable).map((column) => `\"${column.name}\"`).join(\", \");\n\t\t\tthrow new ContractValidationError(relation.nullable ? `${location} is nullable but every local FK column is NOT NULL (columns ${columnList})` : `${location} is required but a local FK column is nullable (columns ${columnList})`, \"storage\");\n\t\t}\n\t}\n}\n/** Storage column lookup for through-consistency validation. */\nfunction lookupStorageColumn(contract, namespaceId, tableName, columnName) {\n\tconst rawTable = contract.storage.namespaces[namespaceId]?.entries.table?.[tableName];\n\tif (rawTable === void 0) return;\n\treturn blindCast(rawTable).columns[columnName];\n}\nfunction describeColumnType(column) {\n\treturn column.typeParams === void 0 ? column.dataType : `${column.dataType} ${canonicalizeJson(column.typeParams)}`;\n}\n/**\n* Validates one side of an N:M join: the junction columns and the model\n* columns they pair against positionally must be equal in number, exist in\n* their tables, and have the same type by `sameSqlColumnType`.\n* The junction's storage foreign keys already guarantee this for user-declared\n* FK constraints, but `through` is a logical descriptor never tied to them by\n* the rest of validation — and the TS builder accepts explicit join columns\n* without requiring a junction FK at all — so this checks the columns directly\n* against storage, one path regardless of how the junction was authored.\n*\n* Joined columns must be the *same* storage type, not merely compatible:\n* relying on implicit conversion (e.g. `text`↔`character`) is unsafe on writes\n* — `character(n)` space-padding makes such coercions non-associative — and no\n* ADR sanctions heterogeneous junction columns. Equality is the conservative\n* default; it can be relaxed deliberately if a real use case ever appears.\n*/\nfunction validateThroughJoinSide(input) {\n\tconst fail = (detail) => new ContractValidationError(`Many-to-many relation \"${input.qualifiedName}\" ${detail}`, \"storage\");\n\tif (input.junctionColumns.length !== input.modelColumns.length) throw fail(`pairs ${input.junctionColumnsLabel} (${input.junctionColumns.length}) with ${input.modelColumnsLabel} (${input.modelColumns.length}) of differing length; they join positionally and must match.`);\n\tfor (const [index, junctionColumnName] of input.junctionColumns.entries()) {\n\t\tconst modelColumnRef = input.modelColumns[index];\n\t\tif (modelColumnRef === void 0) continue;\n\t\tconst junctionColumn = lookupStorageColumn(input.contract, input.junctionNamespaceId, input.junctionTable, junctionColumnName);\n\t\tif (junctionColumn === void 0) throw fail(`${input.junctionColumnsLabel} references column \"${junctionColumnName}\" absent from junction table \"${input.junctionNamespaceId}.${input.junctionTable}\".`);\n\t\tconst model = input.model;\n\t\tif (model === void 0) continue;\n\t\tlet modelColumnName = modelColumnRef;\n\t\tif (model.fieldToColumn !== void 0) {\n\t\t\tconst mapped = model.fieldToColumn[modelColumnRef];\n\t\t\tif (mapped === void 0) throw fail(`${input.modelColumnsLabel} references field \"${modelColumnRef}\" absent from model on table \"${model.namespaceId}.${model.table}\".`);\n\t\t\tmodelColumnName = mapped.column;\n\t\t}\n\t\tconst modelColumn = lookupStorageColumn(input.contract, model.namespaceId, model.table, modelColumnName);\n\t\tif (modelColumn === void 0) throw fail(`${input.modelColumnsLabel} references column \"${modelColumnName}\" absent from table \"${model.namespaceId}.${model.table}\".`);\n\t\tif (!sameSqlColumnType(junctionColumn, modelColumn, input.dataTypes)) throw fail(`joins \"${input.junctionTable}.${junctionColumnName}\" (${describeColumnType(junctionColumn)}) with \"${model.table}.${modelColumnName}\" (${describeColumnType(modelColumn)}) of differing storage type; junction columns must match the type of the column they reference.`);\n\t}\n}\n/**\n* Validates that every N:M relation's `through` descriptor is consistent with\n* the storage columns it joins: both join sides match in column count,\n* reference columns that exist in their tables, and pair columns of the same\n* storage type. Without this, a `through` that disagrees with storage surfaces\n* as a silently wrong JOIN at query time rather than a validation error here.\n*/\nfunction validateRelationThroughConsistency(contract, dataTypes) {\n\tfor (const [namespaceId, namespace] of Object.entries(contract.domain.namespaces)) for (const [modelName, model] of Object.entries(namespace.models)) for (const [relationName, relation] of Object.entries(model.relations)) {\n\t\tif (relation.cardinality !== \"N:M\") continue;\n\t\tconst qualifiedName = `${namespaceId}.${modelName}.${relationName}`;\n\t\tconst { on, through } = relation;\n\t\tconst modelStorage = blindCast(model.storage);\n\t\tvalidateThroughJoinSide({\n\t\t\tdataTypes,\n\t\t\tcontract,\n\t\t\tqualifiedName,\n\t\t\tmodelColumns: on.localFields,\n\t\t\tmodelColumnsLabel: \"on.localFields\",\n\t\t\tmodel: {\n\t\t\t\tnamespaceId,\n\t\t\t\ttable: modelStorage.table,\n\t\t\t\tfieldToColumn: modelStorage.fields\n\t\t\t},\n\t\t\tjunctionColumns: through.parentColumns,\n\t\t\tjunctionColumnsLabel: \"through.parentColumns\",\n\t\t\tjunctionNamespaceId: through.namespaceId,\n\t\t\tjunctionTable: through.table\n\t\t});\n\t\tconst targetModel = relation.to.space === void 0 ? contract.domain.namespaces[relation.to.namespace]?.models[relation.to.model] : void 0;\n\t\tconst targetModelSide = targetModel === void 0 ? void 0 : {\n\t\t\tnamespaceId: relation.to.namespace,\n\t\t\ttable: blindCast(targetModel.storage).table\n\t\t};\n\t\tvalidateThroughJoinSide({\n\t\t\tdataTypes,\n\t\t\tcontract,\n\t\t\tqualifiedName,\n\t\t\tmodelColumns: through.targetColumns,\n\t\t\tmodelColumnsLabel: \"through.targetColumns\",\n\t\t\t...ifDefined(\"model\", targetModelSide),\n\t\t\tjunctionColumns: through.childColumns,\n\t\t\tjunctionColumnsLabel: \"through.childColumns\",\n\t\t\tjunctionNamespaceId: through.namespaceId,\n\t\t\tjunctionTable: through.table\n\t\t});\n\t}\n}\n//#endregion\nexport { CheckConstraintSchema, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, IndexSchema, ReferentialActionSchema, StorageTableSchema, StorageValueSetSchema, checkSqlDefaultText, createNamespaceEntrySchema, createSqlContractSchema, createSqlStorageSchema, reservedSqlDefaultText, resolveSqlToOneRelationStorage, validateExecutionDefaultsTargetMappedColumns, validateModel, validateModelStorageReferences, validateRelationJoinFields, validateSqlContractFully, validateSqlStorageConsistency, validateStorage, validateStorageSemantics, valueObjectStorageTypeMissingMessage };\n\n//# sourceMappingURL=validators.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,sBAAsB;;AAE5B,SAAS,oBAAoB,MAAM;CAClC,OAAO,oBAAoB,KAAK,IAAI,IAAI,gGAAgG,KAAK;AAC9I;;;;AAIA,SAAS,uBAAuB,MAAM;CACrC,QAAQ,KAAK,KAAK,GAAlB;EACC,KAAK,SAAS,OAAO;EACrB,KAAK,mBAAmB,OAAO;EAC/B,SAAS;CACV;AACD;AAGA,SAAS,YAAY,MAAM,OAAO;CACjC,OAAO,KAAK,WAAW,MAAM,UAAU,KAAK,OAAO,QAAQ,UAAU,WAAW,MAAM,MAAM;AAC7F;;;;;AAKA,SAAS,+BAA+B,UAAU,cAAc,UAAU;CACzE,MAAM,QAAQ,UAAU,SAAS,QAAQ,WAAW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,OAAO,QAAQ,SAAS,OAAO,UAAU,GAAG,KAAK,MAAM,CAAC,WAAW,UAAU,OAAO,QAAQ,UAAU,MAAM,GAAG,KAAK,MAAM,CAAC,cAAc,aAAa,OAAO,QAAQ,MAAM,SAAS,GAAG;EAC7N,IAAI,SAAS,gBAAgB,OAAO;EACpC,MAAM,gBAAgB,GAAG,YAAY,GAAG,UAAU,GAAG;EACrD,MAAM,EAAE,IAAI,YAAY;EACxB,MAAM,eAAe,UAAU,MAAM,OAAO;EAC5C,wBAAwB;GACvB;GACA;GACA;GACA,cAAc,GAAG;GACjB,mBAAmB;GACnB,OAAO;IACN;IACA,OAAO,aAAa;IACpB,eAAe,aAAa;GAC7B;GACA,iBAAiB,QAAQ;GACzB,sBAAsB;GACtB,qBAAqB,QAAQ;GAC7B,eAAe,QAAQ;EACxB,CAAC;EACD,MAAM,cAAc,SAAS,GAAG,UAAU,KAAK,IAAI,SAAS,OAAO,WAAW,SAAS,GAAG,UAAU,EAAE,OAAO,SAAS,GAAG,SAAS,KAAK;EACvI,MAAM,kBAAkB,gBAAgB,KAAK,IAAI,KAAK,IAAI;GACzD,aAAa,SAAS,GAAG;GACzB,OAAO,UAAU,YAAY,OAAO,CAAC,CAAC;EACvC;EACA,wBAAwB;GACvB;GACA;GACA;GACA,cAAc,QAAQ;GACtB,mBAAmB;GACnB,GAAG,UAAU,SAAS,eAAe;GACrC,iBAAiB,QAAQ;GACzB,sBAAsB;GACtB,qBAAqB,QAAQ;GAC7B,eAAe,QAAQ;EACxB,CAAC;CACF;AACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-family-sql",
3
- "version": "8.0.0-rc.18-dev.37",
3
+ "version": "8.0.0-rc.18-dev.39",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -9,8 +9,8 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "@prisma/orm-framework": "8.0.0-rc.18-dev.37",
13
- "@prisma/orm-toolchain": "8.0.0-rc.18-dev.37",
12
+ "@prisma/orm-framework": "8.0.0-rc.18-dev.39",
13
+ "@prisma/orm-toolchain": "8.0.0-rc.18-dev.39",
14
14
  "@standard-schema/spec": "^1.1.0",
15
15
  "arktype": "^2.2.2",
16
16
  "pathe": "^2.0.3",
@@ -19,21 +19,21 @@
19
19
  "ts-toolbelt": "^9.6.0"
20
20
  },
21
21
  "devDependencies": {
22
- "@internal/family-sql": "8.0.0-rc.18-dev.37",
23
- "@internal/sql-builder": "8.0.0-rc.18-dev.37",
24
- "@internal/sql-contract": "8.0.0-rc.18-dev.37",
25
- "@internal/sql-contract-emitter": "8.0.0-rc.18-dev.37",
26
- "@internal/sql-contract-prisma7": "8.0.0-rc.18-dev.37",
27
- "@internal/sql-contract-psl": "8.0.0-rc.18-dev.37",
28
- "@internal/sql-contract-ts": "8.0.0-rc.18-dev.37",
29
- "@internal/sql-errors": "8.0.0-rc.18-dev.37",
30
- "@internal/sql-operations": "8.0.0-rc.18-dev.37",
31
- "@internal/sql-orm-client": "8.0.0-rc.18-dev.37",
32
- "@internal/sql-relational-core": "8.0.0-rc.18-dev.37",
33
- "@internal/sql-runtime": "8.0.0-rc.18-dev.37",
34
- "@internal/sql-schema-ir": "8.0.0-rc.18-dev.37",
35
- "@repo/tsconfig": "8.0.0-rc.18-dev.37",
36
- "@repo/tsdown": "8.0.0-rc.18-dev.37",
22
+ "@internal/family-sql": "8.0.0-rc.18-dev.39",
23
+ "@internal/sql-builder": "8.0.0-rc.18-dev.39",
24
+ "@internal/sql-contract": "8.0.0-rc.18-dev.39",
25
+ "@internal/sql-contract-emitter": "8.0.0-rc.18-dev.39",
26
+ "@internal/sql-contract-prisma7": "8.0.0-rc.18-dev.39",
27
+ "@internal/sql-contract-psl": "8.0.0-rc.18-dev.39",
28
+ "@internal/sql-contract-ts": "8.0.0-rc.18-dev.39",
29
+ "@internal/sql-errors": "8.0.0-rc.18-dev.39",
30
+ "@internal/sql-operations": "8.0.0-rc.18-dev.39",
31
+ "@internal/sql-orm-client": "8.0.0-rc.18-dev.39",
32
+ "@internal/sql-relational-core": "8.0.0-rc.18-dev.39",
33
+ "@internal/sql-runtime": "8.0.0-rc.18-dev.39",
34
+ "@internal/sql-schema-ir": "8.0.0-rc.18-dev.39",
35
+ "@repo/tsconfig": "8.0.0-rc.18-dev.39",
36
+ "@repo/tsdown": "8.0.0-rc.18-dev.39",
37
37
  "tsdown": "0.22.14",
38
38
  "typescript": "5.9.3"
39
39
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"attribute-specs-CKPSK8oZ.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/sql-attribute-specs-BMzrLYTO.d.mts","../../../../2-sql/2-authoring/contract-psl/dist/attribute-specs.d.mts"],"mappings":";;;;;;;;;UAOU;WACC;WACA;;;UAGD;WACC;WACA,MAAM;;;UAGP;WACC;WACA,oBAAoB,oBAAoB;;;UAGzC;WACC;WACA,MAAM;;KAEZ,kBAAkB,sBAAsB,oBAAoB,kBAAkB,sBAAsB,qBAAqB,sBAAsB,oBAAoB;iBACvJ,iBAAiB,KAAK,4BAA4B;EACjE,OAAO;GACN;iBACc,eAAe,KAAK,uBAAuB;EAC1D;WACS,4CAA4C;WAC5C,uCAAuC;WACvC;WACA;WACA;WACA;WACA,UAAU;GAClB;iBACc,eAAe,KAAK,uBAAuB;WACjD,2CAA2C;WAC3C;WACA;GACR;;cAEW;WACH;aACE,MAAM,MAAM,yBAAyB;MAC5C;OACC;aACM,KAAK,MAAM,yBAAyB;MAC3C;eACS;OACR;aACM,SAAS,MAAM,yBAAyB;MAC/C;eACS;OACR;aACM,cAAc;aACd,cAAc;aACd,UAAU,MAAM,yBAAyB;MAChD;OACC;aACM,gBAAgB,MAAM,yBAAyB;MACtD;OACC;aACM,OAAO,MAAM,yBAAyB;MAC7C,qCAAqC,wBAAwB;MAC7D;OACC;;WAEI;aACE,MAAM,MAAM,8BAA8B;MACjD;OACC;aACM,KAAK,MAAM,8BAA8B;eACvC;OACR;aACM,SAAS,MAAM,8BAA8B;eAC3C;OACR;aACM,WAAW,MAAM,8BAA8B;MACtD;eACS;eACA;eACA;eACA;eACA;eACA;OACR;aACM,gBAAgB;aAChB,WAAW,KAAK,8BAA8B;MACrD,OAAO;OACN;aACM,WAAW,KAAK,8BAA8B;MACrD,OAAO;OACN;;;;;;iBCrFU,gCAAgC,SAAS,aAAa"}