@prisma/orm-family-sql 8.0.0-rc.18-dev.41 → 8.0.0-rc.18-dev.43

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 (79) hide show
  1. package/dist/{attribute-specs-D_fUYNiw.d.mts → attribute-specs-cHzMPvMl.d.mts} +3 -3
  2. package/dist/{attribute-specs-D_fUYNiw.d.mts.map → attribute-specs-cHzMPvMl.d.mts.map} +1 -1
  3. package/dist/{authoring-entity-types-DUQLeBf_-BZ1zRWGY.d.mts → authoring-entity-types-DUQLeBf_-nuhFC6jJ.d.mts} +2 -2
  4. package/dist/{authoring-entity-types-DUQLeBf_-BZ1zRWGY.d.mts.map → authoring-entity-types-DUQLeBf_-nuhFC6jJ.d.mts.map} +1 -1
  5. package/dist/{config-types-CUWdUm6B.mjs → config-types-DY37pCIx.mjs} +2 -2
  6. package/dist/{config-types-CUWdUm6B.mjs.map → config-types-DY37pCIx.mjs.map} +1 -1
  7. package/dist/{contract-builder-DzzgwCZd.mjs → contract-builder-DT689tII.mjs} +61 -12
  8. package/dist/contract-builder-DT689tII.mjs.map +1 -0
  9. package/dist/{contract-builder-Di-2-fFO.d.mts → contract-builder-DZSUqbp0.d.mts} +21 -18
  10. package/dist/contract-builder-DZSUqbp0.d.mts.map +1 -0
  11. package/dist/contract-prisma7__provider.d.mts +4 -2
  12. package/dist/contract-prisma7__provider.d.mts.map +1 -1
  13. package/dist/contract-prisma7__provider.mjs +74 -73
  14. package/dist/contract-prisma7__provider.mjs.map +1 -1
  15. package/dist/contract-psl.d.mts +2 -2
  16. package/dist/contract-psl.d.mts.map +1 -1
  17. package/dist/contract-psl.mjs +1 -1
  18. package/dist/contract-psl__attribute-specs.d.mts +1 -1
  19. package/dist/contract-psl__attribute-specs.mjs +1 -1
  20. package/dist/contract-psl__diagnostics.mjs +1 -1
  21. package/dist/contract-psl__provider.mjs +2 -2
  22. package/dist/contract-psl__provider.mjs.map +1 -1
  23. package/dist/contract-ts.d.mts +1 -1
  24. package/dist/contract-ts.mjs +3 -3
  25. package/dist/contract-ts__config-types.mjs +1 -1
  26. package/dist/contract-ts__contract-builder.d.mts +1 -1
  27. package/dist/contract-ts__contract-builder.mjs +2 -2
  28. package/dist/{control-d-Dlrhh4.mjs → control-CF-KJYTH.mjs} +6 -58
  29. package/dist/control-CF-KJYTH.mjs.map +1 -0
  30. package/dist/{control-LkQLqHHL.d.mts → control-YFLg-7Gn.d.mts} +8 -128
  31. package/dist/control-YFLg-7Gn.d.mts.map +1 -0
  32. package/dist/{default-mapping-CP8q4TfH-CF6eJMej.d.mts → default-mapping-CAOONlKQ-v7GTIkjE.d.mts} +9 -5
  33. package/dist/default-mapping-CAOONlKQ-v7GTIkjE.d.mts.map +1 -0
  34. package/dist/{derived-checks-CwbSfZ8d-B91zqK6B.mjs → derived-checks-CXW9ytkb-B_zxX1-8.mjs} +2 -2
  35. package/dist/{derived-checks-CwbSfZ8d-B91zqK6B.mjs.map → derived-checks-CXW9ytkb-B_zxX1-8.mjs.map} +1 -1
  36. package/dist/{diagnostics-xqFRhSin.mjs → diagnostics-IM48vCjC.mjs} +4 -2
  37. package/dist/diagnostics-IM48vCjC.mjs.map +1 -0
  38. package/dist/family.d.mts +6 -6
  39. package/dist/family.mjs +5 -4
  40. package/dist/family__control.d.mts +2 -2
  41. package/dist/family__control.mjs +2 -2
  42. package/dist/family__pack.d.mts +2 -2
  43. package/dist/family__pack.mjs +3 -25
  44. package/dist/family__psl-build.d.mts +3 -3
  45. package/dist/family__psl-build.mjs +2 -2
  46. package/dist/family__psl-infer.d.mts +1 -1
  47. package/dist/{generator-functions-DErXcNG5-nKYm5qLY.mjs → generator-functions-DuDZSQHE-BbKhsXck.mjs} +30 -26
  48. package/dist/generator-functions-DuDZSQHE-BbKhsXck.mjs.map +1 -0
  49. package/dist/{interpreter-MPFufRkd-D0QvlLTq.mjs → interpreter-DTwRm0sl-DHX1SdeJ.mjs} +11 -7
  50. package/dist/interpreter-DTwRm0sl-DHX1SdeJ.mjs.map +1 -0
  51. package/dist/{pack-74uFuOgh.d.mts → pack-AyeYizq-.d.mts} +152 -28
  52. package/dist/pack-AyeYizq-.d.mts.map +1 -0
  53. package/dist/pack-NM8AYiUp.mjs +80 -0
  54. package/dist/pack-NM8AYiUp.mjs.map +1 -0
  55. package/dist/{psl-build-BkNvqSMz.d.mts → psl-build-C4ia2uM6.d.mts} +10 -8
  56. package/dist/psl-build-C4ia2uM6.d.mts.map +1 -0
  57. package/dist/{psl-build-BSZQ8lC1.mjs → psl-build-D5VG40ej.mjs} +122 -107
  58. package/dist/psl-build-D5VG40ej.mjs.map +1 -0
  59. package/dist/{psl-column-resolution-DNdqpUxt-DlQwgbqn.d.mts → psl-column-resolution-BgThghdu-BWaFlWYV.d.mts} +4 -4
  60. package/dist/psl-column-resolution-BgThghdu-BWaFlWYV.d.mts.map +1 -0
  61. package/dist/{psl-field-resolution-BLtSah2i-BuuJ5H70.mjs → psl-field-resolution-DpGsATq3-BREG9FbU.mjs} +11 -7
  62. package/dist/psl-field-resolution-DpGsATq3-BREG9FbU.mjs.map +1 -0
  63. package/dist/{psl-infer-C-RcAyUr.d.mts → psl-infer-B_n-rSCj.d.mts} +2 -2
  64. package/dist/{psl-infer-C-RcAyUr.d.mts.map → psl-infer-B_n-rSCj.d.mts.map} +1 -1
  65. package/package.json +18 -18
  66. package/dist/contract-builder-Di-2-fFO.d.mts.map +0 -1
  67. package/dist/contract-builder-DzzgwCZd.mjs.map +0 -1
  68. package/dist/control-LkQLqHHL.d.mts.map +0 -1
  69. package/dist/control-d-Dlrhh4.mjs.map +0 -1
  70. package/dist/default-mapping-CP8q4TfH-CF6eJMej.d.mts.map +0 -1
  71. package/dist/diagnostics-xqFRhSin.mjs.map +0 -1
  72. package/dist/family__pack.mjs.map +0 -1
  73. package/dist/generator-functions-DErXcNG5-nKYm5qLY.mjs.map +0 -1
  74. package/dist/interpreter-MPFufRkd-D0QvlLTq.mjs.map +0 -1
  75. package/dist/pack-74uFuOgh.d.mts.map +0 -1
  76. package/dist/psl-build-BSZQ8lC1.mjs.map +0 -1
  77. package/dist/psl-build-BkNvqSMz.d.mts.map +0 -1
  78. package/dist/psl-column-resolution-DNdqpUxt-DlQwgbqn.d.mts.map +0 -1
  79. package/dist/psl-field-resolution-BLtSah2i-BuuJ5H70.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { a as SqlNamespaceBase, c as SqlNamespaceInput } from "./sql-storage-tZhB8nS5-8NSWT0TW.mjs";
