@md-code/follow-architecture 0.1.0 → 0.3.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/CHANGELOG.md +16 -0
- package/LICENSE +202 -0
- package/README.md +597 -126
- package/dist/aliases.d.ts +3 -0
- package/dist/aliases.js +12 -0
- package/dist/args.d.ts +14 -0
- package/dist/args.js +77 -0
- package/dist/bin/follow-architecture.d.ts +2 -0
- package/dist/bin/follow-architecture.js +23 -0
- package/dist/code-roles/classify.d.ts +11 -0
- package/dist/code-roles/classify.js +43 -0
- package/dist/code-roles/connector.d.ts +5 -0
- package/dist/code-roles/connector.js +114 -0
- package/dist/code-roles/project.d.ts +12 -0
- package/dist/code-roles/project.js +122 -0
- package/dist/code-roles/roles.d.ts +8 -0
- package/dist/code-roles/roles.js +190 -0
- package/dist/config-options.d.ts +53 -0
- package/dist/config-options.js +35 -0
- package/dist/config-project.d.ts +4 -0
- package/dist/config-project.js +74 -0
- package/dist/config-report.d.ts +19 -0
- package/dist/config-report.js +134 -0
- package/dist/config-rule.d.ts +70 -0
- package/dist/config-rule.js +118 -0
- package/dist/config-state.d.ts +14 -0
- package/dist/config-state.js +96 -0
- package/dist/config.d.ts +82 -0
- package/dist/config.js +38 -0
- package/dist/css/index.d.ts +27 -0
- package/dist/css/index.js +140 -0
- package/dist/css/syntax/css/gate.d.ts +2 -0
- package/dist/css/syntax/css/gate.js +69 -0
- package/dist/css/syntax/css/index.d.ts +7 -0
- package/dist/css/syntax/css/index.js +41 -0
- package/dist/css/syntax/css/reference.d.ts +3 -0
- package/dist/css/syntax/css/reference.js +24 -0
- package/dist/css/syntax/language.d.ts +25 -0
- package/dist/css/syntax/language.js +69 -0
- package/dist/css/syntax/scss/index.d.ts +25 -0
- package/dist/css/syntax/scss/index.js +85 -0
- package/dist/css/syntax/scss/reference.d.ts +3 -0
- package/dist/css/syntax/scss/reference.js +11 -0
- package/dist/css/syntax/styled/document.d.ts +68 -0
- package/dist/css/syntax/styled/document.js +241 -0
- package/dist/css/syntax/styled/markup.d.ts +6 -0
- package/dist/css/syntax/styled/markup.js +76 -0
- package/dist/css/syntax/styled/template.d.ts +23 -0
- package/dist/css/syntax/styled/template.js +61 -0
- package/dist/css/syntax/tailwind/tailwind-engine.d.ts +23 -0
- package/dist/css/syntax/tailwind/tailwind-engine.js +37 -0
- package/dist/css/syntax/tailwind/tailwind.d.ts +26 -0
- package/dist/css/syntax/tailwind/tailwind.js +118 -0
- package/dist/css/value/check.d.ts +86 -0
- package/dist/css/value/check.js +122 -0
- package/dist/css/value/expression/arithmetic.d.ts +7 -0
- package/dist/css/value/expression/arithmetic.js +69 -0
- package/dist/css/value/expression/block.d.ts +9 -0
- package/dist/css/value/expression/block.js +91 -0
- package/dist/css/value/expression/conditional.d.ts +8 -0
- package/dist/css/value/expression/conditional.js +53 -0
- package/dist/css/value/expression/index.d.ts +5 -0
- package/dist/css/value/expression/index.js +69 -0
- package/dist/css/value/expression/map.d.ts +7 -0
- package/dist/css/value/expression/map.js +113 -0
- package/dist/css/value/object/index.d.ts +5 -0
- package/dist/css/value/object/index.js +103 -0
- package/dist/css/value/object/members.d.ts +7 -0
- package/dist/css/value/object/members.js +103 -0
- package/dist/css/value/object/node.d.ts +8 -0
- package/dist/css/value/object/node.js +129 -0
- package/dist/css/value/object/path.d.ts +10 -0
- package/dist/css/value/object/path.js +146 -0
- package/dist/css/value/pieces.d.ts +61 -0
- package/dist/css/value/pieces.js +55 -0
- package/dist/css/value/resolve.d.ts +33 -0
- package/dist/css/value/resolve.js +94 -0
- package/dist/css/value/scope.d.ts +27 -0
- package/dist/css/value/scope.js +187 -0
- package/dist/css/value/substitute.d.ts +10 -0
- package/dist/css/value/substitute.js +113 -0
- package/dist/css/value/values.d.ts +23 -0
- package/dist/css/value/values.js +131 -0
- package/dist/entities/architecture.d.ts +162 -0
- package/dist/entities/architecture.js +2 -0
- package/dist/entities/ast/assignments-nodes.d.ts +10 -0
- package/dist/entities/ast/assignments-nodes.js +64 -0
- package/dist/entities/ast/assignments-raw.d.ts +6 -0
- package/dist/entities/ast/assignments-raw.js +86 -0
- package/dist/entities/ast/assignments-tagged.d.ts +5 -0
- package/dist/entities/ast/assignments-tagged.js +180 -0
- package/dist/entities/ast/assignments.d.ts +9 -0
- package/dist/entities/ast/assignments.js +78 -0
- package/dist/entities/ast/branches.d.ts +4 -0
- package/dist/entities/ast/branches.js +32 -0
- package/dist/entities/ast/calls.d.ts +6 -0
- package/dist/entities/ast/calls.js +134 -0
- package/dist/entities/ast/classes.d.ts +5 -0
- package/dist/entities/ast/classes.js +57 -0
- package/dist/entities/ast/climb.d.ts +12 -0
- package/dist/entities/ast/climb.js +17 -0
- package/dist/entities/ast/comments.d.ts +4 -0
- package/dist/entities/ast/comments.js +100 -0
- package/dist/entities/ast/declaration.d.ts +4 -0
- package/dist/entities/ast/declaration.js +26 -0
- package/dist/entities/ast/depth.d.ts +17 -0
- package/dist/entities/ast/depth.js +149 -0
- package/dist/entities/ast/enums.d.ts +6 -0
- package/dist/entities/ast/enums.js +17 -0
- package/dist/entities/ast/file-exports.d.ts +7 -0
- package/dist/entities/ast/file-exports.js +78 -0
- package/dist/entities/ast/file-facts.d.ts +13 -0
- package/dist/entities/ast/file-facts.js +35 -0
- package/dist/entities/ast/file-imports.d.ts +5 -0
- package/dist/entities/ast/file-imports.js +77 -0
- package/dist/entities/ast/file.d.ts +5 -0
- package/dist/entities/ast/file.js +22 -0
- package/dist/entities/ast/functions.d.ts +8 -0
- package/dist/entities/ast/functions.js +102 -0
- package/dist/entities/ast/heritage.d.ts +4 -0
- package/dist/entities/ast/heritage.js +36 -0
- package/dist/entities/ast/index.d.ts +6 -0
- package/dist/entities/ast/index.js +125 -0
- package/dist/entities/ast/kind.d.ts +5 -0
- package/dist/entities/ast/kind.js +28 -0
- package/dist/entities/ast/loose.d.ts +37 -0
- package/dist/entities/ast/loose.js +2 -0
- package/dist/entities/ast/modifiers.d.ts +5 -0
- package/dist/entities/ast/modifiers.js +32 -0
- package/dist/entities/ast/project.d.ts +9 -0
- package/dist/entities/ast/project.js +75 -0
- package/dist/entities/ast/properties.d.ts +11 -0
- package/dist/entities/ast/properties.js +171 -0
- package/dist/entities/ast/resolve.d.ts +16 -0
- package/dist/entities/ast/resolve.js +307 -0
- package/dist/entities/ast/tree.d.ts +29 -0
- package/dist/entities/ast/tree.js +351 -0
- package/dist/entities/ast/types.d.ts +6 -0
- package/dist/entities/ast/types.js +45 -0
- package/dist/entities/ast/usage.d.ts +11 -0
- package/dist/entities/ast/usage.js +81 -0
- package/dist/entities/ast/variables.d.ts +8 -0
- package/dist/entities/ast/variables.js +91 -0
- package/dist/entities/context.d.ts +29 -0
- package/dist/entities/context.js +2 -0
- package/dist/entities/facts.d.ts +261 -0
- package/dist/entities/facts.js +2 -0
- package/dist/entities/findings.d.ts +19 -0
- package/dist/entities/findings.js +2 -0
- package/dist/entities/kinds.d.ts +40 -0
- package/dist/entities/kinds.js +221 -0
- package/dist/entities/location/homes.d.ts +28 -0
- package/dist/entities/location/homes.js +169 -0
- package/dist/entities/location/place.d.ts +10 -0
- package/dist/entities/location/place.js +56 -0
- package/dist/entities/location/where.d.ts +17 -0
- package/dist/entities/location/where.js +218 -0
- package/dist/entities/location.d.ts +16 -0
- package/dist/entities/location.js +140 -0
- package/dist/entities/operators.d.ts +14 -0
- package/dist/entities/operators.js +30 -0
- package/dist/entities/overview/data.d.ts +43 -0
- package/dist/entities/overview/data.js +2 -0
- package/dist/entities/overview/decision.d.ts +60 -0
- package/dist/entities/overview/decision.js +2 -0
- package/dist/entities/overview/file-tree.d.ts +10 -0
- package/dist/entities/overview/file-tree.js +2 -0
- package/dist/entities/overview/finding.d.ts +58 -0
- package/dist/entities/overview/finding.js +2 -0
- package/dist/entities/overview/graph.d.ts +65 -0
- package/dist/entities/overview/graph.js +2 -0
- package/dist/entities/overview/input.d.ts +15 -0
- package/dist/entities/overview/input.js +2 -0
- package/dist/entities/overview/summaries.d.ts +79 -0
- package/dist/entities/overview/summaries.js +2 -0
- package/dist/entities/place.d.ts +5 -0
- package/dist/entities/place.js +2 -0
- package/dist/entities/queries.d.ts +9 -0
- package/dist/entities/queries.js +305 -0
- package/dist/entities/repair.d.ts +16 -0
- package/dist/entities/repair.js +23 -0
- package/dist/entities/schema.d.ts +8 -0
- package/dist/entities/schema.js +23 -0
- package/dist/entities/story.d.ts +47 -0
- package/dist/entities/story.js +2 -0
- package/dist/entities/structure-facts.d.ts +11 -0
- package/dist/entities/structure-facts.js +2 -0
- package/dist/entities/token.d.ts +23 -0
- package/dist/entities/token.js +2 -0
- package/dist/entities/tree/build.d.ts +5 -0
- package/dist/entities/tree/build.js +252 -0
- package/dist/entities/tree/entries.d.ts +7 -0
- package/dist/entities/tree/entries.js +120 -0
- package/dist/entities/tree/index.d.ts +6 -0
- package/dist/entities/tree/index.js +21 -0
- package/dist/entities/tree/match.d.ts +17 -0
- package/dist/entities/tree/match.js +176 -0
- package/dist/frameworks/angular/index.d.ts +7 -0
- package/dist/frameworks/angular/index.js +17 -0
- package/dist/frameworks/facet.d.ts +16 -0
- package/dist/frameworks/facet.js +2 -0
- package/dist/frameworks/index.d.ts +9 -0
- package/dist/frameworks/index.js +120 -0
- package/dist/frameworks/react/index.d.ts +7 -0
- package/dist/frameworks/react/index.js +214 -0
- package/dist/frameworks/vue/index.d.ts +7 -0
- package/dist/frameworks/vue/index.js +17 -0
- package/dist/invariants/index.d.ts +6 -0
- package/dist/invariants/index.js +299 -0
- package/dist/invariants/list-vars.d.ts +5 -0
- package/dist/invariants/list-vars.js +143 -0
- package/dist/invariants/name.d.ts +16 -0
- package/dist/invariants/name.js +18 -0
- package/dist/invariants/normalize.d.ts +4 -0
- package/dist/invariants/normalize.js +95 -0
- package/dist/invariants/vars.d.ts +20 -0
- package/dist/invariants/vars.js +117 -0
- package/dist/main.d.ts +7 -0
- package/dist/main.js +229 -0
- package/dist/nodes/child-roles.d.ts +3 -0
- package/dist/nodes/child-roles.js +12 -0
- package/dist/nodes/children.d.ts +25 -0
- package/dist/nodes/children.js +112 -0
- package/dist/nodes/finally/emit.d.ts +6 -0
- package/dist/nodes/finally/emit.js +55 -0
- package/dist/nodes/finally/index.d.ts +8 -0
- package/dist/nodes/finally/index.js +35 -0
- package/dist/nodes/finally/queries.d.ts +5 -0
- package/dist/nodes/finally/queries.js +22 -0
- package/dist/nodes/finally/relations-access.d.ts +5 -0
- package/dist/nodes/finally/relations-access.js +46 -0
- package/dist/nodes/finally/relations-edge.d.ts +29 -0
- package/dist/nodes/finally/relations-edge.js +125 -0
- package/dist/nodes/finally/relations-group.d.ts +31 -0
- package/dist/nodes/finally/relations-group.js +103 -0
- package/dist/nodes/finally/relations.d.ts +5 -0
- package/dist/nodes/finally/relations.js +81 -0
- package/dist/nodes/finally/required.d.ts +5 -0
- package/dist/nodes/finally/required.js +90 -0
- package/dist/nodes/finally/roles.d.ts +13 -0
- package/dist/nodes/finally/roles.js +41 -0
- package/dist/nodes/finally/violation.d.ts +17 -0
- package/dist/nodes/finally/violation.js +2 -0
- package/dist/nodes/similar.d.ts +21 -0
- package/dist/nodes/similar.js +156 -0
- package/dist/pipeline-facts.d.ts +11 -0
- package/dist/pipeline-facts.js +112 -0
- package/dist/pipeline-roles.d.ts +6 -0
- package/dist/pipeline-roles.js +75 -0
- package/dist/pipeline-unroled.d.ts +14 -0
- package/dist/pipeline-unroled.js +193 -0
- package/dist/pipeline.d.ts +7 -0
- package/dist/pipeline.js +73 -0
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.js +3 -0
- package/dist/report/asks.d.ts +55 -0
- package/dist/report/asks.js +50 -0
- package/dist/report/cli-report.d.ts +2 -0
- package/dist/report/cli-report.js +13 -0
- package/dist/report/config-error-guard.d.ts +8 -0
- package/dist/report/config-error-guard.js +5 -0
- package/dist/report/configErrors.d.ts +98 -0
- package/dist/report/configErrors.js +75 -0
- package/dist/report/errorTypes/codes/structure.d.ts +15 -0
- package/dist/report/errorTypes/codes/structure.js +76 -0
- package/dist/report/errorTypes/decision-maker.d.ts +23 -0
- package/dist/report/errorTypes/decision-maker.js +99 -0
- package/dist/report/errorTypes/destinations.d.ts +38 -0
- package/dist/report/errorTypes/destinations.js +147 -0
- package/dist/report/errorTypes/finding-type.d.ts +11 -0
- package/dist/report/errorTypes/finding-type.js +2 -0
- package/dist/report/errorTypes/index.d.ts +15 -0
- package/dist/report/errorTypes/index.js +45 -0
- package/dist/report/errorTypes/types/fileContents.d.ts +9 -0
- package/dist/report/errorTypes/types/fileContents.js +34 -0
- package/dist/report/errorTypes/types/unknownRole.d.ts +9 -0
- package/dist/report/errorTypes/types/unknownRole.js +22 -0
- package/dist/report/errorTypes/types/wrongAction.d.ts +22 -0
- package/dist/report/errorTypes/types/wrongAction.js +135 -0
- package/dist/report/errorTypes/types/wrongPlacement.d.ts +9 -0
- package/dist/report/errorTypes/types/wrongPlacement.js +57 -0
- package/dist/report/errorTypes/vocabulary/ids.d.ts +5 -0
- package/dist/report/errorTypes/vocabulary/ids.js +16 -0
- package/dist/report/errorTypes/vocabulary/phrases.d.ts +10 -0
- package/dist/report/errorTypes/vocabulary/phrases.js +174 -0
- package/dist/report/errorTypes/vocabulary/places.d.ts +8 -0
- package/dist/report/errorTypes/vocabulary/places.js +36 -0
- package/dist/report/errorTypes/vocabulary/verbs.d.ts +7 -0
- package/dist/report/errorTypes/vocabulary/verbs.js +30 -0
- package/dist/report/finding-from.d.ts +9 -0
- package/dist/report/finding-from.js +103 -0
- package/dist/report/notices.d.ts +4 -0
- package/dist/report/notices.js +31 -0
- package/dist/report/render-report.d.ts +12 -0
- package/dist/report/render-report.js +142 -0
- package/dist/report/user-report/build/bundle.d.ts +3 -0
- package/dist/report/user-report/build/bundle.js +169 -0
- package/dist/report/user-report/build/bundle.prebuilt.js +760 -0
- package/dist/report/user-report/data/collect.d.ts +4 -0
- package/dist/report/user-report/data/collect.js +80 -0
- package/dist/report/user-report/data/file-tree.d.ts +9 -0
- package/dist/report/user-report/data/file-tree.js +72 -0
- package/dist/report/user-report/data/finding-boundary.d.ts +9 -0
- package/dist/report/user-report/data/finding-boundary.js +21 -0
- package/dist/report/user-report/data/finding-plan.d.ts +16 -0
- package/dist/report/user-report/data/finding-plan.js +45 -0
- package/dist/report/user-report/data/finding-title.d.ts +12 -0
- package/dist/report/user-report/data/finding-title.js +36 -0
- package/dist/report/user-report/data/findings.d.ts +10 -0
- package/dist/report/user-report/data/findings.js +171 -0
- package/dist/report/user-report/data/graph-edges.d.ts +19 -0
- package/dist/report/user-report/data/graph-edges.js +109 -0
- package/dist/report/user-report/data/graph-helpers.d.ts +7 -0
- package/dist/report/user-report/data/graph-helpers.js +67 -0
- package/dist/report/user-report/data/graph-roles.d.ts +5 -0
- package/dist/report/user-report/data/graph-roles.js +71 -0
- package/dist/report/user-report/data/graph.d.ts +11 -0
- package/dist/report/user-report/data/graph.js +90 -0
- package/dist/report/user-report/data/invariants.d.ts +7 -0
- package/dist/report/user-report/data/invariants.js +62 -0
- package/dist/report/user-report/data/nodes.d.ts +11 -0
- package/dist/report/user-report/data/nodes.js +106 -0
- package/dist/report/user-report/data/role-examples.d.ts +16 -0
- package/dist/report/user-report/data/role-examples.js +94 -0
- package/dist/report/user-report/data/role-filters.d.ts +15 -0
- package/dist/report/user-report/data/role-filters.js +79 -0
- package/dist/report/user-report/data/role-marks.d.ts +5 -0
- package/dist/report/user-report/data/role-marks.js +79 -0
- package/dist/report/user-report/data/roles.d.ts +7 -0
- package/dist/report/user-report/data/roles.js +83 -0
- package/dist/report/user-report/data/scan.d.ts +8 -0
- package/dist/report/user-report/data/scan.js +59 -0
- package/dist/report/user-report/html/shell.d.ts +3 -0
- package/dist/report/user-report/html/shell.js +27 -0
- package/dist/report/user-report/index.d.ts +8 -0
- package/dist/report/user-report/index.js +48 -0
- package/dist/report/user-report/shared/describe.d.ts +7 -0
- package/dist/report/user-report/shared/describe.js +86 -0
- package/dist/scripts/audit-report.d.ts +2 -0
- package/dist/scripts/audit-report.js +147 -0
- package/dist/utils/accumulate.d.ts +6 -0
- package/dist/utils/accumulate.js +18 -0
- package/dist/utils/article.d.ts +2 -0
- package/dist/utils/article.js +12 -0
- package/dist/utils/classify.d.ts +12 -0
- package/dist/utils/classify.js +25 -0
- package/dist/utils/configs.d.ts +25 -0
- package/dist/utils/configs.js +87 -0
- package/dist/utils/count.d.ts +7 -0
- package/dist/utils/count.js +13 -0
- package/dist/utils/dispatch.d.ts +2 -0
- package/dist/utils/dispatch.js +27 -0
- package/dist/utils/distinct.d.ts +2 -0
- package/dist/utils/distinct.js +12 -0
- package/dist/utils/field.d.ts +14 -0
- package/dist/utils/field.js +60 -0
- package/dist/utils/file-name.d.ts +2 -0
- package/dist/utils/file-name.js +11 -0
- package/dist/utils/files.d.ts +7 -0
- package/dist/utils/files.js +73 -0
- package/dist/utils/fixpoint.d.ts +2 -0
- package/dist/utils/fixpoint.js +19 -0
- package/dist/utils/gate.d.ts +2 -0
- package/dist/utils/gate.js +12 -0
- package/dist/utils/group.d.ts +3 -0
- package/dist/utils/group.js +33 -0
- package/dist/utils/host.d.ts +3 -0
- package/dist/utils/host.js +13 -0
- package/dist/utils/imports.d.ts +12 -0
- package/dist/utils/imports.js +121 -0
- package/dist/utils/judged.d.ts +5 -0
- package/dist/utils/judged.js +19 -0
- package/dist/utils/keyed.d.ts +2 -0
- package/dist/utils/keyed.js +23 -0
- package/dist/utils/map-record.d.ts +2 -0
- package/dist/utils/map-record.js +11 -0
- package/dist/utils/path-label.d.ts +6 -0
- package/dist/utils/path-label.js +35 -0
- package/dist/utils/pattern.d.ts +18 -0
- package/dist/utils/pattern.js +191 -0
- package/dist/utils/permission.d.ts +16 -0
- package/dist/utils/permission.js +16 -0
- package/dist/utils/plural.d.ts +2 -0
- package/dist/utils/plural.js +9 -0
- package/dist/utils/qualified.d.ts +2 -0
- package/dist/utils/qualified.js +21 -0
- package/dist/utils/rank.d.ts +2 -0
- package/dist/utils/rank.js +24 -0
- package/dist/utils/read-field.d.ts +12 -0
- package/dist/utils/read-field.js +50 -0
- package/dist/utils/read-when.d.ts +2 -0
- package/dist/utils/read-when.js +17 -0
- package/dist/utils/reason.d.ts +4 -0
- package/dist/utils/reason.js +9 -0
- package/dist/utils/record.d.ts +3 -0
- package/dist/utils/record.js +21 -0
- package/dist/utils/resolve.d.ts +2 -0
- package/dist/utils/resolve.js +24 -0
- package/dist/utils/search.d.ts +2 -0
- package/dist/utils/search.js +16 -0
- package/dist/utils/seen.d.ts +6 -0
- package/dist/utils/seen.js +27 -0
- package/dist/utils/span.d.ts +5 -0
- package/dist/utils/span.js +2 -0
- package/dist/utils/speak.d.ts +2 -0
- package/dist/utils/speak.js +18 -0
- package/dist/utils/split.d.ts +8 -0
- package/dist/utils/split.js +8 -0
- package/dist/utils/template.d.ts +5 -0
- package/dist/utils/template.js +5 -0
- package/dist/utils/text.d.ts +4 -0
- package/dist/utils/text.js +42 -0
- package/dist/utils/tokenize.d.ts +2 -0
- package/dist/utils/tokenize.js +13 -0
- package/dist/utils/try-read.d.ts +4 -0
- package/dist/utils/try-read.js +24 -0
- package/dist/utils/typed-field.d.ts +3 -0
- package/dist/utils/typed-field.js +16 -0
- package/dist/utils/verdicts.d.ts +4 -0
- package/dist/utils/verdicts.js +20 -0
- package/entities/operators.ts +31 -0
- package/package.json +62 -19
- package/report/errorTypes/vocabulary/ids.ts +12 -0
- package/report/errorTypes/vocabulary/phrases.ts +161 -0
- package/report/errorTypes/vocabulary/places.ts +46 -0
- package/report/errorTypes/vocabulary/verbs.ts +31 -0
- package/report/user-report/shared/describe.ts +107 -0
- package/ast.js +0 -107
- package/bin/follow-architecture.js +0 -6
- package/config.js +0 -82
- package/entities/aliases.js +0 -10
- package/entities/invariants.js +0 -134
- package/entities/nodes.js +0 -112
- package/main.js +0 -95
- package/report.js +0 -73
- package/utils.js +0 -104
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SCALAR_OPS = exports.QUANTIFIERS = exports.CONTAINERS = void 0;
|
|
4
|
+
// The operator vocabulary AS THE REPORT READS IT: which keys stand for a list,
|
|
5
|
+
// which of them say "one of them", and how a scalar operator is spelled for a
|
|
6
|
+
// human. Two readers share it — the Node-side summarizer (`data/invariants.js`)
|
|
7
|
+
// and the browser describer (`src/utils/describe.js`) — because they used to
|
|
8
|
+
// carry the same three tables twice and printed two different truths.
|
|
9
|
+
//
|
|
10
|
+
// The ENGINE's own operator sets stay in `entities/queries.js`: the matcher
|
|
11
|
+
// knows more than it can print, and printing is not matching.
|
|
12
|
+
// A key that walks INTO a list rather than addressing a field.
|
|
13
|
+
const CONTAINERS = new Set(["some", "every", "none", "length", "where", "filter", "by"]);
|
|
14
|
+
exports.CONTAINERS = CONTAINERS;
|
|
15
|
+
// …of those, the ones that say "one of them": they read as `[*]` in a path.
|
|
16
|
+
const QUANTIFIERS = new Set(["some", "every", "none", "any"]);
|
|
17
|
+
exports.QUANTIFIERS = QUANTIFIERS;
|
|
18
|
+
// A scalar operator, spelled the way a reader expects to see it.
|
|
19
|
+
const SCALAR_OPS = {
|
|
20
|
+
gt: ">",
|
|
21
|
+
gte: "≥",
|
|
22
|
+
lt: "<",
|
|
23
|
+
lte: "≤",
|
|
24
|
+
equals: "=",
|
|
25
|
+
in: "in",
|
|
26
|
+
not: "≠",
|
|
27
|
+
isSet: "is set",
|
|
28
|
+
matches: "matches",
|
|
29
|
+
};
|
|
30
|
+
exports.SCALAR_OPS = SCALAR_OPS;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AccessGraph } from "./graph";
|
|
2
|
+
import type { EnrichedFinding } from "./finding";
|
|
3
|
+
import type { FileTreeEntry } from "./file-tree";
|
|
4
|
+
import type { InvariantSummary, NodeSummary, RoleSummary } from "./summaries";
|
|
5
|
+
type CountGroup = {
|
|
6
|
+
key: string;
|
|
7
|
+
count: number;
|
|
8
|
+
};
|
|
9
|
+
type OverviewMeta = {
|
|
10
|
+
repoRoot: string;
|
|
11
|
+
repoName: string;
|
|
12
|
+
architecturePath: string;
|
|
13
|
+
generatedAt: string;
|
|
14
|
+
filesScanned: number;
|
|
15
|
+
orphans: string[];
|
|
16
|
+
};
|
|
17
|
+
type OverviewStats = {
|
|
18
|
+
nodes: number;
|
|
19
|
+
folders: number;
|
|
20
|
+
fileNodes: number;
|
|
21
|
+
roles: number;
|
|
22
|
+
invariants: number;
|
|
23
|
+
findings: number;
|
|
24
|
+
filesWithFindings: number;
|
|
25
|
+
edges: number;
|
|
26
|
+
orphans: number;
|
|
27
|
+
};
|
|
28
|
+
type OverviewData = {
|
|
29
|
+
meta: OverviewMeta;
|
|
30
|
+
stats: OverviewStats;
|
|
31
|
+
nodes: NodeSummary[];
|
|
32
|
+
access: AccessGraph;
|
|
33
|
+
roles: RoleSummary[];
|
|
34
|
+
invariants: InvariantSummary[];
|
|
35
|
+
findings: EnrichedFinding[];
|
|
36
|
+
fileTree: FileTreeEntry;
|
|
37
|
+
groups: {
|
|
38
|
+
byCategory: CountGroup[];
|
|
39
|
+
byInvariant: CountGroup[];
|
|
40
|
+
byNode: CountGroup[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export type { CountGroup, OverviewMeta, OverviewStats, OverviewData };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { FieldValue } from "../../utils/field";
|
|
2
|
+
import type { Arch } from "../architecture";
|
|
3
|
+
import type { Finding } from "../findings";
|
|
4
|
+
import type { NodeSummary } from "./summaries";
|
|
5
|
+
import type { RelationToken } from "../token";
|
|
6
|
+
type Places = {
|
|
7
|
+
folderOf: (slug: string | null | undefined) => string | null;
|
|
8
|
+
pathOf: (slug: string) => string;
|
|
9
|
+
roles: () => string[];
|
|
10
|
+
rolesAtPath: (rel: string) => string[];
|
|
11
|
+
homeTemplates: (role: string) => string[];
|
|
12
|
+
homeFor: (role: string, rel: string) => {
|
|
13
|
+
role: string;
|
|
14
|
+
path: string;
|
|
15
|
+
folder: boolean;
|
|
16
|
+
concrete: boolean;
|
|
17
|
+
node: string | null;
|
|
18
|
+
} | null;
|
|
19
|
+
nodeAtPath: (path: string | null | undefined) => string | null;
|
|
20
|
+
};
|
|
21
|
+
type CtxPlan = {
|
|
22
|
+
before?: {
|
|
23
|
+
node?: string | null;
|
|
24
|
+
paths?: string[];
|
|
25
|
+
} | null;
|
|
26
|
+
after?: {
|
|
27
|
+
node?: string | null;
|
|
28
|
+
paths?: string[];
|
|
29
|
+
} | null;
|
|
30
|
+
relation?: FieldValue;
|
|
31
|
+
repair?: FieldValue;
|
|
32
|
+
remove?: boolean;
|
|
33
|
+
};
|
|
34
|
+
type CtxOwner = {
|
|
35
|
+
slug?: string;
|
|
36
|
+
path?: string;
|
|
37
|
+
paths?: string[];
|
|
38
|
+
roles?: string[];
|
|
39
|
+
} | null | undefined;
|
|
40
|
+
type CtxViolation = {
|
|
41
|
+
kind?: string;
|
|
42
|
+
targetNode?: string | null;
|
|
43
|
+
targetPath?: string | null;
|
|
44
|
+
line?: number;
|
|
45
|
+
destination?: string | null;
|
|
46
|
+
token?: RelationToken | null;
|
|
47
|
+
} | null | undefined;
|
|
48
|
+
type DecisionCtx = {
|
|
49
|
+
finding?: Finding;
|
|
50
|
+
file: string;
|
|
51
|
+
key?: string;
|
|
52
|
+
violation?: CtxViolation;
|
|
53
|
+
ownerNode?: CtxOwner;
|
|
54
|
+
plan?: CtxPlan;
|
|
55
|
+
nodes?: NodeSummary[];
|
|
56
|
+
arch?: Arch;
|
|
57
|
+
invariant?: string | null;
|
|
58
|
+
places: Places;
|
|
59
|
+
};
|
|
60
|
+
export type { Places, CtxPlan, CtxOwner, CtxViolation, DecisionCtx };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { RelationToken } from "../token";
|
|
2
|
+
import type { Repair } from "../repair";
|
|
3
|
+
import type { Story } from "../story";
|
|
4
|
+
import type { Place } from "../place";
|
|
5
|
+
import type { FindingHighlight } from "../findings";
|
|
6
|
+
import type { Violation } from "../../nodes/finally/violation";
|
|
7
|
+
type PlanPlace = Place;
|
|
8
|
+
type PlanRelation = Place & {
|
|
9
|
+
kind: string;
|
|
10
|
+
line: number | null;
|
|
11
|
+
};
|
|
12
|
+
type Plan = {
|
|
13
|
+
role: string | null;
|
|
14
|
+
before: PlanPlace | null;
|
|
15
|
+
after: PlanPlace | null;
|
|
16
|
+
target: PlanPlace | null;
|
|
17
|
+
allowedImporters: string[];
|
|
18
|
+
allowedGlobs: string[];
|
|
19
|
+
relation?: PlanRelation;
|
|
20
|
+
repair?: Repair;
|
|
21
|
+
remove?: boolean;
|
|
22
|
+
};
|
|
23
|
+
type Boundary = {
|
|
24
|
+
targetNode: string;
|
|
25
|
+
targetPaths: string[];
|
|
26
|
+
ownerNode: string | null;
|
|
27
|
+
ownerPaths: string[];
|
|
28
|
+
summary: string;
|
|
29
|
+
allowed: string[];
|
|
30
|
+
};
|
|
31
|
+
type FindingViolation = Pick<Violation, "kind" | "targetNode" | "targetPath" | "line" | "destination"> & {
|
|
32
|
+
token?: RelationToken | null;
|
|
33
|
+
};
|
|
34
|
+
type EnrichedFinding = {
|
|
35
|
+
file: string;
|
|
36
|
+
line: number;
|
|
37
|
+
what: string | null;
|
|
38
|
+
rule: string;
|
|
39
|
+
key: string;
|
|
40
|
+
dedupeKey: string;
|
|
41
|
+
category: string;
|
|
42
|
+
title: string;
|
|
43
|
+
message: string;
|
|
44
|
+
engineMessage: string;
|
|
45
|
+
fixOptions: Repair[];
|
|
46
|
+
errorType: string;
|
|
47
|
+
ownerNode: string | null;
|
|
48
|
+
nodeRoles: string[];
|
|
49
|
+
ownerPaths: string[];
|
|
50
|
+
role: string | null;
|
|
51
|
+
invariant: string | null;
|
|
52
|
+
violation: FindingViolation | null;
|
|
53
|
+
boundary: Boundary | null;
|
|
54
|
+
plan: Plan;
|
|
55
|
+
story: Story;
|
|
56
|
+
highlight: FindingHighlight | null;
|
|
57
|
+
};
|
|
58
|
+
export type { PlanPlace, PlanRelation, Plan, Boundary, FindingViolation, FindingHighlight, EnrichedFinding };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
type AccessEdge = {
|
|
2
|
+
kind: string;
|
|
3
|
+
kinds: string[];
|
|
4
|
+
scope: string[];
|
|
5
|
+
from: string;
|
|
6
|
+
to: string;
|
|
7
|
+
fromPath: string;
|
|
8
|
+
toPath: string;
|
|
9
|
+
actor: string;
|
|
10
|
+
actorPath?: string;
|
|
11
|
+
actorRoles?: string[];
|
|
12
|
+
actorRole: string | null;
|
|
13
|
+
subject: string;
|
|
14
|
+
subjectPath?: string;
|
|
15
|
+
fromRoles?: string[];
|
|
16
|
+
same: boolean;
|
|
17
|
+
via: string;
|
|
18
|
+
target: string;
|
|
19
|
+
broken?: boolean;
|
|
20
|
+
brokenCount?: number;
|
|
21
|
+
option?: boolean;
|
|
22
|
+
};
|
|
23
|
+
type Unplaceable = {
|
|
24
|
+
kind: string;
|
|
25
|
+
targetRole: string;
|
|
26
|
+
who: string;
|
|
27
|
+
};
|
|
28
|
+
type Mention = {
|
|
29
|
+
kind: string;
|
|
30
|
+
targetRole: string;
|
|
31
|
+
targetPaths: string[];
|
|
32
|
+
};
|
|
33
|
+
type GraphViolation = {
|
|
34
|
+
kind: string;
|
|
35
|
+
from: string;
|
|
36
|
+
to: string;
|
|
37
|
+
role: string;
|
|
38
|
+
file: string;
|
|
39
|
+
line: number;
|
|
40
|
+
title: string;
|
|
41
|
+
};
|
|
42
|
+
type RoleNode = {
|
|
43
|
+
slug: string;
|
|
44
|
+
name: string;
|
|
45
|
+
paths: string[];
|
|
46
|
+
places: string[];
|
|
47
|
+
note: string | null;
|
|
48
|
+
fileCount: number;
|
|
49
|
+
};
|
|
50
|
+
type Adjacency = {
|
|
51
|
+
in: AccessEdge[];
|
|
52
|
+
out: AccessEdge[];
|
|
53
|
+
};
|
|
54
|
+
type AccessGraph = {
|
|
55
|
+
kinds: string[];
|
|
56
|
+
roles: string[];
|
|
57
|
+
edges: AccessEdge[];
|
|
58
|
+
violations: GraphViolation[];
|
|
59
|
+
unplaceable: Unplaceable[];
|
|
60
|
+
mentions: Record<string, Mention[]>;
|
|
61
|
+
byNode: Record<string, Adjacency>;
|
|
62
|
+
roleNodes: RoleNode[];
|
|
63
|
+
roleEdges: AccessEdge[];
|
|
64
|
+
};
|
|
65
|
+
export type { AccessEdge, Unplaceable, Mention, GraphViolation, RoleNode, Adjacency, AccessGraph };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Project } from "ts-morph";
|
|
2
|
+
import type { Arch } from "../architecture";
|
|
3
|
+
import type { Finding } from "../findings";
|
|
4
|
+
type OverviewInput = {
|
|
5
|
+
arch: Arch;
|
|
6
|
+
findings: Finding[];
|
|
7
|
+
orphans: string[];
|
|
8
|
+
files: string[];
|
|
9
|
+
repoFiles: string[];
|
|
10
|
+
repoRoot: string;
|
|
11
|
+
architecturePath: string | null;
|
|
12
|
+
project: Project;
|
|
13
|
+
generatedAt?: string;
|
|
14
|
+
};
|
|
15
|
+
export type { OverviewInput };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { FieldValue } from "../../utils/field";
|
|
2
|
+
import type { Located } from "../facts";
|
|
3
|
+
import type { RoleDef, ReportObject } from "../architecture";
|
|
4
|
+
type Snippet = {
|
|
5
|
+
startLine: number;
|
|
6
|
+
lines: string[];
|
|
7
|
+
truncated: boolean;
|
|
8
|
+
};
|
|
9
|
+
type MatchedRange = {
|
|
10
|
+
from: number;
|
|
11
|
+
to: number;
|
|
12
|
+
why: string;
|
|
13
|
+
};
|
|
14
|
+
type RoleExample = Required<Pick<Located, "name" | "line">> & {
|
|
15
|
+
file: string;
|
|
16
|
+
rank: number;
|
|
17
|
+
code: Snippet | null;
|
|
18
|
+
matched: MatchedRange[];
|
|
19
|
+
};
|
|
20
|
+
type RoleHome = {
|
|
21
|
+
slug: string;
|
|
22
|
+
paths: string[];
|
|
23
|
+
label: string;
|
|
24
|
+
labels: string[];
|
|
25
|
+
};
|
|
26
|
+
type RoleAction = {
|
|
27
|
+
kind: string;
|
|
28
|
+
of: string | null;
|
|
29
|
+
from: string[];
|
|
30
|
+
scopeAccess: {
|
|
31
|
+
scope: string;
|
|
32
|
+
segments: string[];
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
35
|
+
type RoleSummary = Pick<RoleDef, "slug" | "name"> & {
|
|
36
|
+
infer: FieldValue;
|
|
37
|
+
report: {
|
|
38
|
+
message: string | null;
|
|
39
|
+
fix: string | null;
|
|
40
|
+
};
|
|
41
|
+
actions: RoleAction[];
|
|
42
|
+
homes: RoleHome[];
|
|
43
|
+
examples: RoleExample[];
|
|
44
|
+
exampleCount: number;
|
|
45
|
+
};
|
|
46
|
+
type NodeSummary = {
|
|
47
|
+
slug: string;
|
|
48
|
+
name: string;
|
|
49
|
+
paths: string[];
|
|
50
|
+
isFile: boolean;
|
|
51
|
+
parents: string[];
|
|
52
|
+
children: string[];
|
|
53
|
+
report: string | null;
|
|
54
|
+
files: string[];
|
|
55
|
+
fileCount: number;
|
|
56
|
+
lineCount: number;
|
|
57
|
+
exampleFile: string | null;
|
|
58
|
+
sample: ({
|
|
59
|
+
file: string;
|
|
60
|
+
} & Snippet) | null;
|
|
61
|
+
roles: string[];
|
|
62
|
+
closed?: boolean;
|
|
63
|
+
};
|
|
64
|
+
type InvariantRule = {
|
|
65
|
+
conditions: string[];
|
|
66
|
+
message: string | null;
|
|
67
|
+
fix: FieldValue | ReportObject["fix"];
|
|
68
|
+
};
|
|
69
|
+
type InvariantSummary = {
|
|
70
|
+
id: string;
|
|
71
|
+
where: string[];
|
|
72
|
+
ignore: string[];
|
|
73
|
+
when: string[];
|
|
74
|
+
dedupeBy: string[];
|
|
75
|
+
report: string | null;
|
|
76
|
+
infer: InvariantRule[];
|
|
77
|
+
findingCount: number;
|
|
78
|
+
};
|
|
79
|
+
export type { Snippet, MatchedRange, RoleExample, RoleHome, RoleAction, RoleSummary, NodeSummary, InvariantRule, InvariantSummary };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { isObj, isList, type FieldValue } from "../utils/field";
|
|
2
|
+
import type { QueryFilter, QueryScope } from "./architecture";
|
|
3
|
+
declare const COMPOSITION_OPS: Set<string>;
|
|
4
|
+
declare const KNOWN_OPS: Set<string>;
|
|
5
|
+
declare const innerFilterOf: (sub: FieldValue) => QueryFilter | null;
|
|
6
|
+
declare const hitOf: <T extends FieldValue>(list: readonly T[], sub: FieldValue, scope: QueryScope) => T[];
|
|
7
|
+
declare const matches: (value: FieldValue, filter: QueryFilter, scope?: QueryScope | null) => boolean;
|
|
8
|
+
declare const passes: (value: FieldValue, filters: QueryFilter, scope?: QueryScope) => boolean;
|
|
9
|
+
export { COMPOSITION_OPS, KNOWN_OPS, matches, passes, innerFilterOf, hitOf, isList, isObj };
|