@prisma-next/target-sqlite 0.5.0-dev.65 → 0.5.0-dev.67

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 (102) hide show
  1. package/dist/{codec-ids-DyLO2Rfx.d.mts → codec-ids-CYwMu3-4.d.mts} +1 -1
  2. package/dist/codec-ids-CYwMu3-4.d.mts.map +1 -0
  3. package/dist/{codec-ids-B1-OiN8Q.mjs → codec-ids-CuUxYcd0.mjs} +2 -3
  4. package/dist/{codec-ids-B1-OiN8Q.mjs.map → codec-ids-CuUxYcd0.mjs.map} +1 -1
  5. package/dist/codec-ids.d.mts +1 -1
  6. package/dist/codec-ids.mjs +2 -3
  7. package/dist/{codec-types-Bbzv7qCW.d.mts → codec-types-DNauB5UT.d.mts} +7 -8
  8. package/dist/codec-types-DNauB5UT.d.mts.map +1 -0
  9. package/dist/codec-types.d.mts +2 -3
  10. package/dist/codec-types.mjs +2 -3
  11. package/dist/{codecs-BqDitp2X.d.mts → codecs-BAlEiSeP.d.mts} +18 -19
  12. package/dist/codecs-BAlEiSeP.d.mts.map +1 -0
  13. package/dist/{codecs-CDcidsHL.mjs → codecs-DVnHtVWW.mjs} +3 -4
  14. package/dist/codecs-DVnHtVWW.mjs.map +1 -0
  15. package/dist/codecs.d.mts +1 -2
  16. package/dist/codecs.mjs +2 -3
  17. package/dist/codecs.mjs.map +1 -1
  18. package/dist/control.d.mts +1 -1
  19. package/dist/control.d.mts.map +1 -1
  20. package/dist/control.mjs +9 -11
  21. package/dist/control.mjs.map +1 -1
  22. package/dist/{default-normalizer-R-sQXAYt.mjs → default-normalizer-3Fccw7yw.mjs} +2 -2
  23. package/dist/{default-normalizer-R-sQXAYt.mjs.map → default-normalizer-3Fccw7yw.mjs.map} +1 -1
  24. package/dist/default-normalizer.d.mts +0 -1
  25. package/dist/default-normalizer.d.mts.map +1 -1
  26. package/dist/default-normalizer.mjs +2 -3
  27. package/dist/descriptor-meta-CE2Kbn9b.mjs +17 -0
  28. package/dist/descriptor-meta-CE2Kbn9b.mjs.map +1 -0
  29. package/dist/migration.d.mts +2 -3
  30. package/dist/migration.d.mts.map +1 -1
  31. package/dist/migration.mjs +4 -5
  32. package/dist/migration.mjs.map +1 -1
  33. package/dist/{native-type-normalizer-BMovohPm.mjs → native-type-normalizer-BlN5XfD-.mjs} +2 -2
  34. package/dist/{native-type-normalizer-BMovohPm.mjs.map → native-type-normalizer-BlN5XfD-.mjs.map} +1 -1
  35. package/dist/native-type-normalizer.d.mts.map +1 -1
  36. package/dist/native-type-normalizer.mjs +2 -3
  37. package/dist/{op-factory-call-BUVV-W9F.mjs → op-factory-call-DvewDQ7a.mjs} +3 -4
  38. package/dist/{op-factory-call-BUVV-W9F.mjs.map → op-factory-call-DvewDQ7a.mjs.map} +1 -1
  39. package/dist/{op-factory-call-dUIOao68.d.mts → op-factory-call-DzKIrTLj.d.mts} +3 -4
  40. package/dist/op-factory-call-DzKIrTLj.d.mts.map +1 -0
  41. package/dist/op-factory-call.d.mts +1 -2
  42. package/dist/op-factory-call.mjs +2 -3
  43. package/dist/pack.d.mts +1 -3
  44. package/dist/pack.d.mts.map +1 -1
  45. package/dist/pack.mjs +2 -3
  46. package/dist/{planner-DmOFOhoq.mjs → planner-CIjeXa04.mjs} +8 -11
  47. package/dist/planner-CIjeXa04.mjs.map +1 -0
  48. package/dist/{planner-produced-sqlite-migration-BANB82Pw.mjs → planner-produced-sqlite-migration-CH7YGZf6.mjs} +4 -6
  49. package/dist/planner-produced-sqlite-migration-CH7YGZf6.mjs.map +1 -0
  50. package/dist/{planner-produced-sqlite-migration-CJr8ATRH.d.mts → planner-produced-sqlite-migration-IZZt7TRg.d.mts} +4 -4
  51. package/dist/planner-produced-sqlite-migration-IZZt7TRg.d.mts.map +1 -0
  52. package/dist/planner-produced-sqlite-migration.d.mts +1 -4
  53. package/dist/planner-produced-sqlite-migration.mjs +2 -3
  54. package/dist/{planner-target-details-BQIWQlBu.mjs → planner-target-details-Bm71XPKb.mjs} +2 -3
  55. package/dist/{planner-target-details-BQIWQlBu.mjs.map → planner-target-details-Bm71XPKb.mjs.map} +1 -1
  56. package/dist/{planner-target-details-CtWRvse0.d.mts → planner-target-details-vhvZDWK1.d.mts} +1 -1
  57. package/dist/planner-target-details-vhvZDWK1.d.mts.map +1 -0
  58. package/dist/planner-target-details.d.mts +1 -1
  59. package/dist/planner-target-details.mjs +2 -3
  60. package/dist/planner.d.mts +2 -5
  61. package/dist/planner.d.mts.map +1 -1
  62. package/dist/planner.mjs +2 -3
  63. package/dist/{render-ops-CXOv7SRC.mjs → render-ops-CSRDT4YL.mjs} +2 -2
  64. package/dist/{render-ops-CXOv7SRC.mjs.map → render-ops-CSRDT4YL.mjs.map} +1 -1
  65. package/dist/render-ops.d.mts +2 -3
  66. package/dist/render-ops.d.mts.map +1 -1
  67. package/dist/render-ops.mjs +2 -3
  68. package/dist/runtime.d.mts.map +1 -1
  69. package/dist/runtime.mjs +3 -5
  70. package/dist/runtime.mjs.map +1 -1
  71. package/dist/{shared-D_1fFqLf.d.mts → shared-qLsgTOZs.d.mts} +2 -2
  72. package/dist/shared-qLsgTOZs.d.mts.map +1 -0
  73. package/dist/{sql-utils-D3SMPFDD.mjs → sql-utils-DhevMgef.mjs} +4 -2
  74. package/dist/sql-utils-DhevMgef.mjs.map +1 -0
  75. package/dist/sql-utils.d.mts.map +1 -1
  76. package/dist/sql-utils.mjs +2 -3
  77. package/dist/{sqlite-migration-CnLhIrJF.mjs → sqlite-migration-BBJktVVw.mjs} +2 -3
  78. package/dist/{sqlite-migration-CnLhIrJF.mjs.map → sqlite-migration-BBJktVVw.mjs.map} +1 -1
  79. package/dist/{sqlite-migration-BeR1cikr.d.mts → sqlite-migration-DAb2NEX6.d.mts} +2 -3
  80. package/dist/sqlite-migration-DAb2NEX6.d.mts.map +1 -0
  81. package/dist/{statement-builders-DobaAWnW.mjs → statement-builders-DMT4ltXR.mjs} +2 -3
  82. package/dist/{statement-builders-DobaAWnW.mjs.map → statement-builders-DMT4ltXR.mjs.map} +1 -1
  83. package/dist/statement-builders.d.mts.map +1 -1
  84. package/dist/statement-builders.mjs +2 -3
  85. package/dist/{tables-sKIg_lWE.mjs → tables-D84zfPZI.mjs} +5 -10
  86. package/dist/tables-D84zfPZI.mjs.map +1 -0
  87. package/package.json +19 -19
  88. package/dist/codec-ids-DyLO2Rfx.d.mts.map +0 -1
  89. package/dist/codec-types-Bbzv7qCW.d.mts.map +0 -1
  90. package/dist/codecs-BqDitp2X.d.mts.map +0 -1
  91. package/dist/codecs-CDcidsHL.mjs.map +0 -1
  92. package/dist/descriptor-meta-BA2YAFQq.mjs +0 -24
  93. package/dist/descriptor-meta-BA2YAFQq.mjs.map +0 -1
  94. package/dist/op-factory-call-dUIOao68.d.mts.map +0 -1
  95. package/dist/planner-DmOFOhoq.mjs.map +0 -1
  96. package/dist/planner-produced-sqlite-migration-BANB82Pw.mjs.map +0 -1
  97. package/dist/planner-produced-sqlite-migration-CJr8ATRH.d.mts.map +0 -1
  98. package/dist/planner-target-details-CtWRvse0.d.mts.map +0 -1
  99. package/dist/shared-D_1fFqLf.d.mts.map +0 -1
  100. package/dist/sql-utils-D3SMPFDD.mjs.map +0 -1
  101. package/dist/sqlite-migration-BeR1cikr.d.mts.map +0 -1
  102. package/dist/tables-sKIg_lWE.mjs.map +0 -1