2
2
  import "./types-B2Dee96w.mjs";
3
- import { t as ColumnDescriptor } from "./psl-column-resolution-DNdqpUxt-DlQwgbqn.mjs";
3
+ import { t as ColumnDescriptor } from "./psl-column-resolution-BgThghdu-BWaFlWYV.mjs";
4
4
  import { AuthoringContributions, DataTypeSupport } from "@prisma/orm-framework/components/authoring";
5
5
  import { CodecLookupWithDescriptors } from "@prisma/orm-framework/components/codec";
6
6
  import { Contract } from "@prisma/orm-framework/contract/types";
@@ -10,7 +10,7 @@ import { Result } from "@prisma/orm-framework/utils/result";
10
10
  import { ControlMutationDefaults, ControlMutationDefaults as ControlMutationDefaults$1, DefaultFunctionLoweringContext, MutationDefaultGeneratorDescriptor } from "@prisma/orm-framework/components/control";
11
11
  import { Binder, SymbolTable } from "@prisma/orm-framework/psl-parser";
12
12
  import { ContractSourceDiagnostic, ContractSourceDiagnostics } from "@prisma/orm-framework/config/config-types";
13
- //#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-CdBGK6hi.d.mts
13
+ //#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-CPKs9MGq.d.mts
14
14
  //#region src/interpreter.d.ts
15
15
  interface InterpretPslDocumentToSqlContractInput {
16
16
  readonly documents: readonly DocumentAst[];
@@ -1 +1 @@
1
- {"version":3,"file":"contract-psl.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/interpreter-CdBGK6hi.d.mts"],"mappings":";;;;;;;;;;;;;;UAYU;WACC,oBAAoB;WACpB,aAAa;WACb,SAAS;WACT,QAAQ;WACR,QAAQ;WACR,yBAAyB,oBAAoB;WAC7C;WACA,qCAAqC;WACrC,0BAA0B;;WAE1B,oBAAoB;;WAEpB,WAAW;WACX,yBAAyB;;;;;;;;;;WAUzB,4BAA4B,oBAAoB;;WAEhD,kBAAkB,OAAO,sBAAsB;WAC/C,aAAa;WACb,2BAA2B;;WAE3B;aACE;aACA;;WAEF,cAAc;;iBASR,kCAAkC,OAAO,yCAAyC,OAAO,UAAU"}
1
+ {"version":3,"file":"contract-psl.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/interpreter-CPKs9MGq.d.mts"],"mappings":";;;;;;;;;;;;;;UAYU;WACC,oBAAoB;WACpB,aAAa;WACb,SAAS;WACT,QAAQ;WACR,QAAQ;WACR,yBAAyB,oBAAoB;WAC7C;WACA,qCAAqC;WACrC,0BAA0B;;WAE1B,oBAAoB;;WAEpB,WAAW;WACX,yBAAyB;;;;;;;;;;WAUzB,4BAA4B,oBAAoB;;WAEhD,kBAAkB,OAAO,sBAAsB;WAC/C,aAAa;WACb,2BAA2B;;WAE3B;aACE;aACA;;WAEF,cAAc;;iBASR,kCAAkC,OAAO,yCAAyC,OAAO,UAAU"}
@@ -1,2 +1,2 @@
1
- import { i as interpretPslDocumentToSqlContract } from "./interpreter-MPFufRkd-D0QvlLTq.mjs";
1
+ import { i as interpretPslDocumentToSqlContract } from "./interpreter-DTwRm0sl-DHX1SdeJ.mjs";
2
2
  export { interpretPslDocumentToSqlContract };
@@ -1,2 +1,2 @@
1
- import { a as EnumMemberListDefault, c as sqlAttributeSpecs, i as EnumMemberDefault, n as DefaultFunctionCall, o as ParsedNullLiteral, r as DefaultFunctionSignature, s as defaultFunctionCall, t as describeUnsupportedSqlAttribute } from "./attribute-specs-D_fUYNiw.mjs";
1
+ import { a as EnumMemberListDefault, c as sqlAttributeSpecs, i as EnumMemberDefault, n as DefaultFunctionCall, o as ParsedNullLiteral, r as DefaultFunctionSignature, s as defaultFunctionCall, t as describeUnsupportedSqlAttribute } from "./attribute-specs-cHzMPvMl.mjs";
2
2
  export { type DefaultFunctionCall, type DefaultFunctionSignature, type EnumMemberDefault, type EnumMemberListDefault, type ParsedNullLiteral, defaultFunctionCall, describeUnsupportedSqlAttribute, sqlAttributeSpecs };
@@ -1,2 +1,2 @@
1
- import { a as defaultFunctionCall, b as sqlAttributeSpecs, o as describeUnsupportedSqlAttribute } from "./psl-field-resolution-BLtSah2i-BuuJ5H70.mjs";
1
+ import { a as defaultFunctionCall, b as sqlAttributeSpecs, o as describeUnsupportedSqlAttribute } from "./psl-field-resolution-DpGsATq3-BREG9FbU.mjs";
2
2
  export { defaultFunctionCall, describeUnsupportedSqlAttribute, sqlAttributeSpecs };
@@ -1,2 +1,2 @@
1
- import { t as describeUnresolvedSqlType } from "./diagnostics-xqFRhSin.mjs";
1
+ import { t as describeUnresolvedSqlType } from "./diagnostics-IM48vCjC.mjs";
2
2
  export { describeUnresolvedSqlType };
@@ -1,5 +1,5 @@
1
- import { t as applySqlSpecifierControlPolicy } from "./derived-checks-CwbSfZ8d-B91zqK6B.mjs";
2
- import { i as interpretPslDocumentToSqlContract } from "./interpreter-MPFufRkd-D0QvlLTq.mjs";
1
+ import { t as applySqlSpecifierControlPolicy } from "./derived-checks-CXW9ytkb-B_zxX1-8.mjs";
2
+ import { i as interpretPslDocumentToSqlContract } from "./interpreter-DTwRm0sl-DHX1SdeJ.mjs";
3
3
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
4
4
  import { collectScalarTypeConstructors } from "@prisma/orm-framework/components/authoring";
