@fyuld/pano 0.1.8 → 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 (286) hide show
  1. package/dist/compile-principle.d.ts +3 -0
  2. package/dist/compile-principle.d.ts.map +1 -0
  3. package/dist/compile-principle.js +44 -0
  4. package/dist/compile-principle.js.map +1 -0
  5. package/dist/config-error.d.ts +6 -0
  6. package/dist/config-error.d.ts.map +1 -0
  7. package/dist/config-error.js +14 -0
  8. package/dist/config-error.js.map +1 -0
  9. package/dist/finding-error.d.ts +6 -0
  10. package/dist/finding-error.d.ts.map +1 -0
  11. package/dist/finding-error.js +14 -0
  12. package/dist/finding-error.js.map +1 -0
  13. package/dist/format.d.ts +1 -0
  14. package/dist/format.d.ts.map +1 -1
  15. package/dist/format.js +2 -1
  16. package/dist/format.js.map +1 -1
  17. package/dist/pano.d.ts +1 -1
  18. package/dist/pano.d.ts.map +1 -1
  19. package/dist/pano.js +283 -153
  20. package/dist/pano.js.map +1 -1
  21. package/dist/principles-compile.d.ts +6 -0
  22. package/dist/principles-compile.d.ts.map +1 -0
  23. package/dist/principles-compile.js +57 -0
  24. package/dist/principles-compile.js.map +1 -0
  25. package/dist/principles-verify.d.ts +7 -0
  26. package/dist/principles-verify.d.ts.map +1 -0
  27. package/dist/principles-verify.js +63 -0
  28. package/dist/principles-verify.js.map +1 -0
  29. package/dist/render-markdown-ansi.d.ts +2 -0
  30. package/dist/render-markdown-ansi.d.ts.map +1 -0
  31. package/dist/render-markdown-ansi.js +114 -0
  32. package/dist/render-markdown-ansi.js.map +1 -0
  33. package/dist/render-run-report.d.ts +3 -0
  34. package/dist/render-run-report.d.ts.map +1 -0
  35. package/dist/render-run-report.js +101 -0
  36. package/dist/render-run-report.js.map +1 -0
  37. package/dist/write-findings.d.ts +4 -0
  38. package/dist/write-findings.d.ts.map +1 -0
  39. package/dist/write-findings.js +58 -0
  40. package/dist/write-findings.js.map +1 -0
  41. package/dist/write-remarks.d.ts +3 -0
  42. package/dist/write-remarks.d.ts.map +1 -0
  43. package/dist/write-remarks.js +47 -0
  44. package/dist/write-remarks.js.map +1 -0
  45. package/node_modules/@fyuld/pano-bdd/dist/generate-bdd-steps-for-ux.d.ts +2 -0
  46. package/node_modules/@fyuld/pano-bdd/dist/generate-bdd-steps-for-ux.d.ts.map +1 -0
  47. package/node_modules/@fyuld/pano-bdd/dist/generate-bdd-steps-for-ux.js +40 -0
  48. package/node_modules/@fyuld/pano-bdd/dist/generate-bdd-steps-for-ux.js.map +1 -0
  49. package/node_modules/@fyuld/pano-bdd/dist/index.d.ts +2 -0
  50. package/node_modules/@fyuld/pano-bdd/dist/index.d.ts.map +1 -0
  51. package/node_modules/@fyuld/pano-bdd/dist/index.js +6 -0
  52. package/node_modules/@fyuld/pano-bdd/dist/index.js.map +1 -0
  53. package/node_modules/@fyuld/pano-bdd/package.json +36 -0
  54. package/node_modules/@fyuld/pano-dm/dist/config/PanOpticumConfig.d.ts +11 -0
  55. package/node_modules/@fyuld/pano-dm/dist/config/PanOpticumConfig.d.ts.map +1 -0
  56. package/node_modules/@fyuld/pano-dm/dist/config/PanOpticumConfig.js +3 -0
  57. package/node_modules/@fyuld/pano-dm/dist/config/PanOpticumConfig.js.map +1 -0
  58. package/node_modules/@fyuld/pano-dm/dist/config/index.d.ts +2 -0
  59. package/node_modules/@fyuld/pano-dm/dist/config/index.d.ts.map +1 -0
  60. package/node_modules/@fyuld/pano-dm/dist/config/index.js +3 -0
  61. package/node_modules/@fyuld/pano-dm/dist/config/index.js.map +1 -0
  62. package/node_modules/@fyuld/pano-dm/dist/entities/common.d.ts +3 -0
  63. package/node_modules/@fyuld/pano-dm/dist/entities/common.d.ts.map +1 -0
  64. package/node_modules/@fyuld/pano-dm/dist/entities/common.js +5 -0
  65. package/node_modules/@fyuld/pano-dm/dist/entities/common.js.map +1 -0
  66. package/node_modules/@fyuld/pano-dm/dist/entities/file-extension.d.ts +5 -0
  67. package/node_modules/@fyuld/pano-dm/dist/entities/file-extension.d.ts.map +1 -0
  68. package/node_modules/@fyuld/pano-dm/dist/entities/file-extension.js +9 -0
  69. package/node_modules/@fyuld/pano-dm/dist/entities/file-extension.js.map +1 -0
  70. package/node_modules/@fyuld/pano-dm/dist/entities/finding.d.ts +11 -0
  71. package/node_modules/@fyuld/pano-dm/dist/entities/finding.d.ts.map +1 -0
  72. package/node_modules/@fyuld/pano-dm/dist/entities/finding.js +3 -0
  73. package/node_modules/@fyuld/pano-dm/dist/entities/finding.js.map +1 -0
  74. package/node_modules/@fyuld/pano-dm/dist/entities/index.d.ts +7 -0
  75. package/node_modules/@fyuld/pano-dm/dist/entities/index.d.ts.map +1 -0
  76. package/node_modules/@fyuld/pano-dm/dist/entities/index.js +23 -0
  77. package/node_modules/@fyuld/pano-dm/dist/entities/index.js.map +1 -0
  78. package/node_modules/@fyuld/pano-dm/dist/entities/occurrence.d.ts +10 -0
  79. package/node_modules/@fyuld/pano-dm/dist/entities/occurrence.d.ts.map +1 -0
  80. package/node_modules/@fyuld/pano-dm/dist/entities/occurrence.js +3 -0
  81. package/node_modules/@fyuld/pano-dm/dist/entities/occurrence.js.map +1 -0
  82. package/node_modules/@fyuld/pano-dm/dist/entities/principle.d.ts +15 -0
  83. package/node_modules/@fyuld/pano-dm/dist/entities/principle.d.ts.map +1 -0
  84. package/node_modules/@fyuld/pano-dm/dist/entities/principle.js +3 -0
  85. package/node_modules/@fyuld/pano-dm/dist/entities/principle.js.map +1 -0
  86. package/node_modules/@fyuld/pano-dm/dist/entities/remark.d.ts +13 -0
  87. package/node_modules/@fyuld/pano-dm/dist/entities/remark.d.ts.map +1 -0
  88. package/node_modules/@fyuld/pano-dm/dist/entities/remark.js +3 -0
  89. package/node_modules/@fyuld/pano-dm/dist/entities/remark.js.map +1 -0
  90. package/node_modules/@fyuld/pano-dm/dist/index.d.ts +3 -0
  91. package/node_modules/@fyuld/pano-dm/dist/index.d.ts.map +1 -0
  92. package/node_modules/@fyuld/pano-dm/dist/index.js +19 -0
  93. package/node_modules/@fyuld/pano-dm/dist/index.js.map +1 -0
  94. package/node_modules/@fyuld/pano-dm/package.json +40 -0
  95. package/node_modules/@fyuld/pano-engine/dist/assessments/collect-findings.d.ts +9 -0
  96. package/node_modules/@fyuld/pano-engine/dist/assessments/collect-findings.d.ts.map +1 -0
  97. package/node_modules/@fyuld/pano-engine/dist/assessments/collect-findings.js +29 -0
  98. package/node_modules/@fyuld/pano-engine/dist/assessments/collect-findings.js.map +1 -0
  99. package/node_modules/@fyuld/pano-engine/dist/assessments/collect-occurrences.d.ts +8 -0
  100. package/node_modules/@fyuld/pano-engine/dist/assessments/collect-occurrences.d.ts.map +1 -0
  101. package/node_modules/@fyuld/pano-engine/dist/assessments/collect-occurrences.js +116 -0
  102. package/node_modules/@fyuld/pano-engine/dist/assessments/collect-occurrences.js.map +1 -0
  103. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/find-complex-conditional-expressions.d.ts +3 -0
  104. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/find-complex-conditional-expressions.d.ts.map +1 -0
  105. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/find-complex-conditional-expressions.js +6 -0
  106. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/find-complex-conditional-expressions.js.map +1 -0
  107. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/index.d.ts +3 -0
  108. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/index.d.ts.map +1 -0
  109. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/index.js +8 -0
  110. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/index.js.map +1 -0
  111. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/scan-conditional-expressions.d.ts +3 -0
  112. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/scan-conditional-expressions.d.ts.map +1 -0
  113. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/scan-conditional-expressions.js +94 -0
  114. package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/scan-conditional-expressions.js.map +1 -0
  115. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/find-duplicate-declarations.d.ts +3 -0
  116. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/find-duplicate-declarations.d.ts.map +1 -0
  117. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/find-duplicate-declarations.js +19 -0
  118. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/find-duplicate-declarations.js.map +1 -0
  119. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/index.d.ts +3 -0
  120. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/index.d.ts.map +1 -0
  121. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/index.js +8 -0
  122. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/index.js.map +1 -0
  123. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/scan-declarations.d.ts +3 -0
  124. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/scan-declarations.d.ts.map +1 -0
  125. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/scan-declarations.js +97 -0
  126. package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/scan-declarations.js.map +1 -0
  127. package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/index.d.ts +2 -0
  128. package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/index.d.ts.map +1 -0
  129. package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/index.js +6 -0
  130. package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/index.js.map +1 -0
  131. package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/scan-fixture-files.d.ts +3 -0
  132. package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/scan-fixture-files.d.ts.map +1 -0
  133. package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/scan-fixture-files.js +15 -0
  134. package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/scan-fixture-files.js.map +1 -0
  135. package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/index.d.ts +2 -0
  136. package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/index.d.ts.map +1 -0
  137. package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/index.js +6 -0
  138. package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/index.js.map +1 -0
  139. package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/scan-index-files.d.ts +3 -0
  140. package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/scan-index-files.d.ts.map +1 -0
  141. package/{dist/assessments/index-files/index.js → node_modules/@fyuld/pano-engine/dist/assessments/index-files/scan-index-files.js} +38 -43
  142. package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/scan-index-files.js.map +1 -0
  143. package/node_modules/@fyuld/pano-engine/dist/assessments/scanned-row.d.ts +7 -0
  144. package/node_modules/@fyuld/pano-engine/dist/assessments/scanned-row.d.ts.map +1 -0
  145. package/node_modules/@fyuld/pano-engine/dist/assessments/scanned-row.js +3 -0
  146. package/node_modules/@fyuld/pano-engine/dist/assessments/scanned-row.js.map +1 -0
  147. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/find-duplicate-string-literals.d.ts +3 -0
  148. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/find-duplicate-string-literals.d.ts.map +1 -0
  149. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/find-duplicate-string-literals.js +16 -0
  150. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/find-duplicate-string-literals.js.map +1 -0
  151. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/index.d.ts +3 -0
  152. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/index.d.ts.map +1 -0
  153. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/index.js +8 -0
  154. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/index.js.map +1 -0
  155. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/scan-string-literals.d.ts +3 -0
  156. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/scan-string-literals.d.ts.map +1 -0
  157. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/scan-string-literals.js +131 -0
  158. package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/scan-string-literals.js.map +1 -0
  159. package/node_modules/@fyuld/pano-engine/dist/index.d.ts +11 -0
  160. package/node_modules/@fyuld/pano-engine/dist/index.d.ts.map +1 -0
  161. package/node_modules/@fyuld/pano-engine/dist/index.js +27 -0
  162. package/node_modules/@fyuld/pano-engine/dist/index.js.map +1 -0
  163. package/node_modules/@fyuld/pano-engine/dist/languages/terraform/index.d.ts +3 -0
  164. package/node_modules/@fyuld/pano-engine/dist/languages/terraform/index.d.ts.map +1 -0
  165. package/node_modules/@fyuld/pano-engine/dist/languages/terraform/index.js +7 -0
  166. package/node_modules/@fyuld/pano-engine/dist/languages/terraform/index.js.map +1 -0
  167. package/node_modules/@fyuld/pano-engine/dist/languages/terraform/parser.d.ts +15 -0
  168. package/node_modules/@fyuld/pano-engine/dist/languages/terraform/parser.d.ts.map +1 -0
  169. package/node_modules/@fyuld/pano-engine/dist/languages/terraform/parser.js +58 -0
  170. package/node_modules/@fyuld/pano-engine/dist/languages/terraform/parser.js.map +1 -0
  171. package/node_modules/@fyuld/pano-engine/dist/languages/typescript/index.d.ts +3 -0
  172. package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/index.d.ts.map +1 -1
  173. package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/index.js +0 -1
  174. package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/index.js.map +1 -1
  175. package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/parser.d.ts +1 -0
  176. package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/parser.d.ts.map +1 -1
  177. package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/parser.js +25 -1
  178. package/node_modules/@fyuld/pano-engine/dist/languages/typescript/parser.js.map +1 -0
  179. package/node_modules/@fyuld/pano-engine/dist/principles/evaluate-constraint.d.ts +2 -0
  180. package/node_modules/@fyuld/pano-engine/dist/principles/evaluate-constraint.d.ts.map +1 -0
  181. package/node_modules/@fyuld/pano-engine/dist/principles/evaluate-constraint.js +11 -0
  182. package/node_modules/@fyuld/pano-engine/dist/principles/evaluate-constraint.js.map +1 -0
  183. package/node_modules/@fyuld/pano-engine/dist/principles/render-remarks.d.ts +4 -0
  184. package/node_modules/@fyuld/pano-engine/dist/principles/render-remarks.d.ts.map +1 -0
  185. package/node_modules/@fyuld/pano-engine/dist/principles/render-remarks.js +11 -0
  186. package/node_modules/@fyuld/pano-engine/dist/principles/render-remarks.js.map +1 -0
  187. package/node_modules/@fyuld/pano-engine/dist/principles/run-principles.d.ts +9 -0
  188. package/node_modules/@fyuld/pano-engine/dist/principles/run-principles.d.ts.map +1 -0
  189. package/node_modules/@fyuld/pano-engine/dist/principles/run-principles.js +22 -0
  190. package/node_modules/@fyuld/pano-engine/dist/principles/run-principles.js.map +1 -0
  191. package/node_modules/@fyuld/pano-engine/dist/principles/violation-to-be-renamed-to-remark.d.ts +3 -0
  192. package/node_modules/@fyuld/pano-engine/dist/principles/violation-to-be-renamed-to-remark.d.ts.map +1 -0
  193. package/node_modules/@fyuld/pano-engine/dist/principles/violation-to-be-renamed-to-remark.js +3 -0
  194. package/node_modules/@fyuld/pano-engine/dist/principles/violation-to-be-renamed-to-remark.js.map +1 -0
  195. package/node_modules/@fyuld/pano-engine/dist/render/index.d.ts +4 -0
  196. package/node_modules/@fyuld/pano-engine/dist/render/index.d.ts.map +1 -0
  197. package/node_modules/@fyuld/pano-engine/dist/render/index.js +10 -0
  198. package/node_modules/@fyuld/pano-engine/dist/render/index.js.map +1 -0
  199. package/node_modules/@fyuld/pano-engine/dist/render/render-csv.d.ts +3 -0
  200. package/node_modules/@fyuld/pano-engine/dist/render/render-csv.d.ts.map +1 -0
  201. package/node_modules/@fyuld/pano-engine/dist/render/render-csv.js +13 -0
  202. package/node_modules/@fyuld/pano-engine/dist/render/render-csv.js.map +1 -0
  203. package/node_modules/@fyuld/pano-engine/dist/render/render-helpers.d.ts +4 -0
  204. package/node_modules/@fyuld/pano-engine/dist/render/render-helpers.d.ts.map +1 -0
  205. package/node_modules/@fyuld/pano-engine/dist/render/render-helpers.js +24 -0
  206. package/node_modules/@fyuld/pano-engine/dist/render/render-helpers.js.map +1 -0
  207. package/node_modules/@fyuld/pano-engine/dist/render/render-json.d.ts +3 -0
  208. package/node_modules/@fyuld/pano-engine/dist/render/render-json.d.ts.map +1 -0
  209. package/node_modules/@fyuld/pano-engine/dist/render/render-json.js +6 -0
  210. package/node_modules/@fyuld/pano-engine/dist/render/render-json.js.map +1 -0
  211. package/node_modules/@fyuld/pano-engine/dist/render/render-md.d.ts +3 -0
  212. package/node_modules/@fyuld/pano-engine/dist/render/render-md.d.ts.map +1 -0
  213. package/node_modules/@fyuld/pano-engine/dist/render/render-md.js +14 -0
  214. package/node_modules/@fyuld/pano-engine/dist/render/render-md.js.map +1 -0
  215. package/node_modules/@fyuld/pano-engine/package.json +51 -0
  216. package/node_modules/@fyuld/pano-errors/dist/aggregateErrors.d.ts +3 -0
  217. package/node_modules/@fyuld/pano-errors/dist/aggregateErrors.d.ts.map +1 -0
  218. package/node_modules/@fyuld/pano-errors/dist/aggregateErrors.js +15 -0
  219. package/node_modules/@fyuld/pano-errors/dist/aggregateErrors.js.map +1 -0
  220. package/node_modules/@fyuld/pano-errors/dist/aggregateThrows.d.ts +3 -0
  221. package/node_modules/@fyuld/pano-errors/dist/aggregateThrows.d.ts.map +1 -0
  222. package/node_modules/@fyuld/pano-errors/dist/aggregateThrows.js +13 -0
  223. package/node_modules/@fyuld/pano-errors/dist/aggregateThrows.js.map +1 -0
  224. package/node_modules/@fyuld/pano-errors/dist/error-declarations.d.ts +10 -0
  225. package/node_modules/@fyuld/pano-errors/dist/error-declarations.d.ts.map +1 -0
  226. package/node_modules/@fyuld/pano-errors/dist/error-declarations.js +63 -0
  227. package/node_modules/@fyuld/pano-errors/dist/error-declarations.js.map +1 -0
  228. package/node_modules/@fyuld/pano-errors/dist/errors.d.ts +21 -0
  229. package/node_modules/@fyuld/pano-errors/dist/errors.d.ts.map +1 -0
  230. package/node_modules/@fyuld/pano-errors/dist/errors.js +179 -0
  231. package/node_modules/@fyuld/pano-errors/dist/errors.js.map +1 -0
  232. package/node_modules/@fyuld/pano-errors/dist/index.d.ts +3 -0
  233. package/node_modules/@fyuld/pano-errors/dist/index.d.ts.map +1 -0
  234. package/node_modules/@fyuld/pano-errors/dist/index.js +8 -0
  235. package/node_modules/@fyuld/pano-errors/dist/index.js.map +1 -0
  236. package/node_modules/@fyuld/pano-errors/package.json +41 -0
  237. package/package.json +23 -13
  238. package/dist/assessments/classes/index.d.ts +0 -15
  239. package/dist/assessments/classes/index.d.ts.map +0 -1
  240. package/dist/assessments/classes/index.js +0 -112
  241. package/dist/assessments/classes/index.js.map +0 -1
  242. package/dist/assessments/index-files/index.d.ts +0 -13
  243. package/dist/assessments/index-files/index.d.ts.map +0 -1
  244. package/dist/assessments/index-files/index.js.map +0 -1
  245. package/dist/assessments/throws/index.d.ts +0 -16
  246. package/dist/assessments/throws/index.d.ts.map +0 -1
  247. package/dist/assessments/throws/index.js +0 -110
  248. package/dist/assessments/throws/index.js.map +0 -1
  249. package/dist/assessments/types/index.d.ts +0 -14
  250. package/dist/assessments/types/index.d.ts.map +0 -1
  251. package/dist/assessments/types/index.js +0 -96
  252. package/dist/assessments/types/index.js.map +0 -1
  253. package/dist/fitness-tests/barrel-purity/index.d.ts +0 -11
  254. package/dist/fitness-tests/barrel-purity/index.d.ts.map +0 -1
  255. package/dist/fitness-tests/barrel-purity/index.js +0 -84
  256. package/dist/fitness-tests/barrel-purity/index.js.map +0 -1
  257. package/dist/fitness-tests/datamodel-encapsulation/index.d.ts +0 -10
  258. package/dist/fitness-tests/datamodel-encapsulation/index.d.ts.map +0 -1
  259. package/dist/fitness-tests/datamodel-encapsulation/index.js +0 -99
  260. package/dist/fitness-tests/datamodel-encapsulation/index.js.map +0 -1
  261. package/dist/fitness-tests/error-factories/index.d.ts +0 -17
  262. package/dist/fitness-tests/error-factories/index.d.ts.map +0 -1
  263. package/dist/fitness-tests/error-factories/index.js +0 -97
  264. package/dist/fitness-tests/error-factories/index.js.map +0 -1
  265. package/dist/fitness-tests/unhelpful-errors/index.d.ts +0 -11
  266. package/dist/fitness-tests/unhelpful-errors/index.d.ts.map +0 -1
  267. package/dist/fitness-tests/unhelpful-errors/index.js +0 -87
  268. package/dist/fitness-tests/unhelpful-errors/index.js.map +0 -1
  269. package/dist/languages/typescript/comment-classification.d.ts +0 -8
  270. package/dist/languages/typescript/comment-classification.d.ts.map +0 -1
  271. package/dist/languages/typescript/comment-classification.js +0 -45
  272. package/dist/languages/typescript/comment-classification.js.map +0 -1
  273. package/dist/languages/typescript/index.d.ts +0 -4
  274. package/dist/languages/typescript/parser.js.map +0 -1
  275. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/index.d.ts +0 -0
  276. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/index.d.ts.map +0 -0
  277. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/index.js +0 -0
  278. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/index.js.map +0 -0
  279. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/parser.d.ts +0 -0
  280. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/parser.d.ts.map +0 -0
  281. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/parser.js +0 -0
  282. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/parser.js.map +0 -0
  283. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/comments.d.ts +0 -0
  284. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/comments.d.ts.map +0 -0
  285. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/comments.js +0 -0
  286. /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/comments.js.map +0 -0
