ddd-ts-kit 0.4.1 → 0.6.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 (485) hide show
  1. package/README.md +41 -10
  2. package/dist/check/alias/build-scripts.d.ts.map +1 -1
  3. package/dist/check/alias/build-scripts.js +3 -1
  4. package/dist/check/alias/build-scripts.js.map +1 -1
  5. package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
  6. package/dist/check/catalogue/architecture-rules.js +2 -0
  7. package/dist/check/catalogue/architecture-rules.js.map +1 -1
  8. package/dist/check/configuration/config-inspection.d.ts +6 -0
  9. package/dist/check/configuration/config-inspection.d.ts.map +1 -1
  10. package/dist/check/configuration/config-inspection.js +14 -1
  11. package/dist/check/configuration/config-inspection.js.map +1 -1
  12. package/dist/check/explain/persistence-docs.d.ts +3 -0
  13. package/dist/check/explain/persistence-docs.d.ts.map +1 -0
  14. package/dist/check/explain/persistence-docs.js +14 -0
  15. package/dist/check/explain/persistence-docs.js.map +1 -0
  16. package/dist/check/explain/rule-docs.d.ts.map +1 -1
  17. package/dist/check/explain/rule-docs.js +2 -0
  18. package/dist/check/explain/rule-docs.js.map +1 -1
  19. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  20. package/dist/check/fixtures/fixtures.js +2 -0
  21. package/dist/check/fixtures/fixtures.js.map +1 -1
  22. package/dist/check/fixtures/persistence-fixtures.d.ts +3 -0
  23. package/dist/check/fixtures/persistence-fixtures.d.ts.map +1 -0
  24. package/dist/check/fixtures/persistence-fixtures.js +72 -0
  25. package/dist/check/fixtures/persistence-fixtures.js.map +1 -0
  26. package/dist/check/migrations/drizzle-history-findings.d.ts +9 -0
  27. package/dist/check/migrations/drizzle-history-findings.d.ts.map +1 -0
  28. package/dist/check/migrations/drizzle-history-findings.js +70 -0
  29. package/dist/check/migrations/drizzle-history-findings.js.map +1 -0
  30. package/dist/check/migrations/drizzle-migrations.d.ts +23 -0
  31. package/dist/check/migrations/drizzle-migrations.d.ts.map +1 -0
  32. package/dist/check/migrations/drizzle-migrations.js +2 -0
  33. package/dist/check/migrations/drizzle-migrations.js.map +1 -0
  34. package/dist/check/migrations/drizzle-out-folder.d.ts +3 -0
  35. package/dist/check/migrations/drizzle-out-folder.d.ts.map +1 -0
  36. package/dist/check/migrations/drizzle-out-folder.js +18 -0
  37. package/dist/check/migrations/drizzle-out-folder.js.map +1 -0
  38. package/dist/check/migrations/migration-folder.d.ts +13 -0
  39. package/dist/check/migrations/migration-folder.d.ts.map +1 -0
  40. package/dist/check/migrations/migration-folder.js +2 -0
  41. package/dist/check/migrations/migration-folder.js.map +1 -0
  42. package/dist/check/migrations/migration-name-findings.d.ts +9 -0
  43. package/dist/check/migrations/migration-name-findings.d.ts.map +1 -0
  44. package/dist/check/migrations/migration-name-findings.js +32 -0
  45. package/dist/check/migrations/migration-name-findings.js.map +1 -0
  46. package/dist/check/migrations/read-drizzle-migrations.d.ts +4 -0
  47. package/dist/check/migrations/read-drizzle-migrations.d.ts.map +1 -0
  48. package/dist/check/migrations/read-drizzle-migrations.js +67 -0
  49. package/dist/check/migrations/read-drizzle-migrations.js.map +1 -0
  50. package/dist/check/migrations/read-migration-folder.d.ts +5 -0
  51. package/dist/check/migrations/read-migration-folder.d.ts.map +1 -0
  52. package/dist/check/migrations/read-migration-folder.js +38 -0
  53. package/dist/check/migrations/read-migration-folder.js.map +1 -0
  54. package/dist/check/rules/config-valid.d.ts.map +1 -1
  55. package/dist/check/rules/config-valid.js +4 -1
  56. package/dist/check/rules/config-valid.js.map +1 -1
  57. package/dist/check/rules/persistence-migration-history.d.ts +3 -0
  58. package/dist/check/rules/persistence-migration-history.d.ts.map +1 -0
  59. package/dist/check/rules/persistence-migration-history.js +24 -0
  60. package/dist/check/rules/persistence-migration-history.js.map +1 -0
  61. package/dist/commands/init.d.ts.map +1 -1
  62. package/dist/commands/init.js +12 -1
  63. package/dist/commands/init.js.map +1 -1
  64. package/dist/commands/sdk.d.ts +8 -0
  65. package/dist/commands/sdk.d.ts.map +1 -0
  66. package/dist/commands/sdk.js +82 -0
  67. package/dist/commands/sdk.js.map +1 -0
  68. package/dist/commit/is-derived.d.ts.map +1 -1
  69. package/dist/commit/is-derived.js +5 -7
  70. package/dist/commit/is-derived.js.map +1 -1
  71. package/dist/config/ci-extra-problems.d.ts +4 -0
  72. package/dist/config/ci-extra-problems.d.ts.map +1 -0
  73. package/dist/config/ci-extra-problems.js +27 -0
  74. package/dist/config/ci-extra-problems.js.map +1 -0
  75. package/dist/config/ci-extras.d.ts +13 -0
  76. package/dist/config/ci-extras.d.ts.map +1 -0
  77. package/dist/config/ci-extras.js +13 -0
  78. package/dist/config/ci-extras.js.map +1 -0
  79. package/dist/config/config.d.ts +32 -0
  80. package/dist/config/config.d.ts.map +1 -1
  81. package/dist/config/default-sdk-name.d.ts +3 -0
  82. package/dist/config/default-sdk-name.d.ts.map +1 -0
  83. package/dist/config/default-sdk-name.js +3 -0
  84. package/dist/config/default-sdk-name.js.map +1 -0
  85. package/dist/config/index.d.ts +6 -1
  86. package/dist/config/index.d.ts.map +1 -1
  87. package/dist/config/index.js +5 -0
  88. package/dist/config/index.js.map +1 -1
  89. package/dist/config/open-api-problems.d.ts +4 -0
  90. package/dist/config/open-api-problems.d.ts.map +1 -0
  91. package/dist/config/open-api-problems.js +87 -0
  92. package/dist/config/open-api-problems.js.map +1 -0
  93. package/dist/config/openapi-formats.d.ts +3 -0
  94. package/dist/config/openapi-formats.d.ts.map +1 -0
  95. package/dist/config/openapi-formats.js +3 -0
  96. package/dist/config/openapi-formats.js.map +1 -0
  97. package/dist/config/parse-ci.d.ts +4 -0
  98. package/dist/config/parse-ci.d.ts.map +1 -0
  99. package/dist/config/parse-ci.js +7 -0
  100. package/dist/config/parse-ci.js.map +1 -0
  101. package/dist/config/parse-config.d.ts.map +1 -1
  102. package/dist/config/parse-config.js +6 -0
  103. package/dist/config/parse-config.js.map +1 -1
  104. package/dist/config/parse-open-api.d.ts +4 -0
  105. package/dist/config/parse-open-api.d.ts.map +1 -0
  106. package/dist/config/parse-open-api.js +20 -0
  107. package/dist/config/parse-open-api.js.map +1 -0
  108. package/dist/config/parse-sdk.d.ts +4 -0
  109. package/dist/config/parse-sdk.d.ts.map +1 -0
  110. package/dist/config/parse-sdk.js +12 -0
  111. package/dist/config/parse-sdk.js.map +1 -0
  112. package/dist/config/restack-config-text.d.ts +1 -1
  113. package/dist/config/restack-config-text.d.ts.map +1 -1
  114. package/dist/config/restack-config-text.js +12 -2
  115. package/dist/config/restack-config-text.js.map +1 -1
  116. package/dist/config/sdk-accesses.d.ts +3 -0
  117. package/dist/config/sdk-accesses.d.ts.map +1 -0
  118. package/dist/config/sdk-accesses.js +3 -0
  119. package/dist/config/sdk-accesses.js.map +1 -0
  120. package/dist/config/sdk-problems.d.ts +4 -0
  121. package/dist/config/sdk-problems.d.ts.map +1 -0
  122. package/dist/config/sdk-problems.js +55 -0
  123. package/dist/config/sdk-problems.js.map +1 -0
  124. package/dist/config/serialize-config.js +11 -0
  125. package/dist/config/serialize-config.js.map +1 -1
  126. package/dist/contracts/contract-format.d.ts +3 -0
  127. package/dist/contracts/contract-format.d.ts.map +1 -0
  128. package/dist/contracts/contract-format.js +11 -0
  129. package/dist/contracts/contract-format.js.map +1 -0
  130. package/dist/contracts/stringify-contract.d.ts +3 -0
  131. package/dist/contracts/stringify-contract.d.ts.map +1 -0
  132. package/dist/contracts/stringify-contract.js +6 -0
  133. package/dist/contracts/stringify-contract.js.map +1 -0
  134. package/dist/contracts.d.ts +9 -0
  135. package/dist/contracts.d.ts.map +1 -0
  136. package/dist/contracts.js +9 -0
  137. package/dist/contracts.js.map +1 -0
  138. package/dist/describe/describe-context.d.ts.map +1 -1
  139. package/dist/describe/describe-context.js +14 -3
  140. package/dist/describe/describe-context.js.map +1 -1
  141. package/dist/docs/open-api-documents-file.d.ts +4 -0
  142. package/dist/docs/open-api-documents-file.d.ts.map +1 -0
  143. package/dist/docs/open-api-documents-file.js +5 -0
  144. package/dist/docs/open-api-documents-file.js.map +1 -0
  145. package/dist/docs/render-open-api-documents.d.ts +13 -0
  146. package/dist/docs/render-open-api-documents.d.ts.map +1 -0
  147. package/dist/docs/render-open-api-documents.js +42 -0
  148. package/dist/docs/render-open-api-documents.js.map +1 -0
  149. package/dist/docs/write-docs.d.ts.map +1 -1
  150. package/dist/docs/write-docs.js +2 -0
  151. package/dist/docs/write-docs.js.map +1 -1
  152. package/dist/docs/write-open-api-documents.d.ts +9 -0
  153. package/dist/docs/write-open-api-documents.d.ts.map +1 -0
  154. package/dist/docs/write-open-api-documents.js +33 -0
  155. package/dist/docs/write-open-api-documents.js.map +1 -0
  156. package/dist/generate/kinds/declare-context-entries.d.ts.map +1 -1
  157. package/dist/generate/kinds/declare-context-entries.js +3 -1
  158. package/dist/generate/kinds/declare-context-entries.js.map +1 -1
  159. package/dist/generate/kinds/extraction/entry-point.d.ts.map +1 -1
  160. package/dist/generate/kinds/extraction/entry-point.js +3 -1
  161. package/dist/generate/kinds/extraction/entry-point.js.map +1 -1
  162. package/dist/generate/kinds/knip-project.d.ts +7 -0
  163. package/dist/generate/kinds/knip-project.d.ts.map +1 -0
  164. package/dist/generate/kinds/knip-project.js +12 -0
  165. package/dist/generate/kinds/knip-project.js.map +1 -0
  166. package/dist/help/commands-guide-region.d.ts +3 -0
  167. package/dist/help/commands-guide-region.d.ts.map +1 -0
  168. package/dist/help/commands-guide-region.js +12 -0
  169. package/dist/help/commands-guide-region.js.map +1 -0
  170. package/dist/help/notes.d.ts +3 -0
  171. package/dist/help/notes.d.ts.map +1 -0
  172. package/dist/help/notes.js +30 -0
  173. package/dist/help/notes.js.map +1 -0
  174. package/dist/help/reference-text.d.ts +3 -0
  175. package/dist/help/reference-text.d.ts.map +1 -0
  176. package/dist/help/reference-text.js +14 -0
  177. package/dist/help/reference-text.js.map +1 -0
  178. package/dist/help/usage.d.ts +3 -0
  179. package/dist/help/usage.d.ts.map +1 -0
  180. package/dist/help/usage.js +38 -0
  181. package/dist/help/usage.js.map +1 -0
  182. package/dist/index.d.ts +1 -0
  183. package/dist/index.d.ts.map +1 -1
  184. package/dist/index.js +1 -0
  185. package/dist/index.js.map +1 -1
  186. package/dist/init/files/persistence-files.js +1 -1
  187. package/dist/init/files/persistence-files.js.map +1 -1
  188. package/dist/init/files/pipeline-files.d.ts.map +1 -1
  189. package/dist/init/files/pipeline-files.js +4 -2
  190. package/dist/init/files/pipeline-files.js.map +1 -1
  191. package/dist/init/manifest/database-scripts.d.ts.map +1 -1
  192. package/dist/init/manifest/database-scripts.js +5 -4
  193. package/dist/init/manifest/database-scripts.js.map +1 -1
  194. package/dist/init/manifest/versions.js +23 -23
  195. package/dist/init/run-init.d.ts.map +1 -1
  196. package/dist/init/run-init.js +5 -0
  197. package/dist/init/run-init.js.map +1 -1
  198. package/dist/init/stack/resolve-ci-extras.d.ts +8 -0
  199. package/dist/init/stack/resolve-ci-extras.d.ts.map +1 -0
  200. package/dist/init/stack/resolve-ci-extras.js +31 -0
  201. package/dist/init/stack/resolve-ci-extras.js.map +1 -0
  202. package/dist/init/stack/resolve-stack.d.ts.map +1 -1
  203. package/dist/init/stack/resolve-stack.js +15 -3
  204. package/dist/init/stack/resolve-stack.js.map +1 -1
  205. package/dist/init/stack/stack-options.d.ts +4 -0
  206. package/dist/init/stack/stack-options.d.ts.map +1 -1
  207. package/dist/init/template-vars.d.ts.map +1 -1
  208. package/dist/init/template-vars.js +16 -0
  209. package/dist/init/template-vars.js.map +1 -1
  210. package/dist/init/write-agent-settings.js +2 -2
  211. package/dist/init/write-agent-settings.js.map +1 -1
  212. package/dist/init/write-contracts.d.ts.map +1 -1
  213. package/dist/init/write-contracts.js +7 -3
  214. package/dist/init/write-contracts.js.map +1 -1
  215. package/dist/progress/format-progress.d.ts.map +1 -1
  216. package/dist/progress/format-progress.js +3 -1
  217. package/dist/progress/format-progress.js.map +1 -1
  218. package/dist/run.d.ts.map +1 -1
  219. package/dist/run.js +4 -63
  220. package/dist/run.js.map +1 -1
  221. package/dist/sdk/agent-instruction.d.ts +3 -0
  222. package/dist/sdk/agent-instruction.d.ts.map +1 -0
  223. package/dist/sdk/agent-instruction.js +3 -0
  224. package/dist/sdk/agent-instruction.js.map +1 -0
  225. package/dist/sdk/client-document.d.ts +16 -0
  226. package/dist/sdk/client-document.d.ts.map +1 -0
  227. package/dist/sdk/client-document.js +2 -0
  228. package/dist/sdk/client-document.js.map +1 -0
  229. package/dist/sdk/client-files.d.ts +7 -0
  230. package/dist/sdk/client-files.d.ts.map +1 -0
  231. package/dist/sdk/client-files.js +25 -0
  232. package/dist/sdk/client-files.js.map +1 -0
  233. package/dist/sdk/client-manifest.d.ts +14 -0
  234. package/dist/sdk/client-manifest.d.ts.map +1 -0
  235. package/dist/sdk/client-manifest.js +45 -0
  236. package/dist/sdk/client-manifest.js.map +1 -0
  237. package/dist/sdk/client-names.d.ts +7 -0
  238. package/dist/sdk/client-names.d.ts.map +1 -0
  239. package/dist/sdk/client-names.js +30 -0
  240. package/dist/sdk/client-names.js.map +1 -0
  241. package/dist/sdk/client-operation.d.ts +21 -0
  242. package/dist/sdk/client-operation.d.ts.map +1 -0
  243. package/dist/sdk/client-operation.js +2 -0
  244. package/dist/sdk/client-operation.js.map +1 -0
  245. package/dist/sdk/client-package-name.d.ts +3 -0
  246. package/dist/sdk/client-package-name.d.ts.map +1 -0
  247. package/dist/sdk/client-package-name.js +5 -0
  248. package/dist/sdk/client-package-name.js.map +1 -0
  249. package/dist/sdk/client-parameter.d.ts +9 -0
  250. package/dist/sdk/client-parameter.d.ts.map +1 -0
  251. package/dist/sdk/client-parameter.js +2 -0
  252. package/dist/sdk/client-parameter.js.map +1 -0
  253. package/dist/sdk/client-response.d.ts +10 -0
  254. package/dist/sdk/client-response.d.ts.map +1 -0
  255. package/dist/sdk/client-response.js +2 -0
  256. package/dist/sdk/client-response.js.map +1 -0
  257. package/dist/sdk/client-tsconfig.d.ts +7 -0
  258. package/dist/sdk/client-tsconfig.d.ts.map +1 -0
  259. package/dist/sdk/client-tsconfig.js +26 -0
  260. package/dist/sdk/client-tsconfig.js.map +1 -0
  261. package/dist/sdk/clients-directory.d.ts +3 -0
  262. package/dist/sdk/clients-directory.d.ts.map +1 -0
  263. package/dist/sdk/clients-directory.js +3 -0
  264. package/dist/sdk/clients-directory.js.map +1 -0
  265. package/dist/sdk/contract-documents.d.ts +11 -0
  266. package/dist/sdk/contract-documents.d.ts.map +1 -0
  267. package/dist/sdk/contract-documents.js +46 -0
  268. package/dist/sdk/contract-documents.js.map +1 -0
  269. package/dist/sdk/doc-comment.d.ts +3 -0
  270. package/dist/sdk/doc-comment.d.ts.map +1 -0
  271. package/dist/sdk/doc-comment.js +11 -0
  272. package/dist/sdk/doc-comment.js.map +1 -0
  273. package/dist/sdk/document-source.d.ts +6 -0
  274. package/dist/sdk/document-source.d.ts.map +1 -0
  275. package/dist/sdk/document-source.js +2 -0
  276. package/dist/sdk/document-source.js.map +1 -0
  277. package/dist/sdk/edit-json-file.d.ts +9 -0
  278. package/dist/sdk/edit-json-file.d.ts.map +1 -0
  279. package/dist/sdk/edit-json-file.js +31 -0
  280. package/dist/sdk/edit-json-file.js.map +1 -0
  281. package/dist/sdk/error-codes.d.ts +4 -0
  282. package/dist/sdk/error-codes.d.ts.map +1 -0
  283. package/dist/sdk/error-codes.js +6 -0
  284. package/dist/sdk/error-codes.js.map +1 -0
  285. package/dist/sdk/generated-header.d.ts +4 -0
  286. package/dist/sdk/generated-header.d.ts.map +1 -0
  287. package/dist/sdk/generated-header.js +5 -0
  288. package/dist/sdk/generated-header.js.map +1 -0
  289. package/dist/sdk/index.d.ts +3 -0
  290. package/dist/sdk/index.d.ts.map +1 -0
  291. package/dist/sdk/index.js +3 -0
  292. package/dist/sdk/index.js.map +1 -0
  293. package/dist/sdk/instruct-agents.d.ts +8 -0
  294. package/dist/sdk/instruct-agents.d.ts.map +1 -0
  295. package/dist/sdk/instruct-agents.js +19 -0
  296. package/dist/sdk/instruct-agents.js.map +1 -0
  297. package/dist/sdk/is-input-optional.d.ts +4 -0
  298. package/dist/sdk/is-input-optional.d.ts.map +1 -0
  299. package/dist/sdk/is-input-optional.js +5 -0
  300. package/dist/sdk/is-input-optional.js.map +1 -0
  301. package/dist/sdk/is-json.d.ts +3 -0
  302. package/dist/sdk/is-json.d.ts.map +1 -0
  303. package/dist/sdk/is-json.js +5 -0
  304. package/dist/sdk/is-json.js.map +1 -0
  305. package/dist/sdk/manifest-json.d.ts +3 -0
  306. package/dist/sdk/manifest-json.d.ts.map +1 -0
  307. package/dist/sdk/manifest-json.js +5 -0
  308. package/dist/sdk/manifest-json.js.map +1 -0
  309. package/dist/sdk/operation-description.d.ts +4 -0
  310. package/dist/sdk/operation-description.d.ts.map +1 -0
  311. package/dist/sdk/operation-description.js +11 -0
  312. package/dist/sdk/operation-description.js.map +1 -0
  313. package/dist/sdk/operation-names.d.ts +8 -0
  314. package/dist/sdk/operation-names.d.ts.map +1 -0
  315. package/dist/sdk/operation-names.js +35 -0
  316. package/dist/sdk/operation-names.js.map +1 -0
  317. package/dist/sdk/operation-place.d.ts +8 -0
  318. package/dist/sdk/operation-place.d.ts.map +1 -0
  319. package/dist/sdk/operation-place.js +2 -0
  320. package/dist/sdk/operation-place.js.map +1 -0
  321. package/dist/sdk/planned-client.d.ts +8 -0
  322. package/dist/sdk/planned-client.d.ts.map +1 -0
  323. package/dist/sdk/planned-client.js +2 -0
  324. package/dist/sdk/planned-client.js.map +1 -0
  325. package/dist/sdk/planned-clients.d.ts +6 -0
  326. package/dist/sdk/planned-clients.d.ts.map +1 -0
  327. package/dist/sdk/planned-clients.js +30 -0
  328. package/dist/sdk/planned-clients.js.map +1 -0
  329. package/dist/sdk/property-key.d.ts +3 -0
  330. package/dist/sdk/property-key.d.ts.map +1 -0
  331. package/dist/sdk/property-key.js +6 -0
  332. package/dist/sdk/property-key.js.map +1 -0
  333. package/dist/sdk/put-file.d.ts +4 -0
  334. package/dist/sdk/put-file.d.ts.map +1 -0
  335. package/dist/sdk/put-file.js +10 -0
  336. package/dist/sdk/put-file.js.map +1 -0
  337. package/dist/sdk/read-client-document.d.ts +5 -0
  338. package/dist/sdk/read-client-document.d.ts.map +1 -0
  339. package/dist/sdk/read-client-document.js +34 -0
  340. package/dist/sdk/read-client-document.js.map +1 -0
  341. package/dist/sdk/read-operation.d.ts +4 -0
  342. package/dist/sdk/read-operation.d.ts.map +1 -0
  343. package/dist/sdk/read-operation.js +64 -0
  344. package/dist/sdk/read-operation.js.map +1 -0
  345. package/dist/sdk/read-responses.d.ts +4 -0
  346. package/dist/sdk/read-responses.d.ts.map +1 -0
  347. package/dist/sdk/read-responses.js +32 -0
  348. package/dist/sdk/read-responses.js.map +1 -0
  349. package/dist/sdk/read-schemes.d.ts +8 -0
  350. package/dist/sdk/read-schemes.d.ts.map +1 -0
  351. package/dist/sdk/read-schemes.js +37 -0
  352. package/dist/sdk/read-schemes.js.map +1 -0
  353. package/dist/sdk/read-security.d.ts +3 -0
  354. package/dist/sdk/read-security.d.ts.map +1 -0
  355. package/dist/sdk/read-security.js +7 -0
  356. package/dist/sdk/read-security.js.map +1 -0
  357. package/dist/sdk/render-client.d.ts +4 -0
  358. package/dist/sdk/render-client.d.ts.map +1 -0
  359. package/dist/sdk/render-client.js +49 -0
  360. package/dist/sdk/render-client.js.map +1 -0
  361. package/dist/sdk/render-errors.d.ts +4 -0
  362. package/dist/sdk/render-errors.d.ts.map +1 -0
  363. package/dist/sdk/render-errors.js +18 -0
  364. package/dist/sdk/render-errors.js.map +1 -0
  365. package/dist/sdk/render-index.d.ts +4 -0
  366. package/dist/sdk/render-index.d.ts.map +1 -0
  367. package/dist/sdk/render-index.js +22 -0
  368. package/dist/sdk/render-index.js.map +1 -0
  369. package/dist/sdk/render-input.d.ts +4 -0
  370. package/dist/sdk/render-input.d.ts.map +1 -0
  371. package/dist/sdk/render-input.js +31 -0
  372. package/dist/sdk/render-input.js.map +1 -0
  373. package/dist/sdk/render-operation.d.ts +7 -0
  374. package/dist/sdk/render-operation.d.ts.map +1 -0
  375. package/dist/sdk/render-operation.js +46 -0
  376. package/dist/sdk/render-operation.js.map +1 -0
  377. package/dist/sdk/render-operations.d.ts +4 -0
  378. package/dist/sdk/render-operations.d.ts.map +1 -0
  379. package/dist/sdk/render-operations.js +12 -0
  380. package/dist/sdk/render-operations.js.map +1 -0
  381. package/dist/sdk/render-readme.d.ts +9 -0
  382. package/dist/sdk/render-readme.d.ts.map +1 -0
  383. package/dist/sdk/render-readme.js +53 -0
  384. package/dist/sdk/render-readme.js.map +1 -0
  385. package/dist/sdk/render-result.d.ts +4 -0
  386. package/dist/sdk/render-result.d.ts.map +1 -0
  387. package/dist/sdk/render-result.js +26 -0
  388. package/dist/sdk/render-result.js.map +1 -0
  389. package/dist/sdk/render-schemas.d.ts +4 -0
  390. package/dist/sdk/render-schemas.d.ts.map +1 -0
  391. package/dist/sdk/render-schemas.js +15 -0
  392. package/dist/sdk/render-schemas.js.map +1 -0
  393. package/dist/sdk/schema-type-name.d.ts +3 -0
  394. package/dist/sdk/schema-type-name.d.ts.map +1 -0
  395. package/dist/sdk/schema-type-name.js +9 -0
  396. package/dist/sdk/schema-type-name.js.map +1 -0
  397. package/dist/sdk/schema-types.d.ts +17 -0
  398. package/dist/sdk/schema-types.d.ts.map +1 -0
  399. package/dist/sdk/schema-types.js +120 -0
  400. package/dist/sdk/schema-types.js.map +1 -0
  401. package/dist/sdk/scheme-carrier.d.ts +7 -0
  402. package/dist/sdk/scheme-carrier.d.ts.map +1 -0
  403. package/dist/sdk/scheme-carrier.js +2 -0
  404. package/dist/sdk/scheme-carrier.js.map +1 -0
  405. package/dist/sdk/sdk-scripts.d.ts +8 -0
  406. package/dist/sdk/sdk-scripts.d.ts.map +1 -0
  407. package/dist/sdk/sdk-scripts.js +26 -0
  408. package/dist/sdk/sdk-scripts.js.map +1 -0
  409. package/dist/sdk/sdk-set-up.d.ts +8 -0
  410. package/dist/sdk/sdk-set-up.d.ts.map +1 -0
  411. package/dist/sdk/sdk-set-up.js +2 -0
  412. package/dist/sdk/sdk-set-up.js.map +1 -0
  413. package/dist/sdk/set-up-sdk.d.ts +11 -0
  414. package/dist/sdk/set-up-sdk.d.ts.map +1 -0
  415. package/dist/sdk/set-up-sdk.js +19 -0
  416. package/dist/sdk/set-up-sdk.js.map +1 -0
  417. package/dist/sdk/type-name.d.ts +3 -0
  418. package/dist/sdk/type-name.d.ts.map +1 -0
  419. package/dist/sdk/type-name.js +5 -0
  420. package/dist/sdk/type-name.js.map +1 -0
  421. package/dist/sdk/unlocked-clients.d.ts +10 -0
  422. package/dist/sdk/unlocked-clients.d.ts.map +1 -0
  423. package/dist/sdk/unlocked-clients.js +36 -0
  424. package/dist/sdk/unlocked-clients.js.map +1 -0
  425. package/dist/sdk/wire-sdk.d.ts +12 -0
  426. package/dist/sdk/wire-sdk.d.ts.map +1 -0
  427. package/dist/sdk/wire-sdk.js +58 -0
  428. package/dist/sdk/wire-sdk.js.map +1 -0
  429. package/dist/sdk/with-client-paths.d.ts +8 -0
  430. package/dist/sdk/with-client-paths.d.ts.map +1 -0
  431. package/dist/sdk/with-client-paths.js +20 -0
  432. package/dist/sdk/with-client-paths.js.map +1 -0
  433. package/dist/sdk/with-entry.d.ts +3 -0
  434. package/dist/sdk/with-entry.d.ts.map +1 -0
  435. package/dist/sdk/with-entry.js +6 -0
  436. package/dist/sdk/with-entry.js.map +1 -0
  437. package/dist/sdk/with-knip-workspaces.d.ts +7 -0
  438. package/dist/sdk/with-knip-workspaces.d.ts.map +1 -0
  439. package/dist/sdk/with-knip-workspaces.js +40 -0
  440. package/dist/sdk/with-knip-workspaces.js.map +1 -0
  441. package/dist/sdk/write-clients.d.ts +10 -0
  442. package/dist/sdk/write-clients.d.ts.map +1 -0
  443. package/dist/sdk/write-clients.js +32 -0
  444. package/dist/sdk/write-clients.js.map +1 -0
  445. package/dist/version.d.ts +1 -1
  446. package/dist/version.js +1 -1
  447. package/dist/yaml/from-yaml.d.ts +8 -0
  448. package/dist/yaml/from-yaml.d.ts.map +1 -0
  449. package/dist/yaml/from-yaml.js +149 -0
  450. package/dist/yaml/from-yaml.js.map +1 -0
  451. package/dist/yaml/read-scalar.d.ts +7 -0
  452. package/dist/yaml/read-scalar.d.ts.map +1 -0
  453. package/dist/yaml/read-scalar.js +50 -0
  454. package/dist/yaml/read-scalar.js.map +1 -0
  455. package/dist/yaml/to-yaml.d.ts +8 -0
  456. package/dist/yaml/to-yaml.d.ts.map +1 -0
  457. package/dist/yaml/to-yaml.js +132 -0
  458. package/dist/yaml/to-yaml.js.map +1 -0
  459. package/dist/yaml/yaml-shape-error.d.ts +6 -0
  460. package/dist/yaml/yaml-shape-error.d.ts.map +1 -0
  461. package/dist/yaml/yaml-shape-error.js +10 -0
  462. package/dist/yaml/yaml-shape-error.js.map +1 -0
  463. package/package.json +2 -2
  464. package/templates/docs/integration-readme.md.tpl +2 -2
  465. package/templates/init/CLAUDE.md.tpl +5 -1
  466. package/templates/init/README.md.tpl +45 -12
  467. package/templates/init/platform/database/data-source.typeorm.ts.tpl +1 -1
  468. package/templates/init/platform/database/drizzle.config.ts.tpl +2 -0
  469. package/templates/init/platform/database/knexfile.js.tpl +9 -3
  470. package/templates/init/platform/database/schema.drizzle.ts.tpl +1 -1
  471. package/templates/init/platform/database/schema.knex.ts.tpl +2 -2
  472. package/templates/init/platform/http/with-documentation.ts.tpl +13 -9
  473. package/templates/init/rules/presentation.md.tpl +4 -1
  474. package/templates/init/scripts/events.ts.tpl +16 -5
  475. package/templates/init/scripts/openapi.ts.tpl +49 -20
  476. package/templates/pipeline/github/branch-protection.md +8 -7
  477. package/templates/pipeline/github/workflows/{ci.yml → ci.yml.tpl} +3 -0
  478. package/templates/pipeline/gitlab/gitlab-ci.yml.tpl +14 -0
  479. package/templates/pipeline/gitlab/merge-request-settings.md +7 -6
  480. package/templates/pipeline/package-scripts.json +1 -1
  481. package/templates/repository/drizzle/table.tpl +2 -2
  482. package/templates/repository/prisma/model.tpl +1 -1
  483. package/templates/repository/typeorm/table.tpl +1 -1
  484. package/templates/sdk/errors.ts.tpl +30 -0
  485. package/templates/sdk/runtime.ts.tpl +347 -0