5
5
  import { readFile } from "node:fs/promises";
@@ -1 +1 @@
1
- {"version":3,"file":"contract-psl__provider.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/provider.mjs"],"sourcesContent":["import { n as interpretPslDocumentToSqlContract } from \"./interpreter-MPFufRkd.mjs\";\nimport { buildSymbolTable, createBinder, isPrismaNextSchema, mapPslDiagnostics } from \"@internal/psl-parser\";\nimport { applySqlSpecifierControlPolicy } from \"@internal/sql-contract-ts/contract-builder\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { collectScalarTypeConstructors } from \"@internal/framework-components/authoring\";\nimport { withSeedDiagnostics } from \"@internal/psl-parser/interpret\";\nimport { parse } from \"@internal/psl-parser/syntax\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { readFile } from \"node:fs/promises\";\nimport { basename, extname } from \"pathe\";\nimport { isDynamicPattern } from \"tinyglobby\";\n//#region src/provider.ts\n/**\n* The directory portion of `pattern` before its first glob-magic segment,\n* joined back with `/` (e.g. a `prisma` directory holding a recursive\n* `.prisma` glob derives `./prisma`). A rootless pattern with no static\n* segments yields `''`.\n*/\nfunction staticPrefixDirectory(pattern) {\n\tconst staticSegments = [];\n\tfor (const segment of pattern.replaceAll(\"\\\\\", \"/\").split(\"/\")) {\n\t\tif (isDynamicPattern(segment)) break;\n\t\tstaticSegments.push(segment);\n\t}\n\treturn staticSegments.join(\"/\");\n}\n/**\n* Derives the emit output path from the schema input path so artefacts land\n* colocated with the source (e.g. `src/contract/schema.prisma` →\n* `src/contract/contract.json`). A glob-shaped path derives from its static\n* prefix directory instead (a recursive glob under `prisma` derives\n* `./prisma/contract.json`). The provider owns this because it is the only\n* layer that knows the input path; the upstream `normalizeContractConfig`\n* default is a last-resort fallback for providers that don't carry one.\n*/\nfunction defaultOutputFromSchemaPath(schemaPath) {\n\tif (isDynamicPattern(schemaPath)) {\n\t\tconst prefix = staticPrefixDirectory(schemaPath);\n\t\treturn prefix.length === 0 ? \"contract.json\" : `${prefix}/contract.json`;\n\t}\n\tconst ext = extname(schemaPath);\n\tif (ext.length === 0) return `${schemaPath}.json`;\n\tconst base = schemaPath.slice(0, -ext.length);\n\tif (basename(base) === \"schema\") return `${base.slice(0, -6)}contract.json`;\n\treturn `${base}.json`;\n}\nfunction prismaContract(schemaPath, options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"psl\",\n\t\t\tinputs: [schemaPath],\n\t\t\tinterpret(input, context) {\n\t\t\t\tconst scalarColumnDescriptors = collectScalarTypeConstructors(context.authoringContributions.type);\n\t\t\t\treturn interpretPslDocumentToSqlContract({\n\t\t\t\t\tdocuments: input.documents,\n\t\t\t\t\tsymbolTable: input.symbolTable,\n\t\t\t\t\tsources: input.sources,\n\t\t\t\t\tbinder: input.binder,\n\t\t\t\t\tseedDiagnostics: [],\n\t\t\t\t\ttarget: options.target,\n\t\t\t\t\tauthoringContributions: context.authoringContributions,\n\t\t\t\t\tscalarColumnDescriptors,\n\t\t\t\t\t...ifDefined(\"composedExtensions\", context.composedExtensions.length > 0 ? [...context.composedExtensions] : void 0),\n\t\t\t\t\tcomposedExtensionContracts: context.composedExtensionContracts,\n\t\t\t\t\t...ifDefined(\"composedExtensionPackRefs\", options.composedExtensionPackRefs?.length ? options.composedExtensionPackRefs : void 0),\n\t\t\t\t\tcontrolMutationDefaults: context.controlMutationDefaults,\n\t\t\t\t\tgeneratorFunctions: context.generatorFunctions,\n\t\t\t\t\tcreateNamespace: options.createNamespace,\n\t\t\t\t\tcapabilities: context.capabilities,\n\t\t\t\t\tcodecLookup: context.codecLookup,\n\t\t\t\t\tdataTypes: context.dataTypes,\n\t\t\t\t\t...ifDefined(\"enumInferenceCodecs\", options.enumInferenceCodecs)\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync load(context) {\n\t\t\t\tconst candidates = [...new Set(context.resolvedInputs)].sort();\n\t\t\t\tif (candidates.length === 0) return notOk({\n\t\t\t\t\tsummary: \"No schema files matched the configured contract source\",\n\t\t\t\t\tdiagnostics: [{\n\t\t\t\t\t\tcode: \"PSL_NO_SCHEMA_FILES_MATCHED\",\n\t\t\t\t\t\tmessage: `No files matched the configured pattern \"${schemaPath}\"`,\n\t\t\t\t\t\tsourceId: schemaPath\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tconst readDiagnostics = [];\n\t\t\t\tconst members = [];\n\t\t\t\tconst undirected = [];\n\t\t\t\tfor (const path of candidates) {\n\t\t\t\t\tlet text;\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttext = await readFile(path, \"utf-8\");\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst message = String(error);\n\t\t\t\t\t\treadDiagnostics.push({\n\t\t\t\t\t\t\tcode: \"PSL_SCHEMA_READ_FAILED\",\n\t\t\t\t\t\t\tmessage,\n\t\t\t\t\t\t\tsourceId: path\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (isPrismaNextSchema(text)) members.push({\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\ttext\n\t\t\t\t\t});\n\t\t\t\t\telse undirected.push(path);\n\t\t\t\t}\n\t\t\t\tif (members.length === 0) {\n\t\t\t\t\tif (undirected.length === 0) return notOk({\n\t\t\t\t\t\tsummary: \"Failed to read Prisma schema files\",\n\t\t\t\t\t\tdiagnostics: readDiagnostics\n\t\t\t\t\t});\n\t\t\t\t\treturn notOk({\n\t\t\t\t\t\tsummary: \"No schema file carries the \\\"// use prisma-8\\\" directive\",\n\t\t\t\t\t\tdiagnostics: [...readDiagnostics, {\n\t\t\t\t\t\t\tcode: \"PSL_NO_OPTED_IN_SCHEMA_FILES\",\n\t\t\t\t\t\t\tmessage: `None of the matched files carry the \"// use prisma-8\" directive: ${undirected.join(\", \")}`,\n\t\t\t\t\t\t\tsourceId: schemaPath\n\t\t\t\t\t\t}]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tconst parsed = members.map(({ path, text }) => parse(text, path));\n\t\t\t\tconst documents = parsed.map(({ document }) => document);\n\t\t\t\tconst [firstSources, ...restSources] = parsed.map(({ sources }) => sources);\n\t\t\t\tassertDefined(firstSources, \"prismaContract requires at least one parsed schema file\");\n\t\t\t\tconst sources = firstSources.merge(...restSources);\n\t\t\t\tconst seedDiagnostics = [...readDiagnostics, ...mapPslDiagnostics(parsed.flatMap(({ diagnostics }) => diagnostics), sources)];\n\t\t\t\tconst { symbolTable, diagnostics: symbolTableDiagnostics } = buildSymbolTable({\n\t\t\t\t\tdocuments,\n\t\t\t\t\tsources,\n\t\t\t\t\tdefaultNamespaceId: context.defaultNamespaceId\n\t\t\t\t});\n\t\t\t\tconst { binder, diagnostics: binderDiagnostics } = createBinder({\n\t\t\t\t\tsymbolTable,\n\t\t\t\t\tsources,\n\t\t\t\t\tcontext\n\t\t\t\t});\n\t\t\t\tconst interpreted = withSeedDiagnostics(this.interpret({\n\t\t\t\t\tdocuments,\n\t\t\t\t\tsources,\n\t\t\t\t\tsymbolTable,\n\t\t\t\t\tbinder\n\t\t\t\t}, context), [...seedDiagnostics, ...mapPslDiagnostics([...symbolTableDiagnostics, ...binderDiagnostics], sources)]);\n\t\t\t\tif (!interpreted.ok) return interpreted;\n\t\t\t\treturn ok(applySqlSpecifierControlPolicy(interpreted.value, options.defaultControlPolicy, options.createNamespace));\n\t\t\t}\n\t\t},\n\t\toutput: options.output ?? defaultOutputFromSchemaPath(schemaPath)\n\t};\n}\n//#endregion\nexport { prismaContract };\n\n//# sourceMappingURL=provider.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,SAAS,sBAAsB,SAAS;CACvC,MAAM,iBAAiB,CAAC;CACxB,KAAK,MAAM,WAAW,QAAQ,WAAW,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,GAAG;EAC/D,IAAI,iBAAiB,OAAO,GAAG;EAC/B,eAAe,KAAK,OAAO;CAC5B;CACA,OAAO,eAAe,KAAK,GAAG;AAC/B;;;;;;;;;;AAUA,SAAS,4BAA4B,YAAY;CAChD,IAAI,iBAAiB,UAAU,GAAG;EACjC,MAAM,SAAS,sBAAsB,UAAU;EAC/C,OAAO,OAAO,WAAW,IAAI,kBAAkB,GAAG,OAAO;CAC1D;CACA,MAAM,MAAM,QAAQ,UAAU;CAC9B,IAAI,IAAI,WAAW,GAAG,OAAO,GAAG,WAAW;CAC3C,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AY,IAAI,OAAO;IAC5B,OAAO,GAAG,+BAA+B,YAAY,OAAO,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;GACnH;EACD;EACA,QAAQ,QAAQ,UAAU,4BAA4B,UAAU;CACjE;AACD"}
1
+ {"version":3,"file":"contract-psl__provider.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/provider.mjs"],"sourcesContent":["import { n as interpretPslDocumentToSqlContract } from \"./interpreter-DTwRm0sl.mjs\";\nimport { buildSymbolTable, createBinder, isPrismaNextSchema, mapPslDiagnostics } from \"@internal/psl-parser\";\nimport { applySqlSpecifierControlPolicy } from \"@internal/sql-contract-ts/contract-builder\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { collectScalarTypeConstructors } from \"@internal/framework-components/authoring\";\nimport { withSeedDiagnostics } from \"@internal/psl-parser/interpret\";\nimport { parse } from \"@internal/psl-parser/syntax\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { readFile } from \"node:fs/promises\";\nimport { basename, extname } from \"pathe\";\nimport { isDynamicPattern } from \"tinyglobby\";\n//#region src/provider.ts\n/**\n* The directory portion of `pattern` before its first glob-magic segment,\n* joined back with `/` (e.g. a `prisma` directory holding a recursive\n* `.prisma` glob derives `./prisma`). A rootless pattern with no static\n* segments yields `''`.\n*/\nfunction staticPrefixDirectory(pattern) {\n\tconst staticSegments = [];\n\tfor (const segment of pattern.replaceAll(\"\\\\\", \"/\").split(\"/\")) {\n\t\tif (isDynamicPattern(segment)) break;\n\t\tstaticSegments.push(segment);\n\t}\n\treturn staticSegments.join(\"/\");\n}\n/**\n* Derives the emit output path from the schema input path so artefacts land\n* colocated with the source (e.g. `src/contract/schema.prisma` →\n* `src/contract/contract.json`). A glob-shaped path derives from its static\n* prefix directory instead (a recursive glob under `prisma` derives\n* `./prisma/contract.json`). The provider owns this because it is the only\n* layer that knows the input path; the upstream `normalizeContractConfig`\n* default is a last-resort fallback for providers that don't carry one.\n*/\nfunction defaultOutputFromSchemaPath(schemaPath) {\n\tif (isDynamicPattern(schemaPath)) {\n\t\tconst prefix = staticPrefixDirectory(schemaPath);\n\t\treturn prefix.length === 0 ? \"contract.json\" : `${prefix}/contract.json`;\n\t}\n\tconst ext = extname(schemaPath);\n\tif (ext.length === 0) return `${schemaPath}.json`;\n\tconst base = schemaPath.slice(0, -ext.length);\n\tif (basename(base) === \"schema\") return `${base.slice(0, -6)}contract.json`;\n\treturn `${base}.json`;\n}\nfunction prismaContract(schemaPath, options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"psl\",\n\t\t\tinputs: [schemaPath],\n\t\t\tinterpret(input, context) {\n\t\t\t\tconst scalarColumnDescriptors = collectScalarTypeConstructors(context.authoringContributions.type);\n\t\t\t\treturn interpretPslDocumentToSqlContract({\n\t\t\t\t\tdocuments: input.documents,\n\t\t\t\t\tsymbolTable: input.symbolTable,\n\t\t\t\t\tsources: input.sources,\n\t\t\t\t\tbinder: input.binder,\n\t\t\t\t\tseedDiagnostics: [],\n\t\t\t\t\ttarget: options.target,\n\t\t\t\t\tauthoringContributions: context.authoringContributions,\n\t\t\t\t\tscalarColumnDescriptors,\n\t\t\t\t\t...ifDefined(\"composedExtensions\", context.composedExtensions.length > 0 ? [...context.composedExtensions] : void 0),\n\t\t\t\t\tcomposedExtensionContracts: context.composedExtensionContracts,\n\t\t\t\t\t...ifDefined(\"composedExtensionPackRefs\", options.composedExtensionPackRefs?.length ? options.composedExtensionPackRefs : void 0),\n\t\t\t\t\tcontrolMutationDefaults: context.controlMutationDefaults,\n\t\t\t\t\tgeneratorFunctions: context.generatorFunctions,\n\t\t\t\t\tcreateNamespace: options.createNamespace,\n\t\t\t\t\tcapabilities: context.capabilities,\n\t\t\t\t\tcodecLookup: context.codecLookup,\n\t\t\t\t\tdataTypes: context.dataTypes,\n\t\t\t\t\t...ifDefined(\"enumInferenceCodecs\", options.enumInferenceCodecs)\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync load(context) {\n\t\t\t\tconst candidates = [...new Set(context.resolvedInputs)].sort();\n\t\t\t\tif (candidates.length === 0) return notOk({\n\t\t\t\t\tsummary: \"No schema files matched the configured contract source\",\n\t\t\t\t\tdiagnostics: [{\n\t\t\t\t\t\tcode: \"PSL_NO_SCHEMA_FILES_MATCHED\",\n\t\t\t\t\t\tmessage: `No files matched the configured pattern \"${schemaPath}\"`,\n\t\t\t\t\t\tsourceId: schemaPath\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tconst readDiagnostics = [];\n\t\t\t\tconst members = [];\n\t\t\t\tconst undirected = [];\n\t\t\t\tfor (const path of candidates) {\n\t\t\t\t\tlet text;\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttext = await readFile(path, \"utf-8\");\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst message = String(error);\n\t\t\t\t\t\treadDiagnostics.push({\n\t\t\t\t\t\t\tcode: \"PSL_SCHEMA_READ_FAILED\",\n\t\t\t\t\t\t\tmessage,\n\t\t\t\t\t\t\tsourceId: path\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (isPrismaNextSchema(text)) members.push({\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\ttext\n\t\t\t\t\t});\n\t\t\t\t\telse undirected.push(path);\n\t\t\t\t}\n\t\t\t\tif (members.length === 0) {\n\t\t\t\t\tif (undirected.length === 0) return notOk({\n\t\t\t\t\t\tsummary: \"Failed to read Prisma schema files\",\n\t\t\t\t\t\tdiagnostics: readDiagnostics\n\t\t\t\t\t});\n\t\t\t\t\treturn notOk({\n\t\t\t\t\t\tsummary: \"No schema file carries the \\\"// use prisma-8\\\" directive\",\n\t\t\t\t\t\tdiagnostics: [...readDiagnostics, {\n\t\t\t\t\t\t\tcode: \"PSL_NO_OPTED_IN_SCHEMA_FILES\",\n\t\t\t\t\t\t\tmessage: `None of the matched files carry the \"// use prisma-8\" directive: ${undirected.join(\", \")}`,\n\t\t\t\t\t\t\tsourceId: schemaPath\n\t\t\t\t\t\t}]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tconst parsed = members.map(({ path, text }) => parse(text, path));\n\t\t\t\tconst documents = parsed.map(({ document }) => document);\n\t\t\t\tconst [firstSources, ...restSources] = parsed.map(({ sources }) => sources);\n\t\t\t\tassertDefined(firstSources, \"prismaContract requires at least one parsed schema file\");\n\t\t\t\tconst sources = firstSources.merge(...restSources);\n\t\t\t\tconst seedDiagnostics = [...readDiagnostics, ...mapPslDiagnostics(parsed.flatMap(({ diagnostics }) => diagnostics), sources)];\n\t\t\t\tconst { symbolTable, diagnostics: symbolTableDiagnostics } = buildSymbolTable({\n\t\t\t\t\tdocuments,\n\t\t\t\t\tsources,\n\t\t\t\t\tdefaultNamespaceId: context.defaultNamespaceId\n\t\t\t\t});\n\t\t\t\tconst { binder, diagnostics: binderDiagnostics } = createBinder({\n\t\t\t\t\tsymbolTable,\n\t\t\t\t\tsources,\n\t\t\t\t\tcontext\n\t\t\t\t});\n\t\t\t\tconst interpreted = withSeedDiagnostics(this.interpret({\n\t\t\t\t\tdocuments,\n\t\t\t\t\tsources,\n\t\t\t\t\tsymbolTable,\n\t\t\t\t\tbinder\n\t\t\t\t}, context), [...seedDiagnostics, ...mapPslDiagnostics([...symbolTableDiagnostics, ...binderDiagnostics], sources)]);\n\t\t\t\tif (!interpreted.ok) return interpreted;\n\t\t\t\treturn ok(applySqlSpecifierControlPolicy(interpreted.value, options.defaultControlPolicy, options.createNamespace));\n\t\t\t}\n\t\t},\n\t\toutput: options.output ?? defaultOutputFromSchemaPath(schemaPath)\n\t};\n}\n//#endregion\nexport { prismaContract };\n\n//# sourceMappingURL=provider.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,SAAS,sBAAsB,SAAS;CACvC,MAAM,iBAAiB,CAAC;CACxB,KAAK,MAAM,WAAW,QAAQ,WAAW,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG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5H,MAAM,EAAE,aAAa,aAAa,2BAA2B,iBAAiB;KAC7E;KACA;KACA,oBAAoB,QAAQ;IAC7B,CAAC;IACD,MAAM,EAAE,QAAQ,aAAa,sBAAsB,aAAa;KAC/D;KACA;KACA;IACD,CAAC;IACD,MAAM,cAAc,oBAAoB,KAAK,UAAU;KACtD;KACA;KACA;KACA;IACD,GAAG,OAAO,GAAG,CAAC,GAAG,iBAAiB,GAAG,kBAAkB,CAAC,GAAG,wBAAwB,GAAG,iBAAiB,GAAG,OAAO,CAAC,CAAC;IACnH,IAAI,CAAC,YAAY,IAAI,OAAO;IAC5B,OAAO,GAAG,+BAA+B,YAAY,OAAO,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;GACnH;EACD;EACA,QAAQ,QAAQ,UAAU,4BAA4B,UAAU;CACjE;AACD"}
@@ -1,5 +1,5 @@
1
1
  import { n as applySqlSpecifierControlPolicy, t as SqlNamespaceFactory } from "./derived-checks-DpPkO6Dt-D-vp9vY3.mjs";
