@prisma/orm-toolchain 8.0.0-rc.1-dev.6 → 8.0.0-rc.1-dev.8

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 (200) hide show
  1. package/dist/{aggregate-i-rfetSO.mjs → aggregate-D53gnb7v.mjs} +8 -8
  2. package/dist/{aggregate-i-rfetSO.mjs.map → aggregate-D53gnb7v.mjs.map} +1 -1
  3. package/dist/bin__prisma-next.mjs +22 -22
  4. package/dist/bin__prisma-next.mjs.map +1 -1
  5. package/dist/caught-errors-D7Qznyrm-BzYooF6H.mjs +14 -0
  6. package/dist/caught-errors-D7Qznyrm-BzYooF6H.mjs.map +1 -0
  7. package/dist/{types-2n_H3DQ9-Bks8UPEO.d.mts → cli-errors-CDr3WcJP-NFry5GHb.d.mts} +2 -2
  8. package/dist/cli-errors-CDr3WcJP-NFry5GHb.d.mts.map +1 -0
  9. package/dist/cli.mjs +2 -2
  10. package/dist/cli__commands__contract-emit.mjs +1 -1
  11. package/dist/cli__commands__contract-infer.mjs +1 -1
  12. package/dist/cli__commands__db-init.mjs +1 -1
  13. package/dist/cli__commands__db-schema.mjs +1 -1
  14. package/dist/cli__commands__db-sign.mjs +1 -1
  15. package/dist/cli__commands__db-update.mjs +1 -1
  16. package/dist/cli__commands__db-verify.mjs +1 -1
  17. package/dist/cli__commands__migrate.d.mts +3 -12
  18. package/dist/cli__commands__migrate.d.mts.map +1 -1
  19. package/dist/cli__commands__migrate.mjs +1 -1
  20. package/dist/cli__commands__migration-check.d.mts +1 -57
  21. package/dist/cli__commands__migration-check.d.mts.map +1 -1
  22. package/dist/cli__commands__migration-check.mjs +2 -2
  23. package/dist/cli__commands__migration-graph.d.mts +1 -1
  24. package/dist/cli__commands__migration-graph.mjs +1 -1
  25. package/dist/cli__commands__migration-list.d.mts +4 -44
  26. package/dist/cli__commands__migration-list.d.mts.map +1 -1
  27. package/dist/cli__commands__migration-list.mjs +2 -2
  28. package/dist/cli__commands__migration-log.d.mts +1 -1
  29. package/dist/cli__commands__migration-log.mjs +1 -1
  30. package/dist/cli__commands__migration-new.mjs +1 -1
  31. package/dist/cli__commands__migration-plan.d.mts +2 -47
  32. package/dist/cli__commands__migration-plan.d.mts.map +1 -1
  33. package/dist/cli__commands__migration-plan.mjs +1 -1
  34. package/dist/cli__commands__migration-show.mjs +1 -1
  35. package/dist/cli__commands__migration-status.d.mts +1 -1
  36. package/dist/cli__commands__migration-status.mjs +1 -1
  37. package/dist/cli__commands__ref.d.mts +1 -28
  38. package/dist/cli__commands__ref.d.mts.map +1 -1
  39. package/dist/cli__commands__ref.mjs +2 -2
  40. package/dist/cli__commands__telemetry.mjs +1 -1
  41. package/dist/cli__control-api.d.mts +502 -2
  42. package/dist/cli__control-api.d.mts.map +1 -1
  43. package/dist/cli__control-api.mjs +18 -3
  44. package/dist/cli__migration-cli.mjs +2 -2
  45. package/dist/{client-7aUYC7ci-Bh9mLxkl.mjs → client-Y6qbDk7X-BzKLmBZo.mjs} +8 -8
  46. package/dist/{client-7aUYC7ci-Bh9mLxkl.mjs.map → client-Y6qbDk7X-BzKLmBZo.mjs.map} +1 -1
  47. package/dist/{command-helpers-C4WpR-QE-CK2gkj6l.mjs → command-helpers-C4WpR-QE-DE494TSG.mjs} +2 -2
  48. package/dist/{command-helpers-C4WpR-QE-CK2gkj6l.mjs.map → command-helpers-C4WpR-QE-DE494TSG.mjs.map} +1 -1
  49. package/dist/config-loader.d.mts +2 -18
  50. package/dist/{contract-at-errors-YdCQ5OOk-okxG7Eaj.mjs → contract-at-errors-Dv1mxKYO-C29YB4RC.mjs} +4 -4
  51. package/dist/contract-at-errors-Dv1mxKYO-C29YB4RC.mjs.map +1 -0
  52. package/dist/{contract-emit-CTm2zfuG-8mtkxW8M.mjs → contract-emit-CTm2zfuG-7PV9SBY6.mjs} +4 -4
  53. package/dist/{contract-emit-CTm2zfuG-8mtkxW8M.mjs.map → contract-emit-CTm2zfuG-7PV9SBY6.mjs.map} +1 -1
  54. package/dist/{contract-emit-D8IXP9Qp-CecAQio1.mjs → contract-emit-D8IXP9Qp-Df6NwXn8.mjs} +3 -3
  55. package/dist/{contract-emit-D8IXP9Qp-CecAQio1.mjs.map → contract-emit-D8IXP9Qp-Df6NwXn8.mjs.map} +1 -1
  56. package/dist/{contract-infer-C8-RqHeK-D_dm3onP.mjs → contract-infer-BwT7ngoo-Dx6aAwIN.mjs} +4 -4
  57. package/dist/{contract-infer-C8-RqHeK-D_dm3onP.mjs.map → contract-infer-BwT7ngoo-Dx6aAwIN.mjs.map} +1 -1
  58. package/dist/contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs +82 -0
  59. package/dist/contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs.map +1 -0
  60. package/dist/{contract-snapshot-store-DNTOE6fB-BDpjbdCJ.mjs → contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs} +3 -3
  61. package/dist/{contract-snapshot-store-DNTOE6fB-BDpjbdCJ.mjs.map → contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs.map} +1 -1
  62. package/dist/{contract-space-aggregate-loader-CziO_ZRW-DIoQOL0P.mjs → contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs} +6 -6
  63. package/dist/contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs.map +1 -0
  64. package/dist/{db-init-CXMcvoIA.mjs → db-init-CBj_EWg3.mjs} +15 -26
  65. package/dist/db-init-CBj_EWg3.mjs.map +1 -0
  66. package/dist/{db-schema-j8DERh4t.mjs → db-schema-BWpeh0Q_.mjs} +4 -4
  67. package/dist/{db-schema-j8DERh4t.mjs.map → db-schema-BWpeh0Q_.mjs.map} +1 -1
  68. package/dist/{db-sign-xV_rpoIc.mjs → db-sign-DCb_DKtv.mjs} +13 -29
  69. package/dist/db-sign-DCb_DKtv.mjs.map +1 -0
  70. package/dist/{db-update-DXa2DIvu.mjs → db-update-WX0KitcX.mjs} +27 -50
  71. package/dist/db-update-WX0KitcX.mjs.map +1 -0
  72. package/dist/{db-verify-YWHjuKC7-DidK1gx1.mjs → db-verify-B8ax2Y_x-Bp4s5Ra6.mjs} +5 -5
  73. package/dist/{db-verify-YWHjuKC7-DidK1gx1.mjs.map → db-verify-B8ax2Y_x-Bp4s5Ra6.mjs.map} +1 -1
  74. package/dist/{errors-BwusfLIN-BXM7K-ww.mjs → errors-Co-8oaiB-CB-6Uqki.mjs} +5 -4
  75. package/dist/{errors-BwusfLIN-BXM7K-ww.mjs.map → errors-Co-8oaiB-CB-6Uqki.mjs.map} +1 -1
  76. package/dist/{errors-AkMBj-YP.d.mts → errors-NRmFpwR1.d.mts} +6 -2
  77. package/dist/errors-NRmFpwR1.d.mts.map +1 -0
  78. package/dist/{format-Bw3LVJ1v-D10inUT9.mjs → format-Bw3LVJ1v-BJ6lVFMA.mjs} +2 -2
  79. package/dist/{format-Bw3LVJ1v-D10inUT9.mjs.map → format-Bw3LVJ1v-BJ6lVFMA.mjs.map} +1 -1
  80. package/dist/{framework-components-3DdB31mk-BPGSuOyZ.mjs → framework-components-3DdB31mk-BHyX-OlJ.mjs} +2 -2
  81. package/dist/{framework-components-3DdB31mk-BPGSuOyZ.mjs.map → framework-components-3DdB31mk-BHyX-OlJ.mjs.map} +1 -1
  82. package/dist/{graph-membership-h9ejuZla-ewjYM5wz.mjs → graph-membership-BEmNEMtP-rz61CLM5.mjs} +3 -3
  83. package/dist/{graph-membership-h9ejuZla-ewjYM5wz.mjs.map → graph-membership-BEmNEMtP-rz61CLM5.mjs.map} +1 -1
  84. package/dist/index-Df9igRvP.d.mts +18 -0
  85. package/dist/index-Df9igRvP.d.mts.map +1 -0
  86. package/dist/{init-CPB89WK2-Di4kgP6B.mjs → init-CPB89WK2-DPZRZ9Ee.mjs} +3 -3
  87. package/dist/{init-CPB89WK2-Di4kgP6B.mjs.map → init-CPB89WK2-DPZRZ9Ee.mjs.map} +1 -1
  88. package/dist/{inspect-live-schema-DEYE4EHW-DmSfKdpv.mjs → inspect-live-schema-Da76TWOs-CAFqkhGb.mjs} +4 -4
  89. package/dist/{inspect-live-schema-DEYE4EHW-DmSfKdpv.mjs.map → inspect-live-schema-Da76TWOs-CAFqkhGb.mjs.map} +1 -1
  90. package/dist/invariants-BzYfO9IL-BXTvx0z9.mjs +52 -0
  91. package/dist/invariants-BzYfO9IL-BXTvx0z9.mjs.map +1 -0
  92. package/dist/{invariants-CMcQxRas-CXX9uhQW.mjs → invariants-C1WVUAH7-DlOBTTkM.mjs} +3 -3
  93. package/dist/{invariants-CMcQxRas-CXX9uhQW.mjs.map → invariants-C1WVUAH7-DlOBTTkM.mjs.map} +1 -1
  94. package/dist/{io-CL3hSv42-DGZtTs89.mjs → io-CHUUeHh0-CoCBe9eN.mjs} +5 -5
  95. package/dist/{io-CL3hSv42-DGZtTs89.mjs.map → io-CHUUeHh0-CoCBe9eN.mjs.map} +1 -1
  96. package/dist/legend-5iwwlLU2-CB8bdQKJ.mjs +22 -0
  97. package/dist/legend-5iwwlLU2-CB8bdQKJ.mjs.map +1 -0
  98. package/dist/{migrate-COusRrm7.mjs → migrate-B-NAuO90.mjs} +87 -230
  99. package/dist/migrate-B-NAuO90.mjs.map +1 -0
  100. package/dist/migrate-show-60NNqVia-oGqMaVA9.d.mts +56 -0
  101. package/dist/migrate-show-60NNqVia-oGqMaVA9.d.mts.map +1 -0
  102. package/dist/migrate-show-B2LkXkoB-D1ZNl84C.mjs +202 -0
  103. package/dist/migrate-show-B2LkXkoB-D1ZNl84C.mjs.map +1 -0
  104. package/dist/{migration-diUAhNaa.mjs → migration-DAJY-NmR.mjs} +3 -3
  105. package/dist/{migration-diUAhNaa.mjs.map → migration-DAJY-NmR.mjs.map} +1 -1
  106. package/dist/migration-check-BDjtAn7x-B0nEBR0k.mjs +254 -0
  107. package/dist/migration-check-BDjtAn7x-B0nEBR0k.mjs.map +1 -0
  108. package/dist/{migration-check-CueEJelQ-J81XR_ns.mjs → migration-check-DONPyXff-CGTUpLv-.mjs} +12 -254
  109. package/dist/migration-check-DONPyXff-CGTUpLv-.mjs.map +1 -0
  110. package/dist/{migration-command-scaffold-DNRo4exb-9JCezdoT.mjs → migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs} +4 -4
  111. package/dist/{migration-command-scaffold-DNRo4exb-9JCezdoT.mjs.map → migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs.map} +1 -1
  112. package/dist/{migration-graph-D6bN-mX0-DwMWY8DA.mjs → migration-graph-DDaOHo10-yJFAbKCu.mjs} +3 -3
  113. package/dist/{migration-graph-D6bN-mX0-DwMWY8DA.mjs.map → migration-graph-DDaOHo10-yJFAbKCu.mjs.map} +1 -1
  114. package/dist/{migration-graph-BL6vfLcE.mjs → migration-graph-Dn469b0l.mjs} +10 -19
  115. package/dist/migration-graph-Dn469b0l.mjs.map +1 -0
  116. package/dist/migration-graph-HKch1Xk4-DyWhXtjZ.mjs +35 -0
  117. package/dist/migration-graph-HKch1Xk4-DyWhXtjZ.mjs.map +1 -0
  118. package/dist/migration-list-C9OPCMt--C28yBgVr.mjs +102 -0
  119. package/dist/migration-list-C9OPCMt--C28yBgVr.mjs.map +1 -0
  120. package/dist/migration-list-jk4iCtmO.mjs +120 -0
  121. package/dist/migration-list-jk4iCtmO.mjs.map +1 -0
  122. package/dist/{migration-log-BXbz6-Lj-CKHbat5f.mjs → migration-log-DQzUBrm8-D3m9wcuf.mjs} +7 -5
  123. package/dist/migration-log-DQzUBrm8-D3m9wcuf.mjs.map +1 -0
  124. package/dist/migration-new-BkSY6m0t.mjs +50 -0
  125. package/dist/migration-new-BkSY6m0t.mjs.map +1 -0
  126. package/dist/{migration-new-szZFsA3C.mjs → migration-new-g98oB3nC-BcrkxAAt.mjs} +12 -52
  127. package/dist/migration-new-g98oB3nC-BcrkxAAt.mjs.map +1 -0
  128. package/dist/{migration-path-target-BPYp3LNc-qRQlG_Yn.mjs → migration-path-target-BPYp3LNc-DsDdLU0J.mjs} +2 -2
  129. package/dist/{migration-path-target-BPYp3LNc-qRQlG_Yn.mjs.map → migration-path-target-BPYp3LNc-DsDdLU0J.mjs.map} +1 -1
  130. package/dist/migration-plan-BsOYRogP-CC1UFAbu.d.mts +159 -0
  131. package/dist/migration-plan-BsOYRogP-CC1UFAbu.d.mts.map +1 -0
  132. package/dist/migration-plan-CjIYMJZy.mjs +172 -0
  133. package/dist/migration-plan-CjIYMJZy.mjs.map +1 -0
  134. package/dist/{migration-plan-CxXAXYc8-Dnp-v8Nl.mjs → migration-plan-CwuZLXVE-DAJ-JUQT.mjs} +45 -183
  135. package/dist/migration-plan-CwuZLXVE-DAJ-JUQT.mjs.map +1 -0
  136. package/dist/{migration-show-BKsIh7Uz.mjs → migration-show-CW6EKtfw.mjs} +13 -9
  137. package/dist/migration-show-CW6EKtfw.mjs.map +1 -0
  138. package/dist/{migration-status-CNnRInne--cvmx56T.mjs → migration-status-DSQcBhiN.mjs} +37 -68
  139. package/dist/migration-status-DSQcBhiN.mjs.map +1 -0
  140. package/dist/migration-tools.d.mts +4 -4
  141. package/dist/migration-tools.mjs +13 -13
  142. package/dist/migration-tools__aggregate.mjs +1 -1
  143. package/dist/migration-tools__contract-snapshot-store.mjs +1 -1
  144. package/dist/migration-tools__errors.d.mts +2 -2
  145. package/dist/migration-tools__errors.mjs +2 -2
  146. package/dist/migration-tools__invariants.mjs +1 -1
  147. package/dist/migration-tools__io.mjs +1 -1
  148. package/dist/migration-tools__migration-graph.mjs +2 -2
  149. package/dist/migration-tools__migration.mjs +1 -1
  150. package/dist/migration-tools__ref-resolution.mjs +1 -1
  151. package/dist/migration-tools__refs.mjs +1 -1
  152. package/dist/migration-tools__spaces.mjs +2 -2
  153. package/dist/{project-import-root-C_bd0ooL-CLXW-gp6.mjs → project-import-root-C_bd0ooL-WkbJLnAA.mjs} +2 -2
  154. package/dist/{project-import-root-C_bd0ooL-CLXW-gp6.mjs.map → project-import-root-C_bd0ooL-WkbJLnAA.mjs.map} +1 -1
  155. package/dist/ref-DSAZime8.mjs +72 -0
  156. package/dist/ref-DSAZime8.mjs.map +1 -0
  157. package/dist/ref-advancement-DaZBzm7m-BZQtedYC.mjs +96 -0
  158. package/dist/ref-advancement-DaZBzm7m-BZQtedYC.mjs.map +1 -0
  159. package/dist/ref-eJjxzYTh-CNiyDL4p.mjs +109 -0
  160. package/dist/ref-eJjxzYTh-CNiyDL4p.mjs.map +1 -0
  161. package/dist/{ref-resolution-BsdziDFA.mjs → ref-resolution-Ct2GMcNB.mjs} +2 -2
  162. package/dist/{ref-resolution-BsdziDFA.mjs.map → ref-resolution-Ct2GMcNB.mjs.map} +1 -1
  163. package/dist/ref-resolution-_S4xTT2L-BE5zgO2W.mjs +16 -0
  164. package/dist/ref-resolution-_S4xTT2L-BE5zgO2W.mjs.map +1 -0
  165. package/dist/{refs-DtoeUivZ-qay0UMSP.mjs → refs-B2BL8z3i-DGGFB7Mj.mjs} +3 -3
  166. package/dist/{refs-DtoeUivZ-qay0UMSP.mjs.map → refs-B2BL8z3i-DGGFB7Mj.mjs.map} +1 -1
  167. package/dist/refs-fQLFcMoq-UTlvnijY.mjs +47 -0
  168. package/dist/refs-fQLFcMoq-UTlvnijY.mjs.map +1 -0
  169. package/dist/{spaces-BNd2Tlk0.mjs → spaces-DxuvClN9.mjs} +6 -6
  170. package/dist/{spaces-BNd2Tlk0.mjs.map → spaces-DxuvClN9.mjs.map} +1 -1
  171. package/dist/{telemetry-DVBHDQd6-BEdoMii0.mjs → telemetry-DVBHDQd6-Ckn5oClN.mjs} +2 -2
  172. package/dist/{telemetry-DVBHDQd6-BEdoMii0.mjs.map → telemetry-DVBHDQd6-Ckn5oClN.mjs.map} +1 -1
  173. package/dist/{verify-C6L_hiJU-CN3eEe3Y.mjs → verify-C6L_hiJU-B4V3bqvG.mjs} +2 -2
  174. package/dist/{verify-C6L_hiJU-CN3eEe3Y.mjs.map → verify-C6L_hiJU-B4V3bqvG.mjs.map} +1 -1
  175. package/dist/{verify-contract-spaces-Ak73-zQK-y4qVyu-y.mjs → verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs} +4 -4
  176. package/dist/{verify-contract-spaces-Ak73-zQK-y4qVyu-y.mjs.map → verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs.map} +1 -1
  177. package/dist/vite-plugin-contract-emit.mjs +1 -1
  178. package/package.json +12 -12
  179. package/dist/config-loader.d.mts.map +0 -1
  180. package/dist/contract-at-errors-YdCQ5OOk-okxG7Eaj.mjs.map +0 -1
  181. package/dist/contract-space-aggregate-loader-CziO_ZRW-DIoQOL0P.mjs.map +0 -1
  182. package/dist/db-init-CXMcvoIA.mjs.map +0 -1
  183. package/dist/db-sign-xV_rpoIc.mjs.map +0 -1
  184. package/dist/db-update-DXa2DIvu.mjs.map +0 -1
  185. package/dist/errors-AkMBj-YP.d.mts.map +0 -1
  186. package/dist/migrate-COusRrm7.mjs.map +0 -1
  187. package/dist/migration-check-CueEJelQ-J81XR_ns.mjs.map +0 -1
  188. package/dist/migration-graph-BL6vfLcE.mjs.map +0 -1
  189. package/dist/migration-list-D2_JdzWC-MRHYYVQE.mjs +0 -228
  190. package/dist/migration-list-D2_JdzWC-MRHYYVQE.mjs.map +0 -1
  191. package/dist/migration-log-BXbz6-Lj-CKHbat5f.mjs.map +0 -1
  192. package/dist/migration-new-szZFsA3C.mjs.map +0 -1
  193. package/dist/migration-plan-CxXAXYc8-Dnp-v8Nl.mjs.map +0 -1
  194. package/dist/migration-show-BKsIh7Uz.mjs.map +0 -1
  195. package/dist/migration-status-CNnRInne--cvmx56T.mjs.map +0 -1
  196. package/dist/ref-DjZ5Y8ju.mjs +0 -171
  197. package/dist/ref-DjZ5Y8ju.mjs.map +0 -1
  198. package/dist/ref-advancement-CSPMoQs3-CPkL3IFF.mjs +0 -57
  199. package/dist/ref-advancement-CSPMoQs3-CPkL3IFF.mjs.map +0 -1
  200. package/dist/types-2n_H3DQ9-Bks8UPEO.d.mts.map +0 -1
