ddd-ts-kit 0.6.0 → 0.8.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 (315) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +33 -9
  3. package/dist/check/canonical/roles.d.ts.map +1 -1
  4. package/dist/check/canonical/roles.js +1 -0
  5. package/dist/check/canonical/roles.js.map +1 -1
  6. package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
  7. package/dist/check/catalogue/architecture-rules.js +4 -0
  8. package/dist/check/catalogue/architecture-rules.js.map +1 -1
  9. package/dist/check/catalogue/eslint-only-rules.d.ts.map +1 -1
  10. package/dist/check/catalogue/eslint-only-rules.js +4 -0
  11. package/dist/check/catalogue/eslint-only-rules.js.map +1 -1
  12. package/dist/check/declarations/option-of.d.ts +2 -0
  13. package/dist/check/declarations/option-of.d.ts.map +1 -1
  14. package/dist/check/declarations/option-of.js +7 -1
  15. package/dist/check/declarations/option-of.js.map +1 -1
  16. package/dist/check/events/domain-event-names.d.ts +4 -1
  17. package/dist/check/events/domain-event-names.d.ts.map +1 -1
  18. package/dist/check/events/domain-event-names.js +6 -3
  19. package/dist/check/events/domain-event-names.js.map +1 -1
  20. package/dist/check/explain/language-docs.d.ts.map +1 -1
  21. package/dist/check/explain/language-docs.js +10 -0
  22. package/dist/check/explain/language-docs.js.map +1 -1
  23. package/dist/check/explain/rule-docs.d.ts.map +1 -1
  24. package/dist/check/explain/rule-docs.js +2 -0
  25. package/dist/check/explain/rule-docs.js.map +1 -1
  26. package/dist/check/explain/tenancy-docs.d.ts +3 -0
  27. package/dist/check/explain/tenancy-docs.d.ts.map +1 -0
  28. package/dist/check/explain/tenancy-docs.js +15 -0
  29. package/dist/check/explain/tenancy-docs.js.map +1 -0
  30. package/dist/check/fixtures/declarations-fixtures.d.ts.map +1 -1
  31. package/dist/check/fixtures/declarations-fixtures.js +31 -0
  32. package/dist/check/fixtures/declarations-fixtures.js.map +1 -1
  33. package/dist/check/fixtures/events-fixtures.d.ts.map +1 -1
  34. package/dist/check/fixtures/events-fixtures.js +8 -0
  35. package/dist/check/fixtures/events-fixtures.js.map +1 -1
  36. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  37. package/dist/check/fixtures/fixtures.js +4 -0
  38. package/dist/check/fixtures/fixtures.js.map +1 -1
  39. package/dist/check/fixtures/tenancy-fixtures.d.ts +3 -0
  40. package/dist/check/fixtures/tenancy-fixtures.d.ts.map +1 -0
  41. package/dist/check/fixtures/tenancy-fixtures.js +136 -0
  42. package/dist/check/fixtures/tenancy-fixtures.js.map +1 -0
  43. package/dist/check/fixtures/vocabulary-fixtures.d.ts +3 -0
  44. package/dist/check/fixtures/vocabulary-fixtures.d.ts.map +1 -0
  45. package/dist/check/fixtures/vocabulary-fixtures.js +121 -0
  46. package/dist/check/fixtures/vocabulary-fixtures.js.map +1 -0
  47. package/dist/check/language/declared-value.d.ts +14 -0
  48. package/dist/check/language/declared-value.d.ts.map +1 -0
  49. package/dist/check/language/declared-value.js +2 -0
  50. package/dist/check/language/declared-value.js.map +1 -0
  51. package/dist/check/language/declared-vocabularies.d.ts +11 -0
  52. package/dist/check/language/declared-vocabularies.d.ts.map +1 -0
  53. package/dist/check/language/declared-vocabularies.js +99 -0
  54. package/dist/check/language/declared-vocabularies.js.map +1 -0
  55. package/dist/check/rules/declarations-role-declared.d.ts.map +1 -1
  56. package/dist/check/rules/declarations-role-declared.js +16 -3
  57. package/dist/check/rules/declarations-role-declared.js.map +1 -1
  58. package/dist/check/rules/language-declared-vocabulary.d.ts +3 -0
  59. package/dist/check/rules/language-declared-vocabulary.d.ts.map +1 -0
  60. package/dist/check/rules/language-declared-vocabulary.js +58 -0
  61. package/dist/check/rules/language-declared-vocabulary.js.map +1 -0
  62. package/dist/check/rules/tenancy-scoped-statement.d.ts +3 -0
  63. package/dist/check/rules/tenancy-scoped-statement.d.ts.map +1 -0
  64. package/dist/check/rules/tenancy-scoped-statement.js +37 -0
  65. package/dist/check/rules/tenancy-scoped-statement.js.map +1 -0
  66. package/dist/check/tenancy/balanced-arguments.d.ts +3 -0
  67. package/dist/check/tenancy/balanced-arguments.d.ts.map +1 -0
  68. package/dist/check/tenancy/balanced-arguments.js +13 -0
  69. package/dist/check/tenancy/balanced-arguments.js.map +1 -0
  70. package/dist/check/tenancy/declared-with.d.ts +11 -0
  71. package/dist/check/tenancy/declared-with.d.ts.map +1 -0
  72. package/dist/check/tenancy/declared-with.js +13 -0
  73. package/dist/check/tenancy/declared-with.js.map +1 -0
  74. package/dist/check/tenancy/drizzle-unscoped.d.ts +7 -0
  75. package/dist/check/tenancy/drizzle-unscoped.d.ts.map +1 -0
  76. package/dist/check/tenancy/drizzle-unscoped.js +35 -0
  77. package/dist/check/tenancy/drizzle-unscoped.js.map +1 -0
  78. package/dist/check/tenancy/executor-uses.d.ts +11 -0
  79. package/dist/check/tenancy/executor-uses.d.ts.map +1 -0
  80. package/dist/check/tenancy/executor-uses.js +14 -0
  81. package/dist/check/tenancy/executor-uses.js.map +1 -0
  82. package/dist/check/tenancy/knex-unscoped.d.ts +7 -0
  83. package/dist/check/tenancy/knex-unscoped.d.ts.map +1 -0
  84. package/dist/check/tenancy/knex-unscoped.js +19 -0
  85. package/dist/check/tenancy/knex-unscoped.js.map +1 -0
  86. package/dist/check/tenancy/unscoped-read-models.d.ts +4 -0
  87. package/dist/check/tenancy/unscoped-read-models.d.ts.map +1 -0
  88. package/dist/check/tenancy/unscoped-read-models.js +15 -0
  89. package/dist/check/tenancy/unscoped-read-models.js.map +1 -0
  90. package/dist/commands/generate.js +2 -0
  91. package/dist/commands/generate.js.map +1 -1
  92. package/dist/commands/init.d.ts.map +1 -1
  93. package/dist/commands/init.js +5 -0
  94. package/dist/commands/init.js.map +1 -1
  95. package/dist/commands/value-objects.d.ts +4 -0
  96. package/dist/commands/value-objects.d.ts.map +1 -0
  97. package/dist/commands/value-objects.js +44 -0
  98. package/dist/commands/value-objects.js.map +1 -0
  99. package/dist/config/index.d.ts +1 -1
  100. package/dist/config/index.d.ts.map +1 -1
  101. package/dist/config/index.js +1 -1
  102. package/dist/config/index.js.map +1 -1
  103. package/dist/config/parse-stack.d.ts.map +1 -1
  104. package/dist/config/parse-stack.js +4 -1
  105. package/dist/config/parse-stack.js.map +1 -1
  106. package/dist/config/stack.d.ts +26 -0
  107. package/dist/config/stack.d.ts.map +1 -1
  108. package/dist/config/stack.js +9 -0
  109. package/dist/config/stack.js.map +1 -1
  110. package/dist/config/written-stack.d.ts.map +1 -1
  111. package/dist/config/written-stack.js +6 -2
  112. package/dist/config/written-stack.js.map +1 -1
  113. package/dist/generate/kind.d.ts +2 -0
  114. package/dist/generate/kind.d.ts.map +1 -1
  115. package/dist/generate/kinds/event-name-reference.d.ts +9 -0
  116. package/dist/generate/kinds/event-name-reference.d.ts.map +1 -0
  117. package/dist/generate/kinds/event-name-reference.js +11 -0
  118. package/dist/generate/kinds/event-name-reference.js.map +1 -0
  119. package/dist/generate/kinds/event-vars.d.ts.map +1 -1
  120. package/dist/generate/kinds/event-vars.js +3 -1
  121. package/dist/generate/kinds/event-vars.js.map +1 -1
  122. package/dist/generate/kinds/generate-repository.js +5 -4
  123. package/dist/generate/kinds/generate-repository.js.map +1 -1
  124. package/dist/generate/kinds/integration-event-kind.d.ts.map +1 -1
  125. package/dist/generate/kinds/integration-event-kind.js +3 -1
  126. package/dist/generate/kinds/integration-event-kind.js.map +1 -1
  127. package/dist/generate/kinds/integration-handler-kind.js +13 -1
  128. package/dist/generate/kinds/integration-handler-kind.js.map +1 -1
  129. package/dist/generate/kinds/job/grant-system-actor.d.ts.map +1 -1
  130. package/dist/generate/kinds/job/grant-system-actor.js +21 -6
  131. package/dist/generate/kinds/job/grant-system-actor.js.map +1 -1
  132. package/dist/generate/kinds/job/permission-of.d.ts +9 -0
  133. package/dist/generate/kinds/job/permission-of.d.ts.map +1 -0
  134. package/dist/generate/kinds/job/permission-of.js +12 -0
  135. package/dist/generate/kinds/job/permission-of.js.map +1 -0
  136. package/dist/generate/kinds/route/group-vars.d.ts +5 -1
  137. package/dist/generate/kinds/route/group-vars.d.ts.map +1 -1
  138. package/dist/generate/kinds/route/group-vars.js +9 -5
  139. package/dist/generate/kinds/route/group-vars.js.map +1 -1
  140. package/dist/generate/kinds/route-group-kind.d.ts.map +1 -1
  141. package/dist/generate/kinds/route-group-kind.js +3 -2
  142. package/dist/generate/kinds/route-group-kind.js.map +1 -1
  143. package/dist/generate/kinds/vocabulary-kind.d.ts +3 -0
  144. package/dist/generate/kinds/vocabulary-kind.d.ts.map +1 -0
  145. package/dist/generate/kinds/vocabulary-kind.js +30 -0
  146. package/dist/generate/kinds/vocabulary-kind.js.map +1 -0
  147. package/dist/generate/kinds.d.ts.map +1 -1
  148. package/dist/generate/kinds.js +2 -0
  149. package/dist/generate/kinds.js.map +1 -1
  150. package/dist/generate/shared-writes.d.ts.map +1 -1
  151. package/dist/generate/shared-writes.js +5 -0
  152. package/dist/generate/shared-writes.js.map +1 -1
  153. package/dist/generate/vocabulary/declare-role.d.ts +13 -0
  154. package/dist/generate/vocabulary/declare-role.d.ts.map +1 -0
  155. package/dist/generate/vocabulary/declare-role.js +22 -0
  156. package/dist/generate/vocabulary/declare-role.js.map +1 -0
  157. package/dist/generate/vocabulary/entries-of.d.ts +4 -0
  158. package/dist/generate/vocabulary/entries-of.d.ts.map +1 -0
  159. package/dist/generate/vocabulary/entries-of.js +19 -0
  160. package/dist/generate/vocabulary/entries-of.js.map +1 -0
  161. package/dist/generate/vocabulary/vocabulary-entry.d.ts +6 -0
  162. package/dist/generate/vocabulary/vocabulary-entry.d.ts.map +1 -0
  163. package/dist/generate/vocabulary/vocabulary-entry.js +2 -0
  164. package/dist/generate/vocabulary/vocabulary-entry.js.map +1 -0
  165. package/dist/generate/vocabulary/vocabulary-text.d.ts +9 -0
  166. package/dist/generate/vocabulary/vocabulary-text.d.ts.map +1 -0
  167. package/dist/generate/vocabulary/vocabulary-text.js +28 -0
  168. package/dist/generate/vocabulary/vocabulary-text.js.map +1 -0
  169. package/dist/generate/with-import.d.ts +3 -0
  170. package/dist/generate/with-import.d.ts.map +1 -0
  171. package/dist/generate/with-import.js +12 -0
  172. package/dist/generate/with-import.js.map +1 -0
  173. package/dist/help/notes.d.ts +1 -1
  174. package/dist/help/notes.d.ts.map +1 -1
  175. package/dist/help/notes.js +3 -0
  176. package/dist/help/notes.js.map +1 -1
  177. package/dist/help/usage.d.ts +1 -1
  178. package/dist/help/usage.d.ts.map +1 -1
  179. package/dist/help/usage.js +2 -1
  180. package/dist/help/usage.js.map +1 -1
  181. package/dist/init/files/auth-files.js +2 -2
  182. package/dist/init/files/auth-files.js.map +1 -1
  183. package/dist/init/manifest/versions.js +23 -23
  184. package/dist/init/stack/resolve-stack.d.ts.map +1 -1
  185. package/dist/init/stack/resolve-stack.js +7 -1
  186. package/dist/init/stack/resolve-stack.js.map +1 -1
  187. package/dist/init/stack/resolve-tenancy.d.ts +8 -0
  188. package/dist/init/stack/resolve-tenancy.d.ts.map +1 -0
  189. package/dist/init/stack/resolve-tenancy.js +31 -0
  190. package/dist/init/stack/resolve-tenancy.js.map +1 -0
  191. package/dist/init/stack/stack-options.d.ts +3 -0
  192. package/dist/init/stack/stack-options.d.ts.map +1 -1
  193. package/dist/run.d.ts.map +1 -1
  194. package/dist/run.js +2 -0
  195. package/dist/run.js.map +1 -1
  196. package/dist/stack/stack-vars.d.ts.map +1 -1
  197. package/dist/stack/stack-vars.js +4 -1
  198. package/dist/stack/stack-vars.js.map +1 -1
  199. package/dist/value-objects/apply-edits.d.ts +4 -0
  200. package/dist/value-objects/apply-edits.d.ts.map +1 -0
  201. package/dist/value-objects/apply-edits.js +7 -0
  202. package/dist/value-objects/apply-edits.js.map +1 -0
  203. package/dist/value-objects/closing-angle.d.ts +6 -0
  204. package/dist/value-objects/closing-angle.d.ts.map +1 -0
  205. package/dist/value-objects/closing-angle.js +18 -0
  206. package/dist/value-objects/closing-angle.js.map +1 -0
  207. package/dist/value-objects/edit.d.ts +7 -0
  208. package/dist/value-objects/edit.d.ts.map +1 -0
  209. package/dist/value-objects/edit.js +2 -0
  210. package/dist/value-objects/edit.js.map +1 -0
  211. package/dist/value-objects/first-type-argument.d.ts +3 -0
  212. package/dist/value-objects/first-type-argument.d.ts.map +1 -0
  213. package/dist/value-objects/first-type-argument.js +21 -0
  214. package/dist/value-objects/first-type-argument.js.map +1 -0
  215. package/dist/value-objects/inline-results.d.ts +7 -0
  216. package/dist/value-objects/inline-results.d.ts.map +1 -0
  217. package/dist/value-objects/inline-results.js +56 -0
  218. package/dist/value-objects/inline-results.js.map +1 -0
  219. package/dist/value-objects/is-asserted-use.d.ts +14 -0
  220. package/dist/value-objects/is-asserted-use.d.ts.map +1 -0
  221. package/dist/value-objects/is-asserted-use.js +28 -0
  222. package/dist/value-objects/is-asserted-use.js.map +1 -0
  223. package/dist/value-objects/is-converted-call.d.ts +12 -0
  224. package/dist/value-objects/is-converted-call.d.ts.map +1 -0
  225. package/dist/value-objects/is-converted-call.js +46 -0
  226. package/dist/value-objects/is-converted-call.js.map +1 -0
  227. package/dist/value-objects/leftovers.d.ts +6 -0
  228. package/dist/value-objects/leftovers.d.ts.map +1 -0
  229. package/dist/value-objects/leftovers.js +16 -0
  230. package/dist/value-objects/leftovers.js.map +1 -0
  231. package/dist/value-objects/refusal-assertions.d.ts +8 -0
  232. package/dist/value-objects/refusal-assertions.d.ts.map +1 -0
  233. package/dist/value-objects/refusal-assertions.js +65 -0
  234. package/dist/value-objects/refusal-assertions.js.map +1 -0
  235. package/dist/value-objects/refusal-code.d.ts +7 -0
  236. package/dist/value-objects/refusal-code.d.ts.map +1 -0
  237. package/dist/value-objects/refusal-code.js +10 -0
  238. package/dist/value-objects/refusal-code.js.map +1 -0
  239. package/dist/value-objects/result-method-declarations.d.ts +19 -0
  240. package/dist/value-objects/result-method-declarations.d.ts.map +1 -0
  241. package/dist/value-objects/result-method-declarations.js +28 -0
  242. package/dist/value-objects/result-method-declarations.js.map +1 -0
  243. package/dist/value-objects/result-methods.d.ts +8 -0
  244. package/dist/value-objects/result-methods.d.ts.map +1 -0
  245. package/dist/value-objects/result-methods.js +2 -0
  246. package/dist/value-objects/result-methods.js.map +1 -0
  247. package/dist/value-objects/rewrite-usages.d.ts +10 -0
  248. package/dist/value-objects/rewrite-usages.d.ts.map +1 -0
  249. package/dist/value-objects/rewrite-usages.js +20 -0
  250. package/dist/value-objects/rewrite-usages.js.map +1 -0
  251. package/dist/value-objects/rewrite.d.ts +6 -0
  252. package/dist/value-objects/rewrite.d.ts.map +1 -0
  253. package/dist/value-objects/rewrite.js +2 -0
  254. package/dist/value-objects/rewrite.js.map +1 -0
  255. package/dist/value-objects/statement-end.d.ts +3 -0
  256. package/dist/value-objects/statement-end.d.ts.map +1 -0
  257. package/dist/value-objects/statement-end.js +19 -0
  258. package/dist/value-objects/statement-end.js.map +1 -0
  259. package/dist/value-objects/ternary-returns.d.ts +7 -0
  260. package/dist/value-objects/ternary-returns.d.ts.map +1 -0
  261. package/dist/value-objects/ternary-returns.js +59 -0
  262. package/dist/value-objects/ternary-returns.js.map +1 -0
  263. package/dist/value-objects/throwing-source.d.ts +17 -0
  264. package/dist/value-objects/throwing-source.d.ts.map +1 -0
  265. package/dist/value-objects/throwing-source.js +55 -0
  266. package/dist/value-objects/throwing-source.js.map +1 -0
  267. package/dist/value-objects/throwing-value-objects.d.ts +23 -0
  268. package/dist/value-objects/throwing-value-objects.d.ts.map +1 -0
  269. package/dist/value-objects/throwing-value-objects.js +68 -0
  270. package/dist/value-objects/throwing-value-objects.js.map +1 -0
  271. package/dist/value-objects/tidy-imports.d.ts +6 -0
  272. package/dist/value-objects/tidy-imports.d.ts.map +1 -0
  273. package/dist/value-objects/tidy-imports.js +54 -0
  274. package/dist/value-objects/tidy-imports.js.map +1 -0
  275. package/dist/value-objects/without-unwrap.d.ts +5 -0
  276. package/dist/value-objects/without-unwrap.d.ts.map +1 -0
  277. package/dist/value-objects/without-unwrap.js +32 -0
  278. package/dist/value-objects/without-unwrap.js.map +1 -0
  279. package/dist/version.d.ts +1 -1
  280. package/dist/version.js +1 -1
  281. package/package.json +2 -2
  282. package/templates/domain-event/domain-event.ts.tpl +3 -1
  283. package/templates/event-handler/event-handler.declared.ts.tpl +1 -1
  284. package/templates/event-handler/event-handler.spec.ts.tpl +1 -1
  285. package/templates/event-handler/wiring.manual.tpl +2 -2
  286. package/templates/event-handler/wiring.tsyringe.tpl +2 -2
  287. package/templates/init/platform/audit/audit.module.manual.ts.tpl +5 -0
  288. package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +5 -0
  289. package/templates/init/platform/audit/create-audit.ts.tpl +24 -0
  290. package/templates/init/platform/audit/search-audit-entries.handler.ts.tpl +13 -0
  291. package/templates/init/platform/audit/search-audit-entries.query.ts.tpl +5 -0
  292. package/templates/init/platform/auth/attribute-policies.ts.tpl +2 -1
  293. package/templates/init/platform/auth/create-authorizer.rbac.ts.tpl +2 -1
  294. package/templates/init/platform/auth/http-boundary.ts.tpl +38 -1
  295. package/templates/init/platform/auth/role.ts.tpl +14 -0
  296. package/templates/init/platform/auth/roles.ts.tpl +4 -3
  297. package/templates/init/platform/compose-application.manual.ts.tpl +3 -0
  298. package/templates/init/platform/compose-application.tsyringe.ts.tpl +14 -0
  299. package/templates/init/platform/database/persistence-over.knex.ts.tpl +5 -0
  300. package/templates/init/platform/database/schema.drizzle.ts.tpl +8 -0
  301. package/templates/init/platform/database/schema.knex.ts.tpl +6 -0
  302. package/templates/init/rules/application.md.tpl +3 -0
  303. package/templates/init/rules/domain.md.tpl +14 -4
  304. package/templates/init/rules/infrastructure.md.tpl +3 -0
  305. package/templates/init/scripts/events.ts.tpl +17 -4
  306. package/templates/integration-event/publisher.declared.ts.tpl +1 -1
  307. package/templates/integration-event/wiring.manual.tpl +1 -1
  308. package/templates/integration-event/wiring.tsyringe.tpl +1 -1
  309. package/templates/integration-handler/integration-handler.declared.ts.tpl +1 -1
  310. package/templates/integration-handler/integration-handler.ts.tpl +8 -1
  311. package/templates/pipeline/package-scripts.json +1 -1
  312. package/templates/repository/drizzle/repository.ts.tpl +7 -8
  313. package/templates/repository/knex/repository.ts.tpl +32 -12
  314. package/templates/value-object/value-object.spec.ts.tpl +16 -0
  315. package/templates/value-object/value-object.ts.tpl +22 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Gary Bourgeat
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -50,7 +50,8 @@ ddd-ts-kit init [--http express|fastify|nest|none]
50
50
  [--errors none|sentry] [--logger stdout|pino|winston]