2
2
  import { r as SqlExpression, u as sql } from "./sql-expression-BAtH-2UU.mjs";
3
- import { $ as extensionModel, A as MergeEnums, B as UniqueConstraintNode, C as ForeignKeyTableReference, D as IndexOptionsFunction, E as IndexNode, F as ScalarFieldBuilder, G as bindEnumType, H as ValueObjectMemberNode, I as ScalarMemberNode, J as buildSqlContractFromDefinition, K as buildBoundContract, L as TableNode, M as ModelNode, N as PrimaryKeyNode, O as IndexOptionsInput, P as RelationNode, Q as enumType, R as TableProperties, S as ForeignKeyNode, T as IndexExpressionInput, U as ValueObjectNode, V as ValueObjectFieldNode, W as autoincrement, X as createComposedAuthoringHelpers, Y as check, Z as defineContract, _ as EnumMember, a as CheckNode, at as rel, b as FieldNode, c as ColumnNode, d as ContractDefinition, et as field, f as ContractInput, g as DeferredIndexOptions, h as DeferredIndexExpression, i as BoundEnumType, it as now, j as ModelLike, k as ManyOptions, l as ColumnRef, m as DeferredIndexColumn, n as AuthoredColumnDefault, nt as member, o as CodecInput, ot as storedAsListColumn, p as ContractModelBuilder, q as buildContractDefinition, r as AuthoredColumnDefaultLiteralValue, rt as model, s as CodecTypeMap, t as AttachedEntities, tt as isValueObjectMember, u as ComposedAuthoringHelpers, v as EnumTypeHandle, w as IndexConstraint, x as ForeignKeyModelReference, y as ExtractCodecTypesFromPack, z as TargetFieldRef } from "./contract-builder-Di-2-fFO.mjs";
3
+ import { $ as extensionModel, A as MergeEnums, B as UniqueConstraintNode, C as ForeignKeyTableReference, D as IndexOptionsFunction, E as IndexNode, F as ScalarFieldBuilder, G as bindEnumType, H as ValueObjectMemberNode, I as ScalarMemberNode, J as buildSqlContractFromDefinition, K as buildBoundContract, L as TableNode, M as ModelNode, N as PrimaryKeyNode, O as IndexOptionsInput, P as RelationNode, Q as enumType, R as TableProperties, S as ForeignKeyNode, T as IndexExpressionInput, U as ValueObjectNode, V as ValueObjectFieldNode, W as autoincrement, X as createComposedAuthoringHelpers, Y as check, Z as defineContract, _ as EnumMember, a as CheckNode, at as rel, b as FieldNode, c as ColumnNode, d as ContractDefinition, et as field, f as ContractInput, g as DeferredIndexOptions, h as DeferredIndexExpression, i as BoundEnumType, it as now, j as ModelLike, k as ManyOptions, l as ColumnRef, m as DeferredIndexColumn, n as AuthoredColumnDefault, nt as member, o as CodecInput, ot as storedAsListColumn, p as ContractModelBuilder, q as buildContractDefinition, r as AuthoredColumnDefaultLiteralValue, rt as model, s as CodecTypeMap, t as AttachedEntities, tt as isValueObjectMember, u as ComposedAuthoringHelpers, v as EnumTypeHandle, w as IndexConstraint, x as ForeignKeyModelReference, y as ExtractCodecTypesFromPack, z as TargetFieldRef } from "./contract-builder-DZSUqbp0.mjs";
4
4
  import { i as typescriptContractFromPath, n as emptyContract, r as typescriptContract, t as ContractConfig } from "./config-types-DN0IueHY.mjs";
