laymos 0.0.1 → 0.0.2

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 (583) hide show
  1. package/README.md +137 -710
  2. package/bin/laymos.mjs +2 -0
  3. package/dist/architecture/analyze-project/analyze-project.d.ts +9 -0
  4. package/dist/architecture/analyze-project/analyze-project.d.ts.map +1 -0
  5. package/dist/architecture/analyze-project/analyze-project.js +47 -0
  6. package/dist/architecture/analyze-project/index.d.ts +3 -0
  7. package/dist/architecture/analyze-project/index.d.ts.map +1 -0
  8. package/dist/architecture/analyze-project/index.js +1 -0
  9. package/dist/architecture/build-report/build-report.d.ts +7 -0
  10. package/dist/architecture/build-report/build-report.d.ts.map +1 -0
  11. package/dist/{engine/4-emit/emit.js → architecture/build-report/build-report.js} +12 -9
  12. package/dist/architecture/build-report/index.d.ts +2 -0
  13. package/dist/architecture/build-report/index.d.ts.map +1 -0
  14. package/dist/architecture/build-report/index.js +1 -0
  15. package/dist/architecture/errors.d.ts +11 -0
  16. package/dist/architecture/errors.d.ts.map +1 -0
  17. package/dist/{engine → architecture}/errors.js +0 -2
  18. package/dist/{engine/1-extract/extract.d.ts → architecture/extract-dependencies/extract-dependencies.d.ts} +1 -1
  19. package/dist/architecture/extract-dependencies/extract-dependencies.d.ts.map +1 -0
  20. package/dist/{engine/1-extract/extract.js → architecture/extract-dependencies/extract-dependencies.js} +13 -11
  21. package/dist/architecture/extract-dependencies/index.d.ts +3 -0
  22. package/dist/architecture/extract-dependencies/index.d.ts.map +1 -0
  23. package/dist/architecture/extract-dependencies/index.js +1 -0
  24. package/dist/architecture/resolve-architecture/index.d.ts +3 -0
  25. package/dist/architecture/resolve-architecture/index.d.ts.map +1 -0
  26. package/dist/architecture/resolve-architecture/index.js +1 -0
  27. package/dist/{engine/2-resolve/resolve.d.ts → architecture/resolve-architecture/resolve-architecture.d.ts} +2 -2
  28. package/dist/architecture/resolve-architecture/resolve-architecture.d.ts.map +1 -0
  29. package/dist/{engine/2-resolve/resolve.js → architecture/resolve-architecture/resolve-architecture.js} +1 -1
  30. package/dist/architecture/validate-rules/index.d.ts +3 -0
  31. package/dist/architecture/validate-rules/index.d.ts.map +1 -0
  32. package/dist/architecture/validate-rules/index.js +1 -0
  33. package/dist/{engine/3-evaluate/evaluate.d.ts → architecture/validate-rules/validate-rules.d.ts} +4 -4
  34. package/dist/architecture/validate-rules/validate-rules.d.ts.map +1 -0
  35. package/dist/{engine/3-evaluate/evaluate.js → architecture/validate-rules/validate-rules.js} +2 -2
  36. package/dist/architecture-analysis-schema/architecture-analysis-schema.d.ts +109 -0
  37. package/dist/architecture-analysis-schema/architecture-analysis-schema.d.ts.map +1 -0
  38. package/dist/architecture-analysis-schema/architecture-analysis-schema.js +10 -0
  39. package/dist/architecture-analysis-schema/index.d.ts +7 -0
  40. package/dist/architecture-analysis-schema/index.d.ts.map +1 -0
  41. package/dist/architecture-analysis-schema/index.js +3 -0
  42. package/dist/architecture-analysis-schema/layer-analysis-schema.d.ts +27 -0
  43. package/dist/architecture-analysis-schema/layer-analysis-schema.d.ts.map +1 -0
  44. package/dist/architecture-analysis-schema/layer-analysis-schema.js +18 -0
  45. package/dist/architecture-analysis-schema/module-analysis-schema.d.ts +150 -0
  46. package/dist/architecture-analysis-schema/module-analysis-schema.d.ts.map +1 -0
  47. package/dist/architecture-analysis-schema/module-analysis-schema.js +96 -0
  48. package/dist/architecture-analysis-schema/module-source-schema.d.ts +16 -0
  49. package/dist/architecture-analysis-schema/module-source-schema.d.ts.map +1 -0
  50. package/dist/architecture-analysis-schema/module-source-schema.js +10 -0
  51. package/dist/architecture-analysis-schema/project-config-schema.d.ts +51 -0
  52. package/dist/architecture-analysis-schema/project-config-schema.d.ts.map +1 -0
  53. package/dist/architecture-analysis-schema/project-config-schema.js +110 -0
  54. package/dist/change-set-schema/change-set-schema.d.ts +55 -0
  55. package/dist/change-set-schema/change-set-schema.d.ts.map +1 -0
  56. package/dist/change-set-schema/change-set-schema.js +43 -0
  57. package/dist/change-set-schema/index.d.ts +3 -0
  58. package/dist/change-set-schema/index.d.ts.map +1 -0
  59. package/dist/change-set-schema/index.js +2 -0
  60. package/dist/cli/cli.js +6 -1
  61. package/dist/cli/deps/dependency-tree.d.ts +3 -0
  62. package/dist/cli/deps/dependency-tree.d.ts.map +1 -0
  63. package/dist/cli/deps/dependency-tree.js +39 -0
  64. package/dist/cli/deps/deps.d.ts +7 -0
  65. package/dist/cli/deps/deps.d.ts.map +1 -0
  66. package/dist/cli/deps/deps.js +26 -0
  67. package/dist/cli/deps/index.d.ts +2 -0
  68. package/dist/cli/deps/index.d.ts.map +1 -0
  69. package/dist/cli/deps/index.js +2 -0
  70. package/dist/cli/errors.d.ts +2 -0
  71. package/dist/cli/errors.d.ts.map +1 -0
  72. package/dist/cli/errors.js +34 -0
  73. package/dist/cli/inspect/file/file.d.ts +8 -0
  74. package/dist/cli/inspect/file/file.d.ts.map +1 -0
  75. package/dist/cli/inspect/file/file.js +16 -0
  76. package/dist/cli/inspect/file/index.d.ts +2 -0
  77. package/dist/cli/inspect/file/index.d.ts.map +1 -0
  78. package/dist/cli/inspect/file/index.js +1 -0
  79. package/dist/cli/inspect/file/report.d.ts +3 -0
  80. package/dist/cli/inspect/file/report.d.ts.map +1 -0
  81. package/dist/cli/inspect/file/report.js +26 -0
  82. package/dist/cli/inspect/index.d.ts +2 -0
  83. package/dist/cli/inspect/index.d.ts.map +1 -0
  84. package/dist/cli/inspect/index.js +1 -0
  85. package/dist/cli/inspect/inspect.d.ts +4 -0
  86. package/dist/cli/inspect/inspect.d.ts.map +1 -0
  87. package/dist/cli/inspect/inspect.js +14 -0
  88. package/dist/cli/inspect/json.d.ts +4 -0
  89. package/dist/cli/inspect/json.d.ts.map +1 -0
  90. package/dist/cli/inspect/json.js +5 -0
  91. package/dist/cli/inspect/layer/index.d.ts +2 -0
  92. package/dist/cli/inspect/layer/index.d.ts.map +1 -0
  93. package/dist/cli/inspect/layer/index.js +1 -0
  94. package/dist/cli/inspect/layer/layer.d.ts +7 -0
  95. package/dist/cli/inspect/layer/layer.d.ts.map +1 -0
  96. package/dist/cli/inspect/layer/layer.js +13 -0
  97. package/dist/cli/inspect/layer/report.d.ts +3 -0
  98. package/dist/cli/inspect/layer/report.d.ts.map +1 -0
  99. package/dist/cli/inspect/layer/report.js +21 -0
  100. package/dist/cli/inspect/module/index.d.ts +2 -0
  101. package/dist/cli/inspect/module/index.d.ts.map +1 -0
  102. package/dist/cli/inspect/module/index.js +1 -0
  103. package/dist/cli/inspect/module/module.d.ts +7 -0
  104. package/dist/cli/inspect/module/module.d.ts.map +1 -0
  105. package/dist/cli/inspect/module/module.js +15 -0
  106. package/dist/cli/inspect/module/report.d.ts +3 -0
  107. package/dist/cli/inspect/module/report.d.ts.map +1 -0
  108. package/dist/cli/inspect/module/report.js +38 -0
  109. package/dist/cli/inspect/path-tree.d.ts +7 -0
  110. package/dist/cli/inspect/path-tree.d.ts.map +1 -0
  111. package/dist/cli/inspect/path-tree.js +62 -0
  112. package/dist/cli/inspect/path.d.ts +5 -0
  113. package/dist/cli/inspect/path.d.ts.map +1 -0
  114. package/dist/cli/inspect/path.js +10 -0
  115. package/dist/cli/inspect/project/index.d.ts +2 -0
  116. package/dist/cli/inspect/project/index.d.ts.map +1 -0
  117. package/dist/cli/inspect/project/index.js +1 -0
  118. package/dist/cli/inspect/project/project.d.ts +8 -0
  119. package/dist/cli/inspect/project/project.d.ts.map +1 -0
  120. package/dist/cli/inspect/project/project.js +19 -0
  121. package/dist/cli/inspect/project/report.d.ts +3 -0
  122. package/dist/cli/inspect/project/report.d.ts.map +1 -0
  123. package/dist/cli/inspect/project/report.js +16 -0
  124. package/dist/cli/lint/index.d.ts +2 -0
  125. package/dist/cli/lint/index.d.ts.map +1 -0
  126. package/dist/cli/lint/index.js +2 -0
  127. package/dist/cli/lint/layers/index.d.ts +3 -0
  128. package/dist/cli/lint/layers/index.d.ts.map +1 -0
  129. package/dist/cli/lint/layers/index.js +4 -0
  130. package/dist/cli/lint/layers/layers.d.ts +5 -0
  131. package/dist/cli/lint/layers/layers.d.ts.map +1 -0
  132. package/dist/cli/lint/layers/layers.js +18 -0
  133. package/dist/cli/lint/layers/report.d.ts +5 -0
  134. package/dist/cli/lint/layers/report.d.ts.map +1 -0
  135. package/dist/cli/lint/layers/report.js +60 -0
  136. package/dist/cli/lint/lint.d.ts +4 -0
  137. package/dist/cli/lint/lint.d.ts.map +1 -0
  138. package/dist/cli/lint/lint.js +26 -0
  139. package/dist/cli/lint/modules/index.d.ts +5 -0
  140. package/dist/cli/lint/modules/index.d.ts.map +1 -0
  141. package/dist/cli/lint/modules/index.js +4 -0
  142. package/dist/cli/lint/modules/modules.d.ts +5 -0
  143. package/dist/cli/lint/modules/modules.d.ts.map +1 -0
  144. package/dist/cli/lint/modules/modules.js +15 -0
  145. package/dist/cli/lint/modules/report.d.ts +5 -0
  146. package/dist/cli/lint/modules/report.d.ts.map +1 -0
  147. package/dist/cli/lint/modules/report.js +69 -0
  148. package/dist/cli/run.d.ts +1 -8
  149. package/dist/cli/run.d.ts.map +1 -1
  150. package/dist/cli/run.js +14 -242
  151. package/dist/cli/stories/index.d.ts +2 -0
  152. package/dist/cli/stories/index.d.ts.map +1 -0
  153. package/dist/cli/stories/index.js +1 -0
  154. package/dist/cli/stories/progress.d.ts +7 -0
  155. package/dist/cli/stories/progress.d.ts.map +1 -0
  156. package/dist/cli/stories/progress.js +45 -0
  157. package/dist/cli/stories/report.d.ts +9 -0
  158. package/dist/cli/stories/report.d.ts.map +1 -0
  159. package/dist/cli/stories/report.js +63 -0
  160. package/dist/cli/stories/stories.d.ts +6 -0
  161. package/dist/cli/stories/stories.d.ts.map +1 -0
  162. package/dist/cli/stories/stories.js +30 -0
  163. package/dist/config/define-config.d.ts +5 -0
  164. package/dist/config/define-config.d.ts.map +1 -1
  165. package/dist/config/define-config.js +152 -7
  166. package/dist/config/index.d.ts +6 -0
  167. package/dist/config/index.d.ts.map +1 -1
  168. package/dist/config/index.js +2 -0
  169. package/dist/config/layer-graph.d.ts +2 -2
  170. package/dist/config/layer-graph.d.ts.map +1 -1
  171. package/dist/config/layer-graph.js +2 -29
  172. package/dist/config/layer.d.ts +2 -2
  173. package/dist/config/layer.d.ts.map +1 -1
  174. package/dist/config/layer.js +2 -15
  175. package/dist/config/load-config/index.d.ts +2 -0
  176. package/dist/config/load-config/index.d.ts.map +1 -0
  177. package/dist/config/load-config/index.js +1 -0
  178. package/dist/config/load-config/load-config.d.ts +34 -0
  179. package/dist/config/load-config/load-config.d.ts.map +1 -0
  180. package/dist/config/load-config/load-config.js +127 -0
  181. package/dist/config/module.d.ts +4 -2
  182. package/dist/config/module.d.ts.map +1 -1
  183. package/dist/config/module.js +5 -12
  184. package/dist/config/project-narrative.d.ts +15 -0
  185. package/dist/config/project-narrative.d.ts.map +1 -0
  186. package/dist/config/project-narrative.js +11 -0
  187. package/dist/config/types.d.ts +5 -3
  188. package/dist/config/types.d.ts.map +1 -1
  189. package/dist/domain/architecture-analysis/architecture-analysis.d.ts +4 -0
  190. package/dist/domain/architecture-analysis/architecture-analysis.d.ts.map +1 -0
  191. package/dist/domain/architecture-analysis/architecture-analysis.js +13 -0
  192. package/dist/domain/architecture-analysis/index.d.ts +3 -0
  193. package/dist/domain/architecture-analysis/index.d.ts.map +1 -0
  194. package/dist/domain/architecture-analysis/index.js +2 -0
  195. package/dist/domain/architecture-analysis/layer-rules.d.ts +3 -0
  196. package/dist/domain/architecture-analysis/layer-rules.d.ts.map +1 -0
  197. package/dist/domain/architecture-analysis/layer-rules.js +15 -0
  198. package/dist/domain/architecture-analysis/layers/allowed-dependencies.d.ts +3 -0
  199. package/dist/domain/architecture-analysis/layers/allowed-dependencies.d.ts.map +1 -0
  200. package/dist/domain/architecture-analysis/layers/allowed-dependencies.js +20 -0
  201. package/dist/domain/architecture-analysis/layers/coverage-violations.d.ts +2 -0
  202. package/dist/domain/architecture-analysis/layers/coverage-violations.d.ts.map +1 -0
  203. package/dist/domain/architecture-analysis/layers/coverage-violations.js +5 -0
  204. package/dist/domain/architecture-analysis/layers/dependency-violations.d.ts +5 -0
  205. package/dist/domain/architecture-analysis/layers/dependency-violations.d.ts.map +1 -0
  206. package/dist/domain/architecture-analysis/layers/dependency-violations.js +18 -0
  207. package/dist/domain/architecture-analysis/layers/index.d.ts +9 -0
  208. package/dist/domain/architecture-analysis/layers/index.d.ts.map +1 -0
  209. package/dist/domain/architecture-analysis/layers/index.js +4 -0
  210. package/dist/domain/architecture-analysis/layers/layer-membership.d.ts +3 -0
  211. package/dist/domain/architecture-analysis/layers/layer-membership.d.ts.map +1 -0
  212. package/dist/domain/architecture-analysis/layers/layer-membership.js +13 -0
  213. package/dist/domain/architecture-analysis/layers/layers.d.ts +11 -0
  214. package/dist/domain/architecture-analysis/layers/layers.d.ts.map +1 -0
  215. package/dist/domain/architecture-analysis/layers/layers.js +22 -0
  216. package/dist/domain/architecture-analysis/layers/module-coverage-violations.d.ts +4 -0
  217. package/dist/domain/architecture-analysis/layers/module-coverage-violations.d.ts.map +1 -0
  218. package/dist/domain/architecture-analysis/layers/module-coverage-violations.js +9 -0
  219. package/dist/domain/architecture-analysis/modules/dependency-graph.d.ts +2 -0
  220. package/dist/domain/architecture-analysis/modules/dependency-graph.d.ts.map +1 -0
  221. package/dist/domain/architecture-analysis/modules/dependency-graph.js +45 -0
  222. package/dist/domain/architecture-analysis/modules/dependency-permissions.d.ts +4 -0
  223. package/dist/domain/architecture-analysis/modules/dependency-permissions.d.ts.map +1 -0
  224. package/dist/domain/architecture-analysis/modules/dependency-permissions.js +35 -0
  225. package/dist/domain/architecture-analysis/modules/index.d.ts +12 -0
  226. package/dist/domain/architecture-analysis/modules/index.d.ts.map +1 -0
  227. package/dist/domain/architecture-analysis/modules/index.js +3 -0
  228. package/dist/domain/architecture-analysis/modules/module-descriptors.d.ts +5 -0
  229. package/dist/domain/architecture-analysis/modules/module-descriptors.d.ts.map +1 -0
  230. package/dist/domain/architecture-analysis/modules/module-descriptors.js +37 -0
  231. package/dist/domain/architecture-analysis/modules/module-membership.d.ts +3 -0
  232. package/dist/domain/architecture-analysis/modules/module-membership.d.ts.map +1 -0
  233. package/dist/domain/architecture-analysis/modules/module-membership.js +12 -0
  234. package/dist/domain/architecture-analysis/modules/modules.d.ts +16 -0
  235. package/dist/domain/architecture-analysis/modules/modules.d.ts.map +1 -0
  236. package/dist/domain/architecture-analysis/modules/modules.js +35 -0
  237. package/dist/domain/architecture-analysis/modules/public-entry-points.d.ts +3 -0
  238. package/dist/domain/architecture-analysis/modules/public-entry-points.d.ts.map +1 -0
  239. package/dist/domain/architecture-analysis/modules/public-entry-points.js +11 -0
  240. package/dist/domain/architecture-analysis/modules/unexposed-modules.d.ts +3 -0
  241. package/dist/domain/architecture-analysis/modules/unexposed-modules.d.ts.map +1 -0
  242. package/dist/domain/architecture-analysis/modules/unexposed-modules.js +10 -0
  243. package/dist/domain/architecture-analysis/modules/violations/boundaries.d.ts +8 -0
  244. package/dist/domain/architecture-analysis/modules/violations/boundaries.d.ts.map +1 -0
  245. package/dist/domain/architecture-analysis/modules/violations/boundaries.js +47 -0
  246. package/dist/domain/architecture-analysis/modules/violations/coverage.d.ts +3 -0
  247. package/dist/domain/architecture-analysis/modules/violations/coverage.d.ts.map +1 -0
  248. package/dist/domain/architecture-analysis/modules/violations/coverage.js +7 -0
  249. package/dist/domain/architecture-analysis/modules/violations/cycles.d.ts +3 -0
  250. package/dist/domain/architecture-analysis/modules/violations/cycles.d.ts.map +1 -0
  251. package/dist/domain/architecture-analysis/modules/violations/cycles.js +7 -0
  252. package/dist/domain/architecture-analysis/modules/violations/dead-modules.d.ts +3 -0
  253. package/dist/domain/architecture-analysis/modules/violations/dead-modules.d.ts.map +1 -0
  254. package/dist/domain/architecture-analysis/modules/violations/dead-modules.js +23 -0
  255. package/dist/domain/architecture-analysis/modules/violations/dependencies.d.ts +4 -0
  256. package/dist/domain/architecture-analysis/modules/violations/dependencies.d.ts.map +1 -0
  257. package/dist/domain/architecture-analysis/modules/violations/dependencies.js +7 -0
  258. package/dist/domain/architecture-analysis/modules/violations/entry-points.d.ts +3 -0
  259. package/dist/domain/architecture-analysis/modules/violations/entry-points.d.ts.map +1 -0
  260. package/dist/domain/architecture-analysis/modules/violations/entry-points.js +17 -0
  261. package/dist/domain/architecture-analysis/modules/violations/graph-coverage.d.ts +3 -0
  262. package/dist/domain/architecture-analysis/modules/violations/graph-coverage.d.ts.map +1 -0
  263. package/dist/domain/architecture-analysis/modules/violations/graph-coverage.js +16 -0
  264. package/dist/domain/architecture-analysis/modules/violations/index.d.ts +3 -0
  265. package/dist/domain/architecture-analysis/modules/violations/index.d.ts.map +1 -0
  266. package/dist/domain/architecture-analysis/modules/violations/index.js +2 -0
  267. package/dist/domain/architecture-analysis/modules/violations/unused-shared.d.ts +3 -0
  268. package/dist/domain/architecture-analysis/modules/violations/unused-shared.d.ts.map +1 -0
  269. package/dist/domain/architecture-analysis/modules/violations/unused-shared.js +9 -0
  270. package/dist/domain/architecture-analysis/modules/violations/violations.d.ts +9 -0
  271. package/dist/domain/architecture-analysis/modules/violations/violations.d.ts.map +1 -0
  272. package/dist/domain/architecture-analysis/modules/violations/violations.js +22 -0
  273. package/dist/domain/file-graph/file-graph.d.ts +10 -0
  274. package/dist/domain/file-graph/file-graph.d.ts.map +1 -0
  275. package/dist/domain/file-graph/file-graph.js +37 -0
  276. package/dist/domain/file-graph/index.d.ts +4 -0
  277. package/dist/domain/file-graph/index.d.ts.map +1 -0
  278. package/dist/domain/file-graph/index.js +1 -0
  279. package/dist/domain/project-config/index.d.ts +10 -0
  280. package/dist/domain/project-config/index.d.ts.map +1 -0
  281. package/dist/domain/project-config/index.js +12 -0
  282. package/dist/domain/project-config/project-config.d.ts +52 -0
  283. package/dist/domain/project-config/project-config.d.ts.map +1 -0
  284. package/dist/domain/project-config/project-config.js +39 -0
  285. package/dist/domain/project-config/resolve.d.ts +8 -0
  286. package/dist/domain/project-config/resolve.d.ts.map +1 -0
  287. package/dist/domain/project-config/resolve.js +29 -0
  288. package/dist/domain/project-config/validation/containment.d.ts +4 -0
  289. package/dist/domain/project-config/validation/containment.d.ts.map +1 -0
  290. package/dist/domain/project-config/validation/containment.js +21 -0
  291. package/dist/domain/project-config/validation/index.d.ts +3 -0
  292. package/dist/domain/project-config/validation/index.d.ts.map +1 -0
  293. package/dist/domain/project-config/validation/index.js +2 -0
  294. package/dist/domain/project-config/validation/layers/cycles.d.ts +3 -0
  295. package/dist/domain/project-config/validation/layers/cycles.d.ts.map +1 -0
  296. package/dist/domain/project-config/validation/layers/cycles.js +64 -0
  297. package/dist/domain/project-config/validation/layers/index.d.ts +3 -0
  298. package/dist/domain/project-config/validation/layers/index.d.ts.map +1 -0
  299. package/dist/domain/project-config/validation/layers/index.js +2 -0
  300. package/dist/domain/project-config/validation/layers/layers.d.ts +3 -0
  301. package/dist/domain/project-config/validation/layers/layers.d.ts.map +1 -0
  302. package/dist/domain/project-config/validation/layers/layers.js +9 -0
  303. package/dist/domain/project-config/validation/layers/overlaps.d.ts +3 -0
  304. package/dist/domain/project-config/validation/layers/overlaps.d.ts.map +1 -0
  305. package/dist/domain/project-config/validation/layers/overlaps.js +26 -0
  306. package/dist/domain/project-config/validation/layers/references.d.ts +3 -0
  307. package/dist/domain/project-config/validation/layers/references.d.ts.map +1 -0
  308. package/dist/domain/project-config/validation/layers/references.js +21 -0
  309. package/dist/domain/project-config/validation/modules/containment.d.ts +3 -0
  310. package/dist/domain/project-config/validation/modules/containment.d.ts.map +1 -0
  311. package/dist/domain/project-config/validation/modules/containment.js +24 -0
  312. package/dist/domain/project-config/validation/modules/graphs.d.ts +4 -0
  313. package/dist/domain/project-config/validation/modules/graphs.d.ts.map +1 -0
  314. package/dist/domain/project-config/validation/modules/graphs.js +96 -0
  315. package/dist/domain/project-config/validation/modules/index.d.ts +3 -0
  316. package/dist/domain/project-config/validation/modules/index.d.ts.map +1 -0
  317. package/dist/domain/project-config/validation/modules/index.js +2 -0
  318. package/dist/domain/project-config/validation/modules/kinds.d.ts +3 -0
  319. package/dist/domain/project-config/validation/modules/kinds.d.ts.map +1 -0
  320. package/dist/domain/project-config/validation/modules/kinds.js +18 -0
  321. package/dist/domain/project-config/validation/modules/modules.d.ts +3 -0
  322. package/dist/domain/project-config/validation/modules/modules.d.ts.map +1 -0
  323. package/dist/domain/project-config/validation/modules/modules.js +16 -0
  324. package/dist/domain/project-config/validation/modules/nested.d.ts +3 -0
  325. package/dist/domain/project-config/validation/modules/nested.d.ts.map +1 -0
  326. package/dist/domain/project-config/validation/modules/nested.js +34 -0
  327. package/dist/domain/project-config/validation/modules/overlaps.d.ts +4 -0
  328. package/dist/domain/project-config/validation/modules/overlaps.d.ts.map +1 -0
  329. package/dist/domain/project-config/validation/modules/overlaps.js +43 -0
  330. package/dist/domain/project-config/validation/modules/paths.d.ts +3 -0
  331. package/dist/domain/project-config/validation/modules/paths.d.ts.map +1 -0
  332. package/dist/domain/project-config/validation/modules/paths.js +27 -0
  333. package/dist/domain/project-config/validation/modules/scopes.d.ts +4 -0
  334. package/dist/domain/project-config/validation/modules/scopes.d.ts.map +1 -0
  335. package/dist/domain/project-config/validation/modules/scopes.js +28 -0
  336. package/dist/domain/project-config/validation/modules/subpaths.d.ts +3 -0
  337. package/dist/domain/project-config/validation/modules/subpaths.d.ts.map +1 -0
  338. package/dist/domain/project-config/validation/modules/subpaths.js +40 -0
  339. package/dist/domain/project-config/validation/paths.d.ts +3 -0
  340. package/dist/domain/project-config/validation/paths.d.ts.map +1 -0
  341. package/dist/domain/project-config/validation/paths.js +39 -0
  342. package/dist/domain/project-config/validation/validation.d.ts +3 -0
  343. package/dist/domain/project-config/validation/validation.d.ts.map +1 -0
  344. package/dist/domain/project-config/validation/validation.js +12 -0
  345. package/dist/entrypoints/cli/cli.d.ts +3 -0
  346. package/dist/entrypoints/cli/cli.d.ts.map +1 -0
  347. package/dist/entrypoints/cli/cli.js +6 -0
  348. package/dist/entrypoints/cli/run.d.ts +13 -0
  349. package/dist/entrypoints/cli/run.d.ts.map +1 -0
  350. package/dist/entrypoints/cli/run.js +155 -0
  351. package/dist/entrypoints/cli/test-output.d.ts +17 -0
  352. package/dist/entrypoints/cli/test-output.d.ts.map +1 -0
  353. package/dist/entrypoints/cli/test-output.js +244 -0
  354. package/dist/entrypoints/node/index.d.ts +24 -0
  355. package/dist/entrypoints/node/index.d.ts.map +1 -0
  356. package/dist/entrypoints/node/index.js +27 -0
  357. package/dist/entrypoints/report/index.d.ts +2 -0
  358. package/dist/entrypoints/report/index.d.ts.map +1 -0
  359. package/dist/entrypoints/report/index.js +1 -0
  360. package/dist/index.d.ts +17 -1
  361. package/dist/index.d.ts.map +1 -1
  362. package/dist/index.js +22 -1
  363. package/dist/markdown/index.d.ts +3 -0
  364. package/dist/markdown/index.d.ts.map +1 -0
  365. package/dist/markdown/index.js +1 -0
  366. package/dist/markdown/markdown.d.ts +7 -0
  367. package/dist/markdown/markdown.d.ts.map +1 -0
  368. package/dist/markdown/markdown.js +13 -0
  369. package/dist/orchestrator/analyze-project/analyze-project.d.ts +119 -0
  370. package/dist/orchestrator/analyze-project/analyze-project.d.ts.map +1 -0
  371. package/dist/orchestrator/analyze-project/analyze-project.js +9 -0
  372. package/dist/orchestrator/analyze-project/index.d.ts +2 -0
  373. package/dist/orchestrator/analyze-project/index.d.ts.map +1 -0
  374. package/dist/orchestrator/analyze-project/index.js +2 -0
  375. package/dist/orchestrator/inspect/index.d.ts +4 -0
  376. package/dist/orchestrator/inspect/index.d.ts.map +1 -0
  377. package/dist/orchestrator/inspect/index.js +1 -0
  378. package/dist/orchestrator/inspect/inspect.d.ts +269 -0
  379. package/dist/orchestrator/inspect/inspect.d.ts.map +1 -0
  380. package/dist/orchestrator/inspect/inspect.js +147 -0
  381. package/dist/orchestrator/load-changes/index.d.ts +2 -0
  382. package/dist/orchestrator/load-changes/index.d.ts.map +1 -0
  383. package/dist/orchestrator/load-changes/index.js +2 -0
  384. package/dist/orchestrator/load-changes/load-changes.d.ts +6 -0
  385. package/dist/orchestrator/load-changes/load-changes.d.ts.map +1 -0
  386. package/dist/orchestrator/load-changes/load-changes.js +18 -0
  387. package/dist/orchestrator/load-module-source/errors.d.ts +17 -0
  388. package/dist/orchestrator/load-module-source/errors.d.ts.map +1 -0
  389. package/dist/orchestrator/load-module-source/errors.js +5 -0
  390. package/dist/orchestrator/load-module-source/index.d.ts +2 -0
  391. package/dist/orchestrator/load-module-source/index.d.ts.map +1 -0
  392. package/dist/orchestrator/load-module-source/index.js +1 -0
  393. package/dist/orchestrator/load-module-source/load-module-source.d.ts +12 -0
  394. package/dist/orchestrator/load-module-source/load-module-source.d.ts.map +1 -0
  395. package/dist/orchestrator/load-module-source/load-module-source.js +39 -0
  396. package/dist/orchestrator/load-project/index.d.ts +3 -0
  397. package/dist/orchestrator/load-project/index.d.ts.map +1 -0
  398. package/dist/orchestrator/load-project/index.js +2 -0
  399. package/dist/orchestrator/load-project/load-project.d.ts +54 -0
  400. package/dist/orchestrator/load-project/load-project.d.ts.map +1 -0
  401. package/dist/orchestrator/load-project/load-project.js +30 -0
  402. package/dist/orchestrator/query-dependencies/index.d.ts +3 -0
  403. package/dist/orchestrator/query-dependencies/index.d.ts.map +1 -0
  404. package/dist/orchestrator/query-dependencies/index.js +4 -0
  405. package/dist/orchestrator/query-dependencies/query-dependencies.d.ts +12 -0
  406. package/dist/orchestrator/query-dependencies/query-dependencies.d.ts.map +1 -0
  407. package/dist/orchestrator/query-dependencies/query-dependencies.js +20 -0
  408. package/dist/orchestrator/run-stories/errors.d.ts +11 -0
  409. package/dist/orchestrator/run-stories/errors.d.ts.map +1 -0
  410. package/dist/orchestrator/run-stories/errors.js +3 -0
  411. package/dist/orchestrator/run-stories/extract-snippets.d.ts +12 -0
  412. package/dist/orchestrator/run-stories/extract-snippets.d.ts.map +1 -0
  413. package/dist/orchestrator/run-stories/extract-snippets.js +181 -0
  414. package/dist/orchestrator/run-stories/index.d.ts +3 -0
  415. package/dist/orchestrator/run-stories/index.d.ts.map +1 -0
  416. package/dist/orchestrator/run-stories/index.js +3 -0
  417. package/dist/orchestrator/run-stories/run-stories.d.ts +16 -0
  418. package/dist/orchestrator/run-stories/run-stories.d.ts.map +1 -0
  419. package/dist/orchestrator/run-stories/run-stories.js +290 -0
  420. package/dist/report/architecture.d.ts +1 -1
  421. package/dist/report/architecture.d.ts.map +1 -1
  422. package/dist/report/index.d.ts +2 -1
  423. package/dist/report/index.d.ts.map +1 -1
  424. package/dist/report/index.js +1 -1
  425. package/dist/report/tests.d.ts +411 -0
  426. package/dist/report/tests.d.ts.map +1 -0
  427. package/dist/report/tests.js +102 -0
  428. package/dist/services/config/config.d.ts +12 -0
  429. package/dist/services/config/config.d.ts.map +1 -0
  430. package/dist/services/config/config.js +46 -0
  431. package/dist/services/config/errors.d.ts +13 -0
  432. package/dist/services/config/errors.d.ts.map +1 -0
  433. package/dist/services/config/errors.js +3 -0
  434. package/dist/services/config/index.d.ts +4 -0
  435. package/dist/services/config/index.d.ts.map +1 -0
  436. package/dist/services/config/index.js +7 -0
  437. package/dist/services/file-cruiser/errors.d.ts +10 -0
  438. package/dist/services/file-cruiser/errors.d.ts.map +1 -0
  439. package/dist/services/file-cruiser/errors.js +3 -0
  440. package/dist/services/file-cruiser/file-cruiser.d.ts +11 -0
  441. package/dist/services/file-cruiser/file-cruiser.d.ts.map +1 -0
  442. package/dist/services/file-cruiser/file-cruiser.js +7 -0
  443. package/dist/services/file-cruiser/index.d.ts +4 -0
  444. package/dist/services/file-cruiser/index.d.ts.map +1 -0
  445. package/dist/services/file-cruiser/index.js +6 -0
  446. package/dist/services/file-cruiser/oxc/file-scanner.d.ts +5 -0
  447. package/dist/services/file-cruiser/oxc/file-scanner.d.ts.map +1 -0
  448. package/dist/services/file-cruiser/oxc/file-scanner.js +54 -0
  449. package/dist/services/file-cruiser/oxc/import-resolver.d.ts +5 -0
  450. package/dist/services/file-cruiser/oxc/import-resolver.d.ts.map +1 -0
  451. package/dist/services/file-cruiser/oxc/import-resolver.js +44 -0
  452. package/dist/services/file-cruiser/oxc/index.d.ts +2 -0
  453. package/dist/services/file-cruiser/oxc/index.d.ts.map +1 -0
  454. package/dist/services/file-cruiser/oxc/index.js +2 -0
  455. package/dist/services/file-cruiser/oxc/oxc.d.ts +5 -0
  456. package/dist/services/file-cruiser/oxc/oxc.d.ts.map +1 -0
  457. package/dist/services/file-cruiser/oxc/oxc.js +29 -0
  458. package/dist/services/git/changed-paths.d.ts +4 -0
  459. package/dist/services/git/changed-paths.d.ts.map +1 -0
  460. package/dist/services/git/changed-paths.js +85 -0
  461. package/dist/services/git/errors.d.ts +11 -0
  462. package/dist/services/git/errors.d.ts.map +1 -0
  463. package/dist/services/git/errors.js +3 -0
  464. package/dist/services/git/git.d.ts +12 -0
  465. package/dist/services/git/git.d.ts.map +1 -0
  466. package/dist/services/git/git.js +23 -0
  467. package/dist/services/git/index.d.ts +4 -0
  468. package/dist/services/git/index.d.ts.map +1 -0
  469. package/dist/services/git/index.js +6 -0
  470. package/dist/services/git/parse-patch.d.ts +3 -0
  471. package/dist/services/git/parse-patch.d.ts.map +1 -0
  472. package/dist/services/git/parse-patch.js +53 -0
  473. package/dist/services/git/run-git.d.ts +9 -0
  474. package/dist/services/git/run-git.d.ts.map +1 -0
  475. package/dist/services/git/run-git.js +22 -0
  476. package/dist/story/index.d.ts +3 -0
  477. package/dist/story/index.d.ts.map +1 -0
  478. package/dist/story/index.js +2 -0
  479. package/dist/story/schema/index.d.ts +6 -0
  480. package/dist/story/schema/index.d.ts.map +1 -0
  481. package/dist/story/schema/index.js +4 -0
  482. package/dist/story/schema/slug.d.ts +2 -0
  483. package/dist/story/schema/slug.d.ts.map +1 -0
  484. package/dist/story/schema/slug.js +6 -0
  485. package/dist/story/schema/story-report-schema.d.ts +408 -0
  486. package/dist/story/schema/story-report-schema.d.ts.map +1 -0
  487. package/dist/story/schema/story-report-schema.js +94 -0
  488. package/dist/story/schema/story-tree-schema.d.ts +42 -0
  489. package/dist/story/schema/story-tree-schema.d.ts.map +1 -0
  490. package/dist/story/schema/story-tree-schema.js +40 -0
  491. package/dist/story/story.d.ts +38 -0
  492. package/dist/story/story.d.ts.map +1 -0
  493. package/dist/story/story.js +56 -0
  494. package/dist/tests/authoring/index.d.ts +72 -0
  495. package/dist/tests/authoring/index.d.ts.map +1 -0
  496. package/dist/tests/authoring/index.js +312 -0
  497. package/dist/tests/run-tests/index.d.ts +3 -0
  498. package/dist/tests/run-tests/index.d.ts.map +1 -0
  499. package/dist/tests/run-tests/index.js +1 -0
  500. package/dist/tests/run-tests/run-tests.d.ts +26 -0
  501. package/dist/tests/run-tests/run-tests.d.ts.map +1 -0
  502. package/dist/tests/run-tests/run-tests.js +284 -0
  503. package/package.json +36 -24
  504. package/schema.json +212 -0
  505. package/dist/cli/index.d.ts +0 -2
  506. package/dist/cli/index.d.ts.map +0 -1
  507. package/dist/cli/index.js +0 -1
  508. package/dist/engine/1-extract/extract.d.ts.map +0 -1
  509. package/dist/engine/1-extract/index.d.ts +0 -3
  510. package/dist/engine/1-extract/index.d.ts.map +0 -1
  511. package/dist/engine/1-extract/index.js +0 -1
  512. package/dist/engine/2-resolve/index.d.ts +0 -3
  513. package/dist/engine/2-resolve/index.d.ts.map +0 -1
  514. package/dist/engine/2-resolve/index.js +0 -1
  515. package/dist/engine/2-resolve/resolve.d.ts.map +0 -1
  516. package/dist/engine/3-evaluate/evaluate.d.ts.map +0 -1
  517. package/dist/engine/3-evaluate/index.d.ts +0 -3
  518. package/dist/engine/3-evaluate/index.d.ts.map +0 -1
  519. package/dist/engine/3-evaluate/index.js +0 -1
  520. package/dist/engine/4-emit/emit.d.ts +0 -7
  521. package/dist/engine/4-emit/emit.d.ts.map +0 -1
  522. package/dist/engine/4-emit/index.d.ts +0 -2
  523. package/dist/engine/4-emit/index.d.ts.map +0 -1
  524. package/dist/engine/4-emit/index.js +0 -1
  525. package/dist/engine/errors.d.ts +0 -19
  526. package/dist/engine/errors.d.ts.map +0 -1
  527. package/dist/node.d.ts +0 -24
  528. package/dist/node.d.ts.map +0 -1
  529. package/dist/node.js +0 -139
  530. package/dist/report/stories.d.ts +0 -22
  531. package/dist/report/stories.d.ts.map +0 -1
  532. package/dist/report/stories.js +0 -1
  533. package/dist/story/artifact/artifact.d.ts +0 -57
  534. package/dist/story/artifact/artifact.d.ts.map +0 -1
  535. package/dist/story/artifact/artifact.js +0 -234
  536. package/dist/story/artifact/index.d.ts +0 -2
  537. package/dist/story/artifact/index.d.ts.map +0 -1
  538. package/dist/story/artifact/index.js +0 -1
  539. package/dist/story/artifact/storage.d.ts +0 -10
  540. package/dist/story/artifact/storage.d.ts.map +0 -1
  541. package/dist/story/artifact/storage.js +0 -162
  542. package/dist/story/artifact/types.d.ts +0 -74
  543. package/dist/story/artifact/types.d.ts.map +0 -1
  544. package/dist/story/artifact/types.js +0 -1
  545. package/dist/story/core/blocks.d.ts +0 -20
  546. package/dist/story/core/blocks.d.ts.map +0 -1
  547. package/dist/story/core/blocks.js +0 -104
  548. package/dist/story/core/declare.d.ts +0 -63
  549. package/dist/story/core/declare.d.ts.map +0 -1
  550. package/dist/story/core/declare.js +0 -62
  551. package/dist/story/core/index.d.ts +0 -4
  552. package/dist/story/core/index.d.ts.map +0 -1
  553. package/dist/story/core/index.js +0 -1
  554. package/dist/story/core/recorder.d.ts +0 -38
  555. package/dist/story/core/recorder.d.ts.map +0 -1
  556. package/dist/story/core/recorder.js +0 -28
  557. package/dist/story/core/runtime-context.d.ts +0 -14
  558. package/dist/story/core/runtime-context.d.ts.map +0 -1
  559. package/dist/story/core/runtime-context.js +0 -19
  560. package/dist/story/core/types.d.ts +0 -21
  561. package/dist/story/core/types.d.ts.map +0 -1
  562. package/dist/story/core/types.js +0 -1
  563. package/dist/story/effect/effect.d.ts +0 -52
  564. package/dist/story/effect/effect.d.ts.map +0 -1
  565. package/dist/story/effect/effect.js +0 -99
  566. package/dist/story/effect/index.d.ts +0 -3
  567. package/dist/story/effect/index.d.ts.map +0 -1
  568. package/dist/story/effect/index.js +0 -1
  569. package/dist/story/runner/index.d.ts +0 -3
  570. package/dist/story/runner/index.d.ts.map +0 -1
  571. package/dist/story/runner/index.js +0 -1
  572. package/dist/story/runner/runner.d.ts +0 -44
  573. package/dist/story/runner/runner.d.ts.map +0 -1
  574. package/dist/story/runner/runner.js +0 -476
  575. package/dist/story/story-runtime/index.d.ts +0 -2
  576. package/dist/story/story-runtime/index.d.ts.map +0 -1
  577. package/dist/story/story-runtime/index.js +0 -1
  578. package/dist/story/story-runtime/story-runtime.d.ts +0 -52
  579. package/dist/story/story-runtime/story-runtime.d.ts.map +0 -1
  580. package/dist/story/story-runtime/story-runtime.js +0 -194
  581. package/dist/story/vanilla/index.d.ts +0 -29
  582. package/dist/story/vanilla/index.d.ts.map +0 -1
  583. package/dist/story/vanilla/index.js +0 -78