51
51
  [--style declared|explicit] [--assembly barrel|discovery]
52
52
  [--dependencies signature|listed] [--refusals factories|classes]
53
- [--routes controllers|functions]
53
+ [--routes controllers|functions] [--value-objects throwing|result]
54
+ [--literals named|free] [--tenancy none|shared-table]
54
55
  [--package-manager npm|pnpm]
55
56
  [--allow-no-outbox "<reason>"] [--import-alias '$<name>/']
56
57
  [--import-extension none|js] [--sdk]
@@ -163,6 +164,12 @@ file. `--routes functions`, or a config without the key, keeps one `defineRoute`
163
164
  route, listed in `<context>.routes.ts`, as 0.1 to 0.3 wrote them; `controllers` moves a
164
165
  project from one to the other, a context at a time.
165
166
 
167
+ **A value object throws its refusals.** `init` writes `"stack.valueObjects": "throwing"`:
168
+ `generate value-object` writes a `create` that returns the value object or throws the refusal of
169
+ its concept, and a spec that asserts it with `expectRefusal(() => ..)`. `--value-objects result`,
170
+ or a config without the key, keeps a `create` returning a `Result` that the caller unwraps, as 0.1
171
+ to 0.5 wrote it; `value-objects` moves a project from one to the other.
172
+
166
173
  **Domain events leave with the save.** A generated command handler builds or loads its aggregate,