5
5
  export { type AttachedEntities, type AuthoredColumnDefault, type AuthoredColumnDefaultLiteralValue, type BoundEnumType, type CheckNode, type CodecInput, type CodecTypeMap, type ColumnNode, type ColumnRef, type ComposedAuthoringHelpers, type ContractConfig, type ContractDefinition, type ContractInput, type ContractModelBuilder, type DeferredIndexColumn, type DeferredIndexExpression, type DeferredIndexOptions, type EnumMember, type EnumTypeHandle, type ExtractCodecTypesFromPack, type FieldNode, type ForeignKeyModelReference, type ForeignKeyNode, type ForeignKeyTableReference, type IndexConstraint, type IndexExpressionInput, type IndexNode, type IndexOptionsFunction, type IndexOptionsInput, type ManyOptions, type MergeEnums, type ModelLike, type ModelNode, type PrimaryKeyNode, type RelationNode, type ScalarFieldBuilder, type ScalarMemberNode, type SqlExpression, type SqlNamespaceFactory, type TableNode, type TableProperties, type TargetFieldRef, type UniqueConstraintNode, type ValueObjectFieldNode, type ValueObjectMemberNode, type ValueObjectNode, applySqlSpecifierControlPolicy, autoincrement, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, createComposedAuthoringHelpers, defineContract, emptyContract, enumType, extensionModel, field, isValueObjectMember, member, model, now, rel, sql, storedAsListColumn, typescriptContract, typescriptContractFromPath };
