@prisma/orm-target-sqlite 8.0.0-rc.14-dev.34 → 8.0.0-rc.14-dev.36

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 (136) hide show
  1. package/dist/{adapter-Bp_4Bjff-Ce3oZAN1.d.mts → adapter-Bp_4Bjff-CjV5K6YY.d.mts} +3 -3
  2. package/dist/{adapter-Bp_4Bjff-Ce3oZAN1.d.mts.map → adapter-Bp_4Bjff-CjV5K6YY.d.mts.map} +1 -1
  3. package/dist/adapter-C1WN74k-.d.mts +2 -0
  4. package/dist/{adapter-DUwfMiE4-C-kTEDXO.mjs → adapter-Dvjudmph-Dvu8g0lW.mjs} +23 -7
  5. package/dist/adapter-Dvjudmph-Dvu8g0lW.mjs.map +1 -0
  6. package/dist/adapter.d.mts +10 -10
  7. package/dist/adapter.mjs +4 -4
  8. package/dist/adapter__adapter.d.mts +2 -2
  9. package/dist/adapter__adapter.mjs +1 -1
  10. package/dist/adapter__codec-types.d.mts +3 -3
  11. package/dist/adapter__column-types.d.mts +1 -1
  12. package/dist/adapter__column-types.mjs +1 -1
  13. package/dist/adapter__control.d.mts +2 -2
  14. package/dist/adapter__control.mjs +5 -5
  15. package/dist/adapter__control.mjs.map +1 -1
  16. package/dist/adapter__runtime.d.mts +1 -1
  17. package/dist/adapter__runtime.mjs +3 -3
  18. package/dist/adapter__runtime.mjs.map +1 -1
  19. package/dist/adapter__sql-renderer.d.mts +2 -2
  20. package/dist/adapter__sql-renderer.mjs +1 -1
  21. package/dist/adapter__types.d.mts +2 -2
  22. package/dist/{codec-descriptor-BX2XRz4V-DxUIN3j3.mjs → codec-descriptor-Bf6MlyeJ-C1PfQ9LO.mjs} +3 -3
  23. package/dist/{codec-descriptor-BX2XRz4V-DxUIN3j3.mjs.map → codec-descriptor-Bf6MlyeJ-C1PfQ9LO.mjs.map} +1 -1
  24. package/dist/{codec-types-B_IhsOl9-WPSRXocH.d.mts → codec-types-0AMy_n05-BJvXpaEh.d.mts} +14 -4
  25. package/dist/codec-types-0AMy_n05-BJvXpaEh.d.mts.map +1 -0
  26. package/dist/codec-types-BV1uyhho.d.mts +1 -0
  27. package/dist/codec-types-CLFLW8jd.d.mts +2 -0
  28. package/dist/{codecs-DlI8SadA.mjs → codecs-ByvSFGut.mjs} +3 -3
  29. package/dist/{codecs-DlI8SadA.mjs.map → codecs-ByvSFGut.mjs.map} +1 -1
  30. package/dist/{codecs-r7gY3BuR-B6lXeFyH.mjs → codecs-CaOcjLon-BZ4M7GfD.mjs} +119 -45
  31. package/dist/codecs-CaOcjLon-BZ4M7GfD.mjs.map +1 -0
  32. package/dist/{codecs-hLsmWJRa-DfMCx_nO.d.mts → codecs-DeFZ_0jC-CgA8KUIS.d.mts} +37 -28
  33. package/dist/codecs-DeFZ_0jC-CgA8KUIS.d.mts.map +1 -0
  34. package/dist/codecs-xDq4DNf8.d.mts +1 -0
  35. package/dist/column-types-CWeuNngG.mjs +13 -0
  36. package/dist/column-types-CWeuNngG.mjs.map +1 -0
  37. package/dist/{column-types-iWGuW-0W.d.mts → column-types-DzzwJf7V.d.mts} +1 -8
  38. package/dist/column-types-DzzwJf7V.d.mts.map +1 -0
  39. package/dist/{control-1rQ6mko7.mjs → control-4njwExvT.mjs} +2 -1
  40. package/dist/control-4njwExvT.mjs.map +1 -0
  41. package/dist/{control-CEsPGd0f.mjs → control-B6oLQvl-.mjs} +16 -9
  42. package/dist/{control-CEsPGd0f.mjs.map → control-B6oLQvl-.mjs.map} +1 -1
  43. package/dist/{control-DgI8tIaw.d.mts → control-wWiQrj5H.d.mts} +6 -5
  44. package/dist/{control-DgI8tIaw.d.mts.map → control-wWiQrj5H.d.mts.map} +1 -1
  45. package/dist/data-type-entries-Bc09V6WN-Dc00J0G9.mjs +57 -0
  46. package/dist/data-type-entries-Bc09V6WN-Dc00J0G9.mjs.map +1 -0
  47. package/dist/{data-types-ZsgBg_Zg.d.mts → data-types-B_k5-Ohy.d.mts} +4 -11
  48. package/dist/data-types-B_k5-Ohy.d.mts.map +1 -0
  49. package/dist/data-types-pFQMl37_-B-3aK_wd.mjs +73 -0
  50. package/dist/data-types-pFQMl37_-B-3aK_wd.mjs.map +1 -0
  51. package/dist/{default-normalizer-Czg-VtmN-DEbkGbn7.mjs → default-normalizer-Ch3VFnEH-C-h1XtlJ.mjs} +6 -6
  52. package/dist/default-normalizer-Ch3VFnEH-C-h1XtlJ.mjs.map +1 -0
  53. package/dist/{descriptor-meta-AG8POta2-D-k13ZOE.mjs → descriptor-meta-C3n4Dwxu-DJiDDku0.mjs} +5 -5
  54. package/dist/{descriptor-meta-AG8POta2-D-k13ZOE.mjs.map → descriptor-meta-C3n4Dwxu-DJiDDku0.mjs.map} +1 -1
  55. package/dist/{descriptor-meta-CFPBLIHW-BwigY92R.mjs → descriptor-meta-CFPBLIHW-I-y9R_fj.mjs} +2 -2
  56. package/dist/{descriptor-meta-CFPBLIHW-BwigY92R.mjs.map → descriptor-meta-CFPBLIHW-I-y9R_fj.mjs.map} +1 -1
  57. package/dist/{descriptor-meta-runtime-CIrdwmEr-3T3t3kjc.mjs → descriptor-meta-runtime-Dqtz58eJ-BJ4UjLXW.mjs} +3 -3
  58. package/dist/{descriptor-meta-runtime-CIrdwmEr-3T3t3kjc.mjs.map → descriptor-meta-runtime-Dqtz58eJ-BJ4UjLXW.mjs.map} +1 -1
  59. package/dist/driver.mjs +1 -1
  60. package/dist/driver__control.mjs +1 -1
  61. package/dist/{migration-LE8F9qcM.d.mts → migration-Ccuxti02.d.mts} +2 -2
  62. package/dist/{migration-LE8F9qcM.d.mts.map → migration-Ccuxti02.d.mts.map} +1 -1
  63. package/dist/{migration-BA5np0wx.mjs → migration-Di-URWbl.mjs} +2 -2
  64. package/dist/{migration-BA5np0wx.mjs.map → migration-Di-URWbl.mjs.map} +1 -1
  65. package/dist/{op-factory-call-V6Wu86U8-B1Y4idhr.mjs → op-factory-call-HHnPrspy-7shWKb03.mjs} +13 -9
  66. package/dist/op-factory-call-HHnPrspy-7shWKb03.mjs.map +1 -0
  67. package/dist/{pack-B1iD7wyf.d.mts → pack-BIZIGw3P.d.mts} +2 -2
  68. package/dist/{pack-B1iD7wyf.d.mts.map → pack-BIZIGw3P.d.mts.map} +1 -1
  69. package/dist/{planner-Cm5kqc7I-CKSYA8QU.mjs → planner-BgH57J9_-DZQSi5aj.mjs} +5 -5
  70. package/dist/{planner-Cm5kqc7I-CKSYA8QU.mjs.map → planner-BgH57J9_-DZQSi5aj.mjs.map} +1 -1
  71. package/dist/{planner-B37W4Kaw.d.mts → planner-CFIbY54l.d.mts} +2 -2
  72. package/dist/{planner-B37W4Kaw.d.mts.map → planner-CFIbY54l.d.mts.map} +1 -1
  73. package/dist/{planner-produced-sqlite-migration-C6t5lWDq-DXm-Vkhf.d.mts → planner-produced-sqlite-migration-DXcx0sOR-CcMQKE7n.d.mts} +3 -3
  74. package/dist/planner-produced-sqlite-migration-DXcx0sOR-CcMQKE7n.d.mts.map +1 -0
  75. package/dist/{planner-produced-sqlite-migration-DWsg0vgl-N6_jUi2G.mjs → planner-produced-sqlite-migration-Rsg1Udsi-DMyO7zT3.mjs} +3 -3
  76. package/dist/{planner-produced-sqlite-migration-DWsg0vgl-N6_jUi2G.mjs.map → planner-produced-sqlite-migration-Rsg1Udsi-DMyO7zT3.mjs.map} +1 -1
  77. package/dist/planner-produced-sqlite-migration-sYbbeyyS.d.mts +1 -0
  78. package/dist/{runtime-CG71EORy.d.mts → runtime-612DH-du.d.mts} +2 -2
  79. package/dist/{runtime-CG71EORy.d.mts.map → runtime-612DH-du.d.mts.map} +1 -1
  80. package/dist/{runtime-B99c4n56.d.mts → runtime-8_WfNAcA.d.mts} +2 -2
  81. package/dist/{runtime-B99c4n56.d.mts.map → runtime-8_WfNAcA.d.mts.map} +1 -1
  82. package/dist/sql-renderer-fyjZG1VX.d.mts +1 -0
  83. package/dist/{sqlite-contract-view-BpNMaU2m-COMDaGaq.d.mts → sqlite-contract-view-BDw8T5Cp-CbLVOPJq.d.mts} +5 -4
  84. package/dist/sqlite-contract-view-BDw8T5Cp-CbLVOPJq.d.mts.map +1 -0
  85. package/dist/{sqlite-migration-2IEGvjRm-BQfd6NLr.d.mts → sqlite-migration-BSUZhMDG-DZU3d7bZ.d.mts} +3 -3
  86. package/dist/{sqlite-migration-2IEGvjRm-BQfd6NLr.d.mts.map → sqlite-migration-BSUZhMDG-DZU3d7bZ.d.mts.map} +1 -1
  87. package/dist/{sqlite-migration-CindFauZ-BM2X6Ha3.mjs → sqlite-migration-CJFj4Xjj-Bkj6DFpZ.mjs} +12 -11
  88. package/dist/sqlite-migration-CJFj4Xjj-Bkj6DFpZ.mjs.map +1 -0
  89. package/dist/target.d.mts +14 -14
  90. package/dist/target.mjs +13 -13
  91. package/dist/target__codec-descriptor.mjs +1 -1
  92. package/dist/target__codec-types.d.mts +3 -3
  93. package/dist/target__codecs.d.mts +2 -2
  94. package/dist/target__codecs.mjs +2 -2
  95. package/dist/target__control.mjs +1 -1
  96. package/dist/target__data-types.d.mts +2 -2
  97. package/dist/target__data-types.mjs +3 -3
  98. package/dist/target__default-normalizer.mjs +1 -1
  99. package/dist/target__migration.d.mts +2 -2
  100. package/dist/target__migration.mjs +2 -2
  101. package/dist/target__op-factory-call.mjs +1 -1
  102. package/dist/target__pack.d.mts +1 -1
  103. package/dist/target__pack.mjs +1 -1
  104. package/dist/target__planner-produced-sqlite-migration.d.mts +2 -2
  105. package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
  106. package/dist/target__planner.d.mts +1 -1
  107. package/dist/target__planner.mjs +1 -1
  108. package/dist/target__runtime.d.mts +2 -2
  109. package/dist/target__runtime.mjs +1 -1
  110. package/dist/target__runtime.mjs.map +1 -1
  111. package/dist/{types-CJW_JAJf.d.mts → types-BwhTlH8P.d.mts} +1 -1
  112. package/package.json +9 -9
  113. package/dist/adapter-C-sqCgrP.d.mts +0 -2
  114. package/dist/adapter-DUwfMiE4-C-kTEDXO.mjs.map +0 -1
  115. package/dist/codec-types-BXwJkshK.d.mts +0 -2
  116. package/dist/codec-types-B_IhsOl9-WPSRXocH.d.mts.map +0 -1
  117. package/dist/codec-types-BhSj11Hl.d.mts +0 -1
  118. package/dist/codecs-DSZbU8RG.d.mts +0 -1
  119. package/dist/codecs-hLsmWJRa-DfMCx_nO.d.mts.map +0 -1
  120. package/dist/codecs-r7gY3BuR-B6lXeFyH.mjs.map +0 -1
  121. package/dist/column-types-NVxgsjFA.mjs +0 -34
  122. package/dist/column-types-NVxgsjFA.mjs.map +0 -1
  123. package/dist/column-types-iWGuW-0W.d.mts.map +0 -1
  124. package/dist/control-1rQ6mko7.mjs.map +0 -1
  125. package/dist/data-type-entries-CL0a2goH-BCEztwoX.mjs +0 -68
  126. package/dist/data-type-entries-CL0a2goH-BCEztwoX.mjs.map +0 -1
  127. package/dist/data-types-Bs4y7eZb-B00ws2B6.mjs +0 -111
  128. package/dist/data-types-Bs4y7eZb-B00ws2B6.mjs.map +0 -1
  129. package/dist/data-types-ZsgBg_Zg.d.mts.map +0 -1
  130. package/dist/default-normalizer-Czg-VtmN-DEbkGbn7.mjs.map +0 -1
  131. package/dist/op-factory-call-V6Wu86U8-B1Y4idhr.mjs.map +0 -1
  132. package/dist/planner-produced-sqlite-migration-C6t5lWDq-DXm-Vkhf.d.mts.map +0 -1
  133. package/dist/planner-produced-sqlite-migration-D7O3_r38.d.mts +0 -1
  134. package/dist/sql-renderer-eeiux6H6.d.mts +0 -1
  135. package/dist/sqlite-contract-view-BpNMaU2m-COMDaGaq.d.mts.map +0 -1
  136. package/dist/sqlite-migration-CindFauZ-BM2X6Ha3.mjs.map +0 -1
@@ -2,32 +2,25 @@
2
2
  //#region src/core/column-types.d.ts
3
3
  declare const textColumn: {
4
4
  readonly codecId: "sqlite/text@1";
5
- readonly nativeType: "text";
6
5
  };
7
6
  declare const integerColumn: {
8
7
  readonly codecId: "sqlite/integer@1";
9
- readonly nativeType: "integer";
10
8
  };
11
9
  declare const realColumn: {
12
10
  readonly codecId: "sqlite/real@1";
13
- readonly nativeType: "real";
14
11
  };
15
12
  declare const blobColumn: {
16
13
  readonly codecId: "sqlite/blob@1";
17
- readonly nativeType: "blob";
18
14
  };
19
15
  declare const datetimeColumn: {
20
16
  readonly codecId: "sqlite/datetime@1";
21
- readonly nativeType: "text";
22
17
  };
23
18
  declare const jsonColumn: {
24
19
  readonly codecId: "sqlite/json@1";
25
- readonly nativeType: "text";
26
20
  };