@@ -1,3 +1,2 @@
1
- import { t as buildTargetDetails } from "./planner-target-details-BQIWQlBu.mjs";
2
-
3
- export { buildTargetDetails };
1
+ import { t as buildTargetDetails } from "./planner-target-details-Bm71XPKb.mjs";
2
+ export { buildTargetDetails };
@@ -1,8 +1,5 @@
1
- import { t as SqlitePlanTargetDetails } from "./planner-target-details-CtWRvse0.mjs";
2
- import "./shared-D_1fFqLf.mjs";
3
- import "./sqlite-migration-BeR1cikr.mjs";
4
- import "./op-factory-call-dUIOao68.mjs";
5
- import { n as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-CJr8ATRH.mjs";
1
+ import { t as SqlitePlanTargetDetails } from "./planner-target-details-vhvZDWK1.mjs";
2
+ import { n as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-IZZt7TRg.mjs";
6
3
  import { MigrationOperationPolicy, SqlMigrationPlanner, SqlPlannerFailureResult } from "@prisma-next/family-sql/control";
7
4
  import { MigrationPlanner, MigrationScaffoldContext } from "@prisma-next/framework-components/control";
8
5
  import { Contract } from "@prisma-next/contract/types";
@@ -1 +1 @@
1
- {"version":3,"file":"planner.d.mts","names":[],"sources":["../src/core/migrations/planner.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;iBAyBgB,4BAAA,CAAA,GAAgC;KAIpC,gBAAA;;iBACmC;IAC3C;AANJ;AAIA;AAkBA;;;;;;;;;;;;cAAa,sBAAA,YACA,oBAAoB,0BAA0B;;;;qBAKtC;;;;;;;;;;;2BAWM;kCACO,cAAc;;;;;;;MAO1C;0BAKO,4CAER"}
1
+ {"version":3,"file":"planner.d.mts","names":[],"sources":["../src/core/migrations/planner.ts"],"mappings":";;;;;;;;iBAyBgB,4BAAA,CAAA,GAAgC,sBAAA;AAAA,KAIpC,gBAAA;EAAA,SACG,IAAA;EAAA,SAA0B,IAAA,EAAM,mCAAA;AAAA,IAC3C,uBAAA;;;AAFJ;;;;;;;;;;AAkBA;;cAAa,sBAAA,YACA,mBAAA,CAAoB,uBAAA,GAA0B,gBAAA;EAEzD,IAAA,CAAK,OAAA;IAAA,SACM,QAAA;IAAA,SACA,MAAA;IAAA,SACA,MAAA,EAAQ,wBAAA;IAYa;;;;;;;;;;IAAA,SADrB,YAAA,EAAc,QAAA;IAAA,SACd,mBAAA,EAAqB,aAAA,CAAc,8BAAA;IAdnC;;;;;IAAA,SAoBA,OAAA;EAAA,IACP,gBAAA;EAIJ,cAAA,CACE,OAAA,EAAS,wBAAA,EACT,OAAA,WACC,mCAAA;EAAA,QAWK,OAAA;EAAA,QA6CA,oBAAA;EAAA,QAaA,mBAAA;AAAA"}
package/dist/planner.mjs CHANGED
@@ -1,3 +1,2 @@
1
- import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-DmOFOhoq.mjs";
2
-
3
- export { SqliteMigrationPlanner, createSqliteMigrationPlanner };
1
+ import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-CIjeXa04.mjs";
2
+ export { SqliteMigrationPlanner, createSqliteMigrationPlanner };
@@ -2,7 +2,7 @@
2
2
  function renderOps(calls) {
3
3
  return calls.map((c) => c.toOp());
4
4
  }
5
-
6
5
  //#endregion
7
6
  export { renderOps as t };
8
- //# sourceMappingURL=render-ops-CXOv7SRC.mjs.map
7
+
8
+ //# sourceMappingURL=render-ops-CSRDT4YL.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"render-ops-CXOv7SRC.mjs","names":[],"sources":["../src/core/migrations/render-ops.ts"],"sourcesContent":["import type { SqlMigrationPlanOperation } from '@prisma-next/family-sql/control';\nimport type { SqliteOpFactoryCall } from './op-factory-call';\nimport type { SqlitePlanTargetDetails } from './planner-target-details';\n\ntype Op = SqlMigrationPlanOperation<SqlitePlanTargetDetails>;\n\nexport function renderOps(calls: readonly SqliteOpFactoryCall[]): Op[] {\n return calls.map((c) => c.toOp());\n}\n"],"mappings":";AAMA,SAAgB,UAAU,OAA6C;AACrE,QAAO,MAAM,KAAK,MAAM,EAAE,MAAM,CAAC"}
1
+ {"version":3,"file":"render-ops-CSRDT4YL.mjs","names":[],"sources":["../src/core/migrations/render-ops.ts"],"sourcesContent":["import type { SqlMigrationPlanOperation } from '@prisma-next/family-sql/control';\nimport type { SqliteOpFactoryCall } from './op-factory-call';\nimport type { SqlitePlanTargetDetails } from './planner-target-details';\n\ntype Op = SqlMigrationPlanOperation<SqlitePlanTargetDetails>;\n\nexport function renderOps(calls: readonly SqliteOpFactoryCall[]): Op[] {\n return calls.map((c) => c.toOp());\n}\n"],"mappings":";AAMA,SAAgB,UAAU,OAA6C;CACrE,OAAO,MAAM,KAAK,MAAM,EAAE,MAAM,CAAC"}
@@ -1,6 +1,5 @@
1
- import { t as SqlitePlanTargetDetails } from "./planner-target-details-CtWRvse0.mjs";
2
- import "./shared-D_1fFqLf.mjs";
3
- import { l as SqliteOpFactoryCall } from "./op-factory-call-dUIOao68.mjs";
1
+ import { t as SqlitePlanTargetDetails } from "./planner-target-details-vhvZDWK1.mjs";
2
+ import { l as SqliteOpFactoryCall } from "./op-factory-call-DzKIrTLj.mjs";
4
3
  import { SqlMigrationPlanOperation } from "@prisma-next/family-sql/control";
5
4
 
6
5
  //#region src/core/migrations/render-ops.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"render-ops.d.mts","names":[],"sources":["../src/core/migrations/render-ops.ts"],"sourcesContent":[],"mappings":";;;;;;KAIK,EAAA,GAAK,0BAA0B;iBAEpB,SAAA,iBAA0B,wBAAwB"}
1
+ {"version":3,"file":"render-ops.d.mts","names":[],"sources":["../src/core/migrations/render-ops.ts"],"mappings":";;;;;KAIK,EAAA,GAAK,yBAAA,CAA0B,uBAAA;AAAA,iBAEpB,SAAA,CAAU,KAAA,WAAgB,mBAAA,KAAwB,EAAA"}
@@ -1,3 +1,2 @@
1
- import { t as renderOps } from "./render-ops-CXOv7SRC.mjs";
2
-
3
- export { renderOps };
1
+ import { t as renderOps } from "./render-ops-CSRDT4YL.mjs";
2
+ export { renderOps };
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.mts","names":[],"sources":["../src/core/runtime-target.ts"],"sourcesContent":[],"mappings":";;;;UAIiB,2BAAA,SAAoC;AAArD,cAEM,6BAFuC,EAER,0BAFqC,CAAA,QAAA,EAIxE,2BAJwE,CAAA"}
1
+ {"version":3,"file":"runtime.d.mts","names":[],"sources":["../src/core/runtime-target.ts"],"mappings":";;;;UAIiB,2BAAA,SAAoC,qBAAA;AAAA,cAE/C,6BAAA,EAA+B,0BAAA,WAEnC,2BAAA"}
package/dist/runtime.mjs CHANGED
@@ -1,5 +1,4 @@
1
- import { t as sqliteTargetDescriptorMeta } from "./descriptor-meta-BA2YAFQq.mjs";
2
-
1
+ import { t as sqliteTargetDescriptorMeta } from "./descriptor-meta-CE2Kbn9b.mjs";
3
2
  //#region src/core/runtime-target.ts
4
3
  const sqliteRuntimeTargetDescriptor = {
5
4
  ...sqliteTargetDescriptorMeta,
@@ -11,8 +10,7 @@ const sqliteRuntimeTargetDescriptor = {
11
10
  };
12
11
  }
13
12
  };
14
- var runtime_target_default = sqliteRuntimeTargetDescriptor;
15
-
16
13
  //#endregion
17
- export { runtime_target_default as default };
14
+ export { sqliteRuntimeTargetDescriptor as default };
15
+
18
16
  //# sourceMappingURL=runtime.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.mjs","names":["sqliteRuntimeTargetDescriptor: SqlRuntimeTargetDescriptor<\n 'sqlite',\n SqliteRuntimeTargetInstance\n>"],"sources":["../src/core/runtime-target.ts"],"sourcesContent":["import type { RuntimeTargetInstance } from '@prisma-next/framework-components/execution';\nimport type { SqlRuntimeTargetDescriptor } from '@prisma-next/sql-runtime';\nimport { sqliteTargetDescriptorMeta } from './descriptor-meta';\n\nexport interface SqliteRuntimeTargetInstance extends RuntimeTargetInstance<'sql', 'sqlite'> {}\n\nconst sqliteRuntimeTargetDescriptor: SqlRuntimeTargetDescriptor<\n 'sqlite',\n SqliteRuntimeTargetInstance\n> = {\n ...sqliteTargetDescriptorMeta,\n codecs: () => [],\n create(): SqliteRuntimeTargetInstance {\n return {\n familyId: 'sql',\n targetId: 'sqlite',\n };\n },\n};\n\nexport default sqliteRuntimeTargetDescriptor;\n"],"mappings":";;;AAMA,MAAMA,gCAGF;CACF,GAAG;CACH,cAAc,EAAE;CAChB,SAAsC;AACpC,SAAO;GACL,UAAU;GACV,UAAU;GACX;;CAEJ;AAED,6BAAe"}
1
+ {"version":3,"file":"runtime.mjs","names":[],"sources":["../src/core/runtime-target.ts"],"sourcesContent":["import type { RuntimeTargetInstance } from '@prisma-next/framework-components/execution';\nimport type { SqlRuntimeTargetDescriptor } from '@prisma-next/sql-runtime';\nimport { sqliteTargetDescriptorMeta } from './descriptor-meta';\n\nexport interface SqliteRuntimeTargetInstance extends RuntimeTargetInstance<'sql', 'sqlite'> {}\n\nconst sqliteRuntimeTargetDescriptor: SqlRuntimeTargetDescriptor<\n 'sqlite',\n SqliteRuntimeTargetInstance\n> = {\n ...sqliteTargetDescriptorMeta,\n codecs: () => [],\n create(): SqliteRuntimeTargetInstance {\n return {\n familyId: 'sql',\n targetId: 'sqlite',\n };\n },\n};\n\nexport default sqliteRuntimeTargetDescriptor;\n"],"mappings":";;AAMA,MAAM,gCAGF;CACF,GAAG;CACH,cAAc,EAAE;CAChB,SAAsC;EACpC,OAAO;GACL,UAAU;GACV,UAAU;GACX;;CAEJ"}
@@ -1,4 +1,4 @@
1
- import { t as SqlitePlanTargetDetails } from "./planner-target-details-CtWRvse0.mjs";
1
+ import { t as SqlitePlanTargetDetails } from "./planner-target-details-vhvZDWK1.mjs";
2
2
  import { SqlMigrationPlanOperation } from "@prisma-next/family-sql/control";
3
3
  import { ReferentialAction } from "@prisma-next/sql-contract/types";
4
4
 
@@ -66,4 +66,4 @@ interface SqliteIndexSpec {
66
66
  }
67
67
  //#endregion
68
68
  export { SqliteTableSpec as i, SqliteColumnSpec as n, SqliteIndexSpec as r, Op as t };
69
- //# sourceMappingURL=shared-D_1fFqLf.d.mts.map
69
+ //# sourceMappingURL=shared-qLsgTOZs.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-qLsgTOZs.d.mts","names":[],"sources":["../src/core/migrations/operations/shared.ts"],"mappings":";;;;;KAKY,EAAA,GAAK,yBAAA,CAA0B,uBAAA;;;AAsB3C;;;;;;;;;;;AAQA;;;UARiB,gBAAA;EAAA,SACN,IAAA;EAAA,SACA,OAAA;EAAA,SACA,UAAA;EAAA,SACA,QAAA;EAAA,SACA,6BAAA;AAAA;AAAA,UAGM,oBAAA;EAAA,SACN,OAAA;AAAA;AAAA,UAGM,gBAAA;EAAA,SACN,OAAA;EAAA,SACA,IAAA;AAAA;AAAA,UAGM,oBAAA;EAAA,SACN,OAAA;EAAA,SACA,UAAA;IAAA,SACE,KAAA;IAAA,SACA,OAAA;EAAA;EAAA,SAEF,IAAA;EAAA,SACA,QAAA,GAAW,iBAAA;EAAA,SACX,QAAA,GAAW,iBAAA;EAAA,SACX,UAAA;AAAA;;;;;UAOM,eAAA;EAAA,SACN,OAAA,WAAkB,gBAAA;EAAA,SAClB,UAAA,GAAa,oBAAA;EAAA,SACb,OAAA,YAAmB,gBAAA;EAAA,SACnB,WAAA,YAAuB,oBAAA;AAAA;;;;;;UAQjB,eAAA;EAAA,SACN,IAAA;EAAA,SACA,OAAA;AAAA"}
@@ -11,6 +11,8 @@
11
11
  * back into `adapter-sqlite` for these primitives.
12
12
  */
13
13
  var SqlEscapeError = class extends Error {
14
+ value;
15
+ kind;
14
16
  constructor(message, value, kind) {
15
17
  super(message);
16
18
  this.value = value;
@@ -27,7 +29,7 @@ function escapeLiteral(value) {
27
29
  if (value.includes("\0")) throw new SqlEscapeError("Literal value cannot contain null bytes", value.replace(/\0/g, "\\0"), "literal");
28
30
  return value.replace(/'/g, "''");
29
31
  }
30
-
31
32
  //#endregion
32
33
  export { escapeLiteral as n, quoteIdentifier as r, SqlEscapeError as t };
33
- //# sourceMappingURL=sql-utils-D3SMPFDD.mjs.map
34
+
35
+ //# sourceMappingURL=sql-utils-DhevMgef.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-utils-DhevMgef.mjs","names":[],"sources":["../src/core/sql-utils.ts"],"sourcesContent":["/**\n * Shared SQL utility functions for the SQLite target.\n *\n * These functions handle safe SQL identifier and literal escaping. They\n * live in `target-sqlite` (mirroring `target-postgres/src/core/sql-utils.ts`)\n * so both the control adapter (used at emit time) and the runtime adapter\n * (used at execute time) can depend on them through a single one-way edge:\n * `adapter-sqlite → target-sqlite`. Hosting them target-side avoids the\n * cyclic workspace dependency that would arise if `target-sqlite` reached\n * back into `adapter-sqlite` for these primitives.\n */\n\nexport class SqlEscapeError extends Error {\n constructor(\n message: string,\n public readonly value: string,\n public readonly kind: 'identifier' | 'literal',\n ) {\n super(message);\n this.name = 'SqlEscapeError';\n }\n}\n\nexport function quoteIdentifier(identifier: string): string {\n if (identifier.length === 0) {\n throw new SqlEscapeError('Identifier cannot be empty', identifier, 'identifier');\n }\n if (identifier.includes('\\0')) {\n throw new SqlEscapeError(\n 'Identifier cannot contain null bytes',\n identifier.replace(/\\0/g, '\\\\0'),\n 'identifier',\n );\n }\n return `\"${identifier.replace(/\"/g, '\"\"')}\"`;\n}\n\nexport function escapeLiteral(value: string): string {\n if (value.includes('\\0')) {\n throw new SqlEscapeError(\n 'Literal value cannot contain null bytes',\n value.replace(/\\0/g, '\\\\0'),\n 'literal',\n );\n }\n return value.replace(/'/g, \"''\");\n}\n"],"mappings":";;;;;;;;;;;;AAYA,IAAa,iBAAb,cAAoC,MAAM;CAGtB;CACA;CAHlB,YACE,SACA,OACA,MACA;EACA,MAAM,QAAQ;EAHE,KAAA,QAAA;EACA,KAAA,OAAA;EAGhB,KAAK,OAAO;;;AAIhB,SAAgB,gBAAgB,YAA4B;CAC1D,IAAI,WAAW,WAAW,GACxB,MAAM,IAAI,eAAe,8BAA8B,YAAY,aAAa;CAElF,IAAI,WAAW,SAAS,KAAK,EAC3B,MAAM,IAAI,eACR,wCACA,WAAW,QAAQ,OAAO,MAAM,EAChC,aACD;CAEH,OAAO,IAAI,WAAW,QAAQ,MAAM,OAAK,CAAC;;AAG5C,SAAgB,cAAc,OAAuB;CACnD,IAAI,MAAM,SAAS,KAAK,EACtB,MAAM,IAAI,eACR,2CACA,MAAM,QAAQ,OAAO,MAAM,EAC3B,UACD;CAEH,OAAO,MAAM,QAAQ,MAAM,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"sql-utils.d.mts","names":[],"sources":["../src/core/sql-utils.ts"],"sourcesContent":[],"mappings":";;AAYA;AAWA;AAcA;;;;;;;;cAzBa,cAAA,SAAuB,KAAA;;;;;iBAWpB,eAAA;iBAcA,aAAA"}
1
+ {"version":3,"file":"sql-utils.d.mts","names":[],"sources":["../src/core/sql-utils.ts"],"mappings":";;AAYA;;;;;;;;;;cAAa,cAAA,SAAuB,KAAA;EAAA,SAGhB,KAAA;EAAA,SACA,IAAA;cAFhB,OAAA,UACgB,KAAA,UACA,IAAA;AAAA;AAAA,iBAOJ,eAAA,CAAgB,UAAA;AAAA,iBAchB,aAAA,CAAc,KAAA"}
@@ -1,3 +1,2 @@
1
- import { n as escapeLiteral, r as quoteIdentifier, t as SqlEscapeError } from "./sql-utils-D3SMPFDD.mjs";
2
-
3
- export { SqlEscapeError, escapeLiteral, quoteIdentifier };
1
+ import { n as escapeLiteral, r as quoteIdentifier, t as SqlEscapeError } from "./sql-utils-DhevMgef.mjs";
2
+ export { SqlEscapeError, escapeLiteral, quoteIdentifier };
@@ -1,5 +1,4 @@
1
1
  import { Migration } from "@prisma-next/family-sql/migration";
2
-
3
2
  //#region src/core/migrations/sqlite-migration.ts
4
3
  /**
5
4
  * Target-owned base class for SQLite migrations. Fixes the `SqlMigration`
@@ -11,7 +10,7 @@ import { Migration } from "@prisma-next/family-sql/migration";
11
10
  var SqliteMigration = class extends Migration {
12
11
  targetId = "sqlite";
13
12
  };
14
-
15
13
  //#endregion
16
14
  export { SqliteMigration as t };
17
- //# sourceMappingURL=sqlite-migration-CnLhIrJF.mjs.map
15
+
16
+ //# sourceMappingURL=sqlite-migration-BBJktVVw.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-migration-CnLhIrJF.mjs","names":["SqlMigration"],"sources":["../src/core/migrations/sqlite-migration.ts"],"sourcesContent":["import { Migration as SqlMigration } from '@prisma-next/family-sql/migration';\nimport type { SqlitePlanTargetDetails } from './planner-target-details';\n\n/**\n * Target-owned base class for SQLite migrations. Fixes the `SqlMigration`\n * generic to `SqlitePlanTargetDetails` and the abstract `targetId` to the\n * SQLite literal, so both user-authored migrations and renderer-generated\n * scaffolds can extend `SqliteMigration` directly without redeclaring\n * target-local identity.\n */\nexport abstract class SqliteMigration extends SqlMigration<SqlitePlanTargetDetails> {\n readonly targetId = 'sqlite' as const;\n}\n"],"mappings":";;;;;;;;;;AAUA,IAAsB,kBAAtB,cAA8CA,UAAsC;CAClF,AAAS,WAAW"}
1
+ {"version":3,"file":"sqlite-migration-BBJktVVw.mjs","names":["SqlMigration"],"sources":["../src/core/migrations/sqlite-migration.ts"],"sourcesContent":["import { Migration as SqlMigration } from '@prisma-next/family-sql/migration';\nimport type { SqlitePlanTargetDetails } from './planner-target-details';\n\n/**\n * Target-owned base class for SQLite migrations. Fixes the `SqlMigration`\n * generic to `SqlitePlanTargetDetails` and the abstract `targetId` to the\n * SQLite literal, so both user-authored migrations and renderer-generated\n * scaffolds can extend `SqliteMigration` directly without redeclaring\n * target-local identity.\n */\nexport abstract class SqliteMigration extends SqlMigration<SqlitePlanTargetDetails> {\n readonly targetId = 'sqlite' as const;\n}\n"],"mappings":";;;;;;;;;AAUA,IAAsB,kBAAtB,cAA8CA,UAAsC;CAClF,WAAoB"}
@@ -1,8 +1,7 @@
1
- import { t as SqlitePlanTargetDetails } from "./planner-target-details-CtWRvse0.mjs";
1
+ import { t as SqlitePlanTargetDetails } from "./planner-target-details-vhvZDWK1.mjs";
2
2
  import { Migration } from "@prisma-next/family-sql/migration";
3
3
 
4
4
  //#region src/core/migrations/sqlite-migration.d.ts
5
-
6
5
  /**
7
6
  * Target-owned base class for SQLite migrations. Fixes the `SqlMigration`
8
7
  * generic to `SqlitePlanTargetDetails` and the abstract `targetId` to the
@@ -15,4 +14,4 @@ declare abstract class SqliteMigration extends Migration<SqlitePlanTargetDetails
15
14
  }
16
15
  //#endregion
17
16
  export { SqliteMigration as t };
18
- //# sourceMappingURL=sqlite-migration-BeR1cikr.d.mts.map
17
+ //# sourceMappingURL=sqlite-migration-DAb2NEX6.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-migration-DAb2NEX6.d.mts","names":[],"sources":["../src/core/migrations/sqlite-migration.ts"],"mappings":";;;;;;AAUA;;;;;uBAAsB,eAAA,SAAwB,SAAA,CAAa,uBAAA;EAAA,SAChD,QAAA;AAAA"}
@@ -1,5 +1,4 @@
1
1
  import { APP_SPACE_ID } from "@prisma-next/framework-components/control";
2
-
3
2
  //#region src/core/migrations/statement-builders.ts
4
3
  const MARKER_TABLE_NAME = "_prisma_marker";
5
4
  const LEDGER_TABLE_NAME = "_prisma_ledger";
@@ -153,7 +152,7 @@ function buildLedgerInsertStatement(input) {
153
152
  function jsonParam(value) {
154
153
  return JSON.stringify(value ?? null);
155
154
  }
156
-
157
155
  //#endregion
158
156
  export { buildLedgerInsertStatement as a, ensureMarkerTableStatement as c, MARKER_TABLE_NAME as i, readMarkerStatement as l, CONTROL_TABLE_NAMES as n, buildWriteMarkerStatements as o, LEDGER_TABLE_NAME as r, ensureLedgerTableStatement as s, APP_SPACE_ID as t };
159
- //# sourceMappingURL=statement-builders-DobaAWnW.mjs.map
157
+
158
+ //# sourceMappingURL=statement-builders-DMT4ltXR.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"statement-builders-DobaAWnW.mjs","names":["CONTROL_TABLE_NAMES: ReadonlySet<string>","ensureMarkerTableStatement: SqlStatement","ensureLedgerTableStatement: SqlStatement"],"sources":["../src/core/migrations/statement-builders.ts"],"sourcesContent":["import { APP_SPACE_ID } from '@prisma-next/framework-components/control';\n\nexport { APP_SPACE_ID };\n\nexport interface SqlStatement {\n readonly sql: string;\n readonly params: readonly unknown[];\n}\n\nexport const MARKER_TABLE_NAME = '_prisma_marker';\nexport const LEDGER_TABLE_NAME = '_prisma_ledger';\n\n/**\n * Control tables the runner creates/manages. The planner must not drop these\n * when reconciling \"extra\" tables against the contract.\n */\nexport const CONTROL_TABLE_NAMES: ReadonlySet<string> = new Set([\n MARKER_TABLE_NAME,\n LEDGER_TABLE_NAME,\n]);\n\n/**\n * Schema for `_prisma_marker`. The `space TEXT PRIMARY KEY` shape\n * supports one row per loaded contract space (`'app'`,\n * `'<extension-id>'`, …); brand-new databases create this shape\n * directly. The migration runner detects pre-1.0 single-row markers\n * (no `space` column) at boot and fails with a structured\n * `LEGACY_MARKER_SHAPE` error rather than auto-rebuilding the table —\n * see `specs/framework-mechanism.spec.md § 2`.\n */\nexport const ensureMarkerTableStatement: SqlStatement = {\n sql: `CREATE TABLE IF NOT EXISTS _prisma_marker (\n space TEXT NOT NULL PRIMARY KEY DEFAULT '${APP_SPACE_ID}',\n core_hash TEXT NOT NULL,\n profile_hash TEXT NOT NULL,\n contract_json TEXT,\n canonical_version INTEGER,\n updated_at TEXT NOT NULL DEFAULT (datetime('now')),\n app_tag TEXT,\n meta TEXT NOT NULL DEFAULT '{}',\n invariants TEXT NOT NULL DEFAULT '[]'\n )`,\n params: [],\n};\n\nexport const ensureLedgerTableStatement: SqlStatement = {\n sql: `CREATE TABLE IF NOT EXISTS _prisma_ledger (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n created_at TEXT NOT NULL DEFAULT (datetime('now')),\n origin_core_hash TEXT,\n origin_profile_hash TEXT,\n destination_core_hash TEXT NOT NULL,\n destination_profile_hash TEXT,\n contract_json_before TEXT,\n contract_json_after TEXT,\n operations TEXT NOT NULL\n )`,\n params: [],\n};\n\nexport function readMarkerStatement(space: string): SqlStatement {\n return {\n sql: `SELECT\n core_hash,\n profile_hash,\n contract_json,\n canonical_version,\n updated_at,\n app_tag,\n meta,\n invariants\n FROM _prisma_marker\n WHERE space = ?`,\n params: [space],\n };\n}\n\nexport interface WriteMarkerInput {\n /**\n * Logical space identifier for this marker row. Required at every\n * call site so the type system surfaces every place that needs to\n * thread the value (rather than letting an `?? APP_SPACE_ID`\n * fall-through silently collapse multi-space markers onto the\n * `'app'` row). App-plan callers pass {@link APP_SPACE_ID}\n * (`'app'`); per-extension callers pass the extension's space id.\n */\n readonly space: string;\n readonly storageHash: string;\n readonly profileHash: string;\n readonly contractJson?: unknown;\n readonly canonicalVersion?: number | null;\n readonly appTag?: string | null;\n readonly meta?: Record<string, unknown>;\n /**\n * Invariants to write into `marker.invariants`. Stored as a JSON-encoded\n * TEXT array — SQLite has no native array type. The runner is responsible\n * for merging with the existing column (no SQL-side merge here, unlike\n * Postgres) before passing them in: BEGIN EXCLUSIVE on the migration\n * transaction makes the read-then-merge-then-write sequence safe.\n */\n readonly invariants: readonly string[];\n}\n\nexport function buildWriteMarkerStatements(input: WriteMarkerInput): {\n readonly insert: SqlStatement;\n readonly update: SqlStatement;\n} {\n const params: readonly unknown[] = [\n input.space,\n input.storageHash,\n input.profileHash,\n jsonParam(input.contractJson),\n input.canonicalVersion ?? null,\n input.appTag ?? null,\n jsonParam(input.meta ?? {}),\n jsonParam(input.invariants),\n ];\n\n return {\n insert: {\n sql: `INSERT INTO _prisma_marker (\n space,\n core_hash,\n profile_hash,\n contract_json,\n canonical_version,\n updated_at,\n app_tag,\n meta,\n invariants\n ) VALUES (\n ?,\n ?,\n ?,\n ?,\n ?,\n datetime('now'),\n ?,\n ?,\n ?\n )`,\n params,\n },\n update: {\n sql: `UPDATE _prisma_marker SET\n core_hash = ?,\n profile_hash = ?,\n contract_json = ?,\n canonical_version = ?,\n updated_at = datetime('now'),\n app_tag = ?,\n meta = ?,\n invariants = ?\n WHERE space = ?`,\n params: [\n input.storageHash,\n input.profileHash,\n jsonParam(input.contractJson),\n input.canonicalVersion ?? null,\n input.appTag ?? null,\n jsonParam(input.meta ?? {}),\n jsonParam(input.invariants),\n input.space,\n ],\n },\n };\n}\n\nexport interface LedgerInsertInput {\n readonly originStorageHash?: string | null;\n readonly originProfileHash?: string | null;\n readonly destinationStorageHash: string;\n readonly destinationProfileHash?: string | null;\n readonly contractJsonBefore?: unknown;\n readonly contractJsonAfter?: unknown;\n readonly operations: unknown;\n}\n\nexport function buildLedgerInsertStatement(input: LedgerInsertInput): SqlStatement {\n return {\n sql: `INSERT INTO _prisma_ledger (\n origin_core_hash,\n origin_profile_hash,\n destination_core_hash,\n destination_profile_hash,\n contract_json_before,\n contract_json_after,\n operations\n ) VALUES (\n ?,\n ?,\n ?,\n ?,\n ?,\n ?,\n ?\n )`,\n params: [\n input.originStorageHash ?? null,\n input.originProfileHash ?? null,\n input.destinationStorageHash,\n input.destinationProfileHash ?? null,\n jsonParam(input.contractJsonBefore),\n jsonParam(input.contractJsonAfter),\n jsonParam(input.operations),\n ],\n };\n}\n\nfunction jsonParam(value: unknown): string {\n return JSON.stringify(value ?? null);\n}\n"],"mappings":";;;AASA,MAAa,oBAAoB;AACjC,MAAa,oBAAoB;;;;;AAMjC,MAAaA,sBAA2C,IAAI,IAAI,CAC9D,mBACA,kBACD,CAAC;;;;;;;;;;AAWF,MAAaC,6BAA2C;CACtD,KAAK;+CACwC,aAAa;;;;;;;;;;CAU1D,QAAQ,EAAE;CACX;AAED,MAAaC,6BAA2C;CACtD,KAAK;;;;;;;;;;;CAWL,QAAQ,EAAE;CACX;AAED,SAAgB,oBAAoB,OAA6B;AAC/D,QAAO;EACL,KAAK;;;;;;;;;;;EAWL,QAAQ,CAAC,MAAM;EAChB;;AA6BH,SAAgB,2BAA2B,OAGzC;AAYA,QAAO;EACL,QAAQ;GACN,KAAK;;;;;;;;;;;;;;;;;;;;;GAqBL,QAlC+B;IACjC,MAAM;IACN,MAAM;IACN,MAAM;IACN,UAAU,MAAM,aAAa;IAC7B,MAAM,oBAAoB;IAC1B,MAAM,UAAU;IAChB,UAAU,MAAM,QAAQ,EAAE,CAAC;IAC3B,UAAU,MAAM,WAAW;IAC5B;GA0BE;EACD,QAAQ;GACN,KAAK;;;;;;;;;;GAUL,QAAQ;IACN,MAAM;IACN,MAAM;IACN,UAAU,MAAM,aAAa;IAC7B,MAAM,oBAAoB;IAC1B,MAAM,UAAU;IAChB,UAAU,MAAM,QAAQ,EAAE,CAAC;IAC3B,UAAU,MAAM,WAAW;IAC3B,MAAM;IACP;GACF;EACF;;AAaH,SAAgB,2BAA2B,OAAwC;AACjF,QAAO;EACL,KAAK;;;;;;;;;;;;;;;;;EAiBL,QAAQ;GACN,MAAM,qBAAqB;GAC3B,MAAM,qBAAqB;GAC3B,MAAM;GACN,MAAM,0BAA0B;GAChC,UAAU,MAAM,mBAAmB;GACnC,UAAU,MAAM,kBAAkB;GAClC,UAAU,MAAM,WAAW;GAC5B;EACF;;AAGH,SAAS,UAAU,OAAwB;AACzC,QAAO,KAAK,UAAU,SAAS,KAAK"}
1
+ {"version":3,"file":"statement-builders-DMT4ltXR.mjs","names":[],"sources":["../src/core/migrations/statement-builders.ts"],"sourcesContent":["import { APP_SPACE_ID } from '@prisma-next/framework-components/control';\n\nexport { APP_SPACE_ID };\n\nexport interface SqlStatement {\n readonly sql: string;\n readonly params: readonly unknown[];\n}\n\nexport const MARKER_TABLE_NAME = '_prisma_marker';\nexport const LEDGER_TABLE_NAME = '_prisma_ledger';\n\n/**\n * Control tables the runner creates/manages. The planner must not drop these\n * when reconciling \"extra\" tables against the contract.\n */\nexport const CONTROL_TABLE_NAMES: ReadonlySet<string> = new Set([\n MARKER_TABLE_NAME,\n LEDGER_TABLE_NAME,\n]);\n\n/**\n * Schema for `_prisma_marker`. The `space TEXT PRIMARY KEY` shape\n * supports one row per loaded contract space (`'app'`,\n * `'<extension-id>'`, …); brand-new databases create this shape\n * directly. The migration runner detects pre-1.0 single-row markers\n * (no `space` column) at boot and fails with a structured\n * `LEGACY_MARKER_SHAPE` error rather than auto-rebuilding the table —\n * see `specs/framework-mechanism.spec.md § 2`.\n */\nexport const ensureMarkerTableStatement: SqlStatement = {\n sql: `CREATE TABLE IF NOT EXISTS _prisma_marker (\n space TEXT NOT NULL PRIMARY KEY DEFAULT '${APP_SPACE_ID}',\n core_hash TEXT NOT NULL,\n profile_hash TEXT NOT NULL,\n contract_json TEXT,\n canonical_version INTEGER,\n updated_at TEXT NOT NULL DEFAULT (datetime('now')),\n app_tag TEXT,\n meta TEXT NOT NULL DEFAULT '{}',\n invariants TEXT NOT NULL DEFAULT '[]'\n )`,\n params: [],\n};\n\nexport const ensureLedgerTableStatement: SqlStatement = {\n sql: `CREATE TABLE IF NOT EXISTS _prisma_ledger (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n created_at TEXT NOT NULL DEFAULT (datetime('now')),\n origin_core_hash TEXT,\n origin_profile_hash TEXT,\n destination_core_hash TEXT NOT NULL,\n destination_profile_hash TEXT,\n contract_json_before TEXT,\n contract_json_after TEXT,\n operations TEXT NOT NULL\n )`,\n params: [],\n};\n\nexport function readMarkerStatement(space: string): SqlStatement {\n return {\n sql: `SELECT\n core_hash,\n profile_hash,\n contract_json,\n canonical_version,\n updated_at,\n app_tag,\n meta,\n invariants\n FROM _prisma_marker\n WHERE space = ?`,\n params: [space],\n };\n}\n\nexport interface WriteMarkerInput {\n /**\n * Logical space identifier for this marker row. Required at every\n * call site so the type system surfaces every place that needs to\n * thread the value (rather than letting an `?? APP_SPACE_ID`\n * fall-through silently collapse multi-space markers onto the\n * `'app'` row). App-plan callers pass {@link APP_SPACE_ID}\n * (`'app'`); per-extension callers pass the extension's space id.\n */\n readonly space: string;\n readonly storageHash: string;\n readonly profileHash: string;\n readonly contractJson?: unknown;\n readonly canonicalVersion?: number | null;\n readonly appTag?: string | null;\n readonly meta?: Record<string, unknown>;\n /**\n * Invariants to write into `marker.invariants`. Stored as a JSON-encoded\n * TEXT array — SQLite has no native array type. The runner is responsible\n * for merging with the existing column (no SQL-side merge here, unlike\n * Postgres) before passing them in: BEGIN EXCLUSIVE on the migration\n * transaction makes the read-then-merge-then-write sequence safe.\n */\n readonly invariants: readonly string[];\n}\n\nexport function buildWriteMarkerStatements(input: WriteMarkerInput): {\n readonly insert: SqlStatement;\n readonly update: SqlStatement;\n} {\n const params: readonly unknown[] = [\n input.space,\n input.storageHash,\n input.profileHash,\n jsonParam(input.contractJson),\n input.canonicalVersion ?? null,\n input.appTag ?? null,\n jsonParam(input.meta ?? {}),\n jsonParam(input.invariants),\n ];\n\n return {\n insert: {\n sql: `INSERT INTO _prisma_marker (\n space,\n core_hash,\n profile_hash,\n contract_json,\n canonical_version,\n updated_at,\n app_tag,\n meta,\n invariants\n ) VALUES (\n ?,\n ?,\n ?,\n ?,\n ?,\n datetime('now'),\n ?,\n ?,\n ?\n )`,\n params,\n },\n update: {\n sql: `UPDATE _prisma_marker SET\n core_hash = ?,\n profile_hash = ?,\n contract_json = ?,\n canonical_version = ?,\n updated_at = datetime('now'),\n app_tag = ?,\n meta = ?,\n invariants = ?\n WHERE space = ?`,\n params: [\n input.storageHash,\n input.profileHash,\n jsonParam(input.contractJson),\n input.canonicalVersion ?? null,\n input.appTag ?? null,\n jsonParam(input.meta ?? {}),\n jsonParam(input.invariants),\n input.space,\n ],\n },\n };\n}\n\nexport interface LedgerInsertInput {\n readonly originStorageHash?: string | null;\n readonly originProfileHash?: string | null;\n readonly destinationStorageHash: string;\n readonly destinationProfileHash?: string | null;\n readonly contractJsonBefore?: unknown;\n readonly contractJsonAfter?: unknown;\n readonly operations: unknown;\n}\n\nexport function buildLedgerInsertStatement(input: LedgerInsertInput): SqlStatement {\n return {\n sql: `INSERT INTO _prisma_ledger (\n origin_core_hash,\n origin_profile_hash,\n destination_core_hash,\n destination_profile_hash,\n contract_json_before,\n contract_json_after,\n operations\n ) VALUES (\n ?,\n ?,\n ?,\n ?,\n ?,\n ?,\n ?\n )`,\n params: [\n input.originStorageHash ?? null,\n input.originProfileHash ?? null,\n input.destinationStorageHash,\n input.destinationProfileHash ?? null,\n jsonParam(input.contractJsonBefore),\n jsonParam(input.contractJsonAfter),\n jsonParam(input.operations),\n ],\n };\n}\n\nfunction jsonParam(value: unknown): string {\n return JSON.stringify(value ?? null);\n}\n"],"mappings":";;AASA,MAAa,oBAAoB;AACjC,MAAa,oBAAoB;;;;;AAMjC,MAAa,sBAA2C,IAAI,IAAI,CAC9D,mBACA,kBACD,CAAC;;;;;;;;;;AAWF,MAAa,6BAA2C;CACtD,KAAK;+CACwC,aAAa;;;;;;;;;;CAU1D,QAAQ,EAAE;CACX;AAED,MAAa,6BAA2C;CACtD,KAAK;;;;;;;;;;;CAWL,QAAQ,EAAE;CACX;AAED,SAAgB,oBAAoB,OAA6B;CAC/D,OAAO;EACL,KAAK;;;;;;;;;;;EAWL,QAAQ,CAAC,MAAM;EAChB;;AA6BH,SAAgB,2BAA2B,OAGzC;CAYA,OAAO;EACL,QAAQ;GACN,KAAK;;;;;;;;;;;;;;;;;;;;;GAqBL,QAAA;IAjCF,MAAM;IACN,MAAM;IACN,MAAM;IACN,UAAU,MAAM,aAAa;IAC7B,MAAM,oBAAoB;IAC1B,MAAM,UAAU;IAChB,UAAU,MAAM,QAAQ,EAAE,CAAC;IAC3B,UAAU,MAAM,WAAW;IA0BnB;GACP;EACD,QAAQ;GACN,KAAK;;;;;;;;;;GAUL,QAAQ;IACN,MAAM;IACN,MAAM;IACN,UAAU,MAAM,aAAa;IAC7B,MAAM,oBAAoB;IAC1B,MAAM,UAAU;IAChB,UAAU,MAAM,QAAQ,EAAE,CAAC;IAC3B,UAAU,MAAM,WAAW;IAC3B,MAAM;IACP;GACF;EACF;;AAaH,SAAgB,2BAA2B,OAAwC;CACjF,OAAO;EACL,KAAK;;;;;;;;;;;;;;;;;EAiBL,QAAQ;GACN,MAAM,qBAAqB;GAC3B,MAAM,qBAAqB;GAC3B,MAAM;GACN,MAAM,0BAA0B;GAChC,UAAU,MAAM,mBAAmB;GACnC,UAAU,MAAM,kBAAkB;GAClC,UAAU,MAAM,WAAW;GAC5B;EACF;;AAGH,SAAS,UAAU,OAAwB;CACzC,OAAO,KAAK,UAAU,SAAS,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"statement-builders.d.mts","names":[],"sources":["../src/core/migrations/statement-builders.ts"],"sourcesContent":[],"mappings":";;;UAIiB,YAAA;EAAA,SAAA,GAAA,EAAA,MAAY;EAKhB,SAAA,MAAA,EAAA,SAAiB,OAAA,EAAA;AAC9B;AAMa,cAPA,iBAAA,GAOqB,gBAAW;AAchC,cApBA,iBAAA,GAiCZ,gBAbwC;AAezC;AAeA;AAiBA;AA0BA;AAAkD,cAvFrC,mBAuFqC,EAvFhB,WAuFgB,CAAA,MAAA,CAAA;;;;AAiElD;AAUA;;;;;cApJa,4BAA4B;cAe5B,4BAA4B;iBAezB,mBAAA,iBAAoC;UAiBnC,gBAAA;;;;;;;;;;;;;;;kBAeC;;;;;;;;;;iBAWF,0BAAA,QAAkC;mBAC/B;mBACA;;UA+DF,iBAAA;;;;;;;;;iBAUD,0BAAA,QAAkC,oBAAoB"}
1
+ {"version":3,"file":"statement-builders.d.mts","names":[],"sources":["../src/core/migrations/statement-builders.ts"],"mappings":";;;UAIiB,YAAA;EAAA,SACN,GAAA;EAAA,SACA,MAAA;AAAA;AAAA,cAGE,iBAAA;AAAA,cACA,iBAAA;AADb;;;;AAAA,cAOa,mBAAA,EAAqB,WAAA;AANlC;;;;;AAMA;;;;AANA,cAoBa,0BAAA,EAA4B,YAAA;AAAA,cAe5B,0BAAA,EAA4B,YAAA;AAAA,iBAezB,mBAAA,CAAoB,KAAA,WAAgB,YAAA;AAAA,UAiBnC,gBAAA;EA/CwB;;AAezC;;;;;AAeA;EA9ByC,SAwD9B,KAAA;EAAA,SACA,WAAA;EAAA,SACA,WAAA;EAAA,SACA,YAAA;EAAA,SACA,gBAAA;EAAA,SACA,MAAA;EAAA,SACA,IAAA,GAAO,MAAA;EAAM;;;;;;;EAAA,SAQb,UAAA;AAAA;AAAA,iBAGK,0BAAA,CAA2B,KAAA,EAAO,gBAAA;EAAA,SACvC,MAAA,EAAQ,YAAA;EAAA,SACR,MAAA,EAAQ,YAAA;AAAA;AAAA,UA+DF,iBAAA;EAAA,SACN,iBAAA;EAAA,SACA,iBAAA;EAAA,SACA,sBAAA;EAAA,SACA,sBAAA;EAAA,SACA,kBAAA;EAAA,SACA,iBAAA;EAAA,SACA,UAAA;AAAA;AAAA,iBAGK,0BAAA,CAA2B,KAAA,EAAO,iBAAA,GAAoB,YAAA"}
@@ -1,3 +1,2 @@
1
- import { a as buildLedgerInsertStatement, c as ensureMarkerTableStatement, i as MARKER_TABLE_NAME, l as readMarkerStatement, n as CONTROL_TABLE_NAMES, o as buildWriteMarkerStatements, r as LEDGER_TABLE_NAME, s as ensureLedgerTableStatement, t as APP_SPACE_ID } from "./statement-builders-DobaAWnW.mjs";
2
-
3
- export { APP_SPACE_ID, CONTROL_TABLE_NAMES, LEDGER_TABLE_NAME, MARKER_TABLE_NAME, buildLedgerInsertStatement, buildWriteMarkerStatements, ensureLedgerTableStatement, ensureMarkerTableStatement, readMarkerStatement };
1
+ import { a as buildLedgerInsertStatement, c as ensureMarkerTableStatement, i as MARKER_TABLE_NAME, l as readMarkerStatement, n as CONTROL_TABLE_NAMES, o as buildWriteMarkerStatements, r as LEDGER_TABLE_NAME, s as ensureLedgerTableStatement, t as APP_SPACE_ID } from "./statement-builders-DMT4ltXR.mjs";
2
+ export { APP_SPACE_ID, CONTROL_TABLE_NAMES, LEDGER_TABLE_NAME, MARKER_TABLE_NAME, buildLedgerInsertStatement, buildWriteMarkerStatements, ensureLedgerTableStatement, ensureMarkerTableStatement, readMarkerStatement };
@@ -1,7 +1,6 @@
1
- import { n as stripOuterParens } from "./default-normalizer-R-sQXAYt.mjs";
2
- import { n as escapeLiteral, r as quoteIdentifier } from "./sql-utils-D3SMPFDD.mjs";
3
- import { t as buildTargetDetails } from "./planner-target-details-BQIWQlBu.mjs";
4
-
1
+ import { n as stripOuterParens } from "./default-normalizer-3Fccw7yw.mjs";
2
+ import { n as escapeLiteral, r as quoteIdentifier } from "./sql-utils-DhevMgef.mjs";
3
+ import { t as buildTargetDetails } from "./planner-target-details-Bm71XPKb.mjs";
5
4
  //#region src/core/migrations/operations/shared.ts
6
5
  function step(description, sql) {
7
6
  return {
@@ -44,7 +43,6 @@ function renderForeignKeyClause(fk) {
44
43
  if (fk.onUpdate !== void 0) sql += ` ON UPDATE ${REFERENTIAL_ACTION_SQL[fk.onUpdate]}`;
45
44
  return sql;
46
45
  }
47
-
48
46
  //#endregion
49
47
  //#region src/core/migrations/operations/columns.ts
50
48
  function addColumn(tableName, column) {
@@ -83,7 +81,6 @@ function dropColumn(tableName, columnName) {
83
81
  postcheck: [step(`verify column "${columnName}" is gone from "${tableName}"`, `SELECT COUNT(*) = 0 FROM pragma_table_info('${escapeLiteral(tableName)}') WHERE name = '${escapeLiteral(columnName)}'`)]
84
82
  };
85
83
  }
86
-
87
84
  //#endregion
88
85
  //#region src/core/migrations/planner-ddl-builders.ts
89
86
  const SAFE_NATIVE_TYPE_PATTERN = /^[a-zA-Z][a-zA-Z0-9_ ]*$/;
@@ -157,7 +154,6 @@ function resolveColumnTypeMetadata(column, storageTypes) {
157
154
  typeParams: referencedType.typeParams
158
155
  };
159
156
  }
160
-
161
157
  //#endregion
162
158
  //#region src/core/migrations/operations/indexes.ts
163
159
  function createIndex(tableName, indexName, columns) {
@@ -190,7 +186,6 @@ function dropIndex(tableName, indexName) {
190
186
  postcheck: [step(`verify index "${indexName}" is gone`, `SELECT COUNT(*) = 0 FROM sqlite_master WHERE type = 'index' AND name = '${escapeLiteral(indexName)}'`)]
191
187
  };
192
188
  }
193
-
194
189
  //#endregion
195
190
  //#region src/core/migrations/operations/tables.ts
196
191
  /**
@@ -402,7 +397,7 @@ function buildRecreatePostchecks(tableName, issues, spec) {
402
397
  }
403
398
  return checks;
404
399
  }
405
-
406
400
  //#endregion
407
401
  export { recreateTable as a, buildColumnDefaultSql as c, renderDefaultLiteral as d, addColumn as f, dropTable as i, buildColumnTypeSql as l, step as m, buildRecreateSummary as n, createIndex as o, dropColumn as p, createTable as r, dropIndex as s, buildRecreatePostchecks as t, isInlineAutoincrementPrimaryKey as u };
408
- //# sourceMappingURL=tables-sKIg_lWE.mjs.map
402
+
403
+ //# sourceMappingURL=tables-D84zfPZI.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tables-D84zfPZI.mjs","names":[],"sources":["../src/core/migrations/operations/shared.ts","../src/core/migrations/operations/columns.ts","../src/core/migrations/planner-ddl-builders.ts","../src/core/migrations/operations/indexes.ts","../src/core/migrations/operations/tables.ts"],"sourcesContent":["import type { SqlMigrationPlanOperation } from '@prisma-next/family-sql/control';\nimport type { ReferentialAction } from '@prisma-next/sql-contract/types';\nimport { quoteIdentifier } from '../../sql-utils';\nimport type { SqlitePlanTargetDetails } from '../planner-target-details';\n\nexport type Op = SqlMigrationPlanOperation<SqlitePlanTargetDetails>;\n\nexport function step(description: string, sql: string): { description: string; sql: string } {\n return { description, sql };\n}\n\n/**\n * Flat, fully-resolved column shape consumed by `createTable`, `addColumn`,\n * and `recreateTable`. Codec / `typeRef` / default expansion happens at the\n * call-construction site (in the issue-planner / strategies) so the\n * operation factories deal only in pre-rendered SQL fragments — mirrors the\n * Postgres `ColumnSpec` pattern.\n *\n * - `typeSql` is the column's DDL type token (e.g. `\"INTEGER\"`, `\"TEXT\"`).\n * - `defaultSql` is the full `DEFAULT …` clause (or empty when there is no\n * default and when the column is rendered as `INTEGER PRIMARY KEY\n * AUTOINCREMENT`, since SQLite forbids a default on an autoincrement PK).\n * - `inlineAutoincrementPrimaryKey` directs the renderer to emit\n * `INTEGER PRIMARY KEY AUTOINCREMENT` inline and to skip the table-level\n * primary-key constraint for this column. SQLite-specific: the column\n * becomes an alias for `rowid` only when this exact form is used.\n */\nexport interface SqliteColumnSpec {\n readonly name: string;\n readonly typeSql: string;\n readonly defaultSql: string;\n readonly nullable: boolean;\n readonly inlineAutoincrementPrimaryKey?: boolean;\n}\n\nexport interface SqlitePrimaryKeySpec {\n readonly columns: readonly string[];\n}\n\nexport interface SqliteUniqueSpec {\n readonly columns: readonly string[];\n readonly name?: string;\n}\n\nexport interface SqliteForeignKeySpec {\n readonly columns: readonly string[];\n readonly references: {\n readonly table: string;\n readonly columns: readonly string[];\n };\n readonly name?: string;\n readonly onDelete?: ReferentialAction;\n readonly onUpdate?: ReferentialAction;\n readonly constraint: boolean;\n}\n\n/**\n * Flat shape of a contract table for DDL emission. Used by both\n * `createTable` (additive) and `recreateTable` (widening/destructive).\n */\nexport interface SqliteTableSpec {\n readonly columns: readonly SqliteColumnSpec[];\n readonly primaryKey?: SqlitePrimaryKeySpec;\n readonly uniques?: readonly SqliteUniqueSpec[];\n readonly foreignKeys?: readonly SqliteForeignKeySpec[];\n}\n\n/**\n * Index recreation spec for `recreateTable`. Both declared indexes and\n * FK-backing indexes flatten to the same shape; the planner dedupes by\n * column-set before constructing the call.\n */\nexport interface SqliteIndexSpec {\n readonly name: string;\n readonly columns: readonly string[];\n}\n\nconst REFERENTIAL_ACTION_SQL: Record<ReferentialAction, string> = {\n noAction: 'NO ACTION',\n restrict: 'RESTRICT',\n cascade: 'CASCADE',\n setNull: 'SET NULL',\n setDefault: 'SET DEFAULT',\n};\n\n/**\n * Renders a single column's inline DDL fragment within a `CREATE TABLE`\n * statement. Honours the `inlineAutoincrementPrimaryKey` flag — SQLite\n * treats `INTEGER PRIMARY KEY AUTOINCREMENT` as a special form that aliases\n * `rowid`, and the column must not carry a `DEFAULT` or repeat `NOT NULL`.\n */\nexport function renderColumnDefinition(column: SqliteColumnSpec): string {\n const parts: string[] = [quoteIdentifier(column.name), column.typeSql];\n if (column.inlineAutoincrementPrimaryKey) {\n parts.push('PRIMARY KEY AUTOINCREMENT');\n } else {\n if (column.defaultSql) parts.push(column.defaultSql);\n if (!column.nullable) parts.push('NOT NULL');\n }\n return parts.join(' ');\n}\n\n/**\n * Renders an inline FOREIGN KEY constraint clause for a `CREATE TABLE`\n * body. Returns the empty string when `constraint` is false (the FK is\n * tracked at the contract level for index-creation purposes only and must\n * not produce DDL).\n */\nexport function renderForeignKeyClause(fk: SqliteForeignKeySpec): string {\n if (!fk.constraint) return '';\n const name = fk.name ? `CONSTRAINT ${quoteIdentifier(fk.name)} ` : '';\n let sql = `${name}FOREIGN KEY (${fk.columns.map(quoteIdentifier).join(', ')}) REFERENCES ${quoteIdentifier(fk.references.table)} (${fk.references.columns.map(quoteIdentifier).join(', ')})`;\n if (fk.onDelete !== undefined) {\n sql += ` ON DELETE ${REFERENTIAL_ACTION_SQL[fk.onDelete]}`;\n }\n if (fk.onUpdate !== undefined) {\n sql += ` ON UPDATE ${REFERENTIAL_ACTION_SQL[fk.onUpdate]}`;\n }\n return sql;\n}\n","import { escapeLiteral, quoteIdentifier } from '../../sql-utils';\nimport { buildTargetDetails } from '../planner-target-details';\nimport { type Op, type SqliteColumnSpec, step } from './shared';\n\nexport function addColumn(tableName: string, column: SqliteColumnSpec): Op {\n const parts = [\n `ALTER TABLE ${quoteIdentifier(tableName)}`,\n `ADD COLUMN ${quoteIdentifier(column.name)} ${column.typeSql}`,\n column.defaultSql,\n column.nullable ? '' : 'NOT NULL',\n ].filter(Boolean);\n const addSql = parts.join(' ');\n\n return {\n id: `column.${tableName}.${column.name}`,\n label: `Add column ${column.name} on ${tableName}`,\n summary: `Adds column ${column.name} on ${tableName}`,\n operationClass: 'additive',\n target: { id: 'sqlite', details: buildTargetDetails('column', column.name, tableName) },\n precheck: [\n step(\n `ensure column \"${column.name}\" is missing`,\n `SELECT COUNT(*) = 0 FROM pragma_table_info('${escapeLiteral(tableName)}') WHERE name = '${escapeLiteral(column.name)}'`,\n ),\n ],\n execute: [step(`add column \"${column.name}\"`, addSql)],\n postcheck: [\n step(\n `verify column \"${column.name}\" exists`,\n `SELECT COUNT(*) > 0 FROM pragma_table_info('${escapeLiteral(tableName)}') WHERE name = '${escapeLiteral(column.name)}'`,\n ),\n ],\n };\n}\n\nexport function dropColumn(tableName: string, columnName: string): Op {\n return {\n id: `dropColumn.${tableName}.${columnName}`,\n label: `Drop column ${columnName} on ${tableName}`,\n summary: `Drops column ${columnName} on ${tableName} which is not in the contract`,\n operationClass: 'destructive',\n target: { id: 'sqlite', details: buildTargetDetails('column', columnName, tableName) },\n precheck: [\n step(\n `ensure column \"${columnName}\" exists on \"${tableName}\"`,\n `SELECT COUNT(*) > 0 FROM pragma_table_info('${escapeLiteral(tableName)}') WHERE name = '${escapeLiteral(columnName)}'`,\n ),\n ],\n execute: [\n step(\n `drop column \"${columnName}\" from \"${tableName}\"`,\n `ALTER TABLE ${quoteIdentifier(tableName)} DROP COLUMN ${quoteIdentifier(columnName)}`,\n ),\n ],\n postcheck: [\n step(\n `verify column \"${columnName}\" is gone from \"${tableName}\"`,\n `SELECT COUNT(*) = 0 FROM pragma_table_info('${escapeLiteral(tableName)}') WHERE name = '${escapeLiteral(columnName)}'`,\n ),\n ],\n };\n}\n","/**\n * Low-level DDL fragment builders for SQLite migrations.\n *\n * These helpers consume `StorageColumn` (the contract shape, possibly with\n * `typeRef`) and produce string fragments. They are called once per column\n * at the call-construction boundary in `issue-planner.ts` / strategies to\n * build flat `SqliteColumnSpec`s; the operation factories themselves never\n * see `StorageColumn` or `storageTypes`.\n */\n\nimport type {\n StorageColumn,\n StorageTable,\n StorageTypeInstance,\n} from '@prisma-next/sql-contract/types';\nimport { escapeLiteral, quoteIdentifier } from '../sql-utils';\n\ntype SqliteColumnDefault = StorageColumn['default'];\n\nconst SAFE_NATIVE_TYPE_PATTERN = /^[a-zA-Z][a-zA-Z0-9_ ]*$/;\n\nfunction assertSafeNativeType(nativeType: string): void {\n if (!SAFE_NATIVE_TYPE_PATTERN.test(nativeType)) {\n throw new Error(\n `Unsafe native type name in contract: \"${nativeType}\". ` +\n 'Native type names must match /^[a-zA-Z][a-zA-Z0-9_ ]*$/',\n );\n }\n}\n\nfunction assertSafeDefaultExpression(expression: string): void {\n if (expression.includes(';') || /--|\\/\\*|\\bSELECT\\b/i.test(expression)) {\n throw new Error(\n `Unsafe default expression in contract: \"${expression}\". ` +\n 'Default expressions must not contain semicolons, SQL comment tokens, or subqueries.',\n );\n }\n}\n\n/**\n * Renders the column's DDL type token (e.g. `\"INTEGER\"`, `\"TEXT\"`).\n * Resolves `typeRef` against `storageTypes` and validates the resulting\n * native type against a safe-identifier pattern.\n */\nexport function buildColumnTypeSql(\n column: StorageColumn,\n storageTypes: Record<string, StorageTypeInstance> = {},\n): string {\n const resolved = resolveColumnTypeMetadata(column, storageTypes);\n assertSafeNativeType(resolved.nativeType);\n return resolved.nativeType.toUpperCase();\n}\n\n/**\n * Renders the column's `DEFAULT …` clause. Returns the empty string when\n * there is no default, and also when the default is `autoincrement()` —\n * SQLite encodes that as `INTEGER PRIMARY KEY AUTOINCREMENT` inline on the\n * column definition, not as a separate DEFAULT.\n */\nexport function buildColumnDefaultSql(columnDefault: SqliteColumnDefault | undefined): string {\n if (!columnDefault) return '';\n\n switch (columnDefault.kind) {\n case 'literal':\n return `DEFAULT ${renderDefaultLiteral(columnDefault.value)}`;\n case 'function': {\n if (columnDefault.expression === 'autoincrement()') return '';\n if (columnDefault.expression === 'now()') return \"DEFAULT (datetime('now'))\";\n assertSafeDefaultExpression(columnDefault.expression);\n return `DEFAULT (${columnDefault.expression})`;\n }\n }\n}\n\nexport function renderDefaultLiteral(value: unknown): string {\n if (value instanceof Date) {\n return `'${escapeLiteral(value.toISOString())}'`;\n }\n if (typeof value === 'string') {\n return `'${escapeLiteral(value)}'`;\n }\n if (typeof value === 'number' || typeof value === 'bigint') {\n return String(value);\n }\n if (typeof value === 'boolean') {\n return value ? '1' : '0';\n }\n if (value === null) {\n return 'NULL';\n }\n return `'${escapeLiteral(JSON.stringify(value))}'`;\n}\n\nexport function buildCreateIndexSql(\n tableName: string,\n indexName: string,\n columns: readonly string[],\n unique = false,\n): string {\n const uniqueKeyword = unique ? 'UNIQUE ' : '';\n return `CREATE ${uniqueKeyword}INDEX ${quoteIdentifier(indexName)} ON ${quoteIdentifier(tableName)} (${columns.map(quoteIdentifier).join(', ')})`;\n}\n\nexport function buildDropIndexSql(indexName: string): string {\n return `DROP INDEX IF EXISTS ${quoteIdentifier(indexName)}`;\n}\n\n/**\n * True when the column is rendered inline as `INTEGER PRIMARY KEY\n * AUTOINCREMENT`. Requires the column's default to be `autoincrement()` and\n * the column to be the sole member of the table's primary key — anything\n * else falls back to a separate PRIMARY KEY constraint with a default\n * AUTOINCREMENT semantics expressed elsewhere.\n */\nexport function isInlineAutoincrementPrimaryKey(table: StorageTable, columnName: string): boolean {\n if (table.primaryKey?.columns.length !== 1) return false;\n if (table.primaryKey.columns[0] !== columnName) return false;\n const column = table.columns[columnName];\n return column?.default?.kind === 'function' && column.default.expression === 'autoincrement()';\n}\n\ntype ResolvedColumnTypeMetadata = Pick<StorageColumn, 'nativeType' | 'codecId' | 'typeParams'>;\n\nfunction resolveColumnTypeMetadata(\n column: StorageColumn,\n storageTypes: Record<string, StorageTypeInstance>,\n): ResolvedColumnTypeMetadata {\n if (!column.typeRef) {\n return column;\n }\n const referencedType = storageTypes[column.typeRef];\n if (!referencedType) {\n throw new Error(\n `Storage type \"${column.typeRef}\" referenced by column is not defined in storage.types.`,\n );\n }\n return {\n codecId: referencedType.codecId,\n nativeType: referencedType.nativeType,\n typeParams: referencedType.typeParams,\n };\n}\n","import { escapeLiteral } from '../../sql-utils';\nimport { buildCreateIndexSql, buildDropIndexSql } from '../planner-ddl-builders';\nimport { buildTargetDetails } from '../planner-target-details';\nimport { type Op, step } from './shared';\n\nexport function createIndex(tableName: string, indexName: string, columns: readonly string[]): Op {\n return {\n id: `index.${tableName}.${indexName}`,\n label: `Create index ${indexName} on ${tableName}`,\n summary: `Creates index ${indexName} on ${tableName}`,\n operationClass: 'additive',\n target: { id: 'sqlite', details: buildTargetDetails('index', indexName, tableName) },\n precheck: [\n step(\n `ensure index \"${indexName}\" is missing`,\n `SELECT COUNT(*) = 0 FROM sqlite_master WHERE type = 'index' AND name = '${escapeLiteral(indexName)}'`,\n ),\n ],\n execute: [\n step(`create index \"${indexName}\"`, buildCreateIndexSql(tableName, indexName, columns)),\n ],\n postcheck: [\n step(\n `verify index \"${indexName}\" exists`,\n `SELECT COUNT(*) > 0 FROM sqlite_master WHERE type = 'index' AND name = '${escapeLiteral(indexName)}'`,\n ),\n ],\n };\n}\n\nexport function dropIndex(tableName: string, indexName: string): Op {\n return {\n id: `dropIndex.${tableName}.${indexName}`,\n label: `Drop index ${indexName} on ${tableName}`,\n summary: `Drops index ${indexName} on ${tableName} which is not in the contract`,\n operationClass: 'destructive',\n target: { id: 'sqlite', details: buildTargetDetails('index', indexName, tableName) },\n precheck: [\n step(\n `ensure index \"${indexName}\" exists`,\n `SELECT COUNT(*) > 0 FROM sqlite_master WHERE type = 'index' AND name = '${escapeLiteral(indexName)}'`,\n ),\n ],\n execute: [step(`drop index \"${indexName}\"`, buildDropIndexSql(indexName))],\n postcheck: [\n step(\n `verify index \"${indexName}\" is gone`,\n `SELECT COUNT(*) = 0 FROM sqlite_master WHERE type = 'index' AND name = '${escapeLiteral(indexName)}'`,\n ),\n ],\n };\n}\n","import type { MigrationOperationClass } from '@prisma-next/family-sql/control';\nimport type { SchemaIssue } from '@prisma-next/framework-components/control';\nimport { stripOuterParens } from '../../default-normalizer';\nimport { escapeLiteral, quoteIdentifier } from '../../sql-utils';\nimport { buildCreateIndexSql } from '../planner-ddl-builders';\nimport { buildTargetDetails } from '../planner-target-details';\nimport {\n type Op,\n renderColumnDefinition,\n renderForeignKeyClause,\n type SqliteIndexSpec,\n type SqliteTableSpec,\n step,\n} from './shared';\n\n/**\n * Renders the body of a `CREATE TABLE <name> ( … )` statement from a flat\n * `SqliteTableSpec`. SQLite's `INTEGER PRIMARY KEY AUTOINCREMENT` form is\n * inline on the column; the table-level PRIMARY KEY clause is emitted only\n * when no column carries `inlineAutoincrementPrimaryKey`.\n */\nfunction renderCreateTableSql(tableName: string, spec: SqliteTableSpec): string {\n const columnDefs = spec.columns.map(renderColumnDefinition);\n\n const constraintDefs: string[] = [];\n const hasInlinePk = spec.columns.some((c) => c.inlineAutoincrementPrimaryKey);\n if (spec.primaryKey && !hasInlinePk) {\n constraintDefs.push(`PRIMARY KEY (${spec.primaryKey.columns.map(quoteIdentifier).join(', ')})`);\n }\n\n for (const u of spec.uniques ?? []) {\n const name = u.name ? `CONSTRAINT ${quoteIdentifier(u.name)} ` : '';\n constraintDefs.push(`${name}UNIQUE (${u.columns.map(quoteIdentifier).join(', ')})`);\n }\n\n for (const fk of spec.foreignKeys ?? []) {\n const clause = renderForeignKeyClause(fk);\n if (clause) constraintDefs.push(clause);\n }\n\n const allDefs = [...columnDefs, ...constraintDefs];\n return `CREATE TABLE ${quoteIdentifier(tableName)} (\\n ${allDefs.join(',\\n ')}\\n)`;\n}\n\nexport function createTable(tableName: string, spec: SqliteTableSpec): Op {\n return {\n id: `table.${tableName}`,\n label: `Create table ${tableName}`,\n summary: `Creates table ${tableName} with required columns`,\n operationClass: 'additive',\n target: { id: 'sqlite', details: buildTargetDetails('table', tableName) },\n precheck: [\n step(\n `ensure table \"${tableName}\" does not exist`,\n `SELECT COUNT(*) = 0 FROM sqlite_master WHERE type = 'table' AND name = '${escapeLiteral(tableName)}'`,\n ),\n ],\n execute: [step(`create table \"${tableName}\"`, renderCreateTableSql(tableName, spec))],\n postcheck: [\n step(\n `verify table \"${tableName}\" exists`,\n `SELECT COUNT(*) > 0 FROM sqlite_master WHERE type = 'table' AND name = '${escapeLiteral(tableName)}'`,\n ),\n ],\n };\n}\n\nexport function dropTable(tableName: string): Op {\n return {\n id: `dropTable.${tableName}`,\n label: `Drop table ${tableName}`,\n summary: `Drops table ${tableName} which is not in the contract`,\n operationClass: 'destructive',\n target: { id: 'sqlite', details: buildTargetDetails('table', tableName) },\n precheck: [\n step(\n `ensure table \"${tableName}\" exists`,\n `SELECT COUNT(*) > 0 FROM sqlite_master WHERE type = 'table' AND name = '${escapeLiteral(tableName)}'`,\n ),\n ],\n execute: [step(`drop table \"${tableName}\"`, `DROP TABLE ${quoteIdentifier(tableName)}`)],\n postcheck: [\n step(\n `verify table \"${tableName}\" is gone`,\n `SELECT COUNT(*) = 0 FROM sqlite_master WHERE type = 'table' AND name = '${escapeLiteral(tableName)}'`,\n ),\n ],\n };\n}\n\nexport interface RecreateTableArgs {\n readonly tableName: string;\n /** New (post-recreate) shape of the table. Same flat spec as `createTable`. */\n readonly contractTable: SqliteTableSpec;\n /**\n * Names of columns that exist in the live (pre-recreate) schema. Used to\n * compute the `INSERT INTO temp ... SELECT ... FROM old` column list — only\n * shared columns are copied, so dropped columns are left behind and added\n * columns come from defaults.\n */\n readonly schemaColumnNames: readonly string[];\n /**\n * Indexes (declared + FK-backing, deduped by column-set) to recreate after\n * the table has been replaced. The planner pre-merges these.\n */\n readonly indexes: readonly SqliteIndexSpec[];\n /** Human-readable summary of the change, built by the planner from issues. */\n readonly summary: string;\n /**\n * Per-issue postcheck steps appended after the structural postchecks. The\n * planner pre-builds these via `buildRecreatePostchecks` so the call IR\n * carries flat, serializable data only — no `SchemaIssue` references.\n */\n readonly postchecks: readonly { readonly description: string; readonly sql: string }[];\n readonly operationClass: MigrationOperationClass;\n}\n\nexport function recreateTable(args: RecreateTableArgs): Op {\n const {\n tableName,\n contractTable,\n schemaColumnNames,\n indexes,\n summary,\n postchecks,\n operationClass,\n } = args;\n const tempName = `_prisma_new_${tableName}`;\n const liveSet = new Set(schemaColumnNames);\n const sharedColumns = contractTable.columns.filter((c) => liveSet.has(c.name)).map((c) => c.name);\n const columnList = sharedColumns.map(quoteIdentifier).join(', ');\n\n const indexStatements = indexes.map((idx) => ({\n description: `recreate index \"${idx.name}\" on \"${tableName}\"`,\n sql: buildCreateIndexSql(tableName, idx.name, idx.columns),\n }));\n\n // If the contract retains no columns from the live table, an `INSERT INTO\n // tmp () SELECT FROM old` is invalid SQL — and would also be a no-op since\n // there's nothing to copy. Skip the copy step in that case; the new\n // (empty) table replaces the old one directly.\n const copyStep =\n sharedColumns.length > 0\n ? [\n step(\n `copy data from \"${tableName}\" to \"${tempName}\"`,\n `INSERT INTO ${quoteIdentifier(tempName)} (${columnList}) SELECT ${columnList} FROM ${quoteIdentifier(tableName)}`,\n ),\n ]\n : [];\n\n return {\n id: `recreateTable.${tableName}`,\n label: `Recreate table ${tableName}`,\n summary,\n operationClass,\n target: { id: 'sqlite', details: buildTargetDetails('table', tableName) },\n precheck: [\n step(\n `ensure table \"${tableName}\" exists`,\n `SELECT COUNT(*) > 0 FROM sqlite_master WHERE type = 'table' AND name = '${escapeLiteral(tableName)}'`,\n ),\n step(\n `ensure temp table \"${tempName}\" does not exist`,\n `SELECT COUNT(*) = 0 FROM sqlite_master WHERE type = 'table' AND name = '${escapeLiteral(tempName)}'`,\n ),\n ],\n execute: [\n step(\n `create new table \"${tempName}\" with desired schema`,\n renderCreateTableSql(tempName, contractTable),\n ),\n ...copyStep,\n step(`drop old table \"${tableName}\"`, `DROP TABLE ${quoteIdentifier(tableName)}`),\n step(\n `rename \"${tempName}\" to \"${tableName}\"`,\n `ALTER TABLE ${quoteIdentifier(tempName)} RENAME TO ${quoteIdentifier(tableName)}`,\n ),\n ...indexStatements,\n ],\n postcheck: [\n step(\n `verify table \"${tableName}\" exists`,\n `SELECT COUNT(*) > 0 FROM sqlite_master WHERE type = 'table' AND name = '${escapeLiteral(tableName)}'`,\n ),\n step(\n `verify temp table \"${tempName}\" is gone`,\n `SELECT COUNT(*) = 0 FROM sqlite_master WHERE type = 'table' AND name = '${escapeLiteral(tempName)}'`,\n ),\n ...postchecks,\n ],\n };\n}\n\n/**\n * Build a one-line summary of a recreate-table operation from the schema\n * issues that triggered it. Lives next to `recreateTable` so the planner\n * (which has the issues) can produce the same description the factory\n * used to build inline. Keeping the formatting target-side keeps\n * `RecreateTableCall` issue-free at the IR layer.\n */\nexport function buildRecreateSummary(tableName: string, issues: readonly SchemaIssue[]): string {\n const messages = issues.map((i) => i.message).join('; ');\n return `Recreates table ${tableName} to apply schema changes: ${messages}`;\n}\n\nconst COLUMN_LEVEL_ISSUE_KINDS = new Set<SchemaIssue['kind']>([\n 'nullability_mismatch',\n 'default_mismatch',\n 'default_missing',\n 'extra_default',\n 'type_mismatch',\n]);\n\nconst PK_ISSUE_KINDS = new Set<SchemaIssue['kind']>(['primary_key_mismatch', 'extra_primary_key']);\n\nconst UNIQUE_ISSUE_KINDS = new Set<SchemaIssue['kind']>([\n 'unique_constraint_mismatch',\n 'extra_unique_constraint',\n]);\n\nconst FK_ISSUE_KINDS = new Set<SchemaIssue['kind']>(['foreign_key_mismatch', 'extra_foreign_key']);\n\n/**\n * Returns the columns the contract expects as the table's primary key. Picks\n * up SQLite's inline `INTEGER PRIMARY KEY AUTOINCREMENT` form when no\n * explicit `primaryKey` clause is set on the spec.\n */\nfunction expectedPrimaryKeyColumns(spec: SqliteTableSpec): readonly string[] {\n if (spec.primaryKey) return spec.primaryKey.columns;\n const inlinePk = spec.columns.find((c) => c.inlineAutoincrementPrimaryKey);\n return inlinePk ? [inlinePk.name] : [];\n}\n\nfunction quoteSqlList(values: readonly string[]): string {\n return values.map((v) => `'${escapeLiteral(v)}'`).join(', ');\n}\n\n/**\n * Per-issue postchecks verifying the recreated table's shape against the\n * contract spec. Column-level issues (`nullability_mismatch`,\n * `default_mismatch`, …) emit one targeted check each; constraint-level\n * issues (`primary_key_mismatch`, `unique_constraint_mismatch`,\n * `foreign_key_mismatch`, plus their `extra_*` siblings) emit one\n * `pragma_*`-driven check per declared constraint in the contract spec, so\n * a recreated table with the right columns but the wrong PK / unique / FK\n * shape fails the postcheck instead of passing silently. Exported so the\n * planner can pre-build the list at construction time and\n * `RecreateTableCall` doesn't have to carry `SchemaIssue` objects through\n * to render time.\n */\nexport function buildRecreatePostchecks(\n tableName: string,\n issues: readonly SchemaIssue[],\n spec: SqliteTableSpec,\n): Array<{ description: string; sql: string }> {\n const checks: Array<{ description: string; sql: string }> = [];\n const t = escapeLiteral(tableName);\n const byName = new Map(spec.columns.map((c) => [c.name, c]));\n\n for (const issue of issues) {\n if (issue.kind === 'enum_values_changed') continue;\n if (!COLUMN_LEVEL_ISSUE_KINDS.has(issue.kind)) continue;\n if (!issue.column) continue;\n const c = escapeLiteral(issue.column);\n if (issue.kind === 'nullability_mismatch') {\n // `expected` carries the contract's nullable flag as a string. We only\n // emit a postcheck when the value is recognized — anything else\n // (case-folded, numeric coding, etc.) is left to the structural\n // verifier so a typo here can't silently invert the meaning.\n let wantNotNull: boolean | undefined;\n if (issue.expected === 'false') wantNotNull = true;\n else if (issue.expected === 'true') wantNotNull = false;\n if (wantNotNull !== undefined) {\n checks.push({\n description: `verify \"${issue.column}\" nullability on \"${tableName}\"`,\n sql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND \"notnull\" = ${wantNotNull ? 1 : 0}`,\n });\n }\n }\n if (issue.kind === 'default_mismatch' || issue.kind === 'default_missing') {\n const colSpec = byName.get(issue.column);\n const expectedRaw = colSpec?.defaultSql.startsWith('DEFAULT ')\n ? // SQLite's pragma_table_info.dflt_value strips outer parens for\n // expression defaults (per the SQLite docs), so `(datetime('now'))`\n // is stored as `datetime('now')`. Strip them here so the postcheck\n // matches.\n stripOuterParens(colSpec.defaultSql.slice('DEFAULT '.length))\n : null;\n if (expectedRaw) {\n checks.push({\n description: `verify \"${issue.column}\" default on \"${tableName}\"`,\n sql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND dflt_value = '${escapeLiteral(expectedRaw)}'`,\n });\n }\n }\n if (issue.kind === 'type_mismatch') {\n const colSpec = byName.get(issue.column);\n if (colSpec) {\n checks.push({\n description: `verify \"${issue.column}\" type on \"${tableName}\"`,\n sql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND LOWER(type) = '${escapeLiteral(colSpec.typeSql.toLowerCase())}'`,\n });\n }\n }\n if (issue.kind === 'extra_default') {\n checks.push({\n description: `verify \"${issue.column}\" has no default on \"${tableName}\"`,\n sql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND dflt_value IS NULL`,\n });\n }\n }\n\n // Constraint-level issues — emit one postcheck per declared constraint in\n // the contract spec when *any* issue of that kind fires, since recreate\n // rebuilds the entire table at once.\n const hasPkIssue = issues.some((i) => PK_ISSUE_KINDS.has(i.kind));\n const hasUniqueIssue = issues.some((i) => UNIQUE_ISSUE_KINDS.has(i.kind));\n const hasFkIssue = issues.some((i) => FK_ISSUE_KINDS.has(i.kind));\n\n if (hasPkIssue) {\n const pkColumns = expectedPrimaryKeyColumns(spec);\n // Verify pragma_table_info reports exactly these columns as PK members\n // (count + named membership); zero columns expected ⇒ no PK at all.\n const colCount = pkColumns.length;\n if (colCount === 0) {\n checks.push({\n description: `verify \"${tableName}\" has no primary key`,\n sql: `SELECT (SELECT COUNT(*) FROM pragma_table_info('${t}') WHERE pk > 0) = 0`,\n });\n } else {\n checks.push({\n description: `verify primary key on \"${tableName}\"`,\n sql:\n `SELECT (SELECT COUNT(*) FROM pragma_table_info('${t}') WHERE pk > 0) = ${colCount}` +\n ` AND (SELECT COUNT(*) FROM pragma_table_info('${t}') WHERE pk > 0 AND name IN (${quoteSqlList(pkColumns)})) = ${colCount}`,\n });\n }\n }\n\n if (hasUniqueIssue) {\n for (const u of spec.uniques ?? []) {\n const colCount = u.columns.length;\n const description = u.name\n ? `verify unique constraint \"${u.name}\" on \"${tableName}\"`\n : `verify unique constraint (${u.columns.join(', ')}) on \"${tableName}\"`;\n // Match any unique index whose covered columns are exactly the expected\n // set. Order is intentionally not checked — SQLite's unique-index\n // identity is column-set, not column-sequence.\n checks.push({\n description,\n sql:\n `SELECT EXISTS (SELECT 1 FROM pragma_index_list('${t}') l` +\n ` WHERE l.\"unique\" = 1` +\n ` AND (SELECT COUNT(*) FROM pragma_index_info(l.name)) = ${colCount}` +\n ` AND (SELECT COUNT(*) FROM pragma_index_info(l.name) WHERE name IN (${quoteSqlList(u.columns)})) = ${colCount})`,\n });\n }\n }\n\n if (hasFkIssue) {\n for (const fk of spec.foreignKeys ?? []) {\n const refTable = escapeLiteral(fk.references.table);\n const colCount = fk.columns.length;\n // Build a `SUM(CASE WHEN (\"from\",\"to\") IN ((…)) …)` so the check works\n // for both single- and multi-column FKs without depending on FK row\n // ordering inside `pragma_foreign_key_list`.\n const tuples = fk.columns\n .map((from, i) => {\n const to = fk.references.columns[i] ?? from;\n return `('${escapeLiteral(from)}', '${escapeLiteral(to)}')`;\n })\n .join(', ');\n const description = `verify foreign key (${fk.columns.join(', ')}) → ${fk.references.table}(${fk.references.columns.join(', ')}) on \"${tableName}\"`;\n checks.push({\n description,\n sql:\n `SELECT EXISTS (SELECT 1 FROM pragma_foreign_key_list('${t}') f` +\n ` WHERE f.\"table\" = '${refTable}'` +\n ' GROUP BY f.id' +\n ` HAVING COUNT(*) = ${colCount}` +\n ` AND SUM(CASE WHEN (f.\"from\", f.\"to\") IN (${tuples}) THEN 1 ELSE 0 END) = ${colCount})`,\n });\n }\n }\n\n return checks;\n}\n"],"mappings":";;;;AAOA,SAAgB,KAAK,aAAqB,KAAmD;CAC3F,OAAO;EAAE;EAAa;EAAK;;AAqE7B,MAAM,yBAA4D;CAChE,UAAU;CACV,UAAU;CACV,SAAS;CACT,SAAS;CACT,YAAY;CACb;;;;;;;AAQD,SAAgB,uBAAuB,QAAkC;CACvE,MAAM,QAAkB,CAAC,gBAAgB,OAAO,KAAK,EAAE,OAAO,QAAQ;CACtE,IAAI,OAAO,+BACT,MAAM,KAAK,4BAA4B;MAClC;EACL,IAAI,OAAO,YAAY,MAAM,KAAK,OAAO,WAAW;EACpD,IAAI,CAAC,OAAO,UAAU,MAAM,KAAK,WAAW;;CAE9C,OAAO,MAAM,KAAK,IAAI;;;;;;;;AASxB,SAAgB,uBAAuB,IAAkC;CACvE,IAAI,CAAC,GAAG,YAAY,OAAO;CAE3B,IAAI,MAAM,GADG,GAAG,OAAO,cAAc,gBAAgB,GAAG,KAAK,CAAC,KAAK,GACjD,eAAe,GAAG,QAAQ,IAAI,gBAAgB,CAAC,KAAK,KAAK,CAAC,eAAe,gBAAgB,GAAG,WAAW,MAAM,CAAC,IAAI,GAAG,WAAW,QAAQ,IAAI,gBAAgB,CAAC,KAAK,KAAK,CAAC;CAC1L,IAAI,GAAG,aAAa,KAAA,GAClB,OAAO,cAAc,uBAAuB,GAAG;CAEjD,IAAI,GAAG,aAAa,KAAA,GAClB,OAAO,cAAc,uBAAuB,GAAG;CAEjD,OAAO;;;;AClHT,SAAgB,UAAU,WAAmB,QAA8B;CAOzE,MAAM,SANQ;EACZ,eA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AAC;;CAIN,IAAI,YACF,KAAK,MAAM,MAAM,KAAK,eAAe,EAAE,EAAE;EACvC,MAAM,WAAW,cAAc,GAAG,WAAW,MAAM;EACnD,MAAM,WAAW,GAAG,QAAQ;EAI5B,MAAM,SAAS,GAAG,QACf,KAAK,MAAM,MAAM;GAChB,MAAM,KAAK,GAAG,WAAW,QAAQ,MAAM;GACvC,OAAO,KAAK,cAAc,KAAK,CAAC,MAAM,cAAc,GAAG,CAAC;IACxD,CACD,KAAK,KAAK;EACb,MAAM,cAAc,uBAAuB,GAAG,QAAQ,KAAK,KAAK,CAAC,MAAM,GAAG,WAAW,MAAM,GAAG,GAAG,WAAW,QAAQ,KAAK,KAAK,CAAC,QAAQ,UAAU;EACjJ,OAAO,KAAK;GACV;GACA,KACE,yDAAyD,EAAE,0BACpC,SAAS,oCAEV,SAAA,4CACuB,OAAO,yBAAyB,SAAS;GACzF,CAAC;;CAIN,OAAO"}
package/package.json CHANGED
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "name": "@prisma-next/target-sqlite",
3
- "version": "0.5.0-dev.65",
3
+ "version": "0.5.0-dev.67",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "dependencies": {
8
- "@prisma-next/errors": "0.5.0-dev.65",
9
- "@prisma-next/contract": "0.5.0-dev.65",
10
- "@prisma-next/cli": "0.5.0-dev.65",
11
- "@prisma-next/family-sql": "0.5.0-dev.65",
12
- "@prisma-next/migration-tools": "0.5.0-dev.65",
13
- "@prisma-next/framework-components": "0.5.0-dev.65",
14
- "@prisma-next/sql-relational-core": "0.5.0-dev.65",
15
- "@prisma-next/sql-errors": "0.5.0-dev.65",
16
- "@prisma-next/sql-schema-ir": "0.5.0-dev.65",
17
- "@prisma-next/sql-contract": "0.5.0-dev.65",
18
- "@prisma-next/ts-render": "0.5.0-dev.65",
19
- "@prisma-next/sql-runtime": "0.5.0-dev.65",
20
- "@prisma-next/utils": "0.5.0-dev.65"
8
+ "@prisma-next/contract": "0.5.0-dev.67",
9
+ "@prisma-next/errors": "0.5.0-dev.67",
10
+ "@prisma-next/migration-tools": "0.5.0-dev.67",
11
+ "@prisma-next/family-sql": "0.5.0-dev.67",
12
+ "@prisma-next/cli": "0.5.0-dev.67",
13
+ "@prisma-next/framework-components": "0.5.0-dev.67",
14
+ "@prisma-next/sql-contract": "0.5.0-dev.67",
15
+ "@prisma-next/sql-errors": "0.5.0-dev.67",
16
+ "@prisma-next/sql-runtime": "0.5.0-dev.67",
17
+ "@prisma-next/sql-relational-core": "0.5.0-dev.67",
18
+ "@prisma-next/sql-schema-ir": "0.5.0-dev.67",
19
+ "@prisma-next/ts-render": "0.5.0-dev.67",
20
+ "@prisma-next/utils": "0.5.0-dev.67"
21
21
  },
22
22
  "devDependencies": {
23
- "tsdown": "0.18.4",
23
+ "tsdown": "0.22.0",
24
24
  "typescript": "5.9.3",
25
- "vitest": "4.0.17",
25
+ "vitest": "4.1.5",
26
+ "@prisma-next/driver-sqlite": "0.5.0-dev.67",
26
27
  "@prisma-next/test-utils": "0.0.1",
27
- "@prisma-next/tsconfig": "0.0.0",
28
- "@prisma-next/driver-sqlite": "0.5.0-dev.65",
29
- "@prisma-next/tsdown": "0.0.0"
28
+ "@prisma-next/tsdown": "0.0.0",
29
+ "@prisma-next/tsconfig": "0.0.0"
30
30
  },
31
31
  "files": [
32
32
  "dist",
@@ -1 +0,0 @@
1
- {"version":3,"file":"codec-ids-DyLO2Rfx.d.mts","names":[],"sources":["../src/core/codec-ids.ts"],"sourcesContent":[],"mappings":";;;cAMa;cACA;AADA,cAEA,oBAF+C,EAAA,eAAA;AAC/C,cAEA,oBAFqD,EAAA,eAAA;AACrD,cAEA,wBAF+C,EAAA,mBAAA;AAC/C,cAEA,oBAF+C,EAAA,eAAA;AAC/C,cAEA,sBAFuD,EAAA,iBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"codec-types-Bbzv7qCW.d.mts","names":[],"sources":["../src/exports/codec-types.ts"],"sourcesContent":[],"mappings":";;;;;;cAwBM;iBAYI,qCAAA,CAAA;;;;;;;;;;EAEL,SAAA,MAAO,wBAAA;CAA6B;KAApC,OAA+D,CAAA,CAAA,CAAA,GAAA,iBAAE,MAA7B,CAA6B,GAAA,iBAAK,MAAP,CAAO,CAAL,CAAK,CAAA,GAAA,CAAA,CAAE,CAAF,CAAA,CAAK,CAAL,CAAA,EAAE,EAAG;AAAC,KAErE,UAAA,GAAa,OAFwD,CAEhD,iBAFgD,CAAA,OAEvB,kBAFuB,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"codecs-BqDitp2X.d.mts","names":[],"sources":["../src/core/codec-helpers.ts","../src/core/codecs.ts","../src/core/registry.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAIY,WAAA;0BAKkB;aACjB;;;;ACqC0C,cAN1C,eAAA,SAAwB,SAMkB,CAAA,OAL9C,oBAK8C,EAAA,SAAA,CAAA,UAAA,EAAA,OAAA,EAAA,SAAA,CAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;EAGpB,MAAA,CAAA,KAAA,EAAA,MAAA,EAAA,IAAA,EAHC,gBAGD,CAAA,EAHoB,OAGpB,CAAA,MAAA,CAAA;EAAmB,MAAA,CAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAnB,gBAAmB,CAAA,EAAA,OAAA,CAAA,MAAA,CAAA;EAGzB,UAAA,CAAA,KAAA,EAAA,MAAA,CAAA,EAAA,SAAA;EAGV,UAAA,CAAA,IAAA,EAAA,SAAA,CAAA,EAAA,MAAA;;AAf2B,cAoBjC,oBAAA,SAA6B,mBApBI,CAAA,IAAA,CAAA,CAAA;EAoBjC,SAAA,OAAA,EAAA,eAAqB;EAAA,SAAA,MAAA,EAAA,SAIF,CAAA,UAAA,EAAA,OAAA,EAAA,SAAA,CAAA;EACJ,SAAA,WAAA,EAAA,SAAA,CAAA,MAAA,CAAA;EAAyB,SAAA,YAAA,EALnB,sBAAA,CAIF,gBAC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c,CAAA,OAoD5C,sBApD4C,EAAA,SAAA,CAAA,UAAA,EAAA,OAAA,EAAA,SAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA,MAAA,CAAA,CAAA;EALP,MAAA,CAAA,KAAA,EAAA,MAAA,EAAA,IAAA,EA8DV,gBA9DU,CAAA,EA8DS,OA9DT,CAAA,MAAA,GAAA,MAAA,CAAA;EAAmB,MAAA,CAAA,IAAA,EAAA,MAAA,GAAA,MAAA,EAAA,IAAA,EAiErB,gBAjEqB,CAAA,EAiEF,OAjEE,CAAA,MAAA,CAAA;EAYpD,UAAA,CAAA,KAAA,EAAA,MACoF,CAAA,EAuDpE,SAxDI;EAMpB,UAAA,CAAA,IAAA,EAqDM,SArDU,CAAA,EAAA,MAAA;;AAGlB,cA0DE,sBAAA,SAA+B,mBA1DjC,CAAA,IAAA,CAAA,CAAA;EACT,SAAA,OAAA,EAAA,iBAAA;EAEoB,SAAA,MAAA,EAAA,SAAA,CAAA,UAAA,EAAA,OAAA,EAAA,SAAA,CAAA;EAAiB,SAAA,WAAA,EAAA,SAAA,CAAA,SAAA,CAAA;EAAmB,SAAA,YAAA,EAuDtB,sBAAA,CAIJ,gBA3D0B,CAAA,IAAA,EAAA,IAAA,CAAA;EAG5B,OAAA,CAAA,CAAA,EAAA,CAAA,GAAA,EAyDF,oBAzDE,EAAA,GAyDuB,iBAzDvB;;AAAoC,cAgErD,kBAhEqD,EAAA,GAAA,GAgEnC,wCAAA,CAAA,UAhEmC,CAgEnC,iBAhEmC,EAAA,SAAA,CAAA;;;;;;;;cCrPrD,qBAAqB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"codecs-CDcidsHL.mjs","names":["codecDescriptors: readonly AnyCodecDescriptor[]"],"sources":["../src/core/codecs.ts"],"sourcesContent":["/**\n * Native SQLite target codecs (TML-2357). Mirrors the Postgres codec class form in `packages/3-targets/3-targets/postgres/src/core/codecs.ts`.\n *\n * Each codec ships as three artifacts:\n *\n * 1. A `SqliteXCodec` class extending {@link CodecImpl} that wraps the encode/decode/encodeJson/decodeJson conversions inline. SQLite's runtime conversions are simple enough that there is no shared helper module; the class bodies are the single source of truth. 2. A `SqliteXDescriptor` class extending {@link CodecDescriptorImpl} declaring the codec id, traits, target types, and params schema. SQLite codecs do not carry\n * `meta` (no per-target native-type meta today) and are all non-parameterized. 3. A per-codec column helper (`sqliteXColumn`) that calls `descriptor.factory()` directly and packages the result into a {@link ColumnSpec} via the framework {@link column} packager. The helper is tied to its descriptor with `satisfies ColumnHelperFor` + `ColumnHelperForStrict` (every SQLite codec's resolved type is well-defined).\n *\n * After TML-2357 this is the canonical source of SQLite codec metadata and runtime behaviour — the legacy `mkCodec` / `defineCodec` carriers (and the parallel `byScalar` / `codecDescriptorDefinitions` collection exports) retired with the deletion sweep.\n *\n * Audit: every SQLite codec is non-parameterized and parameter-stateless; `factory()` takes no params (`P = void`) and returns a fresh codec constructed solely from `this`.\n */\n\nimport type { JsonValue } from '@prisma-next/contract/types';\nimport {\n type AnyCodecDescriptor,\n type CodecCallContext,\n CodecDescriptorImpl,\n CodecImpl,\n type CodecInstanceContext,\n type ColumnHelperFor,\n type ColumnHelperForStrict,\n column,\n voidParamsSchema,\n} from '@prisma-next/framework-components/codec';\nimport {\n sqlCharDescriptor,\n sqlFloatDescriptor,\n sqlIntDescriptor,\n sqlVarcharDescriptor,\n} from '@prisma-next/sql-relational-core/ast';\nimport {\n SQLITE_BIGINT_CODEC_ID,\n SQLITE_BLOB_CODEC_ID,\n SQLITE_DATETIME_CODEC_ID,\n SQLITE_INTEGER_CODEC_ID,\n SQLITE_JSON_CODEC_ID,\n SQLITE_REAL_CODEC_ID,\n SQLITE_TEXT_CODEC_ID,\n} from './codec-ids';\n\nexport class SqliteTextCodec extends CodecImpl<\n typeof SQLITE_TEXT_CODEC_ID,\n readonly ['equality', 'order', 'textual'],\n string,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n return value;\n }\n async decode(wire: string, _ctx: CodecCallContext): Promise<string> {\n return wire;\n }\n encodeJson(value: string): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): string {\n return json as string;\n }\n}\n\nexport class SqliteTextDescriptor extends CodecDescriptorImpl<void> {\n override readonly codecId = SQLITE_TEXT_CODEC_ID;\n override readonly traits = ['equality', 'order', 'textual'] as const;\n override readonly targetTypes = ['text'] as const;\n override readonly paramsSchema = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => SqliteTextCodec {\n return () => new SqliteTextCodec(this);\n }\n}\n\nexport const sqliteTextDescriptor = new SqliteTextDescriptor();\n\nexport const sqliteTextColumn = () =>\n column(sqliteTextDescriptor.factory(), sqliteTextDescriptor.codecId, undefined, 'text');\n\nsqliteTextColumn satisfies ColumnHelperFor<SqliteTextDescriptor>;\nsqliteTextColumn satisfies ColumnHelperForStrict<SqliteTextDescriptor>;\n\nexport class SqliteIntegerCodec extends CodecImpl<\n typeof SQLITE_INTEGER_CODEC_ID,\n readonly ['equality', 'order', 'numeric'],\n number,\n number\n> {\n async encode(value: number, _ctx: CodecCallContext): Promise<number> {\n return value;\n }\n async decode(wire: number, _ctx: CodecCallContext): Promise<number> {\n return wire;\n }\n encodeJson(value: number): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): number {\n return json as number;\n }\n}\n\nexport class SqliteIntegerDescriptor extends CodecDescriptorImpl<void> {\n override readonly codecId = SQLITE_INTEGER_CODEC_ID;\n override readonly traits = ['equality', 'order', 'numeric'] as const;\n override readonly targetTypes = ['integer'] as const;\n override readonly paramsSchema = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => SqliteIntegerCodec {\n return () => new SqliteIntegerCodec(this);\n }\n}\n\nexport const sqliteIntegerDescriptor = new SqliteIntegerDescriptor();\n\nexport const sqliteIntegerColumn = () =>\n column(sqliteIntegerDescriptor.factory(), sqliteIntegerDescriptor.codecId, undefined, 'integer');\n\nsqliteIntegerColumn satisfies ColumnHelperFor<SqliteIntegerDescriptor>;\nsqliteIntegerColumn satisfies ColumnHelperForStrict<SqliteIntegerDescriptor>;\n\nexport class SqliteRealCodec extends CodecImpl<\n typeof SQLITE_REAL_CODEC_ID,\n readonly ['equality', 'order', 'numeric'],\n number,\n number\n> {\n async encode(value: number, _ctx: CodecCallContext): Promise<number> {\n return value;\n }\n async decode(wire: number, _ctx: CodecCallContext): Promise<number> {\n return wire;\n }\n encodeJson(value: number): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): number {\n return json as number;\n }\n}\n\nexport class SqliteRealDescriptor extends CodecDescriptorImpl<void> {\n override readonly codecId = SQLITE_REAL_CODEC_ID;\n override readonly traits = ['equality', 'order', 'numeric'] as const;\n override readonly targetTypes = ['real'] as const;\n override readonly paramsSchema = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => SqliteRealCodec {\n return () => new SqliteRealCodec(this);\n }\n}\n\nexport const sqliteRealDescriptor = new SqliteRealDescriptor();\n\nexport const sqliteRealColumn = () =>\n column(sqliteRealDescriptor.factory(), sqliteRealDescriptor.codecId, undefined, 'real');\n\nsqliteRealColumn satisfies ColumnHelperFor<SqliteRealDescriptor>;\nsqliteRealColumn satisfies ColumnHelperForStrict<SqliteRealDescriptor>;\n\nexport class SqliteBlobCodec extends CodecImpl<\n typeof SQLITE_BLOB_CODEC_ID,\n readonly ['equality'],\n Uint8Array,\n Uint8Array\n> {\n async encode(value: Uint8Array, _ctx: CodecCallContext): Promise<Uint8Array> {\n return value;\n }\n async decode(wire: Uint8Array, _ctx: CodecCallContext): Promise<Uint8Array> {\n return wire;\n }\n encodeJson(value: Uint8Array): JsonValue {\n return Buffer.from(value).toString('base64');\n }\n decodeJson(json: JsonValue): Uint8Array {\n if (typeof json !== 'string') {\n throw new TypeError('sqlite/blob@1 contract value must be a base64 string');\n }\n return new Uint8Array(Buffer.from(json, 'base64'));\n }\n}\n\nexport class SqliteBlobDescriptor extends CodecDescriptorImpl<void> {\n override readonly codecId = SQLITE_BLOB_CODEC_ID;\n override readonly traits = ['equality'] as const;\n override readonly targetTypes = ['blob'] as const;\n override readonly paramsSchema = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => SqliteBlobCodec {\n return () => new SqliteBlobCodec(this);\n }\n}\n\nexport const sqliteBlobDescriptor = new SqliteBlobDescriptor();\n\nexport const sqliteBlobColumn = () =>\n column(sqliteBlobDescriptor.factory(), sqliteBlobDescriptor.codecId, undefined, 'blob');\n\nsqliteBlobColumn satisfies ColumnHelperFor<SqliteBlobDescriptor>;\nsqliteBlobColumn satisfies ColumnHelperForStrict<SqliteBlobDescriptor>;\n\nexport class SqliteDatetimeCodec extends CodecImpl<\n typeof SQLITE_DATETIME_CODEC_ID,\n readonly ['equality', 'order'],\n string,\n Date\n> {\n // Reject `Invalid Date` (NaN-time) at every decode ingress so consumers never receive a Date object whose downstream operations silently produce NaN. Mirrors the stricter ISO-8601 validation on the postgres timestamp helpers.\n private parseDate(value: string): Date {\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) {\n throw new TypeError(`sqlite/datetime@1 value must be a valid ISO-8601 string: ${value}`);\n }\n return date;\n }\n async encode(value: Date, _ctx: CodecCallContext): Promise<string> {\n return value.toISOString();\n }\n async decode(wire: string, _ctx: CodecCallContext): Promise<Date> {\n return this.parseDate(wire);\n }\n encodeJson(value: Date): JsonValue {\n return value.toISOString();\n }\n decodeJson(json: JsonValue): Date {\n if (typeof json !== 'string') {\n throw new TypeError('sqlite/datetime@1 contract value must be an ISO-8601 string');\n }\n return this.parseDate(json);\n }\n}\n\nexport class SqliteDatetimeDescriptor extends CodecDescriptorImpl<void> {\n override readonly codecId = SQLITE_DATETIME_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['text'] as const;\n override readonly paramsSchema = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => SqliteDatetimeCodec {\n return () => new SqliteDatetimeCodec(this);\n }\n}\n\nexport const sqliteDatetimeDescriptor = new SqliteDatetimeDescriptor();\n\nexport const sqliteDatetimeColumn = () =>\n column(sqliteDatetimeDescriptor.factory(), sqliteDatetimeDescriptor.codecId, undefined, 'text');\n\nsqliteDatetimeColumn satisfies ColumnHelperFor<SqliteDatetimeDescriptor>;\nsqliteDatetimeColumn satisfies ColumnHelperForStrict<SqliteDatetimeDescriptor>;\n\nexport class SqliteJsonCodec extends CodecImpl<\n typeof SQLITE_JSON_CODEC_ID,\n readonly ['equality'],\n string | JsonValue,\n JsonValue\n> {\n async encode(value: JsonValue, _ctx: CodecCallContext): Promise<string> {\n return JSON.stringify(value);\n }\n async decode(wire: string | JsonValue, _ctx: CodecCallContext): Promise<JsonValue> {\n return typeof wire === 'string' ? (JSON.parse(wire) as JsonValue) : wire;\n }\n encodeJson(value: JsonValue): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): JsonValue {\n return json;\n }\n}\n\nexport class SqliteJsonDescriptor extends CodecDescriptorImpl<void> {\n override readonly codecId = SQLITE_JSON_CODEC_ID;\n override readonly traits = ['equality'] as const;\n override readonly targetTypes = ['text'] as const;\n override readonly paramsSchema = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => SqliteJsonCodec {\n return () => new SqliteJsonCodec(this);\n }\n}\n\nexport const sqliteJsonDescriptor = new SqliteJsonDescriptor();\n\nexport const sqliteJsonColumn = () =>\n column(sqliteJsonDescriptor.factory(), sqliteJsonDescriptor.codecId, undefined, 'text');\n\nsqliteJsonColumn satisfies ColumnHelperFor<SqliteJsonDescriptor>;\nsqliteJsonColumn satisfies ColumnHelperForStrict<SqliteJsonDescriptor>;\n\nexport class SqliteBigintCodec extends CodecImpl<\n typeof SQLITE_BIGINT_CODEC_ID,\n readonly ['equality', 'order', 'numeric'],\n number | bigint,\n bigint\n> {\n async encode(value: bigint, _ctx: CodecCallContext): Promise<number | bigint> {\n return value;\n }\n async decode(wire: number | bigint, _ctx: CodecCallContext): Promise<bigint> {\n return BigInt(wire);\n }\n encodeJson(value: bigint): JsonValue {\n return value.toString();\n }\n decodeJson(json: JsonValue): bigint {\n if (typeof json !== 'string' && typeof json !== 'number') {\n throw new TypeError('sqlite/bigint@1 contract value must be a string or number');\n }\n return BigInt(json);\n }\n}\n\nexport class SqliteBigintDescriptor extends CodecDescriptorImpl<void> {\n override readonly codecId = SQLITE_BIGINT_CODEC_ID;\n override readonly traits = ['equality', 'order', 'numeric'] as const;\n override readonly targetTypes = ['integer'] as const;\n override readonly paramsSchema = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => SqliteBigintCodec {\n return () => new SqliteBigintCodec(this);\n }\n}\n\nexport const sqliteBigintDescriptor = new SqliteBigintDescriptor();\n\nexport const sqliteBigintColumn = () =>\n column(sqliteBigintDescriptor.factory(), sqliteBigintDescriptor.codecId, undefined, 'integer');\n\nsqliteBigintColumn satisfies ColumnHelperFor<SqliteBigintDescriptor>;\nsqliteBigintColumn satisfies ColumnHelperForStrict<SqliteBigintDescriptor>;\n\nexport const codecDescriptors: readonly AnyCodecDescriptor[] = [\n sqlCharDescriptor,\n sqlVarcharDescriptor,\n sqlIntDescriptor,\n sqlFloatDescriptor,\n sqliteTextDescriptor,\n sqliteIntegerDescriptor,\n sqliteRealDescriptor,\n sqliteBlobDescriptor,\n sqliteDatetimeDescriptor,\n sqliteJsonDescriptor,\n sqliteBigintDescriptor,\n];\n"],"mappings":";;;;;AAyCA,IAAa,kBAAb,cAAqC,UAKnC;CACA,MAAM,OAAO,OAAe,MAAyC;AACnE,SAAO;;CAET,MAAM,OAAO,MAAc,MAAyC;AAClE,SAAO;;CAET,WAAW,OAA0B;AACnC,SAAO;;CAET,WAAW,MAAyB;AAClC,SAAO;;;AAIX,IAAa,uBAAb,cAA0C,oBAA0B;CAClE,AAAkB,UAAU;CAC5B,AAAkB,SAAS;EAAC;EAAY;EAAS;EAAU;CAC3D,AAAkB,cAAc,CAAC,OAAO;CACxC,AAAkB,eAAe;CACjC,AAAS,UAA0D;AACjE,eAAa,IAAI,gBAAgB,KAAK;;;AAI1C,MAAa,uBAAuB,IAAI,sBAAsB;AAE9D,MAA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;CACA;CACA;CACA;CACA;CACD"}
@@ -1,24 +0,0 @@
1
- import { temporalAuthoringPresets } from "@prisma-next/family-sql/control";
2
-
3
- //#region src/core/authoring.ts
4
- const sqliteAuthoringFieldPresets = { temporal: temporalAuthoringPresets({
5
- codecId: "sqlite/datetime@1",
6
- nativeType: "text"
7
- }) };
8
-
9
- //#endregion
10
- //#region src/core/descriptor-meta.ts
11
- const sqliteTargetDescriptorMetaBase = {
12
- kind: "target",
13
- familyId: "sql",
14
- targetId: "sqlite",
15
- id: "sqlite",
16
- version: "0.0.1",
17
- capabilities: {},
18
- authoring: { field: sqliteAuthoringFieldPresets }
19
- };
20
- const sqliteTargetDescriptorMeta = sqliteTargetDescriptorMetaBase;
21
-
22
- //#endregion
23
- export { sqliteTargetDescriptorMeta as t };
24
- //# sourceMappingURL=descriptor-meta-BA2YAFQq.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"descriptor-meta-BA2YAFQq.mjs","names":["sqliteTargetDescriptorMeta: typeof sqliteTargetDescriptorMetaBase & {\n readonly __codecTypes?: CodecTypes;\n}"],"sources":["../src/core/authoring.ts","../src/core/descriptor-meta.ts"],"sourcesContent":["import { temporalAuthoringPresets } from '@prisma-next/family-sql/control';\nimport type { AuthoringFieldNamespace } from '@prisma-next/framework-components/authoring';\n\nexport const sqliteAuthoringFieldPresets = {\n temporal: temporalAuthoringPresets({\n codecId: 'sqlite/datetime@1',\n nativeType: 'text',\n }),\n} as const satisfies AuthoringFieldNamespace;\n","import type { CodecTypes } from '../exports/codec-types';\nimport { sqliteAuthoringFieldPresets } from './authoring';\n\nconst sqliteTargetDescriptorMetaBase = {\n kind: 'target',\n familyId: 'sql',\n targetId: 'sqlite',\n id: 'sqlite',\n version: '0.0.1',\n capabilities: {},\n authoring: {\n field: sqliteAuthoringFieldPresets,\n },\n} as const;\n\nexport const sqliteTargetDescriptorMeta: typeof sqliteTargetDescriptorMetaBase & {\n readonly __codecTypes?: CodecTypes;\n} = sqliteTargetDescriptorMetaBase;\n"],"mappings":";;;AAGA,MAAa,8BAA8B,EACzC,UAAU,yBAAyB;CACjC,SAAS;CACT,YAAY;CACb,CAAC,EACH;;;;ACLD,MAAM,iCAAiC;CACrC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,EAAE;CAChB,WAAW,EACT,OAAO,6BACR;CACF;AAED,MAAaA,6BAET"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"op-factory-call-dUIOao68.d.mts","names":[],"sources":["../src/core/migrations/op-factory-call.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA0BK,EAAA,GAAK,yBA8B6B,CA9BH,uBA8BG,CAAA;uBA1BxB,uBAAA,SAAgC,YAAA,YAAwB,aAkC7D,CAAA;EAf2B,kBAAA,WAAA,EAAA,MAAA;EAAuB,kBAAA,cAAA,EAjBxB,uBAiBwB;EAwB/C,kBAAc,KAAA,EAAA,MAajB;EASG,SAAA,IAAA,CAAA,CAAA,EA7DM,EA6DN;EAEc,kBAAA,CAAA,CAAA,EAAA,SA7DM,iBA6DN,EAAA;EAED,UAAA,MAAA,CAAA,CAAA,EAAA,IAAA;;AASP,cA3DN,eAAA,SAAwB,uBAAA,CA2DlB;EAEG,SAAA,WAAA,EAAA,aAAA;EAGF,SAAA,cAAA,EAAA,UAAA;EAcV,SAAA,SAAA,EAAA,MAAA;EAhC6B,SAAA,IAAA,EA1CtB,eA0CsB;EAAuB,SAAA,KAAA,EAAA,MAAA;EA8DjD,WAAA,CAAA,SAAc,EAAA,MAAA,EAAA,IAAA,EArGY,eAqGZ;EAKR,IAAA,CAAA,CAAA,EAlGT,EAkGS;EAGsB,gBAAA,CAAA,CAAA,EAAA,MAAA;;AARN,cApFtB,aAAA,SAAsB,uBAAA,CAoFA;EAAuB,SAAA,WAAA,EAAA,WAAA;EA0B7C,SAAA,cAAe,EAAA,aAAQ;EA4BvB,SAAA,SAAgB,EAAA,MAAA;EA0BhB,SAAA,KAAA,EAAc,MAAA;E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