@@ -1,5 +1,5 @@
1
1
  import { l as sql } from "./sql-expression-BJCuy-WI.mjs";
2
- import { a as storedAsListColumn, i as isValueObjectMember, n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-CwbSfZ8d-B91zqK6B.mjs";
3
- import { a as check, c as enumType, d as member, f as model, i as buildContractDefinition, l as extensionModel, m as rel, n as bindEnumType, o as createComposedAuthoringHelpers, p as now, r as buildBoundContract, s as defineContract, t as autoincrement, u as field } from "./contract-builder-DzzgwCZd.mjs";
4
- import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-CUWdUm6B.mjs";
2
+ import { a as storedAsListColumn, i as isValueObjectMember, n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-CXW9ytkb-B_zxX1-8.mjs";
3
+ import { a as check, c as enumType, d as member, f as model, i as buildContractDefinition, l as extensionModel, m as rel, n as bindEnumType, o as createComposedAuthoringHelpers, p as now, r as buildBoundContract, s as defineContract, t as autoincrement, u as field } from "./contract-builder-DT689tII.mjs";
4
+ import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-DY37pCIx.mjs";
5
5
  export { applySqlSpecifierControlPolicy, autoincrement, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, createComposedAuthoringHelpers, defineContract, emptyContract, enumType, extensionModel, field, isValueObjectMember, member, model, now, rel, sql, storedAsListColumn, typescriptContract, typescriptContractFromPath };
@@ -1,2 +1,2 @@
1
- import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-CUWdUm6B.mjs";
1
+ import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-DY37pCIx.mjs";
2
2
  export { emptyContract, typescriptContract, typescriptContractFromPath };
@@ -1,4 +1,4 @@
1
1
  import { n as applySqlSpecifierControlPolicy, t as SqlNamespaceFactory } from "./derived-checks-DpPkO6Dt-D-vp9vY3.mjs";
2
2
  import { r as SqlExpression, u as sql } from "./sql-expression-BAtH-2UU.mjs";
3
- import { $ as extensionModel, A as MergeEnums, B as UniqueConstraintNode, C as ForeignKeyTableReference, D as IndexOptionsFunction, E as IndexNode, F as ScalarFieldBuilder, G as bindEnumType, H as ValueObjectMemberNode, I as ScalarMemberNode, J as buildSqlContractFromDefinition, K as buildBoundContract, L as TableNode, M as ModelNode, N as PrimaryKeyNode, O as IndexOptionsInput, P as RelationNode, Q as enumType, R as TableProperties, S as ForeignKeyNode, T as IndexExpressionInput, U as ValueObjectNode, V as ValueObjectFieldNode, W as autoincrement, X as createComposedAuthoringHelpers, Y as check, Z as defineContract, _ as EnumMember, a as CheckNode, at as rel, b as FieldNode, c as ColumnNode, d as ContractDefinition, et as field, f as ContractInput, g as DeferredIndexOptions, h as DeferredIndexExpression, i as BoundEnumType, it as now, j as ModelLike, k as ManyOptions, l as ColumnRef, m as DeferredIndexColumn, n as AuthoredColumnDefault, nt as member, o as CodecInput, ot as storedAsListColumn, p as ContractModelBuilder, q as buildContractDefinition, r as AuthoredColumnDefaultLiteralValue, rt as model, s as CodecTypeMap, t as AttachedEntities, tt as isValueObjectMember, u as ComposedAuthoringHelpers, v as EnumTypeHandle, w as IndexConstraint, x as ForeignKeyModelReference, y as ExtractCodecTypesFromPack, z as TargetFieldRef } from "./contract-builder-Di-2-fFO.mjs";
3
+ import { $ as extensionModel, A as MergeEnums, B as UniqueConstraintNode, C as ForeignKeyTableReference, D as IndexOptionsFunction, E as IndexNode, F as ScalarFieldBuilder, G as bindEnumType, H as ValueObjectMemberNode, I as ScalarMemberNode, J as buildSqlContractFromDefinition, K as buildBoundContract, L as TableNode, M as ModelNode, N as PrimaryKeyNode, O as IndexOptionsInput, P as RelationNode, Q as enumType, R as TableProperties, S as ForeignKeyNode, T as IndexExpressionInput, U as ValueObjectNode, V as ValueObjectFieldNode, W as autoincrement, X as createComposedAuthoringHelpers, Y as check, Z as defineContract, _ as EnumMember, a as CheckNode, at as rel, b as FieldNode, c as ColumnNode, d as ContractDefinition, et as field, f as ContractInput, g as DeferredIndexOptions, h as DeferredIndexExpression, i as BoundEnumType, it as now, j as ModelLike, k as ManyOptions, l as ColumnRef, m as DeferredIndexColumn, n as AuthoredColumnDefault, nt as member, o as CodecInput, ot as storedAsListColumn, p as ContractModelBuilder, q as buildContractDefinition, r as AuthoredColumnDefaultLiteralValue, rt as model, s as CodecTypeMap, t as AttachedEntities, tt as isValueObjectMember, u as ComposedAuthoringHelpers, v as EnumTypeHandle, w as IndexConstraint, x as ForeignKeyModelReference, y as ExtractCodecTypesFromPack, z as TargetFieldRef } from "./contract-builder-DZSUqbp0.mjs";
4
4
  export { type AttachedEntities, type AuthoredColumnDefault, type AuthoredColumnDefaultLiteralValue, type BoundEnumType, type CheckNode, type CodecInput, type CodecTypeMap, type ColumnNode, type ColumnRef, type ComposedAuthoringHelpers, type ContractDefinition, type ContractInput, type ContractModelBuilder, type DeferredIndexColumn, type DeferredIndexExpression, type DeferredIndexOptions, type EnumMember, type EnumTypeHandle, type ExtractCodecTypesFromPack, type FieldNode, type ForeignKeyModelReference, type ForeignKeyNode, type ForeignKeyTableReference, type IndexConstraint, type IndexExpressionInput, type IndexNode, type IndexOptionsFunction, type IndexOptionsInput, type ManyOptions, type MergeEnums, type ModelLike, type ModelNode, type PrimaryKeyNode, type RelationNode, type ScalarFieldBuilder, type ScalarMemberNode, type SqlExpression, type SqlNamespaceFactory, type TableNode, type TableProperties, type TargetFieldRef, type UniqueConstraintNode, type ValueObjectFieldNode, type ValueObjectMemberNode, type ValueObjectNode, applySqlSpecifierControlPolicy, autoincrement, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, createComposedAuthoringHelpers, defineContract, enumType, extensionModel, field, isValueObjectMember, member, model, now, rel, sql, storedAsListColumn };
@@ -1,4 +1,4 @@
1
1
  import { l as sql } from "./sql-expression-BJCuy-WI.mjs";
2
- import { a as storedAsListColumn, i as isValueObjectMember, n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-CwbSfZ8d-B91zqK6B.mjs";
3
- import { a as check, c as enumType, d as member, f as model, i as buildContractDefinition, l as extensionModel, m as rel, n as bindEnumType, o as createComposedAuthoringHelpers, p as now, r as buildBoundContract, s as defineContract, t as autoincrement, u as field } from "./contract-builder-DzzgwCZd.mjs";
2
+ import { a as storedAsListColumn, i as isValueObjectMember, n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-CXW9ytkb-B_zxX1-8.mjs";
3
+ import { a as check, c as enumType, d as member, f as model, i as buildContractDefinition, l as extensionModel, m as rel, n as bindEnumType, o as createComposedAuthoringHelpers, p as now, r as buildBoundContract, s as defineContract, t as autoincrement, u as field } from "./contract-builder-DT689tII.mjs";
4
4
  export { applySqlSpecifierControlPolicy, autoincrement, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, createComposedAuthoringHelpers, defineContract, enumType, extensionModel, field, isValueObjectMember, member, model, now, rel, sql, storedAsListColumn };
@@ -6,17 +6,17 @@ import { c as SqlSchemaIR, n as RelationalSchemaNodeKind, u as SqlTableIR } from
6
6
  import { f as sqlExpressionRegistration, m as sqlTextsReadBack, o as printSqlExpressionLiteral } from "./sql-expression-BJCuy-WI.mjs";
7
7
  import { d as resolvedTypeParams, u as isStorageTypeInstance } from "./types-M_FeBD9w.mjs";
8
8
  import { g as valueObjectStorageTypeMissingMessage } from "./validators-Cfy0jmZ2.mjs";
9
- import { b as sqlAttributeSpecs, o as describeUnsupportedSqlAttribute } from "./psl-field-resolution-BLtSah2i-BuuJ5H70.mjs";
10
- import { t as describeUnresolvedSqlType } from "./diagnostics-xqFRhSin.mjs";
9
+ import { b as sqlAttributeSpecs, o as describeUnsupportedSqlAttribute } from "./psl-field-resolution-DpGsATq3-BREG9FbU.mjs";
10
+ import { t as describeUnresolvedSqlType } from "./diagnostics-IM48vCjC.mjs";
11
11
  import { t as sqlEmission } from "./dist-Bxu8hzMC.mjs";
12
- import { a as sqlFamilyGeneratorDescriptors, i as sqlFamilyEntityTypes, n as sqlFamilyAuthoringFieldPresets, o as sqlFamilyGeneratorFunctions, r as sqlFamilyAuthoringTypes, s as sqlFamilyPslBlockDescriptors } from "./generator-functions-DErXcNG5-nKYm5qLY.mjs";
12
+ import { a as sqlFamilyGeneratorDescriptors, i as sqlFamilyEntityTypes, n as sqlFamilyAuthoringFieldPresets, o as sqlFamilyGeneratorFunctions, r as sqlFamilyAuthoringTypes, s as sqlFamilyPslBlockDescriptors } from "./generator-functions-DuDZSQHE-BbKhsXck.mjs";
13
13
  import { c as verifySqlSchemaByDiff, n as classifyDiffSubjectGranularity, o as enforceSqlDataTypeInvariants, t as classifyDiffEntityKind } from "./schema-verify-BwRdzbHb-DfFAS0EC.mjs";
14
14
  import { t as sqlFamilyError } from "./errors-B5g0xWro-mWH2C07F.mjs";
15
15
  import { t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-CpZa5Nlt.mjs";
16
16
  import { t as collectSupportedCodecTypeIds } from "./verify-BVk5bjdH-dq5M4iIh.mjs";
17
17
  import { isStructuredError, structuredError } from "@prisma/orm-framework/utils/structured-error";
18
18
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
19
- import { TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG, TIMESTAMP_NOW_GENERATOR_ID, collectScalarTypeConstructors, temporalAuthoringPresets, temporalPhaseTemplate, temporalPhaseTemplateWithParams, tsTaggedTemplateSource } from "@prisma/orm-framework/components/authoring";
19
+ import { collectScalarTypeConstructors, tsTaggedTemplateSource } from "@prisma/orm-framework/components/authoring";
20
20
  import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
21
21
  import { UNBOUND_NAMESPACE_ID, isPlainRecord } from "@prisma/orm-framework/components/ir";
22
22
  import { assembleDataTypes, codecForRef, dataTypeParams, objectSchemaKeys } from "@prisma/orm-framework/components/codec";
@@ -2605,60 +2605,8 @@ function namedTypesOf(namedTypes) {
2605
2605
  }
2606
2606
  return result;
2607
2607
  }
2608
- function temporalStringAuthoringPresets(input) {
2609
- const presets = temporalAuthoringPresets(input);
2610
- return {
2611
- createdAtString: presets.createdAt,
2612
- updatedAtString: presets.updatedAt
2613
- };
2614
- }
2615
- const TEMPORAL_PRECISION_ARG = {
2616
- name: "precision",
2617
- kind: "number",
2618
- optional: true,
2619
- integer: true
2620
- };
2621
- const PRECISION_PARAMS = { precision: {
2622
- kind: "arg",
2623
- index: 0
2624
- } };
2625
- /**
2626
- * Builds a `temporal.<codec>` field preset for a codec that takes a precision
2627
- * parameter (`pg/timestamp-temporal@1`, `pg/timestamptz-temporal@1`). Arguments change field
2628
- * properties only — never the codec, which the caller fixes here.
2629
- *
2630
- * All three arguments are optional: omitting `precision` omits `typeParams`
2631
- * entirely, and omitting a phase omits that phase (both omitted omits
2632
- * `executionDefaults`). With `nowTakesPrecision`, the generator a `now` selects
2633
- * also receives the precision as its `precision` param, so it can write a value
2634
- * the column stores without rounding.
2635
- */
2636
- /* @__NO_SIDE_EFFECTS__ */
2637
- function temporalCodecPresetWithPrecision(input) {
2638
- const generatorId = input.generatorId ?? TIMESTAMP_NOW_GENERATOR_ID;
2639
- const phase = (index) => input.nowTakesPrecision === true ? temporalPhaseTemplateWithParams(index, generatorId, PRECISION_PARAMS) : temporalPhaseTemplate(index, generatorId);
2640
- return {
2641
- kind: "fieldPreset",
2642
- args: [
2643
- TEMPORAL_PRECISION_ARG,
2644
- TEMPORAL_ON_CREATE_ARG,
2645
- TEMPORAL_ON_UPDATE_ARG
2646
- ],
2647
- output: {
2648
- codecId: input.codecId,
2649
- typeParams: { precision: {
2650
- kind: "arg",
2651
- index: 0
2652
- } },
2653
- executionDefaults: {
2654
- onCreate: phase(1),
2655
- onUpdate: phase(2)
2656
- }
2657
- }
2658
- };
2659
- }
2660
2608
  var control_default = new SqlFamilyDescriptor();
2661
2609
  //#endregion
2662
- export { unmatchedColumnRename as $, plannerFailure as A, rowsWithoutValueSummary as B, isUnfilledSlot as C, planFieldEventCalls as D, partitionIssuesByControlPolicy as E, requiredColumnOf as F, sqlOfSlot as G, runnerSuccess as H, requiredColumnsOfMigration as I, subjectsOfCalls as J, sqlTypeLookupsOf as K, resolveColumnRenameAgainst as L, readColumnDefault as M, readReportedDefault as N, planFieldEventOperations as O, requiredColumnMeta as P, unknownCallNames as Q, resolveTableRenameAgainst as R, fieldStatementColumns as S, partitionCallsByControlPolicy as T, slotSource as U, runnerFailure as V, sqlDefaultFunctions as W, temporalStringAuthoringPresets as X, temporalCodecPresetWithPrecision as Y, unconvertedFieldOf as Z, detectDestructiveChanges as _, assembleAuthoringContributions$1 as a, fieldOfColumn as b, columnTakesTemporaryValue as c, contractToSchemaIR as d, unmatchedTableRename as et, control_default as f, createSqlTextSources as g, createMigrationPlan as h, appliedStatementsInOrder as i, plannerSuccess as j, planStatements as k, contractColumns as l, convertedColumnOf as m, INIT_ADDITIVE_POLICY as n, backfillOfDefaultedField as o, convertedColumnMeta as p, storageNameOfOperation as q, TABLE_NAME_CASE_CHANGED_CODE as r, checkSqlExpressionText as s, COLUMN_RENAME_UNMATCHED_CODE as t, contractNamespaceToSchemaIR as u, detectTableNameCaseChanges as v, modelRenameStorageEffect as w, fieldRenameStorageEffect as x, fieldEventStorage as y, rowsWithoutValueFailure as z };
2610
+ export { plannerFailure as A, rowsWithoutValueSummary as B, isUnfilledSlot as C, planFieldEventCalls as D, partitionIssuesByControlPolicy as E, requiredColumnOf as F, sqlOfSlot as G, runnerSuccess as H, requiredColumnsOfMigration as I, subjectsOfCalls as J, sqlTypeLookupsOf as K, resolveColumnRenameAgainst as L, readColumnDefault as M, readReportedDefault as N, planFieldEventOperations as O, requiredColumnMeta as P, unmatchedTableRename as Q, resolveTableRenameAgainst as R, fieldStatementColumns as S, partitionCallsByControlPolicy as T, slotSource as U, runnerFailure as V, sqlDefaultFunctions as W, unknownCallNames as X, unconvertedFieldOf as Y, unmatchedColumnRename as Z, detectDestructiveChanges as _, assembleAuthoringContributions$1 as a, fieldOfColumn as b, columnTakesTemporaryValue as c, contractToSchemaIR as d, control_default as f, createSqlTextSources as g, createMigrationPlan as h, appliedStatementsInOrder as i, plannerSuccess as j, planStatements as k, contractColumns as l, convertedColumnOf as m, INIT_ADDITIVE_POLICY as n, backfillOfDefaultedField as o, convertedColumnMeta as p, storageNameOfOperation as q, TABLE_NAME_CASE_CHANGED_CODE as r, checkSqlExpressionText as s, COLUMN_RENAME_UNMATCHED_CODE as t, contractNamespaceToSchemaIR as u, detectTableNameCaseChanges as v, modelRenameStorageEffect as w, fieldRenameStorageEffect as x, fieldEventStorage as y, rowsWithoutValueFailure as z };
2663
2611
 
2664
- //# sourceMappingURL=control-d-Dlrhh4.mjs.map
2612
+ //# sourceMappingURL=control-CF-KJYTH.mjs.map