27
21
  declare const bigintColumn: {
28
22
  readonly codecId: "sqlite/bigint@1";
29
- readonly nativeType: "integer";
30
23
  };
31
24
  //#endregion
32
25
  export { jsonColumn as a, integerColumn as i, blobColumn as n, realColumn as o, datetimeColumn as r, textColumn as s, bigintColumn as t };
33
- //# sourceMappingURL=column-types-iWGuW-0W.d.mts.map
26
+ //# sourceMappingURL=column-types-DzzwJf7V.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-types-DzzwJf7V.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/column-types.d.mts"],"mappings":";;cACc;WACH;;cAEG;WACH;;cAEG;WACH;;cAEG;WACH;;cAEG;WACH;;cAEG;WACH;;cAEG;WACH"}
@@ -34,6 +34,7 @@ const sqliteDriverDescriptor = {
34
34
  try {
35
35
  const db = new DatabaseSync(pathOrMemory);
36
36
  db.exec("PRAGMA foreign_keys = ON");
37
+ db.exec("PRAGMA busy_timeout = 5000");
37
38
  return new SqliteControlDriver(db, pathOrMemory);
38
39
  } catch (error) {
39
40
  throw errorRuntime("DRIVER.CONNECTION_FAILED", "Database connection failed", {
@@ -48,4 +49,4 @@ const sqliteDriverDescriptor = {
48
49
  //#endregion
49
50
  export { sqliteDriverDescriptor as n, SqliteControlDriver as t };
50
51
 
51
- //# sourceMappingURL=control-1rQ6mko7.mjs.map
52
+ //# sourceMappingURL=control-4njwExvT.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-4njwExvT.mjs","names":[],"sources":["../../../../3-targets/7-drivers/sqlite/dist/control.mjs"],"sourcesContent":["import { n as sqliteParams, r as normalizeSqliteError, t as sqliteDriverDescriptorMeta } from \"./descriptor-meta-cwy5CXTT.mjs\";\nimport { DatabaseSync } from \"node:sqlite\";\nimport { errorRuntime } from \"@internal/errors/execution\";\nimport { basename } from \"pathe\";\n//#region src/core/control-driver.ts\nvar SqliteControlDriver = class {\n\tdb;\n\tlocation;\n\tfamilyId = \"sql\";\n\ttargetId = \"sqlite\";\n\tconstructor(db, location) {\n\t\tthis.db = db;\n\t\tthis.location = location;\n\t}\n\tasync query(sql, params) {\n\t\ttry {\n\t\t\treturn { rows: this.db.prepare(sql).all(...sqliteParams(params)) };\n\t\t} catch (error) {\n\t\t\tthrow normalizeSqliteError(error);\n\t\t}\n\t}\n\tasync databaseName() {\n\t\tif (this.location === \":memory:\" || this.location.length === 0) return;\n\t\tconst name = basename(this.location);\n\t\treturn name.length > 0 ? name : void 0;\n\t}\n\tasync close() {\n\t\tthis.db.close();\n\t}\n};\nconst sqliteDriverDescriptor = {\n\t...sqliteDriverDescriptorMeta,\n\tasync create(pathOrMemory) {\n\t\ttry {\n\t\t\tconst db = new DatabaseSync(pathOrMemory);\n\t\t\tdb.exec(\"PRAGMA foreign_keys = ON\");\n\t\t\tdb.exec(\"PRAGMA busy_timeout = 5000\");\n\t\t\treturn new SqliteControlDriver(db, pathOrMemory);\n\t\t} catch (error) {\n\t\t\tthrow errorRuntime(\"DRIVER.CONNECTION_FAILED\", \"Database connection failed\", {\n\t\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\t\tfix: \"Verify the database file path exists and is accessible\",\n\t\t\t\tmeta: { path: pathOrMemory },\n\t\t\t\tcause: error\n\t\t\t});\n\t\t}\n\t}\n};\n//#endregion\nexport { SqliteControlDriver, sqliteDriverDescriptor as default };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;AAKA,IAAI,sBAAsB,MAAM;CAC/B;CACA;CACA,WAAW;CACX,WAAW;CACX,YAAY,IAAI,UAAU;EACzB,KAAK,KAAK;EACV,KAAK,WAAW;CACjB;CACA,MAAM,MAAM,KAAK,QAAQ;EACxB,IAAI;GACH,OAAO,EAAE,MAAM,KAAK,GAAG,QAAQ,GAAG,CAAC,CAAC,IAAI,GAAG,aAAa,MAAM,CAAC,EAAE;EAClE,SAAS,OAAO;GACf,MAAM,qBAAqB,KAAK;EACjC;CACD;CACA,MAAM,eAAe;EACpB,IAAI,KAAK,aAAa,cAAc,KAAK,SAAS,WAAW,GAAG;EAChE,MAAM,OAAO,SAAS,KAAK,QAAQ;EACnC,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK;CACtC;CACA,MAAM,QAAQ;EACb,KAAK,GAAG,MAAM;CACf;AACD;AACA,MAAM,yBAAyB;CAC9B,GAAG;CACH,MAAM,OAAO,cAAc;EAC1B,IAAI;GACH,MAAM,KAAK,IAAI,aAAa,YAAY;GACxC,GAAG,KAAK,0BAA0B;GAClC,GAAG,KAAK,4BAA4B;GACpC,OAAO,IAAI,oBAAoB,IAAI,YAAY;EAChD,SAAS,OAAO;GACf,MAAM,aAAa,4BAA4B,8BAA8B;IAC5E,KAAK,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IAC1D,KAAK;IACL,MAAM,EAAE,MAAM,aAAa;IAC3B,OAAO;GACR,CAAC;EACF;CACD;AACD"}
@@ -1,10 +1,10 @@
1
1
  import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from "./codec-ids-KMliSCRp-BhTbmbGr.mjs";
2
2
  import { n as sqliteError } from "./errors-DnR-sMHS-KkMLIP2U.mjs";
3
- import { t as sqliteTargetDescriptorMeta } from "./descriptor-meta-AG8POta2-D-k13ZOE.mjs";
3
+ import { t as sqliteTargetDescriptorMeta } from "./descriptor-meta-C3n4Dwxu-DJiDDku0.mjs";
4
4
  import { r as MARKER_TABLE_NAME } from "./control-tables-D_o8dKRB-BXi43noL.mjs";
5
5
  import { t as SqliteContractSerializer } from "./sqlite-contract-view-BYR10usg-BteDAUZr.mjs";
6
- import { a as diffSqliteSchema, f as verifySqliteDatabaseSchema, u as sqliteContractToSchema } from "./sqlite-migration-CindFauZ-BM2X6Ha3.mjs";
7
- import { n as createSqliteMigrationPlanner } from "./planner-Cm5kqc7I-CKSYA8QU.mjs";
6
+ import { a as diffSqliteSchema, f as verifySqliteDatabaseSchema, u as sqliteContractToSchema } from "./sqlite-migration-CJFj4Xjj-Bkj6DFpZ.mjs";
7
+ import { n as createSqliteMigrationPlanner } from "./planner-BgH57J9_-DZQSi5aj.mjs";
8
8
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
9
9
  import { blindCast } from "@prisma/orm-framework/utils/casts";
10
10
  import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
@@ -333,11 +333,18 @@ var SqliteMigrationRunner = class {
333
333
  space,
334
334
  expectedFrom: existingMarker.storageHash,
335
335
  destination
336
- })) return runnerFailure("MIGRATION.MARKER_CAS_FAILURE", "Marker was modified by another process during migration execution.", { meta: {
337
- space,
338
- expectedStorageHash: existingMarker.storageHash,
339
- destinationStorageHash: options.plan.destination.storageHash
340
- } });
336
+ })) {
337
+ const found = await this.family.readMarker({
338
+ driver,
339
+ space
340
+ });
341
+ return runnerFailure("MIGRATION.MARKER_CAS_FAILURE", "Marker was modified by another process during migration execution.", { meta: {
342
+ space,
343
+ expectedStorageHash: existingMarker.storageHash,
344
+ foundStorageHash: found?.storageHash ?? null,
345
+ destinationStorageHash: options.plan.destination.storageHash
346
+ } });
347
+ }
341
348
  return okVoid();
342
349
  }
