ddd-ts-kit 0.1.1 → 0.2.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 (609) hide show
  1. package/README.md +81 -21
  2. package/dist/alias/compiler-resolution-of.d.ts +10 -0
  3. package/dist/alias/compiler-resolution-of.d.ts.map +1 -0
  4. package/dist/alias/compiler-resolution-of.js +13 -0
  5. package/dist/alias/compiler-resolution-of.js.map +1 -0
  6. package/dist/alias/compiler-resolution.d.ts +8 -0
  7. package/dist/alias/compiler-resolution.d.ts.map +1 -0
  8. package/dist/alias/compiler-resolution.js +2 -0
  9. package/dist/alias/compiler-resolution.js.map +1 -0
  10. package/dist/alias/index.d.ts +3 -1
  11. package/dist/alias/index.d.ts.map +1 -1
  12. package/dist/alias/index.js +3 -1
  13. package/dist/alias/index.js.map +1 -1
  14. package/dist/alias/module-name-mapper.d.ts +4 -3
  15. package/dist/alias/module-name-mapper.d.ts.map +1 -1
  16. package/dist/alias/module-name-mapper.js +6 -4
  17. package/dist/alias/module-name-mapper.js.map +1 -1
  18. package/dist/alias/specifier-of.d.ts +7 -0
  19. package/dist/alias/specifier-of.d.ts.map +1 -0
  20. package/dist/alias/specifier-of.js +17 -0
  21. package/dist/alias/specifier-of.js.map +1 -0
  22. package/dist/alias/specifier-suffix.d.ts +6 -0
  23. package/dist/alias/specifier-suffix.d.ts.map +1 -0
  24. package/dist/alias/specifier-suffix.js +8 -0
  25. package/dist/alias/specifier-suffix.js.map +1 -0
  26. package/dist/alias/to-alias.d.ts +3 -2
  27. package/dist/alias/to-alias.d.ts.map +1 -1
  28. package/dist/alias/to-alias.js +4 -3
  29. package/dist/alias/to-alias.js.map +1 -1
  30. package/dist/build/emitted-place.d.ts +2 -0
  31. package/dist/build/emitted-place.d.ts.map +1 -1
  32. package/dist/build/emitted-specifier.d.ts +3 -2
  33. package/dist/build/emitted-specifier.d.ts.map +1 -1
  34. package/dist/build/emitted-specifier.js +6 -12
  35. package/dist/build/emitted-specifier.js.map +1 -1
  36. package/dist/build/emitted-target.d.ts +9 -0
  37. package/dist/build/emitted-target.d.ts.map +1 -0
  38. package/dist/build/emitted-target.js +18 -0
  39. package/dist/build/emitted-target.js.map +1 -0
  40. package/dist/build/rewrite-aliases.d.ts +5 -3
  41. package/dist/build/rewrite-aliases.d.ts.map +1 -1
  42. package/dist/build/rewrite-aliases.js +12 -7
  43. package/dist/build/rewrite-aliases.js.map +1 -1
  44. package/dist/build/rewrite-specifiers.d.ts +3 -1
  45. package/dist/build/rewrite-specifiers.d.ts.map +1 -1
  46. package/dist/build/rewrite-specifiers.js +2 -2
  47. package/dist/build/rewrite-specifiers.js.map +1 -1
  48. package/dist/build/unresolved-problem.d.ts +4 -0
  49. package/dist/build/unresolved-problem.d.ts.map +1 -0
  50. package/dist/build/unresolved-problem.js +16 -0
  51. package/dist/build/unresolved-problem.js.map +1 -0
  52. package/dist/check/alias/compiler-resolution.d.ts +10 -0
  53. package/dist/check/alias/compiler-resolution.d.ts.map +1 -0
  54. package/dist/check/alias/compiler-resolution.js +47 -0
  55. package/dist/check/alias/compiler-resolution.js.map +1 -0
  56. package/dist/check/alias/test-runners.js +4 -4
  57. package/dist/check/alias/test-runners.js.map +1 -1
  58. package/dist/check/canonical/roles.d.ts.map +1 -1
  59. package/dist/check/canonical/roles.js +6 -0
  60. package/dist/check/canonical/roles.js.map +1 -1
  61. package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
  62. package/dist/check/catalogue/architecture-rules.js +4 -0
  63. package/dist/check/catalogue/architecture-rules.js.map +1 -1
  64. package/dist/check/configuration/config-inspection.d.ts +2 -0
  65. package/dist/check/configuration/config-inspection.d.ts.map +1 -1
  66. package/dist/check/configuration/config-inspection.js +11 -1
  67. package/dist/check/configuration/config-inspection.js.map +1 -1
  68. package/dist/check/declarations/classes-of.js +1 -1
  69. package/dist/check/declarations/classes-of.js.map +1 -1
  70. package/dist/check/explain/context-docs.js +7 -7
  71. package/dist/check/explain/context-docs.js.map +1 -1
  72. package/dist/check/explain/imports-docs.d.ts.map +1 -1
  73. package/dist/check/explain/imports-docs.js +24 -9
  74. package/dist/check/explain/imports-docs.js.map +1 -1
  75. package/dist/check/explain/layer-docs.js +7 -7
  76. package/dist/check/explain/layer-docs.js.map +1 -1
  77. package/dist/check/explain/ports-docs.d.ts.map +1 -1
  78. package/dist/check/explain/ports-docs.js +15 -7
  79. package/dist/check/explain/ports-docs.js.map +1 -1
  80. package/dist/check/explain/scheduling-docs.js +1 -1
  81. package/dist/check/explain/wiring-docs.d.ts.map +1 -1
  82. package/dist/check/explain/wiring-docs.js +35 -10
  83. package/dist/check/explain/wiring-docs.js.map +1 -1
  84. package/dist/check/fixtures/alias-declared-fixtures.d.ts.map +1 -1
  85. package/dist/check/fixtures/alias-declared-fixtures.js +32 -1
  86. package/dist/check/fixtures/alias-declared-fixtures.js.map +1 -1
  87. package/dist/check/fixtures/config-fixtures.d.ts.map +1 -1
  88. package/dist/check/fixtures/config-fixtures.js +6 -0
  89. package/dist/check/fixtures/config-fixtures.js.map +1 -1
  90. package/dist/check/fixtures/constructor-injection-fixtures.d.ts +3 -0
  91. package/dist/check/fixtures/constructor-injection-fixtures.d.ts.map +1 -0
  92. package/dist/check/fixtures/constructor-injection-fixtures.js +111 -0
  93. package/dist/check/fixtures/constructor-injection-fixtures.js.map +1 -0
  94. package/dist/check/fixtures/declared-project.d.ts.map +1 -1
  95. package/dist/check/fixtures/declared-project.js +4 -1
  96. package/dist/check/fixtures/declared-project.js.map +1 -1
  97. package/dist/check/fixtures/extension-fixtures.d.ts +3 -0
  98. package/dist/check/fixtures/extension-fixtures.d.ts.map +1 -0
  99. package/dist/check/fixtures/extension-fixtures.js +77 -0
  100. package/dist/check/fixtures/extension-fixtures.js.map +1 -0
  101. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  102. package/dist/check/fixtures/fixtures.js +4 -0
  103. package/dist/check/fixtures/fixtures.js.map +1 -1
  104. package/dist/check/fixtures/signature-project.d.ts +11 -0
  105. package/dist/check/fixtures/signature-project.d.ts.map +1 -0
  106. package/dist/check/fixtures/signature-project.js +21 -0
  107. package/dist/check/fixtures/signature-project.js.map +1 -0
  108. package/dist/check/fixtures/signature.d.ts +13 -0
  109. package/dist/check/fixtures/signature.d.ts.map +1 -0
  110. package/dist/check/fixtures/signature.js +24 -0
  111. package/dist/check/fixtures/signature.js.map +1 -0
  112. package/dist/check/project/beside-the-sources.d.ts +5 -0
  113. package/dist/check/project/beside-the-sources.d.ts.map +1 -0
  114. package/dist/check/project/beside-the-sources.js +21 -0
  115. package/dist/check/project/beside-the-sources.js.map +1 -0
  116. package/dist/check/project/resolve-import.d.ts.map +1 -1
  117. package/dist/check/project/resolve-import.js +4 -1
  118. package/dist/check/project/resolve-import.js.map +1 -1
  119. package/dist/check/rules/clean-one-export-per-file.d.ts.map +1 -1
  120. package/dist/check/rules/clean-one-export-per-file.js +14 -8
  121. package/dist/check/rules/clean-one-export-per-file.js.map +1 -1
  122. package/dist/check/rules/config-valid.d.ts.map +1 -1
  123. package/dist/check/rules/config-valid.js +2 -1
  124. package/dist/check/rules/config-valid.js.map +1 -1
  125. package/dist/check/rules/declarations-barrel-current.d.ts.map +1 -1
  126. package/dist/check/rules/declarations-barrel-current.js +34 -32
  127. package/dist/check/rules/declarations-barrel-current.js.map +1 -1
  128. package/dist/check/rules/declarations-constructor-injection.d.ts +3 -0
  129. package/dist/check/rules/declarations-constructor-injection.d.ts.map +1 -0
  130. package/dist/check/rules/declarations-constructor-injection.js +58 -0
  131. package/dist/check/rules/declarations-constructor-injection.js.map +1 -0
  132. package/dist/check/rules/imports-alias-declared.d.ts.map +1 -1
  133. package/dist/check/rules/imports-alias-declared.js +3 -1
  134. package/dist/check/rules/imports-alias-declared.js.map +1 -1
  135. package/dist/check/rules/imports-alias-only.d.ts.map +1 -1
  136. package/dist/check/rules/imports-alias-only.js +16 -29
  137. package/dist/check/rules/imports-alias-only.js.map +1 -1
  138. package/dist/check/rules/imports-extension.d.ts +3 -0
  139. package/dist/check/rules/imports-extension.d.ts.map +1 -0
  140. package/dist/check/rules/imports-extension.js +65 -0
  141. package/dist/check/rules/imports-extension.js.map +1 -0
  142. package/dist/check/rules/ports-no-concrete-dependency.d.ts.map +1 -1
  143. package/dist/check/rules/ports-no-concrete-dependency.js +43 -15
  144. package/dist/check/rules/ports-no-concrete-dependency.js.map +1 -1
  145. package/dist/check/rules/tree-closed.js +6 -4
  146. package/dist/check/rules/tree-closed.js.map +1 -1
  147. package/dist/commands/build-aliases.d.ts.map +1 -1
  148. package/dist/commands/build-aliases.js +5 -3
  149. package/dist/commands/build-aliases.js.map +1 -1
  150. package/dist/commands/docs.d.ts.map +1 -1
  151. package/dist/commands/docs.js +17 -2
  152. package/dist/commands/docs.js.map +1 -1
  153. package/dist/commands/init.d.ts.map +1 -1
  154. package/dist/commands/init.js +5 -4
  155. package/dist/commands/init.js.map +1 -1
  156. package/dist/commit/is-derived.d.ts.map +1 -1
  157. package/dist/commit/is-derived.js +5 -2
  158. package/dist/commit/is-derived.js.map +1 -1
  159. package/dist/config/config.d.ts +2 -0
  160. package/dist/config/config.d.ts.map +1 -1
  161. package/dist/config/default-import-extension.d.ts +3 -0
  162. package/dist/config/default-import-extension.d.ts.map +1 -0
  163. package/dist/config/default-import-extension.js +3 -0
  164. package/dist/config/default-import-extension.js.map +1 -0
  165. package/dist/config/import-extensions.d.ts +3 -0
  166. package/dist/config/import-extensions.d.ts.map +1 -0
  167. package/dist/config/import-extensions.js +3 -0
  168. package/dist/config/import-extensions.js.map +1 -0
  169. package/dist/config/index.d.ts +4 -1
  170. package/dist/config/index.d.ts.map +1 -1
  171. package/dist/config/index.js +4 -1
  172. package/dist/config/index.js.map +1 -1
  173. package/dist/config/parse-config.d.ts.map +1 -1
  174. package/dist/config/parse-config.js +2 -0
  175. package/dist/config/parse-config.js.map +1 -1
  176. package/dist/config/parse-stack.d.ts.map +1 -1
  177. package/dist/config/parse-stack.js +2 -1
  178. package/dist/config/parse-stack.js.map +1 -1
  179. package/dist/config/restack-config-text.d.ts +11 -0
  180. package/dist/config/restack-config-text.d.ts.map +1 -0
  181. package/dist/config/restack-config-text.js +31 -0
  182. package/dist/config/restack-config-text.js.map +1 -0
  183. package/dist/config/serialize-config.d.ts.map +1 -1
  184. package/dist/config/serialize-config.js +3 -6
  185. package/dist/config/serialize-config.js.map +1 -1
  186. package/dist/config/stack.d.ts +8 -0
  187. package/dist/config/stack.d.ts.map +1 -1
  188. package/dist/config/stack.js +1 -0
  189. package/dist/config/stack.js.map +1 -1
  190. package/dist/config/unwritten-import-extension.d.ts +3 -0
  191. package/dist/config/unwritten-import-extension.d.ts.map +1 -0
  192. package/dist/config/unwritten-import-extension.js +3 -0
  193. package/dist/config/unwritten-import-extension.js.map +1 -0
  194. package/dist/config/written-stack.d.ts +8 -0
  195. package/dist/config/written-stack.d.ts.map +1 -0
  196. package/dist/config/written-stack.js +10 -0
  197. package/dist/config/written-stack.js.map +1 -0
  198. package/dist/declared/declared-role.d.ts.map +1 -1
  199. package/dist/declared/declared-role.js +1 -0
  200. package/dist/declared/declared-role.js.map +1 -1
  201. package/dist/declared/dependencies-file.d.ts +7 -0
  202. package/dist/declared/dependencies-file.d.ts.map +1 -0
  203. package/dist/declared/dependencies-file.js +9 -0
  204. package/dist/declared/dependencies-file.js.map +1 -0
  205. package/dist/declared/generated-drift.d.ts +7 -0
  206. package/dist/declared/generated-drift.d.ts.map +1 -0
  207. package/dist/declared/generated-drift.js +47 -0
  208. package/dist/declared/generated-drift.js.map +1 -0
  209. package/dist/declared/index.d.ts +8 -1
  210. package/dist/declared/index.d.ts.map +1 -1
  211. package/dist/declared/index.js +6 -1
  212. package/dist/declared/index.js.map +1 -1
  213. package/dist/declared/injection/class-injection.d.ts +19 -0
  214. package/dist/declared/injection/class-injection.d.ts.map +1 -0
  215. package/dist/declared/injection/class-injection.js +2 -0
  216. package/dist/declared/injection/class-injection.js.map +1 -0
  217. package/dist/declared/injection/constructor-of.d.ts +16 -0
  218. package/dist/declared/injection/constructor-of.d.ts.map +1 -0
  219. package/dist/declared/injection/constructor-of.js +33 -0
  220. package/dist/declared/injection/constructor-of.js.map +1 -0
  221. package/dist/declared/injection/context-injections.d.ts +8 -0
  222. package/dist/declared/injection/context-injections.d.ts.map +1 -0
  223. package/dist/declared/injection/context-injections.js +14 -0
  224. package/dist/declared/injection/context-injections.js.map +1 -0
  225. package/dist/declared/injection/declared-kind-of.d.ts +8 -0
  226. package/dist/declared/injection/declared-kind-of.d.ts.map +1 -0
  227. package/dist/declared/injection/declared-kind-of.js +12 -0
  228. package/dist/declared/injection/declared-kind-of.js.map +1 -0
  229. package/dist/declared/injection/exported-name-of.d.ts +4 -0
  230. package/dist/declared/injection/exported-name-of.d.ts.map +1 -0
  231. package/dist/declared/injection/exported-name-of.js +17 -0
  232. package/dist/declared/injection/exported-name-of.js.map +1 -0
  233. package/dist/declared/injection/language-types.d.ts +3 -0
  234. package/dist/declared/injection/language-types.d.ts.map +1 -0
  235. package/dist/declared/injection/language-types.js +32 -0
  236. package/dist/declared/injection/language-types.js.map +1 -0
  237. package/dist/declared/injection/local-names.d.ts +17 -0
  238. package/dist/declared/injection/local-names.d.ts.map +1 -0
  239. package/dist/declared/injection/local-names.js +41 -0
  240. package/dist/declared/injection/local-names.js.map +1 -0
  241. package/dist/declared/injection/parameter-shape.d.ts +11 -0
  242. package/dist/declared/injection/parameter-shape.d.ts.map +1 -0
  243. package/dist/declared/injection/parameter-shape.js +58 -0
  244. package/dist/declared/injection/parameter-shape.js.map +1 -0
  245. package/dist/declared/injection/raw-class-name.d.ts +7 -0
  246. package/dist/declared/injection/raw-class-name.d.ts.map +1 -0
  247. package/dist/declared/injection/raw-class-name.js +28 -0
  248. package/dist/declared/injection/raw-class-name.js.map +1 -0
  249. package/dist/declared/injection/read-constructor.d.ts +10 -0
  250. package/dist/declared/injection/read-constructor.d.ts.map +1 -0
  251. package/dist/declared/injection/read-constructor.js +2 -0
  252. package/dist/declared/injection/read-constructor.js.map +1 -0
  253. package/dist/declared/injection/read-injections.d.ts +6 -0
  254. package/dist/declared/injection/read-injections.d.ts.map +1 -0
  255. package/dist/declared/injection/read-injections.js +75 -0
  256. package/dist/declared/injection/read-injections.js.map +1 -0
  257. package/dist/declared/injection/render-injections.d.ts +11 -0
  258. package/dist/declared/injection/render-injections.d.ts.map +1 -0
  259. package/dist/declared/injection/render-injections.js +51 -0
  260. package/dist/declared/injection/render-injections.js.map +1 -0
  261. package/dist/declared/injection/rendered-injections.d.ts +8 -0
  262. package/dist/declared/injection/rendered-injections.d.ts.map +1 -0
  263. package/dist/declared/injection/rendered-injections.js +2 -0
  264. package/dist/declared/injection/rendered-injections.js.map +1 -0
  265. package/dist/declared/injection/resolve-token.d.ts +18 -0
  266. package/dist/declared/injection/resolve-token.d.ts.map +1 -0
  267. package/dist/declared/injection/resolve-token.js +46 -0
  268. package/dist/declared/injection/resolve-token.js.map +1 -0
  269. package/dist/declared/injection/resolved-token.d.ts +10 -0
  270. package/dist/declared/injection/resolved-token.d.ts.map +1 -0
  271. package/dist/declared/injection/resolved-token.js +2 -0
  272. package/dist/declared/injection/resolved-token.js.map +1 -0
  273. package/dist/declared/injection/sources.d.ts +4 -0
  274. package/dist/declared/injection/sources.d.ts.map +1 -0
  275. package/dist/declared/injection/sources.js +2 -0
  276. package/dist/declared/injection/sources.js.map +1 -0
  277. package/dist/declared/injection/token-reference.d.ts +14 -0
  278. package/dist/declared/injection/token-reference.d.ts.map +1 -0
  279. package/dist/declared/injection/token-reference.js +2 -0
  280. package/dist/declared/injection/token-reference.js.map +1 -0
  281. package/dist/declared/render-barrel.d.ts +8 -5
  282. package/dist/declared/render-barrel.d.ts.map +1 -1
  283. package/dist/declared/render-barrel.js +13 -6
  284. package/dist/declared/render-barrel.js.map +1 -1
  285. package/dist/declared/render-dependencies-file.d.ts +8 -0
  286. package/dist/declared/render-dependencies-file.d.ts.map +1 -0
  287. package/dist/declared/render-dependencies-file.js +12 -0
  288. package/dist/declared/render-dependencies-file.js.map +1 -0
  289. package/dist/depcruise/hygiene-rules.js +2 -1
  290. package/dist/depcruise/hygiene-rules.js.map +1 -1
  291. package/dist/describe/context-description.d.ts +10 -0
  292. package/dist/describe/context-description.d.ts.map +1 -1
  293. package/dist/describe/describe-context.d.ts.map +1 -1
  294. package/dist/describe/describe-context.js +2 -0
  295. package/dist/describe/describe-context.js.map +1 -1
  296. package/dist/describe/format-description.d.ts.map +1 -1
  297. package/dist/describe/format-description.js +4 -0
  298. package/dist/describe/format-description.js.map +1 -1
  299. package/dist/describe/read-projections.d.ts +5 -0
  300. package/dist/describe/read-projections.d.ts.map +1 -0
  301. package/dist/describe/read-projections.js +19 -0
  302. package/dist/describe/read-projections.js.map +1 -0
  303. package/dist/describe/reference-lines.js +9 -0
  304. package/dist/describe/reference-lines.js.map +1 -1
  305. package/dist/dev/refresh-declarations.d.ts +9 -0
  306. package/dist/dev/refresh-declarations.d.ts.map +1 -0
  307. package/dist/dev/refresh-declarations.js +28 -0
  308. package/dist/dev/refresh-declarations.js.map +1 -0
  309. package/dist/generate/access-vars.js +3 -3
  310. package/dist/generate/access-vars.js.map +1 -1
  311. package/dist/generate/kinds/context-plan.d.ts +10 -0
  312. package/dist/generate/kinds/context-plan.d.ts.map +1 -0
  313. package/dist/generate/kinds/context-plan.js +2 -0
  314. package/dist/generate/kinds/context-plan.js.map +1 -0
  315. package/dist/generate/kinds/declare-context-entries.d.ts +3 -1
  316. package/dist/generate/kinds/declare-context-entries.d.ts.map +1 -1
  317. package/dist/generate/kinds/declare-context-entries.js +4 -2
  318. package/dist/generate/kinds/declare-context-entries.js.map +1 -1
  319. package/dist/generate/kinds/extraction/service-selection.js +8 -11
  320. package/dist/generate/kinds/extraction/service-selection.js.map +1 -1
  321. package/dist/generate/kinds/job/job-vars.d.ts.map +1 -1
  322. package/dist/generate/kinds/job/job-vars.js +5 -3
  323. package/dist/generate/kinds/job/job-vars.js.map +1 -1
  324. package/dist/generate/kinds/plan-vars.d.ts +5 -0
  325. package/dist/generate/kinds/plan-vars.d.ts.map +1 -0
  326. package/dist/generate/kinds/plan-vars.js +24 -0
  327. package/dist/generate/kinds/plan-vars.js.map +1 -0
  328. package/dist/generate/kinds/projection-kind.d.ts +3 -0
  329. package/dist/generate/kinds/projection-kind.d.ts.map +1 -0
  330. package/dist/generate/kinds/projection-kind.js +72 -0
  331. package/dist/generate/kinds/projection-kind.js.map +1 -0
  332. package/dist/generate/kinds/publish-in-index.js +2 -2
  333. package/dist/generate/kinds/publish-in-index.js.map +1 -1
  334. package/dist/generate/kinds/route/route-vars.d.ts.map +1 -1
  335. package/dist/generate/kinds/route/route-vars.js +7 -6
  336. package/dist/generate/kinds/route/route-vars.js.map +1 -1
  337. package/dist/generate/kinds/wire-context.d.ts +10 -0
  338. package/dist/generate/kinds/wire-context.d.ts.map +1 -0
  339. package/dist/generate/kinds/wire-context.js +36 -0
  340. package/dist/generate/kinds/wire-context.js.map +1 -0
  341. package/dist/generate/kinds/write-context-files.d.ts +1 -8
  342. package/dist/generate/kinds/write-context-files.d.ts.map +1 -1
  343. package/dist/generate/kinds/write-context-files.js +3 -40
  344. package/dist/generate/kinds/write-context-files.js.map +1 -1
  345. package/dist/generate/kinds.d.ts.map +1 -1
  346. package/dist/generate/kinds.js +2 -0
  347. package/dist/generate/kinds.js.map +1 -1
  348. package/dist/generate/refresh-barrels.d.ts +4 -3
  349. package/dist/generate/refresh-barrels.d.ts.map +1 -1
  350. package/dist/generate/refresh-barrels.js +41 -16
  351. package/dist/generate/refresh-barrels.js.map +1 -1
  352. package/dist/generate/spec-vars.js +4 -4
  353. package/dist/generate/spec-vars.js.map +1 -1
  354. package/dist/generate/storage-vars.d.ts +2 -2
  355. package/dist/generate/storage-vars.d.ts.map +1 -1
  356. package/dist/generate/storage-vars.js +6 -10
  357. package/dist/generate/storage-vars.js.map +1 -1
  358. package/dist/generate/workspace-sources.d.ts +6 -0
  359. package/dist/generate/workspace-sources.d.ts.map +1 -0
  360. package/dist/generate/workspace-sources.js +13 -0
  361. package/dist/generate/workspace-sources.js.map +1 -0
  362. package/dist/init/manifest/scripts-for.js +6 -1
  363. package/dist/init/manifest/scripts-for.js.map +1 -1
  364. package/dist/init/manifest/versions.js +23 -23
  365. package/dist/init/run-init.d.ts.map +1 -1
  366. package/dist/init/run-init.js +32 -3
  367. package/dist/init/run-init.js.map +1 -1
  368. package/dist/init/stack/recorded-options.d.ts +11 -0
  369. package/dist/init/stack/recorded-options.d.ts.map +1 -0
  370. package/dist/init/stack/recorded-options.js +19 -0
  371. package/dist/init/stack/recorded-options.js.map +1 -0
  372. package/dist/init/stack/resolve-stack.d.ts +6 -1
  373. package/dist/init/stack/resolve-stack.d.ts.map +1 -1
  374. package/dist/init/stack/resolve-stack.js +46 -9
  375. package/dist/init/stack/resolve-stack.js.map +1 -1
  376. package/dist/init/stack/resolve-style.d.ts +3 -5
  377. package/dist/init/stack/resolve-style.d.ts.map +1 -1
  378. package/dist/init/stack/resolve-style.js +11 -3
  379. package/dist/init/stack/resolve-style.js.map +1 -1
  380. package/dist/init/stack/stack-options.d.ts +3 -0
  381. package/dist/init/stack/stack-options.d.ts.map +1 -1
  382. package/dist/init/write-agent-settings.js +4 -3
  383. package/dist/init/write-agent-settings.js.map +1 -1
  384. package/dist/init/write-type-script-configs.d.ts +2 -1
  385. package/dist/init/write-type-script-configs.d.ts.map +1 -1
  386. package/dist/init/write-type-script-configs.js +4 -4
  387. package/dist/init/write-type-script-configs.js.map +1 -1
  388. package/dist/refresh-declarations.d.ts +3 -0
  389. package/dist/refresh-declarations.d.ts.map +1 -0
  390. package/dist/refresh-declarations.js +4 -0
  391. package/dist/refresh-declarations.js.map +1 -0
  392. package/dist/run.d.ts.map +1 -1
  393. package/dist/run.js +2 -0
  394. package/dist/run.js.map +1 -1
  395. package/dist/stack/alias-vars.d.ts +2 -1
  396. package/dist/stack/alias-vars.d.ts.map +1 -1
  397. package/dist/stack/alias-vars.js +6 -3
  398. package/dist/stack/alias-vars.js.map +1 -1
  399. package/dist/version.d.ts +1 -1
  400. package/dist/version.js +1 -1
  401. package/package.json +4 -3
  402. package/templates/acl/translator.spec.ts.tpl +1 -1
  403. package/templates/adapter/adapter.declared.ts.tpl +3 -3
  404. package/templates/adapter/adapter.spec.ts.tpl +1 -1
  405. package/templates/adapter/adapter.ts.tpl +1 -1
  406. package/templates/adapter/wiring.tsyringe.tpl +3 -3
  407. package/templates/aggregate/aggregate.spec.ts.tpl +2 -2
  408. package/templates/architecture/extractable.declared.spec.ts.tpl +1 -1
  409. package/templates/architecture/extractable.manual.spec.ts.tpl +4 -4
  410. package/templates/architecture/extractable.tsyringe.spec.ts.tpl +1 -1
  411. package/templates/architecture/wiring.declared.tpl +1 -1
  412. package/templates/architecture/wiring.manual.tpl +1 -1
  413. package/templates/architecture/wiring.tsyringe.tpl +1 -1
  414. package/templates/builder/builder.ts.tpl +1 -1
  415. package/templates/command/handler.declared.ts.tpl +7 -7
  416. package/templates/command/handler.spec.buses.ts.tpl +4 -4
  417. package/templates/command/handler.spec.tsyringe.ts.tpl +5 -5
  418. package/templates/command/handler.ts.tpl +4 -4
  419. package/templates/command/wiring.manual.tpl +2 -2
  420. package/templates/command/wiring.tsyringe.tpl +3 -3
  421. package/templates/context/module.manual.ts.tpl +1 -1
  422. package/templates/context/permission-set.tpl +1 -1
  423. package/templates/context/permissions.spec.ts.tpl +1 -1
  424. package/templates/context/routes.spec.ts.tpl +1 -1
  425. package/templates/context/wiring.declared.tpl +2 -2
  426. package/templates/context/wiring.manual.tpl +1 -1
  427. package/templates/context/wiring.tsyringe.tpl +2 -2
  428. package/templates/domain-error/domain-error.spec.ts.tpl +1 -1
  429. package/templates/domain-event/domain-event.spec.ts.tpl +1 -1
  430. package/templates/domain-service/domain-service.spec.ts.tpl +1 -1
  431. package/templates/e2e/e2e.spec.ts.tpl +2 -2
  432. package/templates/entity/entity.spec.ts.tpl +1 -1
  433. package/templates/event-handler/event-handler.declared.ts.tpl +3 -3
  434. package/templates/event-handler/event-handler.spec.ts.tpl +2 -2
  435. package/templates/event-handler/event-handler.ts.tpl +1 -1
  436. package/templates/event-handler/wiring.manual.tpl +2 -2
  437. package/templates/event-handler/wiring.tsyringe.tpl +2 -2
  438. package/templates/gateway/adapter.declared.ts.tpl +3 -3
  439. package/templates/gateway/adapter.ts.tpl +2 -2
  440. package/templates/gateway/contract.spec.ts.tpl +3 -3
  441. package/templates/gateway/fake.ts.tpl +1 -1
  442. package/templates/gateway/platform-test.declared.tpl +1 -1
  443. package/templates/gateway/platform.declared.tpl +1 -1
  444. package/templates/gateway/wiring.tsyringe.tpl +3 -3
  445. package/templates/init/CLAUDE.md.tpl +5 -2
  446. package/templates/init/README.md.tpl +15 -10
  447. package/templates/init/e2e/create-credentials.jwt.ts.tpl +1 -1
  448. package/templates/init/e2e/create-credentials.keycloak.ts.tpl +1 -1
  449. package/templates/init/e2e/create-credentials.none.ts.tpl +2 -2
  450. package/templates/init/e2e/start-application.database.ts.tpl +16 -16
  451. package/templates/init/e2e/start-application.memory.ts.tpl +16 -16
  452. package/templates/init/e2e/test-environment.ts.tpl +1 -1
  453. package/templates/init/main.ts.tpl +11 -11
  454. package/templates/init/platform/audit/audit.module.manual.ts.tpl +5 -5
  455. package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +4 -4
  456. package/templates/init/platform/audit/create-audit.ts.tpl +5 -5
  457. package/templates/init/platform/audit/search-audit-entries.handler.ts.tpl +1 -1
  458. package/templates/init/platform/audit/search-audit-entries.route.ts.tpl +1 -1
  459. package/templates/init/platform/auth/authorization.tsyringe.ts.tpl +2 -2
  460. package/templates/init/platform/auth/create-authenticator.jwt.ts.tpl +1 -1
  461. package/templates/init/platform/auth/create-authenticator.keycloak.ts.tpl +1 -1
  462. package/templates/init/platform/auth/create-authenticator.none.ts.tpl +2 -2
  463. package/templates/init/platform/auth/create-authorizer.abac.ts.tpl +1 -1
  464. package/templates/init/platform/auth/create-authorizer.custom.ts.tpl +2 -2
  465. package/templates/init/platform/auth/create-authorizer.rbac.ts.tpl +1 -1
  466. package/templates/init/platform/auth/create-authorizer.rebac.ts.tpl +3 -3
  467. package/templates/init/platform/auth/create-tuple-store.contract.spec.ts.tpl +1 -1
  468. package/templates/init/platform/auth/custom-authorizer.contract.spec.ts.tpl +1 -1
  469. package/templates/init/platform/auth/http-boundary.ts.tpl +1 -1
  470. package/templates/init/platform/auth/permission-mapping.ts.tpl +1 -1
  471. package/templates/init/platform/auth/permissions.ts.tpl +1 -1
  472. package/templates/init/platform/auth/principal-of.none.ts.tpl +1 -1
  473. package/templates/init/platform/auth/relate-system-actors.ts.tpl +1 -1
  474. package/templates/init/platform/auth/relation-tuples.ts.tpl +2 -2
  475. package/templates/init/platform/auth/security-schemes.none.ts.tpl +1 -1
  476. package/templates/init/platform/buses/create-command-bus.ts.tpl +2 -2
  477. package/templates/init/platform/buses/create-query-bus.ts.tpl +1 -1
  478. package/templates/init/platform/compose-application.manual.ts.tpl +6 -6
  479. package/templates/init/platform/compose-application.tsyringe.ts.tpl +10 -10
  480. package/templates/init/platform/config/app-config.ts.tpl +2 -2
  481. package/templates/init/platform/config/load-config.ts.tpl +3 -3
  482. package/templates/init/platform/create-platform.manual.ts.tpl +16 -16
  483. package/templates/init/platform/database/create-client.prisma.ts.tpl +1 -1
  484. package/templates/init/platform/database/create-data-source.typeorm.ts.tpl +1 -1
  485. package/templates/init/platform/database/data-source.typeorm.ts.tpl +1 -1
  486. package/templates/init/platform/database/database.drizzle.ts.tpl +1 -1
  487. package/templates/init/platform/database/database.prisma.ts.tpl +2 -2
  488. package/templates/init/platform/database/inert-persistence.memory.ts.tpl +2 -2
  489. package/templates/init/platform/database/inert-persistence.pooled.ts.tpl +2 -2
  490. package/templates/init/platform/database/inert-persistence.prisma.ts.tpl +3 -3
  491. package/templates/init/platform/database/inert-persistence.typeorm.ts.tpl +3 -3
  492. package/templates/init/platform/database/open-persistence.contract.spec.ts.tpl +1 -1
  493. package/templates/init/platform/database/open-persistence.memory.ts.tpl +1 -1
  494. package/templates/init/platform/database/open-persistence.pooled.ts.tpl +3 -3
  495. package/templates/init/platform/database/open-persistence.prisma.ts.tpl +3 -3
  496. package/templates/init/platform/database/open-persistence.typeorm.ts.tpl +3 -3
  497. package/templates/init/platform/database/open-test-database.drizzle.ts.tpl +4 -4
  498. package/templates/init/platform/database/open-test-database.knex.ts.tpl +5 -5
  499. package/templates/init/platform/database/open-test-database.prisma.ts.tpl +4 -4
  500. package/templates/init/platform/database/open-test-database.typeorm.ts.tpl +3 -3
  501. package/templates/init/platform/database/persistence-over.drizzle.ts.tpl +2 -2
  502. package/templates/init/platform/database/persistence-over.knex.ts.tpl +2 -2
  503. package/templates/init/platform/database/persistence-over.prisma.ts.tpl +2 -2
  504. package/templates/init/platform/database/persistence-over.typeorm.ts.tpl +2 -2
  505. package/templates/init/platform/database/persistence.orm.ts.tpl +1 -1
  506. package/templates/init/platform/errors.ts.tpl +1 -1
  507. package/templates/init/platform/events/create-event-provider.custom.ts.tpl +2 -2
  508. package/templates/init/platform/events/create-event-provider.kafka.ts.tpl +3 -3
  509. package/templates/init/platform/events/create-event-provider.nats.ts.tpl +2 -2
  510. package/templates/init/platform/events/create-event-provider.rabbitmq.ts.tpl +2 -2
  511. package/templates/init/platform/events/create-event-provider.redis.ts.tpl +2 -2
  512. package/templates/init/platform/events/custom-event-bus.contract.spec.ts.tpl +1 -1
  513. package/templates/init/platform/events/in-process-events.ts.tpl +1 -1
  514. package/templates/init/platform/events/start-outbox-relay.ts.tpl +1 -1
  515. package/templates/init/platform/http/create-app-module.ts.tpl +1 -1
  516. package/templates/init/platform/http/start-http-server.express.ts.tpl +4 -4
  517. package/templates/init/platform/http/start-http-server.fastify.ts.tpl +4 -4
  518. package/templates/init/platform/http/start-http-server.nest.ts.tpl +5 -5
  519. package/templates/init/platform/http/with-documentation.ts.tpl +2 -2
  520. package/templates/init/platform/lay-foundations.tsyringe.ts.tpl +5 -5
  521. package/templates/init/platform/platform-test.module.tsyringe.ts.tpl +1 -1
  522. package/templates/init/platform/platform.manual.ts.tpl +3 -3
  523. package/templates/init/platform/platform.module.tsyringe.ts.tpl +8 -8
  524. package/templates/init/platform/resilience/adapter-aspects.ts.tpl +2 -2
  525. package/templates/init/platform/resilience/default-resilience.ts.tpl +1 -1
  526. package/templates/init/platform/resilience/own-policy.ts.tpl +1 -1
  527. package/templates/init/platform/tracing.ts.tpl +2 -2
  528. package/templates/init/rules/application.md.tpl +8 -2
  529. package/templates/init/rules/infrastructure.md.tpl +3 -3
  530. package/templates/init/scripts/openapi.ts.tpl +5 -5
  531. package/templates/integration-event/audited.tpl +1 -1
  532. package/templates/integration-event/integration-event.class-validator.ts.tpl +1 -1
  533. package/templates/integration-event/integration-event.custom.ts.tpl +1 -1
  534. package/templates/integration-event/publisher.declared.ts.tpl +4 -4
  535. package/templates/integration-event/publisher.spec.ts.tpl +2 -2
  536. package/templates/integration-event/publisher.ts.tpl +2 -2
  537. package/templates/integration-event/wiring.manual.tpl +2 -2
  538. package/templates/integration-event/wiring.tsyringe.tpl +2 -2
  539. package/templates/integration-handler/integration-handler.declared.ts.tpl +3 -3
  540. package/templates/integration-handler/integration-handler.spec.ts.tpl +2 -2
  541. package/templates/integration-handler/integration-handler.ts.tpl +1 -1
  542. package/templates/integration-handler/wiring.manual.tpl +3 -3
  543. package/templates/integration-handler/wiring.tsyringe.tpl +2 -2
  544. package/templates/job/job.declared.ts.tpl +3 -3
  545. package/templates/job/job.spec.buses.ts.tpl +2 -2
  546. package/templates/job/job.spec.tsyringe.ts.tpl +2 -2
  547. package/templates/job/job.ts.tpl +1 -1
  548. package/templates/job/wiring.manual.tpl +1 -1
  549. package/templates/job/wiring.tsyringe.tpl +1 -1
  550. package/templates/pipeline/package-scripts.json +1 -1
  551. package/templates/policy/policy.declared.ts.tpl +1 -1
  552. package/templates/policy/policy.spec.declared.ts.tpl +1 -1
  553. package/templates/policy/policy.spec.ts.tpl +1 -1
  554. package/templates/policy/policy.ts.tpl +1 -1
  555. package/templates/policy/registration.tpl +1 -1
  556. package/templates/port/fake.ts.tpl +1 -1
  557. package/templates/projection/projection.spec.ts.tpl +17 -0
  558. package/templates/projection/projection.ts.tpl +11 -0
  559. package/templates/query/handler.declared.ts.tpl +4 -4
  560. package/templates/query/handler.spec.buses.ts.tpl +5 -5
  561. package/templates/query/handler.spec.tsyringe.ts.tpl +6 -6
  562. package/templates/query/handler.ts.tpl +3 -3
  563. package/templates/query/query.ts.tpl +1 -1
  564. package/templates/query/reader.fake.ts.tpl +2 -2
  565. package/templates/query/reader.in-memory.ts.tpl +4 -4
  566. package/templates/query/reader.port.ts.tpl +2 -2
  567. package/templates/query/search.handler.declared.ts.tpl +6 -6
  568. package/templates/query/search.handler.spec.buses.ts.tpl +5 -5
  569. package/templates/query/search.handler.spec.tsyringe.ts.tpl +6 -6
  570. package/templates/query/search.handler.ts.tpl +4 -4
  571. package/templates/query/search.query.ts.tpl +1 -1
  572. package/templates/query/search.reader.fake.ts.tpl +2 -2
  573. package/templates/query/search.reader.in-memory.ts.tpl +3 -3
  574. package/templates/query/search.reader.port.ts.tpl +1 -1
  575. package/templates/query/search.reader.spec.ts.tpl +2 -2
  576. package/templates/query/search.wiring.manual.tpl +3 -3
  577. package/templates/query/search.wiring.tsyringe.tpl +4 -4
  578. package/templates/query/wiring.manual.tpl +3 -3
  579. package/templates/query/wiring.tsyringe.tpl +4 -4
  580. package/templates/repository/contract.spec.ts.tpl +5 -5
  581. package/templates/repository/drizzle/mapper.ts.tpl +2 -2
  582. package/templates/repository/drizzle/repository.ts.tpl +9 -17
  583. package/templates/repository/drizzle/schema-export.tpl +1 -1
  584. package/templates/repository/fake.ts.tpl +2 -2
  585. package/templates/repository/knex/mapper.ts.tpl +2 -2
  586. package/templates/repository/knex/repository.ts.tpl +10 -30
  587. package/templates/repository/knex/schema-export.tpl +1 -1
  588. package/templates/repository/knex/tables.ts.tpl +1 -1
  589. package/templates/repository/none/repository.ts.tpl +3 -3
  590. package/templates/repository/prisma/mapper.ts.tpl +2 -2
  591. package/templates/repository/prisma/repository.ts.tpl +6 -9
  592. package/templates/repository/repository.ts.tpl +1 -1
  593. package/templates/repository/typeorm/mapper.ts.tpl +2 -2
  594. package/templates/repository/typeorm/repository.ts.tpl +9 -12
  595. package/templates/repository/typeorm/schema-export.tpl +1 -1
  596. package/templates/repository/typeorm/table.tpl +1 -1
  597. package/templates/repository/wiring.manual.tpl +1 -1
  598. package/templates/repository/wiring.tsyringe.tpl +2 -2
  599. package/templates/route/route.search.ts.tpl +1 -1
  600. package/templates/route/route.spec.ts.tpl +1 -1
  601. package/templates/route/routes.on-tsyringe.tpl +1 -1
  602. package/templates/route/wiring.manual.tpl +1 -1
  603. package/templates/service/main.ts.tpl +11 -11
  604. package/templates/value-object/value-object.spec.ts.tpl +1 -1
  605. package/templates/worker/main.ts.tpl +9 -9
  606. package/dist/alias/platform-alias.d.ts +0 -4
  607. package/dist/alias/platform-alias.d.ts.map +0 -1
  608. package/dist/alias/platform-alias.js +0 -7
  609. package/dist/alias/platform-alias.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ import type { Finding } from '../../check/model/finding.js';
