@fyuld/pano 0.1.9 → 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.
- package/dist/compile-principle.d.ts +3 -0
- package/dist/compile-principle.d.ts.map +1 -0
- package/dist/compile-principle.js +44 -0
- package/dist/compile-principle.js.map +1 -0
- package/dist/config-error.d.ts +6 -0
- package/dist/config-error.d.ts.map +1 -0
- package/dist/config-error.js +14 -0
- package/dist/config-error.js.map +1 -0
- package/dist/finding-error.d.ts +6 -0
- package/dist/finding-error.d.ts.map +1 -0
- package/dist/finding-error.js +14 -0
- package/dist/finding-error.js.map +1 -0
- package/dist/format.d.ts +1 -0
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +2 -1
- package/dist/format.js.map +1 -1
- package/dist/pano.d.ts +1 -1
- package/dist/pano.d.ts.map +1 -1
- package/dist/pano.js +253 -150
- package/dist/pano.js.map +1 -1
- package/dist/principles-compile.d.ts +6 -0
- package/dist/principles-compile.d.ts.map +1 -0
- package/dist/principles-compile.js +57 -0
- package/dist/principles-compile.js.map +1 -0
- package/dist/principles-verify.d.ts +7 -0
- package/dist/principles-verify.d.ts.map +1 -0
- package/dist/principles-verify.js +63 -0
- package/dist/principles-verify.js.map +1 -0
- package/dist/render-markdown-ansi.d.ts +2 -0
- package/dist/render-markdown-ansi.d.ts.map +1 -0
- package/dist/render-markdown-ansi.js +114 -0
- package/dist/render-markdown-ansi.js.map +1 -0
- package/dist/render-run-report.d.ts +3 -0
- package/dist/render-run-report.d.ts.map +1 -0
- package/dist/render-run-report.js +101 -0
- package/dist/render-run-report.js.map +1 -0
- package/dist/write-findings.d.ts +4 -0
- package/dist/write-findings.d.ts.map +1 -0
- package/dist/write-findings.js +58 -0
- package/dist/write-findings.js.map +1 -0
- package/dist/write-remarks.d.ts +3 -0
- package/dist/write-remarks.d.ts.map +1 -0
- package/dist/write-remarks.js +47 -0
- package/dist/write-remarks.js.map +1 -0
- package/node_modules/@fyuld/pano-bdd/dist/generate-bdd-steps-for-ux.d.ts +2 -0
- package/node_modules/@fyuld/pano-bdd/dist/generate-bdd-steps-for-ux.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-bdd/dist/generate-bdd-steps-for-ux.js +40 -0
- package/node_modules/@fyuld/pano-bdd/dist/generate-bdd-steps-for-ux.js.map +1 -0
- package/node_modules/@fyuld/pano-bdd/dist/index.d.ts +2 -0
- package/node_modules/@fyuld/pano-bdd/dist/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-bdd/dist/index.js +6 -0
- package/node_modules/@fyuld/pano-bdd/dist/index.js.map +1 -0
- package/node_modules/@fyuld/pano-bdd/package.json +36 -0
- package/node_modules/@fyuld/pano-dm/dist/config/PanOpticumConfig.d.ts +11 -0
- package/node_modules/@fyuld/pano-dm/dist/config/PanOpticumConfig.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/config/PanOpticumConfig.js +3 -0
- package/node_modules/@fyuld/pano-dm/dist/config/PanOpticumConfig.js.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/config/index.d.ts +2 -0
- package/node_modules/@fyuld/pano-dm/dist/config/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/config/index.js +3 -0
- package/node_modules/@fyuld/pano-dm/dist/config/index.js.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/common.d.ts +3 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/common.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/common.js +5 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/common.js.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/file-extension.d.ts +5 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/file-extension.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/file-extension.js +9 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/file-extension.js.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/finding.d.ts +11 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/finding.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/finding.js +3 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/finding.js.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/index.d.ts +7 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/index.js +23 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/index.js.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/occurrence.d.ts +10 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/occurrence.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/occurrence.js +3 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/occurrence.js.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/principle.d.ts +15 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/principle.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/principle.js +3 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/principle.js.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/remark.d.ts +13 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/remark.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/remark.js +3 -0
- package/node_modules/@fyuld/pano-dm/dist/entities/remark.js.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/index.d.ts +3 -0
- package/node_modules/@fyuld/pano-dm/dist/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-dm/dist/index.js +19 -0
- package/node_modules/@fyuld/pano-dm/dist/index.js.map +1 -0
- package/node_modules/@fyuld/pano-dm/package.json +40 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/collect-findings.d.ts +9 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/collect-findings.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/collect-findings.js +29 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/collect-findings.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/collect-occurrences.d.ts +8 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/collect-occurrences.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/collect-occurrences.js +116 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/collect-occurrences.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/find-complex-conditional-expressions.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/find-complex-conditional-expressions.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/find-complex-conditional-expressions.js +6 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/find-complex-conditional-expressions.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/index.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/index.js +8 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/index.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/scan-conditional-expressions.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/scan-conditional-expressions.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/scan-conditional-expressions.js +94 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/conditional-expressions/scan-conditional-expressions.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/find-duplicate-declarations.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/find-duplicate-declarations.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/find-duplicate-declarations.js +19 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/find-duplicate-declarations.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/index.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/index.js +8 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/index.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/scan-declarations.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/scan-declarations.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/scan-declarations.js +97 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/duplicate-declarations/scan-declarations.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/index.d.ts +2 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/index.js +6 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/index.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/scan-fixture-files.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/scan-fixture-files.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/scan-fixture-files.js +15 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/fixture-files/scan-fixture-files.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/index.d.ts +2 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/index.js +6 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/index.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/scan-index-files.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/scan-index-files.d.ts.map +1 -0
- package/{dist/assessments/index-files/index.js → node_modules/@fyuld/pano-engine/dist/assessments/index-files/scan-index-files.js} +38 -43
- package/node_modules/@fyuld/pano-engine/dist/assessments/index-files/scan-index-files.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/scanned-row.d.ts +7 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/scanned-row.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/scanned-row.js +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/scanned-row.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/find-duplicate-string-literals.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/find-duplicate-string-literals.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/find-duplicate-string-literals.js +16 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/find-duplicate-string-literals.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/index.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/index.js +8 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/index.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/scan-string-literals.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/scan-string-literals.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/scan-string-literals.js +131 -0
- package/node_modules/@fyuld/pano-engine/dist/assessments/string-literals/scan-string-literals.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/index.d.ts +11 -0
- package/node_modules/@fyuld/pano-engine/dist/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/index.js +27 -0
- package/node_modules/@fyuld/pano-engine/dist/index.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/languages/terraform/index.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/languages/terraform/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/languages/terraform/index.js +7 -0
- package/node_modules/@fyuld/pano-engine/dist/languages/terraform/index.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/languages/terraform/parser.d.ts +15 -0
- package/node_modules/@fyuld/pano-engine/dist/languages/terraform/parser.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/languages/terraform/parser.js +58 -0
- package/node_modules/@fyuld/pano-engine/dist/languages/terraform/parser.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/languages/typescript/index.d.ts +3 -0
- package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/index.d.ts.map +1 -1
- package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/index.js +0 -1
- package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/index.js.map +1 -1
- package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/parser.d.ts +1 -0
- package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/parser.d.ts.map +1 -1
- package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/parser.js +25 -1
- package/node_modules/@fyuld/pano-engine/dist/languages/typescript/parser.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/evaluate-constraint.d.ts +2 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/evaluate-constraint.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/evaluate-constraint.js +11 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/evaluate-constraint.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/render-remarks.d.ts +4 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/render-remarks.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/render-remarks.js +11 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/render-remarks.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/run-principles.d.ts +9 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/run-principles.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/run-principles.js +22 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/run-principles.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/violation-to-be-renamed-to-remark.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/violation-to-be-renamed-to-remark.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/violation-to-be-renamed-to-remark.js +3 -0
- package/node_modules/@fyuld/pano-engine/dist/principles/violation-to-be-renamed-to-remark.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/render/index.d.ts +4 -0
- package/node_modules/@fyuld/pano-engine/dist/render/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/render/index.js +10 -0
- package/node_modules/@fyuld/pano-engine/dist/render/index.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-csv.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-csv.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-csv.js +13 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-csv.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-helpers.d.ts +4 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-helpers.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-helpers.js +24 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-helpers.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-json.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-json.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-json.js +6 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-json.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-md.d.ts +3 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-md.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-md.js +14 -0
- package/node_modules/@fyuld/pano-engine/dist/render/render-md.js.map +1 -0
- package/node_modules/@fyuld/pano-engine/package.json +51 -0
- package/node_modules/@fyuld/pano-errors/dist/aggregateErrors.d.ts +3 -0
- package/node_modules/@fyuld/pano-errors/dist/aggregateErrors.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-errors/dist/aggregateErrors.js +15 -0
- package/node_modules/@fyuld/pano-errors/dist/aggregateErrors.js.map +1 -0
- package/node_modules/@fyuld/pano-errors/dist/aggregateThrows.d.ts +3 -0
- package/node_modules/@fyuld/pano-errors/dist/aggregateThrows.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-errors/dist/aggregateThrows.js +13 -0
- package/node_modules/@fyuld/pano-errors/dist/aggregateThrows.js.map +1 -0
- package/node_modules/@fyuld/pano-errors/dist/error-declarations.d.ts +10 -0
- package/node_modules/@fyuld/pano-errors/dist/error-declarations.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-errors/dist/error-declarations.js +63 -0
- package/node_modules/@fyuld/pano-errors/dist/error-declarations.js.map +1 -0
- package/node_modules/@fyuld/pano-errors/dist/errors.d.ts +21 -0
- package/node_modules/@fyuld/pano-errors/dist/errors.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-errors/dist/errors.js +179 -0
- package/node_modules/@fyuld/pano-errors/dist/errors.js.map +1 -0
- package/node_modules/@fyuld/pano-errors/dist/index.d.ts +3 -0
- package/node_modules/@fyuld/pano-errors/dist/index.d.ts.map +1 -0
- package/node_modules/@fyuld/pano-errors/dist/index.js +8 -0
- package/node_modules/@fyuld/pano-errors/dist/index.js.map +1 -0
- package/node_modules/@fyuld/pano-errors/package.json +41 -0
- package/package.json +22 -12
- package/dist/assessments/classes/index.d.ts +0 -15
- package/dist/assessments/classes/index.d.ts.map +0 -1
- package/dist/assessments/classes/index.js +0 -112
- package/dist/assessments/classes/index.js.map +0 -1
- package/dist/assessments/index-files/index.d.ts +0 -13
- package/dist/assessments/index-files/index.d.ts.map +0 -1
- package/dist/assessments/index-files/index.js.map +0 -1
- package/dist/assessments/throws/index.d.ts +0 -16
- package/dist/assessments/throws/index.d.ts.map +0 -1
- package/dist/assessments/throws/index.js +0 -110
- package/dist/assessments/throws/index.js.map +0 -1
- package/dist/assessments/types/index.d.ts +0 -14
- package/dist/assessments/types/index.d.ts.map +0 -1
- package/dist/assessments/types/index.js +0 -96
- package/dist/assessments/types/index.js.map +0 -1
- package/dist/fitness-tests/barrel-purity/index.d.ts +0 -11
- package/dist/fitness-tests/barrel-purity/index.d.ts.map +0 -1
- package/dist/fitness-tests/barrel-purity/index.js +0 -84
- package/dist/fitness-tests/barrel-purity/index.js.map +0 -1
- package/dist/fitness-tests/datamodel-encapsulation/index.d.ts +0 -10
- package/dist/fitness-tests/datamodel-encapsulation/index.d.ts.map +0 -1
- package/dist/fitness-tests/datamodel-encapsulation/index.js +0 -99
- package/dist/fitness-tests/datamodel-encapsulation/index.js.map +0 -1
- package/dist/fitness-tests/error-factories/index.d.ts +0 -17
- package/dist/fitness-tests/error-factories/index.d.ts.map +0 -1
- package/dist/fitness-tests/error-factories/index.js +0 -97
- package/dist/fitness-tests/error-factories/index.js.map +0 -1
- package/dist/fitness-tests/unhelpful-errors/index.d.ts +0 -11
- package/dist/fitness-tests/unhelpful-errors/index.d.ts.map +0 -1
- package/dist/fitness-tests/unhelpful-errors/index.js +0 -87
- package/dist/fitness-tests/unhelpful-errors/index.js.map +0 -1
- package/dist/languages/typescript/comment-classification.d.ts +0 -8
- package/dist/languages/typescript/comment-classification.d.ts.map +0 -1
- package/dist/languages/typescript/comment-classification.js +0 -45
- package/dist/languages/typescript/comment-classification.js.map +0 -1
- package/dist/languages/typescript/index.d.ts +0 -4
- package/dist/languages/typescript/parser.js.map +0 -1
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/index.d.ts +0 -0
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/index.d.ts.map +0 -0
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/index.js +0 -0
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/index.js.map +0 -0
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/parser.d.ts +0 -0
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/parser.d.ts.map +0 -0
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/parser.js +0 -0
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/gherkin/parser.js.map +0 -0
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/comments.d.ts +0 -0
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/comments.d.ts.map +0 -0
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/comments.js +0 -0
- /package/{dist → node_modules/@fyuld/pano-engine/dist}/languages/typescript/comments.js.map +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
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.aggregateErrorDeclarations = void 0;
|
|
37
|
+
const ts = __importStar(require("typescript"));
|
|
38
|
+
const nameLooksLikeError = (name) => name.endsWith("Error");
|
|
39
|
+
const lineOf = (sourceFile, node) => sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line + 1;
|
|
40
|
+
const aggregateErrorDeclarations = (sourceFile, filePath) => {
|
|
41
|
+
const out = [];
|
|
42
|
+
const visit = (node) => {
|
|
43
|
+
const isErrorTypeDeclaration = (ts.isClassDeclaration(node) ||
|
|
44
|
+
ts.isInterfaceDeclaration(node) ||
|
|
45
|
+
ts.isTypeAliasDeclaration(node) ||
|
|
46
|
+
ts.isEnumDeclaration(node)) &&
|
|
47
|
+
node.name !== undefined &&
|
|
48
|
+
nameLooksLikeError(node.name.text);
|
|
49
|
+
if (isErrorTypeDeclaration) {
|
|
50
|
+
out.push({
|
|
51
|
+
name: node.name.text,
|
|
52
|
+
file: filePath,
|
|
53
|
+
line: lineOf(sourceFile, node.name),
|
|
54
|
+
reasons: ["error-postfix"],
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
node.forEachChild(visit);
|
|
58
|
+
};
|
|
59
|
+
visit(sourceFile);
|
|
60
|
+
return out;
|
|
61
|
+
};
|
|
62
|
+
exports.aggregateErrorDeclarations = aggregateErrorDeclarations;
|
|
63
|
+
//# sourceMappingURL=error-declarations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-declarations.js","sourceRoot":"","sources":["../src/error-declarations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AAWjC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAW,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAE7E,MAAM,MAAM,GAAG,CAAC,UAAyB,EAAE,IAAa,EAAU,EAAE,CAClE,UAAU,CAAC,6BAA6B,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;AAExE,MAAM,0BAA0B,GAAG,CACxC,UAAyB,EACzB,QAAgB,EACC,EAAE;IACnB,MAAM,GAAG,GAAoB,EAAE,CAAC;IAChC,MAAM,KAAK,GAAG,CAAC,IAAa,EAAQ,EAAE;QACpC,MAAM,sBAAsB,GAC1B,CAAC,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC1B,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC;YAC/B,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC;YAC/B,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,CAAC,IAAI,KAAK,SAAS;YACvB,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,sBAAsB,EAAE,CAAC;YAC3B,GAAG,CAAC,IAAI,CAAC;gBACP,IAAI,EAAE,IAAI,CAAC,IAAK,CAAC,IAAI;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,IAAK,CAAC;gBACpC,OAAO,EAAE,CAAC,eAAe,CAAC;aAC3B,CAAC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC,CAAC;IACF,KAAK,CAAC,UAAU,CAAC,CAAC;IAClB,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAzBW,QAAA,0BAA0B,8BAyBrC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ErrorReason } from "./error-declarations";
|
|
2
|
+
export type ErrorLocation = {
|
|
3
|
+
file: string;
|
|
4
|
+
line: number;
|
|
5
|
+
};
|
|
6
|
+
export type ThrownAt = ErrorLocation & {
|
|
7
|
+
instantiation: "constructor" | "factory" | "other";
|
|
8
|
+
};
|
|
9
|
+
export type ErrorEntry = {
|
|
10
|
+
name: string;
|
|
11
|
+
reasons: ErrorReason[];
|
|
12
|
+
inheritancePath: string[];
|
|
13
|
+
declaredAt?: ErrorLocation;
|
|
14
|
+
thrownAt: ThrownAt[];
|
|
15
|
+
};
|
|
16
|
+
export type ErrorsReport = {
|
|
17
|
+
totalErrors: number;
|
|
18
|
+
errors: ErrorEntry[];
|
|
19
|
+
};
|
|
20
|
+
export declare const collectErrorEntries: (files: string[]) => ErrorEntry[];
|
|
21
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8B,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE/E,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG;IACrC,aAAa,EAAE,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,QAAQ,EAAE,QAAQ,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC;AAuBF,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,EAAE,KAAG,UAAU,EAyH/D,CAAC"}
|
|
@@ -0,0 +1,179 @@
|
|
|
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.collectErrorEntries = void 0;
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const ts = __importStar(require("typescript"));
|
|
39
|
+
const error_declarations_1 = require("./error-declarations");
|
|
40
|
+
const PRIMITIVE_MASK = ts.TypeFlags.StringLike |
|
|
41
|
+
ts.TypeFlags.NumberLike |
|
|
42
|
+
ts.TypeFlags.BooleanLike |
|
|
43
|
+
ts.TypeFlags.BigIntLike |
|
|
44
|
+
ts.TypeFlags.ESSymbolLike |
|
|
45
|
+
ts.TypeFlags.Null |
|
|
46
|
+
ts.TypeFlags.Undefined |
|
|
47
|
+
ts.TypeFlags.Void;
|
|
48
|
+
const lineOf = (sourceFile, node) => sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line + 1;
|
|
49
|
+
const instantiationOf = (expr) => {
|
|
50
|
+
if (ts.isNewExpression(expr))
|
|
51
|
+
return "constructor";
|
|
52
|
+
if (ts.isCallExpression(expr))
|
|
53
|
+
return "factory";
|
|
54
|
+
return "other";
|
|
55
|
+
};
|
|
56
|
+
const collectErrorEntries = (files) => {
|
|
57
|
+
const program = ts.createProgram(files, {
|
|
58
|
+
target: ts.ScriptTarget.Latest,
|
|
59
|
+
module: ts.ModuleKind.CommonJS,
|
|
60
|
+
moduleResolution: ts.ModuleResolutionKind.Node10,
|
|
61
|
+
skipLibCheck: true,
|
|
62
|
+
noEmit: true,
|
|
63
|
+
});
|
|
64
|
+
const checker = program.getTypeChecker();
|
|
65
|
+
const targets = new Set(files.map((f) => path.resolve(f)));
|
|
66
|
+
const bucket = new Map();
|
|
67
|
+
const isClassOrInterface = (type) => {
|
|
68
|
+
if ((type.flags & ts.TypeFlags.Object) === 0)
|
|
69
|
+
return false;
|
|
70
|
+
const objectFlags = type.objectFlags;
|
|
71
|
+
return ((objectFlags & (ts.ObjectFlags.Class | ts.ObjectFlags.Interface)) !== 0);
|
|
72
|
+
};
|
|
73
|
+
const errorChainOf = (type) => {
|
|
74
|
+
const selfName = (type.aliasSymbol ?? type.getSymbol())?.getName();
|
|
75
|
+
if (selfName === "Error")
|
|
76
|
+
return ["Error"];
|
|
77
|
+
if (!isClassOrInterface(type))
|
|
78
|
+
return [];
|
|
79
|
+
for (const base of checker.getBaseTypes(type)) {
|
|
80
|
+
if (base.getSymbol()?.getName() === "Object")
|
|
81
|
+
continue;
|
|
82
|
+
const sub = errorChainOf(base);
|
|
83
|
+
if (sub.length > 0)
|
|
84
|
+
return selfName ? [selfName, ...sub] : sub;
|
|
85
|
+
}
|
|
86
|
+
return [];
|
|
87
|
+
};
|
|
88
|
+
const errorTypeName = (type) => {
|
|
89
|
+
const symbol = type.aliasSymbol ?? type.getSymbol();
|
|
90
|
+
if (!symbol)
|
|
91
|
+
return undefined;
|
|
92
|
+
const name = symbol.getName();
|
|
93
|
+
if (name.startsWith("__"))
|
|
94
|
+
return undefined;
|
|
95
|
+
return name;
|
|
96
|
+
};
|
|
97
|
+
const collectErrorTypes = (type) => {
|
|
98
|
+
if (type.isUnion())
|
|
99
|
+
return type.types.flatMap(collectErrorTypes);
|
|
100
|
+
if ((type.flags & PRIMITIVE_MASK) !== 0)
|
|
101
|
+
return [];
|
|
102
|
+
return [type];
|
|
103
|
+
};
|
|
104
|
+
const ensure = (name) => {
|
|
105
|
+
const existing = bucket.get(name);
|
|
106
|
+
if (existing)
|
|
107
|
+
return existing;
|
|
108
|
+
const created = {
|
|
109
|
+
name,
|
|
110
|
+
reasons: [],
|
|
111
|
+
inheritancePath: [],
|
|
112
|
+
thrownAt: [],
|
|
113
|
+
};
|
|
114
|
+
bucket.set(name, created);
|
|
115
|
+
return created;
|
|
116
|
+
};
|
|
117
|
+
const addReason = (entry, reason) => {
|
|
118
|
+
if (!entry.reasons.includes(reason))
|
|
119
|
+
entry.reasons.push(reason);
|
|
120
|
+
};
|
|
121
|
+
const setPath = (entry, chain) => {
|
|
122
|
+
const shouldSetInheritancePath = entry.inheritancePath.length === 0 && chain.length > 0;
|
|
123
|
+
if (shouldSetInheritancePath) {
|
|
124
|
+
entry.inheritancePath = chain;
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
for (const sourceFile of program.getSourceFiles()) {
|
|
128
|
+
if (!targets.has(path.resolve(sourceFile.fileName)))
|
|
129
|
+
continue;
|
|
130
|
+
const filePath = path.relative(process.cwd(), sourceFile.fileName);
|
|
131
|
+
for (const declared of (0, error_declarations_1.aggregateErrorDeclarations)(sourceFile, filePath)) {
|
|
132
|
+
const entry = ensure(declared.name);
|
|
133
|
+
for (const reason of declared.reasons)
|
|
134
|
+
addReason(entry, reason);
|
|
135
|
+
if (!entry.declaredAt) {
|
|
136
|
+
entry.declaredAt = { file: declared.file, line: declared.line };
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
const visit = (node) => {
|
|
140
|
+
const isNamedClassDeclaration = ts.isClassDeclaration(node) && node.name !== undefined;
|
|
141
|
+
if (isNamedClassDeclaration) {
|
|
142
|
+
const symbol = checker.getSymbolAtLocation(node.name);
|
|
143
|
+
if (symbol) {
|
|
144
|
+
const chain = errorChainOf(checker.getDeclaredTypeOfSymbol(symbol));
|
|
145
|
+
if (chain.length > 0) {
|
|
146
|
+
const entry = ensure(node.name.text);
|
|
147
|
+
addReason(entry, "extends-error");
|
|
148
|
+
if (!entry.declaredAt) {
|
|
149
|
+
entry.declaredAt = {
|
|
150
|
+
file: filePath,
|
|
151
|
+
line: lineOf(sourceFile, node.name),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
setPath(entry, chain);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
else if (ts.isThrowStatement(node)) {
|
|
159
|
+
const line = lineOf(sourceFile, node);
|
|
160
|
+
const instantiation = instantiationOf(node.expression);
|
|
161
|
+
const type = checker.getTypeAtLocation(node.expression);
|
|
162
|
+
for (const thrown of collectErrorTypes(type)) {
|
|
163
|
+
const name = errorTypeName(thrown);
|
|
164
|
+
if (!name)
|
|
165
|
+
continue;
|
|
166
|
+
const entry = ensure(name);
|
|
167
|
+
addReason(entry, "thrown");
|
|
168
|
+
entry.thrownAt.push({ file: filePath, line, instantiation });
|
|
169
|
+
setPath(entry, errorChainOf(thrown));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
node.forEachChild(visit);
|
|
173
|
+
};
|
|
174
|
+
visit(sourceFile);
|
|
175
|
+
}
|
|
176
|
+
return [...bucket.values()];
|
|
177
|
+
};
|
|
178
|
+
exports.collectErrorEntries = collectErrorEntries;
|
|
179
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,+CAAiC;AACjC,6DAA+E;AAwB/E,MAAM,cAAc,GAClB,EAAE,CAAC,SAAS,CAAC,UAAU;IACvB,EAAE,CAAC,SAAS,CAAC,UAAU;IACvB,EAAE,CAAC,SAAS,CAAC,WAAW;IACxB,EAAE,CAAC,SAAS,CAAC,UAAU;IACvB,EAAE,CAAC,SAAS,CAAC,YAAY;IACzB,EAAE,CAAC,SAAS,CAAC,IAAI;IACjB,EAAE,C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CAAC,MAAM,EAAE,CAAC,CAAC;AAC9B,CAAC,CAAC;AAzHW,QAAA,mBAAmB,uBAyH9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.aggregateThrows = exports.aggregateErrors = void 0;
|
|
4
|
+
var aggregateErrors_1 = require("./aggregateErrors");
|
|
5
|
+
Object.defineProperty(exports, "aggregateErrors", { enumerable: true, get: function () { return aggregateErrors_1.aggregateErrors; } });
|
|
6
|
+
var aggregateThrows_1 = require("./aggregateThrows");
|
|
7
|
+
Object.defineProperty(exports, "aggregateThrows", { enumerable: true, get: function () { return aggregateThrows_1.aggregateThrows; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fyuld/pano-errors",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Error throw and declaration analysis 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
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@fyuld/pano-dm": "^0.3.2"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"typescript": "^5.9.2"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/jest": "^30.0.0",
|
|
33
|
+
"@types/node": "^25.8.0",
|
|
34
|
+
"jest": "^30.4.2",
|
|
35
|
+
"prettier": "^3.8.3",
|
|
36
|
+
"ts-jest": "^29.4.9"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist"
|
|
40
|
+
]
|
|
41
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fyuld/pano",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Pan Opticum",
|
|
5
|
-
"main": "dist/
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "CLI for Pan Opticum",
|
|
5
|
+
"main": "dist/pano.js",
|
|
7
6
|
"bin": {
|
|
8
7
|
"pano": "dist/pano.js"
|
|
9
8
|
},
|
|
@@ -14,8 +13,9 @@
|
|
|
14
13
|
},
|
|
15
14
|
"scripts": {
|
|
16
15
|
"build": "npm run clean && npm run checks && npm run tsc",
|
|
16
|
+
"prepack": "node scripts/bundle-deps.js stage",
|
|
17
|
+
"postpack": "node scripts/bundle-deps.js clean",
|
|
17
18
|
"pub": "npm run build && npm publish",
|
|
18
|
-
"update-dms": "npm install --save-dev @fyuld/panopticum-dm",
|
|
19
19
|
"tsc": "tsc",
|
|
20
20
|
"watch": "tsc --watch",
|
|
21
21
|
"clean": "rm -rf dist",
|
|
@@ -25,9 +25,11 @@
|
|
|
25
25
|
"test:coverage": "jest --coverage",
|
|
26
26
|
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json}\"",
|
|
27
27
|
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json}\"",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
28
|
+
"try:analyze": "npx ts-node src/pano.ts analyze",
|
|
29
|
+
"try:assess": "npx ts-node src/pano.ts assess",
|
|
30
|
+
"try:run": "npx ts-node src/pano.ts run",
|
|
31
|
+
"try:taskify": "npx ts-node src/pano.ts taskify",
|
|
32
|
+
"try:clean": "npx ts-node src/pano.ts clean"
|
|
31
33
|
},
|
|
32
34
|
"devDependencies": {
|
|
33
35
|
"@fyuld/jest-cucumber-utils": "^1.2.0",
|
|
@@ -37,15 +39,23 @@
|
|
|
37
39
|
"jest-cucumber": "^4.5.0",
|
|
38
40
|
"prettier": "^3.6.2",
|
|
39
41
|
"ts-jest": "^29.4.2",
|
|
40
|
-
"ts-json-schema-generator": "^2.9.0",
|
|
41
42
|
"typescript": "^5.9.2"
|
|
42
43
|
},
|
|
43
44
|
"files": [
|
|
44
45
|
"dist"
|
|
45
46
|
],
|
|
46
47
|
"dependencies": {
|
|
47
|
-
"@fyuld/ldm": "^0.
|
|
48
|
+
"@fyuld/ldm": "^0.8.2",
|
|
49
|
+
"@fyuld/mdad": "^0.8.1",
|
|
48
50
|
"@fyuld/pano-bdd": "^0.1.2",
|
|
49
|
-
"@fyuld/pano-dm": "^0.3.2"
|
|
50
|
-
|
|
51
|
+
"@fyuld/pano-dm": "^0.3.2",
|
|
52
|
+
"@fyuld/pano-engine": "^0.1.9",
|
|
53
|
+
"typescript": "^5.9.2"
|
|
54
|
+
},
|
|
55
|
+
"bundledDependencies": [
|
|
56
|
+
"@fyuld/pano-bdd",
|
|
57
|
+
"@fyuld/pano-dm",
|
|
58
|
+
"@fyuld/pano-engine",
|
|
59
|
+
"@fyuld/pano-errors"
|
|
60
|
+
]
|
|
51
61
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PlainTextFileFormats } from '@fyuld/ldm';
|
|
2
|
-
export type ConstructorVisibility = 'public' | 'private' | 'protected';
|
|
3
|
-
export type ClassEntry = {
|
|
4
|
-
file: string;
|
|
5
|
-
line: number;
|
|
6
|
-
name: string;
|
|
7
|
-
constructorVisibility?: ConstructorVisibility;
|
|
8
|
-
};
|
|
9
|
-
export type ClassesReport = {
|
|
10
|
-
classes: ClassEntry[];
|
|
11
|
-
};
|
|
12
|
-
export declare const runClassesAssessment: (files: string[], formats: PlainTextFileFormats[], outDir: string) => {
|
|
13
|
-
report: ClassesReport;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assessments/classes/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGjD,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAA;AAEtE,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;CAC9C,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,UAAU,EAAE,CAAA;CACtB,CAAA;AA4ED,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,EAAE,EACf,SAAS,oBAAoB,EAAE,EAC/B,QAAQ,MAAM,KACb;IAAE,MAAM,EAAE,aAAa,CAAA;CAUzB,CAAA"}
|
|
@@ -1,112 +0,0 @@
|
|
|
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.runClassesAssessment = void 0;
|
|
37
|
-
const fs = __importStar(require("fs"));
|
|
38
|
-
const path = __importStar(require("path"));
|
|
39
|
-
const ts = __importStar(require("typescript"));
|
|
40
|
-
const typescript_1 = require("../../languages/typescript");
|
|
41
|
-
const visibilityFromConstructor = (cls) => {
|
|
42
|
-
for (const member of cls.members) {
|
|
43
|
-
if (!ts.isConstructorDeclaration(member))
|
|
44
|
-
continue;
|
|
45
|
-
const mods = ts.canHaveModifiers(member)
|
|
46
|
-
? ts.getModifiers(member)
|
|
47
|
-
: undefined;
|
|
48
|
-
if (!mods)
|
|
49
|
-
return 'public';
|
|
50
|
-
for (const mod of mods) {
|
|
51
|
-
if (mod.kind === ts.SyntaxKind.PrivateKeyword)
|
|
52
|
-
return 'private';
|
|
53
|
-
if (mod.kind === ts.SyntaxKind.ProtectedKeyword)
|
|
54
|
-
return 'protected';
|
|
55
|
-
if (mod.kind === ts.SyntaxKind.PublicKeyword)
|
|
56
|
-
return 'public';
|
|
57
|
-
}
|
|
58
|
-
return 'public';
|
|
59
|
-
}
|
|
60
|
-
return undefined;
|
|
61
|
-
};
|
|
62
|
-
const collectClasses = (sourceFile, filePath) => {
|
|
63
|
-
const out = [];
|
|
64
|
-
const visit = (node) => {
|
|
65
|
-
if (ts.isClassDeclaration(node) && node.name) {
|
|
66
|
-
const line = sourceFile.getLineAndCharacterOfPosition(node.name.getStart(sourceFile))
|
|
67
|
-
.line + 1;
|
|
68
|
-
out.push({
|
|
69
|
-
file: filePath,
|
|
70
|
-
line,
|
|
71
|
-
name: node.name.text,
|
|
72
|
-
constructorVisibility: visibilityFromConstructor(node),
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
node.forEachChild(visit);
|
|
76
|
-
};
|
|
77
|
-
visit(sourceFile);
|
|
78
|
-
return out;
|
|
79
|
-
};
|
|
80
|
-
const renderJson = (report) => JSON.stringify(report, null, 2) + '\n';
|
|
81
|
-
const renderCsv = (classes) => [
|
|
82
|
-
'name,file,line,constructorVisibility',
|
|
83
|
-
...classes.map((c) => `${c.name},${c.file},${c.line},${c.constructorVisibility ?? ''}`),
|
|
84
|
-
].join('\n') + '\n';
|
|
85
|
-
const writeReport = (report, formats, outDir) => {
|
|
86
|
-
fs.mkdirSync(outDir, { recursive: true });
|
|
87
|
-
for (const format of formats) {
|
|
88
|
-
const f = format;
|
|
89
|
-
if (f === 'Json') {
|
|
90
|
-
fs.writeFileSync(path.join(outDir, 'classes.json'), renderJson(report));
|
|
91
|
-
}
|
|
92
|
-
else if (f === 'Csv') {
|
|
93
|
-
fs.writeFileSync(path.join(outDir, 'classes.csv'), renderCsv(report.classes));
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
throw new Error(`Unknown assessment format: ${f}`);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
const runClassesAssessment = (files, formats, outDir) => {
|
|
101
|
-
const all = [];
|
|
102
|
-
for (const file of files) {
|
|
103
|
-
const source = fs.readFileSync(file, 'utf-8');
|
|
104
|
-
const sourceFile = (0, typescript_1.parseTypeScript)(source, file);
|
|
105
|
-
all.push(...collectClasses(sourceFile, path.relative(process.cwd(), file)));
|
|
106
|
-
}
|
|
107
|
-
const report = { classes: all };
|
|
108
|
-
writeReport(report, formats, outDir);
|
|
109
|
-
return { report };
|
|
110
|
-
};
|
|
111
|
-
exports.runClassesAssessment = runClassesAssessment;
|
|
112
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assessments/classes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,2CAA4B;AAC5B,+CAAgC;AAEhC,2DAA4D;AAe5D,MAAM,yBAAyB,GAAG,CAChC,GAAwB,EACW,EAAE;IACrC,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;QACjC,IAAI,CAAC,EAAE,CAAC,wBAAwB,CAAC,MA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A;QACpD,CAAC;IACH,CAAC;AACH,CAAC,CAAA;AAEM,MAAM,oBAAoB,GAAG,CAClC,KAAe,EACf,OAA+B,EAC/B,MAAc,EACa,EAAE;IAC7B,MAAM,GAAG,GAAiB,EAAE,CAAA;IAC5B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QAC7C,MAAM,UAAU,GAAG,IAAA,4BAAe,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QAChD,GAAG,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IAC7E,CAAC;IACD,MAAM,MAAM,GAAkB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAA;IAC9C,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;IACpC,OAAO,EAAE,MAAM,EAAE,CAAA;AACnB,CAAC,CAAA;AAdY,QAAA,oBAAoB,wBAchC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PlainTextFileFormats } from '@fyuld/ldm';
|
|
2
|
-
export type IndexFileEntry = {
|
|
3
|
-
file: string;
|
|
4
|
-
impureStatementCount: number;
|
|
5
|
-
};
|
|
6
|
-
export type IndexFilesReport = {
|
|
7
|
-
totalIndexFiles: number;
|
|
8
|
-
violations: IndexFileEntry[];
|
|
9
|
-
};
|
|
10
|
-
export declare const runIndexFilesAssessment: (files: string[], formats: PlainTextFileFormats[], outDir: string) => {
|
|
11
|
-
report: IndexFilesReport;
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assessments/index-files/index.ts"],"names":[],"mappings":"AAGA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D,MAAM,oBAAoB,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAA;QAC9D,IAAI,oBAAoB,GAAG,CAAC,EAAE,CAAC;YAC7B,UAAU,CAAC,IAAI,CAAC;gBACd,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC;gBACxC,oBAAoB;aACrB,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAqB,EAAE,eAAe,EAAE,UAAU,EAAE,CAAA;IAChE,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;IACpC,OAAO,EAAE,MAAM,EAAE,CAAA;AACnB,CAAC,CAAA;AAvBY,QAAA,uBAAuB,2BAuBnC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PlainTextFileFormats } from '@fyuld/ldm';
|
|
2
|
-
export type ThrowKind = 'new' | 'literal' | 'rethrow' | 'other';
|
|
3
|
-
export type ThrowEntry = {
|
|
4
|
-
file: string;
|
|
5
|
-
line: number;
|
|
6
|
-
kind: ThrowKind;
|
|
7
|
-
className?: string;
|
|
8
|
-
};
|
|
9
|
-
export type ThrowsReport = {
|
|
10
|
-
totalThrows: number;
|
|
11
|
-
throws: ThrowEntry[];
|
|
12
|
-
};
|
|
13
|
-
export declare const runThrowsAssessment: (files: string[], formats: PlainTextFileFormats[], outDir: string) => {
|
|
14
|
-
report: ThrowsReport;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assessments/throws/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGjD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;AAE/D,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,UAAU,EAAE,CAAA;CACrB,CAAA;AA6ED,eAAO,MAAM,mBAAmB,GAC9B,OAAO,MAAM,EAAE,EACf,SAAS,oBAAoB,EAAE,EAC/B,QAAQ,MAAM,KACb;IAAE,MAAM,EAAE,YAAY,CAAA;CAUxB,CAAA"}
|