@@ -26,6 +26,7 @@ declare class MigrationToolsError extends CliStructuredError {
26
26
  readonly why: string;
27
27
  readonly fix: string;
28
28
  readonly meta?: Record<string, unknown>;
29
+ readonly cause?: unknown;
29
30
  });
30
31
  static is(error: unknown): error is MigrationToolsError;
31
32
  }
@@ -65,8 +66,11 @@ declare function errorUnknownInvariant(args: {
65
66
  readonly unknown: readonly string[];
66
67
  readonly declared: readonly string[];
67
68
  }): MigrationToolsError;
69
+ declare function errorContractDeserializationFailed(filePath: string, message: string, options?: {
70
+ readonly cause?: unknown;
71
+ }): MigrationToolsError;
68
72
  declare function errorContractSnapshotMissing(storageHash: string, expectedPath: string): MigrationToolsError;
69
73
  declare function errorContractSnapshotHashMismatch(storageHash: string, actualHash: string, dir: string): MigrationToolsError;
70
74
  //#endregion
71
- export { errorDescriptorHeadHashMismatch as a, errorNoInvariantPath as c, errorContractSnapshotMissing as i, errorUnknownInvariant as l, NoInvariantPathStructuralEdge as n, errorInvalidJson as o, errorContractSnapshotHashMismatch as r, errorInvalidRefName as s, MigrationToolsError as t };
72
- //# sourceMappingURL=errors-AkMBj-YP.d.mts.map
75
+ export { errorContractSnapshotMissing as a, errorInvalidRefName as c, errorContractSnapshotHashMismatch as i, errorNoInvariantPath as l, NoInvariantPathStructuralEdge as n, errorDescriptorHeadHashMismatch as o, errorContractDeserializationFailed as r, errorInvalidJson as s, MigrationToolsError as t, errorUnknownInvariant as u };
76
+ //# sourceMappingURL=errors-NRmFpwR1.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors-NRmFpwR1.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/errors.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;cAkBc,4BAA4B;WAC/B;WACA;WACA;WACA;EACT,YAAY,6BAA6B,iBAAiB;aAC/C;aACA;aACA,OAAO;aACP;;SAEJ,GAAG,iBAAiB,SAAS;;iBAErB,iBAAiB,kBAAkB,qBAAqB;iBACxD,gCAAgC;WACtC;WACA;WACA;IACP;iBACa,oBAAoB,kBAAkB;;;;;;;;;;;;UAY7C;WACC;WACA;WACA;WACA;WACA;;iBAEM,qBAAqB;WAC3B;WACA;WACA;WACA,yBAAyB;IAChC;iBACa,sBAAsB;WAC5B;WACA;WACA;IACP;iBACa,mCAAmC,kBAAkB,iBAAiB;WAC5E;IACP;iBACa,6BAA6B,qBAAqB,uBAAuB;iBACzE,kCAAkC,qBAAqB,oBAAoB,cAAc"}
@@ -1,4 +1,4 @@
1
- import { N as errorUnexpected, O as errorRuntime$1, W as formatStyledHeader, et as parseGlobalFlagsOrExit, o as createTerminalUI, ot as setCommandDescriptions, q as handleResult, r as addGlobalOptions, st as setCommandExamples, t as CliStructuredError$1 } from "./command-helpers-C4WpR-QE-CK2gkj6l.mjs";
1
+ import { N as errorUnexpected, O as errorRuntime$1, W as formatStyledHeader, et as parseGlobalFlagsOrExit, o as createTerminalUI, ot as setCommandDescriptions, q as handleResult, r as addGlobalOptions, st as setCommandExamples, t as CliStructuredError$1 } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
2
  import { r as loadConfig } from "./exports-CDX9kZuw.mjs";
