@prisma/orm-target-postgres 8.0.0-rc.18-dev.6 → 8.0.0-rc.18-dev.7

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 (94) hide show
  1. package/dist/{adapter-0nX__6wz-Cv78OA3n.mjs → adapter-DXUJlrmB-7Lk8j0kE.mjs} +3 -3
  2. package/dist/{adapter-0nX__6wz-Cv78OA3n.mjs.map → adapter-DXUJlrmB-7Lk8j0kE.mjs.map} +1 -1
  3. package/dist/{adapter-BXHPMNAg.d.mts → adapter-giV1nqJs.d.mts} +3 -3
  4. package/dist/{adapter-BXHPMNAg.d.mts.map → adapter-giV1nqJs.d.mts.map} +1 -1
  5. package/dist/adapter.d.mts +2 -2
  6. package/dist/adapter.mjs +2 -2
  7. package/dist/adapter__adapter.d.mts +1 -1
  8. package/dist/adapter__adapter.mjs +2 -2
  9. package/dist/adapter__control.d.mts +1 -1
  10. package/dist/adapter__control.mjs +3 -3
  11. package/dist/adapter__control.mjs.map +1 -1
  12. package/dist/adapter__runtime.mjs +2 -2
  13. package/dist/adapter__runtime.mjs.map +1 -1
  14. package/dist/{contract-free-DY8vDIxh.d.mts → contract-free-D-v6WIhk.d.mts} +16 -4
  15. package/dist/{contract-free-DY8vDIxh.d.mts.map → contract-free-D-v6WIhk.d.mts.map} +1 -1
  16. package/dist/{contract-free-spGyVyoh.mjs → contract-free-DX6DmaSU.mjs} +2 -2
  17. package/dist/contract-free-DX6DmaSU.mjs.map +1 -0
  18. package/dist/{control-DmhbrV5f.d.mts → control-CBG2OxfU.d.mts} +3 -3
  19. package/dist/{control-DmhbrV5f.d.mts.map → control-CBG2OxfU.d.mts.map} +1 -1
  20. package/dist/{control-CP_p1FQ3.mjs → control-DxX_0Qw4.mjs} +4 -4
  21. package/dist/{control-CP_p1FQ3.mjs.map → control-DxX_0Qw4.mjs.map} +1 -1
  22. package/dist/{control-adapter-BmGQyrYm-MHkF4xNt.mjs → control-adapter-EatqP8Vh-CYWBxnLn.mjs} +15 -7
  23. package/dist/{control-adapter-BmGQyrYm-MHkF4xNt.mjs.map → control-adapter-EatqP8Vh-CYWBxnLn.mjs.map} +1 -1
  24. package/dist/{control-policy-DXaIsgUW-Btyo9Vs8.mjs → control-policy-BlVJAbUZ-BjQYqA_a.mjs} +3 -3
  25. package/dist/{control-policy-DXaIsgUW-Btyo9Vs8.mjs.map → control-policy-BlVJAbUZ-BjQYqA_a.mjs.map} +1 -1
  26. package/dist/{ddl-BKqbtVN3-CPHiYaCY.mjs → ddl-B6lRIezE-BMI5qzD2.mjs} +21 -5
  27. package/dist/ddl-B6lRIezE-BMI5qzD2.mjs.map +1 -0
  28. package/dist/ddl-Da35uGK1.d.mts +1 -0
  29. package/dist/{descriptor-meta-B5vKqEt2-DFa431Ad.mjs → descriptor-meta-DThyh4X8-rA2bozYa.mjs} +3 -3
  30. package/dist/{descriptor-meta-B5vKqEt2-DFa431Ad.mjs.map → descriptor-meta-DThyh4X8-rA2bozYa.mjs.map} +1 -1
  31. package/dist/{diff-database-schema-BV6Px0Gg-DAC6TL3P.mjs → diff-database-schema-Ce8vWO7g-gdU3XGHC.mjs} +3 -3
  32. package/dist/{diff-database-schema-BV6Px0Gg-DAC6TL3P.mjs.map → diff-database-schema-Ce8vWO7g-gdU3XGHC.mjs.map} +1 -1
  33. package/dist/{indexes-BWHRVhke-vqXUnRfT.d.mts → indexes-Ccd2ehxq-BaM6od9m.d.mts} +3 -3
  34. package/dist/indexes-Ccd2ehxq-BaM6od9m.d.mts.map +1 -0
  35. package/dist/{issue-planner-BiJDKtW5.d.mts → issue-planner-C010eVt6.d.mts} +2 -2
  36. package/dist/{issue-planner-BiJDKtW5.d.mts.map → issue-planner-C010eVt6.d.mts.map} +1 -1
  37. package/dist/{migration-C9ZH26Nj.mjs → migration-CbOh59ZJ.mjs} +3 -3
  38. package/dist/{migration-C9ZH26Nj.mjs.map → migration-CbOh59ZJ.mjs.map} +1 -1
  39. package/dist/{migration-NJo7cPpB.d.mts → migration-e6FvcwS2.d.mts} +5 -5
  40. package/dist/{migration-NJo7cPpB.d.mts.map → migration-e6FvcwS2.d.mts.map} +1 -1
  41. package/dist/{nodes-Bm2a7z6e-BXTXyzZv.mjs → nodes-BYKl6zt_-BoUacQ_3.mjs} +34 -3
  42. package/dist/nodes-BYKl6zt_-BoUacQ_3.mjs.map +1 -0
  43. package/dist/{nodes-C1fPapnK-j0AK7Gcj.d.mts → nodes-h4zPlhED-nduA-ijW.d.mts} +28 -11
  44. package/dist/nodes-h4zPlhED-nduA-ijW.d.mts.map +1 -0
  45. package/dist/{op-factory-call-ltgiEZ8g-CX6WX57X.mjs → op-factory-call-Bf00O3tt-aQ8OJ00n.mjs} +21 -10
  46. package/dist/op-factory-call-Bf00O3tt-aQ8OJ00n.mjs.map +1 -0
  47. package/dist/op-factory-call-DFD-usUW.d.mts +1 -0
  48. package/dist/{op-factory-call-DkaMatJ4-D_7fWo-v.d.mts → op-factory-call-Do9gu48J-CNEnsh3K.d.mts} +4 -4
  49. package/dist/{op-factory-call-DkaMatJ4-D_7fWo-v.d.mts.map → op-factory-call-Do9gu48J-CNEnsh3K.d.mts.map} +1 -1
  50. package/dist/{planner-Xei8enE-.d.mts → planner-Bc3x3nHl.d.mts} +2 -2
  51. package/dist/{planner-Xei8enE-.d.mts.map → planner-Bc3x3nHl.d.mts.map} +1 -1
  52. package/dist/{planner-Ccn9yxL7-B6Pgoz6c.mjs → planner-BnZ7Ma0m-CuFTpofj.mjs} +7 -7
  53. package/dist/{planner-Ccn9yxL7-B6Pgoz6c.mjs.map → planner-BnZ7Ma0m-CuFTpofj.mjs.map} +1 -1
  54. package/dist/planner-produced-postgres-migration-Da0CME4J.d.mts +1 -0
  55. package/dist/{planner-produced-postgres-migration-Brgj59VY-DOOLRWyy.mjs → planner-produced-postgres-migration-UY6o1KtK-D8AyKNJX.mjs} +4 -4
  56. package/dist/{planner-produced-postgres-migration-Brgj59VY-DOOLRWyy.mjs.map → planner-produced-postgres-migration-UY6o1KtK-D8AyKNJX.mjs.map} +1 -1
  57. package/dist/{planner-produced-postgres-migration-MoopN05f-CfmsQNwj.d.mts → planner-produced-postgres-migration-qAKbwI9E-BGte8lXU.d.mts} +3 -3
  58. package/dist/planner-produced-postgres-migration-qAKbwI9E-BGte8lXU.d.mts.map +1 -0
  59. package/dist/{postgres-migration-D5OiThXV-CihIARAE.d.mts → postgres-migration-Btxi7VsD-DdEHax_e.d.mts} +3 -3
  60. package/dist/{postgres-migration-D5OiThXV-CihIARAE.d.mts.map → postgres-migration-Btxi7VsD-DdEHax_e.d.mts.map} +1 -1
  61. package/dist/{postgres-migration-CLIfS2iQ-BgnVMLRT.mjs → postgres-migration-DxPGyge8-ChvbfTP4.mjs} +5 -5
  62. package/dist/{postgres-migration-CLIfS2iQ-BgnVMLRT.mjs.map → postgres-migration-DxPGyge8-ChvbfTP4.mjs.map} +1 -1
  63. package/dist/{render-ops-Cw9B6aq6-CMzRGNUZ.mjs → render-ops-Cj_4STo9-hZVcK77c.mjs} +3 -3
  64. package/dist/{render-ops-Cw9B6aq6-CMzRGNUZ.mjs.map → render-ops-Cj_4STo9-hZVcK77c.mjs.map} +1 -1
  65. package/dist/target.d.mts +12 -12
  66. package/dist/target.mjs +13 -13
  67. package/dist/target__contract-free.d.mts +2 -2
  68. package/dist/target__contract-free.mjs +3 -3
  69. package/dist/target__control.mjs +2 -2
  70. package/dist/target__ddl.d.mts +3 -3
  71. package/dist/target__ddl.mjs +2 -2
  72. package/dist/target__diff-database-schema.mjs +1 -1
  73. package/dist/target__issue-planner.d.mts +1 -1
  74. package/dist/target__issue-planner.mjs +1 -1
  75. package/dist/target__migration.d.mts +2 -2
  76. package/dist/target__migration.mjs +3 -3
  77. package/dist/target__op-factory-call.d.mts +2 -2
  78. package/dist/target__op-factory-call.mjs +1 -1
  79. package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
  80. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  81. package/dist/target__planner.d.mts +1 -1
  82. package/dist/target__planner.mjs +2 -2
  83. package/dist/target__render-ops.mjs +1 -1
  84. package/package.json +9 -9
  85. package/dist/contract-free-spGyVyoh.mjs.map +0 -1
  86. package/dist/ddl-B-WjvCal.d.mts +0 -1
  87. package/dist/ddl-BKqbtVN3-CPHiYaCY.mjs.map +0 -1
  88. package/dist/indexes-BWHRVhke-vqXUnRfT.d.mts.map +0 -1
  89. package/dist/nodes-Bm2a7z6e-BXTXyzZv.mjs.map +0 -1
  90. package/dist/nodes-C1fPapnK-j0AK7Gcj.d.mts.map +0 -1
  91. package/dist/op-factory-call-LGCmMtZM.d.mts +0 -1
  92. package/dist/op-factory-call-ltgiEZ8g-CX6WX57X.mjs.map +0 -1
  93. package/dist/planner-produced-postgres-migration-DgyIhdpw.d.mts +0 -1
  94. package/dist/planner-produced-postgres-migration-MoopN05f-CfmsQNwj.d.mts.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import { R as postgresDataTypes } from "./data-types-K6tDhu1D-BN--9o1o.mjs";