@@ -1,476 +0,0 @@
1
- import { existsSync } from 'node:fs';
2
- import { readdir } from 'node:fs/promises';
3
- import { basename, join, relative, resolve, sep } from 'node:path';
4
- import { Cause, Context, Data, Duration, Effect, Exit, Layer, Option, Ref, } from 'effect';
5
- import { createJiti } from 'jiti';
6
- import { ScenarioRecorder, StoryBlockRegistry, roundMillis, } from '../artifact/index.js';
7
- import { collectDeclaredStories } from '../core/declare.js';
8
- import { CurrentRecorder } from '../core/recorder.js';
9
- export class StoryRunnerError extends Data.TaggedError('StoryRunnerError') {
10
- }
11
- export class StoryDiscoveryError extends Data.TaggedError('StoryDiscoveryError') {
12
- }
13
- const storyFilePattern = /\.story\.[cm]?[jt]sx?$/;
14
- const validStoryFile = /^[a-z0-9]+(?:-[a-z0-9]+)*\.story\.(?:[cm]?[jt]sx?)$/;
15
- const skippedSegments = new Set(['node_modules', 'dist']);
16
- const defaultTimeout = '60 seconds';
17
- const storyRuntimePath = resolve(import.meta.dirname, '../story-runtime/index.js');
18
- export function executeStories(baseDir, filters, options) {
19
- return Effect.suspend(() => {
20
- enableSourceMaps();
21
- return runStoriesGeneration(baseDir, filters, options);
22
- }).pipe(Effect.mapError((cause) => storyRunnerError('execute', cause)));
23
- }
24
- function runStoriesGeneration(baseDir, filters, options) {
25
- return Effect.gen(function* () {
26
- const files = filters.length > 0
27
- ? [...filters].sort()
28
- : yield* discoverStories(baseDir).pipe(Effect.map(({ stories }) => stories.map(({ storyId }) => storyId)));
29
- yield* attempt(() => {
30
- for (const storyId of files) {
31
- validateStoryFile(storyId);
32
- if (!existsSync(resolve(baseDir, storyId))) {
33
- throw new Error(`Story file not found: ${storyId}`);
34
- }
35
- }
36
- });
37
- const failures = [];
38
- const stories = {};
39
- for (const storyId of files) {
40
- const declarations = yield* fromPromise(() => collectDeclaredStories(() => loadStoryModule(baseDir, storyId)));
41
- if (declarations.length !== 1) {
42
- return yield* Effect.fail(new Error(`Story file "${storyId}" must declare exactly one Story`));
43
- }
44
- stories[storyId] = yield* runDeclaredStory(baseDir, storyId, declarations[0], options, failures);
45
- }
46
- return {
47
- status: failures.length === 0 ? 'passed' : 'failed',
48
- report: { stories },
49
- failures,
50
- };
51
- });
52
- }
53
- function runDeclaredStory(baseDir, storyId, declaration, options, failures) {
54
- return Effect.scoped(Effect.gen(function* () {
55
- if (declaration.execution === undefined) {
56
- return yield* Effect.fail(new Error(`Story "${declaration.name}" must declare one execution`));
57
- }
58
- const environment = declaration.execution.layer === undefined
59
- ? Context.empty()
60
- : yield* Layer.build(declaration.execution.layer);
61
- const blocks = new StoryBlockRegistry(baseDir);
62
- const scenarios = [];
63
- for (const declared of declaration.scenarios) {
64
- scenarios.push(yield* runScenario(storyId, declaration, declared, blocks, environment, options, failures));
65
- }
66
- return {
67
- schemaVersion: 3,
68
- generatedAt: Date.now(),
69
- name: declaration.name,
70
- description: declaration.description,
71
- blocks: blocks.toRecord(),
72
- scenarios,
73
- };
74
- }));
75
- }
76
- function runScenario(storyId, story, declared, blocks, environment, options, failures) {
77
- const base = {
78
- name: declared.name,
79
- description: declared.description,
80
- location: {
81
- file: storyId,
82
- line: declared.location.line,
83
- column: declared.location.column,
84
- },
85
- };
86
- if (declared.mode === 'skip') {
87
- return Effect.succeed({
88
- ...base,
89
- outcome: 'skipped',
90
- execution: [],
91
- failures: [],
92
- });
93
- }
94
- const recorder = new ScenarioRecorder(blocks);
95
- const startedAt = Date.now();
96
- const startMonotonic = performance.now();
97
- const scenarioEnvironment = Context.add(environment, CurrentRecorder, recorder);
98
- return runScenarioLifecycle(story, declared, recorder, scenarioEnvironment, options).pipe(Effect.ensuring(Effect.sync(() => recorder.close())), Effect.map((result) => {
99
- const durationMillis = roundMillis(performance.now() - startMonotonic);
100
- for (const failure of result.failures) {
101
- failures.push({
102
- storyId,
103
- scenario: declared.name,
104
- phase: failure.phase,
105
- message: failure.message,
106
- });
107
- }
108
- return {
109
- ...base,
110
- outcome: result.outcome,
111
- startedAt,
112
- durationMillis,
113
- execution: recorder.execution(),
114
- failures: result.failures,
115
- };
116
- }));
117
- }
118
- function runScenarioLifecycle(story, scenario, recorder, environment, options) {
119
- const execution = story.execution;
120
- if (execution === undefined) {
121
- return Effect.fail(new Error(`Story "${story.name}" has no execution`));
122
- }
123
- const timeout = (scenario.run.timeout ??
124
- options?.timeout ??
125
- defaultTimeout);
126
- return Effect.gen(function* () {
127
- const progress = yield* Ref.make({
128
- phase: 'preparation',
129
- failures: [],
130
- interrupted: false,
131
- });
132
- const lifecycleExit = yield* runEffectLifecycle(execution, scenario.run, recorder, progress).pipe(Effect.provide(environment), Effect.timeout(timeout), Effect.exit);
133
- if (Exit.isSuccess(lifecycleExit))
134
- return lifecycleExit.value;
135
- if (!isTimeoutCause(lifecycleExit.cause)) {
136
- return yield* Effect.failCause(lifecycleExit.cause);
137
- }
138
- const current = yield* Ref.get(progress);
139
- return {
140
- outcome: 'interrupted',
141
- failures: [
142
- ...current.failures,
143
- { phase: current.phase, message: timeoutMessage(timeout) },
144
- ],
145
- };
146
- });
147
- }
148
- function runEffectLifecycle(execution, run, recorder, progress) {
149
- return Effect.gen(function* () {
150
- const prepareExit = yield* runEffectPhase(run.prepare).pipe(Effect.exit);
151
- if (Exit.isFailure(prepareExit)) {
152
- yield* recordPhaseFailure(progress, 'preparation', prepareExit.cause);
153
- return yield* scenarioResult(progress);
154
- }
155
- const prepared = prepareExit.value;
156
- const body = Effect.gen(function* () {
157
- yield* setPhase(progress, 'execution');
158
- const executionExit = yield* Effect.acquireUseRelease(Effect.sync(() => recorder.activate()), () => runEffectPhase(() => execution.execute(prepared)).pipe(Effect.exit), () => Effect.sync(() => recorder.deactivate()));
159
- if (Exit.isFailure(executionExit) &&
160
- Cause.hasInterruptsOnly(executionExit.cause)) {
161
- yield* recordPhaseFailure(progress, 'execution', executionExit.cause, 'Story execution was interrupted');
162
- return;
163
- }
164
- const verification = expectedVerification(run.expectation, executionExit, prepared);
165
- if (verification.kind === 'mismatch') {
166
- yield* addFailure(progress, {
167
- phase: 'execution',
168
- message: verification.message,
169
- });
170
- return;
171
- }
172
- yield* setPhase(progress, 'verification');
173
- const verificationExit = yield* runEffectPhase(verification.verify).pipe(Effect.exit);
174
- if (Exit.isFailure(verificationExit)) {
175
- yield* recordPhaseFailure(progress, 'verification', verificationExit.cause);
176
- }
177
- });
178
- yield* Effect.onExitPrimitive(body, (bodyExit) => runCleanup(run, prepared, progress, bodyExit), true);
179
- return yield* scenarioResult(progress);
180
- });
181
- }
182
- function runEffectPhase(phase) {
183
- return Effect.suspend(phase);
184
- }
185
- function expectedVerification(expectation, executionExit, prepared) {
186
- if (expectation.kind === 'success') {
187
- return Exit.isSuccess(executionExit)
188
- ? {
189
- kind: 'verify',
190
- verify: () => expectation.verify(executionExit.value, prepared),
191
- }
192
- : {
193
- kind: 'mismatch',
194
- message: `Expected a success value but execution failed: ${describeFailure(Cause.squash(executionExit.cause))}`,
195
- };
196
- }
197
- if (Exit.isSuccess(executionExit)) {
198
- return {
199
- kind: 'mismatch',
200
- message: 'Expected a typed error but execution succeeded',
201
- };
202
- }
203
- if (Cause.hasDies(executionExit.cause) ||
204
- Cause.hasInterrupts(executionExit.cause)) {
205
- return {
206
- kind: 'mismatch',
207
- message: `Expected a typed error but execution terminated unexpectedly: ${describeFailure(Cause.squash(executionExit.cause))}`,
208
- };
209
- }
210
- const error = Cause.findErrorOption(executionExit.cause);
211
- return Option.isSome(error)
212
- ? {
213
- kind: 'verify',
214
- verify: () => expectation.verify(error.value, prepared),
215
- }
216
- : {
217
- kind: 'mismatch',
218
- message: 'Expected a typed error but execution produced none',
219
- };
220
- }
221
- function runCleanup(run, prepared, progress, bodyExit) {
222
- if (run.cleanup === undefined)
223
- return Effect.void;
224
- return Effect.gen(function* () {
225
- if (Exit.isSuccess(bodyExit) || !Cause.hasInterruptsOnly(bodyExit.cause)) {
226
- yield* setPhase(progress, 'cleanup');
227
- }
228
- const cleanupExit = yield* runEffectPhase(() => run.cleanup(prepared)).pipe(Effect.exit);
229
- if (Exit.isFailure(cleanupExit)) {
230
- yield* recordPhaseFailure(progress, 'cleanup', cleanupExit.cause);
231
- }
232
- });
233
- }
234
- function setPhase(progress, phase) {
235
- return Ref.update(progress, (current) => ({ ...current, phase }));
236
- }
237
- function addFailure(progress, failure, interrupted = false) {
238
- return Ref.update(progress, (current) => ({
239
- ...current,
240
- failures: [...current.failures, failure],
241
- interrupted: current.interrupted || interrupted,
242
- }));
243
- }
244
- function recordPhaseFailure(progress, phase, cause, interruptionMessage) {
245
- const interrupted = Cause.hasInterruptsOnly(cause);
246
- return addFailure(progress, {
247
- phase,
248
- message: interrupted && interruptionMessage !== undefined
249
- ? interruptionMessage
250
- : describeFailure(Cause.squash(cause)),
251
- }, interrupted);
252
- }
253
- function scenarioResult(progress) {
254
- return Ref.get(progress).pipe(Effect.map((current) => ({
255
- outcome: current.interrupted
256
- ? 'interrupted'
257
- : current.failures.length === 0
258
- ? 'succeeded'
259
- : 'failed',
260
- failures: current.failures,
261
- })));
262
- }
263
- function isTimeoutCause(cause) {
264
- const error = Cause.findErrorOption(cause);
265
- return Option.isSome(error) && Cause.isTimeoutError(error.value);
266
- }
267
- async function loadStoryModule(baseDir, storyId) {
268
- const path = resolve(baseDir, storyId);
269
- const jiti = createJiti(import.meta.url, {
270
- alias: { 'laymos/story': storyRuntimePath },
271
- interopDefault: true,
272
- moduleCache: false,
273
- });
274
- await jiti.import(path);
275
- }
276
- export function discoverStories(baseDir) {
277
- return Effect.tryPromise({
278
- try: () => buildStoryCatalog(baseDir),
279
- catch: (cause) => cause instanceof StoryDiscoveryError
280
- ? cause
281
- : discoveryError([{ message: errorMessage(cause) }]),
282
- });
283
- }
284
- async function buildStoryCatalog(baseDir) {
285
- const { storyIds, issues } = await discoverStoryFileIds(baseDir);
286
- const declarations = [];
287
- for (const storyId of storyIds) {
288
- try {
289
- const found = await collectDeclaredStories(() => loadStoryModule(baseDir, storyId));
290
- if (found.length !== 1) {
291
- issues.push({
292
- storyId,
293
- message: `must declare exactly one Story; found ${found.length}`,
294
- });
295
- continue;
296
- }
297
- declarations.push({ storyId, declaration: found[0] });
298
- }
299
- catch (cause) {
300
- issues.push({ storyId, message: errorMessage(cause) });
301
- }
302
- }
303
- const catalog = validateStoryCatalog(declarations, issues);
304
- if (issues.length > 0)
305
- throw discoveryError(issues);
306
- return catalog;
307
- }
308
- async function discoverStoryFileIds(baseDir) {
309
- const storyIds = [];
310
- const issues = [];
311
- const directories = [baseDir];
312
- while (directories.length > 0) {
313
- const directory = directories.pop();
314
- const entries = await readdir(directory, { withFileTypes: true });
315
- for (const entry of entries) {
316
- if (entry.isDirectory()) {
317
- if (skippedSegments.has(entry.name) || entry.name.startsWith('.')) {
318
- continue;
319
- }
320
- directories.push(join(directory, entry.name));
321
- continue;
322
- }
323
- if (!entry.isFile() || !storyFilePattern.test(entry.name))
324
- continue;
325
- const storyId = relative(baseDir, join(directory, entry.name))
326
- .split(sep)
327
- .join('/');
328
- storyIds.push(storyId);
329
- try {
330
- validateStoryFile(storyId);
331
- }
332
- catch (cause) {
333
- issues.push({ storyId, message: errorMessage(cause) });
334
- }
335
- }
336
- }
337
- storyIds.sort();
338
- return { storyIds, issues };
339
- }
340
- function validateStoryCatalog(declarations, issues) {
341
- const groups = new Map();
342
- const stories = [];
343
- const destinations = new Map();
344
- const registerDestination = (parentPath, name, kind, storyId) => {
345
- const siblings = destinations.get(pathKey(parentPath)) ?? new Map();
346
- destinations.set(pathKey(parentPath), siblings);
347
- const existing = siblings.get(name);
348
- if (existing === undefined) {
349
- siblings.set(name, { kind, storyId });
350
- return;
351
- }
352
- if (kind === 'Group' && existing.kind === 'Group')
353
- return;
354
- issues.push({
355
- storyId,
356
- message: `${kind} "${displayPath([...parentPath, name])}" conflicts with ${existing.kind} declared by "${existing.storyId}"`,
357
- });
358
- };
359
- for (const { storyId, declaration } of declarations) {
360
- const lineage = storyGroupLineage(declaration.group, storyId, issues);
361
- const groupPath = [];
362
- for (const group of lineage) {
363
- const parentPath = [...groupPath];
364
- groupPath.push(group.name);
365
- const key = pathKey(groupPath);
366
- const existing = groups.get(key);
367
- if (existing === undefined) {
368
- groups.set(key, {
369
- path: [...groupPath],
370
- name: group.name,
371
- description: group.description,
372
- storyId,
373
- });
374
- }
375
- else if (existing.description !== group.description) {
376
- issues.push({
377
- storyId,
378
- message: `Story Group "${displayPath(groupPath)}" conflicts with metadata declared by "${existing.storyId}"`,
379
- });
380
- }
381
- registerDestination(parentPath, group.name, 'Group', storyId);
382
- }
383
- registerDestination(groupPath, declaration.name, 'Story', storyId);
384
- stories.push({
385
- storyId,
386
- name: declaration.name,
387
- description: declaration.description,
388
- groupPath,
389
- });
390
- }
391
- return {
392
- groups: [...groups.values()]
393
- .map(({ storyId: _storyId, ...group }) => group)
394
- .sort((left, right) => comparePaths(left.path, right.path)),
395
- stories: stories.sort((left, right) => comparePaths(left.groupPath, right.groupPath) ||
396
- left.name.localeCompare(right.name) ||
397
- left.storyId.localeCompare(right.storyId)),
398
- };
399
- }
400
- function storyGroupLineage(leaf, storyId, issues) {
401
- const reversed = [];
402
- const seen = new Set();
403
- let current = leaf;
404
- while (current !== undefined) {
405
- if (seen.has(current)) {
406
- issues.push({
407
- storyId,
408
- message: 'Story Group ancestry contains a cycle',
409
- });
410
- return [];
411
- }
412
- seen.add(current);
413
- reversed.push(current);
414
- current = current.parent;
415
- }
416
- return reversed.reverse();
417
- }
418
- const pathKey = (path) => JSON.stringify(path);
419
- const displayPath = (path) => path.join(' / ');
420
- function comparePaths(left, right) {
421
- for (let index = 0; index < Math.min(left.length, right.length); index++) {
422
- const compared = left[index].localeCompare(right[index]);
423
- if (compared !== 0)
424
- return compared;
425
- }
426
- return left.length - right.length;
427
- }
428
- function discoveryError(issues) {
429
- const details = issues.map(({ storyId, message }) => `- ${storyId === undefined ? message : `${storyId}: ${message}`}`);
430
- return new StoryDiscoveryError({
431
- message: `Story catalog is invalid:\n${details.join('\n')}`,
432
- issues,
433
- });
434
- }
435
- function validateStoryFile(storyId) {
436
- if (!validStoryFile.test(basename(storyId))) {
437
- throw new Error(`Story file "${storyId}" must use the kebab-case <story-name>.story.ts convention`);
438
- }
439
- }
440
- function timeoutMessage(timeout) {
441
- const millis = typeof timeout === 'number' ? timeout : Duration.toMillis(timeout);
442
- return `Scenario timed out after ${millis}ms`;
443
- }
444
- function describeFailure(failure) {
445
- if (failure instanceof Error)
446
- return failure.message;
447
- if (typeof failure === 'string')
448
- return failure;
449
- return String(failure);
450
- }
451
- function errorMessage(cause) {
452
- return cause instanceof Error ? cause.message : String(cause);
453
- }
454
- function enableSourceMaps() {
455
- try {
456
- process.setSourceMapsEnabled(true);
457
- }
458
- catch {
459
- // best-effort; some runtimes do not implement it
460
- }
461
- }
462
- function fromPromise(body) {
463
- return Effect.tryPromise({ try: body, catch: (cause) => cause });
464
- }
465
- function attempt(body) {
466
- return Effect.try({ try: body, catch: (cause) => cause });
467
- }
468
- function storyRunnerError(operation, cause) {
469
- if (cause instanceof StoryRunnerError)
470
- return cause;
471
- return new StoryRunnerError({
472
- operation,
473
- message: describeFailure(cause),
474
- cause,
475
- });
476
- }
@@ -1,2 +0,0 @@
1
- export { decision, functionBlock, step, story, storyGroup, } from './story-runtime.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/story/story-runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,KAAK,EACL,UAAU,GACX,MAAM,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- export { decision, functionBlock, step, story, storyGroup, } from './story-runtime.js';
@@ -1,52 +0,0 @@
1
- import { Effect } from 'effect';
2
- import type { Duration, Layer } from 'effect';
3
- import type { ArmMeta, BlockMeta, DecisionValue, StoryGroupMeta, StoryMeta } from '../core/types.js';
4
- export interface ScenarioMeta {
5
- readonly description: string;
6
- readonly timeout?: Duration.Input;
7
- }
8
- export interface EffectVerifiedScenario<Prepared, R> {
9
- cleanup<E>(cleanup: (prepared: Prepared) => Effect.Effect<unknown, E, R>): EffectVerifiedScenario<Prepared, R>;
10
- }
11
- export interface EffectPreparedScenario<Prepared, Output, Error, R> {
12
- cleanup<CleanupError>(cleanup: (prepared: Prepared) => Effect.Effect<unknown, CleanupError, R>): EffectPreparedScenario<Prepared, Output, Error, R>;
13
- verify<VerificationError>(verify: (output: Output, prepared: Prepared) => Effect.Effect<unknown, VerificationError, R>): EffectVerifiedScenario<Prepared, R>;
14
- verifyError<VerificationError>(verify: (error: Error, prepared: Prepared) => Effect.Effect<unknown, VerificationError, R>): EffectVerifiedScenario<Prepared, R>;
15
- }
16
- export interface EffectScenario<Prepared, Output, Error, R> {
17
- prepare<PreparationError>(prepare: () => Effect.Effect<Prepared, PreparationError, R>): EffectPreparedScenario<Prepared, Output, Error, R>;
18
- }
19
- export interface EffectStory<Prepared, Output, Error, R> {
20
- scenario(name: string, meta: ScenarioMeta, define: (scenario: EffectScenario<Prepared, Output, Error, R>) => EffectVerifiedScenario<Prepared, R>): EffectStory<Prepared, Output, Error, R>;
21
- skip(name: string, meta: ScenarioMeta): EffectStory<Prepared, Output, Error, R>;
22
- }
23
- export interface EffectStoryBuilder<R> {
24
- provide<Services, LayerError>(layer: Layer.Layer<Services, LayerError, never>): EffectStoryBuilder<Services>;
25
- execute<Prepared, Output, Error>(execute: (prepared: Prepared) => Effect.Effect<Output, Error, R>): EffectStory<Prepared, Output, Error, R>;
26
- }
27
- export interface EffectStoryGroup {
28
- group(name: string, meta: StoryGroupMeta): EffectStoryGroup;
29
- story(name: string, meta: StoryMeta): EffectStoryBuilder<never>;
30
- }
31
- /** Declares the single Story owned by a Story file. */
32
- export declare function story(name: string, meta: StoryMeta): EffectStoryBuilder<never>;
33
- /** Declares a reusable Story Group. */
34
- export declare function storyGroup(name: string, meta: StoryGroupMeta): EffectStoryGroup;
35
- type AnyEffect = Effect.Effect<any, any, any>;
36
- type Success<T> = T extends Effect.Effect<infer A, any, any> ? A : never;
37
- type Error<T> = T extends Effect.Effect<any, infer E, any> ? E : never;
38
- type Services<T> = T extends Effect.Effect<any, any, infer R> ? R : never;
39
- export interface DecisionBuilder<Remaining extends DecisionValue, A, E, R> {
40
- when<Key extends Remaining, Next extends AnyEffect>(value: Key, meta: ArmMeta, body: (value: Key) => Next): DecisionBuilder<Exclude<Remaining, Key>, A | Success<Next>, E | Error<Next>, R | Services<Next>>;
41
- otherwise<Next extends AnyEffect>(meta: ArmMeta, body: (value: Remaining) => Next): Effect.Effect<A | Success<Next>, E | Error<Next>, R | Services<Next>>;
42
- readonly exhaustive: [Remaining] extends [never] ? () => Effect.Effect<A, E, R> : never;
43
- [Symbol.iterator](): Effect.EffectIterator<Effect.Effect<A, E, R>>;
44
- }
45
- /** Marks a reusable Effect-returning function boundary as a Story Block. */
46
- export declare function functionBlock<Args extends readonly unknown[], A, E, R>(name: string, meta: BlockMeta<Args>, fn: (...args: Args) => Effect.Effect<A, E, R>): (...args: Args) => Effect.Effect<A, E, R>;
47
- /** Wraps an Effect in an inline Story Block. */
48
- export declare function step<A, E, R>(name: string, meta: BlockMeta, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
49
- /** Builds an eager, literal-keyed Effect Decision. */
50
- export declare function decision<const Input extends DecisionValue>(name: string, meta: BlockMeta<[Input]>, input: Input): DecisionBuilder<Input, never, never, never>;
51
- export {};
52
- //# sourceMappingURL=story-runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"story-runtime.d.ts","sourceRoot":"","sources":["../../../src/story/story-runtime/story-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,MAAM,EAAQ,MAAM,QAAQ,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAoB9C,OAAO,KAAK,EACV,OAAO,EAEP,SAAS,EACT,aAAa,EACb,cAAc,EACd,SAAS,EACV,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;CACnC;AAED,MAAM,WAAW,sBAAsB,CAAC,QAAQ,EAAE,CAAC;IACjD,OAAO,CAAC,CAAC,EACP,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,GAC5D,sBAAsB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAChE,OAAO,CAAC,YAAY,EAClB,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC,GACvE,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,iBAAiB,EACtB,MAAM,EAAE,CACN,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,KACf,MAAM,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