3
3
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
4
4
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
@@ -101,4 +101,4 @@ function createFormatCommand() {
101
101
  //#endregion
102
102
  export { createFormatCommand as t };
103
103
 
104
- //# sourceMappingURL=format-Bw3LVJ1v-D10inUT9.mjs.map
104
+ //# sourceMappingURL=format-Bw3LVJ1v-BJ6lVFMA.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"format-Bw3LVJ1v-D10inUT9.mjs","names":["CliStructuredError","errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/format-Bw3LVJ1v.mjs"],"sourcesContent":["import { A as formatStyledHeader, F as CliStructuredError, _ as createTerminalUI, ct as errorUnexpected, g as parseGlobalFlagsOrExit, l as setCommandDescriptions, rt as errorRuntime, t as addGlobalOptions, u as setCommandExamples, y as handleResult } from \"./command-helpers-C4WpR-QE.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfig } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { relative, resolve } from \"pathe\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { EOL } from \"node:os\";\nimport { format } from \"@internal/psl-parser/format\";\n//#region src/control-api/operations/format.ts\nfunction resolveNewline(formatterNewline, eol) {\n\tif (formatterNewline !== void 0) return formatterNewline;\n\treturn eol === \"\\r\\n\" ? \"CRLF\" : \"LF\";\n}\nasync function executeFormat(options) {\n\tconst eol = options.eol ?? EOL;\n\tlet config;\n\ttry {\n\t\tconfig = await loadConfig(options.configPath);\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error)));\n\t}\n\tconst source = config.contract?.source;\n\tif (source?.format !== \"psl\") return ok({ formatted: false });\n\tconst inputPath = source.inputs?.[0];\n\tif (inputPath === void 0) return ok({ formatted: false });\n\tlet contents;\n\ttry {\n\t\tcontents = await readFile(inputPath, \"utf-8\");\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"CONTRACT.SOURCE_LOAD_FAILED\", \"Failed to read contract source file\", {\n\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\tfix: `Check that ${inputPath} exists and is readable.`,\n\t\t\tcause: error\n\t\t}));\n\t}\n\tconst formatOptions = {\n\t\tindent: config.formatter?.indent ?? 2,\n\t\tnewline: resolveNewline(config.formatter?.newline, eol)\n\t};\n\tlet formatted;\n\ttry {\n\t\tformatted = format(contents, formatOptions);\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"PSL.PARSE_FAILED\") return notOk(errorRuntime(\"PSL.PARSE_FAILED\", \"Cannot format PSL with parse errors\", {\n\t\t\twhy: error.message,\n\t\t\tfix: \"Fix the parse errors in your schema and try again.\",\n\t\t\tmeta: { diagnostics: error.meta?.[\"diagnostics\"] },\n\t\t\tcause: error\n\t\t}));\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error)));\n\t}\n\ttry {\n\t\tawait writeFile(inputPath, formatted, \"utf-8\");\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"CLI.FILE_WRITE_FAILED\", \"Failed to write formatted contract source file\", {\n\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\tfix: `Check that ${inputPath} is writable.`,\n\t\t\tcause: error\n\t\t}));\n\t}\n\treturn ok({\n\t\tformatted: true,\n\t\tpath: inputPath\n\t});\n}\n//#endregion\n//#region src/commands/format.ts\nfunction createFormatCommand() {\n\tconst command = new Command(\"format\");\n\tsetCommandDescriptions(command, \"Format your PSL contract source\", \"Formats the Prisma schema (PSL) contract source declared in your config\\n(contract.source.inputs[0]) in place. Only runs when contract.source.format\\nis 'psl'; a TypeScript or unset source is left untouched. Indent and newline are\\nread from the optional formatter config section, defaulting to two spaces and the\\nsystem newline.\");\n\tsetCommandExamples(command, [\"prisma-next format\", \"prisma-next format --config ./custom-config.ts\"]);\n\taddGlobalOptions(command).option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tif (!flags.json && !flags.quiet) {\n\t\t\tconst displayConfigPath = options.config ? relative(process.cwd(), resolve(options.config)) : \"prisma-next.config.ts\";\n\t\t\tui.stderr(formatStyledHeader({\n\t\t\t\tcommand: \"format\",\n\t\t\t\tdescription: \"Format your PSL contract source\",\n\t\t\t\tdetails: [{\n\t\t\t\t\tlabel: \"config\",\n\t\t\t\t\tvalue: displayConfigPath\n\t\t\t\t}],\n\t\t\t\tflags\n\t\t\t}));\n\t\t}\n\t\tconst exitCode = handleResult(await executeFormat({ ...ifDefined(\"configPath\", options.config) }), flags, ui, (value) => {\n\t\t\tif (flags.json) {\n\t\t\t\tui.output(JSON.stringify(value));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (flags.quiet) return;\n\t\t\tif (value.formatted) ui.success(`Formatted ${relative(process.cwd(), value.path ?? \"\")}`);\n\t\t\telse ui.info(\"Nothing to format (contract source is not PSL).\");\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { createFormatCommand as t };\n\n//# sourceMappingURL=format-Bw3LVJ1v.mjs.map"],"mappings":"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"}
1
+ {"version":3,"file":"format-Bw3LVJ1v-BJ6lVFMA.mjs","names":["CliStructuredError","errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/format-Bw3LVJ1v.mjs"],"sourcesContent":["import { A as formatStyledHeader, F as CliStructuredError, _ as createTerminalUI, ct as errorUnexpected, g as parseGlobalFlagsOrExit, l as setCommandDescriptions, rt as errorRuntime, t as addGlobalOptions, u as setCommandExamples, y as handleResult } from \"./command-helpers-C4WpR-QE.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfig } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { relative, resolve } from \"pathe\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { EOL } from \"node:os\";\nimport { format } from \"@internal/psl-parser/format\";\n//#region src/control-api/operations/format.ts\nfunction resolveNewline(formatterNewline, eol) {\n\tif (formatterNewline !== void 0) return formatterNewline;\n\treturn eol === \"\\r\\n\" ? \"CRLF\" : \"LF\";\n}\nasync function executeFormat(options) {\n\tconst eol = options.eol ?? EOL;\n\tlet config;\n\ttry {\n\t\tconfig = await loadConfig(options.configPath);\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error)));\n\t}\n\tconst source = config.contract?.source;\n\tif (source?.format !== \"psl\") return ok({ formatted: false });\n\tconst inputPath = source.inputs?.[0];\n\tif (inputPath === void 0) return ok({ formatted: false });\n\tlet contents;\n\ttry {\n\t\tcontents = await readFile(inputPath, \"utf-8\");\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"CONTRACT.SOURCE_LOAD_FAILED\", \"Failed to read contract source file\", {\n\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\tfix: `Check that ${inputPath} exists and is readable.`,\n\t\t\tcause: error\n\t\t}));\n\t}\n\tconst formatOptions = {\n\t\tindent: config.formatter?.indent ?? 2,\n\t\tnewline: resolveNewline(config.formatter?.newline, eol)\n\t};\n\tlet formatted;\n\ttry {\n\t\tformatted = format(contents, formatOptions);\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"PSL.PARSE_FAILED\") return notOk(errorRuntime(\"PSL.PARSE_FAILED\", \"Cannot format PSL with parse errors\", {\n\t\t\twhy: error.message,\n\t\t\tfix: \"Fix the parse errors in your schema and try again.\",\n\t\t\tmeta: { diagnostics: error.meta?.[\"diagnostics\"] },\n\t\t\tcause: error\n\t\t}));\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error)));\n\t}\n\ttry {\n\t\tawait writeFile(inputPath, formatted, \"utf-8\");\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"CLI.FILE_WRITE_FAILED\", \"Failed to write formatted contract source file\", {\n\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\tfix: `Check that ${inputPath} is writable.`,\n\t\t\tcause: error\n\t\t}));\n\t}\n\treturn ok({\n\t\tformatted: true,\n\t\tpath: inputPath\n\t});\n}\n//#endregion\n//#region src/commands/format.ts\nfunction createFormatCommand() {\n\tconst command = new Command(\"format\");\n\tsetCommandDescriptions(command, \"Format your PSL contract source\", \"Formats the Prisma schema (PSL) contract source declared in your config\\n(contract.source.inputs[0]) in place. Only runs when contract.source.format\\nis 'psl'; a TypeScript or unset source is left untouched. Indent and newline are\\nread from the optional formatter config section, defaulting to two spaces and the\\nsystem newline.\");\n\tsetCommandExamples(command, [\"prisma-next format\", \"prisma-next format --config ./custom-config.ts\"]);\n\taddGlobalOptions(command).option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tif (!flags.json && !flags.quiet) {\n\t\t\tconst displayConfigPath = options.config ? relative(process.cwd(), resolve(options.config)) : \"prisma-next.config.ts\";\n\t\t\tui.stderr(formatStyledHeader({\n\t\t\t\tcommand: \"format\",\n\t\t\t\tdescription: \"Format your PSL contract source\",\n\t\t\t\tdetails: [{\n\t\t\t\t\tlabel: \"config\",\n\t\t\t\t\tvalue: displayConfigPath\n\t\t\t\t}],\n\t\t\t\tflags\n\t\t\t}));\n\t\t}\n\t\tconst exitCode = handleResult(await executeFormat({ ...ifDefined(\"configPath\", options.config) }), flags, ui, (value) => {\n\t\t\tif (flags.json) {\n\t\t\t\tui.output(JSON.stringify(value));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (flags.quiet) return;\n\t\t\tif (value.formatted) ui.success(`Formatted ${relative(process.cwd(), value.path ?? \"\")}`);\n\t\t\telse ui.info(\"Nothing to format (contract source is not PSL).\");\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { createFormatCommand as t };\n\n//# sourceMappingURL=format-Bw3LVJ1v.mjs.map"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- import { l as errorConfigValidation } from "./command-helpers-C4WpR-QE-CK2gkj6l.mjs";
1
+ import { l as errorConfigValidation } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
2
  import "@prisma/orm-framework/components/components";
3
3
  //#region ../../../1-framework/3-tooling/cli/dist/framework-components-3DdB31mk.mjs
4
4
  /**
@@ -55,4 +55,4 @@ function assertFrameworkComponentsCompatible(expectedFamilyId, expectedTargetId,
55
55
  //#endregion
56
56
  export { assertFrameworkComponentsCompatible as t };
57
57
 
58
- //# sourceMappingURL=framework-components-3DdB31mk-BPGSuOyZ.mjs.map
58
+ //# sourceMappingURL=framework-components-3DdB31mk-BHyX-OlJ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"framework-components-3DdB31mk-BPGSuOyZ.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/framework-components-3DdB31mk.mjs"],"sourcesContent":["import { R as errorConfigValidation } from \"./command-helpers-C4WpR-QE.mjs\";\nimport \"@internal/framework-components/components\";\n//#region src/utils/framework-components.ts\n/**\n* Asserts that all framework components are compatible with the expected family and target.\n*\n* This function validates that each component in the framework components array:\n* - Has kind 'target', 'adapter', 'extension', or 'driver'\n* - Has familyId matching expectedFamilyId\n* - Has targetId matching expectedTargetId\n*\n* This validation happens at the CLI composition boundary, before passing components\n* to typed planner/runner instances. It fills the gap between runtime validation\n* (via `validateConfig()`) and compile-time type enforcement.\n*\n* @param expectedFamilyId - The expected family ID (e.g., 'sql')\n* @param expectedTargetId - The expected target ID (e.g., 'postgres')\n* @param frameworkComponents - Array of framework components to validate\n* @returns The same array typed as TargetBoundComponentDescriptor\n* @throws CliStructuredError if any component is incompatible\n*\n* @example\n* ```ts\n* const config = await loadConfig();\n* const frameworkComponents = [config.target, config.adapter, ...(config.extensions ?? [])];\n*\n* // Validate and type-narrow components before passing to planner\n* const typedComponents = assertFrameworkComponentsCompatible(\n* config.family.familyId,\n* config.target.targetId,\n* frameworkComponents\n* );\n*\n* const planner = target.migrations.createPlanner(familyInstance);\n* planner.plan({ contract, schema, policy, frameworkComponents: typedComponents });\n* ```\n*/\nfunction assertFrameworkComponentsCompatible(expectedFamilyId, expectedTargetId, frameworkComponents) {\n\tfor (let i = 0; i < frameworkComponents.length; i++) {\n\t\tconst component = frameworkComponents[i];\n\t\tif (typeof component !== \"object\" || component === null) throw errorConfigValidation(\"frameworkComponents[]\", { why: `Framework component at index ${i} must be an object` });\n\t\tconst record = component;\n\t\tif (!Object.hasOwn(record, \"kind\")) throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} must have 'kind' property` });\n\t\tconst kind = record[\"kind\"];\n\t\tif (kind !== \"target\" && kind !== \"adapter\" && kind !== \"extension\" && kind !== \"driver\") throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} has invalid kind '${String(kind)}' (must be 'target', 'adapter', 'extension', or 'driver')` });\n\t\tif (!Object.hasOwn(record, \"familyId\")) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'familyId' property` });\n\t\tconst familyId = record[\"familyId\"];\n\t\tif (familyId !== expectedFamilyId) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has familyId '${String(familyId)}' but expected '${expectedFamilyId}'` });\n\t\tif (!Object.hasOwn(record, \"targetId\")) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'targetId' property` });\n\t\tconst targetId = record[\"targetId\"];\n\t\tif (targetId !== expectedTargetId) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has targetId '${String(targetId)}' but expected '${expectedTargetId}'` });\n\t}\n\treturn frameworkComponents;\n}\n//#endregion\nexport { assertFrameworkComponentsCompatible as t };\n\n//# sourceMappingURL=framework-components-3DdB31mk.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,oCAAoC,kBAAkB,kBAAkB,qBAAqB;CACrG,KAAK,IAAI,IAAI,GAAG,IAAI,oBAAoB,QAAQ,KAAK;EACpD,MAAM,YAAY,oBAAoB;EACtC,IAAI,OAAO,cAAc,YAAY,cAAc,MAAM,MAAM,sBAAsB,yBAAyB,EAAE,KAAK,gCAAgC,EAAE,oBAAoB,CAAC;EAC5K,MAAM,SAAS;EACf,IAAI,CAAC,OAAO,OAAO,QAAQ,MAAM,GAAG,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,4BAA4B,CAAC;EACpK,MAAM,OAAO,OAAO;EACpB,IAAI,SAAS,YAAY,SAAS,aAAa,SAAS,eAAe,SAAS,UAAU,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,qBAAqB,OAAO,IAAI,EAAE,2DAA2D,CAAC;EAC3R,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;EAC3O,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;CAC5O;CACA,OAAO;AACR"}
1
+ {"version":3,"file":"framework-components-3DdB31mk-BHyX-OlJ.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/framework-components-3DdB31mk.mjs"],"sourcesContent":["import { R as errorConfigValidation } from \"./command-helpers-C4WpR-QE.mjs\";\nimport \"@internal/framework-components/components\";\n//#region src/utils/framework-components.ts\n/**\n* Asserts that all framework components are compatible with the expected family and target.\n*\n* This function validates that each component in the framework components array:\n* - Has kind 'target', 'adapter', 'extension', or 'driver'\n* - Has familyId matching expectedFamilyId\n* - Has targetId matching expectedTargetId\n*\n* This validation happens at the CLI composition boundary, before passing components\n* to typed planner/runner instances. It fills the gap between runtime validation\n* (via `validateConfig()`) and compile-time type enforcement.\n*\n* @param expectedFamilyId - The expected family ID (e.g., 'sql')\n* @param expectedTargetId - The expected target ID (e.g., 'postgres')\n* @param frameworkComponents - Array of framework components to validate\n* @returns The same array typed as TargetBoundComponentDescriptor\n* @throws CliStructuredError if any component is incompatible\n*\n* @example\n* ```ts\n* const config = await loadConfig();\n* const frameworkComponents = [config.target, config.adapter, ...(config.extensions ?? [])];\n*\n* // Validate and type-narrow components before passing to planner\n* const typedComponents = assertFrameworkComponentsCompatible(\n* config.family.familyId,\n* config.target.targetId,\n* frameworkComponents\n* );\n*\n* const planner = target.migrations.createPlanner(familyInstance);\n* planner.plan({ contract, schema, policy, frameworkComponents: typedComponents });\n* ```\n*/\nfunction assertFrameworkComponentsCompatible(expectedFamilyId, expectedTargetId, frameworkComponents) {\n\tfor (let i = 0; i < frameworkComponents.length; i++) {\n\t\tconst component = frameworkComponents[i];\n\t\tif (typeof component !== \"object\" || component === null) throw errorConfigValidation(\"frameworkComponents[]\", { why: `Framework component at index ${i} must be an object` });\n\t\tconst record = component;\n\t\tif (!Object.hasOwn(record, \"kind\")) throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} must have 'kind' property` });\n\t\tconst kind = record[\"kind\"];\n\t\tif (kind !== \"target\" && kind !== \"adapter\" && kind !== \"extension\" && kind !== \"driver\") throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} has invalid kind '${String(kind)}' (must be 'target', 'adapter', 'extension', or 'driver')` });\n\t\tif (!Object.hasOwn(record, \"familyId\")) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'familyId' property` });\n\t\tconst familyId = record[\"familyId\"];\n\t\tif (familyId !== expectedFamilyId) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has familyId '${String(familyId)}' but expected '${expectedFamilyId}'` });\n\t\tif (!Object.hasOwn(record, \"targetId\")) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'targetId' property` });\n\t\tconst targetId = record[\"targetId\"];\n\t\tif (targetId !== expectedTargetId) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has targetId '${String(targetId)}' but expected '${expectedTargetId}'` });\n\t}\n\treturn frameworkComponents;\n}\n//#endregion\nexport { assertFrameworkComponentsCompatible as t };\n\n//# sourceMappingURL=framework-components-3DdB31mk.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,oCAAoC,kBAAkB,kBAAkB,qBAAqB;CACrG,KAAK,IAAI,IAAI,GAAG,IAAI,oBAAoB,QAAQ,KAAK;EACpD,MAAM,YAAY,oBAAoB;EACtC,IAAI,OAAO,cAAc,YAAY,cAAc,MAAM,MAAM,sBAAsB,yBAAyB,EAAE,KAAK,gCAAgC,EAAE,oBAAoB,CAAC;EAC5K,MAAM,SAAS;EACf,IAAI,CAAC,OAAO,OAAO,QAAQ,MAAM,GAAG,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,4BAA4B,CAAC;EACpK,MAAM,OAAO,OAAO;EACpB,IAAI,SAAS,YAAY,SAAS,aAAa,SAAS,eAAe,SAAS,UAAU,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,qBAAqB,OAAO,IAAI,EAAE,2DAA2D,CAAC;EAC3R,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;EAC3O,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;CAC5O;CACA,OAAO;AACR"}
@@ -1,5 +1,5 @@
1
- import { p as errorHashNotInGraph } from "./errors-BwusfLIN-BXM7K-ww.mjs";
2
- //#region ../../../1-framework/3-tooling/migration/dist/graph-membership-h9ejuZla.mjs
1
+ import { p as errorHashNotInGraph } from "./errors-Co-8oaiB-CB-6Uqki.mjs";
2
+ //#region ../../../1-framework/3-tooling/migration/dist/graph-membership-BEmNEMtP.mjs
3
3
  function isGraphNode(hash, graph) {
4
4
  if (hash === "empty") return true;
5
5
  return graph.nodes.has(hash);
@@ -11,4 +11,4 @@ function assertHashIsGraphNode(hash, graph) {
11
11
  //#endregion
12
12
  export { isGraphNode as n, assertHashIsGraphNode as t };
13
13
 
14
- //# sourceMappingURL=graph-membership-h9ejuZla-ewjYM5wz.mjs.map
14
+ //# sourceMappingURL=graph-membership-BEmNEMtP-rz61CLM5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph-membership-h9ejuZla-ewjYM5wz.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/graph-membership-h9ejuZla.mjs"],"sourcesContent":["import { p as errorHashNotInGraph } from \"./errors-BwusfLIN.mjs\";\nimport \"./constants-CM-w38DQ.mjs\";\n//#region src/graph-membership.ts\nfunction isGraphNode(hash, graph) {\n\tif (hash === \"empty\") return true;\n\treturn graph.nodes.has(hash);\n}\nfunction assertHashIsGraphNode(hash, graph) {\n\tif (isGraphNode(hash, graph)) return;\n\tthrow errorHashNotInGraph(hash, graph);\n}\n//#endregion\nexport { isGraphNode as n, assertHashIsGraphNode as t };\n\n//# sourceMappingURL=graph-membership-h9ejuZla.mjs.map"],"mappings":";;AAGA,SAAS,YAAY,MAAM,OAAO;CACjC,IAAI,SAAS,SAAS,OAAO;CAC7B,OAAO,MAAM,MAAM,IAAI,IAAI;AAC5B;AACA,SAAS,sBAAsB,MAAM,OAAO;CAC3C,IAAI,YAAY,MAAM,KAAK,GAAG;CAC9B,MAAM,oBAAoB,MAAM,KAAK;AACtC"}
1
+ {"version":3,"file":"graph-membership-BEmNEMtP-rz61CLM5.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/graph-membership-BEmNEMtP.mjs"],"sourcesContent":["import { p as errorHashNotInGraph } from \"./errors-Co-8oaiB.mjs\";\nimport \"./constants-CM-w38DQ.mjs\";\n//#region src/graph-membership.ts\nfunction isGraphNode(hash, graph) {\n\tif (hash === \"empty\") return true;\n\treturn graph.nodes.has(hash);\n}\nfunction assertHashIsGraphNode(hash, graph) {\n\tif (isGraphNode(hash, graph)) return;\n\tthrow errorHashNotInGraph(hash, graph);\n}\n//#endregion\nexport { isGraphNode as n, assertHashIsGraphNode as t };\n\n//# sourceMappingURL=graph-membership-BEmNEMtP.mjs.map"],"mappings":";;AAGA,SAAS,YAAY,MAAM,OAAO;CACjC,IAAI,SAAS,SAAS,OAAO;CAC7B,OAAO,MAAM,MAAM,IAAI,IAAI;AAC5B;AACA,SAAS,sBAAsB,MAAM,OAAO;CAC3C,IAAI,YAAY,MAAM,KAAK,GAAG;CAC9B,MAAM,oBAAoB,MAAM,KAAK;AACtC"}
@@ -0,0 +1,18 @@
1
+ import { PrismaNextConfig, PrismaNextConfig as PrismaNextConfig$1 } from "@prisma/orm-framework/config/config-types";
2
+ //#region ../../../1-framework/3-tooling/config-loader/dist/exports/index.d.mts
3
+ //#region src/finalize-config.d.ts
4
+ declare function finalizeConfig(config: PrismaNextConfig, configDir: string): PrismaNextConfig;
5
+ //#endregion
6
+ //#region src/load.d.ts
7
+ declare function findNearestConfigPathForFile(filePath: string): Promise<string | undefined>;
8
+ /**
9
+ * Loads, validates, and finalizes the Prisma Next config, mapping every failure
10
+ * to a structured `@internal/errors/control` error (`CliStructuredError`).
11
+ * This is the sole public entry point: callers that need to degrade gracefully
12
+ * (e.g. the language server) branch on the structured error's stable `.code`.
13
+ */
14
+ declare function loadConfig(configPath?: string): Promise<PrismaNextConfig>;
15
+ declare function loadConfigForFile(filePath: string): Promise<PrismaNextConfig>;
16
+ //#endregion
17
+ export { loadConfigForFile as a, loadConfig as i, finalizeConfig as n, findNearestConfigPathForFile as r, PrismaNextConfig$1 as t };
18
+ //# sourceMappingURL=index-Df9igRvP.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Df9igRvP.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/config-loader/dist/exports/index.d.mts"],"mappings":";;;iBAEiB,eAAe,QAAQ,kBAAoB,oBAAoB;;;iBAG/D,6BAA6B,mBAAmB;;;;;;;iBAOhD,WAAW,sBAAsB,QAAQ;iBACzC,kBAAkB,mBAAmB,QAAQ"}
@@ -1,4 +1,4 @@
1
- import { I as formatErrorJson, L as formatErrorOutput, o as createTerminalUI, t as CliStructuredError$1 } from "./command-helpers-C4WpR-QE-CK2gkj6l.mjs";
1
+ import { I as formatErrorJson, L as formatErrorOutput, o as createTerminalUI, t as CliStructuredError$1 } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
2
  import { i as renderInitOutro, n as buildNextSteps, r as formatInitJson, t as InitOutputSchema } from "./output-DWNYqZGc-D2sRgLAm.mjs";
3
3
  import { a as schemaSample, c as targetLabel, i as scaffoldSpecifierResolverFor, l as targetPackageName, n as dbFile, o as starterSchema, r as defaultSchemaPath, s as targetEntrypoint, t as configFile, u as version } from "./bin__prisma-next.mjs";
4
4
  import { createRequire } from "node:module";
@@ -2181,7 +2181,7 @@ async function runEmit(ctx) {
2181
2181
  const spinner = ctx.ui.spinner();
2182
2182
  spinner.start("Emitting contract...");
2183
2183
  try {
2184
- const { executeContractEmit } = await import("./contract-emit-CTm2zfuG-8mtkxW8M.mjs").then((n) => n.t).then((n) => n.t);
2184
+ const { executeContractEmit } = await import("./contract-emit-CTm2zfuG-7PV9SBY6.mjs").then((n) => n.t).then((n) => n.t);
2185
2185
  await executeContractEmit({ configPath: join(ctx.baseDir, "prisma-next.config.ts") });
2186
2186
  spinner.stop("Contract emitted");
2187
2187
  } catch (err) {
@@ -2234,4 +2234,4 @@ function sanitisePackageName(raw) {
2234
2234
  //#endregion
2235
2235
  export { runInit };
2236
2236
 
2237
- //# sourceMappingURL=init-CPB89WK2-Di4kgP6B.mjs.map
2237
+ //# sourceMappingURL=init-CPB89WK2-DPZRZ9Ee.mjs.map