package/dist/pano.js CHANGED
@@ -34,68 +34,86 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  };
35
35
  })();
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.SuperDuper = void 0;
37
38
  const fs = __importStar(require("fs"));
38
39
  const path = __importStar(require("path"));
39
- const ts = __importStar(require("typescript"));
40
- const typescript_1 = require("./languages/typescript");
41
- const types_1 = require("./assessments/types");
42
- const index_files_1 = require("./assessments/index-files");
43
- const throws_1 = require("./assessments/throws");
44
- const classes_1 = require("./assessments/classes");
40
+ const pano_engine_1 = require("@fyuld/pano-engine");
41
+ const principles_compile_1 = require("./principles-compile");
42
+ const principles_verify_1 = require("./principles-verify");
43
+ const render_run_report_1 = require("./render-run-report");
44
+ const config_error_1 = require("./config-error");
45
+ const write_findings_1 = require("./write-findings");
46
+ const write_remarks_1 = require("./write-remarks");
45
47
  const format_1 = require("./format");
46
- const datamodel_encapsulation_1 = require("./fitness-tests/datamodel-encapsulation");
47
- const barrel_purity_1 = require("./fitness-tests/barrel-purity");
48
- const unhelpful_errors_1 = require("./fitness-tests/unhelpful-errors");
49
- const error_factories_1 = require("./fitness-tests/error-factories");
48
+ const render_markdown_ansi_1 = require("./render-markdown-ansi");
50
49
  const pano_bdd_1 = require("@fyuld/pano-bdd");
