ddd-ts-kit 0.111.0 → 0.113.0

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 (899) hide show
  1. package/CHANGELOG.md +154 -0
  2. package/README.fr.md +52 -6
  3. package/README.md +48 -5
  4. package/dist/alias/index.d.ts +2 -0
  5. package/dist/alias/index.d.ts.map +1 -1
  6. package/dist/alias/index.js +2 -0
  7. package/dist/alias/index.js.map +1 -1
  8. package/dist/alias/neighbour-sources.d.ts +17 -0
  9. package/dist/alias/neighbour-sources.d.ts.map +1 -0
  10. package/dist/alias/neighbour-sources.js +11 -0
  11. package/dist/alias/neighbour-sources.js.map +1 -0
  12. package/dist/alias/neighbour-suffix.d.ts +8 -0
  13. package/dist/alias/neighbour-suffix.d.ts.map +1 -0
  14. package/dist/alias/neighbour-suffix.js +10 -0
  15. package/dist/alias/neighbour-suffix.js.map +1 -0
  16. package/dist/build/rewrite-aliases.d.ts.map +1 -1
  17. package/dist/build/rewrite-aliases.js +11 -0
  18. package/dist/build/rewrite-aliases.js.map +1 -1
  19. package/dist/check/alias/build-scripts.d.ts.map +1 -1
  20. package/dist/check/alias/build-scripts.js +4 -8
  21. package/dist/check/alias/build-scripts.js.map +1 -1
  22. package/dist/check/alias/compiler-options-of.d.ts +3 -3
  23. package/dist/check/alias/compiler-options-of.js +17 -6
  24. package/dist/check/alias/compiler-options-of.js.map +1 -1
  25. package/dist/check/alias/neighbour-sources.d.ts +12 -0
  26. package/dist/check/alias/neighbour-sources.d.ts.map +1 -0
  27. package/dist/check/alias/neighbour-sources.js +80 -0
  28. package/dist/check/alias/neighbour-sources.js.map +1 -0
  29. package/dist/check/alias/script-steps.d.ts +11 -0
  30. package/dist/check/alias/script-steps.d.ts.map +1 -0
  31. package/dist/check/alias/script-steps.js +22 -0
  32. package/dist/check/alias/script-steps.js.map +1 -0
  33. package/dist/check/aspects/adapter-policies.d.ts +10 -0
  34. package/dist/check/aspects/adapter-policies.d.ts.map +1 -0
  35. package/dist/check/aspects/adapter-policies.js +104 -0
  36. package/dist/check/aspects/adapter-policies.js.map +1 -0
  37. package/dist/check/aspects/adapter-policy.d.ts +18 -0
  38. package/dist/check/aspects/adapter-policy.d.ts.map +1 -0
  39. package/dist/check/aspects/adapter-policy.js +2 -0
  40. package/dist/check/aspects/adapter-policy.js.map +1 -0
  41. package/dist/check/aspects/is-under-condition.d.ts +7 -0
  42. package/dist/check/aspects/is-under-condition.d.ts.map +1 -0
  43. package/dist/check/aspects/is-under-condition.js +50 -0
  44. package/dist/check/aspects/is-under-condition.js.map +1 -0
  45. package/dist/check/aspects/stated-policy.d.ts +18 -0
  46. package/dist/check/aspects/stated-policy.d.ts.map +1 -0
  47. package/dist/check/aspects/stated-policy.js +39 -0
  48. package/dist/check/aspects/stated-policy.js.map +1 -0
  49. package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
  50. package/dist/check/catalogue/architecture-rules.js +6 -0
  51. package/dist/check/catalogue/architecture-rules.js.map +1 -1
  52. package/dist/check/commands/check-command.js +4 -3
  53. package/dist/check/commands/check-command.js.map +1 -1
  54. package/dist/check/explain/imports-docs.d.ts.map +1 -1
  55. package/dist/check/explain/imports-docs.js +5 -3
  56. package/dist/check/explain/imports-docs.js.map +1 -1
  57. package/dist/check/explain/persistence-docs.d.ts.map +1 -1
  58. package/dist/check/explain/persistence-docs.js +38 -0
  59. package/dist/check/explain/persistence-docs.js.map +1 -1
  60. package/dist/check/explain/standard-docs.d.ts.map +1 -1
  61. package/dist/check/explain/standard-docs.js +16 -0
  62. package/dist/check/explain/standard-docs.js.map +1 -1
  63. package/dist/check/files/kit-content-types.d.ts +12 -0
  64. package/dist/check/files/kit-content-types.d.ts.map +1 -0
  65. package/dist/check/files/kit-content-types.js +38 -0
  66. package/dist/check/files/kit-content-types.js.map +1 -0
  67. package/dist/check/files/upload-content-defect.d.ts +7 -0
  68. package/dist/check/files/upload-content-defect.d.ts.map +1 -0
  69. package/dist/check/files/upload-content-defect.js +2 -0
  70. package/dist/check/files/upload-content-defect.js.map +1 -0
  71. package/dist/check/files/upload-content-defects.d.ts +9 -0
  72. package/dist/check/files/upload-content-defects.d.ts.map +1 -0
  73. package/dist/check/files/upload-content-defects.js +54 -0
  74. package/dist/check/files/upload-content-defects.js.map +1 -0
  75. package/dist/check/files/upload-declaration.d.ts +7 -0
  76. package/dist/check/files/upload-declaration.d.ts.map +1 -0
  77. package/dist/check/files/upload-declaration.js +2 -0
  78. package/dist/check/files/upload-declaration.js.map +1 -0
  79. package/dist/check/files/upload-declarations.d.ts +9 -0
  80. package/dist/check/files/upload-declarations.d.ts.map +1 -0
  81. package/dist/check/files/upload-declarations.js +41 -0
  82. package/dist/check/files/upload-declarations.js.map +1 -0
  83. package/dist/check/fixtures/alias-declared-fixtures.d.ts.map +1 -1
  84. package/dist/check/fixtures/alias-declared-fixtures.js +95 -1
  85. package/dist/check/fixtures/alias-declared-fixtures.js.map +1 -1
  86. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  87. package/dist/check/fixtures/fixtures.js +4 -0
  88. package/dist/check/fixtures/fixtures.js.map +1 -1
  89. package/dist/check/fixtures/imports-fixtures.d.ts.map +1 -1
  90. package/dist/check/fixtures/imports-fixtures.js +97 -0
  91. package/dist/check/fixtures/imports-fixtures.js.map +1 -1
  92. package/dist/check/fixtures/read-model-list-files.d.ts +7 -0
  93. package/dist/check/fixtures/read-model-list-files.d.ts.map +1 -0
  94. package/dist/check/fixtures/read-model-list-files.js +18 -0
  95. package/dist/check/fixtures/read-model-list-files.js.map +1 -0
  96. package/dist/check/fixtures/read-model-listed-fixtures.d.ts +3 -0
  97. package/dist/check/fixtures/read-model-listed-fixtures.d.ts.map +1 -0
  98. package/dist/check/fixtures/read-model-listed-fixtures.js +292 -0
  99. package/dist/check/fixtures/read-model-listed-fixtures.js.map +1 -0
  100. package/dist/check/fixtures/standard-fixtures.d.ts.map +1 -1
  101. package/dist/check/fixtures/standard-fixtures.js +42 -0
  102. package/dist/check/fixtures/standard-fixtures.js.map +1 -1
  103. package/dist/check/fixtures/tenancy-fixtures.d.ts.map +1 -1
  104. package/dist/check/fixtures/tenancy-fixtures.js +2 -1
  105. package/dist/check/fixtures/tenancy-fixtures.js.map +1 -1
  106. package/dist/check/fixtures/tenancy-prisma-fixtures.d.ts.map +1 -1
  107. package/dist/check/fixtures/tenancy-prisma-fixtures.js +2 -0
  108. package/dist/check/fixtures/tenancy-prisma-fixtures.js.map +1 -1
  109. package/dist/check/fixtures/tenancy-typeorm-fixtures.d.ts.map +1 -1
  110. package/dist/check/fixtures/tenancy-typeorm-fixtures.js +2 -0
  111. package/dist/check/fixtures/tenancy-typeorm-fixtures.js.map +1 -1
  112. package/dist/check/fixtures/upload-fixtures.d.ts +3 -0
  113. package/dist/check/fixtures/upload-fixtures.d.ts.map +1 -0
  114. package/dist/check/fixtures/upload-fixtures.js +94 -0
  115. package/dist/check/fixtures/upload-fixtures.js.map +1 -0
  116. package/dist/check/migrations/is-working-migration.d.ts +6 -0
  117. package/dist/check/migrations/is-working-migration.d.ts.map +1 -0
  118. package/dist/check/migrations/is-working-migration.js +8 -0
  119. package/dist/check/migrations/is-working-migration.js.map +1 -0
  120. package/dist/check/migrations/journal-entries.d.ts +4 -0
  121. package/dist/check/migrations/journal-entries.d.ts.map +1 -0
  122. package/dist/check/migrations/journal-entries.js +21 -0
  123. package/dist/check/migrations/journal-entries.js.map +1 -0
  124. package/dist/check/migrations/read-drizzle-migrations.d.ts.map +1 -1
  125. package/dist/check/migrations/read-drizzle-migrations.js +4 -9
  126. package/dist/check/migrations/read-drizzle-migrations.js.map +1 -1
  127. package/dist/check/model/finding.d.ts +2 -1
  128. package/dist/check/model/finding.d.ts.map +1 -1
  129. package/dist/check/model/violation.d.ts +4 -1
  130. package/dist/check/model/violation.d.ts.map +1 -1
  131. package/dist/check/modules/imported-modules.d.ts +4 -0
  132. package/dist/check/modules/imported-modules.d.ts.map +1 -0
  133. package/dist/check/modules/imported-modules.js +5 -0
  134. package/dist/check/modules/imported-modules.js.map +1 -0
  135. package/dist/check/modules/module-imports.d.ts +17 -0
  136. package/dist/check/modules/module-imports.d.ts.map +1 -0
  137. package/dist/check/modules/module-imports.js +23 -0
  138. package/dist/check/modules/module-imports.js.map +1 -0
  139. package/dist/check/project/assemble-project.d.ts.map +1 -1
  140. package/dist/check/project/assemble-project.js +1 -8
  141. package/dist/check/project/assemble-project.js.map +1 -1
  142. package/dist/check/project/file-severity.d.ts +4 -0
  143. package/dist/check/project/file-severity.d.ts.map +1 -0
  144. package/dist/check/project/file-severity.js +11 -0
  145. package/dist/check/project/file-severity.js.map +1 -0
  146. package/dist/check/project/load-project.js +1 -10
  147. package/dist/check/project/load-project.js.map +1 -1
  148. package/dist/check/project/not-in-the-tree.d.ts +10 -0
  149. package/dist/check/project/not-in-the-tree.d.ts.map +1 -0
  150. package/dist/check/project/not-in-the-tree.js +17 -0
  151. package/dist/check/project/not-in-the-tree.js.map +1 -0
  152. package/dist/check/project/skipped-directories.d.ts +3 -0
  153. package/dist/check/project/skipped-directories.d.ts.map +1 -0
  154. package/dist/check/project/skipped-directories.js +3 -0
  155. package/dist/check/project/skipped-directories.js.map +1 -0
  156. package/dist/check/project/walk-directory.d.ts.map +1 -1
  157. package/dist/check/project/walk-directory.js +1 -1
  158. package/dist/check/project/walk-directory.js.map +1 -1
  159. package/dist/check/read-models/list-findings.d.ts +22 -0
  160. package/dist/check/read-models/list-findings.d.ts.map +1 -0
  161. package/dist/check/read-models/list-findings.js +84 -0
  162. package/dist/check/read-models/list-findings.js.map +1 -0
  163. package/dist/check/rules/aspects-timeout-covers-delegate.d.ts +3 -0
  164. package/dist/check/rules/aspects-timeout-covers-delegate.d.ts.map +1 -0
  165. package/dist/check/rules/aspects-timeout-covers-delegate.js +179 -0
  166. package/dist/check/rules/aspects-timeout-covers-delegate.js.map +1 -0
  167. package/dist/check/rules/declarations-port-adapter-wired.js +9 -2
  168. package/dist/check/rules/declarations-port-adapter-wired.js.map +1 -1
  169. package/dist/check/rules/files-upload-content-rule.d.ts +3 -0
  170. package/dist/check/rules/files-upload-content-rule.d.ts.map +1 -0
  171. package/dist/check/rules/files-upload-content-rule.js +25 -0
  172. package/dist/check/rules/files-upload-content-rule.js.map +1 -0
  173. package/dist/check/rules/imports-alias-declared.d.ts.map +1 -1
  174. package/dist/check/rules/imports-alias-declared.js +3 -1
  175. package/dist/check/rules/imports-alias-declared.js.map +1 -1
  176. package/dist/check/rules/imports-alias-only.d.ts.map +1 -1
  177. package/dist/check/rules/imports-alias-only.js +86 -7
  178. package/dist/check/rules/imports-alias-only.js.map +1 -1
  179. package/dist/check/rules/module-no-cycle.d.ts.map +1 -1
  180. package/dist/check/rules/module-no-cycle.js +12 -34
  181. package/dist/check/rules/module-no-cycle.js.map +1 -1
  182. package/dist/check/rules/persistence-read-model-listed.d.ts +3 -0
  183. package/dist/check/rules/persistence-read-model-listed.d.ts.map +1 -0
  184. package/dist/check/rules/persistence-read-model-listed.js +93 -0
  185. package/dist/check/rules/persistence-read-model-listed.js.map +1 -0
  186. package/dist/check/scan/lexer.d.ts +4 -0
  187. package/dist/check/scan/lexer.d.ts.map +1 -1
  188. package/dist/check/scan/lexer.js +11 -0
  189. package/dist/check/scan/lexer.js.map +1 -1
  190. package/dist/check/scan/scan.d.ts +6 -0
  191. package/dist/check/scan/scan.d.ts.map +1 -1
  192. package/dist/check/scan/scan.js +1 -0
  193. package/dist/check/scan/scan.js.map +1 -1
  194. package/dist/check/structure/read-structure.js +35 -13
  195. package/dist/check/structure/read-structure.js.map +1 -1
  196. package/dist/cli-error.d.ts +7 -2
  197. package/dist/cli-error.d.ts.map +1 -1
  198. package/dist/cli-error.js +8 -2
  199. package/dist/cli-error.js.map +1 -1
  200. package/dist/commands/generate.d.ts.map +1 -1
  201. package/dist/commands/generate.js +4 -0
  202. package/dist/commands/generate.js.map +1 -1
  203. package/dist/commands/json-report.js +4 -4
  204. package/dist/commands/json-report.js.map +1 -1
  205. package/dist/commands/knex-generate.d.ts.map +1 -1
  206. package/dist/commands/knex-generate.js +2 -1
  207. package/dist/commands/knex-generate.js.map +1 -1
  208. package/dist/commands/move-to-module.d.ts +6 -1
  209. package/dist/commands/move-to-module.d.ts.map +1 -1
  210. package/dist/commands/move-to-module.js +28 -3
  211. package/dist/commands/move-to-module.js.map +1 -1
  212. package/dist/commands/print-report.js +3 -0
  213. package/dist/commands/print-report.js.map +1 -1
  214. package/dist/commands/prisma-client.d.ts +8 -0
  215. package/dist/commands/prisma-client.d.ts.map +1 -0
  216. package/dist/commands/prisma-client.js +23 -0
  217. package/dist/commands/prisma-client.js.map +1 -0
  218. package/dist/commands/prisma-generate.d.ts.map +1 -1
  219. package/dist/commands/prisma-generate.js +2 -1
  220. package/dist/commands/prisma-generate.js.map +1 -1
  221. package/dist/commands/typeorm-generate.d.ts.map +1 -1
  222. package/dist/commands/typeorm-generate.js +2 -1
  223. package/dist/commands/typeorm-generate.js.map +1 -1
  224. package/dist/commands/verify-merge.d.ts +4 -2
  225. package/dist/commands/verify-merge.d.ts.map +1 -1
  226. package/dist/commands/verify-merge.js +8 -5
  227. package/dist/commands/verify-merge.js.map +1 -1
  228. package/dist/generate/generate-options.d.ts +3 -0
  229. package/dist/generate/generate-options.d.ts.map +1 -1
  230. package/dist/generate/generate-options.js +1 -0
  231. package/dist/generate/generate-options.js.map +1 -1
  232. package/dist/generate/kind.d.ts +2 -0
  233. package/dist/generate/kind.d.ts.map +1 -1
  234. package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
  235. package/dist/generate/kinds/declare-storage.js +6 -1
  236. package/dist/generate/kinds/declare-storage.js.map +1 -1
  237. package/dist/generate/kinds/declare-table.d.ts +2 -0
  238. package/dist/generate/kinds/declare-table.d.ts.map +1 -1
  239. package/dist/generate/kinds/declare-table.js +65 -1
  240. package/dist/generate/kinds/declare-table.js.map +1 -1
  241. package/dist/generate/kinds/file-upload/upload-file-vars.d.ts +9 -0
  242. package/dist/generate/kinds/file-upload/upload-file-vars.d.ts.map +1 -0
  243. package/dist/generate/kinds/file-upload/upload-file-vars.js +39 -0
  244. package/dist/generate/kinds/file-upload/upload-file-vars.js.map +1 -0
  245. package/dist/generate/kinds/file-upload/write-nest-upload-controller.d.ts.map +1 -1
  246. package/dist/generate/kinds/file-upload/write-nest-upload-controller.js +2 -1
  247. package/dist/generate/kinds/file-upload/write-nest-upload-controller.js.map +1 -1
  248. package/dist/generate/kinds/file-upload/write-upload-controller.d.ts.map +1 -1
  249. package/dist/generate/kinds/file-upload/write-upload-controller.js +2 -1
  250. package/dist/generate/kinds/file-upload/write-upload-controller.js.map +1 -1
  251. package/dist/generate/kinds/file-upload-kind.d.ts.map +1 -1
  252. package/dist/generate/kinds/file-upload-kind.js +5 -3
  253. package/dist/generate/kinds/file-upload-kind.js.map +1 -1
  254. package/dist/generate/kinds/read-model/list-read-model.d.ts +12 -0
  255. package/dist/generate/kinds/read-model/list-read-model.d.ts.map +1 -0
  256. package/dist/generate/kinds/read-model/list-read-model.js +24 -0
  257. package/dist/generate/kinds/read-model/list-read-model.js.map +1 -0
  258. package/dist/generate/kinds/read-model-kind.d.ts.map +1 -1
  259. package/dist/generate/kinds/read-model-kind.js +25 -1
  260. package/dist/generate/kinds/read-model-kind.js.map +1 -1
  261. package/dist/generate/kinds/same-name/code-from.d.ts +8 -0
  262. package/dist/generate/kinds/same-name/code-from.d.ts.map +1 -0
  263. package/dist/generate/kinds/same-name/code-from.js +34 -0
  264. package/dist/generate/kinds/same-name/code-from.js.map +1 -0
  265. package/dist/generate/kinds/same-name/context-of-source.d.ts +5 -0
  266. package/dist/generate/kinds/same-name/context-of-source.d.ts.map +1 -0
  267. package/dist/generate/kinds/same-name/context-of-source.js +10 -0
  268. package/dist/generate/kinds/same-name/context-of-source.js.map +1 -0
  269. package/dist/generate/kinds/same-name/entities-list.d.ts +6 -0
  270. package/dist/generate/kinds/same-name/entities-list.d.ts.map +1 -0
  271. package/dist/generate/kinds/same-name/entities-list.js +25 -0
  272. package/dist/generate/kinds/same-name/entities-list.js.map +1 -0
  273. package/dist/generate/kinds/same-name/exports-an-alias.d.ts +12 -0
  274. package/dist/generate/kinds/same-name/exports-an-alias.d.ts.map +1 -0
  275. package/dist/generate/kinds/same-name/exports-an-alias.js +150 -0
  276. package/dist/generate/kinds/same-name/exports-an-alias.js.map +1 -0
  277. package/dist/generate/kinds/same-name/free-name.d.ts +10 -0
  278. package/dist/generate/kinds/same-name/free-name.d.ts.map +1 -0
  279. package/dist/generate/kinds/same-name/free-name.js +20 -0
  280. package/dist/generate/kinds/same-name/free-name.js.map +1 -0
  281. package/dist/generate/kinds/same-name/hidden-symbols.d.ts +8 -0
  282. package/dist/generate/kinds/same-name/hidden-symbols.d.ts.map +1 -0
  283. package/dist/generate/kinds/same-name/hidden-symbols.js +18 -0
  284. package/dist/generate/kinds/same-name/hidden-symbols.js.map +1 -0
  285. package/dist/generate/kinds/same-name/imported-twice-notes.d.ts +10 -0
  286. package/dist/generate/kinds/same-name/imported-twice-notes.d.ts.map +1 -0
  287. package/dist/generate/kinds/same-name/imported-twice-notes.js +24 -0
  288. package/dist/generate/kinds/same-name/imported-twice-notes.js.map +1 -0
  289. package/dist/generate/kinds/same-name/index-exports.d.ts +11 -0
  290. package/dist/generate/kinds/same-name/index-exports.d.ts.map +1 -0
  291. package/dist/generate/kinds/same-name/index-exports.js +27 -0
  292. package/dist/generate/kinds/same-name/index-exports.js.map +1 -0
  293. package/dist/generate/kinds/same-name/index-picture.d.ts +29 -0
  294. package/dist/generate/kinds/same-name/index-picture.d.ts.map +1 -0
  295. package/dist/generate/kinds/same-name/index-picture.js +63 -0
  296. package/dist/generate/kinds/same-name/index-picture.js.map +1 -0
  297. package/dist/generate/kinds/same-name/index-reading.d.ts +83 -0
  298. package/dist/generate/kinds/same-name/index-reading.d.ts.map +1 -0
  299. package/dist/generate/kinds/same-name/index-reading.js +105 -0
  300. package/dist/generate/kinds/same-name/index-reading.js.map +1 -0
  301. package/dist/generate/kinds/same-name/keep-the-picture.d.ts +17 -0
  302. package/dist/generate/kinds/same-name/keep-the-picture.d.ts.map +1 -0
  303. package/dist/generate/kinds/same-name/keep-the-picture.js +164 -0
  304. package/dist/generate/kinds/same-name/keep-the-picture.js.map +1 -0
  305. package/dist/generate/kinds/same-name/lines-to-settle.d.ts +37 -0
  306. package/dist/generate/kinds/same-name/lines-to-settle.d.ts.map +1 -0
  307. package/dist/generate/kinds/same-name/lines-to-settle.js +100 -0
  308. package/dist/generate/kinds/same-name/lines-to-settle.js.map +1 -0
  309. package/dist/generate/kinds/same-name/linked.d.ts +14 -0
  310. package/dist/generate/kinds/same-name/linked.d.ts.map +1 -0
  311. package/dist/generate/kinds/same-name/linked.js +14 -0
  312. package/dist/generate/kinds/same-name/linked.js.map +1 -0
  313. package/dist/generate/kinds/same-name/listed-entity.d.ts +25 -0
  314. package/dist/generate/kinds/same-name/listed-entity.d.ts.map +1 -0
  315. package/dist/generate/kinds/same-name/listed-entity.js +25 -0
  316. package/dist/generate/kinds/same-name/listed-entity.js.map +1 -0
  317. package/dist/generate/kinds/same-name/may-share.d.ts +22 -0
  318. package/dist/generate/kinds/same-name/may-share.d.ts.map +1 -0
  319. package/dist/generate/kinds/same-name/may-share.js +35 -0
  320. package/dist/generate/kinds/same-name/may-share.js.map +1 -0
  321. package/dist/generate/kinds/same-name/not-settled.d.ts +16 -0
  322. package/dist/generate/kinds/same-name/not-settled.d.ts.map +1 -0
  323. package/dist/generate/kinds/same-name/not-settled.js +12 -0
  324. package/dist/generate/kinds/same-name/not-settled.js.map +1 -0
  325. package/dist/generate/kinds/same-name/places-of.d.ts +4 -0
  326. package/dist/generate/kinds/same-name/places-of.d.ts.map +1 -0
  327. package/dist/generate/kinds/same-name/places-of.js +13 -0
  328. package/dist/generate/kinds/same-name/places-of.js.map +1 -0
  329. package/dist/generate/kinds/same-name/project-reader.d.ts +13 -0
  330. package/dist/generate/kinds/same-name/project-reader.d.ts.map +1 -0
  331. package/dist/generate/kinds/same-name/project-reader.js +55 -0
  332. package/dist/generate/kinds/same-name/project-reader.js.map +1 -0
  333. package/dist/generate/kinds/same-name/read-module.d.ts +44 -0
  334. package/dist/generate/kinds/same-name/read-module.d.ts.map +1 -0
  335. package/dist/generate/kinds/same-name/read-module.js +189 -0
  336. package/dist/generate/kinds/same-name/read-module.js.map +1 -0
  337. package/dist/generate/kinds/same-name/read-tables-file.d.ts +34 -0
  338. package/dist/generate/kinds/same-name/read-tables-file.d.ts.map +1 -0
  339. package/dist/generate/kinds/same-name/read-tables-file.js +116 -0
  340. package/dist/generate/kinds/same-name/read-tables-file.js.map +1 -0
  341. package/dist/generate/kinds/same-name/region-of.d.ts +3 -0
  342. package/dist/generate/kinds/same-name/region-of.d.ts.map +1 -0
  343. package/dist/generate/kinds/same-name/region-of.js +5 -0
  344. package/dist/generate/kinds/same-name/region-of.js.map +1 -0
  345. package/dist/generate/kinds/same-name/settle-same-names.d.ts +30 -0
  346. package/dist/generate/kinds/same-name/settle-same-names.d.ts.map +1 -0
  347. package/dist/generate/kinds/same-name/settle-same-names.js +123 -0
  348. package/dist/generate/kinds/same-name/settle-same-names.js.map +1 -0
  349. package/dist/generate/kinds/same-name/signature-of.d.ts +4 -0
  350. package/dist/generate/kinds/same-name/signature-of.d.ts.map +1 -0
  351. package/dist/generate/kinds/same-name/signature-of.js +5 -0
  352. package/dist/generate/kinds/same-name/signature-of.js.map +1 -0
  353. package/dist/generate/kinds/same-name/sources-of.d.ts +35 -0
  354. package/dist/generate/kinds/same-name/sources-of.d.ts.map +1 -0
  355. package/dist/generate/kinds/same-name/sources-of.js +57 -0
  356. package/dist/generate/kinds/same-name/sources-of.js.map +1 -0
  357. package/dist/generate/kinds/same-name/symbol-of.d.ts +9 -0
  358. package/dist/generate/kinds/same-name/symbol-of.d.ts.map +1 -0
  359. package/dist/generate/kinds/same-name/symbol-of.js +8 -0
  360. package/dist/generate/kinds/same-name/symbol-of.js.map +1 -0
  361. package/dist/generate/kinds/same-name/tables-constants.d.ts +5 -0
  362. package/dist/generate/kinds/same-name/tables-constants.d.ts.map +1 -0
  363. package/dist/generate/kinds/same-name/tables-constants.js +8 -0
  364. package/dist/generate/kinds/same-name/tables-constants.js.map +1 -0
  365. package/dist/generate/kinds/same-name/tables-file-of.d.ts +5 -0
  366. package/dist/generate/kinds/same-name/tables-file-of.d.ts.map +1 -0
  367. package/dist/generate/kinds/same-name/tables-file-of.js +6 -0
  368. package/dist/generate/kinds/same-name/tables-file-of.js.map +1 -0
  369. package/dist/generate/kinds/same-name/tables-files-held.d.ts +9 -0
  370. package/dist/generate/kinds/same-name/tables-files-held.d.ts.map +1 -0
  371. package/dist/generate/kinds/same-name/tables-files-held.js +14 -0
  372. package/dist/generate/kinds/same-name/tables-files-held.js.map +1 -0
  373. package/dist/generate/kinds/same-name/unread-note.d.ts +22 -0
  374. package/dist/generate/kinds/same-name/unread-note.d.ts.map +1 -0
  375. package/dist/generate/kinds/same-name/unread-note.js +76 -0
  376. package/dist/generate/kinds/same-name/unread-note.js.map +1 -0
  377. package/dist/generate/kinds/same-name/unseen-shares.d.ts +14 -0
  378. package/dist/generate/kinds/same-name/unseen-shares.d.ts.map +1 -0
  379. package/dist/generate/kinds/same-name/unseen-shares.js +23 -0
  380. package/dist/generate/kinds/same-name/unseen-shares.js.map +1 -0
  381. package/dist/generate/kinds/same-name/workspace-index.d.ts +6 -0
  382. package/dist/generate/kinds/same-name/workspace-index.d.ts.map +1 -0
  383. package/dist/generate/kinds/same-name/workspace-index.js +13 -0
  384. package/dist/generate/kinds/same-name/workspace-index.js.map +1 -0
  385. package/dist/generate/kinds/same-name/workspace-sources.d.ts +9 -0
  386. package/dist/generate/kinds/same-name/workspace-sources.d.ts.map +1 -0
  387. package/dist/generate/kinds/same-name/workspace-sources.js +10 -0
  388. package/dist/generate/kinds/same-name/workspace-sources.js.map +1 -0
  389. package/dist/generate/kinds/same-name/yield-to-the-trunk.d.ts +14 -0
  390. package/dist/generate/kinds/same-name/yield-to-the-trunk.d.ts.map +1 -0
  391. package/dist/generate/kinds/same-name/yield-to-the-trunk.js +59 -0
  392. package/dist/generate/kinds/same-name/yield-to-the-trunk.js.map +1 -0
  393. package/dist/generate/kinds/service-kind.d.ts.map +1 -1
  394. package/dist/generate/kinds/service-kind.js +8 -0
  395. package/dist/generate/kinds/service-kind.js.map +1 -1
  396. package/dist/generate/kinds/wire-context.d.ts.map +1 -1
  397. package/dist/generate/kinds/wire-context.js +4 -0
  398. package/dist/generate/kinds/wire-context.js.map +1 -1
  399. package/dist/generate/shared-writes.d.ts.map +1 -1
  400. package/dist/generate/shared-writes.js +3 -2
  401. package/dist/generate/shared-writes.js.map +1 -1
  402. package/dist/generator-lock/held-lock-refusal.d.ts.map +1 -1
  403. package/dist/generator-lock/held-lock-refusal.js +1 -7
  404. package/dist/generator-lock/held-lock-refusal.js.map +1 -1
  405. package/dist/generator-lock/holder-text.d.ts +4 -0
  406. package/dist/generator-lock/holder-text.d.ts.map +1 -0
  407. package/dist/generator-lock/holder-text.js +10 -0
  408. package/dist/generator-lock/holder-text.js.map +1 -0
  409. package/dist/generator-lock/index.d.ts +4 -0
  410. package/dist/generator-lock/index.d.ts.map +1 -1
  411. package/dist/generator-lock/index.js +2 -0
  412. package/dist/generator-lock/index.js.map +1 -1
  413. package/dist/generator-lock/with-folder-lock.d.ts +27 -0
  414. package/dist/generator-lock/with-folder-lock.d.ts.map +1 -0
  415. package/dist/generator-lock/with-folder-lock.js +65 -0
  416. package/dist/generator-lock/with-folder-lock.js.map +1 -0
  417. package/dist/generator-lock/with-generator-lock.d.ts +1 -5
  418. package/dist/generator-lock/with-generator-lock.d.ts.map +1 -1
  419. package/dist/generator-lock/with-generator-lock.js +11 -58
  420. package/dist/generator-lock/with-generator-lock.js.map +1 -1
  421. package/dist/help/tool-notes.d.ts.map +1 -1
  422. package/dist/help/tool-notes.js +17 -1
  423. package/dist/help/tool-notes.js.map +1 -1
  424. package/dist/help/usage.d.ts.map +1 -1
  425. package/dist/help/usage.js +2 -1
  426. package/dist/help/usage.js.map +1 -1
  427. package/dist/help/work-notes.d.ts.map +1 -1
  428. package/dist/help/work-notes.js +15 -5
  429. package/dist/help/work-notes.js.map +1 -1
  430. package/dist/init/end-of-the-index.d.ts +9 -0
  431. package/dist/init/end-of-the-index.d.ts.map +1 -0
  432. package/dist/init/end-of-the-index.js +13 -0
  433. package/dist/init/end-of-the-index.js.map +1 -0
  434. package/dist/init/files/end-to-end-files.d.ts.map +1 -1
  435. package/dist/init/files/end-to-end-files.js +3 -0
  436. package/dist/init/files/end-to-end-files.js.map +1 -1
  437. package/dist/init/files/persistence-files.d.ts.map +1 -1
  438. package/dist/init/files/persistence-files.js +8 -2
  439. package/dist/init/files/persistence-files.js.map +1 -1
  440. package/dist/init/files/script-files.d.ts +2 -1
  441. package/dist/init/files/script-files.d.ts.map +1 -1
  442. package/dist/init/files/script-files.js +6 -1
  443. package/dist/init/files/script-files.js.map +1 -1
  444. package/dist/init/is-team-file.d.ts +2 -2
  445. package/dist/init/is-team-file.d.ts.map +1 -1
  446. package/dist/init/is-team-file.js +5 -4
  447. package/dist/init/is-team-file.js.map +1 -1
  448. package/dist/init/laid-out.d.ts +3 -0
  449. package/dist/init/laid-out.d.ts.map +1 -0
  450. package/dist/init/laid-out.js +7 -0
  451. package/dist/init/laid-out.js.map +1 -0
  452. package/dist/init/list-read-models.d.ts +20 -0
  453. package/dist/init/list-read-models.d.ts.map +1 -0
  454. package/dist/init/list-read-models.js +74 -0
  455. package/dist/init/list-read-models.js.map +1 -0
  456. package/dist/init/manifest/database-scripts.d.ts.map +1 -1
  457. package/dist/init/manifest/database-scripts.js +8 -0
  458. package/dist/init/manifest/database-scripts.js.map +1 -1
  459. package/dist/init/manifest/prisma-client-script.js +1 -1
  460. package/dist/init/manifest/prisma-client-script.js.map +1 -1
  461. package/dist/init/manifest/versions.js +33 -33
  462. package/dist/init/rewire-contexts.d.ts +4 -2
  463. package/dist/init/rewire-contexts.d.ts.map +1 -1
  464. package/dist/init/rewire-contexts.js +12 -2
  465. package/dist/init/rewire-contexts.js.map +1 -1
  466. package/dist/init/rewire-tables.d.ts.map +1 -1
  467. package/dist/init/rewire-tables.js +18 -10
  468. package/dist/init/rewire-tables.js.map +1 -1
  469. package/dist/init/run-init.d.ts.map +1 -1
  470. package/dist/init/run-init.js +4 -8
  471. package/dist/init/run-init.js.map +1 -1
  472. package/dist/init/settle-index-names.d.ts +11 -0
  473. package/dist/init/settle-index-names.d.ts.map +1 -0
  474. package/dist/init/settle-index-names.js +89 -0
  475. package/dist/init/settle-index-names.js.map +1 -0
  476. package/dist/init/wiring-notes.js +1 -1
  477. package/dist/init/wiring-notes.js.map +1 -1
  478. package/dist/init/write-type-script-configs.d.ts +3 -1
  479. package/dist/init/write-type-script-configs.d.ts.map +1 -1
  480. package/dist/init/write-type-script-configs.js +14 -2
  481. package/dist/init/write-type-script-configs.js.map +1 -1
  482. package/dist/merge/accept-in-merge-message.d.ts.map +1 -1
  483. package/dist/merge/accept-in-merge-message.js +2 -7
  484. package/dist/merge/accept-in-merge-message.js.map +1 -1
  485. package/dist/merge/as-settled.d.ts +7 -0
  486. package/dist/merge/as-settled.d.ts.map +1 -0
  487. package/dist/merge/as-settled.js +9 -0
  488. package/dist/merge/as-settled.js.map +1 -0
  489. package/dist/merge/config-of-the-merge.d.ts +12 -0
  490. package/dist/merge/config-of-the-merge.d.ts.map +1 -0
  491. package/dist/merge/config-of-the-merge.js +35 -0
  492. package/dist/merge/config-of-the-merge.js.map +1 -0
  493. package/dist/merge/continue-merge.d.ts.map +1 -1
  494. package/dist/merge/continue-merge.js +32 -1
  495. package/dist/merge/continue-merge.js.map +1 -1
  496. package/dist/merge/format-merge-report.js +5 -2
  497. package/dist/merge/format-merge-report.js.map +1 -1
  498. package/dist/merge/land-drizzle.d.ts +4 -0
  499. package/dist/merge/land-drizzle.d.ts.map +1 -1
  500. package/dist/merge/land-drizzle.js +6 -1
  501. package/dist/merge/land-drizzle.js.map +1 -1
  502. package/dist/merge/land-up-to-date.d.ts +15 -0
  503. package/dist/merge/land-up-to-date.d.ts.map +1 -0
  504. package/dist/merge/land-up-to-date.js +76 -0
  505. package/dist/merge/land-up-to-date.js.map +1 -0
  506. package/dist/merge/lines-at-moved-places.d.ts +10 -0
  507. package/dist/merge/lines-at-moved-places.d.ts.map +1 -0
  508. package/dist/merge/lines-at-moved-places.js +38 -0
  509. package/dist/merge/lines-at-moved-places.js.map +1 -0
  510. package/dist/merge/lost/format-merge-verification.d.ts +2 -1
  511. package/dist/merge/lost/format-merge-verification.d.ts.map +1 -1
  512. package/dist/merge/lost/format-merge-verification.js +13 -2
  513. package/dist/merge/lost/format-merge-verification.js.map +1 -1
  514. package/dist/merge/lost/in-progress-merge.d.ts.map +1 -1
  515. package/dist/merge/lost/in-progress-merge.js +6 -2
  516. package/dist/merge/lost/in-progress-merge.js.map +1 -1
  517. package/dist/merge/lost/line-findings.d.ts +3 -2
  518. package/dist/merge/lost/line-findings.d.ts.map +1 -1
  519. package/dist/merge/lost/line-findings.js +5 -4
  520. package/dist/merge/lost/line-findings.js.map +1 -1
  521. package/dist/merge/lost/line-key.d.ts +7 -0
  522. package/dist/merge/lost/line-key.d.ts.map +1 -0
  523. package/dist/merge/lost/line-key.js +11 -0
  524. package/dist/merge/lost/line-key.js.map +1 -0
  525. package/dist/merge/lost/lost-lines.d.ts +1 -1
  526. package/dist/merge/lost/lost-lines.d.ts.map +1 -1
  527. package/dist/merge/lost/lost-lines.js +3 -2
  528. package/dist/merge/lost/lost-lines.js.map +1 -1
  529. package/dist/merge/lost/merge-of-record.d.ts.map +1 -1
  530. package/dist/merge/lost/merge-of-record.js +1 -0
  531. package/dist/merge/lost/merge-of-record.js.map +1 -1
  532. package/dist/merge/lost/merge-records.d.ts +2 -0
  533. package/dist/merge/lost/merge-records.d.ts.map +1 -1
  534. package/dist/merge/lost/merge-records.js +3 -2
  535. package/dist/merge/lost/merge-records.js.map +1 -1
  536. package/dist/merge/lost/merge-to-verify.d.ts +2 -0
  537. package/dist/merge/lost/merge-to-verify.d.ts.map +1 -1
  538. package/dist/merge/lost/merge-verification.d.ts +4 -0
  539. package/dist/merge/lost/merge-verification.d.ts.map +1 -1
  540. package/dist/merge/lost/rewritten-in-place.d.ts +5 -2
  541. package/dist/merge/lost/rewritten-in-place.d.ts.map +1 -1
  542. package/dist/merge/lost/rewritten-in-place.js +6 -5
  543. package/dist/merge/lost/rewritten-in-place.js.map +1 -1
  544. package/dist/merge/lost/verify-merge.d.ts.map +1 -1
  545. package/dist/merge/lost/verify-merge.js +10 -3
  546. package/dist/merge/lost/verify-merge.js.map +1 -1
  547. package/dist/merge/lost/verify-merges.d.ts +2 -1
  548. package/dist/merge/lost/verify-merges.d.ts.map +1 -1
  549. package/dist/merge/lost/verify-merges.js +10 -4
  550. package/dist/merge/lost/verify-merges.js.map +1 -1
  551. package/dist/merge/merge-state.d.ts +2 -0
  552. package/dist/merge/merge-state.d.ts.map +1 -1
  553. package/dist/merge/merge-state.js +3 -2
  554. package/dist/merge/merge-state.js.map +1 -1
  555. package/dist/merge/merge-trunk.d.ts +2 -1
  556. package/dist/merge/merge-trunk.d.ts.map +1 -1
  557. package/dist/merge/merge-trunk.js +8 -3
  558. package/dist/merge/merge-trunk.js.map +1 -1
  559. package/dist/merge/merged-tree-workspace.d.ts +19 -0
  560. package/dist/merge/merged-tree-workspace.d.ts.map +1 -0
  561. package/dist/merge/merged-tree-workspace.js +41 -0
  562. package/dist/merge/merged-tree-workspace.js.map +1 -0
  563. package/dist/merge/moved-tables-files.d.ts +9 -0
  564. package/dist/merge/moved-tables-files.d.ts.map +1 -0
  565. package/dist/merge/moved-tables-files.js +16 -0
  566. package/dist/merge/moved-tables-files.js.map +1 -0
  567. package/dist/merge/next-steps.d.ts +3 -0
  568. package/dist/merge/next-steps.d.ts.map +1 -1
  569. package/dist/merge/next-steps.js +3 -0
  570. package/dist/merge/next-steps.js.map +1 -1
  571. package/dist/merge/order/applied-under-old-name.d.ts +13 -0
  572. package/dist/merge/order/applied-under-old-name.d.ts.map +1 -0
  573. package/dist/merge/order/applied-under-old-name.js +14 -0
  574. package/dist/merge/order/applied-under-old-name.js.map +1 -0
  575. package/dist/merge/order/comes-after.d.ts +8 -0
  576. package/dist/merge/order/comes-after.d.ts.map +1 -0
  577. package/dist/merge/order/comes-after.js +9 -0
  578. package/dist/merge/order/comes-after.js.map +1 -0
  579. package/dist/merge/order/drizzle-order.d.ts +11 -0
  580. package/dist/merge/order/drizzle-order.d.ts.map +1 -0
  581. package/dist/merge/order/drizzle-order.js +64 -0
  582. package/dist/merge/order/drizzle-order.js.map +1 -0
  583. package/dist/merge/order/in-order.d.ts +4 -0
  584. package/dist/merge/order/in-order.d.ts.map +1 -0
  585. package/dist/merge/order/in-order.js +6 -0
  586. package/dist/merge/order/in-order.js.map +1 -0
  587. package/dist/merge/order/migration-order-finding.d.ts +18 -0
  588. package/dist/merge/order/migration-order-finding.d.ts.map +1 -0
  589. package/dist/merge/order/migration-order-finding.js +2 -0
  590. package/dist/merge/order/migration-order-finding.js.map +1 -0
  591. package/dist/merge/order/migration-order.d.ts +12 -0
  592. package/dist/merge/order/migration-order.d.ts.map +1 -0
  593. package/dist/merge/order/migration-order.js +21 -0
  594. package/dist/merge/order/migration-order.js.map +1 -0
  595. package/dist/merge/order/migrations-of-commit.d.ts +7 -0
  596. package/dist/merge/order/migrations-of-commit.d.ts.map +1 -0
  597. package/dist/merge/order/migrations-of-commit.js +43 -0
  598. package/dist/merge/order/migrations-of-commit.js.map +1 -0
  599. package/dist/merge/order/migrations-of-tree.d.ts +9 -0
  600. package/dist/merge/order/migrations-of-tree.d.ts.map +1 -0
  601. package/dist/merge/order/migrations-of-tree.js +25 -0
  602. package/dist/merge/order/migrations-of-tree.js.map +1 -0
  603. package/dist/merge/order/named-order.d.ts +11 -0
  604. package/dist/merge/order/named-order.d.ts.map +1 -0
  605. package/dist/merge/order/named-order.js +36 -0
  606. package/dist/merge/order/named-order.js.map +1 -0
  607. package/dist/merge/order/ordered-migration.d.ts +12 -0
  608. package/dist/merge/order/ordered-migration.d.ts.map +1 -0
  609. package/dist/merge/order/ordered-migration.js +2 -0
  610. package/dist/merge/order/ordered-migration.js.map +1 -0
  611. package/dist/merge/order/trunk-to-follow.d.ts +9 -0
  612. package/dist/merge/order/trunk-to-follow.d.ts.map +1 -0
  613. package/dist/merge/order/trunk-to-follow.js +2 -0
  614. package/dist/merge/order/trunk-to-follow.js.map +1 -0
  615. package/dist/merge/preview-table-names.d.ts +21 -0
  616. package/dist/merge/preview-table-names.d.ts.map +1 -0
  617. package/dist/merge/preview-table-names.js +85 -0
  618. package/dist/merge/preview-table-names.js.map +1 -0
  619. package/dist/merge/renumber-migrations.d.ts +14 -5
  620. package/dist/merge/renumber-migrations.d.ts.map +1 -1
  621. package/dist/merge/renumber-migrations.js +141 -60
  622. package/dist/merge/renumber-migrations.js.map +1 -1
  623. package/dist/merge/restamp-class.d.ts +9 -0
  624. package/dist/merge/restamp-class.d.ts.map +1 -0
  625. package/dist/merge/restamp-class.js +30 -0
  626. package/dist/merge/restamp-class.js.map +1 -0
  627. package/dist/merge/settle-table-names.d.ts +21 -0
  628. package/dist/merge/settle-table-names.d.ts.map +1 -0
  629. package/dist/merge/settle-table-names.js +60 -0
  630. package/dist/merge/settle-table-names.js.map +1 -0
  631. package/dist/merge/side-index.d.ts +13 -0
  632. package/dist/merge/side-index.d.ts.map +1 -0
  633. package/dist/merge/side-index.js +43 -0
  634. package/dist/merge/side-index.js.map +1 -0
  635. package/dist/merge/side-reader.d.ts +8 -0
  636. package/dist/merge/side-reader.d.ts.map +1 -0
  637. package/dist/merge/side-reader.js +13 -0
  638. package/dist/merge/side-reader.js.map +1 -0
  639. package/dist/merge/side-tables-file.d.ts +5 -0
  640. package/dist/merge/side-tables-file.d.ts.map +1 -0
  641. package/dist/merge/side-tables-file.js +10 -0
  642. package/dist/merge/side-tables-file.js.map +1 -0
  643. package/dist/merge/table-names-settled.d.ts +18 -0
  644. package/dist/merge/table-names-settled.d.ts.map +1 -0
  645. package/dist/merge/table-names-settled.js +168 -0
  646. package/dist/merge/table-names-settled.js.map +1 -0
  647. package/dist/merge/trailer-in-merge-message.d.ts +9 -0
  648. package/dist/merge/trailer-in-merge-message.d.ts.map +1 -0
  649. package/dist/merge/trailer-in-merge-message.js +16 -0
  650. package/dist/merge/trailer-in-merge-message.js.map +1 -0
  651. package/dist/merge/tree-files.d.ts +21 -0
  652. package/dist/merge/tree-files.d.ts.map +1 -0
  653. package/dist/merge/tree-files.js +86 -0
  654. package/dist/merge/tree-files.js.map +1 -0
  655. package/dist/merge/trunk-reader.d.ts +5 -0
  656. package/dist/merge/trunk-reader.d.ts.map +1 -0
  657. package/dist/merge/trunk-reader.js +9 -0
  658. package/dist/merge/trunk-reader.js.map +1 -0
  659. package/dist/merge/two-tables-files.d.ts +19 -0
  660. package/dist/merge/two-tables-files.d.ts.map +1 -0
  661. package/dist/merge/two-tables-files.js +67 -0
  662. package/dist/merge/two-tables-files.js.map +1 -0
  663. package/dist/migration/file-of-source.d.ts +3 -0
  664. package/dist/migration/file-of-source.d.ts.map +1 -0
  665. package/dist/migration/file-of-source.js +5 -0
  666. package/dist/migration/file-of-source.js.map +1 -0
  667. package/dist/migration/hidden-in-index.d.ts +15 -0
  668. package/dist/migration/hidden-in-index.d.ts.map +1 -0
  669. package/dist/migration/hidden-in-index.js +23 -0
  670. package/dist/migration/hidden-in-index.js.map +1 -0
  671. package/dist/migration/index.d.ts +3 -0
  672. package/dist/migration/index.d.ts.map +1 -1
  673. package/dist/migration/index.js +3 -0
  674. package/dist/migration/index.js.map +1 -1
  675. package/dist/migration/is-source-of-context.d.ts +17 -0
  676. package/dist/migration/is-source-of-context.d.ts.map +1 -0
  677. package/dist/migration/is-source-of-context.js +13 -0
  678. package/dist/migration/is-source-of-context.js.map +1 -0
  679. package/dist/migration/listed-in-index.d.ts +15 -3
  680. package/dist/migration/listed-in-index.d.ts.map +1 -1
  681. package/dist/migration/listed-in-index.js +25 -4
  682. package/dist/migration/listed-in-index.js.map +1 -1
  683. package/dist/migration/named-bindings-of.d.ts +14 -0
  684. package/dist/migration/named-bindings-of.d.ts.map +1 -0
  685. package/dist/migration/named-bindings-of.js +21 -0
  686. package/dist/migration/named-bindings-of.js.map +1 -0
  687. package/dist/migration/plan-replay.d.ts.map +1 -1
  688. package/dist/migration/plan-replay.js +2 -1
  689. package/dist/migration/plan-replay.js.map +1 -1
  690. package/dist/migration/refuse-taken-migration-name.d.ts +8 -0
  691. package/dist/migration/refuse-taken-migration-name.d.ts.map +1 -0
  692. package/dist/migration/refuse-taken-migration-name.js +22 -0
  693. package/dist/migration/refuse-taken-migration-name.js.map +1 -0
  694. package/dist/migration/replay-drizzle-migrations.d.ts +5 -0
  695. package/dist/migration/replay-drizzle-migrations.d.ts.map +1 -1
  696. package/dist/migration/replay-drizzle-migrations.js +10 -2
  697. package/dist/migration/replay-drizzle-migrations.js.map +1 -1
  698. package/dist/migration/replay-plan.d.ts +2 -2
  699. package/dist/migration/replay-plan.d.ts.map +1 -1
  700. package/dist/migration/restore-migration-folder.d.ts +6 -2
  701. package/dist/migration/restore-migration-folder.d.ts.map +1 -1
  702. package/dist/migration/restore-migration-folder.js +14 -7
  703. package/dist/migration/restore-migration-folder.js.map +1 -1
  704. package/dist/migration/snapshot-migration-folder.d.ts +7 -0
  705. package/dist/migration/snapshot-migration-folder.d.ts.map +1 -0
  706. package/dist/migration/snapshot-migration-folder.js +12 -0
  707. package/dist/migration/snapshot-migration-folder.js.map +1 -0
  708. package/dist/migration/warn-dropped-context-tables.d.ts.map +1 -1
  709. package/dist/migration/warn-dropped-context-tables.js +21 -6
  710. package/dist/migration/warn-dropped-context-tables.js.map +1 -1
  711. package/dist/move-to-module/before-the-move.d.ts +5 -0
  712. package/dist/move-to-module/before-the-move.d.ts.map +1 -0
  713. package/dist/move-to-module/before-the-move.js +13 -0
  714. package/dist/move-to-module/before-the-move.js.map +1 -0
  715. package/dist/move-to-module/closed-cycles.d.ts +21 -0
  716. package/dist/move-to-module/closed-cycles.d.ts.map +1 -0
  717. package/dist/move-to-module/closed-cycles.js +66 -0
  718. package/dist/move-to-module/closed-cycles.js.map +1 -0
  719. package/dist/move-to-module/cycle-lines.d.ts +7 -0
  720. package/dist/move-to-module/cycle-lines.d.ts.map +1 -0
  721. package/dist/move-to-module/cycle-lines.js +22 -0
  722. package/dist/move-to-module/cycle-lines.js.map +1 -0
  723. package/dist/move-to-module/cycle-refusal.d.ts +17 -0
  724. package/dist/move-to-module/cycle-refusal.d.ts.map +1 -0
  725. package/dist/move-to-module/cycle-refusal.js +25 -0
  726. package/dist/move-to-module/cycle-refusal.js.map +1 -0
  727. package/dist/move-to-module/index.d.ts +5 -0
  728. package/dist/move-to-module/index.d.ts.map +1 -1
  729. package/dist/move-to-module/index.js +4 -0
  730. package/dist/move-to-module/index.js.map +1 -1
  731. package/dist/move-to-module/module-imports-in.d.ts +11 -0
  732. package/dist/move-to-module/module-imports-in.d.ts.map +1 -0
  733. package/dist/move-to-module/module-imports-in.js +32 -0
  734. package/dist/move-to-module/module-imports-in.js.map +1 -0
  735. package/dist/move-to-module/moves-into-module.d.ts.map +1 -1
  736. package/dist/move-to-module/moves-into-module.js +6 -18
  737. package/dist/move-to-module/moves-into-module.js.map +1 -1
  738. package/dist/move-to-module/place-in-module.d.ts +13 -0
  739. package/dist/move-to-module/place-in-module.d.ts.map +1 -0
  740. package/dist/move-to-module/place-in-module.js +24 -0
  741. package/dist/move-to-module/place-in-module.js.map +1 -0
  742. package/dist/move-to-module/watch-cycles.d.ts +19 -0
  743. package/dist/move-to-module/watch-cycles.d.ts.map +1 -0
  744. package/dist/move-to-module/watch-cycles.js +51 -0
  745. package/dist/move-to-module/watch-cycles.js.map +1 -0
  746. package/dist/prisma-client/client-outputs.d.ts +3 -0
  747. package/dist/prisma-client/client-outputs.d.ts.map +1 -0
  748. package/dist/prisma-client/client-outputs.js +9 -0
  749. package/dist/prisma-client/client-outputs.js.map +1 -0
  750. package/dist/prisma-client/index.d.ts +4 -0
  751. package/dist/prisma-client/index.d.ts.map +1 -0
  752. package/dist/prisma-client/index.js +4 -0
  753. package/dist/prisma-client/index.js.map +1 -0
  754. package/dist/prisma-client/prisma-client-fingerprint.d.ts +7 -0
  755. package/dist/prisma-client/prisma-client-fingerprint.d.ts.map +1 -0
  756. package/dist/prisma-client/prisma-client-fingerprint.js +32 -0
  757. package/dist/prisma-client/prisma-client-fingerprint.js.map +1 -0
  758. package/dist/prisma-client/prisma-client-in-turn.d.ts +14 -0
  759. package/dist/prisma-client/prisma-client-in-turn.d.ts.map +1 -0
  760. package/dist/prisma-client/prisma-client-in-turn.js +15 -0
  761. package/dist/prisma-client/prisma-client-in-turn.js.map +1 -0
  762. package/dist/prisma-client/prisma-client-lock-refusal.d.ts +5 -0
  763. package/dist/prisma-client/prisma-client-lock-refusal.d.ts.map +1 -0
  764. package/dist/prisma-client/prisma-client-lock-refusal.js +11 -0
  765. package/dist/prisma-client/prisma-client-lock-refusal.js.map +1 -0
  766. package/dist/prisma-client/prisma-client-paths.d.ts +7 -0
  767. package/dist/prisma-client/prisma-client-paths.d.ts.map +1 -0
  768. package/dist/prisma-client/prisma-client-paths.js +8 -0
  769. package/dist/prisma-client/prisma-client-paths.js.map +1 -0
  770. package/dist/prisma-client/refresh-prisma-client.d.ts +16 -0
  771. package/dist/prisma-client/refresh-prisma-client.d.ts.map +1 -0
  772. package/dist/prisma-client/refresh-prisma-client.js +53 -0
  773. package/dist/prisma-client/refresh-prisma-client.js.map +1 -0
  774. package/dist/prisma-client/schema-files.d.ts +3 -0
  775. package/dist/prisma-client/schema-files.d.ts.map +1 -0
  776. package/dist/prisma-client/schema-files.js +18 -0
  777. package/dist/prisma-client/schema-files.js.map +1 -0
  778. package/dist/prisma-schema/single-prisma-schema-steps.js +1 -1
  779. package/dist/prisma-schema/single-prisma-schema-steps.js.map +1 -1
  780. package/dist/read-models/buildable-constructor.d.ts +3 -0
  781. package/dist/read-models/buildable-constructor.d.ts.map +1 -0
  782. package/dist/read-models/buildable-constructor.js +3 -0
  783. package/dist/read-models/buildable-constructor.js.map +1 -0
  784. package/dist/read-models/declared-class.d.ts +14 -0
  785. package/dist/read-models/declared-class.d.ts.map +1 -0
  786. package/dist/read-models/declared-class.js +2 -0
  787. package/dist/read-models/declared-class.js.map +1 -0
  788. package/dist/read-models/declared-classes.d.ts +32 -0
  789. package/dist/read-models/declared-classes.d.ts.map +1 -0
  790. package/dist/read-models/declared-classes.js +123 -0
  791. package/dist/read-models/declared-classes.js.map +1 -0
  792. package/dist/read-models/list-answers.d.ts +35 -0
  793. package/dist/read-models/list-answers.d.ts.map +1 -0
  794. package/dist/read-models/list-answers.js +53 -0
  795. package/dist/read-models/list-answers.js.map +1 -0
  796. package/dist/read-models/listing-of.d.ts +25 -0
  797. package/dist/read-models/listing-of.d.ts.map +1 -0
  798. package/dist/read-models/listing-of.js +22 -0
  799. package/dist/read-models/listing-of.js.map +1 -0
  800. package/dist/read-models/read-model-list-of.d.ts +12 -0
  801. package/dist/read-models/read-model-list-of.d.ts.map +1 -0
  802. package/dist/read-models/read-model-list-of.js +94 -0
  803. package/dist/read-models/read-model-list-of.js.map +1 -0
  804. package/dist/read-models/read-model-list.d.ts +41 -0
  805. package/dist/read-models/read-model-list.d.ts.map +1 -0
  806. package/dist/read-models/read-model-list.js +2 -0
  807. package/dist/read-models/read-model-list.js.map +1 -0
  808. package/dist/read-models/read-model-store.d.ts +16 -0
  809. package/dist/read-models/read-model-store.d.ts.map +1 -0
  810. package/dist/read-models/read-model-store.js +2 -0
  811. package/dist/read-models/read-model-store.js.map +1 -0
  812. package/dist/read-models/read-model-stores-of.d.ts +14 -0
  813. package/dist/read-models/read-model-stores-of.d.ts.map +1 -0
  814. package/dist/read-models/read-model-stores-of.js +63 -0
  815. package/dist/read-models/read-model-stores-of.js.map +1 -0
  816. package/dist/run.d.ts.map +1 -1
  817. package/dist/run.js +3 -1
  818. package/dist/run.js.map +1 -1
  819. package/dist/slice/format-slice-verification.d.ts.map +1 -1
  820. package/dist/slice/format-slice-verification.js +11 -5
  821. package/dist/slice/format-slice-verification.js.map +1 -1
  822. package/dist/slice/storage-of-slice.d.ts +10 -7
  823. package/dist/slice/storage-of-slice.d.ts.map +1 -1
  824. package/dist/slice/storage-of-slice.js +145 -22
  825. package/dist/slice/storage-of-slice.js.map +1 -1
  826. package/dist/stack/alias-vars.d.ts +3 -1
  827. package/dist/stack/alias-vars.d.ts.map +1 -1
  828. package/dist/stack/alias-vars.js +5 -2
  829. package/dist/stack/alias-vars.js.map +1 -1
  830. package/dist/stack/stack-vars.d.ts.map +1 -1
  831. package/dist/stack/stack-vars.js +10 -1
  832. package/dist/stack/stack-vars.js.map +1 -1
  833. package/dist/version.d.ts +1 -1
  834. package/dist/version.js +1 -1
  835. package/dist/workspace/exit-code-of.d.ts +2 -2
  836. package/dist/workspace/exit-code-of.d.ts.map +1 -1
  837. package/dist/workspace/exit-code-of.js +2 -2
  838. package/dist/workspace/exit-code-of.js.map +1 -1
  839. package/dist/workspace/located-step.d.ts +5 -0
  840. package/dist/workspace/located-step.d.ts.map +1 -0
  841. package/dist/workspace/located-step.js +7 -0
  842. package/dist/workspace/located-step.js.map +1 -0
  843. package/dist/workspace/remove-file.d.ts +3 -0
  844. package/dist/workspace/remove-file.d.ts.map +1 -0
  845. package/dist/workspace/remove-file.js +11 -0
  846. package/dist/workspace/remove-file.js.map +1 -0
  847. package/dist/workspace/workspace-report.d.ts +2 -0
  848. package/dist/workspace/workspace-report.d.ts.map +1 -1
  849. package/dist/workspace/workspace.d.ts +4 -3
  850. package/dist/workspace/workspace.d.ts.map +1 -1
  851. package/dist/workspace/workspace.js +16 -16
  852. package/dist/workspace/workspace.js.map +1 -1
  853. package/package.json +6 -6
  854. package/templates/file-upload/controller.spec.ts.tpl +66 -2
  855. package/templates/file-upload/controller.ts.tpl +12 -0
  856. package/templates/file-upload/handler.spec.ts.tpl +3 -3
  857. package/templates/init/README.md.tpl +20 -1
  858. package/templates/init/docker/dockerignore.tpl +2 -0
  859. package/templates/init/e2e/jest.e2e.config.js.tpl +5 -0
  860. package/templates/init/e2e/test-database-setup.ts.tpl +120 -0
  861. package/templates/init/e2e/vitest.e2e.config.ts.tpl +2 -1
  862. package/templates/init/platform/composition/compose-application.container.ts.tpl +5 -0
  863. package/templates/init/platform/composition/compose-application.manual.ts.tpl +20 -3
  864. package/templates/init/platform/composition/create-platform.manual.ts.tpl +6 -0
  865. package/templates/init/platform/composition/platform-options.manual.ts.tpl +11 -0
  866. package/templates/init/platform/composition/platform.manual.ts.tpl +7 -0
  867. package/templates/init/platform/composition/platform.module.container.ts.tpl +34 -0
  868. package/templates/init/platform/database/connect-to-database.drizzle.ts.tpl +7 -2
  869. package/templates/init/platform/database/open-test-database.drizzle.ts.tpl +8 -3
  870. package/templates/init/platform/database/open-test-database.knex.ts.tpl +8 -3
  871. package/templates/init/platform/database/open-test-database.prisma.ts.tpl +8 -3
  872. package/templates/init/platform/database/open-test-database.typeorm.ts.tpl +8 -3
  873. package/templates/init/platform/database/read-model-tables.ts.tpl +70 -0
  874. package/templates/init/platform/database/test-database-budget.ts.tpl +108 -0
  875. package/templates/init/platform/database/test-database-clone.ts.tpl +52 -161
  876. package/templates/init/platform/database/test-database-copy.ts.tpl +76 -0
  877. package/templates/init/platform/database/test-database-emptying.ts.tpl +209 -0
  878. package/templates/init/platform/database/test-database-kept.ts.tpl +32 -0
  879. package/templates/init/platform/database/test-database-leftovers.ts.tpl +52 -0
  880. package/templates/init/platform/database/test-database-run.ts.tpl +99 -0
  881. package/templates/init/platform/database/test-database-server.ts.tpl +140 -0
  882. package/templates/init/platform/database/test-database-session.ts.tpl +141 -0
  883. package/templates/init/platform/database/test-database-teardown.ts.tpl +11 -1
  884. package/templates/init/platform/resilience/default-policy.ts.tpl +8 -1
  885. package/templates/init/rules/infrastructure.md.tpl +5 -2
  886. package/templates/init/scripts/read-model-tables.ts.tpl +83 -0
  887. package/templates/nest-controller/upload.spec.ts.tpl +67 -2
  888. package/templates/nest-controller/upload.ts.tpl +12 -0
  889. package/templates/pipeline/biome.json.tpl +1 -1
  890. package/templates/pipeline/github/workflows/codeql.yml +2 -2
  891. package/templates/pipeline/package-scripts.json +2 -2
  892. package/templates/presets/identity/context/infrastructure/persistence/drizzle-account.repository.drizzle.ts.tpl +5 -9
  893. package/templates/presets/identity/context/infrastructure/persistence/drizzle-delegation.repository.drizzle.ts.tpl +5 -9
  894. package/templates/presets/identity/context/infrastructure/persistence/drizzle-invitation.repository.drizzle.ts.tpl +5 -9
  895. package/templates/presets/identity/context/infrastructure/persistence/drizzle-member.repository.drizzle.ts.tpl +5 -9
  896. package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation.repository.drizzle.ts.tpl +5 -9
  897. package/templates/repository/drizzle/repository.ts.tpl +6 -9
  898. package/templates/repository/typeorm/schema-export.tpl +2 -2
  899. package/templates/read-model/typeorm/schema-export.tpl +0 -4