2
2
  import { i as createPostgresCodecRegistryWithBuiltins } from "./codec-registry-BWUY_QLt-CzrMkP9N.mjs";
3
3
  import { n as renderLoweredSql, t as adapterError } from "./sql-renderer-Q8LMpTcq-twOHNp2T.mjs";
4
- import { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from "./control-adapter-BmGQyrYm-MHkF4xNt.mjs";
4
+ import { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from "./control-adapter-EatqP8Vh-CYWBxnLn.mjs";
5
5
  import { isDdlNode } from "@prisma/orm-family-sql/relational-core/ast";
6
6
  import { assembleDataTypes } from "@prisma/orm-framework/components/codec";
7
7
  import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
8
- //#region ../../../3-targets/6-adapters/postgres/dist/adapter-0nX__6wz.mjs
8
+ //#region ../../../3-targets/6-adapters/postgres/dist/adapter-DXUJlrmB.mjs
9
9
  var PostgresAdapterImpl = class {
10
10
  familyId = "sql";
11
11
  targetId = "postgres";
@@ -86,4 +86,4 @@ function createPostgresAdapterWithCodecRegistry(codecRegistry, dataTypeLookup) {
86
86
  //#endregion
87
87
  export { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };
88
88
 
89
- //# sourceMappingURL=adapter-0nX__6wz-Cv78OA3n.mjs.map
89
+ //# sourceMappingURL=adapter-DXUJlrmB-7Lk8j0kE.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-0nX__6wz-Cv78OA3n.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter-0nX__6wz.mjs"],"sourcesContent":["import { n as adapterError, t as renderLoweredSql } from \"./sql-renderer-Q8LMpTcq.mjs\";\nimport { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from \"./control-adapter-BmGQyrYm.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { isDdlNode } from \"@internal/sql-relational-core/ast\";\nimport { createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { postgresDataTypes } from \"@internal/target-postgres/data-types\";\n//#region src/core/adapter.ts\nvar PostgresAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\tprofile;\n\tcodecRegistry;\n\tdataTypeLookup;\n\tconstructor(codecRegistry, dataTypeLookup, profileId) {\n\t\tthis.codecRegistry = codecRegistry;\n\t\tthis.dataTypeLookup = dataTypeLookup;\n\t\tconst controlAdapter = new PostgresControlAdapter(codecRegistry, dataTypeLookup);\n\t\tthis.profile = Object.freeze({\n\t\t\tid: profileId ?? \"postgres/default@1\",\n\t\t\ttarget: \"postgres\",\n\t\t\tcapabilities: postgresAdapterCapabilities,\n\t\t\treadMarker: (queryable) => controlAdapter.readMarkerDiscriminated({\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tquery: async (sql, params) => {\n\t\t\t\t\tconst rows = [];\n\t\t\t\t\tfor await (const row of queryable.query({\n\t\t\t\t\t\tsql,\n\t\t\t\t\t\t...params === void 0 ? {} : { params }\n\t\t\t\t\t})) rows.push(row);\n\t\t\t\t\treturn { rows };\n\t\t\t\t},\n\t\t\t\tclose: async () => {}\n\t\t\t}, APP_SPACE_ID)\n\t\t});\n\t}\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw adapterError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() does not lower DDL on the runtime adapter — DDL lowering is a control-plane concern handled by the control adapter.\", { meta: { surface: \"runtime-adapter\" } });\n\t\treturn renderLoweredSql(ast, context.contract, this.codecRegistry, this.dataTypeLookup, postgresAdapterCapabilities);\n\t}\n};\nconst INT4_MIN = -2147483648;\nconst INT4_MAX = 2147483647;\n/**\n* The codec a bare JS number is bound through.\n*\n* An integer picks the narrowest column type that holds it: `int4` while it\n* fits the signed 32-bit range, `int8` (number-valued) up to the safe-integer\n* limit. Past that limit a JS number is no longer an exact integer, so it\n* binds as `float8` rather than pretending to a precision it does not have.\n*/\nfunction inferNumberCodecId(value) {\n\tif (!Number.isSafeInteger(value)) return \"pg/float8@1\";\n\treturn value >= INT4_MIN && value <= INT4_MAX ? \"pg/int4@1\" : \"pg/int8number@1\";\n}\n/**\n* Codec-id lookup for bare-literal interpolations used by `fns.raw` on a postgres client. Contributed as the descriptor's static `rawCodecInferer` slot.\n*\n* The ids are versioned because that is how the codec registry keys them: lowering resolves an interpolated value's codec by exact id through `descriptorFor`.\n*/\nconst postgresRawCodecInferer = { inferCodec(value) {\n\tswitch (typeof value) {\n\t\tcase \"number\": return inferNumberCodecId(value);\n\t\tcase \"bigint\": return \"pg/int8@1\";\n\t\tcase \"string\": return \"pg/text@1\";\n\t\tcase \"boolean\": return \"pg/bool@1\";\n\t\tcase \"object\": if (value instanceof Uint8Array) return \"pg/bytea@1\";\n\t}\n\tthrow adapterError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\", { meta: { valueType: typeof value } });\n} };\nfunction createPostgresAdapter(options) {\n\tconst dataTypeLookup = assembleDataTypes([{\n\t\tid: \"postgres\",\n\t\tdataTypes: postgresDataTypes\n\t}, {\n\t\tid: \"createPostgresAdapter\",\n\t\tdataTypes: options?.dataTypes ?? []\n\t}]).lookup;\n\tconst codecRegistry = createPostgresCodecRegistryWithBuiltins(options?.codecDescriptors, dataTypeLookup);\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypeLookup, options?.profileId));\n}\nfunction createPostgresAdapterWithCodecRegistry(codecRegistry, dataTypeLookup) {\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypeLookup));\n}\n//#endregion\nexport { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };\n\n//# sourceMappingURL=adapter-0nX__6wz.mjs.map"],"mappings":";;;;;;;;AAQA,IAAI,sBAAsB,MAAM;CAC/B,WAAW;CACX,WAAW;CACX;CACA;CACA;CACA,YAAY,eAAe,gBAAgB,WAAW;EACrD,KAAK,gBAAgB;EACrB,KAAK,iBAAiB;EACtB,MAAM,iBAAiB,IAAI,uBAAuB,eAAe,cAAc;EAC/E,KAAK,UAAU,OAAO,OAAO;GAC5B,IAAI,aAAa;GACjB,QAAQ;GACR,cAAc;GACd,aAAa,cAAc,eAAe,wBAAwB;IACjE,UAAU;IACV,UAAU;IACV,OAAO,OAAO,KAAK,WAAW;KAC7B,MAAM,OAAO,CAAC;KACd,WAAW,MAAM,OAAO,UAAU,MAAM;MACvC;MACA,GAAG,WAAW,KAAK,IAAI,CAAC,IAAI,EAAE,OAAO;KACtC,CAAC,GAAG,KAAK,KAAK,GAAG;KACjB,OAAO,EAAE,KAAK;IACf;IACA,OAAO,YAAY,CAAC;GACrB,GAAG,YAAY;EAChB,CAAC;CACF;CACA,MAAM,KAAK,SAAS;EACnB,IAAI,UAAU,GAAG,GAAG,MAAM,aAAa,2BAA2B,+HAA+H,EAAE,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;EACzO,OAAO,iBAAiB,KAAK,QAAQ,UAAU,KAAK,eAAe,KAAK,gBAAgB,2BAA2B;CACpH;AACD;AACA,MAAM,WAAW;AACjB,MAAM,WAAW;;;;;;;;;AASjB,SAAS,mBAAmB,OAAO;CAClC,IAAI,CAAC,OAAO,cAAc,KAAK,GAAG,OAAO;CACzC,OAAO,SAAS,YAAY,SAAS,WAAW,cAAc;AAC/D;;;;;;AAMA,MAAM,0BAA0B,EAAE,WAAW,OAAO;CACnD,QAAQ,OAAO,OAAf;EACC,KAAK,UAAU,OAAO,mBAAmB,KAAK;EAC9C,KAAK,UAAU,OAAO;EACtB,KAAK,UAAU,OAAO;EACtB,KAAK,WAAW,OAAO;EACvB,KAAK,UAAU,IAAI,iBAAiB,YAAY,OAAO;CACxD;CACA,MAAM,aAAa,6CAA6C,+GAA+G,EAAE,MAAM,EAAE,WAAW,OAAO,MAAM,EAAE,CAAC;AACrN,EAAE;AACF,SAAS,sBAAsB,SAAS;CACvC,MAAM,iBAAiB,kBAAkB,CAAC;EACzC,IAAI;EACJ,WAAW;CACZ,GAAG;EACF,IAAI;EACJ,WAAW,SAAS,aAAa,CAAC;CACnC,CAAC,CAAC,CAAC,CAAC;CACJ,MAAM,gBAAgB,wCAAwC,SAAS,kBAAkB,cAAc;CACvG,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,gBAAgB,SAAS,SAAS,CAAC;AAChG;AACA,SAAS,uCAAuC,eAAe,gBAAgB;CAC9E,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,cAAc,CAAC;AAC5E"}
1
+ {"version":3,"file":"adapter-DXUJlrmB-7Lk8j0kE.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter-DXUJlrmB.mjs"],"sourcesContent":["import { n as adapterError, t as renderLoweredSql } from \"./sql-renderer-Q8LMpTcq.mjs\";\nimport { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from \"./control-adapter-EatqP8Vh.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { isDdlNode } from \"@internal/sql-relational-core/ast\";\nimport { createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { postgresDataTypes } from \"@internal/target-postgres/data-types\";\n//#region src/core/adapter.ts\nvar PostgresAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\tprofile;\n\tcodecRegistry;\n\tdataTypeLookup;\n\tconstructor(codecRegistry, dataTypeLookup, profileId) {\n\t\tthis.codecRegistry = codecRegistry;\n\t\tthis.dataTypeLookup = dataTypeLookup;\n\t\tconst controlAdapter = new PostgresControlAdapter(codecRegistry, dataTypeLookup);\n\t\tthis.profile = Object.freeze({\n\t\t\tid: profileId ?? \"postgres/default@1\",\n\t\t\ttarget: \"postgres\",\n\t\t\tcapabilities: postgresAdapterCapabilities,\n\t\t\treadMarker: (queryable) => controlAdapter.readMarkerDiscriminated({\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tquery: async (sql, params) => {\n\t\t\t\t\tconst rows = [];\n\t\t\t\t\tfor await (const row of queryable.query({\n\t\t\t\t\t\tsql,\n\t\t\t\t\t\t...params === void 0 ? {} : { params }\n\t\t\t\t\t})) rows.push(row);\n\t\t\t\t\treturn { rows };\n\t\t\t\t},\n\t\t\t\tclose: async () => {}\n\t\t\t}, APP_SPACE_ID)\n\t\t});\n\t}\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw adapterError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() does not lower DDL on the runtime adapter — DDL lowering is a control-plane concern handled by the control adapter.\", { meta: { surface: \"runtime-adapter\" } });\n\t\treturn renderLoweredSql(ast, context.contract, this.codecRegistry, this.dataTypeLookup, postgresAdapterCapabilities);\n\t}\n};\nconst INT4_MIN = -2147483648;\nconst INT4_MAX = 2147483647;\n/**\n* The codec a bare JS number is bound through.\n*\n* An integer picks the narrowest column type that holds it: `int4` while it\n* fits the signed 32-bit range, `int8` (number-valued) up to the safe-integer\n* limit. Past that limit a JS number is no longer an exact integer, so it\n* binds as `float8` rather than pretending to a precision it does not have.\n*/\nfunction inferNumberCodecId(value) {\n\tif (!Number.isSafeInteger(value)) return \"pg/float8@1\";\n\treturn value >= INT4_MIN && value <= INT4_MAX ? \"pg/int4@1\" : \"pg/int8number@1\";\n}\n/**\n* Codec-id lookup for bare-literal interpolations used by `fns.raw` on a postgres client. Contributed as the descriptor's static `rawCodecInferer` slot.\n*\n* The ids are versioned because that is how the codec registry keys them: lowering resolves an interpolated value's codec by exact id through `descriptorFor`.\n*/\nconst postgresRawCodecInferer = { inferCodec(value) {\n\tswitch (typeof value) {\n\t\tcase \"number\": return inferNumberCodecId(value);\n\t\tcase \"bigint\": return \"pg/int8@1\";\n\t\tcase \"string\": return \"pg/text@1\";\n\t\tcase \"boolean\": return \"pg/bool@1\";\n\t\tcase \"object\": if (value instanceof Uint8Array) return \"pg/bytea@1\";\n\t}\n\tthrow adapterError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\", { meta: { valueType: typeof value } });\n} };\nfunction createPostgresAdapter(options) {\n\tconst dataTypeLookup = assembleDataTypes([{\n\t\tid: \"postgres\",\n\t\tdataTypes: postgresDataTypes\n\t}, {\n\t\tid: \"createPostgresAdapter\",\n\t\tdataTypes: options?.dataTypes ?? []\n\t}]).lookup;\n\tconst codecRegistry = createPostgresCodecRegistryWithBuiltins(options?.codecDescriptors, dataTypeLookup);\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypeLookup, options?.profileId));\n}\nfunction createPostgresAdapterWithCodecRegistry(codecRegistry, dataTypeLookup) {\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypeLookup));\n}\n//#endregion\nexport { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };\n\n//# sourceMappingURL=adapter-DXUJlrmB.mjs.map"],"mappings":";;;;;;;;AAQA,IAAI,sBAAsB,MAAM;CAC/B,WAAW;CACX,WAAW;CACX;CACA;CACA;CACA,YAAY,eAAe,gBAAgB,WAAW;EACrD,KAAK,gBAAgB;EACrB,KAAK,iBAAiB;EACtB,MAAM,iBAAiB,IAAI,uBAAuB,eAAe,cAAc;EAC/E,KAAK,UAAU,OAAO,OAAO;GAC5B,IAAI,aAAa;GACjB,QAAQ;GACR,cAAc;GACd,aAAa,cAAc,eAAe,wBAAwB;IACjE,UAAU;IACV,UAAU;IACV,OAAO,OAAO,KAAK,WAAW;KAC7B,MAAM,OAAO,CAAC;KACd,WAAW,MAAM,OAAO,UAAU,MAAM;MACvC;MACA,GAAG,WAAW,KAAK,IAAI,CAAC,IAAI,EAAE,OAAO;KACtC,CAAC,GAAG,KAAK,KAAK,GAAG;KACjB,OAAO,EAAE,KAAK;IACf;IACA,OAAO,YAAY,CAAC;GACrB,GAAG,YAAY;EAChB,CAAC;CACF;CACA,MAAM,KAAK,SAAS;EACnB,IAAI,UAAU,GAAG,GAAG,MAAM,aAAa,2BAA2B,+HAA+H,EAAE,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;EACzO,OAAO,iBAAiB,KAAK,QAAQ,UAAU,KAAK,eAAe,KAAK,gBAAgB,2BAA2B;CACpH;AACD;AACA,MAAM,WAAW;AACjB,MAAM,WAAW;;;;;;;;;AASjB,SAAS,mBAAmB,OAAO;CAClC,IAAI,CAAC,OAAO,cAAc,KAAK,GAAG,OAAO;CACzC,OAAO,SAAS,YAAY,SAAS,WAAW,cAAc;AAC/D;;;;;;AAMA,MAAM,0BAA0B,EAAE,WAAW,OAAO;CACnD,QAAQ,OAAO,OAAf;EACC,KAAK,UAAU,OAAO,mBAAmB,KAAK;EAC9C,KAAK,UAAU,OAAO;EACtB,KAAK,UAAU,OAAO;EACtB,KAAK,WAAW,OAAO;EACvB,KAAK,UAAU,IAAI,iBAAiB,YAAY,OAAO;CACxD;CACA,MAAM,aAAa,6CAA6C,+GAA+G,EAAE,MAAM,EAAE,WAAW,OAAO,MAAM,EAAE,CAAC;AACrN,EAAE;AACF,SAAS,sBAAsB,SAAS;CACvC,MAAM,iBAAiB,kBAAkB,CAAC;EACzC,IAAI;EACJ,WAAW;CACZ,GAAG;EACF,IAAI;EACJ,WAAW,SAAS,aAAa,CAAC;CACnC,CAAC,CAAC,CAAC,CAAC;CACJ,MAAM,gBAAgB,wCAAwC,SAAS,kBAAkB,cAAc;CACvG,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,gBAAgB,SAAS,SAAS,CAAC;AAChG;AACA,SAAS,uCAAuC,eAAe,gBAAgB;CAC9E,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,cAAc,CAAC;AAC5E"}
@@ -1,8 +1,8 @@
1
1
  import { t as PostgresContract } from "./postgres-schema-Xsjt3RKO-Buv2X8ai.mjs";
2
2
  import { c as PostgresLoweredStatement, s as PostgresAdapterOptions } from "./types-D6lgKhE5-DYkeCAjr.mjs";
3
3
  import { t as PostgresCodecRegistry } from "./codecs-ChjCJY5k.mjs";
4
- import { g as PostgresDdlNode } from "./nodes-C1fPapnK-j0AK7Gcj.mjs";
5
- import "./ddl-B-WjvCal.mjs";
4
+ import { v as PostgresDdlNode } from "./nodes-h4zPlhED-nduA-ijW.mjs";
5
+ import "./ddl-Da35uGK1.mjs";
6
6
  import { Adapter, AdapterProfile, AnyQueryAst, LowererContext } from "@prisma/orm-family-sql/relational-core/ast";
7
7
  import { DataTypeLookup } from "@prisma/orm-framework/components/codec";
8
8
  import { RawCodecInferer } from "@prisma/orm-family-sql/relational-core/expression";
@@ -55,4 +55,4 @@ declare const postgresAdapterCapabilities: Readonly<{
55
55
  }>;
56
56
  //#endregion
57
57
  export { postgresAdapterCapabilities as n, postgresRawCodecInferer as r, createPostgresAdapter as t };
58
- //# sourceMappingURL=adapter-BXHPMNAg.d.mts.map
58
+ //# sourceMappingURL=adapter-giV1nqJs.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-BXHPMNAg.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter.d.mts"],"mappings":";;;;;;;;;;cAOc,+BAA+B,QAAQ,aAAa,kBAAkB;WACzE;WACA;WACA,SAAS;mBACD;mBACA;EACjB,YAAY,eAAe,uBAAuB,gBAAgB,gBAAgB;EAClF,MAAM,KAAK,cAAc,iBAAiB,SAAS,eAAe,oBAAoB;;;;;;;cAO1E,yBAAyB;iBACtB,sBAAsB,UAAU,yBAAyB,SAAS;;;cAGrE,6BAA6B;WAChC;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;WAEF;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA"}
1
+ {"version":3,"file":"adapter-giV1nqJs.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter.d.mts"],"mappings":";;;;;;;;;;cAOc,+BAA+B,QAAQ,aAAa,kBAAkB;WACzE;WACA;WACA,SAAS;mBACD;mBACA;EACjB,YAAY,eAAe,uBAAuB,gBAAgB,gBAAgB;EAClF,MAAM,KAAK,cAAc,iBAAiB,SAAS,eAAe,oBAAoB;;;;;;;cAO1E,yBAAyB;iBACtB,sBAAsB,UAAU,yBAAyB,SAAS;;;cAGrE,6BAA6B;WAChC;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;WAEF;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA"}
@@ -1,12 +1,12 @@
1
1
  import { t as PostgresContract } from "./postgres-schema-Xsjt3RKO-Buv2X8ai.mjs";
2
2
  import { a as OrderClause, c as PostgresLoweredStatement, d as StorageTable, i as Expr, l as SelectAst, n as ColumnRef, o as ParamRef, r as Direction, s as PostgresAdapterOptions, t as BinaryExpr, u as StorageColumn } from "./types-D6lgKhE5-DYkeCAjr.mjs";
3
3
  import { a as createPostgresCodecRegistryWithBuiltins, i as createPostgresBuiltinCodecLookup, t as PostgresCodecRegistry } from "./codecs-ChjCJY5k.mjs";
4
- import { n as postgresAdapterCapabilities, r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-BXHPMNAg.mjs";
4
+ import { n as postgresAdapterCapabilities, r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-giV1nqJs.mjs";
5
5
  import { C as timestamptzTemporalColumn, E as varcharColumn, S as timestamptzStringColumn, T as varbitColumn, _ as timeStringColumn, a as dateStringColumn, b as timestampTemporalColumn, c as float8Column, d as int8Column, f as intervalColumn, g as textColumn, h as numericColumn, i as charColumn, l as int2Column, m as jsonbColumn, n as boolColumn, o as dateTemporalColumn, p as jsonColumn, r as byteaColumn, s as float4Column, t as bitColumn, u as int4Column, v as timeTemporalColumn, w as timetzColumn, x as timestamptzJsDateColumn, y as timestampStringColumn } from "./column-types-Dq7mC_dL.mjs";
6
6
  import { t as parsePostgresDefault } from "./default-normalizer-ZZ7Y5boE.mjs";
7
7
  import { i as normalizeSchemaNativeType } from "./native-type-normalizer-BFo5tSyh.mjs";
8
8
  import { n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-CGSJ8fH0.mjs";
9
- import { t as PostgresControlAdapter } from "./control-DmhbrV5f.mjs";
9
+ import { t as PostgresControlAdapter } from "./control-CBG2OxfU.mjs";
10
10
  import { t as SqlRuntimeAdapter } from "./runtime-CNTEAZIz.mjs";
11
11
  import { t as renderLoweredSql } from "./sql-renderer-hQ3HTY-B.mjs";
12
12
  import "./types-Dnrjripb.mjs";
package/dist/adapter.mjs CHANGED
@@ -3,7 +3,7 @@ import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuilti
3
3
  import { t as parsePostgresDefault } from "./default-normalizer-Bf_Fhv4v-CugGfLAe.mjs";
4
4
  import { n as normalizeSchemaNativeType } from "./native-type-normalizer-CwyVR7xB.mjs";
5
5
  import { n as renderLoweredSql } from "./sql-renderer-Q8LMpTcq-twOHNp2T.mjs";
6
- import { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from "./control-adapter-BmGQyrYm-MHkF4xNt.mjs";
7
- import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-0nX__6wz-Cv78OA3n.mjs";
6
+ import { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from "./control-adapter-EatqP8Vh-CYWBxnLn.mjs";
7
+ import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-DXUJlrmB-7Lk8j0kE.mjs";
8
8
  import { C as timestamptzTemporalColumn, E as varcharColumn, S as timestamptzStringColumn, T as varbitColumn, _ as timeStringColumn, a as dateStringColumn, b as timestampTemporalColumn, c as float8Column, d as int8Column, f as intervalColumn, g as textColumn, h as numericColumn, i as charColumn, l as int2Column, m as jsonbColumn, n as boolColumn, o as dateTemporalColumn, p as jsonColumn, r as byteaColumn, s as float4Column, t as bitColumn, u as int4Column, v as timeTemporalColumn, w as timetzColumn, x as timestamptzJsDateColumn, y as timestampStringColumn } from "./column-types-Bbc3IVA7.mjs";
9
9
  export { PostgresControlAdapter, bitColumn, boolColumn, byteaColumn, charColumn, createPostgresAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, dateStringColumn, dateTemporalColumn, escapeLiteral, float4Column, float8Column, int2Column, int4Column, int8Column, intervalColumn, jsonColumn, jsonbColumn, normalizeSchemaNativeType, numericColumn, parsePostgresDefault, postgresAdapterCapabilities, postgresRawCodecInferer, qualifyName, quoteIdentifier, renderLoweredSql, textColumn, timeStringColumn, timeTemporalColumn, timestampStringColumn, timestampTemporalColumn, timestamptzJsDateColumn, timestamptzStringColumn, timestamptzTemporalColumn, timetzColumn, varbitColumn, varcharColumn };
@@ -1,2 +1,2 @@
1
- import { n as postgresAdapterCapabilities, r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-BXHPMNAg.mjs";
1
+ import { n as postgresAdapterCapabilities, r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-giV1nqJs.mjs";
2
2
  export { createPostgresAdapter, postgresAdapterCapabilities, postgresRawCodecInferer };
@@ -1,3 +1,3 @@
1
- import { n as postgresAdapterCapabilities } from "./control-adapter-BmGQyrYm-MHkF4xNt.mjs";
2
- import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-0nX__6wz-Cv78OA3n.mjs";
1
+ import { n as postgresAdapterCapabilities } from "./control-adapter-EatqP8Vh-CYWBxnLn.mjs";
2
+ import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-DXUJlrmB-7Lk8j0kE.mjs";
3
3
  export { createPostgresAdapter, postgresAdapterCapabilities, postgresRawCodecInferer };
@@ -2,5 +2,5 @@ import { a as createPostgresCodecRegistryWithBuiltins, i as createPostgresBuilti
2
2
  import { t as parsePostgresDefault } from "./default-normalizer-ZZ7Y5boE.mjs";
3
3
  import { i as normalizeSchemaNativeType } from "./native-type-normalizer-BFo5tSyh.mjs";
4
4
  import { n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-CGSJ8fH0.mjs";
5
- import { n as postgresAdapterDescriptor, t as PostgresControlAdapter } from "./control-DmhbrV5f.mjs";
5
+ import { n as postgresAdapterDescriptor, t as PostgresControlAdapter } from "./control-CBG2OxfU.mjs";
6
6
  export { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, normalizeSchemaNativeType, parsePostgresDefault, qualifyName, quoteIdentifier };
@@ -2,10 +2,10 @@ import { i as quoteIdentifier, n as escapeLiteral, r as qualifyName } from "./sq
2
2
  import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-BWUY_QLt-CzrMkP9N.mjs";
3
3
  import { a as instantNowControlDescriptor, s as plainDateTimeNowControlDescriptor } from "./authoring-CTn87jlt-VHX7hiNU.mjs";
4
4
  import { t as parsePostgresDefault } from "./default-normalizer-Bf_Fhv4v-CugGfLAe.mjs";
5
- import { n as postgresPslTypeConstructors } from "./control-CP_p1FQ3.mjs";
5
+ import { n as postgresPslTypeConstructors } from "./control-DxX_0Qw4.mjs";
6
6
  import { n as normalizeSchemaNativeType } from "./native-type-normalizer-CwyVR7xB.mjs";
7
- import { t as PostgresControlAdapter } from "./control-adapter-BmGQyrYm-MHkF4xNt.mjs";
8
- import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-B5vKqEt2-DFa431Ad.mjs";
7
+ import { t as PostgresControlAdapter } from "./control-adapter-EatqP8Vh-CYWBxnLn.mjs";
8
+ import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-DThyh4X8-rA2bozYa.mjs";
9
9
  import { timestampNowControlDescriptor } from "@prisma/orm-framework/components/control";
10
10
  import { int, num, oneOf, optional } from "@prisma/orm-framework/psl-parser";
11
11
  import { builtinGeneratorRegistryMetadata } from "@prisma/orm-framework/ids";
@@ -1 +1 @@
1
- {"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/control.mjs"],"sourcesContent":["import { t as PostgresControlAdapter } from \"./control-adapter-BmGQyrYm.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-B5vKqEt2.mjs\";\nimport { timestampNowControlDescriptor } from \"@internal/framework-components/control\";\nimport { assemblePostgresCodecRegistry, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { parsePostgresDefault } from \"@internal/target-postgres/default-normalizer\";\nimport { normalizeSchemaNativeType } from \"@internal/target-postgres/native-type-normalizer\";\nimport { escapeLiteral, qualifyName, quoteIdentifier } from \"@internal/target-postgres/sql-utils\";\nimport { instantNowControlDescriptor, plainDateTimeNowControlDescriptor, postgresPslTypeConstructors } from \"@internal/target-postgres/control\";\nimport { builtinGeneratorRegistryMetadata } from \"@internal/ids\";\nimport { int, num, oneOf, optional } from \"@internal/psl-parser\";\n//#region src/core/control-mutation-defaults.ts\nfunction executionGenerator(id, params) {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"execution\",\n\t\t\tgenerated: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid,\n\t\t\t\t...params ? { params } : {}\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerAutoincrement() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"autoincrement()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerNow() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"now()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerUlid() {\n\treturn executionGenerator(\"ulid\");\n}\nfunction lowerUuid(input) {\n\treturn input.call.args[\"version\"] === 7 ? executionGenerator(\"uuidv7\") : executionGenerator(\"uuidv4\");\n}\nfunction lowerCuid() {\n\treturn executionGenerator(\"cuid2\");\n}\nfunction lowerNanoid(input) {\n\tconst size = input.call.args[\"size\"];\n\treturn typeof size === \"number\" ? executionGenerator(\"nanoid\", { size }) : executionGenerator(\"nanoid\");\n}\nconst nowSig = { documentation: \"Uses the current database timestamp as the default value.\" };\nconst autoincrementSig = { documentation: \"Generates an increasing integer value in the database.\" };\nconst ulidSig = { documentation: \"Generates a ULID when a value is not supplied.\" };\nconst uuidSig = {\n\tdocumentation: \"Generates a UUID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: optional(oneOf(num(4), num(7))),\n\t\tdocumentation: \"The UUID version: `4` or `7`. Defaults to `4`.\"\n\t}]\n};\nconst cuidSig = {\n\tdocumentation: \"Generates a CUID2 identifier when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: num(2),\n\t\tdocumentation: \"The CUID version. Only `2` is supported.\"\n\t}]\n};\nconst nanoidSig = {\n\tdocumentation: \"Generates a Nano ID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"size\",\n\t\ttype: optional(int({\n\t\t\tmin: 2,\n\t\t\tmax: 255\n\t\t})),\n\t\tdocumentation: \"The identifier length, from `2` through `255`. Omit to use the generator default.\"\n\t}]\n};\nconst postgresDefaultFunctionRegistryEntries = [\n\t[\"autoincrement\", {\n\t\tsignature: autoincrementSig,\n\t\tlower: lowerAutoincrement,\n\t\tusageSignatures: [\"autoincrement()\"]\n\t}],\n\t[\"now\", {\n\t\tsignature: nowSig,\n\t\tlower: lowerNow,\n\t\tusageSignatures: [\"now()\"]\n\t}],\n\t[\"uuid\", {\n\t\tsignature: uuidSig,\n\t\tlower: lowerUuid,\n\t\tusageSignatures: [\n\t\t\t\"uuid()\",\n\t\t\t\"uuid(4)\",\n\t\t\t\"uuid(7)\"\n\t\t]\n\t}],\n\t[\"cuid\", {\n\t\tsignature: cuidSig,\n\t\tlower: lowerCuid,\n\t\tusageSignatures: [\"cuid(2)\"]\n\t}],\n\t[\"ulid\", {\n\t\tsignature: ulidSig,\n\t\tlower: lowerUlid,\n\t\tusageSignatures: [\"ulid()\"]\n\t}],\n\t[\"nanoid\", {\n\t\tsignature: nanoidSig,\n\t\tlower: lowerNanoid,\n\t\tusageSignatures: [\"nanoid()\", \"nanoid(<2-255>)\"]\n\t}]\n];\nfunction createPostgresDefaultFunctionRegistry() {\n\treturn new Map(postgresDefaultFunctionRegistryEntries);\n}\nfunction createPostgresMutationDefaultGeneratorDescriptors() {\n\treturn [\n\t\t...builtinGeneratorRegistryMetadata.map(({ id, applicableCodecIds }) => ({\n\t\t\tid,\n\t\t\tapplicableCodecIds\n\t\t})),\n\t\ttimestampNowControlDescriptor(),\n\t\tinstantNowControlDescriptor(),\n\t\tplainDateTimeNowControlDescriptor()\n\t];\n}\n//#endregion\n//#region src/exports/control.ts\nconst postgresAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tauthoring: {\n\t\ttype: postgresPslTypeConstructors,\n\t\tvalueObjectStorageType: \"Jsonb\"\n\t},\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: createPostgresDefaultFunctionRegistry(),\n\t\tgeneratorDescriptors: createPostgresMutationDefaultGeneratorDescriptors()\n\t},\n\tcreate(stack) {\n\t\treturn new PostgresControlAdapter(assemblePostgresCodecRegistry([\n\t\t\tstack.target,\n\t\t\t...stack.adapter === void 0 ? [] : [stack.adapter],\n\t\t\t...stack.extensions\n\t\t], stack.dataTypes.lookup), stack.dataTypes.lookup);\n\t}\n};\n//#endregion\nexport { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, normalizeSchemaNativeType, parsePostgresDefault, qualifyName, quoteIdentifier };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;AAWA,SAAS,mBAAmB,IAAI,QAAQ;CACvC,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,WAAW;IACV,MAAM;IACN;IACA,GAAG,SAAS,EAAE,OAAO,IAAI,CAAC;GAC3B;EACD;CACD;AACD;AACA,SAAS,qBAAqB;CAC7B,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,cAAc;IACb,MAAM;IACN,YAAY;GACb;EACD;CACD;AACD;AACA,SAAS,WAAW;CACnB,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,cAAc;IACb,MAAM;IACN,YAAY;GACb;EACD;CACD;AACD;AACA,SAAS,YAAY;CACpB,OAAO,mBAAmB,MAAM;AACjC;AACA,SAAS,UAAU,OAAO;CACzB,OAAO,MAAM,KAAK,KAAK,eAAe,IAAI,mBAAmB,QAAQ,IAAI,mBAAmB,QAAQ;AACrG;AACA,SAAS,YAAY;CACpB,O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CAChD,OAAO,IAAI,IAAI,sCAAsC;AACtD;AACA,SAAS,oDAAoD;CAC5D,OAAO;EACN,GAAG,iCAAiC,KAAK,EAAE,IAAI,0BAA0B;GACxE;GACA;EACD,EAAE;EACF,8BAA8B;EAC9B,4BAA4B;EAC5B,kCAAkC;CACnC;AACD;AAGA,MAAM,4BAA4B;CACjC,GAAG;CACH,WAAW;EACV,MAAM;EACN,wBAAwB;CACzB;CACA,yBAAyB;EACxB,yBAAyB,sCAAsC;EAC/D,sBAAsB,kDAAkD;CACzE;CACA,OAAO,OAAO;EACb,OAAO,IAAI,uBAAuB,8BAA8B;GAC/D,MAAM;GACN,GAAG,MAAM,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,OAAO;GACjD,GAAG,MAAM;EACV,GAAG,MAAM,UAAU,MAAM,GAAG,MAAM,UAAU,MAAM;CACnD;AACD"}
1
+ {"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/control.mjs"],"sourcesContent":["import { t as PostgresControlAdapter } from \"./control-adapter-EatqP8Vh.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-DThyh4X8.mjs\";\nimport { timestampNowControlDescriptor } from \"@internal/framework-components/control\";\nimport { assemblePostgresCodecRegistry, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { parsePostgresDefault } from \"@internal/target-postgres/default-normalizer\";\nimport { normalizeSchemaNativeType } from \"@internal/target-postgres/native-type-normalizer\";\nimport { escapeLiteral, qualifyName, quoteIdentifier } from \"@internal/target-postgres/sql-utils\";\nimport { instantNowControlDescriptor, plainDateTimeNowControlDescriptor, postgresPslTypeConstructors } from \"@internal/target-postgres/control\";\nimport { builtinGeneratorRegistryMetadata } from \"@internal/ids\";\nimport { int, num, oneOf, optional } from \"@internal/psl-parser\";\n//#region src/core/control-mutation-defaults.ts\nfunction executionGenerator(id, params) {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"execution\",\n\t\t\tgenerated: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid,\n\t\t\t\t...params ? { params } : {}\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerAutoincrement() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"autoincrement()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerNow() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"now()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerUlid() {\n\treturn executionGenerator(\"ulid\");\n}\nfunction lowerUuid(input) {\n\treturn input.call.args[\"version\"] === 7 ? executionGenerator(\"uuidv7\") : executionGenerator(\"uuidv4\");\n}\nfunction lowerCuid() {\n\treturn executionGenerator(\"cuid2\");\n}\nfunction lowerNanoid(input) {\n\tconst size = input.call.args[\"size\"];\n\treturn typeof size === \"number\" ? executionGenerator(\"nanoid\", { size }) : executionGenerator(\"nanoid\");\n}\nconst nowSig = { documentation: \"Uses the current database timestamp as the default value.\" };\nconst autoincrementSig = { documentation: \"Generates an increasing integer value in the database.\" };\nconst ulidSig = { documentation: \"Generates a ULID when a value is not supplied.\" };\nconst uuidSig = {\n\tdocumentation: \"Generates a UUID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: optional(oneOf(num(4), num(7))),\n\t\tdocumentation: \"The UUID version: `4` or `7`. Defaults to `4`.\"\n\t}]\n};\nconst cuidSig = {\n\tdocumentation: \"Generates a CUID2 identifier when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: num(2),\n\t\tdocumentation: \"The CUID version. Only `2` is supported.\"\n\t}]\n};\nconst nanoidSig = {\n\tdocumentation: \"Generates a Nano ID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"size\",\n\t\ttype: optional(int({\n\t\t\tmin: 2,\n\t\t\tmax: 255\n\t\t})),\n\t\tdocumentation: \"The identifier length, from `2` through `255`. Omit to use the generator default.\"\n\t}]\n};\nconst postgresDefaultFunctionRegistryEntries = [\n\t[\"autoincrement\", {\n\t\tsignature: autoincrementSig,\n\t\tlower: lowerAutoincrement,\n\t\tusageSignatures: [\"autoincrement()\"]\n\t}],\n\t[\"now\", {\n\t\tsignature: nowSig,\n\t\tlower: lowerNow,\n\t\tusageSignatures: [\"now()\"]\n\t}],\n\t[\"uuid\", {\n\t\tsignature: uuidSig,\n\t\tlower: lowerUuid,\n\t\tusageSignatures: [\n\t\t\t\"uuid()\",\n\t\t\t\"uuid(4)\",\n\t\t\t\"uuid(7)\"\n\t\t]\n\t}],\n\t[\"cuid\", {\n\t\tsignature: cuidSig,\n\t\tlower: lowerCuid,\n\t\tusageSignatures: [\"cuid(2)\"]\n\t}],\n\t[\"ulid\", {\n\t\tsignature: ulidSig,\n\t\tlower: lowerUlid,\n\t\tusageSignatures: [\"ulid()\"]\n\t}],\n\t[\"nanoid\", {\n\t\tsignature: nanoidSig,\n\t\tlower: lowerNanoid,\n\t\tusageSignatures: [\"nanoid()\", \"nanoid(<2-255>)\"]\n\t}]\n];\nfunction createPostgresDefaultFunctionRegistry() {\n\treturn new Map(postgresDefaultFunctionRegistryEntries);\n}\nfunction createPostgresMutationDefaultGeneratorDescriptors() {\n\treturn [\n\t\t...builtinGeneratorRegistryMetadata.map(({ id, applicableCodecIds }) => ({\n\t\t\tid,\n\t\t\tapplicableCodecIds\n\t\t})),\n\t\ttimestampNowControlDescriptor(),\n\t\tinstantNowControlDescriptor(),\n\t\tplainDateTimeNowControlDescriptor()\n\t];\n}\n//#endregion\n//#region src/exports/control.ts\nconst postgresAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tauthoring: {\n\t\ttype: postgresPslTypeConstructors,\n\t\tvalueObjectStorageType: \"Jsonb\"\n\t},\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: createPostgresDefaultFunctionRegistry(),\n\t\tgeneratorDescriptors: createPostgresMutationDefaultGeneratorDescriptors()\n\t},\n\tcreate(stack) {\n\t\treturn new PostgresControlAdapter(assemblePostgresCodecRegistry([\n\t\t\tstack.target,\n\t\t\t...stack.adapter === void 0 ? [] : [stack.adapter],\n\t\t\t...stack.extensions\n\t\t], stack.dataTypes.lookup), stack.dataTypes.lookup);\n\t}\n};\n//#endregion\nexport { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, normalizeSchemaNativeType, parsePostgresDefault, qualifyName, quoteIdentifier };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;AAWA,SAAS,mBAAmB,IAAI,QAAQ;CACvC,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,WAAW;IACV,MAAM;IACN;IACA,GAAG,SAAS,EAAE,OAAO,IAAI,CAAC;GAC3B;EACD;CACD;AACD;AACA,SAAS,qBAAqB;CAC7B,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,cAAc;IACb,MAAM;IACN,YAAY;GACb;EACD;CACD;AACD;AACA,SAAS,WAAW;CACnB,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,cAAc;IACb,MAAM;IACN,YAAY;GACb;EACD;CACD;AACD;AACA,SAAS,YAAY;CACpB,OAAO,mBAAmB,MAAM;AACjC;AACA,SAAS,UAAU,OAAO;CACzB,OAAO,MAAM,KAAK,KAAK,eAAe,IAAI,mBAAmB,QAAQ,IAAI,mBAAmB,QAAQ;AACrG;AACA,SAAS,YAAY;CACpB,OAAO,mBAAmB,OAAO;AAClC;AACA,SAAS,YAAY,OAAO;CAC3B,MAAM,OAAO,MAAM,KAAK,KAAK;CAC7B,OAAO,OAAO,SAAS,WAAW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;GACxE;GACA;EACD,EAAE;EACF,8BAA8B;EAC9B,4BAA4B;EAC5B,kCAAkC;CACnC;AACD;AAGA,MAAM,4BAA4B;CACjC,GAAG;CACH,WAAW;EACV,MAAM;EACN,wBAAwB;CACzB;CACA,yBAAyB;EACxB,yBAAyB,sCAAsC;EAC/D,sBAAsB,kDAAkD;CACzE;CACA,OAAO,OAAO;EACb,OAAO,IAAI,uBAAuB,8BAA8B;GAC/D,MAAM;GACN,GAAG,MAAM,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,OAAO;GACjD,GAAG,MAAM;EACV,GAAG,MAAM,UAAU,MAAM,GAAG,MAAM,UAAU,MAAM;CACnD;AACD"}
@@ -1,7 +1,7 @@
1
1
  import { o as postgresCodecRegistry, t as assemblePostgresCodecRegistry } from "./codec-registry-BWUY_QLt-CzrMkP9N.mjs";
2
2
  import { i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-CTn87jlt-VHX7hiNU.mjs";
3
- import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-0nX__6wz-Cv78OA3n.mjs";
4
- import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-B5vKqEt2-DFa431Ad.mjs";
3
+ import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-DXUJlrmB-7Lk8j0kE.mjs";
4
+ import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-DThyh4X8-rA2bozYa.mjs";
5
5
  import { assembleDataTypes } from "@prisma/orm-framework/components/codec";
6
6
  import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
7
7
  import { timestampNowRuntimeGenerator } from "@prisma/orm-family-sql/family/runtime";
@@ -1 +1 @@
1
- {"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-0nX__6wz.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-B5vKqEt2.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { assemblePostgresCodecRegistry, postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { generateId } from \"@internal/ids/runtime\";\nimport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, instantNow, plainDateTimeNow } from \"@internal/target-postgres/runtime\";\n//#region src/exports/runtime.ts\nfunction createPostgresMutationDefaultGenerators() {\n\treturn [\n\t\t...builtinGeneratorIds.map((id) => ({\n\t\t\tid,\n\t\t\tgenerate: (params) => {\n\t\t\t\treturn generateId(params ? {\n\t\t\t\t\tid,\n\t\t\t\t\tparams\n\t\t\t\t} : { id });\n\t\t\t},\n\t\t\tstability: \"field\"\n\t\t})),\n\t\ttimestampNowRuntimeGenerator(),\n\t\t{\n\t\t\tid: INSTANT_NOW_GENERATOR_ID,\n\t\t\tgenerate: () => instantNow(),\n\t\t\tstability: \"query\"\n\t\t},\n\t\t{\n\t\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID,\n\t\t\tgenerate: () => plainDateTimeNow(),\n\t\t\tstability: \"query\"\n\t\t}\n\t];\n}\nconst postgresRuntimeAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tcodecs: () => Array.from(postgresCodecRegistry.values()),\n\tmutationDefaultGenerators: createPostgresMutationDefaultGenerators,\n\trawCodecInferer: postgresRawCodecInferer,\n\tcreate(stack) {\n\t\tconst components = [\n\t\t\tstack.target,\n\t\t\tstack.adapter,\n\t\t\t...stack.extensions\n\t\t];\n\t\tconst dataTypeLookup = assembleDataTypes(components).lookup;\n\t\treturn createPostgresAdapterWithCodecRegistry(assemblePostgresCodecRegistry(components, dataTypeLookup), dataTypeLookup);\n\t}\n};\n//#endregion\nexport { postgresRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,0CAA0C;CAClD,OAAO;EACN,GAAG,oBAAoB,KAAK,QAAQ;GACnC;GACA,WAAW,WAAW;IACrB,OAAO,WAAW,SAAS;KAC1B;KACA;IACD,IAAI,EAAE,GAAG,CAAC;GACX;GACA,WAAW;EACZ,EAAE;EACF,6BAA6B;EAC7B;GACC,IAAI;GACJ,gBAAgB,WAAW;GAC3B,WAAW;EACZ;EACA;GACC,IAAI;GACJ,gBAAgB,iBAAiB;GACjC,WAAW;EACZ;CACD;AACD;AACA,MAAM,mCAAmC;CACxC,GAAG;CACH,cAAc,MAAM,KAAK,sBAAsB,OAAO,CAAC;CACvD,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,MAAM,aAAa;GAClB,MAAM;GACN,MAAM;GACN,GAAG,MAAM;EACV;EACA,MAAM,iBAAiB,kBAAkB,UAAU,CAAC,CAAC;EACrD,OAAO,uCAAuC,8BAA8B,YAAY,cAAc,GAAG,cAAc;CACxH;AACD"}
1
+ {"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-DXUJlrmB.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-DThyh4X8.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { assemblePostgresCodecRegistry, postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { generateId } from \"@internal/ids/runtime\";\nimport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, instantNow, plainDateTimeNow } from \"@internal/target-postgres/runtime\";\n//#region src/exports/runtime.ts\nfunction createPostgresMutationDefaultGenerators() {\n\treturn [\n\t\t...builtinGeneratorIds.map((id) => ({\n\t\t\tid,\n\t\t\tgenerate: (params) => {\n\t\t\t\treturn generateId(params ? {\n\t\t\t\t\tid,\n\t\t\t\t\tparams\n\t\t\t\t} : { id });\n\t\t\t},\n\t\t\tstability: \"field\"\n\t\t})),\n\t\ttimestampNowRuntimeGenerator(),\n\t\t{\n\t\t\tid: INSTANT_NOW_GENERATOR_ID,\n\t\t\tgenerate: () => instantNow(),\n\t\t\tstability: \"query\"\n\t\t},\n\t\t{\n\t\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID,\n\t\t\tgenerate: () => plainDateTimeNow(),\n\t\t\tstability: \"query\"\n\t\t}\n\t];\n}\nconst postgresRuntimeAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tcodecs: () => Array.from(postgresCodecRegistry.values()),\n\tmutationDefaultGenerators: createPostgresMutationDefaultGenerators,\n\trawCodecInferer: postgresRawCodecInferer,\n\tcreate(stack) {\n\t\tconst components = [\n\t\t\tstack.target,\n\t\t\tstack.adapter,\n\t\t\t...stack.extensions\n\t\t];\n\t\tconst dataTypeLookup = assembleDataTypes(components).lookup;\n\t\treturn createPostgresAdapterWithCodecRegistry(assemblePostgresCodecRegistry(components, dataTypeLookup), dataTypeLookup);\n\t}\n};\n//#endregion\nexport { postgresRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,0CAA0C;CAClD,OAAO;EACN,GAAG,oBAAoB,KAAK,QAAQ;GACnC;GACA,WAAW,WAAW;IACrB,OAAO,WAAW,SAAS;KAC1B;KACA;IACD,IAAI,EAAE,GAAG,CAAC;GACX;GACA,WAAW;EACZ,EAAE;EACF,6BAA6B;EAC7B;GACC,IAAI;GACJ,gBAAgB,WAAW;GAC3B,WAAW;EACZ;EACA;GACC,IAAI;GACJ,gBAAgB,iBAAiB;GACjC,WAAW;EACZ;CACD;AACD;AACA,MAAM,mCAAmC;CACxC,GAAG;CACH,cAAc,MAAM,KAAK,sBAAsB,OAAO,CAAC;CACvD,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,MAAM,aAAa;GAClB,MAAM;GACN,MAAM;GACN,GAAG,MAAM;EACV;EACA,MAAM,iBAAiB,kBAAkB,UAAU,CAAC,CAAC;EACrD,OAAO,uCAAuC,8BAA8B,YAAY,cAAc,GAAG,cAAc;CACxH;AACD"}
@@ -1,5 +1,5 @@
1
1
  import "./table-source-ikHOZmhD-DriY1Lcr.mjs";
2
- import { m as PostgresCreateTable, p as PostgresCreateSchema, r as AnyAlterTableAction, s as DropDefaultAction, t as AddColumnAction, u as PostgresAlterTable } from "./nodes-C1fPapnK-j0AK7Gcj.mjs";
2
+ import { a as AnyAlterTableAction, f as PostgresAlterTable, g as PostgresCreateTable, h as PostgresCreateSchema, l as DropDefaultAction, n as AddConstraintAction, r as AlterColumnTypeAction, t as AddColumnAction } from "./nodes-h4zPlhED-nduA-ijW.mjs";
3
3
  import { DdlColumn, DdlNode, DdlTableConstraint, SelectAst } from "@prisma/orm-family-sql/relational-core/ast";
4
4
  import { CfExpr, ColumnDescriptor, ColumnSchema, TableHandle } from "@prisma/orm-family-sql/relational-core/contract-free";
5
5
  //#region ../../../3-targets/3-targets/postgres/dist/contract-free.d.mts
@@ -262,9 +262,21 @@ declare function addColumnAction(column: DdlColumn): AddColumnAction;
262
262
  * use inside {@link alterTable}. The renderer quotes the column name.
263
263
  */
264
264
  declare function dropDefaultAction(columnName: string): DropDefaultAction;
265
+ /**
266
+ * Build an `ADD CONSTRAINT` action for use inside {@link alterTable}. The renderer writes the constraint as `CREATE TABLE` writes it.
267
+ */
268
+ declare function addConstraintAction(constraint: DdlTableConstraint): AddConstraintAction;
269
+ /**
270
+ * Build an `ALTER COLUMN "<columnName>" TYPE <type> USING …` action for use inside {@link alterTable}. `type` is written verbatim; `using` is opaque SQL, and when it is absent or empty the conversion is `"<columnName>"::<type>`.
271
+ */
272
+ declare function alterColumnTypeAction(options: {
273
+ readonly columnName: string;
274
+ readonly type: string;
275
+ readonly using?: string;
276
+ }): AlterColumnTypeAction;
265
277
  /**
266
278
  * Build a Postgres `ALTER TABLE` query node carrying one or more actions.
267
- * See {@link addColumnAction} / {@link dropDefaultAction} for building actions.
279
+ * See {@link addColumnAction}, {@link dropDefaultAction}, {@link addConstraintAction} and {@link alterColumnTypeAction} for building actions.
268
280
  */
269
281
  declare function alterTable(options: {
270
282
  readonly table: string;
@@ -272,5 +284,5 @@ declare function alterTable(options: {
272
284
  readonly actions: readonly AnyAlterTableAction[];
273
285
  }): PostgresAlterTable;
274
286
  //#endregion
275
- export { rlsEnabledAst as A, toRegclass as B, extensionExistsAst as C, jsonb as D, int8 as E, tablePrimaryKeyAst as F, text as I, textArray as L, sequenceNameAvailableAst as M, tableExistsAst as N, noNullValuesAst as O, tableIsEmptyAst as P, timestamptz as R, dropDefaultAction as S, int4 as T, columnNullabilityAst as _, IndexExistsCheckBuilder as a, createSchema as b, TableExistsCheckBuilder as c, alterTable as d, buildControlTableBootstrapQueries as f, columnExistsAst as g, columnDefaultSequenceAst as h, ExtensionExistsCheckBuilder as i, rlsPolicyExistsAst as j, pgTable as k, TablePrimaryKeyCheckBuilder as l, columnDefaultAst as m, ColumnExistsCheckBuilder as n, RlsEnabledCheckBuilder as o, buildSignMarkerBootstrapQueries as p, ConstraintExistsCheckBuilder as r, RlsPolicyExistsCheckBuilder as s, ColumnDefaultCheckBuilder as t, addColumnAction as u, columnTypeAst as v, indexExistsAst as w, createTable as x, constraintExistsAst as y, timestamptzJsDate as z };
276
- //# sourceMappingURL=contract-free-DY8vDIxh.d.mts.map
287
+ export { noNullValuesAst as A, timestamptz as B, createTable as C, int4 as D, indexExistsAst as E, tableExistsAst as F, toRegclass as H, tableIsEmptyAst as I, tablePrimaryKeyAst as L, rlsEnabledAst as M, rlsPolicyExistsAst as N, int8 as O, sequenceNameAvailableAst as P, text as R, createSchema as S, extensionExistsAst as T, timestamptzJsDate as V, columnDefaultSequenceAst as _, IndexExistsCheckBuilder as a, columnTypeAst as b, TableExistsCheckBuilder as c, addConstraintAction as d, alterColumnTypeAction as f, columnDefaultAst as g, buildSignMarkerBootstrapQueries as h, ExtensionExistsCheckBuilder as i, pgTable as j, jsonb as k, TablePrimaryKeyCheckBuilder as l, buildControlTableBootstrapQueries as m, ColumnExistsCheckBuilder as n, RlsEnabledCheckBuilder as o, alterTable as p, ConstraintExistsCheckBuilder as r, RlsPolicyExistsCheckBuilder as s, ColumnDefaultCheckBuilder as t, addColumnAction as u, columnExistsAst as v, dropDefaultAction as w, constraintExistsAst as x, columnNullabilityAst as y, textArray as z };
288
+ //# sourceMappingURL=contract-free-D-v6WIhk.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract-free-DY8vDIxh.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/contract-free.d.mts"],"mappings":";;;;;;;;;;;iBAUiB,WAAW,wBAAwB;UAC1C;EACR,eAAe;EACf,gBAAgB;;;;;;;;;;;iBAWD,eAAe,gBAAgB,gBAAgB;UACtD;EACR,qBAAqB;EACrB,oBAAoB;;;;;;;;;;;;;;;;iBAgBL,oBAAoB;WAC1B;WACA;WACA;IACP;UACM;EACR,iBAAiB;EACjB,gBAAgB;;;;;;;iBAOD,gBAAgB;WACtB;WACA;WACA;IACP;;;;;iBAKa,qBAAqB;WAC3B;WACA;WACA;WACA;IACP;UACM;EACR,kBAAkB;EAClB,iBAAiB;EACjB,aAAa;;;;;;;;iBAQE,iBAAiB;WACvB;WACA;WACA;IACP;;;;iBAIa,yBAAyB;WAC/B;WACA;WACA;IACP;;;;iBAIa,yBAAyB;WAC/B;WACA;WACA;WACA;IACP;;;;;;iBAMa,cAAc;WACpB;WACA;WACA;WACA;IACP;UACM;EACR,aAAa;EACb,YAAY;;;;;;;iBAOG,mBAAmB;WACzB;WACA;WACA;IACP;;;;;;iBAMa,gBAAgB,gBAAgB,gBAAgB;;;;;iBAKhD,gBAAgB;WACtB;WACA;WACA;IACP;UACM;EACR,oBAAoB;EACpB,mBAAmB;;;;;;iBAMJ,mBAAmB,wBAAwB;UAClD;EACR,iBAAiB;EACjB,gBAAgB;;;;;;;;iBAQD,mBAAmB;WACzB;WACA;WACA;IACP;UACM;EACR,cAAc;EACd,eAAe;;;;;;;iBAOA,cAAc,gBAAgB,gBAAgB;UACrD;EACR,gBAAgB;EAChB,eAAe;;;;;;iBAMA,eAAe,gBAAgB,oBAAoB;;;KAG/D;WACM;;cAEG,OAAO,OAAO,YAAY;cAC1B,OAAO,OAAO,YAAY;cAC1B,OAAO,OAAO,YAAY;cAC1B,QAAQ,OAAO,YAAY;cAC3B,YAAY,OAAO,YAAY;cAC/B,cAAc,OAAO,YAAY;cACjC,oBAAoB,OAAO,YAAY;;;;;;;;;;;;;iBAapC,QAAQ,eAAe,cAAc;WAC3C;WACA;WACA;GACR,SAAS,SAAS,YAAY;;;iBAGhB,4CAA4C;iBAC5C,8CAA8C;;;;;;;;;;;;;;;;;iBAiB9C,YAAY;WAClB;WACA;WACA;WACA,kBAAkB;WAClB,uBAAuB;IAC9B;;;;;iBAKa,aAAa;WACnB;WACA;IACP;;;;;;iBAMa,gBAAgB,QAAQ,YAAY;;;;;iBAKpC,kBAAkB,qBAAqB;;;;;iBAKvC,WAAW;WACjB;WACA;WACA,kBAAkB;IACzB"}
1
+ {"version":3,"file":"contract-free-D-v6WIhk.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/contract-free.d.mts"],"mappings":";;;;;;;;;;;iBAUiB,WAAW,wBAAwB;UAC1C;EACR,eAAe;EACf,gBAAgB;;;;;;;;;;;iBAWD,eAAe,gBAAgB,gBAAgB;UACtD;EACR,qBAAqB;EACrB,oBAAoB;;;;;;;;;;;;;;;;iBAgBL,oBAAoB;WAC1B;WACA;WACA;IACP;UACM;EACR,iBAAiB;EACjB,gBAAgB;;;;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IvC,oBAAoB,YAAY,qBAAqB;;;;iBAIrD,sBAAsB;WAC5B;WACA;WACA;IACP;;;;;iBAKa,WAAW;WACjB;WACA;WACA,kBAAkB;IACzB"}
@@ -1,6 +1,6 @@
1
1
  import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, S as PG_TEXT_CODEC_ID, m as PG_INT8_CODEC_ID, p as PG_INT4_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID } from "./codec-ids-Cb0yO-IS--e0P2rfI.mjs";
2
2
  import { l as PostgresTableSource } from "./postgres-schema-Ysxbqkzr-hFRwS-zT.mjs";
3
- import { m as createTable, p as createSchema } from "./ddl-BKqbtVN3-CPHiYaCY.mjs";
3
+ import { g as createTable, h as createSchema } from "./ddl-B6lRIezE-BMI5qzD2.mjs";
4
4
  import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
5
5
  import { col, fn, lit, table } from "@prisma/orm-family-sql/relational-core/contract-free";
6
6
  //#region ../../../3-targets/3-targets/postgres/dist/contract-free.mjs
@@ -119,4 +119,4 @@ function buildControlTableBootstrapQueries() {
119
119
  //#endregion
120
120
  export { jsonb as a, textArray as c, int8 as i, timestamptz as l, buildSignMarkerBootstrapQueries as n, pgTable as o, int4 as r, text as s, buildControlTableBootstrapQueries as t, timestamptzJsDate as u };
121
121
 
122
- //# sourceMappingURL=contract-free-spGyVyoh.mjs.map
122
+ //# sourceMappingURL=contract-free-DX6DmaSU.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-free-DX6DmaSU.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/contract-free.mjs"],"sourcesContent":["import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, S as PG_TEXT_CODEC_ID, m as PG_INT8_CODEC_ID, p as PG_INT4_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { u as PostgresTableSource } from \"./postgres-schema-Ysxbqkzr.mjs\";\nimport { A as sequenceNameAvailableAst, C as extensionExistsAst, D as noNullValuesAst, M as tableIsEmptyAst, N as tablePrimaryKeyAst, O as rlsEnabledAst, P as toRegclass, S as constraintExistsAst, _ as columnDefaultAst, b as columnNullabilityAst, j as tableExistsAst, k as rlsPolicyExistsAst, l as createSchema, n as addConstraintAction, o as alterTable, p as dropDefaultAction, r as alterColumnTypeAction, t as addColumnAction, u as createTable, v as columnDefaultSequenceAst, w as indexExistsAst, x as columnTypeAst, y as columnExistsAst } from \"./ddl-B6lRIezE.mjs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { col, fn, lit, table } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/columns.ts\nconst desc = (codecId, opts) => ({\n\tcodecId,\n\tnullable: opts?.nullable ?? false\n});\nconst text = (opts) => desc(PG_TEXT_CODEC_ID, opts);\nconst int4 = (opts) => desc(PG_INT4_CODEC_ID, opts);\nconst int8 = (opts) => desc(PG_INT8_CODEC_ID, opts);\nconst jsonb = (opts) => desc(PG_JSONB_CODEC_ID, opts);\nconst textArray = (opts) => ({\n\t...desc(PG_TEXT_CODEC_ID, opts),\n\tmany: true\n});\nconst timestamptz = (opts) => desc(PG_TIMESTAMPTZ_STRING_CODEC_ID, opts);\nconst timestamptzJsDate = (opts) => desc(PG_TIMESTAMPTZ_DATE_CODEC_ID, opts);\n/**\n* Declare a PostgreSQL control-plane table with a typed column schema. Wraps\n* the generic `table()` factory with a `PostgresTableSource` so the renderer\n* qualifies the table name with the optional schema prefix.\n*\n* ```ts\n* const marker = pgTable(\n* { name: 'marker', schema: 'prisma_contract' },\n* { space: text(), core_hash: text(), updated_at: timestamptz() },\n* );\n* ```\n*/\nfunction pgTable(source, columns) {\n\treturn table(new PostgresTableSource(source), columns);\n}\n//#endregion\n//#region src/contract-free/control-bootstrap.ts\nconst markerColumns = [\n\tcol(\"space\", \"text\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true,\n\t\tdefault: lit(APP_SPACE_ID)\n\t}),\n\tcol(\"core_hash\", \"text\", { notNull: true }),\n\tcol(\"profile_hash\", \"text\", { notNull: true }),\n\tcol(\"contract_json\", \"jsonb\"),\n\tcol(\"canonical_version\", \"int\"),\n\tcol(\"updated_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"app_tag\", \"text\"),\n\tcol(\"meta\", \"jsonb\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t}),\n\tcol(\"invariants\", \"text[]\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t})\n];\nconst ledgerColumns = [\n\tcol(\"id\", \"bigserial\", { primaryKey: true }),\n\tcol(\"created_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"space\", \"text\", { notNull: true }),\n\tcol(\"migration_name\", \"text\", { notNull: true }),\n\tcol(\"migration_hash\", \"text\", { notNull: true }),\n\tcol(\"origin_core_hash\", \"text\"),\n\tcol(\"origin_profile_hash\", \"text\"),\n\tcol(\"destination_core_hash\", \"text\", { notNull: true }),\n\tcol(\"destination_profile_hash\", \"text\"),\n\tcol(\"operations\", \"jsonb\", { notNull: true })\n];\nconst contractColumns = [\n\tcol(\"core_hash\", \"text\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true\n\t}),\n\tcol(\"created_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"contract_json\", \"jsonb\", { notNull: true })\n];\nconst markerTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"marker\",\n\tifNotExists: true,\n\tcolumns: markerColumns\n});\nconst ledgerTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"ledger\",\n\tifNotExists: true,\n\tcolumns: ledgerColumns\n});\nconst contractTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"contract\",\n\tifNotExists: true,\n\tcolumns: contractColumns\n});\nconst controlSchema = createSchema({\n\tschema: \"prisma_contract\",\n\tifNotExists: true\n});\nfunction buildSignMarkerBootstrapQueries() {\n\treturn [controlSchema, markerTable];\n}\nfunction buildControlTableBootstrapQueries() {\n\treturn [\n\t\tcontrolSchema,\n\t\tmarkerTable,\n\t\tledgerTable,\n\t\tcontractTable\n\t];\n}\n//#endregion\nexport { PostgresTableSource, addColumnAction, addConstraintAction, alterColumnTypeAction, alterTable, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, columnDefaultAst, columnDefaultSequenceAst, columnExistsAst, columnNullabilityAst, columnTypeAst, constraintExistsAst, createSchema, createTable, dropDefaultAction, extensionExistsAst, indexExistsAst, int4, int8, jsonb, noNullValuesAst, pgTable, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass };\n\n//# sourceMappingURL=contract-free.mjs.map"],"mappings":";;;;;;AAMA,MAAM,QAAQ,SAAS,UAAU;CAChC;CACA,UAAU,MAAM,YAAY;AAC7B;AACA,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,SAAS,SAAS,KAAK,mBAAmB,IAAI;AACpD,MAAM,aAAa,UAAU;CAC5B,GAAG,KAAK,kBAAkB,IAAI;CAC9B,MAAM;AACP;AACA,MAAM,eAAe,SAAS,KAAK,gCAAgC,IAAI;AACvE,MAAM,qBAAqB,SAAS,KAAK,8BAA8B,IAAI;;;;;;;;;;;;;AAa3E,SAAS,QAAQ,QAAQ,SAAS;CACjC,OAAO,MAAM,IAAI,oBAAoB,MAAM,GAAG,OAAO;AACtD;AAGA,MAAM,gBAAgB;CACrB,IAAI,SAAS,QAAQ;EACpB,SAAS;EAC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;CAC/B,QAAQ;CACR,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,MAAM,gBAAgB,YAAY;CACjC,QAAQ;CACR,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,MAAM,gBAAgB,aAAa;CAClC,QAAQ;CACR,aAAa;AACd,CAAC;AACD,SAAS,kCAAkC;CAC1C,OAAO,CAAC,eAAe,WAAW;AACnC;AACA,SAAS,oCAAoC;CAC5C,OAAO;EACN;EACA;EACA;EACA;CACD;AACD"}
@@ -1,8 +1,8 @@
1
1
  import { t as PostgresDatabaseSchemaNode } from "./postgres-database-schema-node-Cv8usVNX-BP4GzjSf.mjs";
2
2
  import "./types-BP1e5MBV.mjs";
3
3
  import { t as PostgresCodecRegistry } from "./codecs-ChjCJY5k.mjs";
4
- import { g as PostgresDdlNode } from "./nodes-C1fPapnK-j0AK7Gcj.mjs";
5
- import "./ddl-B-WjvCal.mjs";
4
+ import { v as PostgresDdlNode } from "./nodes-h4zPlhED-nduA-ijW.mjs";
5
+ import "./ddl-Da35uGK1.mjs";
6
6
  import { t as parsePostgresDefault } from "./default-normalizer-ZZ7Y5boE.mjs";
7
7
  import { AnyQueryAst, DdlColumn, DdlNode, LoweredStatement, LowererContext, MarkerReadResult, SqlExecuteRequest } from "@prisma/orm-family-sql/relational-core/ast";
8
8
  import { DataTypeLookup } from "@prisma/orm-framework/components/codec";
@@ -179,4 +179,4 @@ declare class PostgresControlAdapter implements SqlControlAdapter<'postgres'> {
179
179
  declare const postgresAdapterDescriptor: SqlControlAdapterDescriptor<'postgres'>;
180
180
  //#endregion
181
181
  export { postgresAdapterDescriptor as n, PostgresControlAdapter as t };
182
- //# sourceMappingURL=control-DmhbrV5f.d.mts.map
182
+ //# sourceMappingURL=control-CBG2OxfU.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-DmhbrV5f.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;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BAAyB;EAClC,yCAAyC;EACzC,uCAAuC;;;;;;;;;EASvC,MAAM,KAAK,cAAc,iBAAiB,SAAS,0BAA0B;EAC7E,oBAAoB,QAAQ,WAAW,gBAAgB;;;;;;;;EAQvD,sBAAsB,KAAK,cAAc,iBAAiB,UAAU,0BAA0B,QAAQ;;;;;;;;;EAStG,WAAW,QAAQ,sCAAsC,gBAAgB,QAAQ;EACjF,wBAAwB,QAAQ,sCAAsC,gBAAgB,QAAQ;;;;;;;EAO9F,eAAe,QAAQ,uCAAuC,QAAQ,oBAAoB;UAClF;;;;;;;EAOR,WAAW,QAAQ,sCAAsC,iBAAiB,iBAAiB;UACnF;;;;;;EAMR,aAAa,QAAQ,sCAAsC,eAAe;aAC/D;aACA;aACA;MACP;EACJ,WAAW,QAAQ,sCAAsC,eAAe;aAC7D;aACA;aACA;MACP;;;;;EAKJ,aAAa,QAAQ,sCAAsC,eAAe,sBAAsB;aACrF;aACA;aACA;MACP;EACJ,gBAAgB,GAAG,QAAQ,sCAAsC,UAAU,QAAQ,KAAK,QAAQ;EAChG,WAAW,QAAQ,uCAAuC;;;;EAI1D,iBAAiB,QAAQ,sCAAsC,eAAe;aACnE;aACA;aACA;aACA;aACA;aACA;aACA;MACP;UACI;UACA;;;;;;;;;;;;;;;;;;;;;;;;;EAyBR,WAAW,QAAQ,sCAAsC,oBAAoB,kBAAkB,QAAQ;;;;;UAK/F;;;;;;;;;UASA;;;;;;;;;UASA;UACA;;;;;;;UAOA;;;;UAIA;;;;cAII,2BAA2B"}
@@ -13,10 +13,10 @@ import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-D5OipARb-6z
13
13
  import { a as postgresDiffSubjectGranularity, i as postgresDiffSubjectEntityKind } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
14
14
  import { t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
15
15
  import { r as qualifyTableName } from "./planner-sql-checks-CX37qDix-Gkq38UQQ.mjs";
16
- import { r as diffPostgresSchema } from "./diff-database-schema-BV6Px0Gg-DAC6TL3P.mjs";
16
+ import { r as diffPostgresSchema } from "./diff-database-schema-Ce8vWO7g-gdU3XGHC.mjs";
17
17
  import { t as PostgresContractSerializer } from "./postgres-contract-view-3yxlqPfK-CRFLsRHu.mjs";
18
- import { o as postgresContractToSchema } from "./postgres-migration-CLIfS2iQ-BgnVMLRT.mjs";
19
- import { t as createPostgresMigrationPlanner } from "./planner-Ccn9yxL7-B6Pgoz6c.mjs";
18
+ import { o as postgresContractToSchema } from "./postgres-migration-DxPGyge8-ChvbfTP4.mjs";
19
+ import { t as createPostgresMigrationPlanner } from "./planner-BnZ7Ma0m-CuFTpofj.mjs";
20
20
  import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-QMJSzMIa.mjs";
21
21
  import { _ as positionalArg, a as buildFullTextIndexAttribute, c as buildModelConstraintAttribute, f as createPostgresTypeMap, g as parseDefaultAttributeString, i as buildCheckAttribute, l as buildNativeEnumBlock, m as namedArg, n as SYNTHETIC_SPAN, o as buildIndexAttribute, p as inferPostgresPslContract, r as buildAttribute, s as buildMapAttribute } from "./infer-psl-contract-B_Bl_RJC-BfJbvDUs.mjs";
22
22
  import { requiredParamKeys, validateCodecTypeParams } from "@prisma/orm-framework/components/codec";
@@ -2841,4 +2841,4 @@ const postgresTargetDescriptor = createPostgresTargetDescriptor();
2841
2841
  //#endregion
2842
2842
  export { postgresTargetDescriptor as i, postgresPslTypeConstructors as n, postgresScalarAuthoringTypes as r, postgresNativeAuthoringTypes as t };
2843
2843
 
2844
- //# sourceMappingURL=control-CP_p1FQ3.mjs.map
2844
+ //# sourceMappingURL=control-DxX_0Qw4.mjs.map