@fyuld/pano 0.1.9 → 0.2.1

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 +253 -150
  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 -12
  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
@@ -0,0 +1,5 @@
1
+ export declare enum FileExtension {
2
+ Md = ".md",
3
+ Json = ".json"
4
+ }
5
+ //# sourceMappingURL=file-extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-extension.d.ts","sourceRoot":"","sources":["../../src/entities/file-extension.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,EAAE,QAAQ;IACV,IAAI,UAAU;CACf"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileExtension = void 0;
4
+ var FileExtension;
5
+ (function (FileExtension) {
6
+ FileExtension["Md"] = ".md";
7
+ FileExtension["Json"] = ".json";
8
+ })(FileExtension || (exports.FileExtension = FileExtension = {}));
9
+ //# sourceMappingURL=file-extension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-extension.js","sourceRoot":"","sources":["../../src/entities/file-extension.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,2BAAU,CAAA;IACV,+BAAc,CAAA;AAChB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"}
@@ -0,0 +1,11 @@
1
+ import { NotApplicable } from './common';
2
+ import { Occurrence } from './occurrence';
3
+ export type Finding = {
4
+ file: string | NotApplicable;
5
+ package: string;
6
+ language: string;
7
+ line: number | NotApplicable;
8
+ [key: string]: unknown;
9
+ };
10
+ export type BehaviorScanner = (occurrences: Occurrence[]) => Finding[];
11
+ //# sourceMappingURL=finding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finding.d.ts","sourceRoot":"","sources":["../../src/entities/finding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,GAAG,aAAa,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,GAAG,aAAa,CAAA;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,KAAK,OAAO,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=finding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finding.js","sourceRoot":"","sources":["../../src/entities/finding.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export * from './common';
2
+ export * from './file-extension';
3
+ export * from './occurrence';
4
+ export * from './finding';
5
+ export * from './principle';
6
+ export * from './remark';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA"}
@@ -0,0 +1,23 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./common"), exports);
18
+ __exportStar(require("./file-extension"), exports);
19
+ __exportStar(require("./occurrence"), exports);
20
+ __exportStar(require("./finding"), exports);
21
+ __exportStar(require("./principle"), exports);
22
+ __exportStar(require("./remark"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,mDAAgC;AAChC,+CAA4B;AAC5B,4CAAyB;AACzB,8CAA2B;AAC3B,2CAAwB"}
@@ -0,0 +1,10 @@
1
+ import { NotApplicable } from './common';
2
+ export type Occurrence = {
3
+ file: string | NotApplicable;
4
+ package: string;
5
+ language: string;
6
+ line: number | NotApplicable;
7
+ [key: string]: unknown;
8
+ };
9
+ export type CodeScanner<Ast> = (ast: Ast) => Occurrence[];
10
+ //# sourceMappingURL=occurrence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"occurrence.d.ts","sourceRoot":"","sources":["../../src/entities/occurrence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,GAAG,aAAa,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,GAAG,aAAa,CAAA;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,UAAU,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=occurrence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"occurrence.js","sourceRoot":"","sources":["../../src/entities/occurrence.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ export type QualityCriteria = 'Readability' | 'Maintainability' | 'Testability' | 'Modifiability' | 'Reusability' | 'Simplicity' | 'Performance' | 'PerformanceLatency' | 'PerformanceThroughput' | 'Scalability' | 'Reliability' | 'Availability' | 'Resilience' | 'Efficiency' | 'Affordability' | 'Profitability' | 'Usability' | 'Accessibility' | 'Compatibility' | 'Interoperability' | 'Observability' | 'Supportability' | 'Operability' | 'Recoverability' | 'Configurability' | 'Deployability' | 'Security' | 'Privacy' | 'Compliance' | 'Auditability' | 'Safety' | 'AgentIntelligibility';
2
+ export type PrinciplePreferences = {
3
+ points: number;
4
+ qualityCriteria?: QualityCriteria[];
5
+ };
6
+ export type Principle = {
7
+ name: string;
8
+ preferences: PrinciplePreferences;
9
+ description?: string;
10
+ purpose: string;
11
+ implementation: string;
12
+ defaultAgentRecommendation?: string;
13
+ constraints: string[];
14
+ };
15
+ //# sourceMappingURL=principle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"principle.d.ts","sourceRoot":"","sources":["../../src/entities/principle.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,aAAa,GACb,iBAAiB,GACjB,aAAa,GACb,eAAe,GACf,aAAa,GACb,YAAY,GACZ,aAAa,GACb,oBAAoB,GACpB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,eAAe,GACf,eAAe,GACf,WAAW,GACX,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,eAAe,GACf,UAAU,GACV,SAAS,GACT,YAAY,GACZ,cAAc,GACd,QAAQ,GACR,sBAAsB,CAAA;AAE1B,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,eAAe,EAAE,CAAA;CACpC,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,oBAAoB,CAAA;IACjC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;IACtB,0BAA0B,CAAC,EAAE,MAAM,CAAA;IACnC,WAAW,EAAE,MAAM,EAAE,CAAA;CACtB,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=principle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"principle.js","sourceRoot":"","sources":["../../src/entities/principle.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { NotApplicable } from './common';
2
+ import { Finding } from './finding';
3
+ import { Principle } from './principle';
4
+ export type Remark = {
5
+ label?: string;
6
+ file: string | NotApplicable;
7
+ package: string;
8
+ language: string;
9
+ line: number | NotApplicable;
10
+ [key: string]: unknown;
11
+ };
12
+ export type PrincipleRunner = (principle: Principle, findings: Finding[]) => Remark[];
13
+ //# sourceMappingURL=remark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remark.d.ts","sourceRoot":"","sources":["../../src/entities/remark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,GAAG,aAAa,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,GAAG,aAAa,CAAA;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,CAC5B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,OAAO,EAAE,KAChB,MAAM,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remark.js","sourceRoot":"","sources":["../../src/entities/remark.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './config';
2
+ export * from './entities';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
@@ -0,0 +1,19 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./config"), exports);
18
+ __exportStar(require("./entities"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,6CAA0B"}
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@fyuld/pano-dm",
3
+ "version": "0.3.2",
4
+ "description": "Logical Datamodel for Panopticum",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": "./dist/index.js"
9
+ },
10
+ "author": "",
11
+ "license": "GPL-3.0",
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "scripts": {
16
+ "tsc": "tsc",
17
+ "clean": "rm -rf dist",
18
+ "test": "jest",
19
+ "pub": "npm run build && npm publish",
20
+ "checks": "npm run format",
21
+ "build": "npm run clean && npm run checks && npm run tsc",
22
+ "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json}\"",
23
+ "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json}\"",
24
+ "dev:update-dms": "npm i --save @fyuld/ldm"
25
+ },
26
+ "devDependencies": {
27
+ "@types/jest": "^30.0.0",
28
+ "@types/node": "^25.8.0",
29
+ "jest": "^30.4.2",
30
+ "prettier": "^3.8.3",
31
+ "ts-jest": "^29.4.9",
32
+ "typescript": "^6.0.3"
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "peerDependencies": {
38
+ "@fyuld/ldm": "^0.8.2"
39
+ }
40
+ }
@@ -0,0 +1,9 @@
1
+ import { Finding } from '@fyuld/pano-dm';
2
+ import { OccurrenceBucket } from './collect-occurrences';
3
+ export type FindingBucket = {
4
+ key: string;
5
+ file: string;
6
+ findings: Finding[];
7
+ };
8
+ export declare const collectFindings: (buckets: OccurrenceBucket[]) => FindingBucket[];
9
+ //# sourceMappingURL=collect-findings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collect-findings.d.ts","sourceRoot":"","sources":["../../src/assessments/collect-findings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAmB,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAIxD,MAAM,MAAM,aAAa,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,EAAE,CAAA;CAAE,CAAA;AAwB9E,eAAO,MAAM,eAAe,GAC1B,SAAS,gBAAgB,EAAE,KAC1B,aAAa,EAOf,CAAA"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.collectFindings = void 0;
4
+ const string_literals_1 = require("./string-literals");
5
+ const conditional_expressions_1 = require("./conditional-expressions");
6
+ const FINDING_SPECS = [
7
+ {
8
+ from: 'stringLiterals',
9
+ key: 'duplicateStringLiterals',
10
+ file: 'duplicate-string-literals',
11
+ behavior: string_literals_1.findDuplicateStringLiterals,
12
+ },
13
+ {
14
+ from: 'conditionalExpressions',
15
+ key: 'complexConditionalExpressions',
16
+ file: 'complex-conditional-expressions',
17
+ behavior: conditional_expressions_1.findComplexConditionalExpressions,
18
+ },
19
+ ];
20
+ const collectFindings = (buckets) => {
21
+ const byKey = new Map(buckets.map((bucket) => [bucket.key, bucket]));
22
+ return FINDING_SPECS.filter((spec) => byKey.has(spec.from)).map((spec) => ({
23
+ key: spec.key,
24
+ file: spec.file,
25
+ findings: spec.behavior(byKey.get(spec.from).occurrences),
26
+ }));
27
+ };
28
+ exports.collectFindings = collectFindings;
29
+ //# sourceMappingURL=collect-findings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collect-findings.js","sourceRoot":"","sources":["../../src/assessments/collect-findings.ts"],"names":[],"mappings":";;;AAEA,uDAA+D;AAC/D,uEAA6E;AAW7E,MAAM,aAAa,GAAkB;IACnC;QACE,IAAI,EAAE,gBAAgB;QACtB,GAAG,EAAE,yBAAyB;QAC9B,IAAI,EAAE,2BAA2B;QACjC,QAAQ,EAAE,6CAA2B;KACtC;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,GAAG,EAAE,+BAA+B;QACpC,IAAI,EAAE,iCAAiC;QACvC,QAAQ,EAAE,2DAAiC;KAC5C;CACF,CAAA;AAEM,MAAM,eAAe,GAAG,CAC7B,OAA2B,EACV,EAAE;IACnB,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IACpE,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACzE,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAE,CAAC,WAAW,CAAC;KAC3D,CAAC,CAAC,CAAA;AACL,CAAC,CAAA;AATY,QAAA,eAAe,mBAS3B"}
@@ -0,0 +1,8 @@
1
+ import { Occurrence } from '@fyuld/pano-dm';
2
+ export type OccurrenceBucket = {
3
+ key: string;
4
+ file: string;
5
+ occurrences: Occurrence[];
6
+ };
7
+ export declare const collectOccurrences: (files: string[], repoRoot: string) => OccurrenceBucket[];
8
+ //# sourceMappingURL=collect-occurrences.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collect-occurrences.d.ts","sourceRoot":"","sources":["../../src/assessments/collect-occurrences.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAiB,MAAM,gBAAgB,CAAA;AAS1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,UAAU,EAAE,CAAA;CAC1B,CAAA;AAmCD,eAAO,MAAM,kBAAkB,GAC7B,OAAO,MAAM,EAAE,EACf,UAAU,MAAM,KACf,gBAAgB,EA2ClB,CAAA"}
@@ -0,0 +1,116 @@
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.collectOccurrences = void 0;
37
+ const path = __importStar(require("path"));
38
+ const pano_dm_1 = require("@fyuld/pano-dm");
39
+ const pano_errors_1 = require("@fyuld/pano-errors");
40
+ const index_files_1 = require("./index-files");
41
+ const string_literals_1 = require("./string-literals");
42
+ const duplicate_declarations_1 = require("./duplicate-declarations");
43
+ const conditional_expressions_1 = require("./conditional-expressions");
44
+ const fixture_files_1 = require("./fixture-files");
45
+ const LANGUAGE_BY_EXT = {
46
+ '.ts': 'typescript',
47
+ '.tf': 'terraform',
48
+ '.js': 'javascript',
49
+ '.json': 'json',
50
+ };
51
+ const enrich = (rows, repoRoot) => rows.map((row) => {
52
+ const abs = typeof row.file === 'string' ? row.file : undefined;
53
+ const rel = abs ? path.relative(repoRoot, abs) : pano_dm_1.NotApplicable;
54
+ const pkg = typeof rel === 'string' ? (rel.split('/')[0] ?? '') : '';
55
+ const language = abs
56
+ ? (LANGUAGE_BY_EXT[path.extname(abs)] ?? 'unknown')
57
+ : 'unknown';
58
+ return {
59
+ ...row,
60
+ file: rel,
61
+ package: pkg,
62
+ language,
63
+ line: row.line ?? pano_dm_1.NotApplicable,
64
+ };
65
+ });
66
+ const DECLARATION_BUCKETS = [
67
+ { key: 'declaredTypes', file: 'declared-types', kind: 'type' },
68
+ { key: 'declaredFunctions', file: 'declared-functions', kind: 'function' },
69
+ { key: 'declaredClasses', file: 'declared-classes', kind: 'class' },
70
+ { key: 'declaredInterfaces', file: 'declared-interfaces', kind: 'interface' },
71
+ { key: 'declaredConstants', file: 'declared-constants', kind: 'constant' },
72
+ { key: 'declaredVariables', file: 'declared-variables', kind: 'variable' },
73
+ ];
74
+ const collectOccurrences = (files, repoRoot) => {
75
+ const declarations = (0, duplicate_declarations_1.scanDeclarations)(files);
76
+ const declarationBuckets = DECLARATION_BUCKETS.map((b) => ({
77
+ key: b.key,
78
+ file: b.file,
79
+ occurrences: enrich(declarations.filter((d) => d.kind === b.kind), repoRoot),
80
+ }));
81
+ return [
82
+ {
83
+ key: 'errorDeclarations',
84
+ file: 'error-declarations',
85
+ occurrences: enrich((0, pano_errors_1.aggregateErrors)(files), repoRoot),
86
+ },
87
+ {
88
+ key: 'errorThrowStatements',
89
+ file: 'error-throw-statements',
90
+ occurrences: enrich((0, pano_errors_1.aggregateThrows)(files), repoRoot),
91
+ },
92
+ {
93
+ key: 'indexFiles',
94
+ file: 'index-files',
95
+ occurrences: enrich((0, index_files_1.scanIndexFiles)(files), repoRoot),
96
+ },
97
+ {
98
+ key: 'stringLiterals',
99
+ file: 'string-literals',
100
+ occurrences: enrich((0, string_literals_1.scanStringLiterals)(files), repoRoot),
101
+ },
102
+ {
103
+ key: 'conditionalExpressions',
104
+ file: 'conditional-expressions',
105
+ occurrences: enrich((0, conditional_expressions_1.scanConditionalExpressions)(files), repoRoot),
106
+ },
107
+ {
108
+ key: 'fixtureFiles',
109
+ file: 'fixture-files',
110
+ occurrences: enrich((0, fixture_files_1.scanFixtureFiles)(files), repoRoot),
111
+ },
112
+ ...declarationBuckets,
113
+ ];
114
+ };
115
+ exports.collectOccurrences = collectOccurrences;
116
+ //# sourceMappingURL=collect-occurrences.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collect-occurrences.js","sourceRoot":"","sources":["../../src/assessments/collect-occurrences.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAC5B,4CAA0D;AAC1D,oDAAqE;AACrE,+CAA8C;AAC9C,uDAAsD;AACtD,qEAA2D;AAC3D,uEAAsE;AACtE,mDAAkD;AASlD,MAAM,eAAe,GAA2B;IAC9C,KAAK,EAAE,YAAY;IACnB,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,MAAM;CAChB,CAAA;AAED,MAAM,MAAM,GAAG,CAAC,IAAkB,EAAE,QAAgB,EAAgB,EAAE,CACpE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;IACf,MAAM,GAAG,GAAG,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,GA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,EAAE,cAAc;YACnB,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,MAAM,CAAC,IAAA,gCAAgB,EAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;SACvD;QACD,GAAG,kBAAkB;KACtB,CAAA;AACH,CAAC,CAAA;AA9CY,QAAA,kBAAkB,sBA8C9B"}
@@ -0,0 +1,3 @@
1
+ import { Occurrence, Finding } from '@fyuld/pano-dm';
2
+ export declare const findComplexConditionalExpressions: (occurrences: Occurrence[]) => Finding[];
3
+ //# sourceMappingURL=find-complex-conditional-expressions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-complex-conditional-expressions.d.ts","sourceRoot":"","sources":["../../../src/assessments/conditional-expressions/find-complex-conditional-expressions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAEpD,eAAO,MAAM,iCAAiC,GAC5C,aAAa,UAAU,EAAE,KACxB,OAAO,EACmE,CAAA"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findComplexConditionalExpressions = void 0;
4
+ const findComplexConditionalExpressions = (occurrences) => occurrences.filter((o) => typeof o.numTerms === 'number' && o.numTerms > 1);
5
+ exports.findComplexConditionalExpressions = findComplexConditionalExpressions;
6
+ //# sourceMappingURL=find-complex-conditional-expressions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-complex-conditional-expressions.js","sourceRoot":"","sources":["../../../src/assessments/conditional-expressions/find-complex-conditional-expressions.ts"],"names":[],"mappings":";;;AAEO,MAAM,iCAAiC,GAAG,CAC/C,WAAyB,EACd,EAAE,CACb,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAA;AAHhE,QAAA,iCAAiC,qCAG+B"}
@@ -0,0 +1,3 @@
1
+ export { scanConditionalExpressions } from './scan-conditional-expressions';
2
+ export { findComplexConditionalExpressions } from './find-complex-conditional-expressions';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assessments/conditional-expressions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAA"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findComplexConditionalExpressions = exports.scanConditionalExpressions = void 0;
4
+ var scan_conditional_expressions_1 = require("./scan-conditional-expressions");
5
+ Object.defineProperty(exports, "scanConditionalExpressions", { enumerable: true, get: function () { return scan_conditional_expressions_1.scanConditionalExpressions; } });
6
+ var find_complex_conditional_expressions_1 = require("./find-complex-conditional-expressions");
7
+ Object.defineProperty(exports, "findComplexConditionalExpressions", { enumerable: true, get: function () { return find_complex_conditional_expressions_1.findComplexConditionalExpressions; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assessments/conditional-expressions/index.ts"],"names":[],"mappings":";;;AAAA,+EAA2E;AAAlE,0IAAA,0BAA0B,OAAA;AACnC,+FAA0F;AAAjF,yJAAA,iCAAiC,OAAA"}
@@ -0,0 +1,3 @@
1
+ import { ScannedRow } from '../scanned-row';
2
+ export declare const scanConditionalExpressions: (files: string[]) => ScannedRow[];
3
+ //# sourceMappingURL=scan-conditional-expressions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scan-conditional-expressions.d.ts","sourceRoot":"","sources":["../../../src/assessments/conditional-expressions/scan-conditional-expressions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAmB3C,eAAO,MAAM,0BAA0B,GAAI,OAAO,MAAM,EAAE,KAAG,UAAU,EA8CtE,CAAA"}
@@ -0,0 +1,94 @@
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.scanConditionalExpressions = void 0;
37
+ const fs = __importStar(require("fs"));
38
+ const ts = __importStar(require("typescript"));
39
+ const ldm_1 = require("@fyuld/ldm");
40
+ const typescript_1 = require("../../languages/typescript");
41
+ const isLogicalBinaryExpression = (node) => ts.isBinaryExpression(node) &&
42
+ (node.operatorToken.kind === ts.SyntaxKind.AmpersandAmpersandToken ||
43
+ node.operatorToken.kind === ts.SyntaxKind.BarBarToken);
44
+ const countTerms = (node) => {
45
+ if (ts.isParenthesizedExpression(node)) {
46
+ return countTerms(node.expression);
47
+ }
48
+ else if (isLogicalBinaryExpression(node)) {
49
+ return countTerms(node.left) + countTerms(node.right);
50
+ }
51
+ else {
52
+ return 1;
53
+ }
54
+ };
55
+ const scanConditionalExpressions = (files) => {
56
+ const occurrences = [];
57
+ for (const file of files) {
58
+ if (!file.endsWith('.ts'))
59
+ continue;
60
+ const source = fs.readFileSync(file, ldm_1.FileFormat.Utf8);
61
+ const sourceFile = (0, typescript_1.parseTypeScript)(source, file);
62
+ const lines = source.split('\n');
63
+ const lineOf = (node) => sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line +
64
+ 1;
65
+ const codeAt = (line) => (lines[line - 1] ?? '').trim();
66
+ const push = (kind, node, condition) => {
67
+ const line = lineOf(node);
68
+ occurrences.push({
69
+ kind,
70
+ condition: condition.getText(sourceFile),
71
+ numTerms: countTerms(condition),
72
+ file,
73
+ line,
74
+ code: codeAt(line),
75
+ });
76
+ };
77
+ const visit = (node) => {
78
+ if (ts.isIfStatement(node)) {
79
+ push('if', node, node.expression);
80
+ }
81
+ else if (ts.isSwitchStatement(node)) {
82
+ push('switch', node, node.expression);
83
+ }
84
+ else if (ts.isConditionalExpression(node)) {
85
+ push('ternary', node, node.condition);
86
+ }
87
+ ts.forEachChild(node, visit);
88
+ };
89
+ visit(sourceFile);
90
+ }
91
+ return occurrences;
92
+ };
93
+ exports.scanConditionalExpressions = scanConditionalExpressions;
94
+ //# sourceMappingURL=scan-conditional-expressions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scan-conditional-expressions.js","sourceRoot":"","sources":["../../../src/assessments/conditional-expressions/scan-conditional-expressions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,+CAAgC;AAChC,oCAAuC;AACvC,2DAA4D;AAG5D,MAAM,yBAAyB,GAAG,CAChC,IAAmB,EACU,E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yuld/pano-dm';
2
+ export declare const findDuplicateDeclarations: (occurrences: Occurrence[]) => Finding[];
3
+ //# sourceMappingURL=find-duplicate-declarations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-duplicate-declarations.d.ts","sourceRoot":"","sources":["../../../src/assessments/duplicate-declarations/find-duplicate-declarations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAEpD,eAAO,MAAM,yBAAyB,GACpC,aAAa,UAAU,EAAE,KACxB,OAAO,EAgBT,CAAA"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findDuplicateDeclarations = void 0;
4
+ const findDuplicateDeclarations = (occurrences) => {
5
+ const counts = new Map();
6
+ if (1 === 1 && 2 === 2) {
7
+ console.log('Math works!');
8
+ }
9
+ for (const o of occurrences) {
10
+ const n = o.name;
11
+ counts.set(n, (counts.get(n) ?? 0) + 1);
12
+ }
13
+ return occurrences
14
+ .filter((o) => (counts.get(o.name) ?? 0) > 1)
15
+ .map((o) => ({ ...o, numUsed: counts.get(o.name) }))
16
+ .sort((a, b) => a.name.localeCompare(b.name));
17
+ };
18
+ exports.findDuplicateDeclarations = findDuplicateDeclarations;
19
+ //# sourceMappingURL=find-duplicate-declarations.js.map