2
+ import type { TokenReference } from './token-reference.js';
3
+ /** What a declared class is given, read from its source: the list of its decorator, and its constructor. */
4
+ export interface ClassInjection {
5
+ readonly className: string;
6
+ /** The role file that declares the class, from the project root. */
7
+ readonly file: string;
8
+ /** Line of the declaration decorator. */
9
+ readonly line: number;
10
+ /** The names the decorator lists, when it carries a list: that list then wins over the signature. */
11
+ readonly listed: readonly string[] | undefined;
12
+ /** One token per constructor parameter, in order; undefined when the constructor could not be read as tokens. */
13
+ readonly dependencies: readonly TokenReference[] | undefined;
14
+ /** Why the constructor does not state the dependencies, each with the fix. */
15
+ readonly problems: readonly Finding[];
16
+ /** False when the class inherits its constructor from a class this project cannot read. */
17
+ readonly readable: boolean;
18
+ }
19
+ //# sourceMappingURL=class-injection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"class-injection.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/class-injection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,4GAA4G;AAC5G,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qGAAqG;IACrG,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAC/C,iHAAiH;IACjH,QAAQ,CAAC,YAAY,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,CAAC;IAC7D,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=class-injection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"class-injection.js","sourceRoot":"","sources":["../../../src/declared/injection/class-injection.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import type { SourceFile } from '../../check/model/source-file.js';
2
+ import type { ReadConstructor } from './read-constructor.js';
3
+ import type { Sources } from './sources.js';
4
+ interface Lookup {
5
+ readonly sources: Sources;
6
+ readonly file: SourceFile;
7
+ readonly className: string;
8
+ }
9
+ /**
10
+ * The constructor of the class `className` of `file`: the one it writes, or the one of the
11
+ * class it extends, followed through the imports as far as the project goes. Undefined when the
12
+ * chain leaves the project (a base class of a package): nothing here can read that constructor.
13
+ */
14
+ export declare function constructorOf(lookup: Lookup, depth?: number): ReadConstructor | undefined;
15
+ export {};
16
+ //# sourceMappingURL=constructor-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constructor-of.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/constructor-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAGnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,UAAU,MAAM;IACd,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAID;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,eAAe,GAAG,SAAS,CAqBpF"}
@@ -0,0 +1,33 @@
1
+ import { importedFrom } from '../../check/support/imported-from.js';
2
+ import { exportedNameOf } from './exported-name-of.js';
3
+ const DEEPEST = 8;
4
+ /**
5
+ * The constructor of the class `className` of `file`: the one it writes, or the one of the
6
+ * class it extends, followed through the imports as far as the project goes. Undefined when the
7
+ * chain leaves the project (a base class of a package): nothing here can read that constructor.
8
+ */
9
+ export function constructorOf(lookup, depth = 0) {
10
+ const { file, className } = lookup;
11
+ const shape = file.structure.classes.find((candidate) => candidate.name === className && candidate.depth === 0);
12
+ if (shape === undefined || depth > DEEPEST) {
13
+ return undefined;
14
+ }
15
+ const own = shape.methods.find((method) => method.isConstructor);
16
+ if (own !== undefined) {
17
+ return { file, line: own.line, parameters: own.parameters };
18
+ }
19
+ if (shape.superclass === undefined) {
20
+ return { file, line: shape.line, parameters: [] };
21
+ }
22
+ const base = baseOf(lookup, shape.superclass);
23
+ return base === undefined ? undefined : constructorOf(base, depth + 1);
24
+ }
25
+ function baseOf({ sources, file }, superclass) {
26
+ const target = importedFrom(file, superclass)?.target;
27
+ if (target === undefined) {
28
+ return { sources, file, className: superclass };
29
+ }
30
+ const source = target.kind === 'file' ? sources(target.path) : undefined;
31
+ return source === undefined ? undefined : { sources, file: source, className: exportedNameOf(file, superclass) };
32
+ }
33
+ //# sourceMappingURL=constructor-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constructor-of.js","sourceRoot":"","sources":["../../../src/declared/injection/constructor-of.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAUvD,MAAM,OAAO,GAAG,CAAC,CAAC;AAElB;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc,EAAE,KAAK,GAAG,CAAC;IACrD,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;IAEhH,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,GAAG,OAAO,EAAE,CAAC;QAC3C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAEjE,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC;IAC9D,CAAC;IAED,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;IACpD,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAE9C,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAS,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAU,EAAE,UAAkB;IAC3D,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAEtD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;IAClD,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEzE,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC;AACnH,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ClassInjection } from './class-injection.js';
2
+ import type { Sources } from './sources.js';
3
+ /**
4
+ * What every declared class of a context is given, in the order of its role files.
5
+ * `directory` is the context from the project root, `entries` its files relative to it.
6
+ */
7
+ export declare function contextInjections(sources: Sources, directory: string, entries: readonly string[]): ClassInjection[];
8
+ //# sourceMappingURL=context-injections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-injections.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/context-injections.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,cAAc,EAAE,CAMnH"}
@@ -0,0 +1,14 @@
1
+ import { declaredRoleOf } from '../declared-role-of.js';
2
+ import { readInjections } from './read-injections.js';
3
+ /**
4
+ * What every declared class of a context is given, in the order of its role files.
5
+ * `directory` is the context from the project root, `entries` its files relative to it.
6
+ */
7
+ export function contextInjections(sources, directory, entries) {
8
+ return [...new Set(entries)]
9
+ .filter((entry) => declaredRoleOf(entry) !== undefined)
10
+ .sort()
11
+ .flatMap((entry) => sources(`${directory}/${entry}`) ?? [])
12
+ .flatMap((file) => readInjections(sources, file));
13
+ }
14
+ //# sourceMappingURL=context-injections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-injections.js","sourceRoot":"","sources":["../../../src/declared/injection/context-injections.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAgB,EAAE,SAAiB,EAAE,OAA0B;IAC/F,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;SACzB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC;SACtD,IAAI,EAAE;SACN,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,SAAS,IAAI,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;SAC1D,OAAO,CAAC,CAAC,IAAgB,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AAClE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { SourceFile } from '../../check/model/source-file.js';
2
+ export interface DeclaredKind {
3
+ readonly kind: 'class' | 'interface' | 'type' | 'enum' | 'const' | 'function';
4
+ readonly exported: boolean;
5
+ }
6
+ /** What `file` declares under `name` at its top level, or undefined when it declares nothing by that name. */
7
+ export declare function declaredKindOf(file: SourceFile, name: string): DeclaredKind | undefined;
8
+ //# sourceMappingURL=declared-kind-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declared-kind-of.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/declared-kind-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAGnE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;IAC9E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED,8GAA8G;AAC9G,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CASvF"}
@@ -0,0 +1,12 @@
1
+ import { escapeRegExp } from '../../check/text/escape-reg-exp.js';
2
+ /** What `file` declares under `name` at its top level, or undefined when it declares nothing by that name. */
3
+ export function declaredKindOf(file, name) {
4
+ const declaration = new RegExp(`(?<![\\w$.])(export\\s+)?(?:default\\s+)?(?:declare\\s+)?(?:abstract\\s+)?(class|interface|type|enum|const|function)\\s+${escapeRegExp(name)}(?![\\w$])`);
5
+ const match = declaration.exec(file.scan.code);
6
+ const kind = match?.[2];
7
+ return isKind(kind) ? { kind, exported: match?.[1] !== undefined } : undefined;
8
+ }
9
+ function isKind(value) {
10
+ return value !== undefined && ['class', 'interface', 'type', 'enum', 'const', 'function'].includes(value);
11
+ }
12
+ //# sourceMappingURL=declared-kind-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declared-kind-of.js","sourceRoot":"","sources":["../../../src/declared/injection/declared-kind-of.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAOlE,8GAA8G;AAC9G,MAAM,UAAU,cAAc,CAAC,IAAgB,EAAE,IAAY;IAC3D,MAAM,WAAW,GAAG,IAAI,MAAM,CAC5B,2HAA2H,YAAY,CAAC,IAAI,CAAC,YAAY,CAC1J,CAAC;IAEF,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IAExB,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACjF,CAAC;AAED,SAAS,MAAM,CAAC,KAAyB;IACvC,OAAO,KAAK,KAAK,SAAS,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC5G,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { SourceFile } from '../../check/model/source-file.js';
2
+ /** The name a class is exported under by the module `file` imports it from: `Clock` for `import { Clock as Time }`. */
3
+ export declare function exportedNameOf(file: SourceFile, local: string): string;
4
+ //# sourceMappingURL=exported-name-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exported-name-of.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/exported-name-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAInE,uHAAuH;AACvH,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAetE"}
@@ -0,0 +1,17 @@
1
+ const NAMED_IMPORTS = /(?<![\w$.])import\s+(?:type\s+)?(?:[\w$]+\s*,\s*)?\{([^}]*)\}/g;
2
+ /** The name a class is exported under by the module `file` imports it from: `Clock` for `import { Clock as Time }`. */
3
+ export function exportedNameOf(file, local) {
4
+ for (const [, names = ''] of file.scan.code.matchAll(NAMED_IMPORTS)) {
5
+ for (const binding of names.split(',')) {
6
+ const [exported, renamed] = binding
7
+ .trim()
8
+ .replace(/^type\s+/, '')
9
+ .split(/\s+as\s+/);
10
+ if (renamed === local && exported !== undefined) {
11
+ return exported;
12
+ }
13
+ }
14
+ }
15
+ return local;
16
+ }
17
+ //# sourceMappingURL=exported-name-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exported-name-of.js","sourceRoot":"","sources":["../../../src/declared/injection/exported-name-of.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAAG,gEAAgE,CAAC;AAEvF,uHAAuH;AACvH,MAAM,UAAU,cAAc,CAAC,IAAgB,EAAE,KAAa;IAC5D,KAAK,MAAM,CAAC,EAAE,KAAK,GAAG,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QACpE,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YACvC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,OAAO;iBAChC,IAAI,EAAE;iBACN,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;iBACvB,KAAK,CAAC,UAAU,CAAC,CAAC;YAErB,IAAI,OAAO,KAAK,KAAK,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAChD,OAAO,QAAQ,CAAC;YAClB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Types of the language and of its standard library: they exist for every program, so they name no dependency of one. */
2
+ export declare const LANGUAGE_TYPES: readonly string[];
3
+ //# sourceMappingURL=language-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-types.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/language-types.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAC1H,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EA6B3C,CAAC"}
@@ -0,0 +1,32 @@
1
+ /** Types of the language and of its standard library: they exist for every program, so they name no dependency of one. */
2
+ export const LANGUAGE_TYPES = [
3
+ 'string',
4
+ 'number',
5
+ 'boolean',
6
+ 'bigint',
7
+ 'symbol',
8
+ 'object',
9
+ 'unknown',
10
+ 'any',
11
+ 'never',
12
+ 'void',
13
+ 'undefined',
14
+ 'null',
15
+ 'Date',
16
+ 'Map',
17
+ 'Set',
18
+ 'Array',
19
+ 'ReadonlyArray',
20
+ 'Record',
21
+ 'Promise',
22
+ 'Function',
23
+ 'RegExp',
24
+ 'Error',
25
+ 'URL',
26
+ 'Buffer',
27
+ 'Partial',
28
+ 'Readonly',
29
+ 'Pick',
30
+ 'Omit',
31
+ ];
32
+ //# sourceMappingURL=language-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-types.js","sourceRoot":"","sources":["../../../src/declared/injection/language-types.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAC1H,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,KAAK;IACL,OAAO;IACP,MAAM;IACN,WAAW;IACX,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,OAAO;IACP,eAAe;IACf,QAAQ;IACR,SAAS;IACT,UAAU;IACV,QAAQ;IACR,OAAO;IACP,KAAK;IACL,QAAQ;IACR,SAAS;IACT,UAAU;IACV,MAAM;IACN,MAAM;CACP,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { TokenReference } from './token-reference.js';
2
+ /**
3
+ * The names a generated file binds its imports under. A class keeps its own name; a second
4
+ * class of the same name, exported by another module, is bound as `Name_2`, so that two ports
5
+ * called alike in two contexts never collide.
6
+ */
7
+ export declare class LocalNames {
8
+ private readonly specifierOf;
9
+ private readonly byOrigin;
10
+ private readonly taken;
11
+ constructor(specifierOf: (reference: TokenReference) => string);
12
+ of(reference: TokenReference): string;
13
+ /** Every binding, grouped by the specifier it is imported from. */
14
+ bySpecifier(): Map<string, string[]>;
15
+ private free;
16
+ }
17
+ //# sourceMappingURL=local-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-names.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/local-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;GAIG;AACH,qBAAa,UAAU;IAKT,OAAO,CAAC,QAAQ,CAAC,WAAW;IAJxC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;IAEtD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqB;IAE3C,YAA6B,WAAW,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,MAAM,EAAI;IAEnF,EAAE,CAAC,SAAS,EAAE,cAAc,GAAG,MAAM,CAcpC;IAED,mEAAmE;IACnE,WAAW,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAUnC;IAED,OAAO,CAAC,IAAI;CASb"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The names a generated file binds its imports under. A class keeps its own name; a second
3
+ * class of the same name, exported by another module, is bound as `Name_2`, so that two ports
4
+ * called alike in two contexts never collide.
5
+ */
6
+ export class LocalNames {
7
+ specifierOf;
8
+ byOrigin = new Map();
9
+ taken = new Set();
10
+ constructor(specifierOf) {
11
+ this.specifierOf = specifierOf;
12
+ }
13
+ of(reference) {
14
+ const origin = `${this.specifierOf(reference)}#${reference.name}`;
15
+ const known = this.byOrigin.get(origin);
16
+ if (known !== undefined) {
17
+ return known;
18
+ }
19
+ const local = this.free(reference.name);
20
+ this.byOrigin.set(origin, local);
21
+ this.taken.add(local);
22
+ return local;
23
+ }
24
+ /** Every binding, grouped by the specifier it is imported from. */
25
+ bySpecifier() {
26
+ const grouped = new Map();
27
+ for (const [origin, local] of this.byOrigin) {
28
+ const [specifier = '', name = ''] = origin.split('#');
29
+ grouped.set(specifier, [...(grouped.get(specifier) ?? []), name === local ? name : `${name} as ${local}`]);
30
+ }
31
+ return grouped;
32
+ }
33
+ free(name) {
34
+ let local = name;
35
+ for (let rank = 2; this.taken.has(local); rank += 1) {
36
+ local = `${name}_${rank}`;
37
+ }
38
+ return local;
39
+ }
40
+ }
41
+ //# sourceMappingURL=local-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-names.js","sourceRoot":"","sources":["../../../src/declared/injection/local-names.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,OAAO,UAAU;IAKQ,WAAW;IAJvB,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;IAErC,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAE3C,YAA6B,WAAkD;2BAAlD,WAAW;IAA0C,CAAC;IAEnF,EAAE,CAAC,SAAyB;QAC1B,MAAM,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;QAClE,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAExC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAExC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAEtB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,mEAAmE;IACnE,WAAW;QACT,MAAM,OAAO,GAAG,IAAI,GAAG,EAAoB,CAAC;QAE5C,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC5C,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,IAAI,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAEtD,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC;QAC7G,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,IAAI,CAAC,IAAY;QACvB,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;YACpD,KAAK,GAAG,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;QAC5B,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
@@ -0,0 +1,11 @@
1
+ /** A constructor parameter, read as text: its name, the type it is annotated with, and what makes it more than that. */
2
+ export interface ParameterShape {
3
+ readonly name: string;
4
+ /** The annotation, trimmed; undefined when the parameter has none. */
5
+ readonly type: string | undefined;
6
+ /** What keeps the parameter from naming one dependency: a rest, a destructuring, a `?` or a default value. */
7
+ readonly oddity: string | undefined;
8
+ }
9
+ /** Reads `private readonly clock: Clock`, whatever decorators and modifiers come first. */
10
+ export declare function parameterShape(parameter: string): ParameterShape;
11
+ //# sourceMappingURL=parameter-shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameter-shape.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/parameter-shape.ts"],"names":[],"mappings":"AAEA,wHAAwH;AACxH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,8GAA8G;IAC9G,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAMD,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,CAYhE"}
@@ -0,0 +1,58 @@
1
+ import { matchingBracket } from '../../check/text/matching-bracket.js';
2
+ const DECORATOR = /^@[\w$.]+\s*/;
3
+ const MODIFIERS = /^(?:(?:public|private|protected|readonly|override)\s+)*/;
4
+ const NAME = /^([A-Za-z_$][\w$]*)\s*(\?)?\s*(?::([\s\S]*))?$/;
5
+ /** Reads `private readonly clock: Clock`, whatever decorators and modifiers come first. */
6
+ export function parameterShape(parameter) {
7
+ const text = withoutDecorators(parameter.trim()).replace(MODIFIERS, '');
8
+ const unnamed = unnamedShape(text);
9
+ if (unnamed !== undefined) {
10
+ return unnamed;
11
+ }
12
+ const assigned = defaultAt(text);
13
+ const [, name = text, optional, type] = NAME.exec(assigned === -1 ? text : text.slice(0, assigned).trim()) ?? [];
14
+ return { name, type: type?.trim(), oddity: oddityOf(optional !== undefined, assigned !== -1) };
15
+ }
16
+ /** A rest parameter or a destructuring: neither is one named value typed by one class. */
17
+ function unnamedShape(text) {
18
+ if (text.startsWith('...')) {
19
+ const [name = ''] = text.replace(/^\.\.\.\s*/, '').split(/[\s:]/);
20
+ return { name, type: undefined, oddity: 'is a rest parameter' };
21
+ }
22
+ if (text.startsWith('{') || text.startsWith('[')) {
23
+ return { name: text.split(':')[0]?.trim() ?? text, type: undefined, oddity: 'is destructured' };
24
+ }
25
+ return undefined;
26
+ }
27
+ function oddityOf(optional, defaulted) {
28
+ if (defaulted) {
29
+ return 'has a default value';
30
+ }
31
+ return optional ? 'is optional' : undefined;
32
+ }
33
+ function withoutDecorators(text) {
34
+ let rest = text;
35
+ for (let name = DECORATOR.exec(rest); name !== null; name = DECORATOR.exec(rest)) {
36
+ const called = rest.charAt(name[0].length) === '(';
37
+ rest = rest.slice(called ? matchingBracket(rest, name[0].length) + 1 : name[0].length).trimStart();
38
+ }
39
+ return rest;
40
+ }
41
+ /** Offset of the `=` that gives the parameter a default value, or -1: the `=` of `=>`, `==`, `<=` and `>=` are not one. */
42
+ function defaultAt(text) {
43
+ let depth = 0;
44
+ for (let at = 0; at < text.length; at += 1) {
45
+ const char = text.charAt(at);
46
+ if ('([{'.includes(char)) {
47
+ depth += 1;
48
+ }
49
+ else if (')]}'.includes(char)) {
50
+ depth -= 1;
51
+ }
52
+ else if (char === '=' && depth === 0 && text.charAt(at + 1) !== '>' && !'=!<>'.includes(text.charAt(at - 1))) {
53
+ return at;
54
+ }
55
+ }
56
+ return -1;
57
+ }
58
+ //# sourceMappingURL=parameter-shape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameter-shape.js","sourceRoot":"","sources":["../../../src/declared/injection/parameter-shape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAWvE,MAAM,SAAS,GAAG,cAAc,CAAC;AACjC,MAAM,SAAS,GAAG,yDAAyD,CAAC;AAC5E,MAAM,IAAI,GAAG,gDAAgD,CAAC;AAE9D,2FAA2F;AAC3F,MAAM,UAAU,cAAc,CAAC,SAAiB;IAC9C,MAAM,IAAI,GAAG,iBAAiB,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACxE,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAEnC,IAAI,OAAO,KAAK,SAAS,EAAE,C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CAAC;aAAM,IAAI,IAAI,KAAK,GAAG,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/G,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The class a type annotation names when it names exactly one: `Clock`, or `Cache` for
3
+ * `Cache<Session>`, whose type arguments say nothing of the token. Undefined for a union, an
4
+ * intersection, an array, a function, a literal, an object type or a qualified name.
5
+ */
6
+ export declare function rawClassName(type: string): string | undefined;
7
+ //# sourceMappingURL=raw-class-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raw-class-name.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/raw-class-name.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQ7D"}
@@ -0,0 +1,28 @@
1
+ const IDENTIFIER = /^[A-Za-z_$][\w$]*$/;
2
+ const GENERIC = /^([A-Za-z_$][\w$]*)\s*</;
3
+ /**
4
+ * The class a type annotation names when it names exactly one: `Clock`, or `Cache` for
5
+ * `Cache<Session>`, whose type arguments say nothing of the token. Undefined for a union, an
6
+ * intersection, an array, a function, a literal, an object type or a qualified name.
7
+ */
8
+ export function rawClassName(type) {
9
+ if (IDENTIFIER.test(type)) {
10
+ return type;
11
+ }
12
+ const name = GENERIC.exec(type)?.[1];
13
+ return name !== undefined && closesAtTheEnd(type, type.indexOf('<')) ? name : undefined;
14
+ }
15
+ function closesAtTheEnd(type, open) {
16
+ let depth = 0;
17
+ for (let at = open; at < type.length; at += 1) {
18
+ const char = type.charAt(at);
19
+ if (char === '<') {
20
+ depth += 1;
21
+ }
22
+ else if (char === '>' && type.charAt(at - 1) !== '=' && (depth -= 1) === 0) {
23
+ return at === type.length - 1;
24
+ }
25
+ }
26
+ return false;
27
+ }
28
+ //# sourceMappingURL=raw-class-name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raw-class-name.js","sourceRoot":"","sources":["../../../src/declared/injection/raw-class-name.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,oBAAoB,CAAC;AACxC,MAAM,OAAO,GAAG,yBAAyB,CAAC;AAE1C;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAErC,OAAO,IAAI,KAAK,SAAS,IAAI,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1F,CAAC;AAED,SAAS,cAAc,CAAC,IAAY,EAAE,IAAY;IAChD,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,KAAK,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAE7B,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,KAAK,IAAI,CAAC,CAAC;QACb,CAAC;aAAM,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7E,OAAO,EAAE,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { SourceFile } from '../../check/model/source-file.js';
2
+ /** The constructor a class is built by: its own, or the nearest one it inherits inside the project. */
3
+ export interface ReadConstructor {
4
+ /** The source that writes it: its parameter types are resolved through the imports of that file. */
5
+ readonly file: SourceFile;
6
+ readonly line: number;
7
+ /** The blanked text of each parameter. */
8
+ readonly parameters: readonly string[];
9
+ }
10
+ //# sourceMappingURL=read-constructor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-constructor.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/read-constructor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE,uGAAuG;AACvG,MAAM,WAAW,eAAe;IAC9B,oGAAoG;IACpG,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=read-constructor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-constructor.js","sourceRoot":"","sources":["../../../src/declared/injection/read-constructor.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { SourceFile } from '../../check/model/source-file.js';
2
+ import type { ClassInjection } from './class-injection.js';
3
+ import type { Sources } from './sources.js';
4
+ /** What each declared class of a role file is given: the list of its decorator, and what its constructor says. */
5
+ export declare function readInjections(sources: Sources, file: SourceFile): ClassInjection[];
6
+ //# sourceMappingURL=read-injections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-injections.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/read-injections.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAGnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAO3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAY5C,kHAAkH;AAClH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,GAAG,cAAc,EAAE,CAiBnF"}
@@ -0,0 +1,75 @@
1
+ import { argumentsOf } from '../../check/declarations/arguments-of.js';
2
+ import { declaredAs } from '../../check/declarations/declared-as.js';
3
+ import { splitTopLevel } from '../../check/text/split-top-level.js';
4
+ import { DECLARATION_DECORATORS } from '../declared-role.js';
5
+ import { constructorOf } from './constructor-of.js';
6
+ import { parameterShape } from './parameter-shape.js';
7
+ import { rawClassName } from './raw-class-name.js';
8
+ import { resolveToken } from './resolve-token.js';
9
+ /** The decorators of a message say who may send it: a message is built by its sender and is injected nothing. */
10
+ const MESSAGE_DECORATORS = ['Requires', 'Public'];
11
+ const INJECTED = DECLARATION_DECORATORS.filter((name) => !MESSAGE_DECORATORS.includes(name));
12
+ const TYPE_BY_A_CLASS = 'Type the parameter by one class and nothing else: a port (an abstract class of application/ports or domain/repositories), a port of the kernel, another declared class, or an abstract class with readonly members that the platform binds to a value. The composition root injects each constructor parameter by the class that types it.';
13
+ const WRITE_THE_CONSTRUCTOR = 'Write the constructor in the class, typing each parameter by its port and passing them to `super(...)`; or list the dependencies in the decorator, which is then the only statement of them.';
14
+ /** What each declared class of a role file is given: the list of its decorator, and what its constructor says. */
15
+ export function readInjections(sources, file) {
16
+ return declaredAs(file.scan, INJECTED).map(({ declared, decoration }) => {
17
+ const written = constructorOf({ sources, file, className: declared.name });
18
+ const identity = { className: declared.name, file: file.path, line: decoration.line };
19
+ const listed = listOf(file, decoration);
20
+ if (written === undefined) {
21
+ return { ...identity, listed, dependencies: undefined, readable: false, problems: [inherited(identity)] };
22
+ }
23
+ const read = written.parameters.map((parameter) => tokenOf(sources, written, parameter));
24
+ const line = written.file === file ? written.line : decoration.line;
25
+ const problems = read.flatMap((parameter) => problemOf(identity.className, line, parameter));
26
+ const tokens = read.flatMap(({ resolved }) => resolved.token ?? []);
27
+ return { ...identity, listed, readable: true, problems, dependencies: problems.length === 0 ? tokens : undefined };
28
+ });
29
+ }
30
+ /** The identifiers of the list a decorator carries as its last argument, or undefined when it carries none. */
31
+ function listOf(file, decoration) {
32
+ const last = argumentsOf(file.scan, decoration).at(-1)?.code;
33
+ if (last?.startsWith('[') !== true) {
34
+ return undefined;
35
+ }
36
+ return splitTopLevel(last.slice(1, last.lastIndexOf(']')))
37
+ .map((part) => part.code)
38
+ .filter((code) => code !== '');
39
+ }
40
+ function inherited({ className, line }) {
41
+ return {
42
+ line,
43
+ message: `${className} inherits its constructor from a class this project cannot read: nothing states what it is given.`,
44
+ fix: WRITE_THE_CONSTRUCTOR,
45
+ };
46
+ }
47
+ function tokenOf(sources, written, parameter) {
48
+ const { name, type, oddity } = parameterShape(parameter);
49
+ if (oddity !== undefined) {
50
+ return { name, resolved: { flaw: `${oddity}: the composition root gives every parameter a value, always` } };
51
+ }
52
+ if (type === undefined) {
53
+ return { name, resolved: { flaw: 'has no type' } };
54
+ }
55
+ const className = rawClassName(type);
56
+ return {
57
+ name,
58
+ resolved: className === undefined
59
+ ? { flaw: `is typed \`${type.replace(/\s+/g, ' ')}\`, which names no single class` }
60
+ : resolveToken({ sources, file: written.file, name: className }),
61
+ };
62
+ }
63
+ function problemOf(className, line, { name, resolved }) {
64
+ if (resolved.flaw === undefined) {
65
+ return [];
66
+ }
67
+ return [
68
+ {
69
+ line,
70
+ message: `Parameter "${name}" of the constructor of ${className} ${resolved.flaw}.`,
71
+ fix: TYPE_BY_A_CLASS,
72
+ },
73
+ ];
74
+ }
75
+ //# sourceMappingURL=read-injections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-injections.js","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;YACpF,CAAC,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KACrE,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,SAAiB,EAAE,IAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAiB;IACnF,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO;QACL;YACE,IAAI;YACJ,OAAO,EAAE,cAAc,IAAI,2BAA2B,SAAS,IAAI,QAAQ,CAAC,IAAI,GAAG;YACnF,GAAG,EAAE,eAAe;SACrB;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ClassInjection } from './class-injection.js';
2
+ import type { RenderedInjections } from './rendered-injections.js';
3
+ /**
4
+ * The statements that register what the classes are given: `injected(Class, [Tokens])` for each
5
+ * class whose constructor takes something and whose decorator lists nothing, with the imports
6
+ * they need. A class with a list in its decorator, with no parameter or with a constructor that
7
+ * cannot be read is left out: the first is complete, the second needs nothing, the third is
8
+ * reported by `declarations/constructor-injection` and refused when the application is composed.
9
+ */
10
+ export declare function renderInjections(injections: readonly ClassInjection[], specifierOfFile: (file: string) => string): RenderedInjections;
11
+ //# sourceMappingURL=render-injections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-injections.d.ts","sourceRoot":"","sources":["../../../src/declared/injection/render-injections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAOnE;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,SAAS,cAAc,EAAE,EACrC,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GACxC,kBAAkB,CAqBpB"}