343
350
  async recordLedgerEntries(driver, options, executedOperations) {
@@ -481,4 +488,4 @@ const sqlitePslTypeConstructors = {
481
488
  //#endregion
482
489
  export { sqlitePslTypeConstructors as n, sqliteControlTargetDescriptor as t };
483
490
 
484
- //# sourceMappingURL=control-CEsPGd0f.mjs.map
491
+ //# sourceMappingURL=control-B6oLQvl-.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-CEsPGd0f.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/control.mjs"],"sourcesContent":["import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from \"./codec-ids-KMliSCRp.mjs\";\nimport { n as sqliteError } from \"./errors-DnR-sMHS.mjs\";\nimport { t as sqliteTargetDescriptorMeta } from \"./descriptor-meta-AG8POta2.mjs\";\nimport { d as sqliteContractToSchema, f as verifySqliteDatabaseSchema, u as diffSqliteSchema } from \"./sqlite-migration-CindFauZ.mjs\";\nimport { r as MARKER_TABLE_NAME } from \"./control-tables-D_o8dKRB.mjs\";\nimport { i as sqliteCreateNamespace, n as SqliteContractSerializer, r as SqliteUnboundDatabase } from \"./sqlite-contract-view-BYR10usg.mjs\";\nimport { n as createSqliteMigrationPlanner } from \"./planner-Cm5kqc7I.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { runnerFailure, runnerSuccess, sqlTypeLookupsOf } from \"@internal/family-sql/control\";\nimport { SqlStorage } from \"@internal/sql-contract/types\";\nimport { relationalNodeEntityKind, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\nimport { notOk, ok, okVoid } from \"@internal/utils/result\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { SqlSchemaVerifierBase } from \"@internal/family-sql/ir\";\n//#region src/core/migrations/runner.ts\nfunction createSqliteMigrationRunner(family) {\n\treturn new SqliteMigrationRunner(family);\n}\nvar SqliteMigrationRunner = class {\n\tfamily;\n\tconstructor(family) {\n\t\tthis.family = family;\n\t}\n\t/**\n\t* Apply the plan against an already-open connection without managing\n\t* the transaction lifecycle. The caller ({@link SqliteMigrationRunner.execute})\n\t* owns BEGIN/COMMIT/ROLLBACK and any connection-level setup (FK pragma\n\t* toggle, FK integrity check).\n\t*/\n\tasync executeOnConnection(options) {\n\t\tconst driver = options.driver;\n\t\tif (options.space !== void 0 && options.space !== options.plan.spaceId) throw sqliteError(\"MIGRATION.CONTRACT_SPACE_VIOLATION\", `SqlMigrationRunner: options.space (${options.space}) does not match plan.spaceId (${options.plan.spaceId})`, { meta: {\n\t\t\tspace: options.space,\n\t\t\tplanSpaceId: options.plan.spaceId\n\t\t} });\n\t\tconst space = options.plan.spaceId;\n\t\tconst planOps = blindCast(await Promise.all(options.plan.operations));\n\t\tconst destinationCheck = this.ensurePlanMatchesDestinationContract(options.plan.destination, options.destinationContract);\n\t\tif (!destinationCheck.ok) return destinationCheck;\n\t\tconst policyCheck = this.enforcePolicyCompatibility(options.policy, planOps);\n\t\tif (!policyCheck.ok) return policyCheck;\n\t\tconst ensureResult = await this.ensureControlTables(driver, options.destinationContract);\n\t\tif (!ensureResult.ok) return ensureResult;\n\t\tconst existingMarker = await this.family.readMarker({\n\t\t\tdriver,\n\t\t\tspace\n\t\t});\n\t\tconst markerCheck = this.ensureMarkerCompatibility(existingMarker, options.plan);\n\t\tif (!markerCheck.ok) return markerCheck;\n\t\tconst markerAtDestination = this.markerMatchesDestination(existingMarker, options.plan);\n\t\tconst isSelfEdge = options.plan.origin?.storageHash === options.plan.destination.storageHash;\n\t\tconst skipOperations = markerAtDestination && options.plan.origin != null && !isSelfEdge;\n\t\tlet operationsExecuted;\n\t\tlet executedOperations;\n\t\tif (skipOperations) {\n\t\t\toperationsExecuted = 0;\n\t\t\texecutedOperations = [];\n\t\t} else {\n\t\t\tconst applyResult = await this.applyPlan(driver, options, planOps);\n\t\t\tif (!applyResult.ok) return applyResult;\n\t\t\toperationsExecuted = applyResult.value.operationsExecuted;\n\t\t\texecutedOperations = applyResult.value.executedOperations;\n\t\t}\n\t\tif (space === APP_SPACE_ID) {\n\t\t\tconst schemaNode = await this.family.introspect({\n\t\t\t\tdriver,\n\t\t\t\tcontract: options.destinationContract\n\t\t\t});\n\t\t\tconst schemaVerifyResult = verifySqliteDatabaseSchema({\n\t\t\t\tcontract: options.destinationContract,\n\t\t\t\tactualSchema: schemaNode,\n\t\t\t\tstrict: options.strictVerification ?? true,\n\t\t\t\tframeworkComponents: options.frameworkComponents\n\t\t\t});\n\t\t\tif (!schemaVerifyResult.ok) return runnerFailure(\"MIGRATION.SCHEMA_VERIFY_FAILED\", schemaVerifyResult.summary, {\n\t\t\t\twhy: \"The resulting database schema does not satisfy the destination contract.\",\n\t\t\t\tmeta: { issues: schemaVerifyResult.schema.issues }\n\t\t\t});\n\t\t}\n\t\tconst incomingInvariants = options.plan.providedInvariants;\n\t\tconst existingInvariants = new Set(existingMarker?.invariants ?? []);\n\t\tconst incomingIsSubsetOfExisting = incomingInvariants.every((id) => existingInvariants.has(id));\n\t\tif (!(isSelfEdge && operationsExecuted === 0 && incomingIsSubsetOfExisting)) {\n\t\t\tconst markerResult = await this.upsertMarker(driver, options, existingMarker, space);\n\t\t\tif (!markerResult.ok) return markerResult;\n\t\t\tawait this.recordLedgerEntries(driver, options, executedOperations);\n\t\t}\n\t\treturn runnerSuccess({\n\t\t\toperationsPlanned: planOps.length,\n\t\t\toperationsExecuted\n\t\t});\n\t}\n\tasync execute(options) {\n\t\tconst driver = options.driver;\n\t\tconst perSpaceOptions = options.perSpaceOptions;\n\t\tif (perSpaceOptions.length === 0) return ok({ perSpaceResults: [] });\n\t\tconst fkWasEnabled = await this.readForeignKeysEnabled(driver);\n\t\tif (fkWasEnabled) await driver.query(\"PRAGMA foreign_keys = OFF\");\n\t\ttry {\n\t\t\tawait this.beginExclusiveTransaction(driver);\n\t\t\tlet committed = false;\n\t\t\ttry {\n\t\t\t\tconst perSpaceResults = [];\n\t\t\t\tlet lastProcessedSpace;\n\t\t\t\tfor (const spaceOptions of perSpaceOptions) {\n\t\t\t\t\tconst space = spaceOptions.space ?? spaceOptions.plan.spaceId;\n\t\t\t\t\tconst result = await this.executeOnConnection({\n\t\t\t\t\t\t...spaceOptions,\n\t\t\t\t\t\tdriver,\n\t\t\t\t\t\tspace\n\t\t\t\t\t});\n\t\t\t\t\tif (!result.ok) return notOk({\n\t\t\t\t\t\t...result.failure,\n\t\t\t\t\t\tfailingSpace: space\n\t\t\t\t\t});\n\t\t\t\t\tperSpaceResults.push({\n\t\t\t\t\t\tspace,\n\t\t\t\t\t\tvalue: result.value\n\t\t\t\t\t});\n\t\t\t\t\tlastProcessedSpace = space;\n\t\t\t\t}\n\t\t\t\tif (fkWasEnabled) {\n\t\t\t\t\tconst fkIntegrityCheck = await this.verifyForeignKeyIntegrity(driver);\n\t\t\t\t\tif (!fkIntegrityCheck.ok) return notOk({\n\t\t\t\t\t\t...fkIntegrityCheck.failure,\n\t\t\t\t\t\tfailingSpace: lastProcessedSpace ?? APP_SPACE_ID\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tawait this.commitTransaction(driver);\n\t\t\t\tcommitted = true;\n\t\t\t\treturn ok({ perSpaceResults });\n\t\t\t} finally {\n\t\t\t\tif (!committed) await this.rollbackTransaction(driver);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (fkWasEnabled) await driver.query(\"PRAGMA foreign_keys = ON\");\n\t\t}\n\t}\n\tasync readForeignKeysEnabled(driver) {\n\t\treturn (await driver.query(\"PRAGMA foreign_keys\")).rows[0]?.foreign_keys === 1;\n\t}\n\tasync verifyForeignKeyIntegrity(driver) {\n\t\tconst result = await driver.query(\"PRAGMA foreign_key_check\");\n\t\tif (result.rows.length === 0) return okVoid();\n\t\treturn runnerFailure(\"MIGRATION.FOREIGN_KEY_VIOLATION\", `Foreign key integrity check failed after migration: ${result.rows.length} violation(s).`, {\n\t\t\twhy: \"PRAGMA foreign_key_check reported violations after applying recreate-table operations.\",\n\t\t\tmeta: { violations: result.rows }\n\t\t});\n\t}\n\tasync applyPlan(driver, options, ops) {\n\t\tconst checks = options.executionChecks;\n\t\tconst runPrechecks = checks?.prechecks !== false;\n\t\tconst runPostchecks = checks?.postchecks !== false;\n\t\tconst runIdempotency = checks?.idempotencyChecks !== false;\n\t\tlet operationsExecuted = 0;\n\t\tconst executedOperations = [];\n\t\tfor (const operation of ops) {\n\t\t\toptions.callbacks?.onOperationStart?.(operation);\n\t\t\ttry {\n\t\t\t\tif (runPostchecks && runIdempotency) {\n\t\t\t\t\tif (await this.expectationsAreSatisfied(driver, operation.postcheck)) {\n\t\t\t\t\t\texecutedOperations.push(this.createSkipRecord(operation));\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (runPrechecks) {\n\t\t\t\t\tconst precheckResult = await this.runExpectationSteps(driver, operation.precheck, operation, \"precheck\");\n\t\t\t\t\tif (!precheckResult.ok) return precheckResult;\n\t\t\t\t}\n\t\t\t\tconst executeResult = await this.runExecuteSteps(driver, operation.execute, operation);\n\t\t\t\tif (!executeResult.ok) return executeResult;\n\t\t\t\tif (runPostchecks) {\n\t\t\t\t\tconst postcheckResult = await this.runExpectationSteps(driver, operation.postcheck, operation, \"postcheck\");\n\t\t\t\t\tif (!postcheckResult.ok) return postcheckResult;\n\t\t\t\t}\n\t\t\t\texecutedOperations.push(operation);\n\t\t\t\toperationsExecuted += 1;\n\t\t\t} finally {\n\t\t\t\toptions.callbacks?.onOperationComplete?.(operation);\n\t\t\t}\n\t\t}\n\t\treturn ok({\n\t\t\toperationsExecuted,\n\t\t\texecutedOperations\n\t\t});\n\t}\n\tasync ensureControlTables(driver, contract) {\n\t\tconst legacyDetection = await this.detectLegacyMarkerShape(driver);\n\t\tif (!legacyDetection.ok) return legacyDetection;\n\t\tconst lowererContext = { contract };\n\t\tfor (const query of this.family.bootstrapControlTableQueries()) await this.executeStatement(driver, await this.family.lowerAst(query, lowererContext));\n\t\treturn okVoid();\n\t}\n\tasync detectLegacyMarkerShape(driver) {\n\t\tconst tableInfo = await driver.query(`PRAGMA table_info(\"${MARKER_TABLE_NAME}\")`);\n\t\tif (tableInfo.rows.length === 0) return okVoid();\n\t\tconst columns = new Set(tableInfo.rows.map((row) => row.name));\n\t\tif (columns.has(\"space\")) return okVoid();\n\t\treturn runnerFailure(\"MIGRATION.LEGACY_MARKER_SHAPE\", `Legacy marker-table shape detected on ${MARKER_TABLE_NAME} (no \\`space\\` column). Prisma 8 is in pre-1.0; the previous transitional auto-migration to the per-space-row schema has been removed. Drop \\`${MARKER_TABLE_NAME}\\` and re-run \\`dbInit\\` to reinitialise from a clean baseline.`, { meta: {\n\t\t\ttable: MARKER_TABLE_NAME,\n\t\t\tcolumns: [...columns].sort()\n\t\t} });\n\t}\n\tasync runExpectationSteps(driver, steps, operation, phase) {\n\t\tfor (const step of steps) {\n\t\t\tconst result = await driver.query(step.sql, step.params ?? []);\n\t\t\tif (!this.stepResultIsTrue(result.rows)) return runnerFailure(phase === \"precheck\" ? \"MIGRATION.PRECHECK_FAILED\" : \"MIGRATION.POSTCHECK_FAILED\", `Operation ${operation.id} failed during ${phase}: ${step.description}`, { meta: {\n\t\t\t\toperationId: operation.id,\n\t\t\t\tphase,\n\t\t\t\tstepDescription: step.description\n\t\t\t} });\n\t\t}\n\t\treturn okVoid();\n\t}\n\tasync runExecuteSteps(driver, steps, operation) {\n\t\tfor (const step of steps) try {\n\t\t\tawait driver.query(step.sql, step.params ?? []);\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\treturn runnerFailure(\"MIGRATION.EXECUTION_FAILED\", `Operation ${operation.id} failed during execution: ${step.description}`, {\n\t\t\t\twhy: message,\n\t\t\t\tmeta: {\n\t\t\t\t\toperationId: operation.id,\n\t\t\t\t\tstepDescription: step.description,\n\t\t\t\t\tsql: step.sql\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn okVoid();\n\t}\n\tstepResultIsTrue(rows) {\n\t\tif (!rows || rows.length === 0) return false;\n\t\tconst firstRow = rows[0];\n\t\tconst firstValue = firstRow ? Object.values(firstRow)[0] : void 0;\n\t\tif (typeof firstValue === \"number\") return firstValue !== 0;\n\t\tif (typeof firstValue === \"boolean\") return firstValue;\n\t\tif (typeof firstValue === \"string\") {\n\t\t\tconst lower = firstValue.toLowerCase();\n\t\t\tif (lower === \"true\" || lower === \"1\") return true;\n\t\t\tif (lower === \"false\" || lower === \"0\") return false;\n\t\t\treturn firstValue.length > 0;\n\t\t}\n\t\treturn Boolean(firstValue);\n\t}\n\tasync expectationsAreSatisfied(driver, steps) {\n\t\tif (steps.length === 0) return false;\n\t\tfor (const step of steps) {\n\t\t\tconst result = await driver.query(step.sql, step.params ?? []);\n\t\t\tif (!this.stepResultIsTrue(result.rows)) return false;\n\t\t}\n\t\treturn true;\n\t}\n\tcreateSkipRecord(operation) {\n\t\treturn Object.freeze({\n\t\t\tid: operation.id,\n\t\t\tlabel: operation.label,\n\t\t\t...ifDefined(\"summary\", operation.summary),\n\t\t\toperationClass: operation.operationClass,\n\t\t\ttarget: operation.target,\n\t\t\tprecheck: Object.freeze([]),\n\t\t\texecute: Object.freeze([]),\n\t\t\tpostcheck: Object.freeze([...operation.postcheck]),\n\t\t\tmeta: Object.freeze({\n\t\t\t\t...operation.meta ?? {},\n\t\t\t\trunner: Object.freeze({\n\t\t\t\t\tskipped: true,\n\t\t\t\t\treason: \"postcheck_pre_satisfied\"\n\t\t\t\t})\n\t\t\t})\n\t\t});\n\t}\n\tmarkerMatchesDestination(marker, plan) {\n\t\tif (!marker) return false;\n\t\tif (marker.storageHash !== plan.destination.storageHash) return false;\n\t\tif (plan.destination.profileHash && marker.profileHash !== plan.destination.profileHash) return false;\n\t\treturn true;\n\t}\n\tenforcePolicyCompatibility(policy, operations) {\n\t\tconst allowedClasses = new Set(policy.allowedOperationClasses);\n\t\tfor (const operation of operations) if (!allowedClasses.has(operation.operationClass)) return runnerFailure(\"MIGRATION.POLICY_VIOLATION\", `Operation ${operation.id} has class \"${operation.operationClass}\" which is not allowed by policy.`, {\n\t\t\twhy: `Policy only allows: ${policy.allowedOperationClasses.join(\", \")}.`,\n\t\t\tmeta: {\n\t\t\t\toperationId: operation.id,\n\t\t\t\toperationClass: operation.operationClass,\n\t\t\t\tallowedClasses: policy.allowedOperationClasses\n\t\t\t}\n\t\t});\n\t\treturn okVoid();\n\t}\n\tensureMarkerCompatibility(marker, plan) {\n\t\tconst origin = plan.origin ?? null;\n\t\tif (!origin) return okVoid();\n\t\tif (!marker) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Missing contract marker: expected origin storage hash ${origin.storageHash}.`, { meta: { expectedOriginStorageHash: origin.storageHash } });\n\t\tif (marker.storageHash !== origin.storageHash) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Existing contract marker (${marker.storageHash}) does not match plan origin (${origin.storageHash}).`, { meta: {\n\t\t\tmarkerStorageHash: marker.storageHash,\n\t\t\texpectedOriginStorageHash: origin.storageHash\n\t\t} });\n\t\tif (origin.profileHash && marker.profileHash !== origin.profileHash) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Existing contract marker profile hash (${marker.profileHash}) does not match plan origin profile hash (${origin.profileHash}).`, { meta: {\n\t\t\tmarkerProfileHash: marker.profileHash,\n\t\t\texpectedOriginProfileHash: origin.profileHash\n\t\t} });\n\t\treturn okVoid();\n\t}\n\tensurePlanMatchesDestinationContract(destination, contract) {\n\t\tif (destination.storageHash !== contract.storage.storageHash) return runnerFailure(\"MIGRATION.DESTINATION_CONTRACT_MISMATCH\", `Plan destination storage hash (${destination.storageHash}) does not match provided contract storage hash (${contract.storage.storageHash}).`, { meta: {\n\t\t\tplanStorageHash: destination.storageHash,\n\t\t\tcontractStorageHash: contract.storage.storageHash\n\t\t} });\n\t\tif (destination.profileHash && contract.profileHash && destination.profileHash !== contract.profileHash) return runnerFailure(\"MIGRATION.DESTINATION_CONTRACT_MISMATCH\", `Plan destination profile hash (${destination.profileHash}) does not match provided contract profile hash (${contract.profileHash}).`, { meta: {\n\t\t\tplanProfileHash: destination.profileHash,\n\t\t\tcontractProfileHash: contract.profileHash\n\t\t} });\n\t\treturn okVoid();\n\t}\n\tasync upsertMarker(driver, options, existingMarker, space) {\n\t\tconst destination = {\n\t\t\tstorageHash: options.plan.destination.storageHash,\n\t\t\tprofileHash: options.plan.destination.profileHash ?? options.destinationContract.profileHash ?? options.plan.destination.storageHash,\n\t\t\tinvariants: options.plan.providedInvariants ?? []\n\t\t};\n\t\tif (!existingMarker) {\n\t\t\tawait this.family.initMarker({\n\t\t\t\tdriver,\n\t\t\t\tspace,\n\t\t\t\tdestination\n\t\t\t});\n\t\t\treturn okVoid();\n\t\t}\n\t\tif (!await this.family.updateMarker({\n\t\t\tdriver,\n\t\t\tspace,\n\t\t\texpectedFrom: existingMarker.storageHash,\n\t\t\tdestination\n\t\t})) return runnerFailure(\"MIGRATION.MARKER_CAS_FAILURE\", \"Marker was modified by another process during migration execution.\", { meta: {\n\t\t\tspace,\n\t\t\texpectedStorageHash: existingMarker.storageHash,\n\t\t\tdestinationStorageHash: options.plan.destination.storageHash\n\t\t} });\n\t\treturn okVoid();\n\t}\n\tasync recordLedgerEntries(driver, options, executedOperations) {\n\t\tconst plan = options.plan;\n\t\tconst space = plan.spaceId;\n\t\tconst edges = options.migrationEdges;\n\t\tconst totalEdgeOps = edges.reduce((sum, edge) => sum + edge.operationCount, 0);\n\t\tif (totalEdgeOps !== plan.operations.length) throw new InternalError(`Ledger write: plan.operations length (${plan.operations.length}) does not match sum of migrationEdges operationCount (${totalEdgeOps})`);\n\t\tlet offset = 0;\n\t\tfor (const edge of edges) {\n\t\t\tconst edgeOps = executedOperations.slice(offset, offset + edge.operationCount);\n\t\t\toffset += edge.operationCount;\n\t\t\tawait this.family.writeLedgerEntry({\n\t\t\t\tdriver,\n\t\t\t\tspace,\n\t\t\t\tentry: {\n\t\t\t\t\tedgeId: `${edge.from}->${edge.to}`,\n\t\t\t\t\tfrom: edge.from,\n\t\t\t\t\tto: edge.to,\n\t\t\t\t\tmigrationName: edge.dirName,\n\t\t\t\t\tmigrationHash: edge.migrationHash,\n\t\t\t\t\toperations: edgeOps\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tasync beginExclusiveTransaction(driver) {\n\t\tawait driver.query(\"BEGIN EXCLUSIVE\");\n\t}\n\tasync commitTransaction(driver) {\n\t\tawait driver.query(\"COMMIT\");\n\t}\n\tasync rollbackTransaction(driver) {\n\t\tawait driver.query(\"ROLLBACK\");\n\t}\n\tasync executeStatement(driver, statement) {\n\t\tawait driver.query(statement.sql, statement.params);\n\t}\n};\n//#endregion\n//#region src/core/sqlite-schema-verifier.ts\n/**\n* SQLite target `SchemaVerifier` concretion. Mirrors the Postgres\n* shape: hooks return the empty list pending the call-site migration\n* that routes the existing verifier behaviour through the SPI.\n*/\nvar SqliteSchemaVerifier = class extends SqlSchemaVerifierBase {\n\tverifyCommonSqlSchema(_options) {\n\t\treturn [];\n\t}\n\tverifyTargetExtensions(_options) {\n\t\treturn [];\n\t}\n};\n//#endregion\n//#region src/core/control-target.ts\nfunction isSqlContract(contract) {\n\treturn contract === null || contract.storage instanceof SqlStorage;\n}\nconst sqliteControlTargetDescriptor = {\n\t...sqliteTargetDescriptorMeta,\n\tcontractSerializer: new SqliteContractSerializer(),\n\tschemaVerifier: new SqliteSchemaVerifier(),\n\tdiffSchema(input) {\n\t\treturn diffSqliteSchema(input);\n\t},\n\tclassifySubjectGranularity: relationalNodeGranularity,\n\tclassifyEntityKind: relationalNodeEntityKind,\n\tmigrations: {\n\t\tcreatePlanner(adapter) {\n\t\t\treturn createSqliteMigrationPlanner(adapter);\n\t\t},\n\t\tcreateRunner(family) {\n\t\t\treturn createSqliteMigrationRunner(family);\n\t\t},\n\t\tcontractToSchema(contract, frameworkComponents) {\n\t\t\tif (!isSqlContract(contract)) throw sqliteError(\"CONTRACT.TARGET_MISMATCH\", \"sqliteControlTargetDescriptor.contractToSchema received a non-SQL contract; expected Contract<SqlStorage>\");\n\t\t\treturn sqliteContractToSchema(contract, sqlTypeLookupsOf(frameworkComponents));\n\t\t}\n\t},\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"sqlite\"\n\t\t};\n\t},\n\tcreatePlanner(adapter) {\n\t\treturn createSqliteMigrationPlanner(adapter);\n\t},\n\tcreateRunner(family) {\n\t\treturn createSqliteMigrationRunner(family);\n\t}\n};\n//#endregion\n//#region src/core/type-constructors.ts\n/**\n* The base PSL scalars as zero-arg type constructors in the unified authoring\n* channel. Each names a codec; the column's database type is its data type's.\n*\n* The type position is the only storage decider: a mutation-default generator\n* (`@default(uuid())`) never re-picks a column's storage.\n*\n* These are the constructors only PSL offers. They are defined here, next to the codecs they name, but the adapter contributes them: the TypeScript contract builder builds its `type.*` helpers from the target, so a target contribution would add `type.String()` and the like there. The constructors that should also be `type.*` helpers are the target's own (`sqliteAuthoringTypes`).\n*/\nconst sqlitePslTypeConstructors = {\n\tString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Variable-length text stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_TEXT_CODEC_ID }\n\t},\n\tInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An integer stored as SQLite integer and represented as a JavaScript number.\",\n\t\toutput: { codecId: SQLITE_INTEGER_CODEC_ID }\n\t},\n\tBigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An integer stored as SQLite integer and represented as a JavaScript bigint.\",\n\t\toutput: { codecId: SQLITE_BIGINT_CODEC_ID }\n\t},\n\tFloat: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A floating-point number stored as SQLite real.\",\n\t\toutput: { codecId: SQLITE_REAL_CODEC_ID }\n\t},\n\tDecimal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A decimal value stored and represented as text to preserve precision.\",\n\t\toutput: { codecId: SQLITE_TEXT_CODEC_ID }\n\t},\n\tDateTime: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A date and time stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_DATETIME_CODEC_ID }\n\t},\n\tJson: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A JSON value serialized to SQLite text.\",\n\t\toutput: { codecId: SQLITE_JSON_CODEC_ID }\n\t},\n\tBytes: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Binary data stored as a SQLite blob.\",\n\t\toutput: { codecId: SQLITE_BLOB_CODEC_ID }\n\t}\n};\n//#endregion\nexport { SqliteUnboundDatabase, sqliteControlTargetDescriptor as default, sqliteCreateNamespace, sqlitePslTypeConstructors };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,SAAS,4BAA4B,QAAQ;CAC5C,OAAO,IAAI,sBAAsB,MAAM;AACxC;AACA,IAAI,wBAAwB,MAAM;CACjC;CACA,YAAY,QAAQ;EACnB,KAAK,SAAS;CACf;;;;;;;CAOA,MAAM,oBAAoB,SAAS;EAClC,MAAM,SAAS,QAAQ;EACvB,IAAI,QAAQ,UAAU,KAAK,KAAK,QAAQ,UAAU,QAAQ,KAAK,SAAS,MAAM,YAAY,sCAAsC,sCAAsC,QAAQ,MAAM,iCAAiC,QAAQ,KAAK,QAAQ,IAAI,EAAE,MAAM;GACrP,OAAO,QAAQ;GACf,aAAa,QAAQ,KAAK;EAC3B,EAAE,CAAC;EACH,MAAM,QAAQ,QAAQ,KAAK;EAC3B,MAAM,UAAU,UAAU,MAAM,QAAQ,IAAI,QAAQ,KAAK,UAAU,CAAC;EACpE,MAAM,mBAAmB,KAAK,qCAAqC,QAAQ,KAAK,aAAa,QAAQ,mBAAmB;EACxH,IAAI,CAAC,iBAAiB,IAAI,OAAO;EACjC,MAAM,cAAc,KAAK,2BAA2B,QAAQ,QAAQ,OAAO;EAC3E,IAAI,CAAC,YAAY,I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;CACzC,WAAW,OAAO;EACjB,OAAO,iBAAiB,KAAK;CAC9B;CACA,4BAA4B;CAC5B,oBAAoB;CACpB,YAAY;EACX,cAAc,SAAS;GACtB,OAAO,6BAA6B,OAAO;EAC5C;EACA,aAAa,QAAQ;GACpB,OAAO,4BAA4B,MAAM;EAC1C;EACA,iBAAiB,UAAU,qBAAqB;GAC/C,IAAI,CAAC,cAAc,QAAQ,GAAG,MAAM,YAAY,4BAA4B,2GAA2G;GACvL,OAAO,uBAAuB,UAAU,iBAAiB,mBAAmB,CAAC;EAC9E;CACD;CACA,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;CACA,cAAc,SAAS;EACtB,OAAO,6BAA6B,OAAO;CAC5C;CACA,aAAa,QAAQ;EACpB,OAAO,4BAA4B,MAAM;CAC1C;AACD;;;;;;;;;;AAYA,MAAM,4BAA4B;CACjC,QAAQ;EACP,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;CACA,KAAK;EACJ,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,wBAAwB;CAC5C;CACA,QAAQ;EACP,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,uBAAuB;CAC3C;CACA,OAAO;EACN,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;CACA,SAAS;EACR,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;CACA,UAAU;EACT,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,yBAAyB;CAC7C;CACA,MAAM;EACL,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;CACA,OAAO;EACN,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;AACD"}
1
+ {"version":3,"file":"control-B6oLQvl-.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/control.mjs"],"sourcesContent":["import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from \"./codec-ids-KMliSCRp.mjs\";\nimport { n as sqliteError } from \"./errors-DnR-sMHS.mjs\";\nimport { t as sqliteTargetDescriptorMeta } from \"./descriptor-meta-C3n4Dwxu.mjs\";\nimport { d as sqliteContractToSchema, f as verifySqliteDatabaseSchema, u as diffSqliteSchema } from \"./sqlite-migration-CJFj4Xjj.mjs\";\nimport { r as MARKER_TABLE_NAME } from \"./control-tables-D_o8dKRB.mjs\";\nimport { i as sqliteCreateNamespace, n as SqliteContractSerializer, r as SqliteUnboundDatabase } from \"./sqlite-contract-view-BYR10usg.mjs\";\nimport { n as createSqliteMigrationPlanner } from \"./planner-BgH57J9_.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { runnerFailure, runnerSuccess, sqlTypeLookupsOf } from \"@internal/family-sql/control\";\nimport { SqlStorage } from \"@internal/sql-contract/types\";\nimport { relationalNodeEntityKind, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\nimport { notOk, ok, okVoid } from \"@internal/utils/result\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { SqlSchemaVerifierBase } from \"@internal/family-sql/ir\";\n//#region src/core/migrations/runner.ts\nfunction createSqliteMigrationRunner(family) {\n\treturn new SqliteMigrationRunner(family);\n}\nvar SqliteMigrationRunner = class {\n\tfamily;\n\tconstructor(family) {\n\t\tthis.family = family;\n\t}\n\t/**\n\t* Apply the plan against an already-open connection without managing\n\t* the transaction lifecycle. The caller ({@link SqliteMigrationRunner.execute})\n\t* owns BEGIN/COMMIT/ROLLBACK and any connection-level setup (FK pragma\n\t* toggle, FK integrity check).\n\t*/\n\tasync executeOnConnection(options) {\n\t\tconst driver = options.driver;\n\t\tif (options.space !== void 0 && options.space !== options.plan.spaceId) throw sqliteError(\"MIGRATION.CONTRACT_SPACE_VIOLATION\", `SqlMigrationRunner: options.space (${options.space}) does not match plan.spaceId (${options.plan.spaceId})`, { meta: {\n\t\t\tspace: options.space,\n\t\t\tplanSpaceId: options.plan.spaceId\n\t\t} });\n\t\tconst space = options.plan.spaceId;\n\t\tconst planOps = blindCast(await Promise.all(options.plan.operations));\n\t\tconst destinationCheck = this.ensurePlanMatchesDestinationContract(options.plan.destination, options.destinationContract);\n\t\tif (!destinationCheck.ok) return destinationCheck;\n\t\tconst policyCheck = this.enforcePolicyCompatibility(options.policy, planOps);\n\t\tif (!policyCheck.ok) return policyCheck;\n\t\tconst ensureResult = await this.ensureControlTables(driver, options.destinationContract);\n\t\tif (!ensureResult.ok) return ensureResult;\n\t\tconst existingMarker = await this.family.readMarker({\n\t\t\tdriver,\n\t\t\tspace\n\t\t});\n\t\tconst markerCheck = this.ensureMarkerCompatibility(existingMarker, options.plan);\n\t\tif (!markerCheck.ok) return markerCheck;\n\t\tconst markerAtDestination = this.markerMatchesDestination(existingMarker, options.plan);\n\t\tconst isSelfEdge = options.plan.origin?.storageHash === options.plan.destination.storageHash;\n\t\tconst skipOperations = markerAtDestination && options.plan.origin != null && !isSelfEdge;\n\t\tlet operationsExecuted;\n\t\tlet executedOperations;\n\t\tif (skipOperations) {\n\t\t\toperationsExecuted = 0;\n\t\t\texecutedOperations = [];\n\t\t} else {\n\t\t\tconst applyResult = await this.applyPlan(driver, options, planOps);\n\t\t\tif (!applyResult.ok) return applyResult;\n\t\t\toperationsExecuted = applyResult.value.operationsExecuted;\n\t\t\texecutedOperations = applyResult.value.executedOperations;\n\t\t}\n\t\tif (space === APP_SPACE_ID) {\n\t\t\tconst schemaNode = await this.family.introspect({\n\t\t\t\tdriver,\n\t\t\t\tcontract: options.destinationContract\n\t\t\t});\n\t\t\tconst schemaVerifyResult = verifySqliteDatabaseSchema({\n\t\t\t\tcontract: options.destinationContract,\n\t\t\t\tactualSchema: schemaNode,\n\t\t\t\tstrict: options.strictVerification ?? true,\n\t\t\t\tframeworkComponents: options.frameworkComponents\n\t\t\t});\n\t\t\tif (!schemaVerifyResult.ok) return runnerFailure(\"MIGRATION.SCHEMA_VERIFY_FAILED\", schemaVerifyResult.summary, {\n\t\t\t\twhy: \"The resulting database schema does not satisfy the destination contract.\",\n\t\t\t\tmeta: { issues: schemaVerifyResult.schema.issues }\n\t\t\t});\n\t\t}\n\t\tconst incomingInvariants = options.plan.providedInvariants;\n\t\tconst existingInvariants = new Set(existingMarker?.invariants ?? []);\n\t\tconst incomingIsSubsetOfExisting = incomingInvariants.every((id) => existingInvariants.has(id));\n\t\tif (!(isSelfEdge && operationsExecuted === 0 && incomingIsSubsetOfExisting)) {\n\t\t\tconst markerResult = await this.upsertMarker(driver, options, existingMarker, space);\n\t\t\tif (!markerResult.ok) return markerResult;\n\t\t\tawait this.recordLedgerEntries(driver, options, executedOperations);\n\t\t}\n\t\treturn runnerSuccess({\n\t\t\toperationsPlanned: planOps.length,\n\t\t\toperationsExecuted\n\t\t});\n\t}\n\tasync execute(options) {\n\t\tconst driver = options.driver;\n\t\tconst perSpaceOptions = options.perSpaceOptions;\n\t\tif (perSpaceOptions.length === 0) return ok({ perSpaceResults: [] });\n\t\tconst fkWasEnabled = await this.readForeignKeysEnabled(driver);\n\t\tif (fkWasEnabled) await driver.query(\"PRAGMA foreign_keys = OFF\");\n\t\ttry {\n\t\t\tawait this.beginExclusiveTransaction(driver);\n\t\t\tlet committed = false;\n\t\t\ttry {\n\t\t\t\tconst perSpaceResults = [];\n\t\t\t\tlet lastProcessedSpace;\n\t\t\t\tfor (const spaceOptions of perSpaceOptions) {\n\t\t\t\t\tconst space = spaceOptions.space ?? spaceOptions.plan.spaceId;\n\t\t\t\t\tconst result = await this.executeOnConnection({\n\t\t\t\t\t\t...spaceOptions,\n\t\t\t\t\t\tdriver,\n\t\t\t\t\t\tspace\n\t\t\t\t\t});\n\t\t\t\t\tif (!result.ok) return notOk({\n\t\t\t\t\t\t...result.failure,\n\t\t\t\t\t\tfailingSpace: space\n\t\t\t\t\t});\n\t\t\t\t\tperSpaceResults.push({\n\t\t\t\t\t\tspace,\n\t\t\t\t\t\tvalue: result.value\n\t\t\t\t\t});\n\t\t\t\t\tlastProcessedSpace = space;\n\t\t\t\t}\n\t\t\t\tif (fkWasEnabled) {\n\t\t\t\t\tconst fkIntegrityCheck = await this.verifyForeignKeyIntegrity(driver);\n\t\t\t\t\tif (!fkIntegrityCheck.ok) return notOk({\n\t\t\t\t\t\t...fkIntegrityCheck.failure,\n\t\t\t\t\t\tfailingSpace: lastProcessedSpace ?? APP_SPACE_ID\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tawait this.commitTransaction(driver);\n\t\t\t\tcommitted = true;\n\t\t\t\treturn ok({ perSpaceResults });\n\t\t\t} finally {\n\t\t\t\tif (!committed) await this.rollbackTransaction(driver);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (fkWasEnabled) await driver.query(\"PRAGMA foreign_keys = ON\");\n\t\t}\n\t}\n\tasync readForeignKeysEnabled(driver) {\n\t\treturn (await driver.query(\"PRAGMA foreign_keys\")).rows[0]?.foreign_keys === 1;\n\t}\n\tasync verifyForeignKeyIntegrity(driver) {\n\t\tconst result = await driver.query(\"PRAGMA foreign_key_check\");\n\t\tif (result.rows.length === 0) return okVoid();\n\t\treturn runnerFailure(\"MIGRATION.FOREIGN_KEY_VIOLATION\", `Foreign key integrity check failed after migration: ${result.rows.length} violation(s).`, {\n\t\t\twhy: \"PRAGMA foreign_key_check reported violations after applying recreate-table operations.\",\n\t\t\tmeta: { violations: result.rows }\n\t\t});\n\t}\n\tasync applyPlan(driver, options, ops) {\n\t\tconst checks = options.executionChecks;\n\t\tconst runPrechecks = checks?.prechecks !== false;\n\t\tconst runPostchecks = checks?.postchecks !== false;\n\t\tconst runIdempotency = checks?.idempotencyChecks !== false;\n\t\tlet operationsExecuted = 0;\n\t\tconst executedOperations = [];\n\t\tfor (const operation of ops) {\n\t\t\toptions.callbacks?.onOperationStart?.(operation);\n\t\t\ttry {\n\t\t\t\tif (runPostchecks && runIdempotency) {\n\t\t\t\t\tif (await this.expectationsAreSatisfied(driver, operation.postcheck)) {\n\t\t\t\t\t\texecutedOperations.push(this.createSkipRecord(operation));\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (runPrechecks) {\n\t\t\t\t\tconst precheckResult = await this.runExpectationSteps(driver, operation.precheck, operation, \"precheck\");\n\t\t\t\t\tif (!precheckResult.ok) return precheckResult;\n\t\t\t\t}\n\t\t\t\tconst executeResult = await this.runExecuteSteps(driver, operation.execute, operation);\n\t\t\t\tif (!executeResult.ok) return executeResult;\n\t\t\t\tif (runPostchecks) {\n\t\t\t\t\tconst postcheckResult = await this.runExpectationSteps(driver, operation.postcheck, operation, \"postcheck\");\n\t\t\t\t\tif (!postcheckResult.ok) return postcheckResult;\n\t\t\t\t}\n\t\t\t\texecutedOperations.push(operation);\n\t\t\t\toperationsExecuted += 1;\n\t\t\t} finally {\n\t\t\t\toptions.callbacks?.onOperationComplete?.(operation);\n\t\t\t}\n\t\t}\n\t\treturn ok({\n\t\t\toperationsExecuted,\n\t\t\texecutedOperations\n\t\t});\n\t}\n\tasync ensureControlTables(driver, contract) {\n\t\tconst legacyDetection = await this.detectLegacyMarkerShape(driver);\n\t\tif (!legacyDetection.ok) return legacyDetection;\n\t\tconst lowererContext = { contract };\n\t\tfor (const query of this.family.bootstrapControlTableQueries()) await this.executeStatement(driver, await this.family.lowerAst(query, lowererContext));\n\t\treturn okVoid();\n\t}\n\tasync detectLegacyMarkerShape(driver) {\n\t\tconst tableInfo = await driver.query(`PRAGMA table_info(\"${MARKER_TABLE_NAME}\")`);\n\t\tif (tableInfo.rows.length === 0) return okVoid();\n\t\tconst columns = new Set(tableInfo.rows.map((row) => row.name));\n\t\tif (columns.has(\"space\")) return okVoid();\n\t\treturn runnerFailure(\"MIGRATION.LEGACY_MARKER_SHAPE\", `Legacy marker-table shape detected on ${MARKER_TABLE_NAME} (no \\`space\\` column). Prisma 8 is in pre-1.0; the previous transitional auto-migration to the per-space-row schema has been removed. Drop \\`${MARKER_TABLE_NAME}\\` and re-run \\`dbInit\\` to reinitialise from a clean baseline.`, { meta: {\n\t\t\ttable: MARKER_TABLE_NAME,\n\t\t\tcolumns: [...columns].sort()\n\t\t} });\n\t}\n\tasync runExpectationSteps(driver, steps, operation, phase) {\n\t\tfor (const step of steps) {\n\t\t\tconst result = await driver.query(step.sql, step.params ?? []);\n\t\t\tif (!this.stepResultIsTrue(result.rows)) return runnerFailure(phase === \"precheck\" ? \"MIGRATION.PRECHECK_FAILED\" : \"MIGRATION.POSTCHECK_FAILED\", `Operation ${operation.id} failed during ${phase}: ${step.description}`, { meta: {\n\t\t\t\toperationId: operation.id,\n\t\t\t\tphase,\n\t\t\t\tstepDescription: step.description\n\t\t\t} });\n\t\t}\n\t\treturn okVoid();\n\t}\n\tasync runExecuteSteps(driver, steps, operation) {\n\t\tfor (const step of steps) try {\n\t\t\tawait driver.query(step.sql, step.params ?? []);\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\treturn runnerFailure(\"MIGRATION.EXECUTION_FAILED\", `Operation ${operation.id} failed during execution: ${step.description}`, {\n\t\t\t\twhy: message,\n\t\t\t\tmeta: {\n\t\t\t\t\toperationId: operation.id,\n\t\t\t\t\tstepDescription: step.description,\n\t\t\t\t\tsql: step.sql\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn okVoid();\n\t}\n\tstepResultIsTrue(rows) {\n\t\tif (!rows || rows.length === 0) return false;\n\t\tconst firstRow = rows[0];\n\t\tconst firstValue = firstRow ? Object.values(firstRow)[0] : void 0;\n\t\tif (typeof firstValue === \"number\") return firstValue !== 0;\n\t\tif (typeof firstValue === \"boolean\") return firstValue;\n\t\tif (typeof firstValue === \"string\") {\n\t\t\tconst lower = firstValue.toLowerCase();\n\t\t\tif (lower === \"true\" || lower === \"1\") return true;\n\t\t\tif (lower === \"false\" || lower === \"0\") return false;\n\t\t\treturn firstValue.length > 0;\n\t\t}\n\t\treturn Boolean(firstValue);\n\t}\n\tasync expectationsAreSatisfied(driver, steps) {\n\t\tif (steps.length === 0) return false;\n\t\tfor (const step of steps) {\n\t\t\tconst result = await driver.query(step.sql, step.params ?? []);\n\t\t\tif (!this.stepResultIsTrue(result.rows)) return false;\n\t\t}\n\t\treturn true;\n\t}\n\tcreateSkipRecord(operation) {\n\t\treturn Object.freeze({\n\t\t\tid: operation.id,\n\t\t\tlabel: operation.label,\n\t\t\t...ifDefined(\"summary\", operation.summary),\n\t\t\toperationClass: operation.operationClass,\n\t\t\ttarget: operation.target,\n\t\t\tprecheck: Object.freeze([]),\n\t\t\texecute: Object.freeze([]),\n\t\t\tpostcheck: Object.freeze([...operation.postcheck]),\n\t\t\tmeta: Object.freeze({\n\t\t\t\t...operation.meta ?? {},\n\t\t\t\trunner: Object.freeze({\n\t\t\t\t\tskipped: true,\n\t\t\t\t\treason: \"postcheck_pre_satisfied\"\n\t\t\t\t})\n\t\t\t})\n\t\t});\n\t}\n\tmarkerMatchesDestination(marker, plan) {\n\t\tif (!marker) return false;\n\t\tif (marker.storageHash !== plan.destination.storageHash) return false;\n\t\tif (plan.destination.profileHash && marker.profileHash !== plan.destination.profileHash) return false;\n\t\treturn true;\n\t}\n\tenforcePolicyCompatibility(policy, operations) {\n\t\tconst allowedClasses = new Set(policy.allowedOperationClasses);\n\t\tfor (const operation of operations) if (!allowedClasses.has(operation.operationClass)) return runnerFailure(\"MIGRATION.POLICY_VIOLATION\", `Operation ${operation.id} has class \"${operation.operationClass}\" which is not allowed by policy.`, {\n\t\t\twhy: `Policy only allows: ${policy.allowedOperationClasses.join(\", \")}.`,\n\t\t\tmeta: {\n\t\t\t\toperationId: operation.id,\n\t\t\t\toperationClass: operation.operationClass,\n\t\t\t\tallowedClasses: policy.allowedOperationClasses\n\t\t\t}\n\t\t});\n\t\treturn okVoid();\n\t}\n\tensureMarkerCompatibility(marker, plan) {\n\t\tconst origin = plan.origin ?? null;\n\t\tif (!origin) return okVoid();\n\t\tif (!marker) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Missing contract marker: expected origin storage hash ${origin.storageHash}.`, { meta: { expectedOriginStorageHash: origin.storageHash } });\n\t\tif (marker.storageHash !== origin.storageHash) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Existing contract marker (${marker.storageHash}) does not match plan origin (${origin.storageHash}).`, { meta: {\n\t\t\tmarkerStorageHash: marker.storageHash,\n\t\t\texpectedOriginStorageHash: origin.storageHash\n\t\t} });\n\t\tif (origin.profileHash && marker.profileHash !== origin.profileHash) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Existing contract marker profile hash (${marker.profileHash}) does not match plan origin profile hash (${origin.profileHash}).`, { meta: {\n\t\t\tmarkerProfileHash: marker.profileHash,\n\t\t\texpectedOriginProfileHash: origin.profileHash\n\t\t} });\n\t\treturn okVoid();\n\t}\n\tensurePlanMatchesDestinationContract(destination, contract) {\n\t\tif (destination.storageHash !== contract.storage.storageHash) return runnerFailure(\"MIGRATION.DESTINATION_CONTRACT_MISMATCH\", `Plan destination storage hash (${destination.storageHash}) does not match provided contract storage hash (${contract.storage.storageHash}).`, { meta: {\n\t\t\tplanStorageHash: destination.storageHash,\n\t\t\tcontractStorageHash: contract.storage.storageHash\n\t\t} });\n\t\tif (destination.profileHash && contract.profileHash && destination.profileHash !== contract.profileHash) return runnerFailure(\"MIGRATION.DESTINATION_CONTRACT_MISMATCH\", `Plan destination profile hash (${destination.profileHash}) does not match provided contract profile hash (${contract.profileHash}).`, { meta: {\n\t\t\tplanProfileHash: destination.profileHash,\n\t\t\tcontractProfileHash: contract.profileHash\n\t\t} });\n\t\treturn okVoid();\n\t}\n\tasync upsertMarker(driver, options, existingMarker, space) {\n\t\tconst destination = {\n\t\t\tstorageHash: options.plan.destination.storageHash,\n\t\t\tprofileHash: options.plan.destination.profileHash ?? options.destinationContract.profileHash ?? options.plan.destination.storageHash,\n\t\t\tinvariants: options.plan.providedInvariants ?? []\n\t\t};\n\t\tif (!existingMarker) {\n\t\t\tawait this.family.initMarker({\n\t\t\t\tdriver,\n\t\t\t\tspace,\n\t\t\t\tdestination\n\t\t\t});\n\t\t\treturn okVoid();\n\t\t}\n\t\tif (!await this.family.updateMarker({\n\t\t\tdriver,\n\t\t\tspace,\n\t\t\texpectedFrom: existingMarker.storageHash,\n\t\t\tdestination\n\t\t})) {\n\t\t\tconst found = await this.family.readMarker({\n\t\t\t\tdriver,\n\t\t\t\tspace\n\t\t\t});\n\t\t\treturn runnerFailure(\"MIGRATION.MARKER_CAS_FAILURE\", \"Marker was modified by another process during migration execution.\", { meta: {\n\t\t\t\tspace,\n\t\t\t\texpectedStorageHash: existingMarker.storageHash,\n\t\t\t\tfoundStorageHash: found?.storageHash ?? null,\n\t\t\t\tdestinationStorageHash: options.plan.destination.storageHash\n\t\t\t} });\n\t\t}\n\t\treturn okVoid();\n\t}\n\tasync recordLedgerEntries(driver, options, executedOperations) {\n\t\tconst plan = options.plan;\n\t\tconst space = plan.spaceId;\n\t\tconst edges = options.migrationEdges;\n\t\tconst totalEdgeOps = edges.reduce((sum, edge) => sum + edge.operationCount, 0);\n\t\tif (totalEdgeOps !== plan.operations.length) throw new InternalError(`Ledger write: plan.operations length (${plan.operations.length}) does not match sum of migrationEdges operationCount (${totalEdgeOps})`);\n\t\tlet offset = 0;\n\t\tfor (const edge of edges) {\n\t\t\tconst edgeOps = executedOperations.slice(offset, offset + edge.operationCount);\n\t\t\toffset += edge.operationCount;\n\t\t\tawait this.family.writeLedgerEntry({\n\t\t\t\tdriver,\n\t\t\t\tspace,\n\t\t\t\tentry: {\n\t\t\t\t\tedgeId: `${edge.from}->${edge.to}`,\n\t\t\t\t\tfrom: edge.from,\n\t\t\t\t\tto: edge.to,\n\t\t\t\t\tmigrationName: edge.dirName,\n\t\t\t\t\tmigrationHash: edge.migrationHash,\n\t\t\t\t\toperations: edgeOps\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tasync beginExclusiveTransaction(driver) {\n\t\tawait driver.query(\"BEGIN EXCLUSIVE\");\n\t}\n\tasync commitTransaction(driver) {\n\t\tawait driver.query(\"COMMIT\");\n\t}\n\tasync rollbackTransaction(driver) {\n\t\tawait driver.query(\"ROLLBACK\");\n\t}\n\tasync executeStatement(driver, statement) {\n\t\tawait driver.query(statement.sql, statement.params);\n\t}\n};\n//#endregion\n//#region src/core/sqlite-schema-verifier.ts\n/**\n* SQLite target `SchemaVerifier` concretion. Mirrors the Postgres\n* shape: hooks return the empty list pending the call-site migration\n* that routes the existing verifier behaviour through the SPI.\n*/\nvar SqliteSchemaVerifier = class extends SqlSchemaVerifierBase {\n\tverifyCommonSqlSchema(_options) {\n\t\treturn [];\n\t}\n\tverifyTargetExtensions(_options) {\n\t\treturn [];\n\t}\n};\n//#endregion\n//#region src/core/control-target.ts\nfunction isSqlContract(contract) {\n\treturn contract === null || contract.storage instanceof SqlStorage;\n}\nconst sqliteControlTargetDescriptor = {\n\t...sqliteTargetDescriptorMeta,\n\tcontractSerializer: new SqliteContractSerializer(),\n\tschemaVerifier: new SqliteSchemaVerifier(),\n\tdiffSchema(input) {\n\t\treturn diffSqliteSchema(input);\n\t},\n\tclassifySubjectGranularity: relationalNodeGranularity,\n\tclassifyEntityKind: relationalNodeEntityKind,\n\tmigrations: {\n\t\tcreatePlanner(adapter) {\n\t\t\treturn createSqliteMigrationPlanner(adapter);\n\t\t},\n\t\tcreateRunner(family) {\n\t\t\treturn createSqliteMigrationRunner(family);\n\t\t},\n\t\tcontractToSchema(contract, frameworkComponents) {\n\t\t\tif (!isSqlContract(contract)) throw sqliteError(\"CONTRACT.TARGET_MISMATCH\", \"sqliteControlTargetDescriptor.contractToSchema received a non-SQL contract; expected Contract<SqlStorage>\");\n\t\t\treturn sqliteContractToSchema(contract, sqlTypeLookupsOf(frameworkComponents));\n\t\t}\n\t},\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"sqlite\"\n\t\t};\n\t},\n\tcreatePlanner(adapter) {\n\t\treturn createSqliteMigrationPlanner(adapter);\n\t},\n\tcreateRunner(family) {\n\t\treturn createSqliteMigrationRunner(family);\n\t}\n};\n//#endregion\n//#region src/core/type-constructors.ts\n/**\n* The base PSL scalars as zero-arg type constructors in the unified authoring\n* channel. Each names a codec; the column's database type is its data type's.\n*\n* The type position is the only storage decider: a mutation-default generator\n* (`@default(uuid())`) never re-picks a column's storage.\n*\n* These are the constructors only PSL offers. They are defined here, next to the codecs they name, but the adapter contributes them: the TypeScript contract builder builds its `type.*` helpers from the target, so a target contribution would add `type.String()` and the like there. The constructors that should also be `type.*` helpers are the target's own (`sqliteAuthoringTypes`).\n*/\nconst sqlitePslTypeConstructors = {\n\tString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Variable-length text stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_TEXT_CODEC_ID }\n\t},\n\tInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An integer stored as SQLite integer and represented as a JavaScript number.\",\n\t\toutput: { codecId: SQLITE_INTEGER_CODEC_ID }\n\t},\n\tBigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An integer stored as SQLite integer and represented as a JavaScript bigint.\",\n\t\toutput: { codecId: SQLITE_BIGINT_CODEC_ID }\n\t},\n\tFloat: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A floating-point number stored as SQLite real.\",\n\t\toutput: { codecId: SQLITE_REAL_CODEC_ID }\n\t},\n\tDecimal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A decimal value stored and represented as text to preserve precision.\",\n\t\toutput: { codecId: SQLITE_TEXT_CODEC_ID }\n\t},\n\tDateTime: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A date and time stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_DATETIME_CODEC_ID }\n\t},\n\tJson: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A JSON value serialized to SQLite text.\",\n\t\toutput: { codecId: SQLITE_JSON_CODEC_ID }\n\t},\n\tBytes: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Binary data stored as a SQLite blob.\",\n\t\toutput: { codecId: SQLITE_BLOB_CODEC_ID }\n\t}\n};\n//#endregion\nexport { SqliteUnboundDatabase, sqliteControlTargetDescriptor as default, sqliteCreateNamespace, sqlitePslTypeConstructors };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,SAAS,4BAA4B,QAAQ;CAC5C,OAAO,IAAI,sBAAsB,MAAM;AACxC;AACA,IAAI,wBAAwB,MAAM;CACjC;CACA,YAAY,QAAQ;EACnB,KAAK,SAAS;CACf;;;;;;;CAOA,MAAM,oBAAoB,SAAS;EAClC,MAAM,SAAS,QAAQ;EACvB,IAAI,QAAQ,UAAU,KAAK,KAAK,QAAQ,UAAU,QAAQ,KAAK,SAAS,MAAM,YAAY,sCAAsC,sCAAsC,QAAQ,MAAM,iCAAiC,QAAQ,KAAK,QAAQ,IAAI,EAAE,MAAM;GACrP,OAAO,QAAQ;GACf,aAAa,QAAQ,KAAK;EAC3B,EAAE,CAAC;EACH,MAAM,QAAQ,QAAQ,KAAK;EAC3B,MAAM,UAAU,UAAU,MAAM,QAAQ,IAAI,QAAQ,KAAK,UAAU,CAAC;EACpE,MAAM,mBAAmB,KAAK,qCAAqC,QAAQ,KAAK,aAAa,QAAQ,mBAAmB;EACxH,IAAI,CAAC,iBAAiB,IAAI,OAAO;EACjC,MAAM,cAAc,KAAK,2BAA2B,QAAQ,QAAQ,OAAO;EAC3E,IAAI,CAAC,YAAY,IAAI,OAAO;EAC5B,MAAM,eAAe,MAAM,KAAK,o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codecs-hLsmWJRa-DfMCx_nO.mjs";
2
- import "./codecs-DSZbU8RG.mjs";
1
+ import { o as SqliteCodecRegistry } from "./codecs-DeFZ_0jC-CgA8KUIS.mjs";
2
+ import "./codecs-xDq4DNf8.mjs";
3
3
  import { r as SqliteDdlNode } from "./nodes-D8EC1yCx-rpfpuJ4T.mjs";
4
4
  import "./ddl-CfSqNT0M.mjs";
5
5
  import { t as parseSqliteDefault } from "./default-normalizer-B9V7TY5u.mjs";
@@ -82,9 +82,10 @@ declare class SqliteControlAdapter implements SqlControlAdapter<'sqlite'> {
82
82
  readonly profileHash: string;
83
83
  readonly invariants?: readonly string[];
84
84
  }): Promise<boolean>;
85
+ withTransaction<T>(driver: SqlControlDriverInstance<'sqlite'>, fn: () => Promise<T>): Promise<T>;
86
+ lockMarker(_driver: SqlControlDriverInstance<'sqlite'>): Promise<void>;
85
87
  /**
86
- * Appends a ledger entry for `space`. See the
87
- * `SqlControlAdapter.writeLedgerEntry` contract.
88
+ * Appends a ledger entry for `space`. See the `SqlControlAdapter.writeLedgerEntry` contract.
88
89
  */
89
90
  writeLedgerEntry(driver: SqlControlDriverInstance<'sqlite'>, space: string, entry: {
90
91
  readonly edgeId: string;
@@ -102,4 +103,4 @@ declare class SqliteControlAdapter implements SqlControlAdapter<'sqlite'> {
102
103
  declare const sqliteAdapterDescriptor: SqlControlAdapterDescriptor<'sqlite'>;
103
104
  //#endregion
104
105
  export { sqliteAdapterDescriptor as n, SqliteControlAdapter as t };
105
- //# sourceMappingURL=control-DgI8tIaw.d.mts.map
106
+ //# sourceMappingURL=control-wWiQrj5H.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-DgI8tIaw.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;cAYc,gCAAgC;WACnC;WACA;mBACQ;EACjB,YAAY,eAAe;WAClB,yBAAyB;EAClC,yCAAyC;EACzC,uCAAuC;;;;;;;;;EASvC,MAAM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iB;UACjF;;;;;;EAMR,aAAa,QAAQ,oCAAoC,eAAe;aAC7D;aACA;aACA;MACP;EACJ,WAAW,QAAQ,oCAAoC,eAAe;aAC3D;aACA;aACA;MACP;;;;;EAKJ,aAAa,QAAQ,oCAAoC,eAAe,sBAAsB;aACnF;aACA;aACA;MACP;EACJ,gBAAgB,GAAG,QAAQ,oCAAoC,UAAU,QAAQ,KAAK,QAAQ;EAC9F,WAAW,SAAS,qCAAqC;;;;EAIzD,iBAAiB,QAAQ,oCAAoC,eAAe;aACjE;aACA;aACA;aACA;aACA;aACA;MACP;UACI;EACR,WAAW,QAAQ,oCAAoC,sBAAsB,QAAQ;;;;cAIzE,yBAAyB"}
@@ -0,0 +1,57 @@
1
+ import { c as sqliteText, o as sqliteInteger, s as sqliteReal } from "./data-types-pFQMl37_-B-3aK_wd.mjs";
2
+ import { numeralText } from "@prisma/orm-family-sql/contract/data-type";
3
+ import { createNumberClassifier, parseJsonBody, signedRange } from "@prisma/orm-family-sql/contract/data-type-support";
4
+ import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
5
+ import { tagEntryKey } from "@prisma/orm-framework/components/authoring";
6
+ //#region ../../../3-targets/3-targets/sqlite/dist/data-type-entries-Bc09V6WN.mjs
7
+ const classifySqliteNumber = createNumberClassifier({
8
+ integers: [{
9
+ type: sqliteInteger.id,
10
+ form: "text",
11
+ ...signedRange(64)
12
+ }],
13
+ fraction: {
14
+ type: sqliteReal.id,
15
+ form: "number"
16
+ }
17
+ });
18
+ function printNumber(value) {
19
+ return typeof value === "number" ? numeralText(value) : String(value);
20
+ }
21
+ function sqliteDataTypeEntries() {
22
+ return {
23
+ [sqliteText.id]: {
24
+ written: {
25
+ kind: "plain",
26
+ syntax: "string",
27
+ parse: (text) => text
28
+ },
29
+ print: (value) => String(value),
30
+ documentation: "Text."
31
+ },
32
+ [sqliteReal.id]: {
33
+ written: {
34
+ kind: "plain",
35
+ syntax: "number",
36
+ types: [sqliteInteger.id, sqliteReal.id],
37
+ classify: classifySqliteNumber
38
+ },
39
+ print: printNumber,
40
+ documentation: "A number, whose type comes from its own size and precision."
41
+ },
42
+ [tagEntryKey("json")]: {
43
+ written: {
44
+ kind: "tag",
45
+ tag: "json",
46
+ type: sqliteText.id,
47
+ parse: (text) => canonicalizeJson(parseJsonBody(text))
48
+ },
49
+ print: (value) => String(value),
50
+ documentation: "Reads the body as a JSON document and stores its JSON text as the default value."
51
+ }
52
+ };
53
+ }
54
+ //#endregion
55
+ export { sqliteDataTypeEntries as t };
56
+
57
+ //# sourceMappingURL=data-type-entries-Bc09V6WN-Dc00J0G9.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-type-entries-Bc09V6WN-Dc00J0G9.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/data-type-entries-Bc09V6WN.mjs"],"sourcesContent":["import { c as sqliteText, o as sqliteInteger, s as sqliteReal } from \"./data-types-pFQMl37_.mjs\";\nimport { tagEntryKey } from \"@internal/framework-components/authoring\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { numeralText } from \"@internal/sql-contract/data-type\";\nimport { createNumberClassifier, parseJsonBody, signedRange } from \"@internal/sql-contract/data-type-support\";\n//#region src/core/data-type-entries.ts\nconst classifySqliteNumber = createNumberClassifier({\n\tintegers: [{\n\t\ttype: sqliteInteger.id,\n\t\tform: \"text\",\n\t\t...signedRange(64)\n\t}],\n\tfraction: {\n\t\ttype: sqliteReal.id,\n\t\tform: \"number\"\n\t}\n});\nfunction printNumber(value) {\n\treturn typeof value === \"number\" ? numeralText(value) : String(value);\n}\nfunction sqliteDataTypeEntries() {\n\treturn {\n\t\t[sqliteText.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"string\",\n\t\t\t\tparse: (text) => text\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Text.\"\n\t\t},\n\t\t[sqliteReal.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"number\",\n\t\t\t\ttypes: [sqliteInteger.id, sqliteReal.id],\n\t\t\t\tclassify: classifySqliteNumber\n\t\t\t},\n\t\t\tprint: printNumber,\n\t\t\tdocumentation: \"A number, whose type comes from its own size and precision.\"\n\t\t},\n\t\t[tagEntryKey(\"json\")]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"json\",\n\t\t\t\ttype: sqliteText.id,\n\t\t\t\tparse: (text) => canonicalizeJson(parseJsonBody(text))\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Reads the body as a JSON document and stores its JSON text as the default value.\"\n\t\t}\n\t};\n}\n//#endregion\nexport { sqliteDataTypeEntries as t };\n\n//# sourceMappingURL=data-type-entries-Bc09V6WN.mjs.map"],"mappings":";;;;;;AAMA,MAAM,uBAAuB,uBAAuB;CACnD,UAAU,CAAC;EACV,MAAM,cAAc;EACpB,MAAM;EACN,GAAG,YAAY,EAAE;CAClB,CAAC;CACD,UAAU;EACT,MAAM,WAAW;EACjB,MAAM;CACP;AACD,CAAC;AACD,SAAS,YAAY,OAAO;CAC3B,OAAO,OAAO,UAAU,WAAW,YAAY,KAAK,IAAI,OAAO,KAAK;AACrE;AACA,SAAS,wBAAwB;CAChC,OAAO;GACL,WAAW,KAAK;GAChB,SAAS;IACR,MAAM;IACN,QAAQ;IACR,QAAQ,SAAS;GAClB;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;GACC,WAAW,KAAK;GAChB,SAAS;IACR,MAAM;IACN,QAAQ;IACR,OAAO,CAAC,cAAc,IAAI,WAAW,EAAE;IACvC,UAAU;GACX;GACA,OAAO;GACP,eAAe;EAChB;GACC,YAAY,MAAM,IAAI;GACtB,SAAS;IACR,MAAM;IACN,KAAK;IACL,MAAM,WAAW;IACjB,QAAQ,SAAS,iBAAiB,cAAc,IAAI,CAAC;GACtD;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;CACD;AACD"}
@@ -6,17 +6,10 @@ declare function sqliteDataTypeEntries(): Readonly<Record<string, DataTypeAuthor
6
6
  //#endregion
7
7
  //#region src/core/data-types.d.ts
8
8
  declare const sqliteText: import("@prisma/orm-family-sql/contract/data-type").SqlDataType<Readonly<Record<string, unknown>>>;
9
- declare const sqliteJson: import("@prisma/orm-family-sql/contract/data-type").SqlDataType<Readonly<Record<string, unknown>>>;
9
+ /** Digit text, which holds every 64-bit integer exactly; SQLite reads an INTEGER default back as a number. */
10
10
  declare const sqliteInteger: import("@prisma/orm-family-sql/contract/data-type").SqlDataType<Readonly<Record<string, unknown>>>;
11
- /**
12
- * The canonical form of `sqlite/datetime` (ADR 254), from ISO 8601 text with a UTC offset. The range
13
- * and the millisecond precision are those of a JavaScript `Date`, the codec's value.
14
- */
15
- declare const sqliteDatetimeCanonical: (text: string) => string;
16
- declare const sqliteDatetime: import("@prisma/orm-family-sql/contract/data-type").SqlDataType<Readonly<Record<string, unknown>>>;
17
- declare const sqliteBlob: import("@prisma/orm-family-sql/contract/data-type").SqlDataType<Readonly<Record<string, unknown>>>;
18
- declare const sqliteBigint: import("@prisma/orm-family-sql/contract/data-type").SqlDataType<Readonly<Record<string, unknown>>>;
19
11
  declare const sqliteReal: import("@prisma/orm-family-sql/contract/data-type").SqlDataType<Readonly<Record<string, unknown>>>;
12
+ declare const sqliteBlob: import("@prisma/orm-family-sql/contract/data-type").SqlDataType<Readonly<Record<string, unknown>>>;
20
13
  /** The length of `character` and `character varying`, which SQLite accepts and does not enforce. */
21
14
  declare const sqliteCharacterLengthParams: import("arktype/internal/variants/object.ts").ObjectType<{
22
15
  length?: number;
@@ -30,5 +23,5 @@ declare const sqliteCharacterVarying: import("@prisma/orm-family-sql/contract/da
30
23
  /** Every data type this target registers. */
31
24
  declare const sqliteDataTypes: readonly DataType[];
32
25
  //#endregion
33
- export { sqliteCharacterVarying as a, sqliteDatetime as c, sqliteJson as d, sqliteReal as f, sqliteCharacterLengthParams as i, sqliteDatetimeCanonical as l, sqliteBlob as n, sqliteDataTypeEntries as o, sqliteText as p, sqliteCharacter as r, sqliteDataTypes as s, sqliteBigint as t, sqliteInteger as u };
34
- //# sourceMappingURL=data-types-ZsgBg_Zg.d.mts.map
26
+ export { sqliteDataTypeEntries as a, sqliteReal as c, sqliteCharacterVarying as i, sqliteText as l, sqliteCharacter as n, sqliteDataTypes as o, sqliteCharacterLengthParams as r, sqliteInteger as s, sqliteBlob as t };
27
+ //# sourceMappingURL=data-types-B_k5-Ohy.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-types-B_k5-Ohy.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/data-types.d.mts"],"mappings":";;;;iBAGiB,yBAAyB,SAAS,eAAe;;;cAGpD,uDAAuD,YAAY,SAAS;;cAE5E,0DAA0D,YAAY,SAAS;cAC/E,uDAAuD,YAAY,SAAS;cAC5E,uDAAuD,YAAY,SAAS;;cAE5E,2EAA2E;EACvF;;cAEY,4DAA4D;EACxE;;cAEY,mEAAmE;EAC/E;;;cAGY,0BAA0B"}
@@ -0,0 +1,73 @@
1
+ import { structuredError } from "@prisma/orm-framework/utils/structured-error";
2
+ import { sqlDataType } from "@prisma/orm-family-sql/contract/data-type";
3
+ import { integerTextCanonicalForm } from "@prisma/orm-family-sql/contract/data-type-support";
4
+ import { type } from "arktype";
5
+ //#region ../../../3-targets/3-targets/sqlite/dist/data-types-pFQMl37_.mjs
6
+ const unchanged = (value) => value;
7
+ function wrongShape(value, expected) {
8
+ throw structuredError("CONTRACT.CAST_REFUSED", `Expected ${expected}, got ${JSON.stringify(value)}.`, {
9
+ why: "A cast reads the canonical form of the type it takes values of.",
10
+ fix: "Hand the cast a value in the shape its source type stores."
11
+ });
12
+ }
13
+ /** Digit text as `real` stores it: the nearest double, as SQLite converts an integer to a real. */
14
+ const asReal = (value) => typeof value === "string" ? Number(value) : wrongShape(value, "digit text");
15
+ /** A type written and reported by `name` and nothing else. */
16
+ const storedAs = (id, name, casts = {}) => sqlDataType(id, {
17
+ texts: [{
18
+ text: name,
19
+ written: true,
20
+ catalog: true
21
+ }],
22
+ casts
23
+ });
24
+ const sqliteText = storedAs("sqlite/text", "text");
25
+ /** Digit text, which holds every 64-bit integer exactly; SQLite reads an INTEGER default back as a number. */
26
+ const sqliteInteger = sqlDataType("sqlite/integer", {
27
+ texts: [{
28
+ text: "integer",
29
+ written: true,
30
+ catalog: true
31
+ }],
32
+ toCanonicalForm: integerTextCanonicalForm,
33
+ casts: {}
34
+ });
35
+ const sqliteReal = storedAs("sqlite/real", "real", { [sqliteInteger.id]: asReal });
36
+ const sqliteBlob = storedAs("sqlite/blob", "blob", { [sqliteText.id]: unchanged });
37
+ /** The length of `character` and `character varying`, which SQLite accepts and does not enforce. */
38
+ const sqliteCharacterLengthParams = type({ "length?": "number.integer >= 1" });
39
+ /** A character type is written without its length, so its normal form has none. */
40
+ const withoutLength = ({ length: _length, ...rest }) => rest;
41
+ const sqliteCharacter = sqlDataType("sqlite/character", {
42
+ params: sqliteCharacterLengthParams,
43
+ texts: [{
44
+ text: "character",
45
+ written: true,
46
+ catalog: true
47
+ }],
48
+ normalize: withoutLength,
49
+ casts: { [sqliteText.id]: unchanged }
50
+ });
51
+ const sqliteCharacterVarying = sqlDataType("sqlite/character-varying", {
52
+ params: sqliteCharacterLengthParams,
53
+ texts: [{
54
+ text: "character varying",
55
+ written: true,
56
+ catalog: true
57
+ }],
58
+ normalize: withoutLength,
59
+ casts: { [sqliteText.id]: unchanged }
60
+ });
61
+ /** Every data type this target registers. */
62
+ const sqliteDataTypes = [
63
+ sqliteText,
64
+ sqliteInteger,
65
+ sqliteReal,
66
+ sqliteBlob,
67
+ sqliteCharacter,
68
+ sqliteCharacterVarying
69
+ ];
70
+ //#endregion
71
+ export { sqliteDataTypes as a, sqliteText as c, sqliteCharacterVarying as i, sqliteCharacter as n, sqliteInteger as o, sqliteCharacterLengthParams as r, sqliteReal as s, sqliteBlob as t };
72
+
73
+ //# sourceMappingURL=data-types-pFQMl37_-B-3aK_wd.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-types-pFQMl37_-B-3aK_wd.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/data-types-pFQMl37_.mjs"],"sourcesContent":["import { sqlDataType } from \"@internal/sql-contract/data-type\";\nimport { integerTextCanonicalForm } from \"@internal/sql-contract/data-type-support\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { type } from \"arktype\";\n//#region src/core/data-types.ts\nconst unchanged = (value) => value;\nfunction wrongShape(value, expected) {\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `Expected ${expected}, got ${JSON.stringify(value)}.`, {\n\t\twhy: \"A cast reads the canonical form of the type it takes values of.\",\n\t\tfix: \"Hand the cast a value in the shape its source type stores.\"\n\t});\n}\n/** Digit text as `real` stores it: the nearest double, as SQLite converts an integer to a real. */\nconst asReal = (value) => typeof value === \"string\" ? Number(value) : wrongShape(value, \"digit text\");\n/** A type written and reported by `name` and nothing else. */\nconst storedAs = (id, name, casts = {}) => sqlDataType(id, {\n\ttexts: [{\n\t\ttext: name,\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\tcasts\n});\nconst sqliteText = storedAs(\"sqlite/text\", \"text\");\n/** Digit text, which holds every 64-bit integer exactly; SQLite reads an INTEGER default back as a number. */\nconst sqliteInteger = sqlDataType(\"sqlite/integer\", {\n\ttexts: [{\n\t\ttext: \"integer\",\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\ttoCanonicalForm: integerTextCanonicalForm,\n\tcasts: {}\n});\nconst sqliteReal = storedAs(\"sqlite/real\", \"real\", { [sqliteInteger.id]: asReal });\nconst sqliteBlob = storedAs(\"sqlite/blob\", \"blob\", { [sqliteText.id]: unchanged });\n/** The length of `character` and `character varying`, which SQLite accepts and does not enforce. */\nconst sqliteCharacterLengthParams = type({ \"length?\": \"number.integer >= 1\" });\n/** A character type is written without its length, so its normal form has none. */\nconst withoutLength = ({ length: _length, ...rest }) => rest;\nconst sqliteCharacter = sqlDataType(\"sqlite/character\", {\n\tparams: sqliteCharacterLengthParams,\n\ttexts: [{\n\t\ttext: \"character\",\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\tnormalize: withoutLength,\n\tcasts: { [sqliteText.id]: unchanged }\n});\nconst sqliteCharacterVarying = sqlDataType(\"sqlite/character-varying\", {\n\tparams: sqliteCharacterLengthParams,\n\ttexts: [{\n\t\ttext: \"character varying\",\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\tnormalize: withoutLength,\n\tcasts: { [sqliteText.id]: unchanged }\n});\n/** Every data type this target registers. */\nconst sqliteDataTypes = [\n\tsqliteText,\n\tsqliteInteger,\n\tsqliteReal,\n\tsqliteBlob,\n\tsqliteCharacter,\n\tsqliteCharacterVarying\n];\n//#endregion\nexport { sqliteDataTypes as a, sqliteText as c, sqliteCharacterVarying as i, sqliteCharacter as n, sqliteInteger as o, sqliteCharacterLengthParams as r, sqliteReal as s, sqliteBlob as t };\n\n//# sourceMappingURL=data-types-pFQMl37_.mjs.map"],"mappings":";;;;;AAKA,MAAM,aAAa,UAAU;AAC7B,SAAS,WAAW,OAAO,UAAU;CACpC,MAAM,gBAAgB,yBAAyB,YAAY,SAAS,QAAQ,KAAK,UAAU,KAAK,EAAE,IAAI;EACrG,KAAK;EACL,KAAK;CACN,CAAC;AACF;;AAEA,MAAM,UAAU,UAAU,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI,WAAW,OAAO,YAAY;;AAEpG,MAAM,YAAY,IAAI,MAAM,QAAQ,CAAC,MAAM,YAAY,IAAI;CAC1D,OAAO,CAAC;EACP,MAAM;EACN,SAAS;EACT,SAAS;CACV,CAAC;CACD;AACD,CAAC;AACD,MAAM,aAAa,SAAS,eAAe,MAAM;;AAEjD,MAAM,gBAAgB,YAAY,kBAAkB;CACnD,OAAO,CAAC;EACP,MAAM;EACN,SAAS;EACT,SAAS;CACV,CAAC;CACD,iBAAiB;CACjB,OAAO,CAAC;AACT,CAAC;AACD,MAAM,aAAa,SAAS,eAAe,QAAQ,GAAG,cAAc,KAAK,OAAO,CAAC;AACjF,MAAM,aAAa,SAAS,eAAe,QAAQ,GAAG,WAAW,KAAK,UAAU,CAAC;;AAEjF,MAAM,8BAA8B,KAAK,EAAE,WAAW,sBAAsB,CAAC;;AAE7E,MAAM,iBAAiB,EAAE,QAAQ,SAAS,GAAG,WAAW;AACxD,MAAM,kBAAkB,YAAY,oBAAoB;CACvD,QAAQ;CACR,OAAO,CAAC;EACP,MAAM;EACN,SAAS;EACT,SAAS;CACV,CAAC;CACD,WAAW;CACX,OAAO,GAAG,WAAW,KAAK,UAAU;AACrC,CAAC;AACD,MAAM,yBAAyB,YAAY,4BAA4B;CACtE,QAAQ;CACR,OAAO,CAAC;EACP,MAAM;EACN,SAAS;EACT,SAAS;CACV,CAAC;CACD,WAAW;CACX,OAAO,GAAG,WAAW,KAAK,UAAU;AACrC,CAAC;;AAED,MAAM,kBAAkB;CACvB;CACA;CACA;CACA;CACA;CACA;AACD"}
@@ -1,5 +1,5 @@
1
1
  import { t as SQLITE_DATETIME_TEXT_FORMAT } from "./datetime-text-Bniwehv--Ddt3VS4z.mjs";
2
- //#region ../../../3-targets/3-targets/sqlite/dist/default-normalizer-Czg-VtmN.mjs
2
+ //#region ../../../3-targets/3-targets/sqlite/dist/default-normalizer-Ch3VFnEH.mjs
3
3
  const NULL_PATTERN = /^NULL$/i;
4
4
  const INTEGER_PATTERN = /^-?\d+$/;
5
5
  const REAL_PATTERN = /^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
@@ -47,16 +47,16 @@ function parseSqliteDefault(rawDefault, nativeType) {
47
47
  kind: "literal",
48
48
  value: null
49
49
  };
50
+ if (nativeType?.toLowerCase() === "integer" && INTEGER_PATTERN.test(trimmed)) return {
51
+ kind: "literal",
52
+ value: BigInt(trimmed).toString()
53
+ };
50
54
  if (isNumericLiteral(trimmed)) {
51
55
  const num = Number(trimmed);
52
56
  if (!Number.isFinite(num)) return {
53
57
  kind: "literal",
54
58
  value: num > 0 ? "Infinity" : "-Infinity"
55
59
  };
56
- if (nativeType?.toLowerCase() === "integer" && !Number.isSafeInteger(num)) return {
57
- kind: "literal",
58
- value: trimmed
59
- };
60
60
  return {
61
61
  kind: "literal",
62
62
  value: num
@@ -85,4 +85,4 @@ function sqliteResolveDefault(def, resolvedNativeType) {
85
85
  //#endregion
86
86
  export { sqliteResolveDefault as n, stripOuterParens as r, parseSqliteDefault as t };
87
87
 
88
- //# sourceMappingURL=default-normalizer-Czg-VtmN-DEbkGbn7.mjs.map
88
+ //# sourceMappingURL=default-normalizer-Ch3VFnEH-C-h1XtlJ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-normalizer-Ch3VFnEH-C-h1XtlJ.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/default-normalizer-Ch3VFnEH.mjs"],"sourcesContent":["import { t as SQLITE_DATETIME_TEXT_FORMAT } from \"./datetime-text-Bniwehv-.mjs\";\n//#region src/core/default-normalizer.ts\nconst NULL_PATTERN = /^NULL$/i;\nconst INTEGER_PATTERN = /^-?\\d+$/;\nconst REAL_PATTERN = /^-?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;\nconst HEX_PATTERN = /^0[xX][\\dA-Fa-f]+$/;\nconst STRING_LITERAL_PATTERN = /^'((?:[^']|'')*)'$/;\nconst STRFTIME_NOW_PATTERN = /^strftime\\s*\\(\\s*(['\"])([^'\"]*)\\1\\s*,\\s*(['\"])now\\3\\s*\\)$/i;\nfunction isCurrentTimestamp(expression) {\n\tconst lower = expression.toLowerCase();\n\tif (lower === \"current_timestamp\" || lower === \"datetime('now')\" || lower === \"datetime(\\\"now\\\")\") return true;\n\treturn expression.match(STRFTIME_NOW_PATTERN)?.[2] === SQLITE_DATETIME_TEXT_FORMAT;\n}\nfunction isNumericLiteral(value) {\n\treturn INTEGER_PATTERN.test(value) || REAL_PATTERN.test(value) || HEX_PATTERN.test(value);\n}\n/**\n* Strips a single matched wrapping pair of outer parens from `s`. Conservative:\n* only strips when the leading `(` is matched by the trailing `)` (so\n* `(a) + (b)` is returned unchanged). Mirrors SQLite's own\n* `pragma_table_info.dflt_value` normalization for expression defaults, and\n* is shared with the recreate-table postcheck builder so both sides agree\n* on the canonical form.\n*/\nfunction stripOuterParens(s) {\n\tif (!s.startsWith(\"(\") || !s.endsWith(\")\")) return s;\n\tlet depth = 0;\n\tfor (let i = 0; i < s.length; i++) if (s[i] === \"(\") depth += 1;\n\telse if (s[i] === \")\") {\n\t\tdepth -= 1;\n\t\tif (depth === 0 && i < s.length - 1) return s;\n\t}\n\treturn s.slice(1, -1);\n}\nfunction parseSqliteDefault(rawDefault, nativeType) {\n\tlet trimmed = rawDefault.trim();\n\twhile (true) {\n\t\tconst stripped = stripOuterParens(trimmed).trim();\n\t\tif (stripped === trimmed) break;\n\t\ttrimmed = stripped;\n\t}\n\tif (isCurrentTimestamp(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"now()\"\n\t};\n\tif (NULL_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: null\n\t};\n\tif (nativeType?.toLowerCase() === \"integer\" && INTEGER_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: BigInt(trimmed).toString()\n\t};\n\tif (isNumericLiteral(trimmed)) {\n\t\tconst num = Number(trimmed);\n\t\tif (!Number.isFinite(num)) return {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: num > 0 ? \"Infinity\" : \"-Infinity\"\n\t\t};\n\t\treturn {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: num\n\t\t};\n\t}\n\tconst stringMatch = trimmed.match(STRING_LITERAL_PATTERN);\n\tif (stringMatch?.[1] !== void 0) return {\n\t\tkind: \"literal\",\n\t\tvalue: stringMatch[1].replace(/''/g, \"'\")\n\t};\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: trimmed\n\t};\n}\n/**\n* The contract-derived side of verify: an authored function default is read\n* through the same parser as an introspected one, so `` sql`CURRENT_TIMESTAMP` ``\n* and the database's `CURRENT_TIMESTAMP` compare equal. Mirrors Postgres's\n* `postgresResolveDefault`.\n*/\nfunction sqliteResolveDefault(def, resolvedNativeType) {\n\tif (def.kind !== \"function\") return def;\n\treturn parseSqliteDefault(def.expression, resolvedNativeType) ?? def;\n}\n//#endregion\nexport { sqliteResolveDefault as n, stripOuterParens as r, parseSqliteDefault as t };\n\n//# sourceMappingURL=default-normalizer-Ch3VFnEH.mjs.map"],"mappings":";;AAEA,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,eAAe;AACrB,MAAM,cAAc;AACpB,MAAM,yBAAyB;AAC/B,MAAM,uBAAuB;AAC7B,SAAS,mBAAmB,YAAY;CACvC,MAAM,QAAQ,WAAW,YAAY;CACrC,IAAI,UAAU,uBAAuB,UAAU,qBAAqB,UAAU,qBAAqB,OAAO;CAC1G,OAAO,WAAW,MAAM,oBAAoB,CAAC,GAAG,OAAO;AACxD;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO,gBAAgB,KAAK,KAAK,KAAK,aAAa,KAAK,KAAK,KAAK,YAAY,KAAK,KAAK;AACzF;;;;;;;;;AASA,SAAS,iBAAiB,GAAG;CAC5B,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,EAAE,SAAS,GAAG,GAAG,OAAO;CACnD,IAAI,QAAQ;CACZ,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK,IAAI,EAAE,OAAO,KAAK,SAAS;MACzD,IAAI,EAAE,OAAO,KAAK;EACtB,SAAS;EACT,IAAI,UAAU,KAAK,IAAI,EAAE,SAAS,GAAG,OAAO;CAC7C;CACA,OAAO,EAAE,MAAM,GAAG,EAAE;AACrB;AACA,SAAS,mBAAmB,YAAY,YAAY;CACnD,IAAI,UAAU,WAAW,KAAK;CAC9B,OAAO,MAAM;EACZ,MAAM,WAAW,iBAAiB,OAAO,CAAC,CAAC,KAAK;EAChD,IAAI,aAAa,SAAS;EAC1B,UAAU;CACX;CACA,IAAI,mBAAmB,OAAO,GAAG,OAAO;EACvC,MAAM;EACN,YAAY;CACb;CACA,IAAI,aAAa,KAAK,OAAO,GAAG,OAAO;EACtC,MAAM;EACN,OAAO;CACR;CACA,IAAI,YAAY,YAAY,MAAM,aAAa,gBAAgB,KAAK,OAAO,GAAG,OAAO;EACpF,MAAM;EACN,OAAO,OAAO,OAAO,CAAC,CAAC,SAAS;CACjC;CACA,IAAI,iBAAiB,OAAO,GAAG;EAC9B,MAAM,MAAM,OAAO,OAAO;EAC1B,IAAI,CAAC,OAAO,SAAS,GAAG,GAAG,OAAO;GACjC,MAAM;GACN,OAAO,MAAM,IAAI,aAAa;EAC/B;EACA,OAAO;GACN,MAAM;GACN,OAAO;EACR;CACD;CACA,MAAM,cAAc,QAAQ,MAAM,sBAAsB;CACxD,IAAI,cAAc,OAAO,KAAK,GAAG,OAAO;EACvC,MAAM;EACN,OAAO,YAAY,EAAE,CAAC,QAAQ,OAAO,GAAG;CACzC;CACA,OAAO;EACN,MAAM;EACN,YAAY;CACb;AACD;;;;;;;AAOA,SAAS,qBAAqB,KAAK,oBAAoB;CACtD,IAAI,IAAI,SAAS,YAAY,OAAO;CACpC,OAAO,mBAAmB,IAAI,YAAY,kBAAkB,KAAK;AAClE"}
@@ -1,8 +1,8 @@
1
- import { t as sqliteDataTypeEntries } from "./data-type-entries-CL0a2goH-BCEztwoX.mjs";
2
- import { t as sqliteTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-CIrdwmEr-3T3t3kjc.mjs";
3
- import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
1
+ import { t as sqliteDataTypeEntries } from "./data-type-entries-Bc09V6WN-Dc00J0G9.mjs";
2
+ import { t as sqliteTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-Dqtz58eJ-BJ4UjLXW.mjs";
4
3
  import { temporalAuthoringPresets, temporalCodecPreset } from "@prisma/orm-framework/components/authoring";
5
- //#region ../../../3-targets/3-targets/sqlite/dist/descriptor-meta-AG8POta2.mjs
4
+ import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
5
+ //#region ../../../3-targets/3-targets/sqlite/dist/descriptor-meta-C3n4Dwxu.mjs
6
6
  const sqliteAuthoringTypes = { BigIntNumber: {
7
7
  kind: "typeConstructor",
8
8
  documentation: "A SQLite integer represented as a JavaScript number within its safe integer range.",
@@ -25,4 +25,4 @@ const sqliteTargetDescriptorMeta = {
25
25
  //#endregion
26
26
  export { sqliteTargetDescriptorMeta as t };
27
27
 
28
- //# sourceMappingURL=descriptor-meta-AG8POta2-D-k13ZOE.mjs.map
28
+ //# sourceMappingURL=descriptor-meta-C3n4Dwxu-DJiDDku0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"descriptor-meta-AG8POta2-D-k13ZOE.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/descriptor-meta-AG8POta2.mjs"],"sourcesContent":["import { t as sqliteDataTypeEntries } from \"./data-type-entries-CL0a2goH.mjs\";\nimport { t as sqliteTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-CIrdwmEr.mjs\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { temporalAuthoringPresets, temporalCodecPreset } from \"@internal/framework-components/authoring\";\n//#region src/core/authoring.ts\nconst sqliteAuthoringTypes = { BigIntNumber: {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A SQLite integer represented as a JavaScript number within its safe integer range.\",\n\toutput: { codecId: \"sqlite/bigintnumber@1\" }\n} };\nconst sqliteAuthoringFieldPresets = { temporal: {\n\t.../* @__PURE__ */ temporalAuthoringPresets({ codecId: \"sqlite/datetime@1\" }),\n\tdatetime: /* @__PURE__ */ temporalCodecPreset({ codecId: \"sqlite/datetime@1\" })\n} };\nconst sqliteTargetDescriptorMeta = {\n\t...sqliteTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: UNBOUND_NAMESPACE_ID,\n\tsupportsNamespaces: false,\n\tauthoring: {\n\t\ttype: sqliteAuthoringTypes,\n\t\tfield: sqliteAuthoringFieldPresets,\n\t\tdataTypes: sqliteDataTypeEntries()\n\t}\n};\n//#endregion\nexport { sqliteTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-AG8POta2.mjs.map"],"mappings":";;;;;AAKA,MAAM,uBAAuB,EAAE,cAAc;CAC5C,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,SAAS,wBAAwB;AAC5C,EAAE;AACF,MAAM,8BAA8B,EAAE,UAAU;CAC/C,GAAmB,yCAAyB,EAAE,SAAS,oBAAoB,CAAC;CAC5E,UAA0B,oCAAoB,EAAE,SAAS,oBAAoB,CAAC;AAC/E,EAAE;AACF,MAAM,6BAA6B;CAClC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,WAAW;EACV,MAAM;EACN,OAAO;EACP,WAAW,sBAAsB;CAClC;AACD"}
1
+ {"version":3,"file":"descriptor-meta-C3n4Dwxu-DJiDDku0.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/descriptor-meta-C3n4Dwxu.mjs"],"sourcesContent":["import { t as sqliteDataTypeEntries } from \"./data-type-entries-Bc09V6WN.mjs\";\nimport { t as sqliteTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-Dqtz58eJ.mjs\";\nimport { temporalAuthoringPresets, temporalCodecPreset } from \"@internal/framework-components/authoring\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\n//#region src/core/authoring.ts\nconst sqliteAuthoringTypes = { BigIntNumber: {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A SQLite integer represented as a JavaScript number within its safe integer range.\",\n\toutput: { codecId: \"sqlite/bigintnumber@1\" }\n} };\nconst sqliteAuthoringFieldPresets = { temporal: {\n\t.../* @__PURE__ */ temporalAuthoringPresets({ codecId: \"sqlite/datetime@1\" }),\n\tdatetime: /* @__PURE__ */ temporalCodecPreset({ codecId: \"sqlite/datetime@1\" })\n} };\nconst sqliteTargetDescriptorMeta = {\n\t...sqliteTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: UNBOUND_NAMESPACE_ID,\n\tsupportsNamespaces: false,\n\tauthoring: {\n\t\ttype: sqliteAuthoringTypes,\n\t\tfield: sqliteAuthoringFieldPresets,\n\t\tdataTypes: sqliteDataTypeEntries()\n\t}\n};\n//#endregion\nexport { sqliteTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-C3n4Dwxu.mjs.map"],"mappings":";;;;;AAKA,MAAM,uBAAuB,EAAE,cAAc;CAC5C,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,SAAS,wBAAwB;AAC5C,EAAE;AACF,MAAM,8BAA8B,EAAE,UAAU;CAC/C,GAAmB,yCAAyB,EAAE,SAAS,oBAAoB,CAAC;CAC5E,UAA0B,oCAAoB,EAAE,SAAS,oBAAoB,CAAC;AAC/E,EAAE;AACF,MAAM,6BAA6B;CAClC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,WAAW;EACV,MAAM;EACN,OAAO;EACP,WAAW,sBAAsB;CAClC;AACD"}
@@ -1,5 +1,5 @@
1
1
  import { t as sqliteAggregateDescriptors } from "./aggregates-CATLYJxc.mjs";
2
- import { a as sqliteCodecRegistry } from "./codecs-DlI8SadA.mjs";
2
+ import { a as sqliteCodecRegistry } from "./codecs-ByvSFGut.mjs";
3
3
  //#region ../../../3-targets/6-adapters/sqlite/dist/descriptor-meta-CFPBLIHW.mjs
4
4
  const sqliteAdapterDescriptorMeta = {
5
5
  kind: "adapter",
@@ -33,4 +33,4 @@ const sqliteAdapterDescriptorMeta = {
33
33
  //#endregion
34
34
  export { sqliteAdapterDescriptorMeta as t };
35
35
 
36
- //# sourceMappingURL=descriptor-meta-CFPBLIHW-BwigY92R.mjs.map
36
+ //# sourceMappingURL=descriptor-meta-CFPBLIHW-I-y9R_fj.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"descriptor-meta-CFPBLIHW-BwigY92R.mjs","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/descriptor-meta-CFPBLIHW.mjs"],"sourcesContent":["import { sqliteCodecRegistry } from \"@internal/target-sqlite/codecs\";\nimport { sqliteAggregateDescriptors } from \"@internal/target-sqlite/aggregates\";\n//#region src/core/descriptor-meta.ts\nconst sqliteAdapterDescriptorMeta = {\n\tkind: \"adapter\",\n\tfamilyId: \"sql\",\n\ttargetId: \"sqlite\",\n\tid: \"sqlite\",\n\tversion: \"0.0.1\",\n\tcapabilities: { sql: {\n\t\torderBy: true,\n\t\tlimit: true,\n\t\tlateral: false,\n\t\tjsonAgg: true,\n\t\treturning: true,\n\t\tforeignKeys: true,\n\t\tenums: false,\n\t\tinsertOnConflictSkip: true,\n\t\tinsertOnConflictWithoutTarget: true\n\t} },\n\ttypes: {\n\t\taggregateDescriptors: sqliteAggregateDescriptors,\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(sqliteCodecRegistry.values()),\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/adapter-sqlite/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"SqliteTypes\"\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\nexport { sqliteAdapterDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-CFPBLIHW.mjs.map"],"mappings":";;;AAGA,MAAM,8BAA8B;CACnC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,EAAE,KAAK;EACpB,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,aAAa;EACb,OAAO;EACP,sBAAsB;EACtB,+BAA+B;CAChC,EAAE;CACF,OAAO;EACN,sBAAsB;EACtB,YAAY;GACX,kBAAkB,MAAM,KAAK,oBAAoB,OAAO,CAAC;GACzD,QAAQ;IACP,SAAS;IACT,OAAO;IACP,OAAO;GACR;EACD;CACD;AACD"}
1
+ {"version":3,"file":"descriptor-meta-CFPBLIHW-I-y9R_fj.mjs","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/descriptor-meta-CFPBLIHW.mjs"],"sourcesContent":["import { sqliteCodecRegistry } from \"@internal/target-sqlite/codecs\";\nimport { sqliteAggregateDescriptors } from \"@internal/target-sqlite/aggregates\";\n//#region src/core/descriptor-meta.ts\nconst sqliteAdapterDescriptorMeta = {\n\tkind: \"adapter\",\n\tfamilyId: \"sql\",\n\ttargetId: \"sqlite\",\n\tid: \"sqlite\",\n\tversion: \"0.0.1\",\n\tcapabilities: { sql: {\n\t\torderBy: true,\n\t\tlimit: true,\n\t\tlateral: false,\n\t\tjsonAgg: true,\n\t\treturning: true,\n\t\tforeignKeys: true,\n\t\tenums: false,\n\t\tinsertOnConflictSkip: true,\n\t\tinsertOnConflictWithoutTarget: true\n\t} },\n\ttypes: {\n\t\taggregateDescriptors: sqliteAggregateDescriptors,\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(sqliteCodecRegistry.values()),\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/adapter-sqlite/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"SqliteTypes\"\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\nexport { sqliteAdapterDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-CFPBLIHW.mjs.map"],"mappings":";;;AAGA,MAAM,8BAA8B;CACnC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,EAAE,KAAK;EACpB,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,aAAa;EACb,OAAO;EACP,sBAAsB;EACtB,+BAA+B;CAChC,EAAE;CACF,OAAO;EACN,sBAAsB;EACtB,YAAY;GACX,kBAAkB,MAAM,KAAK,oBAAoB,OAAO,CAAC;GACzD,QAAQ;IACP,SAAS;IACT,OAAO;IACP,OAAO;GACR;EACD;CACD;AACD"}
@@ -1,5 +1,5 @@
1
- import { o as sqliteDataTypes } from "./data-types-Bs4y7eZb-B00ws2B6.mjs";
2
- //#region ../../../3-targets/3-targets/sqlite/dist/descriptor-meta-runtime-CIrdwmEr.mjs
1
+ import { a as sqliteDataTypes } from "./data-types-pFQMl37_-B-3aK_wd.mjs";
2
+ //#region ../../../3-targets/3-targets/sqlite/dist/descriptor-meta-runtime-Dqtz58eJ.mjs
3
3
  const sqliteTargetDescriptorMetaRuntime = {
4
4
  kind: "target",
5
5
  familyId: "sql",
@@ -12,4 +12,4 @@ const sqliteTargetDescriptorMetaRuntime = {
12
12
  //#endregion
13
13
  export { sqliteTargetDescriptorMetaRuntime as t };
14
14
 
15
- //# sourceMappingURL=descriptor-meta-runtime-CIrdwmEr-3T3t3kjc.mjs.map
15
+ //# sourceMappingURL=descriptor-meta-runtime-Dqtz58eJ-BJ4UjLXW.mjs.map