50
+ const pano_dm_1 = require("@fyuld/pano-dm");
51
+ const ldm_1 = require("@fyuld/ldm");
51
52
  const safely_overwrite_file_1 = require("./safely-overwrite-file");
52
- const SKIP_DIRS = new Set(['node_modules', 'dist']);
53
+ exports.SuperDuper = 2;
54
+ const SKIP_DIRS = new Set(['node_modules', 'dist', '.terraform']);
55
+ const SOURCE_EXTENSIONS = new Set(['.ts']);
53
56
  const CONFIG_FILENAME = '.pano/pano.config.json';
54
- const ASSESSMENTS_SUBDIR = '';
55
- const OBJECTIVES_SUBDIR = 'objectives';
56
- const loadObjective = (configDir, kind) => {
57
- const file = path.join(configDir, OBJECTIVES_SUBDIR, `${kind}.md`);
58
- if (!fs.existsSync(file))
59
- return undefined;
60
- return fs.readFileSync(file, 'utf-8');
57
+ const METRICS_DIR = '.metrics';
58
+ const OCCURRENCES_DIR = path.join(METRICS_DIR, '.occurences');
59
+ const FINDINGS_DIR = path.join(METRICS_DIR, '.findings');
60
+ const REMARKS_DIR = path.join(METRICS_DIR, '.remarks');
61
+ const TASKS_DIR = '.tasks';
62
+ const DefaultSpecsDirectory = 'specs';
63
+ const DefaultBddFeaturesDirectory = 'features';
64
+ const DefaultStoriesDirectory = 'stories';
65
+ const DefaultBddFeatureExtension = '.feature';
66
+ const DefaultPrinciplesDirectory = 'principles';
67
+ const DefaultCompiledPrinciplesDirectory = '.compiled-principles';
68
+ const expandGlob = (pattern, baseDir) => {
69
+ const parts = pattern.split('/');
70
+ let dirs = [baseDir];
71
+ for (const part of parts) {
72
+ const next = [];
73
+ for (const d of dirs) {
74
+ if (!part.includes('*')) {
75
+ const candidate = path.join(d, part);
76
+ try {
77
+ if (fs.statSync(candidate).isDirectory())
78
+ next.push(candidate);
79
+ }
80
+ catch {
81
+ // dir doesn't exist
82
+ }
83
+ }
84
+ else {
85
+ const regex = new RegExp('^' + part.replace(/\*/g, '.*') + '$');
86
+ try {
87
+ for (const entry of fs.readdirSync(d, { withFileTypes: true })) {
88
+ const isMatchingSubdirectory = entry.isDirectory() && regex.test(entry.name);
89
+ if (isMatchingSubdirectory)
90
+ next.push(path.join(d, entry.name));
91
+ }
92
+ }
93
+ catch {
94
+ // dir not readable
95
+ }
96
+ }
97
+ }
98
+ dirs = next;
99
+ }
100
+ return dirs;
61
101
  };
62
- const walkTypeScript = (dir, acc = []) => {
102
+ const walkSourceFiles = (dir, acc = []) => {
63
103
  const entries = fs.readdirSync(dir, { withFileTypes: true });
64
104
  for (const entry of entries) {
105
+ const isSourceFile = entry.isFile() && SOURCE_EXTENSIONS.has(path.extname(entry.name));
65
106
  if (entry.isDirectory()) {
66
107
  if (SKIP_DIRS.has(entry.name))
67
108
  continue;
68
- walkTypeScript(path.join(dir, entry.name), acc);
109
+ walkSourceFiles(path.join(dir, entry.name), acc);
69
110
  }
70
- else if (entry.isFile() && entry.name.endsWith('.ts')) {
111
+ else if (isSourceFile) {
71
112
  acc.push(path.join(dir, entry.name));
72
113
  }
73
114
  }
74
115
  return acc;
75
116
  };
76
- const countCodeLines = (sourceFile) => {
77
- const lines = new Set();
78
- const visit = (node) => {
79
- if (node.kind === ts.SyntaxKind.EndOfFileToken)
80
- return;
81
- let hasChild = false;
82
- node.forEachChild(() => {
83
- hasChild = true;
84
- });
85
- if (!hasChild) {
86
- const startPos = node.getStart(sourceFile);
87
- const startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line;
88
- const endLine = sourceFile.getLineAndCharacterOfPosition(node.end).line;
89
- for (let l = startLine; l <= endLine; l++)
90
- lines.add(l);
91
- }
92
- else {
93
- node.forEachChild(visit);
94
- }
95
- };
96
- visit(sourceFile);
97
- return lines.size;
98
- };
99
117
  const findConfig = (startDir) => {
100
118
  let dir = path.resolve(startDir);
101
119
  while (true) {
@@ -104,149 +122,178 @@ const findConfig = (startDir) => {
104
122
  return candidate;
105
123
  const parent = path.dirname(dir);
106
124
  if (parent === dir) {
107
- throw new Error(`${CONFIG_FILENAME} not found in ${startDir} or any parent directory`);
125
+ throw config_error_1.ConfigError.notFound(CONFIG_FILENAME, startDir);
108
126
  }
109
127
  dir = parent;
110
128
  }
111
129
  };
112
- const loadConfig = (configPath) => JSON.parse(fs.readFileSync(configPath, 'utf-8'));
130
+ const loadConfig = (configPath) => JSON.parse(fs.readFileSync(configPath, ldm_1.FileFormat.Utf8));
131
+ const resolveFiles = (dirs, config, configDir) => {
132
+ const repoRoot = path.dirname(configDir);
133
+ const scanDirs = dirs.length > 0
134
+ ? dirs
135
+ : (config.observedDirectories?.sourceCode ?? []).flatMap((pattern) => expandGlob(pattern, repoRoot));
136
+ return scanDirs
137
+ .flatMap((d) => walkSourceFiles(d))
138
+ .map((f) => (path.isAbsolute(f) ? f : path.resolve(f)));
139
+ };
140
+ const runAnalyze = (files, config, configDir) => {
141
+ const repoRoot = path.dirname(configDir);
142
+ const occurrencesOutDir = path.join(configDir, OCCURRENCES_DIR);
143
+ const occurrenceBuckets = (0, pano_engine_1.collectOccurrences)(files, repoRoot);
144
+ for (const bucket of occurrenceBuckets) {
145
+ (0, write_findings_1.writeFindings)(bucket.occurrences, config.assessmentFormats, occurrencesOutDir, bucket.file);
146
+ }
147
+ return occurrenceBuckets;
148
+ };
149
+ const runAssess = (occurrenceBuckets, config, configDir) => {
150
+ const findingsOutDir = path.join(configDir, FINDINGS_DIR);
151
+ const findingBuckets = (0, pano_engine_1.collectFindings)(occurrenceBuckets);
152
+ for (const bucket of findingBuckets) {
153
+ (0, write_findings_1.writeFindings)(bucket.findings, config.assessmentFormats, findingsOutDir, bucket.file);
154
+ }
155
+ return findingBuckets;
156
+ };
157
+ const evaluatePrinciples = (directories, config, configDir) => {
158
+ const principlesDir = path.join(configDir, DefaultPrinciplesDirectory);
159
+ const repoRoot = path.dirname(configDir);
160
+ const files = resolveFiles(directories, config, configDir);
161
+ const occurrenceBuckets = runAnalyze(files, config, configDir);
162
+ const findingBuckets = runAssess(occurrenceBuckets, config, configDir);
163
+ const doc = {
164
+ ...Object.fromEntries(occurrenceBuckets.map((bucket) => [bucket.key, bucket.occurrences])),
165
+ ...Object.fromEntries(findingBuckets.map((bucket) => [bucket.key, bucket.findings])),
166
+ };
167
+ const compiledDir = path.join(principlesDir, DefaultCompiledPrinciplesDirectory);
168
+ if (!fs.existsSync(compiledDir)) {
169
+ (0, principles_compile_1.principlesCompile)(principlesDir, compiledDir);
170
+ }
171
+ const compiledFiles = fs
172
+ .readdirSync(compiledDir)
173
+ .filter((file) => file.endsWith(pano_dm_1.FileExtension.Json));
174
+ const principles = compiledFiles.map((file) => JSON.parse(fs.readFileSync(path.join(compiledDir, file), ldm_1.FileFormat.Utf8)));
175
+ const verdicts = (0, pano_engine_1.runPrinciples)(principles, doc).map((verdict, index) => ({
176
+ ...verdict,
177
+ mdFile: path.relative(repoRoot, path.join(principlesDir, path.basename(compiledFiles[index], pano_dm_1.FileExtension.Json) +
178
+ pano_dm_1.FileExtension.Md)),
179
+ }));
180
+ let remarkId = 0;
181
+ for (const verdict of verdicts) {
182
+ for (const remark of verdict.violations) {
183
+ remark.remarkId = ++remarkId;
184
+ const { file, line } = remark;
185
+ const hasSourceCodeLocation = typeof file === 'string' && typeof line === 'number';
186
+ if (hasSourceCodeLocation) {
187
+ const absFile = path.join(repoRoot, file);
188
+ remark.lineContent =
189
+ fs
190
+ .readFileSync(absFile, ldm_1.FileFormat.Utf8)
191
+ .split('\n')[line - 1]?.trim() ?? '';
192
+ }
193
+ }
194
+ }
195
+ return verdicts;
196
+ };
113
197
  const printHelp = () => {
114
198
  console.log(`Usage: pano <command> [options] [args]
115
199
 
116
200
  Commands:
201
+ analyze <dirs...> Walk directories and emit raw code occurrences
117
202
  assess <dirs...> Walk directories and emit code assessments
118
- fitness Run fitness criteria against assessments
119
203
  generate bdd-steps ux <path> Generate Playwright-BDD step stubs (alias: gen)
204
+ run <dirs...> Collect metrics and run principles against them
205
+ taskify [ids...] Write remarks as a .tasks/<timestamp>-Tasks.md checklist
206
+ clean Delete generated metrics and compiled principles
207
+ principles compile Compile .pano/principles/*.md to .pano/principles/.compiled-principles/
208
+ principles verify Validate principle .md files
120
209
  help Show this message
121
210
 
122
211
  Options:
123
- --only <kinds,ids> Run only listed criteria
124
- --sans <kinds,ids> Skip listed criteria
125
212
  --plain-formatting Disable colored output`);
126
213
  };
127
214
  const rawArgs = process.argv.slice(2);
128
- const only = new Set();
129
- const sans = new Set();
130
215
  let plainFormatting = false;
131
216
  const positional = [];
132
- let collecting;
133
217
  for (const a of rawArgs) {
134
218
  if (a.startsWith('--')) {
135
- collecting = undefined;
136
- const eq = a.indexOf('=');
137
- const name = eq >= 0 ? a.slice(2, eq) : a.slice(2);
138
- const eqValue = eq >= 0 ? a.slice(eq + 1) : undefined;
139
- if (name === 'only') {
140
- collecting = only;
141
- if (eqValue)
142
- eqValue.split(',').forEach((s) => only.add(s));
143
- }
144
- else if (name === 'sans') {
145
- collecting = sans;
146
- if (eqValue)
147
- eqValue.split(',').forEach((s) => sans.add(s));
148
- }
149
- else if (name === 'plain-formatting') {
219
+ const name = a.indexOf('=') >= 0 ? a.slice(2, a.indexOf('=')) : a.slice(2);
220
+ if (name === 'plain-formatting') {
150
221
  plainFormatting = true;
151
222
  }
152
223
  continue;
153
224
  }
154
- if (collecting) {
155
- a.split(',').forEach((s) => collecting.add(s));
156
- continue;
157
- }
158
225
  positional.push(a);
159
226
  }
160
227
  (0, format_1.setPretty)(process.stdout.isTTY && !plainFormatting);
161
228
  const [subcommand, ...directories] = positional;
162
- const criterionMatchesFilter = (c, set) => {
163
- if (set.has(String(c.kind)))
164
- return true;
165
- if (c.id !== undefined && set.has(c.id))
166
- return true;
167
- return false;
168
- };
169
- if (subcommand === 'assess') {
170
- const files = directories.flatMap((d) => walkTypeScript(d));
171
- let totalLoC = 0;
172
- let totalComments = 0;
173
- for (const file of files) {
174
- const source = fs.readFileSync(file, 'utf-8');
175
- const sourceFile = (0, typescript_1.parseTypeScript)(source, file);
176
- totalLoC += countCodeLines(sourceFile);
177
- totalComments += (0, typescript_1.getAllComments)(sourceFile).length;
178
- }
229
+ const isGenerateSubcommand = subcommand === 'generate' || subcommand === 'gen';
230
+ if (subcommand === 'analyze') {
179
231
  const configPath = findConfig(process.cwd());
180
232
  const config = loadConfig(configPath);
181
233
  const configDir = path.dirname(configPath);
182
- const outDir = path.join(configDir, ASSESSMENTS_SUBDIR);
183
- const { entries } = (0, types_1.runTypesAssessment)(files, config.assessmentFormats, outDir);
184
- const indexResult = (0, index_files_1.runIndexFilesAssessment)(files, config.assessmentFormats, outDir);
185
- const throwsResult = (0, throws_1.runThrowsAssessment)(files, config.assessmentFormats, outDir);
186
- const classesResult = (0, classes_1.runClassesAssessment)(files, config.assessmentFormats, outDir);
234
+ const files = resolveFiles(directories, config, configDir);
235
+ const buckets = runAnalyze(files, config, configDir);
236
+ const outDir = path.join(configDir, OCCURRENCES_DIR);
187
237
  console.log(`Files: ${files.length}`);
188
- console.log(`Lines of code: ${totalLoC}`);
189
- console.log(`Comments: ${totalComments}`);
190
- console.log(`Types defined: ${entries.length}`);
191
- console.log(`Impure barrel files: ${indexResult.report.violations.length} of ${indexResult.report.totalIndexFiles} index.ts`);
192
- console.log(`Throws: ${throwsResult.report.totalThrows}`);
193
- console.log(`Classes: ${classesResult.report.classes.length}`);
194
- console.log(`Wrote assessments to ${outDir}`);
238
+ for (const bucket of buckets) {
239
+ console.log(`${bucket.file}: ${bucket.occurrences.length}`);
240
+ }
241
+ console.log(`Wrote occurrences to ${outDir}`);
195
242
  }
196
- else if (subcommand === 'fitness') {
243
+ else if (subcommand === 'assess') {
197
244
  const configPath = findConfig(process.cwd());
198
245
  const config = loadConfig(configPath);
199
246
  const configDir = path.dirname(configPath);
200
- const outDir = path.join(configDir, ASSESSMENTS_SUBDIR);
201
- const typesFile = path.join(outDir, 'types.json');
202
- if (!fs.existsSync(typesFile)) {
203
- console.error(`Assessment file not found at ${typesFile}. Run \`fpou assess\` first.`);
204
- process.exit(1);
205
- }
206
- const indexFilesFile = path.join(outDir, 'index-files.json');
207
- const throwsFile = path.join(outDir, 'throws.json');
208
- const classesFile = path.join(outDir, 'classes.json');
209
- let ran = 0;
210
- for (const criterion of config.criteria) {
211
- const c = criterion;
212
- if (only.size > 0 && !criterionMatchesFilter(c, only))
213
- continue;
214
- if (criterionMatchesFilter(c, sans))
247
+ const files = resolveFiles(directories, config, configDir);
248
+ let totalLoC = 0;
249
+ let totalComments = 0;
250
+ for (const file of files) {
251
+ if (!file.endsWith('.ts'))
215
252
  continue;
216
- const objective = loadObjective(configDir, String(criterion.kind));
217
- if ((0, datamodel_encapsulation_1.isDatamodelEncapsulationCriterion)(criterion)) {
218
- const result = (0, datamodel_encapsulation_1.runDatamodelEncapsulation)(criterion, typesFile, objective);
219
- console.log(result.rendered);
220
- console.log('');
221
- ran++;
222
- }
223
- else if ((0, barrel_purity_1.isBarrelPurityCriterion)(criterion)) {
224
- const result = (0, barrel_purity_1.runBarrelPurity)(criterion, indexFilesFile, objective);
225
- console.log(result.rendered);
226
- console.log('');
227
- ran++;
228
- }
229
- else if ((0, unhelpful_errors_1.isUnhelpfulErrorsCriterion)(criterion)) {
230
- const result = (0, unhelpful_errors_1.runUnhelpfulErrors)(criterion, throwsFile, objective);
231
- console.log(result.rendered);
232
- console.log('');
233
- ran++;
234
- }
235
- else if ((0, error_factories_1.isErrorFactoriesCriterion)(criterion)) {
236
- const result = (0, error_factories_1.runErrorFactories)(criterion, throwsFile, classesFile, objective);
237
- console.log(result.rendered);
238
- console.log('');
239
- ran++;
240
- }
253
+ const source = fs.readFileSync(file, ldm_1.FileFormat.Utf8);
254
+ const sourceFile = (0, pano_engine_1.parseTypeScript)(source, file);
255
+ totalLoC += (0, pano_engine_1.countCodeLines)(sourceFile);
256
+ totalComments += (0, pano_engine_1.getAllComments)(sourceFile).length;
241
257
  }
242
- if (ran === 0) {
243
- console.log('No criteria configured');
258
+ const occurrenceBuckets = runAnalyze(files, config, configDir);
259
+ const buckets = runAssess(occurrenceBuckets, config, configDir);
260
+ const outDir = path.join(configDir, FINDINGS_DIR);
261
+ console.log(`Files: ${files.length}`);
262
+ console.log(`Lines of code: ${totalLoC}`);
263
+ console.log(`Comments: ${totalComments}`);
264
+ for (const bucket of buckets) {
265
+ console.log(`${bucket.file}: ${bucket.findings.length}`);
244
266
  }
267
+ console.log(`Wrote assessments to ${outDir}`);
245
268
  }
246
- else if (subcommand === 'generate' || subcommand === 'gen') {
269
+ else if (isGenerateSubcommand) {
247
270
  const [target, variant, inputPath] = directories;
248
- if (target === 'bdd-steps' && variant === 'ux') {
271
+ const isBddStepsUxTarget = target === 'bdd-steps' && variant === 'ux';
272
+ if (isBddStepsUxTarget) {
249
273
  void (async () => {
274
+ const processFeature = async (f) => {
275
+ const segments = f.split(path.sep);
276
+ const idx = segments.lastIndexOf(DefaultBddFeaturesDirectory);
277
+ if (idx === -1) {
278
+ console.error(`Error: ${f} is not under a 'features/' directory. Input must contain a 'features' segment.`);
279
+ process.exit(1);
280
+ }
281
+ const stepsSegments = [...segments];
282
+ stepsSegments[idx] = 'steps';
283
+ const last = stepsSegments.length - 1;
284
+ stepsSegments[last] = stepsSegments[last].replace(/\.feature$/, '.steps.ts');
285
+ const stepsPath = stepsSegments.join(path.sep);
286
+ const fixturesSegments = [...segments];
287
+ fixturesSegments[idx] = 'fixtures';
288
+ fixturesSegments[fixturesSegments.length - 1] = fixturesSegments[fixturesSegments.length - 1].replace(/\.feature$/, '');
289
+ const fixturesDir = fixturesSegments.join(path.sep);
290
+ const content = fs.readFileSync(f, ldm_1.FileFormat.Utf8);
291
+ const generated = (0, pano_bdd_1.generateBddStepsForUx)(content);
292
+ const result = await (0, safely_overwrite_file_1.safelyOverwriteFile)(stepsPath, generated);
293
+ fs.mkdirSync(fixturesDir, { recursive: true });
294
+ console.log(`${result}: ${stepsPath}`);
295
+ console.log(`fixtures: ${fixturesDir}`);
296
+ };
250
297
  const features = [];
251
298
  const stat = fs.statSync(inputPath);
252
299
  if (stat.isDirectory()) {
@@ -254,27 +301,110 @@ else if (subcommand === 'generate' || subcommand === 'gen') {
254
301
  for (const e of fs.readdirSync(dir, { withFileTypes: true })) {
255
302
  if (e.isDirectory())
256
303
  walk(path.join(dir, e.name));
257
- else if (e.name.endsWith('.feature'))
304
+ else if (e.name.endsWith(DefaultBddFeatureExtension))
258
305
  features.push(path.join(dir, e.name));
259
306
  }
260
307
  };
261
308
  walk(inputPath);
262
309
  }
310
+ else if (inputPath.endsWith('.ts')) {
311
+ const base = path.basename(inputPath, '.ts');
312
+ const featurePath = path.join(DefaultSpecsDirectory, DefaultBddFeaturesDirectory, `${base}.feature`);
313
+ const storyPath = path.join(DefaultSpecsDirectory, DefaultStoriesDirectory, `${base}.story.tsx`);
314
+ const featureResult = await (0, safely_overwrite_file_1.safelyOverwriteFile)(featurePath, `Feature: ${base}\n`);
315
+ const storyResult = await (0, safely_overwrite_file_1.safelyOverwriteFile)(storyPath, '');
316
+ console.log(`${featureResult}: ${featurePath}`);
317
+ console.log(`${storyResult}: ${storyPath}`);
318
+ features.push(featurePath);
319
+ }
263
320
  else {
264
321
  features.push(inputPath);
265
322
  }
266
323
  for (const f of features) {
267
- const content = fs.readFileSync(f, 'utf-8');
268
- const generated = (0, pano_bdd_1.generateBddStepsForUx)(content);
269
- const outDir = path.join(path.dirname(f), 'steps');
270
- const base = path.basename(f, '.feature');
271
- const outPath = path.join(outDir, `${base}.steps.ts`);
272
- const result = await (0, safely_overwrite_file_1.safelyOverwriteFile)(outPath, generated);
273
- console.log(`${result}: ${outPath}`);
324
+ await processFeature(f);
274
325
  }
275
326
  })();
276
327
  }
277
328
  }
329
+ else if (subcommand === 'principles') {
330
+ const configPath = findConfig(process.cwd());
331
+ const configDir = path.dirname(configPath);
332
+ const principlesDir = path.join(configDir, DefaultPrinciplesDirectory);
333
+ const [action] = directories;
334
+ if (action === 'compile') {
335
+ const outDir = path.join(principlesDir, DefaultCompiledPrinciplesDirectory);
336
+ for (const c of (0, principles_compile_1.principlesCompile)(principlesDir, outDir)) {
337
+ console.log(`${c.name} -> ${c.out}`);
338
+ }
339
+ }
340
+ else if (action === 'verify') {
341
+ let allValid = true;
342
+ for (const result of (0, principles_verify_1.principlesVerify)(principlesDir)) {
343
+ if (result.valid) {
344
+ console.log(`VALID ${result.file}`);
345
+ }
346
+ else {
347
+ allValid = false;
348
+ console.log(`INVALID ${result.file}`);
349
+ console.log(` ${result.error}`);
350
+ }
351
+ }
352
+ if (!allValid)
353
+ process.exit(1);
354
+ }
355
+ else {
356
+ printHelp();
357
+ }
358
+ }
359
+ else if (subcommand === 'run') {
360
+ const configPath = findConfig(process.cwd());
361
+ const configDir = path.dirname(configPath);
362
+ const config = loadConfig(configPath);
363
+ const verdicts = evaluatePrinciples(directories, config, configDir);
364
+ const markdown = (0, render_run_report_1.renderRunReport)(verdicts);
365
+ (0, write_remarks_1.writeRemarks)((0, pano_engine_1.remarksOf)(verdicts), path.join(configDir, REMARKS_DIR), markdown);
366
+ (0, render_markdown_ansi_1.renderMarkdownAsAnsi)(markdown);
367
+ }
368
+ else if (subcommand === 'taskify') {
369
+ const configPath = findConfig(process.cwd());
370
+ const configDir = path.dirname(configPath);
371
+ const config = loadConfig(configPath);
372
+ const ids = directories
373
+ .join(',')
374
+ .split(',')
375
+ .map((s) => s.trim())
376
+ .filter((s) => s !== '')
377
+ .map(Number)
378
+ .filter((n) => !Number.isNaN(n));
379
+ const idSet = ids.length > 0 ? new Set(ids) : null;
380
+ const verdicts = evaluatePrinciples([], config, configDir);
381
+ const withRemarks = verdicts.filter((verdict) => verdict.violations.length > 0);
382
+ const selected = idSet === null
383
+ ? withRemarks
384
+ : withRemarks
385
+ .map((verdict) => ({
386
+ ...verdict,
387
+ violations: verdict.violations.filter((r) => idSet.has(r.remarkId)),
388
+ }))
389
+ .filter((verdict) => verdict.violations.length > 0);
390
+ const stamp = new Date().toISOString();
391
+ const markdown = `Tasks\n---\n\n${(0, render_run_report_1.renderRunReport)(selected)}`;
392
+ const tasksDir = path.join(configDir, TASKS_DIR);
393
+ fs.mkdirSync(tasksDir, { recursive: true });
394
+ const outPath = path.join(tasksDir, `${stamp.replace(/[:.]/g, '-')}-Tasks.md`);
395
+ fs.writeFileSync(outPath, markdown);
396
+ console.log(`Wrote tasks to ${outPath}`);
397
+ }
398
+ else if (subcommand === 'clean') {
399
+ const configPath = findConfig(process.cwd());
400
+ const configDir = path.dirname(configPath);
401
+ const metricsDir = path.join(configDir, METRICS_DIR);
402
+ const compiledDir = path.join(configDir, DefaultPrinciplesDirectory, DefaultCompiledPrinciplesDirectory);
403
+ fs.rmSync(metricsDir, { recursive: true, force: true });
404
+ fs.rmSync(compiledDir, { recursive: true, force: true });
405
+ console.log(`Removed ${metricsDir}`);
406
+ console.log(`Removed ${compiledDir}`);
407
+ }
278
408
  else {
279
409
  printHelp();
280
410
  }
package/dist/pano.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pano.js","sourceRoot":"","sources":["../src/pano.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uCAAwB;AACxB,2CAA4B;AAC5B,+CAAgC;AAChC,uDAAwE;AACxE,+CAAwD;AACxD,2DAAmE;AACnE,iDAA0D;AAC1D,mDAA4D;AAC5D,qCAAoC;AACpC,qFAGgD;AAChD,iEAGsC;AACtC,uEAGyC;AACzC,qEAGwC;AACxC,8CAAuD;AAEvD,mEAA6D;AAE7D,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAA;AACnD,MAAM,eAAe,GAAG,wBAAwB,CAAA;AAChD,MAAM,kBAAkB,GAAG,EAAE,CAAA;AAC7B,MAAM,iBAAiB,GAAG,YAAY,CAAA;AAEtC,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAE,IAAY,EAAsB,EAAE;IAC5E,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,EAAE,GAAG,IAAI,KAAK,CAAC,CAAA;IAClE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAA;IAC1C,OAAO,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AACvC,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,MAAgB,EAAE,EAAY,EAAE;IACnE,MAAM,OAAO,GAA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AAA;IAC5C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;IACpD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAC3B,SAAS,EACT,0BAA0B,EAC1B,kCAAkC,CACnC,CAAA;IACD,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACvD,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACxD,OAAO,CAAC,GAAG,CAAC,WAAW,UAAU,EAAE,CAAC,CAAA;IACpC,OAAO,CAAC,GAAG,CAAC,WAAW,WAAW,EAAE,CAAC,CAAA;AACvC,CAAC;KAAM,CAAC;IACN,SAAS,EAAE,CAAA;AACb,CAAC"}
@@ -0,0 +1,6 @@
1
+ export type CompiledPrinciple = {
2
+ name: string;
3
+ out: string;
4
+ };
5
+ export declare const principlesCompile: (principlesDir: string, outDir: string) => CompiledPrinciple[];
6
+ //# sourceMappingURL=principles-compile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"principles-compile.d.ts","sourceRoot":"","sources":["../src/principles-compile.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,eAAe,MAAM,EACrB,QAAQ,MAAM,KACb,iBAAiB,EAenB,CAAA"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.principlesCompile = void 0;
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ const compile_principle_1 = require("./compile-principle");
40
+ const pano_dm_1 = require("@fyuld/pano-dm");
41
+ const ldm_1 = require("@fyuld/ldm");
42
+ const principlesCompile = (principlesDir, outDir) => {
43
+ fs.mkdirSync(outDir, { recursive: true });
44
+ const compiled = [];
45
+ for (const file of fs.readdirSync(principlesDir)) {
46
+ if (!file.endsWith(pano_dm_1.FileExtension.Md))
47
+ continue;
48
+ const md = fs.readFileSync(path.join(principlesDir, file), ldm_1.FileFormat.Utf8);
49
+ const principle = (0, compile_principle_1.compilePrinciple)(md);
50
+ const out = path.join(outDir, path.basename(file, pano_dm_1.FileExtension.Md) + pano_dm_1.FileExtension.Json);
51
+ fs.writeFileSync(out, JSON.stringify(principle, null, 2) + '\n');
52
+ compiled.push({ name: principle.name, out });
53
+ }
54
+ return compiled;
55
+ };
56
+ exports.principlesCompile = principlesCompile;
57
+ //# sourceMappingURL=principles-compile.js.map