package/README.md CHANGED
@@ -23,7 +23,9 @@ npx ddd-ts-kit check
23
23
  ```
24
24
 
25
25
  `init` ends by saying what to run next: `pnpm install`, then `pnpm run verify` (`npm install`,
26
- then `npm run verify` with `--package-manager npm`). A new project passes that whole gate before
26
+ then `npm run verify` with `--package-manager npm`), then the recommended steps of the method, in
27
+ order ([methodology](../../docs/guides/methodology.md)); [which command, when](../../docs/guides/commands.md)
28
+ gives the command of each moment of a project and the reference of every flag. A new project passes that whole gate before
27
29
  anything is generated, with no context, with one and with several: the end-to-end suite installs
28
30
  it for real and runs it, on both package managers and on every proven stack. After the install the
29
31
  CLI is the one the project pins: `pnpm exec ddd-ts-kit <command>`, or `npx ddd-ts-kit <command>`.
@@ -42,7 +44,7 @@ ddd-ts-kit init [--http express|fastify|nest|none]
42
44
  [--orm drizzle|knex|prisma|typeorm|custom|none]
43
45
  [--database postgres|mysql|sqlite|none]
44
46
  [--events in-memory|outbox] [--docs-ui swagger|scalar|redoc|none]
45
- [--ci github|gitlab|both|none]
47
+ [--ci github|gitlab|both|none] [--ci-extras <extra>,...|none]
46
48
  [--authn jwt|keycloak|none] [--authz rbac|abac|rebac|custom]
47
49
  [--broker none|rabbitmq|kafka|nats|redis|custom] [--cache none|redis] [--audit on|off]
48
50
  [--errors none|sentry] [--logger stdout|pino|winston]
@@ -51,7 +53,7 @@ ddd-ts-kit init [--http express|fastify|nest|none]
51
53
  [--routes controllers|functions]
52
54
  [--package-manager npm|pnpm]
53
55
  [--allow-no-outbox "<reason>"] [--import-alias '$<name>/']
54
- [--import-extension none|js]
56
+ [--import-extension none|js] [--sdk]
55
57
  [--context <name>:<core|supporting|generic>]...
56
58
  [--dry-run] [--force]
57
59
  ```