@@ -0,0 +1,9 @@
1
+ import type { Config } from '../config/index.js';
2
+ import type { FileReader } from '../generate/kinds/same-name/sources-of.js';
3
+ import type { Workspace } from '../workspace/index.js';
4
+ /**
5
+ * The tables file of each context a side holds at a place the merged tree holds no file at: the
6
+ * path on that side, to the one the merged tree holds for the context.
7
+ */
8
+ export declare function movedTablesFiles(ws: Workspace, config: Config, read: FileReader): Map<string, string>;
9
+ //# sourceMappingURL=moved-tables-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moved-tables-files.d.ts","sourceRoot":"","sources":["../../src/merge/moved-tables-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAYrG"}
@@ -0,0 +1,16 @@
1
+ import { tablesFileOf } from '../generate/kinds/same-name/tables-file-of.js';
2
+ import { sideTablesFile } from './side-tables-file.js';
3
+ /**
4
+ * The tables file of each context a side holds at a place the merged tree holds no file at: the
5
+ * path on that side, to the one the merged tree holds for the context.
6
+ */
7
+ export function movedTablesFiles(ws, config, read) {
8
+ return new Map(Object.keys(config.contexts).flatMap((context) => {
9
+ const atTheSide = sideTablesFile(config, read, context);
10
+ const merged = tablesFileOf(ws, config, context);
11
+ // A file the merged tree still holds at the side's place has not moved: the context holds two files, each its own.
12
+ const isMoved = atTheSide !== merged && read(atTheSide) !== undefined && !ws.existsAsIs(atTheSide);
13
+ return isMoved ? [[atTheSide, merged]] : [];
14
+ }));
15
+ }
16
+ //# sourceMappingURL=moved-tables-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moved-tables-files.js","sourceRoot":"","sources":["../../src/merge/moved-tables-files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAE1E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAa,EAAE,MAAc,EAAE,IAAgB;IAC9E,OAAO,IAAI,GAAG,CACZ,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC/C,MAAM,SAAS,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACxD,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAEjD,mHAAmH;QACnH,MAAM,OAAO,GAAG,SAAS,KAAK,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,SAAS,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAEnG,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9C,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -11,6 +11,9 @@ export declare const NEXT_STEPS: {
11
11
  readonly lostLines: 'restore them (`git show ORIG_HEAD:<file>`), then `npx ddd-ts-kit merge-trunk --continue`; a deliberate removal: `--continue --accept-lost` (recorded in the merge commit)';