167
174
  calls one intention method, `await repository.save(aggregate)` and returns: no `pullEvents()`, and
168
175
  no `DomainEventDispatcher` in a handler or in a repository adapter, which only persists. The events
@@ -186,7 +193,8 @@ config, `docsUi`, `ci` and `logger` included.
186
193
  | 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 |
187
194
  | `--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 |
188
195
  | `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 |
189
- | `--audit on` | `src/platform/audit/`: `create-audit.ts` (the trail, the `onDecision` of the authorization, the middleware before the unit of work, the integration events subscribed under the consumer name `audit`), `audited-events.ts` (the registry `generate integration-event` adds to), `audit.module.ts`, and with an HTTP stack the read side: `audit.permissions.ts` (`audit:trail.read`), `search-audit-entries.query.ts`, its handler, `search-audit-entries.route.ts` (`GET /audit/entries`: cursor pages, filters `actorId`, `action`, `outcome`, `correlationId`). It is a capability of the platform, not a bounded context: no model, one protected query over the `AuditReader` port, bounded by the tenant of the actor. A scheduled job is audited like a request: origin `schedule`, actor `system:<context>.<job>`. With knex the two tables and their append-only triggers are created by the first migration; with drizzle the tables are in `schema.ts` and `npm run db:audit-guard` prints the trigger statements for a custom migration; with prisma, typeorm, `custom` or no ORM the trail is an `InMemoryAuditTrail` behind a `TODO(platform)`. The test databases leave the audit schema out of `reset()` |
196
+ | `--audit on` | `src/platform/audit/`: `create-audit.ts` (the trail, the `onDecision` of the authorization, the refusals of the guards at the edge given to the HTTP boundary as `onGuardRefusal`, the middleware before the unit of work, the integration events subscribed under the consumer name `audit`), `audited-events.ts` (the registry `generate integration-event` adds to), `audit.module.ts`, and with an HTTP stack the read side: `audit.permissions.ts` (`audit:trail.read`), `search-audit-entries.query.ts`, its handler, `search-audit-entries.route.ts` (`GET /audit/entries`: cursor pages, filters `actorId`, `action`, `outcome`, `correlationId`). It is a capability of the platform, not a bounded context: no model, one protected query over the `AuditReader` port, bounded by the tenant of the actor (with `--tenancy shared-table`, by the tenant of the work through `TenantAuditReader`: platform staff read across tenants only inside `acrossTenants`). The refusals of a caller without a credential are not recorded. A scheduled job is audited like a request: origin `schedule`, actor `system:<context>.<job>`. With knex the two tables and their append-only triggers are created by the first migration; with drizzle the tables are in `schema.ts` and `npm run db:audit-guard` prints the trigger statements for a custom migration; with prisma, typeorm, `custom` or no ORM the trail is an `InMemoryAuditTrail` behind a `TODO(platform)`. The test databases leave the audit schema out of `reset()` |
197
+ | `--tenancy shared-table` | recorded as `stack.tenancy`; Knex or Drizzle only. Every `generate repository` is tenant-scoped (as `--tenant-scoped`), through `tenantTable` and `ownTenantTable` or `tenantCondition` and `ownTenantCondition`; the outbox keeps the tenant of each event (`createOutboxTables(knex, { tenant: true })` and `KnexOutboxStore`'s `tenant: true`, or `tenantOutboxTable`), so consumers run in it; `tenancy/scoped-statement` judges the adapters. Row-level security, schema per tenant and database per tenant are refused, with what to wire by hand ([Multitenancy](../../docs/concepts/multitenancy.md)) |
190
198
  | `--cache redis` | `src/platform/redis/open-redis.ts` (`RedisServices`: the cache bound to the kernel `Cache`, the limiter to `RateLimiter`, the lock to `Lock`, which keeps a scheduled job to one instance, the relay signal as the `wakeOn` of the outbox relay with `relayWakeUpMiddleware` on the command bus), `http/refusal-for.ts` (one sliding window per caller address, 429 `application/problem+json` with `retry-after`; `RATE_LIMIT_MAX`, `RATE_LIMIT_WINDOW_MS`), `GET /health/ready` on the HTTP server, `REDIS_URL` validated, a compose service `cache` running Dragonfly with a healthcheck. Without a server (tools, tests without `REDIS_URL`) the same ports stay in the memory of the process |
191
199
  | `--errors sentry` | unexpected failures reported to Sentry or GlitchTip (one protocol, only the DSN differs) through the kernel `ErrorReporter`, bound to `@ddd-ts-kit/sentry`. `src/platform/errors.ts` (`initSentry` on the validated configuration, then `reportProcessFailures`), the second import of `main.ts`, of `apps/<context>/main.ts` and of `apps/worker/main.ts`, right after `tracing.ts`; `errors` handed to `composeApplication`, which gives it to the kernel module on tsyringe (`errorReporter`, flushed by `container.stop()` before the logger, `errorReportingMiddleware` first on both buses, the default scheduler observing with `reportFailedRuns`) or to `createPlatform` by hand (the same middleware, `onRun: reportFailedRuns(errors)`, `platform.errors`, flushed two seconds at most when the application stops); `reportHttpErrors` in `auth/http-boundary.ts` for every request answered 5xx; `DeadLetterReports` on the `onFailure` hook of a provided broker (`createEventProvider(config, errors)`, with `observing` around each consumer) and of the outbox relay. `SENTRY_DSN`, `SENTRY_ENVIRONMENT` (default: `NODE_ENV`), `SENTRY_RELEASE` and `SENTRY_SCRUB_MESSAGES` validated in `config/load-config.ts` as `errorReporting`: without a DSN the application starts and reports nothing; a DSN that is not a URL refuses the start. Dependencies `@ddd-ts-kit/sentry` and `@sentry/node`. A compose profile `errors` running GlitchTip 6.2.6 with its own PostgreSQL and Valkey (`GLITCHTIP_PORT`, loopback only, development bootstrap), and a section of the generated README saying how to read its DSN. The tools and the tests compose the application without a reporter. It goes with every other choice of the stack; with `--errors none` nothing of this is written |
192
200
  | `--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 |
@@ -256,6 +264,7 @@ ddd-ts-kit generate --help --json
256
264
  | `builder` | `<context> <Aggregate>` | `test/builders/<name>.builder.ts`, a class extending `Builder` |
257
265
  | `entity` | `<context> <Name>` | entity, spec |
258
266
  | `value-object` (`vo`) | `<context> <Name>` | value object, spec |
267
+ | `vocabulary` | `<context> <Name> --value <value> [--value <value>]...` | `domain/vocabularies/<name>.vocabulary.ts`: an object `as const` of the values, keyed by each value in PascalCase, and the union type of the same name; run again, adds the values the file does not hold |
259
268
  | `domain-event` | `<context> <Aggregate> <Fact>` | event named `<context>.<aggregate>.<fact>`, spec |
260
269
  | `error` (`refusal`) | `<context> <Concept> <refusal> [--code CODE] [--term ...]...` | a static factory `<refusal>` on `domain/errors/<concept>.error.ts`, the class of the errors of that concept (created when absent, extending `ConceptError`), and its case in `test/unit/<concept>.error.spec.ts`. The factory is added after the last one; run again, the command changes nothing. `<Concept>` is a term of the glossary (`--term` adds it). The code is the name of the refusal in constant case, with the concept before it when the name is one word or a code of the kit (`Appointment notFound` sets `APPOINTMENT_NOT_FOUND`); `--code` takes one of the forms `errors/factory-name` accepts. Refused: a name such as `create` or `error1`, and a code already set in the context |
261
270
  | `domain-error` | `<context> <Name> [--code CODE]` | one class per error with a stable code, spec: the form of a project whose config says `"stack.refusals": "classes"` or nothing. Refused under `factories`, with the `generate error` command to run instead |
@@ -266,7 +275,7 @@ ddd-ts-kit generate --help --json
266
275
  | `port` | `<context> <Name>` | `application/ports/<name>.port.ts`, one abstract class, and its fake |
267
276
  | `route` | `<context> <UseCaseName> --method <GET\|POST\|PUT\|PATCH\|DELETE> --path <p> [--command\|--query] [--group <Name>] [--mapper] [--serializer]` | under `"stack.routes": "controllers"`: a controller class in `presentation/http/<resource>/<use-case>/` (the resource is the first segment of the path), depending on `CommandBus` or `QueryBus`, behind the route group of its resource, written with it when it is new (`<resource>.routes.ts`: prefix, tag, `Authenticated`); a public use case stands in no group and says `guards: [Public]`; with class-validator one class per file (`<use-case>.params.ts`, `.body.ts`, `.answer.ts`, `.accepted.ts`, `.line.ts`); `--mapper` and `--serializer` add a request mapper and a serializer the controller is given; a spec; no registration in a declared project, a controller built by hand in `<context>.routes.ts` (the module file with hand wiring) in an explicit one. Under `"functions"`: a `defineRoute` function, its spec, its registration in `<context>.routes.ts`, and `<use-case>-<role>.dto.ts` classes |
268
277
  | `controller` | the same arguments as `route` | the controller class, whatever `stack.routes` says: for a project of function routes that writes its next route as a class |
269
- | `route-group` (`group`) | `<context> <Name> [--prefix <path>] [--group <ParentName>] [--public \| --role <role>]` | `presentation/http/<name>.routes.ts`: an empty class carrying `@RouteGroup`, behind `Authenticated` unless `--public` or `--role` says otherwise; with `--group` it refines that group and inherits from it |
278
+ | `route-group` (`group`) | `<context> <Name> [--prefix <path>] [--group <ParentName>] [--public \| --role <role>]` | `presentation/http/<name>.routes.ts`: an empty class carrying `@RouteGroup`, behind `Authenticated` unless `--public` or `--role` says otherwise (`HasRole(Role.Admin)`, the role read from the vocabulary of the platform, `<platformDir>/auth/role.ts`, which gets it when it does not hold it); with `--group` it refines that group and inherits from it |
270
279
  | `guard` | `<context> <Name>` | `presentation/http/guards/<name>.guard.ts`: a declared guard class to fill, and its spec |
271
280
  | `integration-event` | `<context> <Aggregate> <Fact> [--version n]` | `defineIntegrationEvent` declaration in the published language (its payload in `<event>.v<n>.payload.ts` with class-validator or a schema of your own), index export, the publisher `application/integration/publishers/<event>.publisher.ts`, spec, registration, a line of `platform/audit/audited-events.ts` |
272
281
  | `integration-handler` (`consumer`) | `<context> <upstreamContext> <eventType>` | `application/integration/handlers/<name>.integration-handler.ts`, a class `<Name>IntegrationHandler` depending on `CommandBus`, its spec, its idempotent subscription under the consumer name `<context>.<name>`; refused unless the upstream is declared |
@@ -355,9 +364,11 @@ ddd-ts-kit generate --help --json
355
364
  `ActorContext` nor a dispatcher, and stamps `created_at`, `created_by`, `updated_at`, `updated_by` with `stampCreation` and `stampUpdate`;
356
365
  the table uses `auditColumns` of the ORM package (the five fields are written out for Prisma).
357
366
  The sample fact of an aggregate is `registeredAt`, since `created_at` is the audit column.
358
- `repository --tenant-scoped` (drizzle and knex) adds `tenantColumn` and puts `tenantScopeOf(scope)`
359
- on the insert and in the condition of every read and update, with a spec that one tenant does
360
- not see another's rows. With another ORM the regular adapter is written and a note says what to add.
367
+ `repository --tenant-scoped` (drizzle and knex), and every repository of a project whose
368
+ `stack.tenancy` is `shared-table`, adds `tenantColumn`, names the tenant on the insert and reaches
369
+ the table through the helpers of the ORM package (`tenantTable` and `ownTenantTable` on Knex,
370
+ `tenantCondition` and `ownTenantCondition` on Drizzle), with a spec that one tenant does not see
371
+ another's rows. With another ORM the regular adapter is written and a note says what to add.
361
372
  - `adapter --decorators` is accepted on every stack: the aspects decorators serve the standard
362
373
  mode and the legacy one a `tsconfig.json` with `experimentalDecorators` imposes.
363
374
  - `route` of a `--search` query reads the page with `pageQuerySchema` and answers `pageSchemaOf` and
@@ -464,6 +475,16 @@ published languages, declared upstreams, allowed packages, cycles and orphans. `
464
475
  it as `.dependency-cruiser.cjs`; `--check` exits 1 when the file is missing or stale, which is
465
476
  what `npm run depcruise` runs first. Edit the config, not the file.
466
477
 
478
+ ## value-objects
479
+
480
+ ```sh
481
+ ddd-ts-kit value-objects [--dry-run]
482
+ ```
483
+
484
+ Moves the value objects of a project from a `Result` to factories that return the value or
485
+ throw (`"stack.valueObjects": "throwing"`). What it rewrites, and what it leaves to a person, is
486
+ in [CONFIG.md](../../docs/CONFIG.md#stack).
487
+
467
488
  ## controllers
468
489
 
469
490
  ```sh
@@ -717,6 +738,7 @@ saying what to do instead. Exit code 1 when there is at least one error.
717
738
  | `events/name-format` | an event name that is not `<context>.<aggregate>.<fact>` in kebab-case with the right context |
718
739
  | `events/defined-in-published-language` | `defineIntegrationEvent` outside a published language, without a payload, twice for one version; an event described by hand |
719
740
  | `language/glossary-term` | a class of the model named with a word the glossary of its context does not define; an empty glossary; under `"stack.refusals": "factories"`, an error class of `domain/errors/` too |
741
+ | `language/declared-vocabulary` | a string literal whose value is a value of a closed vocabulary the project declares (an object `as const` exported with the union type of its name, a permission set of `definePermissions`), outside the file that declares it, in the place that speaks its language (its context; the platform and the route groups for the platform; everywhere for a permission id or the shared kernel); tests, published languages and the relationship schema are not judged; under `"stack.literals": "named"` |
720
742
  | `language/no-technical-name` | `Manager`, `Helper`, `Util`, `Utils`, `Data`, `Info`, `Processor`, `Wrapper`, `Impl`, `Base`, `Abstract`, `Dto`, `Entity`, `Model` in a type declared under `domain/` or in a use case folder |
721
743
  | `purity/no-system-clock` | `new Date()` without argument, `Date.now()`, `performance.now()` in `domain/` or `application/` |
722
744
  | `purity/no-ambient-randomness` | `Math.random`, the random source of `crypto`, an id library |
@@ -743,6 +765,7 @@ saying what to do instead. Exit code 1 when there is at least one error.
743
765
  | `authz/actor-explicit` | in `domain/` and `application/`: `ActorContext`, `ExecutionScope` (as a type or as a value: the class is the token of a dependency list), `AsyncLocalStorageExecutionScope`, `ScopedActorContext`, `AsyncLocalStorage`; `.current()` or `.require()` on an actor context or on something named `scope`, `scopes` or `...executionScope`; an import of `stampCreation`, `stampUpdate` or `tenantScopeOf` |
744
766
  | `aspects/outside-in` | an import of `@ddd-ts-kit/aspects/decorators` outside `infrastructure/` of a context and the platform directory: `presentation/`, the module file, `published-language/`, the shared kernel, `main.ts`, any other source (`domain/` and `application/` are reported by the two `layer/*` rules instead) |
745
767
  | `tracing/platform-only` | an import of `@ddd-ts-kit/tracing` or of an `@opentelemetry/*` package outside the platform directory, `main.ts` and `apps/`, tests included |
768
+ | `tenancy/scoped-statement` | with `stack.tenancy` other than `none`, in `infrastructure/` of a context, tests aside: on Knex the executor used other than as an argument (`executor()(`, `executor().from(`, `executor().raw(`, `const db = ...executor();`) and any `.raw(`; on Drizzle, statement by statement, a read, update or delete on the executor whose where has no `tenantCondition(` nor `ownTenantCondition(` (inline or in the local it is given), an insert whose row has no `tenantScopeOf(`, a relational query (`executor().query`), a raw `execute(`, or the executor held in a variable; on both, a read model store built without its `tenant` option. A where built by another function is not followed |
746
769
  | `standard/no-parallel-interface` | a class, interface or type alias declared as `ILogger`, `AppLogger`, `LoggerService`, `LoggerInterface`, `IMetrics`, `MetricsService`, `ICache`, `CacheService`, `UserContext`, `CurrentUser`, `AuthContext`, `RequestContext` (outside `presentation/` and the platform), `UserSession`, `AuthSession`, `SessionData`, `PaginatedResult`, `PageResult`, `PaginatedResponse`, `Paginated`, `PaginationParams`, `PageParams`, `AuditLog`, `AuditLogEntry`, `AuditRecord`, `IJobScheduler`, `JobSchedulerService`, `CronScheduler`, `TaskScheduler`, `IScheduledJob`, `CronJob`, `ScheduledTask`, `BackgroundJob`, `IErrorReporter`, `ErrorReporterService`, `ErrorTracker`, `ExceptionReporter`, `CrashReporter`, `I` followed by a standard name (`IClock`, `IIdGenerator`, `IUnitOfWork`, `ISession`, ...) or a name of `standardInterfaces`; a class that implements or extends the standard interface is an adapter and is not reported |
747
770
  | `events/outbox-required` | `stack.events` other than `outbox` with an ORM and no `stack.events` deviation; in `domain/` and `application/`, the import of a broker client or of a bus or relay implementation; a publisher depending on more than `IntegrationEventPublisher`; a platform module that hands out a publisher and never names `OutboxPublisher` |
748
771
  | `events/consumer-idempotent` | an integration event handler class (`application/integration/handlers/*.integration-handler.ts`) that neither carries `@IntegrationEventHandler` nor is registered in its module file under a consumer name; an `@IntegrationEventHandler` whose `consumer` is not a non-empty string literal; a free `on(` or `consume(` without `processed`; a consumer name used twice, in declarations and registrations alike |
@@ -763,10 +786,11 @@ saying what to do instead. Exit code 1 when there is at least one error.
763
786
  | `errors/code-unique` | under `"stack.refusals": "factories"`, in the `domain/errors/` of a context: a code set a second time, by a factory (`refusal('CODE', ..)`) or by a class (`readonly code = 'CODE'`), with the file and line of the first. The same code in two contexts is not reported |
764
787
  | `errors/known-code` | under `"stack.refusals": "factories"`, in a `*.route.ts`: a code of the `errors` list that no refusal of the context of the route sets, that no class outside the contexts sets, and that is not a code of the kit |
765
788
 
766
- Five more ids belong to `@ddd-ts-kit/eslint-plugin`, which reads the syntax tree where this
789
+ More ids belong to `@ddd-ts-kit/eslint-plugin`, which reads the syntax tree where this
767
790
  checker reads text: `domain/aggregate-encapsulation`, `domain/value-object-immutability`,
768
- `domain/no-generic-error`, `application/handler-shape` and
769
- `application/command-query-separation`. `rules` and `explain` show them as "checked by
791
+ `domain/no-generic-error`, `application/handler-shape`,
792
+ `application/command-query-separation` and `clean/no-magic-number` among them (`ddd-ts-kit rules`
793
+ lists them all). `rules` and `explain` show them as "checked by
770
794
  @ddd-ts-kit/eslint-plugin", the config accepts them under `rules`, and `check --rule` on one of
771
795
  them answers with `npm run lint`. One id, `clean/formatted`, belongs to the formatter: `rules`
772
796
  and `explain` show it as "checked by Biome", and `check --rule` on it answers with
@@ -1 +1 @@
1
- {"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../../src/check/canonical/roles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,qEAAqE;AACrE,eAAO,MAAM,KAAK,EAAE,SAAS,IAAI,EAkEhC,CAAC"}
1
+ {"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../../src/check/canonical/roles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,qEAAqE;AACrE,eAAO,MAAM,KAAK,EAAE,SAAS,IAAI,EAmEhC,CAAC"}
@@ -4,6 +4,7 @@ export const ROLES = [
4
4
  { directory: 'domain/aggregates', suffixes: ['.aggregate.ts'], oneConcept: true, specFor: ['.aggregate.ts'] },
5
5
  { directory: 'domain/entities', suffixes: ['.entity.ts'], oneConcept: true },
6
6
  { directory: 'domain/value-objects', suffixes: ['.vo.ts'], oneConcept: true, specFor: ['.vo.ts'] },
7
+ { directory: 'domain/vocabularies', suffixes: ['.vocabulary.ts'], oneConcept: true },
7
8
  { directory: 'domain/events', suffixes: ['.event.ts'], oneConcept: true },
8
9
  { directory: 'domain/errors', suffixes: ['.error.ts'] },
9
10
  { directory: 'domain/repositories', suffixes: ['.repository.ts'] },
@@ -1 +1 @@
1
- {"version":3,"file":"roles.js","sourceRoot":"","sources":["../../../src/check/canonical/roles.ts"],"names":[],"mappings":"AAEA,qEAAqE;AACrE,MAAM,CAAC,MAAM,KAAK,GAAoB;IACpC,EAAE,SAAS,EAAE,oBAAoB,EAAE,QAAQ,EAAE,EAAE,EAAE;IACjD,EAAE,SAAS,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,eAAe,CAAC,EAAE;IAC7G,EAAE,SAAS,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IAC5E,EAAE,SAAS,EAAE,sBAAsB,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE;IAClG,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IACzE,EA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YACX,aAAa;YACb,UAAU;YACV,cAAc;YACd,YAAY;YACZ,UAAU;YACV,YAAY;YACZ,gBAAgB;SACjB;KACF;IACD,EAAE,SAAS,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC/C,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,aAAa,CAAC,EAAE;CAC1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"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"}
1
+ {"version":3,"file":"architecture-rules.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAoE7C,gHAAgH;AAChH,eAAO,MAAM,kBAAkB,EAAE,SAAS,IAAI,EAmE7C,CAAC"}
@@ -34,6 +34,7 @@ import { governanceRecordedDeviation } from '../rules/governance-recorded-deviat
34
34
  import { importsAliasDeclared } from '../rules/imports-alias-declared.js';
35
35
  import { importsAliasOnly } from '../rules/imports-alias-only.js';
36
36
  import { importsExtension } from '../rules/imports-extension.js';
37
+ import { languageDeclaredVocabulary } from '../rules/language-declared-vocabulary.js';
37
38
  import { languageGlossaryTerm } from '../rules/language-glossary-term.js';
38
39
  import { languageNoTechnicalName } from '../rules/language-no-technical-name.js';
39
40
  import { layerApplicationInward } from '../rules/layer-application-inward.js';
@@ -55,6 +56,7 @@ import { purityNoSystemClock } from '../rules/purity-no-system-clock.js';
55
56
  import { schedulingJobName } from '../rules/scheduling-job-name.js';
56
57
  import { schedulingJobTriggersUseCase } from '../rules/scheduling-job-triggers-use-case.js';
57
58
  import { standardNoParallelInterface } from '../rules/standard-no-parallel-interface.js';
59
+ import { tenancyScopedStatement } from '../rules/tenancy-scoped-statement.js';
58
60
  import { testBuilderRequired } from '../rules/test-builder-required.js';
59
61
  import { testCoverageGoverned } from '../rules/test-coverage-governed.js';
60
62
  import { testNoMocks } from '../rules/test-no-mocks.js';
@@ -85,6 +87,7 @@ export const ARCHITECTURE_RULES = [
85
87
  testCoverageGoverned,
86
88
  languageGlossaryTerm,
87
89
  languageNoTechnicalName,
90
+ languageDeclaredVocabulary,
88
91
  purityNoSystemClock,
89
92
  purityNoAmbientRandomness,
90
93
  purityNoEnvironment,
@@ -109,6 +112,7 @@ export const ARCHITECTURE_RULES = [
109
112
  authzActorExplicit,
110
113
  aspectsOutsideIn,
111
114
  tracingPlatformOnly,
115
+ tenancyScopedStatement,
112
116
  standardNoParallelInterface,
113
117
  governanceRecordedDeviation,
114
118
  compositionOnlyInModule,
@@ -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,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,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;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,0BAA0B;IAC1B,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,sBAAsB;IACtB,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"eslint-only-rules.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/eslint-only-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAiD7F,CAAC"}
1
+ {"version":3,"file":"eslint-only-rules.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/eslint-only-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAsD7F,CAAC"}
@@ -27,6 +27,10 @@ export const ESLINT_ONLY_RULES = [
27
27
  id: 'errors/factory-name',
28
28
  description: 'Under "stack.refusals": "factories", a static factory of an error class is named after the refusal, never `create`, `make`, `of` or `error1`, and its code is that name in constant case, alone or with the name of the concept.',
29
29
  },
30
+ {
31
+ id: 'clean/no-magic-number',
32
+ description: 'Under "stack.literals": "named", no number literal in domain/ and application/ but 0, 1, -1, an index, a type and the initializer of a module constant or a `static readonly`.',
33
+ },
30
34
  {
31
35
  id: 'application/handler-shape',
32
36
  description: 'A *.handler.ts file exports one class with a single public method, execute.',
@@ -1 +1 @@
1
- {"version":3,"file":"eslint-only-rules.js","sourceRoot":"","sources":["../../../src/check/catalogue/eslint-only-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqE;IACjG;QACE,EAAE,EAAE,gCAAgC;QACpC,WAAW,EACT,0GAA0G;KAC7G;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,WAAW,EAAE,kGAAkG;KAChH;IACD;QACE,EAAE,EAAE,yBAAyB;QAC7B,WAAW,EAAE,sGAAsG;KACpH;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,WAAW,EACT,kKAAkK;KACrK;IACD;QACE,EAAE,EAAE,+BAA+B;QACnC,WAAW,EACT,gMAAgM;KACnM;IACD;QACE,EAAE,EAAE,qBAAqB;QACzB,WAAW,EACT,kOAAkO;KACrO;IACD;QACE,EAAE,EAAE,2BAA2B;QAC/B,WAAW,EAAE,6EAA6E;KAC3F;IACD,EAAE,EAAE,EAAE,sCAAsC,EAAE,WAAW,EAAE,oDAAoD,EAAE;IACjH;QACE,EAAE,EAAE,+BAA+B;QACnC,WAAW,EACT,sHAAsH;KACzH;IACD;QACE,EAAE,EAAE,mCAAmC;QACvC,WAAW,EACT,kKAAkK;KACrK;IACD;QACE,EAAE,EAAE,gCAAgC;QACpC,WAAW,EACT,uHAAuH;KAC1H;CACF,CAAC"}
1
+ {"version":3,"file":"eslint-only-rules.js","sourceRoot":"","sources":["../../../src/check/catalogue/eslint-only-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqE;IACjG;QACE,EAAE,EAAE,gCAAgC;QACpC,WAAW,EACT,0GAA0G;KAC7G;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,WAAW,EAAE,kGAAkG;KAChH;IACD;QACE,EAAE,EAAE,yBAAyB;QAC7B,WAAW,EAAE,sGAAsG;KACpH;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,WAAW,EACT,kKAAkK;KACrK;IACD;QACE,EAAE,EAAE,+BAA+B;QACnC,WAAW,EACT,gMAAgM;KACnM;IACD;QACE,EAAE,EAAE,qBAAqB;QACzB,WAAW,EACT,kOAAkO;KACrO;IACD;QACE,EAAE,EAAE,uBAAuB;QAC3B,WAAW,EACT,gLAAgL;KACnL;IACD;QACE,EAAE,EAAE,2BAA2B;QAC/B,WAAW,EAAE,6EAA6E;KAC3F;IACD,EAAE,EAAE,EAAE,sCAAsC,EAAE,WAAW,EAAE,oDAAoD,EAAE;IACjH;QACE,EAAE,EAAE,+BAA+B;QACnC,WAAW,EACT,sHAAsH;KACzH;IACD;QACE,EAAE,EAAE,mCAAmC;QACvC,WAAW,EACT,kKAAkK;KACrK;IACD;QACE,EAAE,EAAE,gCAAgC;QACpC,WAAW,EACT,uHAAuH;KAC1H;CACF,CAAC"}
@@ -4,6 +4,8 @@ import type { Decoration } from './decoration.js';
4
4
  export interface OptionValue {
5
5
  /** Undefined when the value is a variable, a template with substitutions, a concatenation or a shorthand. */
6
6
  readonly literal: string | undefined;
7
+ /** The value when it reads a member of a name, `InvoiceIssued.eventName`; undefined otherwise. */
8
+ readonly reference?: string;
7
9
  readonly line: number;
8
10
  }
9
11
  /** The value of `key` in an options object given directly to the decorator, or undefined when no such key is written. */
@@ -1 +1 @@
1
- {"version":3,"file":"option-of.d.ts","sourceRoot":"","sources":["../../../src/check/declarations/option-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,2CAA2C;AAC3C,MAAM,WAAW,WAAW;IAC1B,6GAA6G;IAC7G,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,yHAAyH;AACzH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAmBjG"}
1
+ {"version":3,"file":"option-of.d.ts","sourceRoot":"","sources":["../../../src/check/declarations/option-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,2CAA2C;AAC3C,MAAM,WAAW,WAAW;IAC1B,6GAA6G;IAC7G,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,kGAAkG;IAClG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAID,yHAAyH;AACzH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAyBjG"}
@@ -1,3 +1,4 @@
1
+ const MEMBER = /^\s*([A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*)\s*[,}]/;
1
2
  /** The value of `key` in an options object given directly to the decorator, or undefined when no such key is written. */
2
3
  export function optionOf(scan, decoration, key) {
3
4
  const { code } = scan;
@@ -10,7 +11,12 @@ export function optionOf(scan, decoration, key) {
10
11
  const valueStart = match.index + match[0].length;
11
12
  const literal = scan.strings.find((candidate) => candidate.start === valueStart);
12
13
  const complete = literal !== undefined && /^\s*[,}]/.test(code.slice(literal.end, decoration.close + 1));
13
- return { literal: complete ? literal.value : undefined, line: scan.lineAt(match.index) };
14
+ const reference = MEMBER.exec(code.slice(valueStart, decoration.close + 1))?.[1];
15
+ return {
16
+ literal: complete ? literal.value : undefined,
17
+ line: scan.lineAt(match.index),
18
+ ...(reference === undefined ? {} : { reference }),
19
+ };
14
20
  }
15
21
  return undefined;
16
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"option-of.js","sourceRoot":"","sources":["../../../src/check/declarations/option-of.ts"],"names":[],"mappings":"AAUA,yHAAyH;AACzH,MAAM,UAAU,QAAQ,CAAC,IAAU,EAAE,UAAsB,EAAE,GAAW;IACtE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACtB,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,eAAe,GAAG,wBAAwB,EAAE,GAAG,CAAC,CAAC;IAE5E,OAAO,CAAC,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC;IAEpC,KAAK,IAAI,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClH,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,C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AI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;YAC9B,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;SAClD,CAAC;IACJ,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,mGAAmG;AACnG,SAAS,cAAc,CAAC,MAAc;IACpC,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,KAAa,EAAU,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAE5G,OAAO,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;AAC3E,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import type { SourceFile } from '../model/source-file.js';
2
2
  import type { StringRecord } from '../scan/string-record.js';
3
- /** The `name` a domain event class gives itself: `readonly name = '...'`, `name: string = '...'`. */
3
+ /**
4
+ * The name a domain event class gives itself: `static readonly eventName = '...'`, which its
5
+ * `readonly name` and its reactions read, or as 0.5 wrote it, `readonly name = '...'`.
6
+ */
4
7
  export declare function domainEventNames(file: SourceFile): StringRecord[];
5
8
  //# sourceMappingURL=domain-event-names.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"domain-event-names.d.ts","sourceRoot":"","sources":["../../../src/check/events/domain-event-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAK7D,qGAAqG;AACrG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,EAAE,CAIjE"}
1
+ {"version":3,"file":"domain-event-names.d.ts","sourceRoot":"","sources":["../../../src/check/events/domain-event-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAK7D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,EAAE,CAIjE"}
@@ -1,6 +1,9 @@
1
- /** `name = '...'`, `name: '...'` and `name: string = '...'`. */
2
- const NAME_PROPERTY = /(?<![\w$.])name\s*\??\s*(?:[:=]|:[^=;\n'"]+=)\s*$/;
3
- /** The `name` a domain event class gives itself: `readonly name = '...'`, `name: string = '...'`. */
1
+ /** `name = '...'`, `name: '...'`, `name: string = '...'`, and the same of `eventName`. */
2
+ const NAME_PROPERTY = /(?<![\w$.])(?:name|eventName)\s*\??\s*(?:[:=]|:[^=;\n'"]+=)\s*$/;
3
+ /**
4
+ * The name a domain event class gives itself: `static readonly eventName = '...'`, which its
5
+ * `readonly name` and its reactions read, or as 0.5 wrote it, `readonly name = '...'`.
6
+ */
4
7
  export function domainEventNames(file) {
5
8
  return file.scan.strings.filter((literal) => NAME_PROPERTY.test(file.scan.code.slice(Math.max(0, literal.start - 200), literal.start)));
6
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"domain-event-names.js","sourceRoot":"","sources":["../../../src/check/events/domain-event-names.ts"],"names":[],"mappings":"AAGA,gEAAgE;AAChE,MAAM,aAAa,GAAG,mDAAmD,CAAC;AAE1E,qGAAqG;AACrG,MAAM,UAAU,gBAAgB,CAAC,IAAgB;IAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAC1C,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAC1F,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"domain-event-names.js","sourceRoot":"","sources":["../../../src/check/events/domain-event-names.ts"],"names":[],"mappings":"AAGA,0FAA0F;AAC1F,MAAM,aAAa,GAAG,iEAAiE,CAAC;AAExF;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAgB;IAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAC1C,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAC1F,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"language-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/language-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA4B3D,CAAC"}
1
+ {"version":3,"file":"language-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/language-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsC3D,CAAC"}
@@ -11,6 +11,16 @@ export class IssueInvoiceCommand {}`,
11
11
  bad: `export class InvoiceManager {}`,
12
12
  good: `export class InvoiceNumbering {}`,
13
13
  },
14
+ 'language/declared-vocabulary': {
15
+ why: 'A status, a kind, a role or a permission is a word of the language whose values are a closed list. Spelled again as a string wherever it is compared, granted or stored, each copy can drift: a typo compiles, a renamed value leaves its old spelling behind, and nothing completes it in the editor. Declared once, as an object `as const` and the union type of its name (a permission set for permissions), it is read by its key, completed by the editor, and a parameter typed with it accepts nothing else. The value stays the same string on the wire and in the database. A quoted key counts, and is written as a computed key, `[AppointmentStatus.NoShow]: ..`. Tests and published languages are not judged: a test sends the values a client sends, and a published language names the values of its contract itself; nor is the relationship schema of the access model, which declares its relations. Where: the vocabulary of a context in that context only (the same word may mean something else next door), one of the platform (the roles) in the platform and in the route groups `*.routes.ts`, a permission id and a vocabulary of the shared kernel everywhere. What is read as a vocabulary: every entry a key and a string literal, comments, either quote and `as const satisfies ..` allowed; a number, a spread or a computed entry leaves the object unread, and so does a union type written otherwise than `(typeof X)[keyof typeof X]`. The rule holds under "stack.literals": "named", which `init` writes; a config that does not say keeps the free literals of 0.5.',
16
+ bad: `// domain/vocabularies/appointment-status.vocabulary.ts declares AppointmentStatus
17
+ if (appointment.status === 'no-show') {
18
+ grants.push('billing:invoice.issue');
19
+ }`,
20
+ good: `if (appointment.status === AppointmentStatus.NoShow) {
21
+ grants.push(billingPermissions['invoice.issue']);
22
+ }`,
23
+ },
14
24
  'purity/no-system-clock': {
15
25
  why: 'Code that reads the clock gives a different answer every time it runs, so its tests are either flaky or need a mocked module. Passing the instant in, from the Clock port, makes every rule about time testable with a fixed date and replayable in production.',
16
26
  bad: `isOverdue(): boolean { return this.dueDate < new Date(); }`,
@@ -1 +1 @@
1
- {"version":3,"file":"language-docs.js","sourceRoot":"","sources":["../../../src/check/explain/language-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAsC;IAC9D,wBAAwB,EAAE;QACxB,GAAG,EAAE,gTAAgT;QACrT,GAAG,EAAE;+BACsB;QAC3B,IAAI,EAAE;oCAC0B;KACjC;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,+OAA+O;QACpP,GAAG,EAAE,gCAAgC;QACrC,IAAI,EAAE,kCAAkC;KACzC;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,iQAAiQ;QACtQ,GAAG,EAAE,4DAA4D;QACjE,IAAI,EAAE,8DAA8D;KACrE;IACD,8BAA8B,EAAE;QAC9B,GAAG,EAAE,4QAA4Q;QACjR,GAAG,EAAE,uEAAuE;QAC5E,IAAI,EAAE,gEAAgE;KACvE;IACD,uBAAuB,EAAE;QACvB,GAAG,EAAE,2QAA2Q;QAChR,GAAG,EAAE,6DAA6D;QAClE,IAAI,EAAE,yDAAyD;KAChE;CACF,CAAC"}
1
+ {"version":3,"file":"language-docs.js","sourceRoot":"","sources":["../../../src/check/explain/language-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAsC;IAC9D,wBAAwB,EAAE;QACxB,GAAG,EAAE,gTAAgT;QACrT,GAAG,EAAE;+BACsB;QAC3B,IAAI,EAAE;oCAC0B;KACjC;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,+OAA+O;QACpP,GAAG,EAAE,gCAAgC;QACrC,IAAI,EAAE,kCAAkC;KACzC;IACD,8BAA8B,EAAE;QAC9B,GAAG,EAAE,+gDAA+gD;QACphD,GAAG,EAAE;;;EAGP;QACE,IAAI,EAAE;;EAER;KACC;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,iQAAiQ;QACtQ,GAAG,EAAE,4DAA4D;QACjE,IAAI,EAAE,8DAA8D;KACrE;IACD,8BAA8B,EAAE;QAC9B,GAAG,EAAE,4QAA4Q;QACjR,GAAG,EAAE,uEAAuE;QAC5E,IAAI,EAAE,gEAAgE;KACvE;IACD,uBAAuB,EAAE;QACvB,GAAG,EAAE,2QAA2Q;QAChR,GAAG,EAAE,6DAA6D;QAClE,IAAI,EAAE,yDAAyD;KAChE;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;AAiBpD,oGAAoG;AACpG,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgBvD,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;AAkBpD,oGAAoG;AACpG,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAiBvD,CAAC"}
@@ -11,6 +11,7 @@ import { PERSISTENCE_DOCS } from './persistence-docs.js';
11
11
  import { PORTS_DOCS } from './ports-docs.js';
12
12
  import { SCHEDULING_DOCS } from './scheduling-docs.js';
13
13
  import { STANDARD_DOCS } from './standard-docs.js';
14
+ import { TENANCY_DOCS } from './tenancy-docs.js';
14
15
  import { TREE_DOCS } from './tree-docs.js';
15
16
  import { WIRING_DOCS } from './wiring-docs.js';
16
17
  /** Shown by `ddd-ts-kit explain <rule-id>`: the reason behind the rule and one example each way. */
@@ -28,6 +29,7 @@ export const RULE_DOCS = {
28
29
  ...PORTS_DOCS,
29
30
  ...SCHEDULING_DOCS,
30
31
  ...STANDARD_DOCS,
32
+ ...TENANCY_DOCS,
31
33
  ...TREE_DOCS,
32
34
  ...WIRING_DOCS,
33
35
  };
@@ -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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AAE,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,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,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,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,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;IACd,GAAG,gBAAgB;IACnB,GAAG,UAAU;IACb,GAAG,eAAe;IAClB,GAAG,aAAa;IAChB,GAAG,YAAY;IACf,GAAG,SAAS;IACZ,GAAG,WAAW;CACf,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { RuleDoc } from '../model/rule-doc.js';
2
+ export declare const TENANCY_DOCS: Readonly<Record<string, RuleDoc>>;
3
+ //# sourceMappingURL=tenancy-docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenancy-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/tenancy-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAa1D,CAAC"}
@@ -0,0 +1,15 @@
1
+ export const TENANCY_DOCS = {
2
+ 'tenancy/scoped-statement': {
3
+ why: 'On shared tables, one statement without its tenant condition reads or overwrites the data of every tenant: the most common and the most damaging leak of a multi-tenant application. The kit puts the condition in one place, the helpers of the ORM package, which read the tenant from the execution scope, refuse work that names none, widen reads only under an audited elevation and never widen writes. A table reached straight from the executor bypasses all of it. Judged in a project whose "stack.tenancy" is not "none": the infrastructure of the contexts, tests aside. Checked by text, statement by statement: on Knex the executor used other than as the argument of a helper, and raw SQL; on Drizzle a read, update or delete whose where carries no tenant condition (inline or in the local it is given), an insert whose row names no tenant, a relational query or a raw execute; on both, a read model store built without its tenant option. A where built by another function is not followed: inline it, or record a deviation.',
4
+ bad: `// infrastructure/persistence/knex-invoice.repository.ts
5
+ const row = await this.database.executor()<InvoiceRow, InvoiceRow[]>('invoices').where({ id }).first();
6
+ const all = await this.database.executor().from('invoices').where({ status }); // the executor chained
7
+ // infrastructure/persistence/drizzle-invoice.repository.ts
8
+ await this.database.executor().select().from(invoices).where(eq(invoices.id, id));
9
+ await this.database.executor().query.invoices.findMany(); // a relational query cannot carry the condition`,
10
+ good: `const row = await tenantTable<InvoiceRow>(this.database, this.scope, INVOICES).where({ id }).first();
11
+ await ownTenantTable<InvoiceRow>(this.database, this.scope, INVOICES).where({ id, version }).update(changes);
12
+ await this.database.executor().select().from(invoices).where(and(eq(invoices.id, id), tenantCondition(invoices.tenantId, this.scope)));`,
13
+ },
14
+ };
15
+ //# sourceMappingURL=tenancy-docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenancy-docs.js","sourceRoot":"","sources":["../../../src/check/explain/tenancy-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAsC;IAC7D,0BAA0B,EAAE;QAC1B,GAAG,EAAE,+/BAA+/B;QACpgC,GAAG,EAAE;;;;;2GAKkG;QACvG,IAAI,EAAE;;wIAE8H;KACrI;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"declarations-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/declarations-fixtures.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA2B5C,eAAO,MAAM,qBAAqB,EAAE,SAAS,OAAO,EAmJnD,CAAC"}
1
+ {"version":3,"file":"declarations-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/declarations-fixtures.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA8B5C,eAAO,MAAM,qBAAqB,EAAE,SAAS,OAAO,EAiLnD,CAAC"}
@@ -11,6 +11,7 @@ import { SAMPLES } from './samples.js';
11
11
  import { withoutFile } from './without-file.js';
12
12
  const { ADAPTER, AGGREGATE, BARREL, BILLING, COMMAND, EVENT, EVENT_HANDLER, EVENT_HANDLER_SPEC, HANDLER, INTEGRATION_HANDLER, INTEGRATION_HANDLER_SPEC, JOB, JOB_SPEC, MODULE, POLICY, } = PATHS;
13
13
  const { SPEC } = SAMPLES;
14
+ const STATIC_EVENT = "export class InvoiceIssued {\n static readonly eventName = 'billing.invoice.issued';\n\n readonly name = InvoiceIssued.eventName;\n}\n";
14
15
  export const DECLARATIONS_FIXTURES = [
15
16
  {
16
17
  ruleId: 'declarations/role-declared',
@@ -70,6 +71,36 @@ export const DECLARATIONS_FIXTURES = [
70
71
  [INTEGRATION_HANDLER_SPEC]: SPEC,
71
72
  }),
72
73
  },
74
+ {
75
+ ruleId: 'declarations/role-declared',
76
+ name: 'a domain event handler reading the name its event class declares',
77
+ expect: 'pass',
78
+ files: declaredProject({
79
+ [EVENT]: STATIC_EVENT,
80
+ [EVENT_HANDLER]: DECLARED.eventHandler.replace("'billing.invoice.issued'", 'InvoiceIssued.eventName'),
81
+ [EVENT_HANDLER_SPEC]: SPEC,
82
+ }),
83
+ },
84
+ {
85
+ ruleId: 'declarations/role-declared',
86
+ name: 'a domain event handler reading the name of another event class',
87
+ expect: { file: EVENT_HANDLER },
88
+ files: declaredProject({
89
+ [EVENT]: STATIC_EVENT,
90
+ [EVENT_HANDLER]: DECLARED.eventHandler.replace("'billing.invoice.issued'", 'InvoiceSent.eventName'),
91
+ [EVENT_HANDLER_SPEC]: SPEC,
92
+ }),
93
+ },
94
+ {
95
+ ruleId: 'declarations/role-declared',
96
+ name: 'a domain event handler written under another name than the one its event class declares once',
97
+ expect: { file: EVENT_HANDLER },
98
+ files: declaredProject({
99
+ [EVENT]: STATIC_EVENT,
100
+ [EVENT_HANDLER]: DECLARED.eventHandler.replace('billing.invoice.issued', 'billing.invoice.sent'),
101
+ [EVENT_HANDLER_SPEC]: SPEC,
102
+ }),
103
+ },
73
104
  {
74
105
  ruleId: 'declarations/role-declared',
75
106
  name: 'a domain event handler written under another name than the one its event carries',
@@ -1 +1 @@
1
- {"version":3,"file":"declarations-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/declarations-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC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,iBAAiB,CAAC,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;KAC1E;IACD;QACE,MAAM,EAAE,4BAA4B;QACpC,IAAI,EAAE,8CAA8C;QACpD,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE;QACrB,KAAK,EAAE,eAAe,CAAC;YACrB,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,wEAAwE,EAAE,EAAE,CAAC;YACzG,CAAC,QAAQ,CAAC,EAAE,IAAI;SACjB,CAAC;KACH;CACF,CAAC"}
1
+ {"version":3,"file":"declarations-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/declarations-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,EACJ,OAAO,EACP,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,GAAG,EACH,QAAQ,EACR,MAAM,EACN,MAAM,GACP,GAAG,KAAK,CAA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/events-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQ5C,eAAO,MAAM,eAAe,EAAE,SAAS,OAAO,EAsE7C,CAAC"}
1
+ {"version":3,"file":"events-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/events-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQ5C,eAAO,MAAM,eAAe,EAAE,SAAS,OAAO,EA+E7C,CAAC"}
@@ -21,6 +21,14 @@ export const EVENTS_FIXTURES = [
21
21
  expect: { file: EVENT },
22
22
  files: project({ [EVENT]: "export class InvoiceIssued {\n readonly name = 'InvoiceIssued';\n}\n" }),
23
23
  },
24
+ {
25
+ ruleId: 'events/name-format',
26
+ name: 'a domain event declaring once a name like its class',
27
+ expect: { file: EVENT },
28
+ files: project({
29
+ [EVENT]: "export class InvoiceIssued {\n static readonly eventName = 'InvoiceIssued';\n\n readonly name = InvoiceIssued.eventName;\n}\n",
30
+ }),
31
+ },
24
32
  {
25
33
  ruleId: 'events/name-format',
26
34
  name: 'an integration event carrying the prefix of another context',
@@ -1 +1 @@
1
- {"version":3,"file":"events-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/events-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;AAC5C,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;AAE5B,MAAM,CAAC,MAAM,eAAe,GAAuB;IACjD;QACE,MAAM,EAAE,oBAAoB;QAC5B,IAAI,E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EAAE;QAC3B,KAAK,EAAE,OAAO,CAAC;YACb,CAAC,SAAS,CAAC,EAAE,2FAA2F;SACzG,CAAC;KACH;CACF,CAAC"}
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EAkCtC,CAAC"}