@@ -59,8 +61,9 @@ ddd-ts-kit init [--http express|fastify|nest|none]
59
61
  Works in an empty directory or an existing project. An existing file is never replaced without
60
62
  `--force`; it is reported as skipped. `init` also writes the generated contracts as the scripts
61
63
  of the project write them for a project without a route or an integration event of its own
62
- (`openapi/openapi.json`, `docs/integration/asyncapi.json` and `event-catalog.md`), so that the
63
- first commit holds them and `docs:check` passes at once; a contract that is already there is
64
+ (`openapi/openapi.yaml`, `docs/integration/asyncapi.yaml` and `event-catalog.md`; JSON under
65
+ `"openapi": { "format": "json" }` of the config), so that the first commit holds them and
66
+ `docs:check` passes at once; a contract that is already there is
64
67
  left alone, `--force` included. An existing `package.json` is merged: missing scripts and
65
68
  dependencies are added, yours are kept and mentioned in the notes. Run again later, `init` keeps
66
69
  the stack recorded in the config.
@@ -75,6 +78,13 @@ are wired into them again; what another generator had added to a file of the pla
75
78
  value of a gateway, the settings of a job) is not, and a note says so. A config that cannot be
76
79
  read is replaced.
77
80
 
81
+ The pipeline uses free tools only. `--ci-extras` adds jobs that need a paid plan on a private
82
+ repository, or report into a merge request only in a paid tier: `codeql`, `dependency-review`
83
+ (GitHub), `gitlab-sast`, `gitlab-secret-detection`, `gitlab-dependency-scanning` (GitLab). The
84
+ list is recorded as `ci.extras` in the config; an unknown name, or a job of a platform `--ci` does
85
+ not cover, is refused. The table of every tool and its conditions:
86
+ [pipeline/README.md](../../pipeline/README.md#free-by-default-paid-on-request).
87
+
78
88
  An import of a file of the project is written without an extension
79
89
  (`@/contexts/billing/domain/aggregates/invoice.aggregate`): `init` records
80
90
  `"importExtension": "none"`, and `--import-extension js` asks for the `.js` of the emitted file
@@ -172,7 +182,7 @@ config, `docsUi`, `ci` and `logger` included.
172
182
  | `package.json` | scripts and dependencies of the stack (below); `build` is the compiler, then `ddd-ts-kit build-aliases` |
173
183
  | `tsconfig.json`, `tsconfig.build.json` | strict, NodeNext, `rootDir` `.` and `outDir` `dist`, and `paths`: the one declaration of the import alias (`@/*` to `./src/*`, `$test/*`, `$scripts/*`, and `$generated/*` with Prisma), derived from `importAlias` (`--import-alias '$<name>/'`, `@/` by default; `#<name>/` and `@<name>/` are refused with the reason); the build config extends the other and declares no `paths`; `experimentalDecorators` (and `emitDecoratorMetadata`) only for nest or class-validator, whose decorators are legacy ones: the declarations and the aspects serve both modes |
174
184
  | `src/main.ts` | composition root: tracing first (error reporting second with `--errors sentry`), config, persistence, application (`log`, `traceConsumers: config.tracing.consumers`, `resilience`, `jobs: { start: config.runJobs, settings: jobSettings(process.env) }`), outbox relay, HTTP server; on `SIGTERM` or `SIGINT` it closes the server, stops the relay, stops the application, closes the persistence and shuts the tracing down |
175
- | `src/platform/` | one export per file, each named after it, in one folder per concern. At its root: `tracing.ts`, `compose-application.ts` and `job-settings.ts` (`jobSettings(environment, context?)`: one line per job, `JOB_<CONTEXT>_<JOB>_ENABLED=false` switches one off). `config/` (`app-config.ts`, `load-config.ts`, `config-error.ts`, `read-tracing.ts`: fail-fast on `DATABASE_URL`, `LOG_LEVEL`, `LOG_FORMAT`, `LOG_SCRUB_MESSAGES`, the `OUTBOUND_*` policy, `RUN_JOBS` and the tracing variables below); `observability/` (`create-logger.ts`, see `--logger`; `create-metrics.ts`: a `NoopMetrics` behind a `TODO(platform)`); `resilience/` (`resilience-settings.ts`, `default-resilience.ts`, `adapter-aspects.ts`: retry with backoff and a timeout for `external` and `gateway`, `own-policy.ts` for an adapter that states its own, `self-governed.ts`); `events/`, `database/`, `auth/`, `audit/`, `redis/` (below); `http/` (`start-http-server.ts`, `with-documentation.ts`: `/docs` and `/openapi.json`, off in production unless `API_DOCS=true`). With `--di tsyringe`: `compose-application.ts` (`composeApplication(persistence, options, contexts?)`: `kernelModule({...})`, the platform module, the authorization module, the contexts; installs the aspect runtime), `lay-foundations.ts` (one execution scope, clock, id generator, logger, metrics, instrumentation and audit, built before any module), `platform.module.ts` (what replaces the in-process defaults of the kernel: unit of work, processed-event store, the storage class, `OutboxStore`, `EventSubscribers` behind a broker, `ErrorMapper`, and `builder.around(['external', 'gateway'], ...)`, the resilience of every adapter that leaves the process), `platform-test.module.ts` (what a handler spec lists next to its context: the storage class bound to a factory that throws), `buses/create-command-bus.ts` and `create-query-bus.ts` (outermost first: `errorReportingMiddleware`, `loggingMiddleware`, `metricsMiddleware`, the permission, the span of the use case, the audit entry, then the unit of work of a command). With `--di manual` or `nest`: `compose-application.ts`, `platform.ts` (`interface Platform`, with `jobs: JobScheduler` and `adapter`, which wraps what a module file instantiates), `create-platform.ts`, `jobs/configured-job-scheduler.ts` (applies `job-settings.ts` to what a module registers) |
185
+ | `src/platform/` | one export per file, each named after it, in one folder per concern. At its root: `tracing.ts`, `compose-application.ts` and `job-settings.ts` (`jobSettings(environment, context?)`: one line per job, `JOB_<CONTEXT>_<JOB>_ENABLED=false` switches one off). `config/` (`app-config.ts`, `load-config.ts`, `config-error.ts`, `read-tracing.ts`: fail-fast on `DATABASE_URL`, `LOG_LEVEL`, `LOG_FORMAT`, `LOG_SCRUB_MESSAGES`, the `OUTBOUND_*` policy, `RUN_JOBS` and the tracing variables below); `observability/` (`create-logger.ts`, see `--logger`; `create-metrics.ts`: a `NoopMetrics` behind a `TODO(platform)`); `resilience/` (`resilience-settings.ts`, `default-resilience.ts`, `adapter-aspects.ts`: retry with backoff and a timeout for `external` and `gateway`, `own-policy.ts` for an adapter that states its own, `self-governed.ts`); `events/`, `database/`, `auth/`, `audit/`, `redis/` (below); `http/` (`start-http-server.ts`, `with-documentation.ts`: `/docs` and `/openapi.json`, or `/openapi/<name>.json` per document of a split contract, off in production unless `API_DOCS=true`; `openapi-documents.ts`, the split written by `ddd-ts-kit docs` from `openapi.documents`). With `--di tsyringe`: `compose-application.ts` (`composeApplication(persistence, options, contexts?)`: `kernelModule({...})`, the platform module, the authorization module, the contexts; installs the aspect runtime), `lay-foundations.ts` (one execution scope, clock, id generator, logger, metrics, instrumentation and audit, built before any module), `platform.module.ts` (what replaces the in-process defaults of the kernel: unit of work, processed-event store, the storage class, `OutboxStore`, `EventSubscribers` behind a broker, `ErrorMapper`, and `builder.around(['external', 'gateway'], ...)`, the resilience of every adapter that leaves the process), `platform-test.module.ts` (what a handler spec lists next to its context: the storage class bound to a factory that throws), `buses/create-command-bus.ts` and `create-query-bus.ts` (outermost first: `errorReportingMiddleware`, `loggingMiddleware`, `metricsMiddleware`, the permission, the span of the use case, the audit entry, then the unit of work of a command). With `--di manual` or `nest`: `compose-application.ts`, `platform.ts` (`interface Platform`, with `jobs: JobScheduler` and `adapter`, which wraps what a module file instantiates), `create-platform.ts`, `jobs/configured-job-scheduler.ts` (applies `job-settings.ts` to what a module registers) |
176
186
  | tracing | wired once, by the platform (`tracing/platform-only`): no `decorate` hook, no `decorate-bindings.ts`. `tracing.ts` starts `initTracing` of `@ddd-ts-kit/tracing/node` before any other module, on what `config/read-tracing.ts` validates: `OTEL_EXPORTER_OTLP_ENDPOINT` (a URL; left out, no span leaves the process), `TRACE_SAMPLE_RATIO` (0 to 1) and `TRACE_CONSUMERS` (`continue`, the default: a consumed event stays in the trace of its publication; `link`: each delivery starts a trace linked to it). With `--di tsyringe`: `lay-foundations.ts` builds `traceApplication({ consumers })`, `compose-application.ts` hands it to `kernelModule({ instrumentation })` (one span per use case, repository call, domain event, publication, consumer and job) and gives the outbox relay `tracedPublisher(bus)`. With hand wiring: `create-platform.ts` applies the members of `traceApplication()` itself (`useCase` on both buses, `domainEvents`, `publisher`, `binding` around every adapter, `job`, `executionScope`, `errorReporter`), with `tracedSubscriber` and `tracedPublisher` around the provider. With an HTTP stack, in both families, `auth/http-boundary.ts` sets `around: tracedRoutes()`: one `SERVER` span per request, named by its route |
177
187
  | `--logger` | `src/platform/observability/create-logger.ts`, one per choice: `stdout` (the default) is the `StdoutLogger` of `@ddd-ts-kit/aspects`, JSON lines, credentials not redacted; `pino` is `createPinoLogger` of `@ddd-ts-kit/pino` (dependencies `pino` and `pino-pretty`); `winston` is `createWinstonLogger` of `@ddd-ts-kit/winston`; these two redact the credential keys of the kernel. Every entry carries `traceLogFields(scope)`: the correlation id, origin, actor and tenant of the work in progress and the ids of the active trace. `LOG_LEVEL`, `LOG_FORMAT` (`json`, the default, or `pretty`; with `stdout`, which has no pretty format, `pretty` is refused when the configuration is loaded) and `LOG_SCRUB_MESSAGES` (`[message removed]` in place of the message of a logged error that is not a `DomainError`) are validated in `config/load-config.ts`. Stopping the application flushes the error reporter, then the logger, last: `container.stop()` does it on tsyringe, `compose-application.ts` flushes explicitly with hand wiring. The tools and the tests compose the application without `log` and write nothing |
178
188
  | `src/platform/auth/` | `create-authenticator.ts` (`--authn jwt`: `JwtAuthenticator` on `AUTH_ISSUER`, `AUTH_AUDIENCE`, `AUTH_JWKS_URI`; `--authn keycloak`: `keycloakAuthenticator` on `KEYCLOAK_URL`, `KEYCLOAK_REALM`, `KEYCLOAK_AUDIENCE` and the optional `KEYCLOAK_CLIENT_ID`; `--authn none`: `development-header-authenticator.ts`, which reads `x-development-actor` and throws in production), `principal-of.ts`, `security-schemes.ts`, `offline-authenticator.ts`, `http-boundary.ts` (`resolvePrincipal` answering a `Session`, `executionScope`, `errorMapper` and `onError`, spread into the mount options: every request runs inside the execution scope, with its correlation id), `create-authorizer.ts` and the files of the model (`roles.ts`, with the role `system` every system actor holds; `attribute-policies.ts`; `relationship-schema.ts`, `create-tuple-store.ts` and its contract spec, `relation-tuples.ts`, `relate-system-actors.ts`, `permission-mapping.ts` and `permissions.ts`; `custom-authorizer.ts`, its `authorizerContract` spec and `permissions.ts`), `authorization.ts` (`authorizationModule` with tsyringe) or `use-case-protection.ts` (the guard of the hand-wired buses), `access-policies.ts`, and with `--audit off` `log-decisions.ts` (one log entry per decision, ids and codes only). Without an HTTP stack there is no authenticator and no boundary |
@@ -182,8 +192,8 @@ config, `docsUi`, `ci` and `logger` included.
182
192
  | `--authn keycloak` | a compose service `keycloak` (Keycloak 26.8.0, `start-dev --import-realm`, profile `identity`) and `docker/keycloak/<project>-realm.json`: the API client, a public client `<project>-local` with the direct grant, its audience and `tenant_id` mappers, the realm role `admin`, and the demo users `demo-admin` and `demo-user`, for local development only |
183
193
  | `src/platform/events/` | `event-provider.ts` (`bus`, `forConsumer(name)`, `start()`, `close()`), `in-process-events.ts`, and for `--broker` `create-event-provider.ts`: `RabbitMqEventBus` (`AMQP_URL`), `KafkaEventBus` (`KAFKA_BROKERS`, with `aggregate-key-of.ts` for per-aggregate order), `NatsEventBus` (`NATS_URL`) or `RedisStreamsEventBus` of `@ddd-ts-kit/redis/event-bus` (`REDIS_URL`: Redis, Dragonfly or Valkey), each with one subscriber per consuming context (`forConsumer`), `assertTopology` at start, its address validated and a compose service with a healthcheck; or `custom-event-bus.ts` with its `eventBusContract` spec. `start-outbox-relay.ts` with the outbox. `--broker redis` with `--cache redis` is one server and one compose service, `cache`; alone, the service is `streams` |
184
194
  | `src/platform/database/` | `persistence.ts` (`interface Persistence`: unit of work, outbox and processed-event stores of the ORM package, the storage handle), `open-persistence.ts`, `persistence-over.ts`, `inert-persistence.ts`, the connection (`connect-to-database.ts`, `create-client.ts` or `create-data-source.ts`), `schema.ts`, `open-test-database.ts` (PostgreSQL in process, or the server named by a URL). The storage class a repository adapter names in its dependency list: `database.ts` with drizzle and prisma (`abstract class Database extends` the context type of the ORM package), `KnexContext` of `@ddd-ts-kit/knex`, `TypeOrmContext` of `@ddd-ts-kit/typeorm` |
185
- | migration tooling | `drizzle.config.ts`, `knexfile.js` and `migrations/0001_initial.js`, `prisma/schema.prisma` and `prisma.config.ts`, or `data-source.ts` |
186
- | `scripts/openapi.ts`, `scripts/events.ts` | write `openapi/openapi.json`, `docs/integration/asyncapi.json` and `docs/integration/event-catalog.md`; `--check` fails on a difference |
195
+ | migration tooling | `drizzle.config.ts`, `knexfile.js` and `migrations/00000000000000_initial.js`, `prisma/schema.prisma` and `prisma.config.ts`, or `data-source.ts` |
196
+ | `scripts/openapi.ts`, `scripts/events.ts` | write `openapi/openapi.yaml` (one file per document of `openapi.documents`), `docs/integration/asyncapi.yaml` and `docs/integration/event-catalog.md`, in JSON under `openapi.format: json`; `--check` fails on a difference |
187
197
  | `docker-compose.yml`, `.env.example`, `Dockerfile`, `.dockerignore` | the database with a healthcheck and a named volume, `jaegertracing/jaeger:2.22.0` behind the `observability` profile (its UI and its OTLP port bound to 127.0.0.1), ports from `.env`; a multi-stage, non-root image with production dependencies only |
188
198
  | `vitest.e2e.config.ts`, `test/e2e/support/` | `start-application.ts` (the whole application on a free port, on an in-process database unless `DATABASE_URL` is set, no job run by time), `create-credentials.ts`, `auth-environment.ts`, `test-environment.ts`, `story-of.ts` (`storyOf(trace)`: a trace without the calls an adapter makes on itself, the form `expectSpanTree` asserts) |
189
199
  | `docs/context-map.md`, `docs/integration/README.md` | see `docs` |
@@ -194,7 +204,7 @@ config, `docsUi`, `ci` and `logger` included.
194
204
  | `knip.json` | dead code: entry points are `main.ts` and `apps/*/main.ts`, the scripts, the specs and the fakes, the module files in the explicit style, the role files under discovery (jobs and publishers included) |
195
205
  | `vitest.config.ts` | unit and integration projects, the coverage thresholds read from `ddd-ts-kit.config.json` (`governedCoverage`), per context and layer, in the standard decorator mode `decorators()` of `@ddd-ts-kit/testing/vitest`, which compiles the files holding a decorator with the compiler of the project (Vitest does not lower standard decorators; it lowers legacy ones itself, so a project with `experimentalDecorators` gets no plugin), and under `--assembly discovery` `server.deps.inline: ['@ddd-ts-kit/di']` |
196
206
  | `lefthook.yml`, `commitlint.config.mjs` | pre-commit (ESLint, the format check and `check` on the staged files, `check --commit-size --staged`, which never blocks), pre-push (types, unit tests) and commit-msg hooks (`npm run hooks:install`), conventional commits |
197
- | `--ci github` | `.github/workflows/ci.yml`, `codeql.yml`, `pr-title.yml`, `.github/dependabot.yml`, `.github/branch-protection.md`, `renovate.json` |
207
+ | `--ci github` | `.github/workflows/ci.yml`, `pr-title.yml`, `.github/dependabot.yml`, `.github/branch-protection.md`, `renovate.json`; `codeql.yml` with `--ci-extras codeql` |
198
208
  | `--ci gitlab` | `.gitlab-ci.yml` (architecture findings as a Code Quality report through `check --format gitlab`), `.gitlab/merge-request-settings.md`, `renovate.json` |
199
209
  | `README.md`, `CLAUDE.md`, `.claude/rules/*.md` | how to run it; a slim guide (commands, how to read less, the map of the rules, generated files, compiler note, the skills of the plugin: `/ddd-ts-kit:start`, `glossary`, `use-case`, `document`, `quality-gate`) and the invariants in seven rule files, `domain.md`, `application.md`, `published-language.md`, `infrastructure.md`, `presentation.md`, `platform.md` and `tests.md`, each scoped by a `paths` frontmatter |
200
210
  | `.claude/settings.json` | permissions only: the checks and generators run without asking, `.env` files are unreadable (`.env.example` stays readable), the three generated documents are not edited by hand, `git push`, `npm publish` and any edit of the files that hold the rules and the pipeline (`ddd-ts-kit.config.json`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`) ask first |
@@ -422,6 +432,27 @@ Regenerates what is derived from the config and the code, and nothing else:
422
432
  AsyncAPI document need the code of the project to run, so they are produced by
423
433
  `scripts/events.ts` (`npm run events:generate`, part of `npm run docs:generate`).
424
434
 
435
+ ## sdk
436
+
437
+ ```
438
+ ddd-ts-kit sdk [--check] [--dry-run]
439
+ ```
440
+
441
+ Generates the typed client of each document of the OpenAPI contract, read from the committed
442
+ `openapi/*.yaml` (or `.json`): a workspace package under `clients/<document>` (`clients/api` for
443
+ the whole contract), with no runtime dependency. Each operation is a method of `createClient()`
444
+ and a function of its own; its outcome is typed by status, a refusal by the error codes the
445
+ contract lists for it (`x-error-codes`); a credential is given per security scheme. The first
446
+ run records `"sdk"` in the config (`init --sdk` does it for a new project) and wires the
447
+ project: the workspace, the `paths` entry of each client in `tsconfig.json`, the exclusions of
448
+ Biome and knip, the scripts `sdk:generate` and `sdk:build`, and `docs:generate`, `docs:check`,
449
+ `ci:docs`, `ci:build` extended. The package.json of a client keeps its version and the keys a
450
+ team adds. Under npm, while `package-lock.json` does not list a client yet, it says to run
451
+ `npm install` and commit the lock, which `npm ci` would refuse. `--check` writes nothing, names
452
+ each stale file (and a client the lock misses) and exits 1. The comparison with
453
+ openapi-typescript, hey-api and orval, and how to publish a client:
454
+ [docs/tools/client-sdk.md](../../docs/tools/client-sdk.md).
455
+
425
456
  ## depcruise-config
426
457
 
427
458
  ```
@@ -567,7 +598,7 @@ One context as facts read from the config and the source text, in both styles: u
567
598
  their permission (or `public`), routes (method, path, operation id, use case, schema names, error
568
599
  codes), consumed and published events, ports with their adapters, policies, gateways with their
569
600
  upstream, scheduled jobs, upstreams and downstreams. Field lists are not guessed: they are in
570
- `openapi/openapi.json` and `docs/integration/event-catalog.md`. `docs` writes the same facts in
601
+ `openapi/openapi.yaml` and `docs/integration/event-catalog.md`. `docs` writes the same facts in
571
602
  each `CONTEXT.md`.
572
603
 
573
604
  `--json` prints one object:
@@ -1 +1 @@
1
- {"version":3,"file":"build-scripts.d.ts","sourceRoot":"","sources":["../../../src/check/alias/build-scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAQhD,qHAAqH;AACrH,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,EAAE,CAmB9D"}
1
+ {"version":3,"file":"build-scripts.d.ts","sourceRoot":"","sources":["../../../src/check/alias/build-scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAUhD,qHAAqH;AACrH,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,EAAE,CAsB9D"}
@@ -5,12 +5,14 @@ import { manifestScripts } from './manifest-scripts.js';
5
5
  const COMPILES = /(?:^|[\s/])tsc(?:\.[cm]?js)?(?=\s|$)/;
6
6
  const TYPE_CHECK_ONLY = /--noEmit(?:\s|$)/;
7
7
  const REWRITES = /(?:^|[\s/])(?:ddd-ts-kit|kit\.[cm]?js|bin\.js)\s+build-aliases(?:\s|$)/;
8
+ /** The build of the clients `ddd-ts-kit sdk` generates: their sources import one another by relative paths, no alias. */
9
+ const BUILDS_CLIENTS = /\s-[bp]\s+(?:\.\/)?clients(?:\/|\s|$)/;
8
10
  /** A script that compiles and does not rewrite the aliases afterwards: plain `node` could not load what it emits. */
9
11
  export function buildScripts(inspected) {
10
12
  const read = manifestScripts(inspected);
11
13
  return (read?.scripts ?? []).flatMap(([name, command]) => {
12
14
  const steps = command.split('&&').map((step) => step.trim());
13
- const compiled = steps.findLastIndex((step) => COMPILES.test(step) && !TYPE_CHECK_ONLY.test(step));
15
+ const compiled = steps.findLastIndex((step) => COMPILES.test(step) && !TYPE_CHECK_ONLY.test(step) && !BUILDS_CLIENTS.test(step));
14
16
  if (compiled === -1 || steps.slice(compiled + 1).some((step) => REWRITES.test(step))) {
15
17
  return [];
16
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"build-scripts.js","sourceRoot":"","sources":["../../../src/check/alias/build-scripts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,gGAAgG;AAChG,MAAM,QAAQ,GAAG,sCAAsC,CAAC;AACxD,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAC3C,MAAM,QAAQ,GAAG,wEAAwE,CAAC;AAE1F,qHAAqH;AACrH,MAAM,UAAU,YAAY,CAAC,SAAoB;IAC/C,MAAM,IAAI,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;IAExC,OAAO,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE;QACvD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,C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architecture-rules.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAkE7C,gHAAgH;AAChH,eAAO,MAAM,kBAAkB,EAAE,SAAS,IAAI,EAiE7C,CAAC"}
@@ -43,6 +43,7 @@ import { layerPresentationNoInfrastructure } from '../rules/layer-presentation-n
43
43
  import { namingOneConceptPerFile } from '../rules/naming-one-concept-per-file.js';
44
44
  import { namingSearchNotList } from '../rules/naming-search-not-list.js';
45
45
  import { namingSuffix } from '../rules/naming-suffix.js';
46
+ import { persistenceMigrationHistory } from '../rules/persistence-migration-history.js';
46
47
  import { portsAbstractClass } from '../rules/ports-abstract-class.js';
47
48
  import { portsImplementsNeverExtends } from '../rules/ports-implements-never-extends.js';
48
49
  import { portsNoConcreteDependency } from '../rules/ports-no-concrete-dependency.js';
@@ -126,5 +127,6 @@ export const ARCHITECTURE_RULES = [
126
127
  importsAliasDeclared,
127
128
  errorsCodeUnique,
128
129
  errorsKnownCode,
130
+ persistenceMigrationHistory,
129
131
  ];
130
132
  //# sourceMappingURL=architecture-rules.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"architecture-rules.js","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCA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kB;IAClB,2BAA2B;IAC3B,oBAAoB;IACpB,yBAAyB;IACzB,gBAAgB;IAChB,4BAA4B;IAC5B,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,eAAe;CAChB,CAAC"}
1
+ {"version":3,"file":"architecture-rules.js","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,cAAc,EA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IACjD,iBAAiB;IACjB,sBAAsB;IACtB,iCAAiC;IACjC,iCAAiC;IACjC,4BAA4B;IAC5B,2BAA2B;IAC3B,mCAAmC;IACnC,cAAc;IACd,UAAU;IACV,cAAc;IACd,YAAY;IACZ,uBAAuB;IACvB,mBAAmB;IACnB,gBAAgB;IAChB,gBAAgB;IAChB,gCAAgC;IAChC,WAAW;IACX,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,uBAAuB;IACvB,mBAAmB;IACnB,yBAAyB;IACzB,mBAAmB;IACnB,aAAa;IACb,iBAAiB;IACjB,uBAAuB;IACvB,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,qBAAqB;IACrB,aAAa;IACb,oBAAoB;IACpB,wBAAwB;IACxB,4BAA4B;IAC5B,qCAAqC;IACrC,kBAAkB;IAClB,aAAa;IACb,kBAAkB;IAClB,kBAAkB;IAClB,gBAAgB;IAChB,mBAAmB;IACnB,2BAA2B;IAC3B,2BAA2B;IAC3B,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,gCAAgC;IAChC,kBAAkB;IAClB,2BAA2B;IAC3B,oBAAoB;IACpB,yBAAyB;IACzB,gBAAgB;IAChB,4BAA4B;IAC5B,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,eAAe;IACf,2BAA2B;CAC5B,CAAC"}
@@ -17,6 +17,12 @@ export declare class ConfigInspection {
17
17
  functionLinesLimit(): Violation[];
18
18
  /** A commit limit that is not a positive integer is read as its default: the config says something nothing does. */
19
19
  commitLimits(): Violation[];
20
+ /** An extra job the pipeline does not know is written by no `init`: the config says something no pipeline runs. */
21
+ ciExtras(): Violation[];
22
+ /** A format or a document the scripts cannot write as the config says. */
23
+ openApiSettings(): Violation[];
24
+ /** A client the config asks for that npm would not publish as it says. */
25
+ sdkSettings(): Violation[];
20
26
  /** A threshold that is not a percentage is read as the reference: the config says something no run enforces. */
21
27
  coverageThresholds(): Violation[];
22
28
  /** An entry without a file or without a reason allows nothing: it is ignored, and has to be said. */
@@ -1 +1 @@
1
- {"version":3,"file":"config-inspection.d.ts","sourceRoot":"","sources":["../../../src/check/configuration/config-inspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,KAAK,aAAa,EAEnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMvD,qGAAqG;AACrG,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFzB,YACmB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EAC7B;IAEJ,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,SAAS,EAAE,CAMjE;IAED,qBAAqB,IAAI,SAAS,EAAE,CAanC;IAED,YAAY,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAAE,CAoBlD;IAED,SAAS,IAAI,SAAS,EAAE,CAcvB;IAED,6EAA6E;IAC7E,eAAe,IAAI,SAAS,EAAE,CAc7B;IAED,2GAA2G;IAC3G,kBAAkB,IAAI,SAAS,EAAE,CAiBhC;IAED,oHAAoH;IACpH,YAAY,IAAI,SAAS,EAAE,CAI1B;IAED,gHAAgH;IAChH,kBAAkB,IAAI,SAAS,EAAE,CAIhC;IAED,qGAAqG;IACrG,oBAAoB,IAAI,SAAS,EAAE,CA4BlC;IAED,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,QAAQ;IAgChB,OAAO,CAAC,QAAQ;IAiBhB,qFAAqF;IACrF,OAAO,CAAC,QAAQ;CAGjB"}
1
+ {"version":3,"file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C,QAAQ;CAGjB"}
@@ -1,4 +1,4 @@
1
- import { CLASSIFICATIONS, commitLimitProblems, coverageProblems, CONFIG_FILE, FUNCTION_LINES_CEILING, GUARD_MODES, IMPORT_EXTENSIONS, isOneOf, RELATIONSHIPS, SEVERITIES, } from '../../config/index.js';
1
+ import { ciExtraProblems, openApiProblems, sdkProblems, CLASSIFICATIONS, commitLimitProblems, coverageProblems, CONFIG_FILE, FUNCTION_LINES_CEILING, GUARD_MODES, IMPORT_EXTENSIONS, isOneOf, RELATIONSHIPS, SEVERITIES, } from '../../config/index.js';
2
2
  import { isRecord } from '../support/is-record.js';
3
3
  import { lineOf } from '../support/line-of.js';
4
4
  import { lineOfSequence } from '../support/line-of-sequence.js';
@@ -75,6 +75,19 @@ export class ConfigInspection {
75
75
  commitLimits() {
76
76
  return commitLimitProblems(rawConfig(this.project)['commit']).map(({ key, message, fix }) => this.inConfig(key, message, fix));
77
77
  }
78
+ /** An extra job the pipeline does not know is written by no `init`: the config says something no pipeline runs. */
79
+ ciExtras() {
80
+ return ciExtraProblems(rawConfig(this.project)['ci']).map(({ key, message, fix }) => this.inConfig(key, message, fix));
81
+ }
82
+ /** A format or a document the scripts cannot write as the config says. */
83
+ openApiSettings() {
84
+ const contexts = Object.keys(this.project.config.contexts);
85
+ return openApiProblems(rawConfig(this.project)['openapi'], contexts).map(({ key, message, fix }) => this.inConfig(key, message, fix));
86
+ }
87
+ /** A client the config asks for that npm would not publish as it says. */
88
+ sdkSettings() {
89
+ return sdkProblems(rawConfig(this.project)['sdk']).map(({ key, message, fix }) => this.inConfig(key, message, fix));
90
+ }
78
91
  /** A threshold that is not a percentage is read as the reference: the config says something no run enforces. */
79
92
  coverageThresholds() {
80
93
  return coverageProblems(rawConfig(this.project)['coverage']).map(({ where, message, fix }) => this.report({ file: CONFIG_FILE, line: lineOfSequence(this.project.configText, where) }, message, fix));
@@ -1 +1 @@
1
- {"version":3,"file":"config-inspection.js","sourceRoot":"","sources":["../../../src/check/configuration/config-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1D,CAAC,CAAC;IAEF,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QACjB,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC;IACvD,CAAC;IAED,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC9C,CAAC"}
1
+ {"version":3,"file":"config-inspection.js","sourceRoot":"","sources":["../../../src/check/configuration/config-inspection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,eAAe,EACf,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,sBAAsB,EACtB,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,aAAa,EACb,UAAU,GAGX,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,qGAAqG;AACrG,MAAM,OAAO,gBAAgB;IAER,OAAO;IACP,MAAM;IAFzB,YACmB,OAAgB,EAChB,MAAc;uBADd,OAAO;sBACP,MAAM;IACtB,CAAC;IAEJ,eAAe,CAAC,IAAY,EAAE,OAAsB;QAClD,OAAO;YACL,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC;YACrC,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YACzE,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;SAChC,CAAC;IACJ,CAAC;IAED,q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,CAAC;QAE1B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;IAC1D,CAAC,CAAC;IAEF,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QACjB,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC;IACvD,CAAC;IAED,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { RuleDoc } from '../model/rule-doc.js';
2
+ export declare const PERSISTENCE_DOCS: Readonly<Record<string, RuleDoc>>;
3
+ //# sourceMappingURL=persistence-docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persistence-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/persistence-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAY9D,CAAC"}
@@ -0,0 +1,14 @@
1
+ export const PERSISTENCE_DOCS = {
2
+ 'persistence/migration-history': {
3
+ why: 'Migrations are applied in the order of their names, and several people add them at the same time. Numbered by an index, two branches each write `0002_...` and the order between them is a guess; named by a random word, nobody knows what a migration does. A timestamp and a description, `20261012093000_add-invoices`, keep every branch apart. drizzle-kit adds a journal and a chain of snapshots on top: its migrator applies only the entries newer than the last one a database applied, so an entry merged out of order is skipped without a word, and a snapshot generated from the same parent as another makes the next migration miss a change. After a merge, the migration of the branch is generated again on top of the main branch.',
4
+ bad: `migrations/
5
+ 0002_brave_falcon.sql # an index, a random name
6
+ 0002_quiet_owl.sql # the same index, from another branch
7
+ meta/_journal.json # entries 0002 and 0002, two snapshots with one parent`,
8
+ good: `migrations/
9
+ 20261010120000_add-invoices.sql
10
+ 20261012093000_add-payments.sql # generated again after main took add-invoices
11
+ meta/_journal.json # one entry each, in order, each snapshot from the one before`,
12
+ },
13
+ };
14
+ //# sourceMappingURL=persistence-docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persistence-docs.js","sourceRoot":"","sources":["../../../src/check/explain/persistence-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAsC;IACjE,+BAA+B,EAAE;QAC/B,GAAG,EAAE,ytBAAytB;QAC9tB,GAAG,EAAE;;;wFAG+E;QACpF,IAAI,EAAE;;;kGAGwF;KAC/F;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"rule-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/rule-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAgBpD,oGAAoG;AACpG,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAevD,CAAC"}
1
+ {"version":3,"file":"rule-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/rule-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAiBpD,oGAAoG;AACpG,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgBvD,CAAC"}
@@ -7,6 +7,7 @@ import { IMPORTS_DOCS } from './imports-docs.js';
7
7
  import { LANGUAGE_DOCS } from './language-docs.js';
8
8
  import { LAYER_DOCS } from './layer-docs.js';
9
9
  import { LAYOUT_DOCS } from './layout-docs.js';
10
+ import { PERSISTENCE_DOCS } from './persistence-docs.js';
10
11
  import { PORTS_DOCS } from './ports-docs.js';
11
12
  import { SCHEDULING_DOCS } from './scheduling-docs.js';
12
13
  import { STANDARD_DOCS } from './standard-docs.js';
@@ -23,6 +24,7 @@ export const RULE_DOCS = {
23
24
  ...LANGUAGE_DOCS,
24
25
  ...LAYER_DOCS,
25
26
  ...LAYOUT_DOCS,
27
+ ...PERSISTENCE_DOCS,
26
28
  ...PORTS_DOCS,
27
29
  ...SCHEDULING_DOCS,
28
30
  ...STANDARD_DOCS,
@@ -1 +1 @@
1
- {"version":3,"file":"rule-docs.js","sourceRoot":"","sources":["../../../src/check/explain/rule-docs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,oGAAoG;AACpG,MAAM,CAAC,MAAM,SAAS,GAAsC;IAC1D,GAAG,UAAU;IACb,GAAG,UAAU;IACb,GAAG,YAAY;IACf,GAAG,WAAW;IACd,GAAG,WAAW;IACd,GAAG,YAAY;IACf,GAAG,aAAa;IAChB,GAAG,UAAU;IACb,GAAG,WAAW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AChB,GAAG,SAAS;IACZ,GAAG,WAAW;CACf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EA+BtC,CAAC"}
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EAgCtC,CAAC"}
@@ -21,6 +21,7 @@ import { LAYER_FIXTURES } from './layer-fixtures.js';
21
21
  import { LAYOUT_FIXTURES } from './layout-fixtures.js';
22
22
  import { NAMING_FIXTURES } from './naming-fixtures.js';
23
23
  import { OUTBOX_FIXTURES } from './outbox-fixtures.js';
24
+ import { PERSISTENCE_FIXTURES } from './persistence-fixtures.js';
24
25
  import { PORTS_FIXTURES } from './ports-fixtures.js';
25
26
  import { PURITY_FIXTURES } from './purity-fixtures.js';
26
27
  import { SCHEDULING_FIXTURES } from './scheduling-fixtures.js';
@@ -57,6 +58,7 @@ export const FIXTURES = [
57
58
  ...LAYOUT_FIXTURES,
58
59
  ...NAMING_FIXTURES,
59
60
  ...OUTBOX_FIXTURES,
61
+ ...PERSISTENCE_FIXTURES,
60
62
  ...PORTS_FIXTURES,
61
63
  ...PURITY_FIXTURES,
62
64
  ...SCHEDULING_FIXTURES,
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B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AAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAuB;IAC1C,GAAG,uBAAuB;IAC1B,GAAG,uBAAuB;IAC1B,GAAG,cAAc;IACjB,GAAG,cAAc;IACjB,GAAG,oBAAoB;IACvB,GAAG,eAAe;IAClB,GAAG,8BAA8B;IACjC,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,qBAAqB;IACxB,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,oBAAoB;IACvB,GAAG,mBAAmB;IACtB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,eAAe;IAClB,GAAG,eAAe;IAClB,GAAG,oBAAoB;IACvB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,mBAAmB;IACtB,GAAG,iBAAiB;IACpB,GAAG,aAAa;IAChB,GAAG,gBAAgB;IACnB,GAAG,aAAa;CACjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Fixture } from './fixture.js';
2
+ export declare const PERSISTENCE_FIXTURES: readonly Fixture[];
3
+ //# sourceMappingURL=persistence-fixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persistence-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/persistence-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAS5C,eAAO,MAAM,oBAAoB,EAAE,SAAS,OAAO,EAqClD,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { CONFIG_FILE } from '../../config/index.js';
2
+ import { config } from './config.js';
3
+ import { project } from './project.js';
4
+ const JOURNAL = 'migrations/meta/_journal.json';
5
+ const INITIAL = '20261010120000_initial';
6
+ const INVOICES = '20261011120000_add-invoices';
7
+ const PAYMENTS = '20261012120000_add-payments';
8
+ const ORIGIN = '00000000-0000-0000-0000-000000000000';
9
+ export const PERSISTENCE_FIXTURES = [
10
+ {
11
+ ruleId: 'persistence/migration-history',
12
+ name: 'drizzle migrations in the order generated, each snapshot from the one before',
13
+ expect: 'pass',
14
+ files: drizzle('b'),
15
+ },
16
+ {
17
+ ruleId: 'persistence/migration-history',
18
+ name: 'two drizzle migrations generated from the same snapshot on two branches',
19
+ expect: { file: JOURNAL },
20
+ files: drizzle('a'),
21
+ },
22
+ {
23
+ ruleId: 'persistence/migration-history',
24
+ name: 'a drizzle journal whose last entry was generated before the one it follows',
25
+ expect: { file: JOURNAL },
26
+ files: drizzle('b', [INITIAL, PAYMENTS, INVOICES]),
27
+ },
28
+ {
29
+ ruleId: 'persistence/migration-history',
30
+ name: 'knex migrations named by a timestamp, the index of the initial one kept',
31
+ expect: 'pass',
32
+ files: knex(['0001_initial', '20261012093000_add-invoices']),
33
+ },
34
+ {
35
+ ruleId: 'persistence/migration-history',
36
+ name: 'a knex migration written by hand without a number',
37
+ expect: { file: 'migrations/add-invoices.js' },
38
+ files: knex(['20261012093000_initial', 'add-invoices']),
39
+ },
40
+ {
41
+ ruleId: 'persistence/migration-history',
42
+ name: 'two knex migrations numbered by the same index on two branches',
43
+ expect: { file: 'migrations/0002_add-payments.js' },
44
+ files: knex(['0001_initial', '0002_add-invoices', '0002_add-payments']),
45
+ },
46
+ ];
47
+ /** A drizzle-kit project with three migrations; `payments` names the snapshot the third one was generated from. */
48
+ function drizzle(payments, order = [INITIAL, INVOICES, PAYMENTS]) {
49
+ return project({
50
+ [`migrations/${INITIAL}.sql`]: 'CREATE TABLE "accounts" ("id" text PRIMARY KEY);\n',
51
+ [`migrations/${INVOICES}.sql`]: 'CREATE TABLE "invoices" ("id" text PRIMARY KEY);\n',
52
+ [`migrations/${PAYMENTS}.sql`]: 'CREATE TABLE "payments" ("id" text PRIMARY KEY);\n',
53
+ 'migrations/meta/20261010120000_snapshot.json': snapshot('a', ORIGIN),
54
+ 'migrations/meta/20261011120000_snapshot.json': snapshot('b', 'a'),
55
+ 'migrations/meta/20261012120000_snapshot.json': snapshot('c', payments),
56
+ [JOURNAL]: journal(order.map((tag) => [tag, Number(tag.slice(0, 14))])),
57
+ }, { [CONFIG_FILE]: config({ stack: { orm: 'drizzle' } }) });
58
+ }
59
+ function snapshot(id, prevId) {
60
+ return JSON.stringify({ id, prevId, version: '7', dialect: 'postgresql', tables: {} }, null, 2);
61
+ }
62
+ function journal(tags) {
63
+ const entries = tags.map(([tag, when], idx) => ({ idx, version: '7', when, tag, breakpoints: true }));
64
+ return JSON.stringify({ version: '7', dialect: 'postgresql', entries }, null, 2);
65
+ }
66
+ function knex(names) {
67
+ const migration = 'export const up = async () => {};\n\nexport const down = async () => {};\n';
68
+ return project(Object.fromEntries(names.map((name) => [`migrations/${name}.js`, migration])), {
69
+ [CONFIG_FILE]: config({ stack: { orm: 'knex' } }),
70
+ });
71
+ }
72
+ //# sourceMappingURL=persistence-fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persistence-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/persistence-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,OAAO,GAAG,+BAA+B,CAAC;AAChD,MAAM,OAAO,GAAG,wBAAwB,CAAC;AACzC,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAC/C,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAC/C,MAAM,MAAM,GAAG,sCAAsC,CAAC;AAEtD,MAAM,CAAC,MAAM,oBAAoB,GAAuB;IACtD;Q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AC;AAED,SAAS,IAAI,CAAC,KAAwB;IACpC,MAAM,SAAS,GAAG,4EAA4E,CAAC;IAE/F,OAAO,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,cAAc,IAAI,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE;QAC5F,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC;KAClD,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Finding } from '../model/finding.js';
2
+ import type { DrizzleMigrations } from './drizzle-migrations.js';
3
+ /**
4
+ * What makes drizzle-kit and its migrator misbehave after a merge: an entry without its file or
5
+ * the reverse, entries out of the order they were generated in (the migrator skips a migration
6
+ * older than the last one a database applied), and two snapshots generated from the same one.
7
+ */
8
+ export declare function drizzleHistoryFindings(migrations: DrizzleMigrations): Finding[];
9
+ //# sourceMappingURL=drizzle-history-findings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drizzle-history-findings.d.ts","sourceRoot":"","sources":["../../../src/check/migrations/drizzle-history-findings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,yBAAyB,CAAC;AAK/E;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,EAAE,CAE/E"}
@@ -0,0 +1,70 @@
1
+ import { lineOf } from '../support/line-of.js';
2
+ const REGENERATE = 'Keep the migrations of the main branch, delete the one of your branch (its .sql file, its snapshot under meta/ and its entry of meta/_journal.json), then run `npm run db:generate <name>` again on top of them.';
3
+ /**
4
+ * What makes drizzle-kit and its migrator misbehave after a merge: an entry without its file or
5
+ * the reverse, entries out of the order they were generated in (the migrator skips a migration
6
+ * older than the last one a database applied), and two snapshots generated from the same one.
7
+ */
8
+ export function drizzleHistoryFindings(migrations) {
9
+ return [...unmatched(migrations), ...outOfOrder(migrations), ...forked(migrations)];
10
+ }
11
+ function unmatched({ entries, files, folder, journalText }) {
12
+ const tags = entries.map((entry) => entry.tag);
13
+ const missingFiles = entries
14
+ .filter((entry) => !files.includes(entry.tag))
15
+ .map((entry) => ({
16
+ line: lineOf(journalText, `"${entry.tag}"`),
17
+ message: `The journal lists the migration "${entry.tag}" but ${folder}/${entry.tag}.sql does not exist.`,
18
+ fix: `Restore ${folder}/${entry.tag}.sql, or remove its entry from the journal if the migration was never applied anywhere.`,
19
+ }));
20
+ const missingEntries = files
21
+ .filter((file) => !tags.includes(file))
22
+ .map((file) => ({
23
+ line: 1,
24
+ message: `${folder}/${file}.sql is not in the journal: drizzle-kit migrate never applies it.`,
25
+ fix: `Generate a migration with \`npm run db:generate <name>\`, never by hand. After a merge: ${REGENERATE}`,
26
+ }));
27
+ return [...missingFiles, ...missingEntries];
28
+ }
29
+ function outOfOrder({ entries, journalText }) {
30
+ return entries.flatMap((entry, index) => {
31
+ const previous = entries[index - 1];
32
+ if (entry.idx === index && (previous === undefined || previous.when < entry.when)) {
33
+ return [];
34
+ }
35
+ return [
36
+ {
37
+ line: lineOf(journalText, `"${entry.tag}"`),
38
+ message: `The journal entry "${entry.tag}" is out of order (${disorder(entry, index, previous)}): a database that applied a later migration skips it without a word.`,
39
+ fix: `Two branches each added a migration. ${REGENERATE}`,
40
+ },
41
+ ];
42
+ });
43
+ }
44
+ function disorder(entry, index, previous) {
45
+ return entry.idx !== index || previous === undefined
46
+ ? `idx ${entry.idx} at position ${index}`
47
+ : `generated before "${previous.tag}", which it follows`;
48
+ }
49
+ function forked({ entries, snapshots, journalText }) {
50
+ return entries.flatMap((entry, index) => {
51
+ const previous = entries[index - 1];
52
+ const link = snapshots.get(prefixOf(entry));
53
+ const parent = previous === undefined ? undefined : snapshots.get(prefixOf(previous));
54
+ if (previous === undefined || link === undefined || parent === undefined || link.prevId === parent.id) {
55
+ return [];
56
+ }
57
+ return [
58
+ {
59
+ line: lineOf(journalText, `"${entry.tag}"`),
60
+ message: `The snapshot of "${entry.tag}" was not generated from the one of "${previous.tag}": two branches generated a migration from the same schema, and the next \`db:generate\` would miss one of them.`,
61
+ fix: REGENERATE,
62
+ },
63
+ ];
64
+ });
65
+ }
66
+ function prefixOf(entry) {
67
+ const at = entry.tag.indexOf('_');
68
+ return at === -1 ? entry.tag : entry.tag.slice(0, at);
69
+ }
70
+ //# sourceMappingURL=drizzle-history-findings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drizzle-history-findings.js","sourceRoot":"","sources":["../../../src/check/migrations/drizzle-history-findings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAG/C,MAAM,UAAU,GACd,kNAAkN,CAAC;AAErN;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAA6B;IAClE,OAAO,CAAC,GAAG,SAAS,CAAC,UAAU,CAAC,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;AACtF,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAqB;IAC3E,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE/C,MAAM,YAAY,GAAG,OAAO;SACzB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SAC7C,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACf,IAAI,EAAE,MAAM,CAAC,WAAW,EAAE,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC;QA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