12
12
  readonly leftOut: 'stage each path that belongs to the merge (`git add`), move the others aside, then `npx ddd-ts-kit merge-trunk --continue`';
13
13
  readonly commit: 'fix what git refused (above), then `npx ddd-ts-kit merge-trunk --continue`';
14
+ readonly migrationsUpToDate: 'no merge is in progress, and the migrations are as they were found. Do what the migrations step says, then `npx ddd-ts-kit merge-trunk --to-land` again';
15
+ readonly dryRunUpToDate: 'run the same command without --dry-run to land these migrations, which are then left to commit';
16
+ readonly landedUpToDate: 'commit the migrations as they are now (`git add` their folder, then `git commit`), `npm run verify` in this worktree, push, then squash-merge the pull request';
14
17
  readonly committed: '`npm run verify` in this worktree, then push';
15
18
  readonly landed: '`npm run verify` in this worktree, push, then squash-merge the pull request';
16
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"next-steps.d.ts","sourceRoot":"","sources":["../../src/merge/next-steps.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,eAAO,MAAM,UAAU;aACrB,QAAQ,EAAE,sDAAsD;aAChE,MAAM,EAAE,2DAA2D;aACnE,OAAO,EAAE,mFAAmF;aAC5F,WAAW,EACT,oMAAoM;aACtM,UAAU,EAAE,+FAA+F;aAC3G,OAAO,EAAE,kFAAkF;aAC3F,UAAU,EACR,2GAA2G;aAC7G,MAAM,EAAE,0GAA0G;aAClH,SAAS,EACP,2KAA2K;aAC7K,OAAO,EACL,4HAA4H;aAC9H,MAAM,EAAE,4EAA4E;aACpF,SAAS,EAAE,8CAA8C;aACzD,MAAM,EAAE,6EAA6E;CAC7E,CAAC"}
1
+ {"version":3,"file":"next-steps.d.ts","sourceRoot":"","sources":["../../src/merge/next-steps.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,eAAO,MAAM,UAAU;aACrB,QAAQ,EAAE,sDAAsD;aAChE,MAAM,EAAE,2DAA2D;aACnE,OAAO,EAAE,mFAAmF;aAC5F,WAAW,EACT,oMAAoM;aACtM,UAAU,EAAE,+FAA+F;aAC3G,OAAO,EAAE,kFAAkF;aAC3F,UAAU,EACR,2GAA2G;aAC7G,MAAM,EAAE,0GAA0G;aAClH,SAAS,EACP,2KAA2K;aAC7K,OAAO,EACL,4HAA4H;aAC9H,MAAM,EAAE,4EAA4E;aACpF,kBAAkB,EAChB,yJAAyJ;aAC3J,cAAc,EAAE,gGAAgG;aAChH,cAAc,EACZ,gKAAgK;aAClK,SAAS,EAAE,8CAA8C;aACzD,MAAM,EAAE,6EAA6E;CAC7E,CAAC"}
@@ -11,6 +11,9 @@ export const NEXT_STEPS = {
11
11
  lostLines: 'restore them (`git show ORIG_HEAD:<file>`), then `npx ddd-ts-kit merge-trunk --continue`; a deliberate removal: `--continue --accept-lost` (recorded in the merge commit)',
12
12
  leftOut: 'stage each path that belongs to the merge (`git add`), move the others aside, then `npx ddd-ts-kit merge-trunk --continue`',
13
13
  commit: 'fix what git refused (above), then `npx ddd-ts-kit merge-trunk --continue`',
14
+ migrationsUpToDate: 'no merge is in progress, and the migrations are as they were found. Do what the migrations step says, then `npx ddd-ts-kit merge-trunk --to-land` again',
15
+ dryRunUpToDate: 'run the same command without --dry-run to land these migrations, which are then left to commit',
16
+ landedUpToDate: 'commit the migrations as they are now (`git add` their folder, then `git commit`), `npm run verify` in this worktree, push, then squash-merge the pull request',
14
17
  committed: '`npm run verify` in this worktree, then push',
15
18
  landed: '`npm run verify` in this worktree, push, then squash-merge the pull request',
16
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"next-steps.js","sourceRoot":"","sources":["../../src/merge/next-steps.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,QAAQ,EAAE,sDAAsD;IAChE,MAAM,EAAE,2DAA2D;IACnE,OAAO,EAAE,mFAAmF;IAC5F,WAAW,EACT,oMAAoM;IACtM,UAAU,EAAE,+FAA+F;IAC3G,OAAO,EAAE,kFAAkF;IAC3F,UAAU,EACR,2GAA2G;IAC7G,MAAM,EAAE,0GAA0G;IAClH,SAAS,EACP,2KAA2K;IAC7K,OAAO,EACL,4HAA4H;IAC9H,MAAM,EAAE,4EAA4E;IACpF,SAAS,EAAE,8CAA8C;IACzD,MAAM,EAAE,6EAA6E;CAC7E,CAAC"}
1
+ {"version":3,"file":"next-steps.js","sourceRoot":"","sources":["../../src/merge/next-steps.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,QAAQ,EAAE,sDAAsD;IAChE,MAAM,EAAE,2DAA2D;IACnE,OAAO,EAAE,mFAAmF;IAC5F,WAAW,EACT,oMAAoM;IACtM,UAAU,EAAE,+FAA+F;IAC3G,OAAO,EAAE,kFAAkF;IAC3F,UAAU,EACR,2GAA2G;IAC7G,MAAM,EAAE,0GAA0G;IAClH,SAAS,EACP,2KAA2K;IAC7K,OAAO,EACL,4HAA4H;IAC9H,MAAM,EAAE,4EAA4E;IACpF,kBAAkB,EAChB,yJAAyJ;IAC3J,cAAc,EAAE,gGAAgG;IAChH,cAAc,EACZ,gKAAgK;IAClK,SAAS,EAAE,8CAA8C;IACzD,MAAM,EAAE,6EAA6E;CAC7E,CAAC"}
@@ -0,0 +1,13 @@
1
+ declare const REMEDIES: {
2
+ readonly drizzle: 'would run it again under the new one: reset it, or add to `drizzle.__drizzle_migrations` a row whose `created_at` is the `when` of its new entry in the journal, with any `hash` (required, never compared)';
3
+ readonly knex: 'then refuses every migration (`The migration directory is corrupt, the following files are missing`): reset it, or set `name` of its row in `knex_migrations` to the new file name, extension included';
4
+ readonly prisma: 'still knows it by the old one: reset it, or record the new name as applied with `npx prisma migrate resolve --applied <new name>`';
5
+ readonly typeorm: 'would run it again under the new one: reset it, or correct its row in `migrations` (`timestamp`, and `name`, the class)';
6
+ };
7
+ /**
8
+ * What to do with a database that already ran a migration the landing renames or generates
9
+ * again: its tool knows the migration by the old name.
10
+ */
11
+ export declare function appliedUnderOldName(orm: keyof typeof REMEDIES): string;
12
+ export {};
13
+ //# sourceMappingURL=applied-under-old-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applied-under-old-name.d.ts","sourceRoot":"","sources":["../../../src/merge/order/applied-under-old-name.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,QAAQ;aACZ,OAAO,EACL,6MAA6M;aAC/M,IAAI,EAAE,wMAAwM;aAC9M,MAAM,EACJ,mIAAmI;aACrI,OAAO,EACL,yHAAyH;CACnH,CAAC;AAEX;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,OAAO,QAAQ,GAAG,MAAM,CAEtE"}
@@ -0,0 +1,14 @@
1
+ const REMEDIES = {
2
+ drizzle: 'would run it again under the new one: reset it, or add to `drizzle.__drizzle_migrations` a row whose `created_at` is the `when` of its new entry in the journal, with any `hash` (required, never compared)',
3
+ knex: 'then refuses every migration (`The migration directory is corrupt, the following files are missing`): reset it, or set `name` of its row in `knex_migrations` to the new file name, extension included',
4
+ prisma: 'still knows it by the old one: reset it, or record the new name as applied with `npx prisma migrate resolve --applied <new name>`',
5
+ typeorm: 'would run it again under the new one: reset it, or correct its row in `migrations` (`timestamp`, and `name`, the class)',
6
+ };
7
+ /**
8
+ * What to do with a database that already ran a migration the landing renames or generates
9
+ * again: its tool knows the migration by the old name.
10
+ */
11
+ export function appliedUnderOldName(orm) {
12
+ return `A database that already applied a migration under its old name (development, preview, shared) ${REMEDIES[orm]}.`;
13
+ }
14
+ //# sourceMappingURL=applied-under-old-name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applied-under-old-name.js","sourceRoot":"","sources":["../../../src/merge/order/applied-under-old-name.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG;IACf,OAAO,EACL,6MAA6M;IAC/M,IAAI,EAAE,wMAAwM;IAC9M,MAAM,EACJ,mIAAmI;IACrI,OAAO,EACL,yHAAyH;CACnH,CAAC;AAEX;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAA0B;IAC5D,OAAO,iGAAiG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;AAC3H,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { NamedOrm } from './ordered-migration.js';
2
+ /**
3
+ * Whether the tool runs a migration after another, by their keys: the order of the strings for
4
+ * knex and Prisma, which sort names, the number for TypeORM, which sorts the stamps of the
5
+ * classes. `verify-merge` and the landing both ask it here, so that they never disagree.
6
+ */
7
+ export declare function comesAfter(orm: NamedOrm, key: string, previous: string): boolean;
8
+ //# sourceMappingURL=comes-after.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comes-after.d.ts","sourceRoot":"","sources":["../../../src/merge/order/comes-after.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEhF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Whether the tool runs a migration after another, by their keys: the order of the strings for
3
+ * knex and Prisma, which sort names, the number for TypeORM, which sorts the stamps of the
4
+ * classes. `verify-merge` and the landing both ask it here, so that they never disagree.
5
+ */
6
+ export function comesAfter(orm, key, previous) {
7
+ return orm === 'typeorm' ? Number(key) > Number(previous) : key > previous;
8
+ }
9
+ //# sourceMappingURL=comes-after.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comes-after.js","sourceRoot":"","sources":["../../../src/merge/order/comes-after.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,GAAa,EAAE,GAAW,EAAE,QAAgB;IACrE,OAAO,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { MigrationOrderFinding } from './migration-order-finding.js';
2
+ import type { TrunkToFollow } from './trunk-to-follow.js';
3
+ /**
4
+ * Under drizzle-kit the order is the journal's: the migrator applies the entries generated after
5
+ * the last one a database applied, by their `when`, and nothing else. An entry of the branch
6
+ * generated before the last entry of the trunk is skipped there without a word, and a file the
7
+ * journal does not list (a merge kept the journal of one side) is never applied anywhere; one the
8
+ * trunk holds as well is not the branch's to list.
9
+ */
10
+ export declare function drizzleOrder(root: string, trunk: TrunkToFollow): MigrationOrderFinding[];
11
+ //# sourceMappingURL=drizzle-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drizzle-order.d.ts","sourceRoot":"","sources":["../../../src/merge/order/drizzle-order.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,qBAAqB,EAAE,CAgBxF"}
@@ -0,0 +1,64 @@
1
+ import { isWorkingMigration } from '../../check/migrations/is-working-migration.js';
2
+ import { journalEntries } from '../../check/migrations/journal-entries.js';
3
+ import { readDrizzleMigrations } from '../../check/migrations/read-drizzle-migrations.js';
4
+ import { runGit } from '../../commit/run-git.js';
5
+ import { migrationsAt } from '../migrations-at.js';
6
+ import { appliedUnderOldName } from './applied-under-old-name.js';
7
+ /**
8
+ * Under drizzle-kit the order is the journal's: the migrator applies the entries generated after
9
+ * the last one a database applied, by their `when`, and nothing else. An entry of the branch
10
+ * generated before the last entry of the trunk is skipped there without a word, and a file the
11
+ * journal does not list (a merge kept the journal of one side) is never applied anywhere; one the
12
+ * trunk holds as well is not the branch's to list.
13
+ */
14
+ export function drizzleOrder(root, trunk) {
15
+ const here = readDrizzleMigrations(root);
16
+ if (here === undefined) {
17
+ return [];
18
+ }
19
+ const journal = `./${here.folder}/meta/_journal.json`;
20
+ const theirs = journalEntries(runGit(root, ['show', `${trunk.commit}:${journal}`]) ?? '') ?? [];
21
+ const fix = fixOf(here.folder, trunk);
22
+ const held = new Set(migrationsAt(root, trunk.commit, { folder: here.folder, directories: false }).map(({ name }) => name));
23
+ return [...generatedBefore(here, theirs, trunk), ...unlisted(here, held)].map((finding) => ({ ...finding, fix }));
24
+ }
25
+ function generatedBefore({ entries, folder }, theirs, trunk) {
26
+ const last = theirs.at(-1);
27
+ const landed = new Set(theirs.map((entry) => entry.tag));
28
+ if (last === undefined) {
29
+ return [];
30
+ }
31
+ return entries
32
+ .filter(({ tag, when }) => !landed.has(tag) && !isWorkingMigration(tag) && when <= last.when)
33
+ .map(({ tag }) => ({
34
+ kind: 'before-trunk',
35
+ migration: tag,
36
+ file: `${folder}/${tag}.sql`,
37
+ trunkLast: last.tag,
38
+ text: `the migration "${tag}" of this branch was generated before "${last.tag}", the last migration of ${trunk.name}: the migrator of drizzle skips it without a word on a database that already applied "${last.tag}"`,
39
+ }));
40
+ }
41
+ /**
42
+ * A file the trunk holds too is the trunk's to list: every branch would report it, and none could
43
+ * fix it. A working migration is left out here as everywhere: its place is decided when it lands.
44
+ */
45
+ function unlisted({ entries, files, folder }, held) {
46
+ const listed = new Set(entries.map((entry) => entry.tag));
47
+ return files
48
+ .filter((tag) => !listed.has(tag) && !held.has(tag) && !isWorkingMigration(tag))
49
+ .map((tag) => ({
50
+ kind: 'not-in-journal',
51
+ migration: tag,
52
+ file: `${folder}/${tag}.sql`,
53
+ text: `the migration "${tag}" is not in ${folder}/meta/_journal.json: drizzle-kit migrate never applies it (a merge that keeps the journal of one side loses the entries of the other)`,
54
+ }));
55
+ }
56
+ /** The merge that replays when the trunk is to bring in; the replay alone, on the journal of the trunk, once it is in. */
57
+ function fixOf(folder, trunk) {
58
+ const limit = 'A branch with more than one migration that changes the schema is refused, with the steps to generate them again one at a time.';
59
+ if (!trunk.merged) {
60
+ return `Run \`npx ddd-ts-kit merge-trunk\`: it brings ${trunk.name} in, takes its journal and its snapshots, and generates the migrations of the branch again after them, under their names. ${limit} ${appliedUnderOldName('drizzle')}`;
61
+ }
62
+ return `Take the journal and the snapshots of the trunk, \`git checkout ${trunk.name} -- ${folder}/meta\`, then run \`npx ddd-ts-kit drizzle-generate --replay --base ${trunk.name}\`: it finds the migrations of the branch by their files and generates them again after the trunk's, under their names. ${limit} ${appliedUnderOldName('drizzle')}`;
63
+ }
64
+ //# sourceMappingURL=drizzle-order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drizzle-order.js","sourceRoot":"","sources":["../../../src/merge/order/drizzle-order.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ import type { NamedOrm, OrderedMigration } from './ordered-migration.js';
2
+ /** The migrations as their tool runs them. */
3
+ export declare function inOrder(orm: NamedOrm, migrations: readonly OrderedMigration[]): OrderedMigration[];
4
+ //# sourceMappingURL=in-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-order.d.ts","sourceRoot":"","sources":["../../../src/merge/order/in-order.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEtE,8CAA8C;AAC9C,wBAAgB,OAAO,CAAC,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAIlG"}
@@ -0,0 +1,6 @@
1
+ import { comesAfter } from './comes-after.js';
2
+ /** The migrations as their tool runs them. */
3
+ export function inOrder(orm, migrations) {
4
+ return [...migrations].sort((left, right) => left.key === right.key ? 0 : comesAfter(orm, left.key, right.key) ? 1 : -1);
5
+ }
6
+ //# sourceMappingURL=in-order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-order.js","sourceRoot":"","sources":["../../../src/merge/order/in-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,8CAA8C;AAC9C,MAAM,UAAU,OAAO,CAAC,GAAa,EAAE,UAAuC;IAC5E,OAAO,CAAC,GAAG,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAC1C,IAAI,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * One migration of a branch that the trunk's history would run in another order, or never:
3
+ *
4
+ * - `before-trunk`: the branch adds it and it sorts before the last migration of the trunk;
5
+ * - `not-in-journal`: its file is in the folder of drizzle-kit and no entry of the journal names it.
6
+ */
7
+ export interface MigrationOrderFinding {
8
+ readonly kind: 'before-trunk' | 'not-in-journal';
9
+ /** The name of the migration, without extension. */
10
+ readonly migration: string;
11
+ /** From the project root, POSIX separators. */
12
+ readonly file: string;
13
+ /** The last migration of the trunk, which this one sorts before; absent for a file out of the journal. */
14
+ readonly trunkLast?: string;
15
+ readonly text: string;
16
+ readonly fix: string;
17
+ }
18
+ //# sourceMappingURL=migration-order-finding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-order-finding.d.ts","sourceRoot":"","sources":["../../../src/merge/order/migration-order-finding.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,gBAAgB,CAAC;IACjD,oDAAoD;IACpD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0GAA0G;IAC1G,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=migration-order-finding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-order-finding.js","sourceRoot":"","sources":["../../../src/merge/order/migration-order-finding.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import type { MigrationOrderFinding } from './migration-order-finding.js';
2
+ /**
3
+ * The migrations of the working tree that do not follow the trunk's: one the branch adds that
4
+ * sorts before the last migration of the trunk, on the four ORM, and under drizzle-kit a file
5
+ * the journal does not list. A working migration (`working-<what-it-does>`) is left out: its
6
+ * place is decided when the branch lands. Nothing without the config of the kit or an ORM.
7
+ */
8
+ export declare function migrationOrder(root: string, trunk: {
9
+ name: string;
10
+ commit: string;
11
+ }): MigrationOrderFinding[];
12
+ //# sourceMappingURL=migration-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-order.d.ts","sourceRoot":"","sources":["../../../src/merge/order/migration-order.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,qBAAqB,EAAE,CAS7G"}
@@ -0,0 +1,21 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { runGit } from '../../commit/run-git.js';
4
+ import { CONFIG_FILE, readConfig } from '../../config/index.js';
5
+ import { drizzleOrder } from './drizzle-order.js';
6
+ import { namedOrder } from './named-order.js';
7
+ /**
8
+ * The migrations of the working tree that do not follow the trunk's: one the branch adds that
9
+ * sorts before the last migration of the trunk, on the four ORM, and under drizzle-kit a file
10
+ * the journal does not list. A working migration (`working-<what-it-does>`) is left out: its
11
+ * place is decided when the branch lands. Nothing without the config of the kit or an ORM.
12
+ */
13
+ export function migrationOrder(root, trunk) {
14
+ const orm = fs.existsSync(path.join(root, CONFIG_FILE)) ? readConfig(root).config.stack.orm : undefined;
15
+ const merged = runGit(root, ['merge-base', '--is-ancestor', trunk.commit, 'HEAD']) !== undefined;
16
+ if (orm === 'drizzle') {
17
+ return drizzleOrder(root, { ...trunk, merged });
18
+ }
19
+ return orm === 'knex' || orm === 'prisma' || orm === 'typeorm' ? namedOrder(root, orm, { ...trunk, merged }) : [];
20
+ }
21
+ //# sourceMappingURL=migration-order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-order.js","sourceRoot":"","sources":["../../../src/merge/order/migration-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,KAAuC;IAClF,MAAM,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;IACxG,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,SAAS,CAAC;IAEjG,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,YAAY,CAAC,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACpH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { NamedOrm, OrderedMigration } from './ordered-migration.js';
2
+ /**
3
+ * What the tool of an ORM takes for a migration in a commit, read from git, in the order it runs
4
+ * them: the trunk a branch has to follow. The same shapes as `migrationsOfTree`.
5
+ */
6
+ export declare function migrationsOfCommit(root: string, orm: NamedOrm, commit: string): OrderedMigration[];
7
+ //# sourceMappingURL=migrations-of-commit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrations-of-commit.d.ts","sourceRoot":"","sources":["../../../src/merge/order/migrations-of-commit.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQtE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAelG"}
@@ -0,0 +1,43 @@
1
+ import path from 'node:path';
2
+ import { runGit } from '../../commit/run-git.js';
3
+ import { inOrder } from './in-order.js';
4
+ const FOLDERS = { knex: 'migrations', prisma: 'prisma/migrations', typeorm: 'migrations' };
5
+ /** What knex and TypeORM load from the folder; a declaration file is not one. */
6
+ const SCRIPT = /(?<!\.d)\.(?:js|ts|mjs|cjs)$/;
7
+ /** A class whose name ends with 13 digits, for `git grep -E`, which reads a commit without a checkout. */
8
+ const STAMPED_CLASS = 'class[[:space:]]+[A-Za-z_$][A-Za-z0-9_$]*[0-9]{13}';
9
+ /**
10
+ * What the tool of an ORM takes for a migration in a commit, read from git, in the order it runs
11
+ * them: the trunk a branch has to follow. The same shapes as `migrationsOfTree`.
12
+ */
13
+ export function migrationsOfCommit(root, orm, commit) {
14
+ const folder = FOLDERS[orm];
15
+ if (orm === 'typeorm') {
16
+ return inOrder(orm, stampedIn(runGit(root, ['grep', '-I', '-o', '-E', STAMPED_CLASS, commit, '--', folder])));
17
+ }
18
+ const files = (runGit(root, ['ls-tree', '-r', '--name-only', commit, '--', `${folder}/`]) ?? '')
19
+ .split('\n')
20
+ .filter((file) => file !== '');
21
+ return inOrder(orm, files.flatMap((file) => (orm === 'prisma' ? folderOf(file, folder) : scriptOf(file, folder))));
22
+ }
23
+ /** `<commit>:<file>:class <Name><stamp>` on each line of `git grep`; the first class of a file names it. */
24
+ function stampedIn(matches) {
25
+ const byFile = new Map();
26
+ for (const line of (matches ?? '').split('\n')) {
27
+ const [, file, stamp] = /^[^:]+:(.+):class\s+\S*?(\d{13})$/.exec(line) ?? [];
28
+ if (file !== undefined && stamp !== undefined && SCRIPT.test(file) && !byFile.has(file)) {
29
+ byFile.set(file, { name: path.posix.basename(file).replace(SCRIPT, ''), file, key: stamp });
30
+ }
31
+ }
32
+ return [...byFile.values()];
33
+ }
34
+ function folderOf(file, folder) {
35
+ const [name = '', held, ...deeper] = file.slice(folder.length + 1).split('/');
36
+ return held === 'migration.sql' && deeper.length === 0 ? [{ name, file, key: name }] : [];
37
+ }
38
+ function scriptOf(file, folder) {
39
+ const entry = file.slice(folder.length + 1);
40
+ const name = entry.replace(SCRIPT, '');
41
+ return entry.includes('/') || name === entry ? [] : [{ name, file, key: name }];
42
+ }
43
+ //# sourceMappingURL=migrations-of-commit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrations-of-commit.js","sourceRoot":"","sources":["../../../src/merge/order/migrations-of-commit.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,9 @@
1
+ import type { NamedOrm, OrderedMigration } from './ordered-migration.js';
2
+ /**
3
+ * What the tool of an ORM takes for a migration in the working tree, in the order it runs them.
4
+ * knex loads every script of the folder, whatever its name. Prisma reads the folders that hold a
5
+ * `migration.sql`. TypeORM takes the classes whose name ends with 13 digits, however the file
6
+ * is named.
7
+ */
8
+ export declare function migrationsOfTree(root: string, orm: NamedOrm): OrderedMigration[];
9
+ //# sourceMappingURL=migrations-of-tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrations-of-tree.d.ts","sourceRoot":"","sources":["../../../src/merge/order/migrations-of-tree.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAItE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,gBAAgB,EAAE,CAgBhF"}
@@ -0,0 +1,25 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { readMigrationFolder } from '../../check/migrations/read-migration-folder.js';
4
+ import { scan } from '../../check/scan/scan.js';
5
+ import { inOrder } from './in-order.js';
6
+ const STAMPED_CLASS = /(?<![\w$.])class\s+[A-Za-z_$][\w$]*?(\d{13})(?![\w$])/;
7
+ /**
8
+ * What the tool of an ORM takes for a migration in the working tree, in the order it runs them.
9
+ * knex loads every script of the folder, whatever its name. Prisma reads the folders that hold a
10
+ * `migration.sql`. TypeORM takes the classes whose name ends with 13 digits, however the file
11
+ * is named.
12
+ */
13
+ export function migrationsOfTree(root, orm) {
14
+ const found = readMigrationFolder(root, orm)?.migrations ?? [];
15
+ if (orm === 'typeorm') {
16
+ return inOrder(orm, found.flatMap((migration) => stamped(migration, fs.readFileSync(path.join(root, migration.file), 'utf8'))));
17
+ }
18
+ const held = orm === 'prisma' ? found.filter(({ file }) => fs.existsSync(path.join(root, file))) : found;
19
+ return inOrder(orm, held.map((migration) => ({ ...migration, key: migration.name })));
20
+ }
21
+ function stamped(migration, text) {
22
+ const stamp = STAMPED_CLASS.exec(scan(text).code)?.[1];
23
+ return stamp === undefined ? [] : [{ ...migration, key: stamp }];
24
+ }
25
+ //# sourceMappingURL=migrations-of-tree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrations-of-tree.js","sourceRoot":"","sources":["../../../src/merge/order/migrations-of-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,MAAM,aAAa,GAAG,uDAAuD,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,GAAa;IAC1D,MAAM,KAAK,GAAG,mBAAmB,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,UAAU,IAAI,EAAE,CAAC;IAE/D,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,OAAO,CACZ,GAAG,EACH,KAAK,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAC3G,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAEzG,OAAO,OAAO,CACZ,GAAG,EACH,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,CACjE,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,SAAoB,EAAE,IAAY;IACjD,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAEvD,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;AACnE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { MigrationOrderFinding } from './migration-order-finding.js';
2
+ import type { NamedOrm } from './ordered-migration.js';
3
+ import type { TrunkToFollow } from './trunk-to-follow.js';
4
+ /**
5
+ * Under knex, Prisma and TypeORM a migration is a file (a folder under Prisma) the tool orders
6
+ * itself, and each of the three runs whatever the database has not run yet: one that comes
7
+ * before the last of the trunk runs after it where the trunk's is applied, and before it on a new
8
+ * database. What a migration is and what orders it are the tool's: see `migrationsOfTree`.
9
+ */
10
+ export declare function namedOrder(root: string, orm: NamedOrm, trunk: TrunkToFollow): MigrationOrderFinding[];
11
+ //# sourceMappingURL=named-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"named-order.d.ts","sourceRoot":"","sources":["../../../src/merge/order/named-order.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,qBAAqB,CAAC;AAGtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIvD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,qBAAqB,EAAE,CAarG"}
@@ -0,0 +1,36 @@
1
+ import { isWorkingMigration } from '../../check/migrations/is-working-migration.js';
2
+ import { appliedUnderOldName } from './applied-under-old-name.js';
3
+ import { comesAfter } from './comes-after.js';
4
+ import { migrationsOfCommit } from './migrations-of-commit.js';
5
+ import { migrationsOfTree } from './migrations-of-tree.js';
6
+ const TOOLS = { knex: 'knex', prisma: 'Prisma', typeorm: 'TypeORM' };
7
+ /**
8
+ * Under knex, Prisma and TypeORM a migration is a file (a folder under Prisma) the tool orders
9
+ * itself, and each of the three runs whatever the database has not run yet: one that comes
10
+ * before the last of the trunk runs after it where the trunk's is applied, and before it on a new
11
+ * database. What a migration is and what orders it are the tool's: see `migrationsOfTree`.
12
+ */
13
+ export function namedOrder(root, orm, trunk) {
14
+ const onTrunk = migrationsOfCommit(root, orm, trunk.commit);
15
+ const last = onTrunk.at(-1);
16
+ if (last === undefined) {
17
+ return [];
18
+ }
19
+ const landed = new Set(onTrunk.map((migration) => migration.file));
20
+ return migrationsOfTree(root, orm)
21
+ .filter(({ file, name, key }) => !landed.has(file) && !isWorkingMigration(name) && !comesAfter(orm, key, last.key))
22
+ .map((migration) => beforeTrunk(migration, { orm, last, trunk }));
23
+ }
24
+ function beforeTrunk({ name, file }, { orm, last, trunk }) {
25
+ const tool = TOOLS[orm];
26
+ const brought = trunk.merged ? `${trunk.name} being merged already, it` : `it brings ${trunk.name} in and`;
27
+ return {
28
+ kind: 'before-trunk',
29
+ migration: name,
30
+ file,
31
+ trunkLast: last.name,
32
+ text: `the migration "${name}" of this branch sorts before "${last.name}", the last migration of ${trunk.name}: ${tool} runs it after "${last.name}" on a database that already applied that one, and before it on a new database, so one history runs in two orders`,
33
+ fix: `Run \`npx ddd-ts-kit merge-trunk --to-land\` before the landing: ${brought} renames the migration with a number after "${last.name}", its content kept. When it changes a table a later migration of ${trunk.name} changes too, or when "${last.name}" carries no number a migration can follow, the command stops and says what to do. ${appliedUnderOldName(orm)}`,
34
+ };
35
+ }
36
+ //# sourceMappingURL=named-order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"named-order.js","sourceRoot":"","sources":["../../../src/merge/order/named-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAW,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,GAAa,EAAE,KAAoB;IAC1E,MAAM,OAAO,GAAG,kBAAkB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5D,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IAEnE,OAAO,gBAAgB,CAAC,IAAI,EAAE,GAAG,CAAC;SAC/B,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;SAClH,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,WAAW,CAClB,EAAE,IAAI,EAAE,IAAI,EAAoB,EAChC,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAmE;IAErF,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IACxB,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,2BAA2B,CAAC,CAAC,CAAC,aAAa,KAAK,CAAC,IAAI,SAAS,CAAC;IAE3G,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE,IAAI;QACf,IAAI;QACJ,SAAS,EAAE,IAAI,CAAC,IAAI;QACpB,IAAI,EAAE,kBAAkB,IAAI,kCAAkC,IAAI,CAAC,IAAI,4BAA4B,KAAK,CAAC,IAAI,KAAK,IAAI,mBAAmB,IAAI,CAAC,IAAI,mHAAmH;QACrQ,GAAG,EAAE,oEAAoE,OAAO,+CAA+C,IAAI,CAAC,IAAI,qEAAqE,KAAK,CAAC,IAAI,0BAA0B,IAAI,CAAC,IAAI,sFAAsF,mBAAmB,CAAC,GAAG,CAAC,EAAE;KAC3W,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Migration } from '../../check/migrations/migration-folder.js';
2
+ /** The ORM whose migrations are files or folders the tool orders itself. */
3
+ export type NamedOrm = 'knex' | 'prisma' | 'typeorm';
4
+ /** A migration with what its tool orders it by. */
5
+ export interface OrderedMigration extends Migration {
6
+ /**
7
+ * The name of the file without its extension (knex), the name of the folder (Prisma), or the
8
+ * 13 digits that end the name of the class (TypeORM, which never reads the name of the file).
9
+ */
10
+ readonly key: string;
11
+ }
12
+ //# sourceMappingURL=ordered-migration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ordered-migration.d.ts","sourceRoot":"","sources":["../../../src/merge/order/ordered-migration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErD,mDAAmD;AACnD,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ordered-migration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ordered-migration.js","sourceRoot":"","sources":["../../../src/merge/order/ordered-migration.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ /** The trunk the migrations of a branch are ordered against. */
2
+ export interface TrunkToFollow {
3
+ /** The ref, as the report and the commands of a fix name it. */
4
+ readonly name: string;
5
+ readonly commit: string;
6
+ /** Whether the branch already holds that commit: what brings the order right differs. */
7
+ readonly merged: boolean;
8
+ }
9
+ //# sourceMappingURL=trunk-to-follow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trunk-to-follow.d.ts","sourceRoot":"","sources":["../../../src/merge/order/trunk-to-follow.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yFAAyF;IACzF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=trunk-to-follow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trunk-to-follow.js","sourceRoot":"","sources":["../../../src/merge/order/trunk-to-follow.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import type { MergeContext } from './merge-context.js';
2
+ import type { Settled } from './merge-report.js';
3
+ import type { Resolution } from './resolution.js';
4
+ /** The merge a dry run computed: its tree, the trunk it merges, and how each conflicted path would be settled. */
5
+ interface Previewed {
6
+ readonly tree: string;
7
+ readonly trunk: string;
8
+ readonly resolutions: readonly Resolution[];
9
+ }
10
+ /**
11
+ * What the merge would settle in the schema index, said by a dry run that writes nothing, on disk
12
+ * or anywhere: the index as the merge would leave it and the sources of the contexts are read from
13
+ * the tree the merge computed, and the names are settled in memory as the real run settles them. A
14
+ * configuration both sides changed is read as a resolution keeping the contexts of both sides
15
+ * would read it (`configOfTheMerge`). On TypeORM nothing is settled: the names the merged index
16
+ * imports twice are said, as the real run says them. Whatever keeps the dry run from saying is
17
+ * said only when the two sides give one name to two tables, and never changes how it exits.
18
+ */
19
+ export declare function previewTableNames(context: MergeContext, previewed: Previewed): Settled[];
20
+ export {};
21
+ //# sourceMappingURL=preview-table-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-table-names.d.ts","sourceRoot":"","sources":["../../src/merge/preview-table-names.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU/C,kHAAkH;AAClH,UAAU,SAAS;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,EAAE,CAoBxF"}