@ontrails/warden 1.0.0-beta.14 → 1.0.0-beta.15
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/.turbo/turbo-lint.log +1 -1
- package/CHANGELOG.md +18 -0
- package/README.md +22 -13
- package/dist/cli.d.ts +19 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +250 -61
- package/dist/cli.js.map +1 -1
- package/dist/drift.d.ts +1 -1
- package/dist/drift.js +7 -7
- package/dist/drift.js.map +1 -1
- package/dist/index.d.ts +6 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -19
- package/dist/index.js.map +1 -1
- package/dist/rules/ast.d.ts +405 -7
- package/dist/rules/ast.d.ts.map +1 -1
- package/dist/rules/ast.js +1824 -101
- package/dist/rules/ast.js.map +1 -1
- package/dist/rules/circular-refs.d.ts +6 -0
- package/dist/rules/circular-refs.d.ts.map +1 -0
- package/dist/rules/circular-refs.js +83 -0
- package/dist/rules/circular-refs.js.map +1 -0
- package/dist/rules/context-no-surface-types.d.ts.map +1 -1
- package/dist/rules/context-no-surface-types.js +59 -3
- package/dist/rules/context-no-surface-types.js.map +1 -1
- package/dist/rules/contour-exists.d.ts +7 -0
- package/dist/rules/contour-exists.d.ts.map +1 -0
- package/dist/rules/contour-exists.js +113 -0
- package/dist/rules/contour-exists.js.map +1 -0
- package/dist/rules/contour-ids.d.ts +10 -0
- package/dist/rules/contour-ids.d.ts.map +1 -0
- package/dist/rules/contour-ids.js +12 -0
- package/dist/rules/contour-ids.js.map +1 -0
- package/dist/rules/cross-declarations.d.ts.map +1 -1
- package/dist/rules/cross-declarations.js +171 -57
- package/dist/rules/cross-declarations.js.map +1 -1
- package/dist/rules/dead-internal-trail.d.ts +3 -0
- package/dist/rules/dead-internal-trail.d.ts.map +1 -0
- package/dist/rules/dead-internal-trail.js +80 -0
- package/dist/rules/dead-internal-trail.js.map +1 -0
- package/dist/rules/draft-file-marking.d.ts.map +1 -1
- package/dist/rules/draft-file-marking.js +25 -3
- package/dist/rules/draft-file-marking.js.map +1 -1
- package/dist/rules/draft-visible-debt.d.ts +2 -2
- package/dist/rules/draft-visible-debt.d.ts.map +1 -1
- package/dist/rules/draft-visible-debt.js +14 -9
- package/dist/rules/draft-visible-debt.js.map +1 -1
- package/dist/rules/error-mapping-completeness.d.ts +13 -0
- package/dist/rules/error-mapping-completeness.d.ts.map +1 -0
- package/dist/rules/error-mapping-completeness.js +160 -0
- package/dist/rules/error-mapping-completeness.js.map +1 -0
- package/dist/rules/example-valid.d.ts +6 -0
- package/dist/rules/example-valid.d.ts.map +1 -0
- package/dist/rules/example-valid.js +203 -0
- package/dist/rules/example-valid.js.map +1 -0
- package/dist/rules/fires-declarations.d.ts +16 -0
- package/dist/rules/fires-declarations.d.ts.map +1 -0
- package/dist/rules/fires-declarations.js +444 -0
- package/dist/rules/fires-declarations.js.map +1 -0
- package/dist/rules/implementation-returns-result.d.ts +9 -0
- package/dist/rules/implementation-returns-result.d.ts.map +1 -1
- package/dist/rules/implementation-returns-result.js +638 -76
- package/dist/rules/implementation-returns-result.js.map +1 -1
- package/dist/rules/incomplete-accessor-for-standard-op.d.ts +30 -0
- package/dist/rules/incomplete-accessor-for-standard-op.d.ts.map +1 -0
- package/dist/rules/incomplete-accessor-for-standard-op.js +226 -0
- package/dist/rules/incomplete-accessor-for-standard-op.js.map +1 -0
- package/dist/rules/incomplete-crud.d.ts +21 -0
- package/dist/rules/incomplete-crud.d.ts.map +1 -0
- package/dist/rules/incomplete-crud.js +368 -0
- package/dist/rules/incomplete-crud.js.map +1 -0
- package/dist/rules/index.d.ts +38 -7
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/index.js +85 -15
- package/dist/rules/index.js.map +1 -1
- package/dist/rules/intent-propagation.d.ts +3 -0
- package/dist/rules/intent-propagation.d.ts.map +1 -0
- package/dist/rules/intent-propagation.js +57 -0
- package/dist/rules/intent-propagation.js.map +1 -0
- package/dist/rules/missing-reconcile.d.ts +3 -0
- package/dist/rules/missing-reconcile.d.ts.map +1 -0
- package/dist/rules/missing-reconcile.js +44 -0
- package/dist/rules/missing-reconcile.js.map +1 -0
- package/dist/rules/missing-visibility.d.ts +3 -0
- package/dist/rules/missing-visibility.d.ts.map +1 -0
- package/dist/rules/missing-visibility.js +63 -0
- package/dist/rules/missing-visibility.js.map +1 -0
- package/dist/rules/no-direct-impl-in-route.d.ts.map +1 -1
- package/dist/rules/no-direct-impl-in-route.js +0 -3
- package/dist/rules/no-direct-impl-in-route.js.map +1 -1
- package/dist/rules/no-direct-implementation-call.js +1 -1
- package/dist/rules/no-direct-implementation-call.js.map +1 -1
- package/dist/rules/no-sync-result-assumption.d.ts.map +1 -1
- package/dist/rules/no-sync-result-assumption.js +870 -61
- package/dist/rules/no-sync-result-assumption.js.map +1 -1
- package/dist/rules/no-throw-in-detour-recover.d.ts +3 -0
- package/dist/rules/no-throw-in-detour-recover.d.ts.map +1 -0
- package/dist/rules/no-throw-in-detour-recover.js +147 -0
- package/dist/rules/no-throw-in-detour-recover.js.map +1 -0
- package/dist/rules/no-throw-in-detour-target.d.ts +4 -1
- package/dist/rules/no-throw-in-detour-target.d.ts.map +1 -1
- package/dist/rules/no-throw-in-detour-target.js +6 -3
- package/dist/rules/no-throw-in-detour-target.js.map +1 -1
- package/dist/rules/no-throw-in-implementation.d.ts +4 -2
- package/dist/rules/no-throw-in-implementation.d.ts.map +1 -1
- package/dist/rules/no-throw-in-implementation.js +6 -4
- package/dist/rules/no-throw-in-implementation.js.map +1 -1
- package/dist/rules/on-references-exist.d.ts +14 -0
- package/dist/rules/on-references-exist.d.ts.map +1 -0
- package/dist/rules/on-references-exist.js +109 -0
- package/dist/rules/on-references-exist.js.map +1 -0
- package/dist/rules/orphaned-signal.d.ts +3 -0
- package/dist/rules/orphaned-signal.d.ts.map +1 -0
- package/dist/rules/orphaned-signal.js +67 -0
- package/dist/rules/orphaned-signal.js.map +1 -0
- package/dist/rules/permit-governance.d.ts +3 -0
- package/dist/rules/permit-governance.d.ts.map +1 -0
- package/dist/rules/permit-governance.js +15 -0
- package/dist/rules/permit-governance.js.map +1 -0
- package/dist/rules/reference-exists.d.ts +6 -0
- package/dist/rules/reference-exists.d.ts.map +1 -0
- package/dist/rules/reference-exists.js +47 -0
- package/dist/rules/reference-exists.js.map +1 -0
- package/dist/rules/registry-names.d.ts +8 -0
- package/dist/rules/registry-names.d.ts.map +1 -0
- package/dist/rules/registry-names.js +83 -0
- package/dist/rules/registry-names.js.map +1 -0
- package/dist/rules/resource-declarations.d.ts +14 -0
- package/dist/rules/resource-declarations.d.ts.map +1 -0
- package/dist/rules/resource-declarations.js +413 -0
- package/dist/rules/resource-declarations.js.map +1 -0
- package/dist/rules/resource-exists.d.ts +6 -0
- package/dist/rules/resource-exists.d.ts.map +1 -0
- package/dist/rules/resource-exists.js +90 -0
- package/dist/rules/resource-exists.js.map +1 -0
- package/dist/rules/resource-id-grammar.d.ts +3 -0
- package/dist/rules/resource-id-grammar.d.ts.map +1 -0
- package/dist/rules/resource-id-grammar.js +39 -0
- package/dist/rules/resource-id-grammar.js.map +1 -0
- package/dist/rules/specs.d.ts.map +1 -1
- package/dist/rules/specs.js +5 -1
- package/dist/rules/specs.js.map +1 -1
- package/dist/rules/types.d.ts +53 -4
- package/dist/rules/types.d.ts.map +1 -1
- package/dist/rules/unreachable-detour-shadowing.d.ts +3 -0
- package/dist/rules/unreachable-detour-shadowing.d.ts.map +1 -0
- package/dist/rules/unreachable-detour-shadowing.js +202 -0
- package/dist/rules/unreachable-detour-shadowing.js.map +1 -0
- package/dist/rules/valid-describe-refs.d.ts.map +1 -1
- package/dist/rules/valid-describe-refs.js +132 -16
- package/dist/rules/valid-describe-refs.js.map +1 -1
- package/dist/rules/valid-detour-contract.d.ts +3 -0
- package/dist/rules/valid-detour-contract.d.ts.map +1 -0
- package/dist/rules/valid-detour-contract.js +47 -0
- package/dist/rules/valid-detour-contract.js.map +1 -0
- package/dist/rules/valid-detour-refs.d.ts.map +1 -1
- package/dist/rules/valid-detour-refs.js +72 -82
- package/dist/rules/valid-detour-refs.js.map +1 -1
- package/dist/rules/warden-export-symmetry.d.ts +7 -0
- package/dist/rules/warden-export-symmetry.d.ts.map +1 -0
- package/dist/rules/warden-export-symmetry.js +352 -0
- package/dist/rules/warden-export-symmetry.js.map +1 -0
- package/dist/rules/warden-rules-use-ast.d.ts +17 -0
- package/dist/rules/warden-rules-use-ast.d.ts.map +1 -0
- package/dist/rules/warden-rules-use-ast.js +778 -0
- package/dist/rules/warden-rules-use-ast.js.map +1 -0
- package/dist/trails/circular-refs.trail.d.ts +24 -0
- package/dist/trails/circular-refs.trail.d.ts.map +1 -0
- package/dist/trails/circular-refs.trail.js +29 -0
- package/dist/trails/circular-refs.trail.js.map +1 -0
- package/dist/trails/context-no-surface-types.trail.d.ts +2 -2
- package/dist/trails/context-no-surface-types.trail.d.ts.map +1 -1
- package/dist/trails/context-no-trailhead-types.trail.d.ts +2 -2
- package/dist/trails/context-no-trailhead-types.trail.d.ts.map +1 -1
- package/dist/trails/contour-exists.trail.d.ts +24 -0
- package/dist/trails/contour-exists.trail.d.ts.map +1 -0
- package/dist/trails/contour-exists.trail.js +21 -0
- package/dist/trails/contour-exists.trail.js.map +1 -0
- package/dist/trails/cross-declarations.trail.d.ts +2 -2
- package/dist/trails/cross-declarations.trail.d.ts.map +1 -1
- package/dist/trails/dead-internal-trail.trail.d.ts +24 -0
- package/dist/trails/dead-internal-trail.trail.d.ts.map +1 -0
- package/dist/trails/dead-internal-trail.trail.js +26 -0
- package/dist/trails/dead-internal-trail.trail.js.map +1 -0
- package/dist/trails/{provision-declarations.trail.d.ts → draft-file-marking.trail.d.ts} +3 -3
- package/dist/trails/draft-file-marking.trail.d.ts.map +1 -0
- package/dist/trails/draft-file-marking.trail.js +16 -0
- package/dist/trails/draft-file-marking.trail.js.map +1 -0
- package/dist/trails/draft-visible-debt.trail.d.ts +13 -0
- package/dist/trails/draft-visible-debt.trail.d.ts.map +1 -0
- package/dist/trails/draft-visible-debt.trail.js +16 -0
- package/dist/trails/draft-visible-debt.trail.js.map +1 -0
- package/dist/trails/error-mapping-completeness.trail.d.ts +13 -0
- package/dist/trails/error-mapping-completeness.trail.d.ts.map +1 -0
- package/dist/trails/error-mapping-completeness.trail.js +29 -0
- package/dist/trails/error-mapping-completeness.trail.js.map +1 -0
- package/dist/trails/{follow-declarations.trail.d.ts → example-valid.trail.d.ts} +3 -3
- package/dist/trails/example-valid.trail.d.ts.map +1 -0
- package/dist/trails/example-valid.trail.js +25 -0
- package/dist/trails/example-valid.trail.js.map +1 -0
- package/dist/trails/fires-declarations.trail.d.ts +13 -0
- package/dist/trails/fires-declarations.trail.d.ts.map +1 -0
- package/dist/trails/fires-declarations.trail.js +22 -0
- package/dist/trails/fires-declarations.trail.js.map +1 -0
- package/dist/trails/implementation-returns-result.trail.d.ts +2 -2
- package/dist/trails/implementation-returns-result.trail.d.ts.map +1 -1
- package/dist/trails/incomplete-accessor-for-standard-op.trail.d.ts +12 -0
- package/dist/trails/incomplete-accessor-for-standard-op.trail.d.ts.map +1 -0
- package/dist/trails/incomplete-accessor-for-standard-op.trail.js +60 -0
- package/dist/trails/incomplete-accessor-for-standard-op.trail.js.map +1 -0
- package/dist/trails/incomplete-crud.trail.d.ts +24 -0
- package/dist/trails/incomplete-crud.trail.d.ts.map +1 -0
- package/dist/trails/incomplete-crud.trail.js +39 -0
- package/dist/trails/incomplete-crud.trail.js.map +1 -0
- package/dist/trails/index.d.ts +29 -7
- package/dist/trails/index.d.ts.map +1 -1
- package/dist/trails/index.js +28 -6
- package/dist/trails/index.js.map +1 -1
- package/dist/trails/intent-propagation.trail.d.ts +24 -0
- package/dist/trails/intent-propagation.trail.d.ts.map +1 -0
- package/dist/trails/intent-propagation.trail.js +30 -0
- package/dist/trails/intent-propagation.trail.js.map +1 -0
- package/dist/trails/missing-reconcile.trail.d.ts +24 -0
- package/dist/trails/missing-reconcile.trail.d.ts.map +1 -0
- package/dist/trails/missing-reconcile.trail.js +33 -0
- package/dist/trails/missing-reconcile.trail.js.map +1 -0
- package/dist/trails/missing-visibility.trail.d.ts +24 -0
- package/dist/trails/missing-visibility.trail.d.ts.map +1 -0
- package/dist/trails/missing-visibility.trail.js +22 -0
- package/dist/trails/missing-visibility.trail.js.map +1 -0
- package/dist/trails/no-direct-impl-in-route.trail.d.ts +2 -2
- package/dist/trails/no-direct-impl-in-route.trail.d.ts.map +1 -1
- package/dist/trails/no-direct-implementation-call.trail.d.ts +2 -2
- package/dist/trails/no-direct-implementation-call.trail.d.ts.map +1 -1
- package/dist/trails/no-sync-result-assumption.trail.d.ts +2 -2
- package/dist/trails/no-sync-result-assumption.trail.d.ts.map +1 -1
- package/dist/trails/no-throw-in-detour-recover.trail.d.ts +13 -0
- package/dist/trails/no-throw-in-detour-recover.trail.d.ts.map +1 -0
- package/dist/trails/no-throw-in-detour-recover.trail.js +24 -0
- package/dist/trails/no-throw-in-detour-recover.trail.js.map +1 -0
- package/dist/trails/no-throw-in-detour-target.trail.d.ts +13 -3
- package/dist/trails/no-throw-in-detour-target.trail.d.ts.map +1 -1
- package/dist/trails/no-throw-in-implementation.trail.d.ts +2 -2
- package/dist/trails/no-throw-in-implementation.trail.d.ts.map +1 -1
- package/dist/trails/on-references-exist.trail.d.ts +24 -0
- package/dist/trails/on-references-exist.trail.d.ts.map +1 -0
- package/dist/trails/on-references-exist.trail.js +21 -0
- package/dist/trails/on-references-exist.trail.js.map +1 -0
- package/dist/trails/orphaned-signal.trail.d.ts +24 -0
- package/dist/trails/orphaned-signal.trail.d.ts.map +1 -0
- package/dist/trails/orphaned-signal.trail.js +36 -0
- package/dist/trails/orphaned-signal.trail.js.map +1 -0
- package/dist/trails/permit-governance.trail.d.ts +12 -0
- package/dist/trails/permit-governance.trail.d.ts.map +1 -0
- package/dist/trails/permit-governance.trail.js +47 -0
- package/dist/trails/permit-governance.trail.js.map +1 -0
- package/dist/trails/prefer-schema-inference.trail.d.ts +2 -2
- package/dist/trails/prefer-schema-inference.trail.d.ts.map +1 -1
- package/dist/trails/reference-exists.trail.d.ts +24 -0
- package/dist/trails/reference-exists.trail.d.ts.map +1 -0
- package/dist/trails/reference-exists.trail.js +25 -0
- package/dist/trails/reference-exists.trail.js.map +1 -0
- package/dist/trails/resource-declarations.trail.d.ts +13 -0
- package/dist/trails/resource-declarations.trail.d.ts.map +1 -0
- package/dist/trails/{provision-declarations.trail.js → resource-declarations.trail.js} +7 -7
- package/dist/trails/resource-declarations.trail.js.map +1 -0
- package/dist/trails/resource-exists.trail.d.ts +24 -0
- package/dist/trails/resource-exists.trail.d.ts.map +1 -0
- package/dist/trails/{provision-exists.trail.js → resource-exists.trail.js} +8 -8
- package/dist/trails/resource-exists.trail.js.map +1 -0
- package/dist/trails/resource-id-grammar.trail.d.ts +13 -0
- package/dist/trails/resource-id-grammar.trail.d.ts.map +1 -0
- package/dist/trails/resource-id-grammar.trail.js +38 -0
- package/dist/trails/resource-id-grammar.trail.js.map +1 -0
- package/dist/trails/run.d.ts +25 -9
- package/dist/trails/run.d.ts.map +1 -1
- package/dist/trails/run.js +63 -19
- package/dist/trails/run.js.map +1 -1
- package/dist/trails/schema.d.ts +28 -3
- package/dist/trails/schema.d.ts.map +1 -1
- package/dist/trails/schema.js +57 -4
- package/dist/trails/schema.js.map +1 -1
- package/dist/trails/unreachable-detour-shadowing.trail.d.ts +13 -0
- package/dist/trails/unreachable-detour-shadowing.trail.d.ts.map +1 -0
- package/dist/trails/unreachable-detour-shadowing.trail.js +44 -0
- package/dist/trails/unreachable-detour-shadowing.trail.js.map +1 -0
- package/dist/trails/valid-describe-refs.trail.d.ts +12 -3
- package/dist/trails/valid-describe-refs.trail.d.ts.map +1 -1
- package/dist/trails/valid-detour-contract.trail.d.ts +12 -0
- package/dist/trails/valid-detour-contract.trail.d.ts.map +1 -0
- package/dist/trails/valid-detour-contract.trail.js +66 -0
- package/dist/trails/valid-detour-contract.trail.js.map +1 -0
- package/dist/trails/valid-detour-refs.trail.d.ts +13 -3
- package/dist/trails/valid-detour-refs.trail.d.ts.map +1 -1
- package/dist/trails/warden-export-symmetry.trail.d.ts +13 -0
- package/dist/trails/warden-export-symmetry.trail.d.ts.map +1 -0
- package/dist/trails/warden-export-symmetry.trail.js +16 -0
- package/dist/trails/warden-export-symmetry.trail.js.map +1 -0
- package/dist/trails/warden-rules-use-ast.trail.d.ts +13 -0
- package/dist/trails/warden-rules-use-ast.trail.d.ts.map +1 -0
- package/dist/trails/warden-rules-use-ast.trail.js +41 -0
- package/dist/trails/warden-rules-use-ast.trail.js.map +1 -0
- package/dist/trails/wrap-rule.d.ts +16 -2
- package/dist/trails/wrap-rule.d.ts.map +1 -1
- package/dist/trails/wrap-rule.js +71 -11
- package/dist/trails/wrap-rule.js.map +1 -1
- package/package.json +7 -4
- package/src/__tests__/ast.test.ts +613 -0
- package/src/__tests__/circular-refs.test.ts +121 -0
- package/src/__tests__/cli.test.ts +249 -34
- package/src/__tests__/contour-exists.test.ts +203 -0
- package/src/__tests__/cross-declarations.test.ts +245 -0
- package/src/__tests__/dead-internal-trail.test.ts +81 -0
- package/src/__tests__/draft-rules-context.test.ts +150 -0
- package/src/__tests__/drift.test.ts +11 -11
- package/src/__tests__/error-mapping-completeness.test.ts +56 -0
- package/src/__tests__/example-valid.test.ts +101 -0
- package/src/__tests__/fires-declarations-param-destructure.test.ts +54 -0
- package/src/__tests__/fires-declarations.test.ts +652 -0
- package/src/__tests__/implementation-returns-result.test.ts +1016 -2
- package/src/__tests__/incomplete-accessor-for-standard-op.test.ts +337 -0
- package/src/__tests__/incomplete-crud.test.ts +498 -0
- package/src/__tests__/intent-propagation.test.ts +116 -0
- package/src/__tests__/missing-reconcile.test.ts +154 -0
- package/src/__tests__/missing-visibility.test.ts +108 -0
- package/src/__tests__/no-sync-result-assumption.test.ts +870 -39
- package/src/__tests__/no-throw-in-detour-recover.test.ts +93 -0
- package/src/__tests__/no-throw-in-implementation.test.ts +88 -0
- package/src/__tests__/on-references-exist.test.ts +151 -0
- package/src/__tests__/orphaned-signal.test.ts +137 -0
- package/src/__tests__/permit-governance.test.ts +66 -0
- package/src/__tests__/reference-exists.test.ts +281 -0
- package/src/__tests__/resource-declarations.test.ts +448 -0
- package/src/__tests__/resource-exists.test.ts +122 -0
- package/src/__tests__/resource-id-grammar.test.ts +50 -0
- package/src/__tests__/rules.test.ts +17 -77
- package/src/__tests__/topo-aware-rule.test.ts +257 -0
- package/src/__tests__/trails.test.ts +2 -2
- package/src/__tests__/unreachable-detour-shadowing.test.ts +128 -0
- package/src/__tests__/valid-describe-refs.test.ts +183 -0
- package/src/__tests__/valid-detour-contract.test.ts +86 -0
- package/src/__tests__/warden-export-symmetry.test.ts +251 -0
- package/src/__tests__/warden-rules-use-ast.test.ts +468 -0
- package/src/__tests__/wrap-rule.test.ts +3 -3
- package/src/cli.ts +447 -88
- package/src/drift.ts +9 -9
- package/src/index.ts +43 -25
- package/src/rules/ast.ts +2679 -121
- package/src/rules/circular-refs.ts +154 -0
- package/src/rules/{context-no-trailhead-types.ts → context-no-surface-types.ts} +72 -12
- package/src/rules/contour-exists.ts +251 -0
- package/src/rules/contour-ids.ts +15 -0
- package/src/rules/cross-declarations.ts +277 -69
- package/src/rules/dead-internal-trail.ts +141 -0
- package/src/rules/draft-file-marking.ts +51 -3
- package/src/rules/draft-visible-debt.ts +38 -13
- package/src/rules/error-mapping-completeness.ts +273 -0
- package/src/rules/example-valid.ts +401 -0
- package/src/rules/fires-declarations.ts +609 -0
- package/src/rules/implementation-returns-result.ts +1042 -122
- package/src/rules/incomplete-accessor-for-standard-op.ts +315 -0
- package/src/rules/incomplete-crud.ts +579 -0
- package/src/rules/index.ts +89 -16
- package/src/rules/intent-propagation.ts +142 -0
- package/src/rules/missing-reconcile.ts +98 -0
- package/src/rules/missing-visibility.ts +110 -0
- package/src/rules/no-direct-impl-in-route.ts +0 -4
- package/src/rules/no-direct-implementation-call.ts +1 -1
- package/src/rules/no-sync-result-assumption.ts +1134 -96
- package/src/rules/no-throw-in-detour-recover.ts +225 -0
- package/src/rules/no-throw-in-implementation.ts +6 -4
- package/src/rules/on-references-exist.ts +194 -0
- package/src/rules/orphaned-signal.ts +150 -0
- package/src/rules/permit-governance.ts +25 -0
- package/src/rules/reference-exists.ts +98 -0
- package/src/rules/registry-names.ts +83 -0
- package/src/rules/{provision-declarations.ts → resource-declarations.ts} +208 -138
- package/src/rules/{provision-exists.ts → resource-exists.ts} +46 -51
- package/src/rules/resource-id-grammar.ts +65 -0
- package/src/rules/specs.ts +5 -1
- package/src/rules/types.ts +57 -4
- package/src/rules/unreachable-detour-shadowing.ts +375 -0
- package/src/rules/valid-describe-refs.ts +160 -32
- package/src/rules/valid-detour-contract.ts +78 -0
- package/src/rules/warden-export-symmetry.ts +533 -0
- package/src/rules/warden-rules-use-ast.ts +996 -0
- package/src/trails/circular-refs.trail.ts +29 -0
- package/src/trails/{context-no-trailhead-types.trail.ts → context-no-surface-types.trail.ts} +4 -4
- package/src/trails/contour-exists.trail.ts +21 -0
- package/src/trails/dead-internal-trail.trail.ts +26 -0
- package/src/trails/draft-file-marking.trail.ts +16 -0
- package/src/trails/draft-visible-debt.trail.ts +16 -0
- package/src/trails/error-mapping-completeness.trail.ts +29 -0
- package/src/trails/example-valid.trail.ts +25 -0
- package/src/trails/fires-declarations.trail.ts +22 -0
- package/src/trails/incomplete-accessor-for-standard-op.trail.ts +76 -0
- package/src/trails/incomplete-crud.trail.ts +39 -0
- package/src/trails/index.ts +40 -7
- package/src/trails/intent-propagation.trail.ts +30 -0
- package/src/trails/missing-reconcile.trail.ts +33 -0
- package/src/trails/missing-visibility.trail.ts +22 -0
- package/src/trails/no-throw-in-detour-recover.trail.ts +24 -0
- package/src/trails/on-references-exist.trail.ts +21 -0
- package/src/trails/orphaned-signal.trail.ts +36 -0
- package/src/trails/permit-governance.trail.ts +51 -0
- package/src/trails/reference-exists.trail.ts +25 -0
- package/src/trails/{provision-declarations.trail.ts → resource-declarations.trail.ts} +6 -6
- package/src/trails/{provision-exists.trail.ts → resource-exists.trail.ts} +7 -7
- package/src/trails/resource-id-grammar.trail.ts +39 -0
- package/src/trails/run.ts +121 -24
- package/src/trails/schema.ts +66 -4
- package/src/trails/unreachable-detour-shadowing.trail.ts +45 -0
- package/src/trails/valid-detour-contract.trail.ts +71 -0
- package/src/trails/warden-export-symmetry.trail.ts +16 -0
- package/src/trails/warden-rules-use-ast.trail.ts +45 -0
- package/src/trails/wrap-rule.ts +104 -12
- package/tsconfig.tests.json +10 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/rules/follow-declarations.d.ts +0 -13
- package/dist/rules/follow-declarations.d.ts.map +0 -1
- package/dist/rules/follow-declarations.js +0 -264
- package/dist/rules/follow-declarations.js.map +0 -1
- package/dist/rules/provision-declarations.d.ts +0 -14
- package/dist/rules/provision-declarations.d.ts.map +0 -1
- package/dist/rules/provision-declarations.js +0 -344
- package/dist/rules/provision-declarations.js.map +0 -1
- package/dist/rules/provision-exists.d.ts +0 -6
- package/dist/rules/provision-exists.d.ts.map +0 -1
- package/dist/rules/provision-exists.js +0 -90
- package/dist/rules/provision-exists.js.map +0 -1
- package/dist/rules/service-declarations.d.ts +0 -16
- package/dist/rules/service-declarations.d.ts.map +0 -1
- package/dist/rules/service-declarations.js +0 -346
- package/dist/rules/service-declarations.js.map +0 -1
- package/dist/rules/service-exists.d.ts +0 -8
- package/dist/rules/service-exists.d.ts.map +0 -1
- package/dist/rules/service-exists.js +0 -91
- package/dist/rules/service-exists.js.map +0 -1
- package/dist/trails/follow-declarations.trail.d.ts.map +0 -1
- package/dist/trails/follow-declarations.trail.js +0 -22
- package/dist/trails/follow-declarations.trail.js.map +0 -1
- package/dist/trails/provision-declarations.trail.d.ts.map +0 -1
- package/dist/trails/provision-declarations.trail.js.map +0 -1
- package/dist/trails/provision-exists.trail.d.ts +0 -15
- package/dist/trails/provision-exists.trail.d.ts.map +0 -1
- package/dist/trails/provision-exists.trail.js.map +0 -1
- package/dist/trails/service-declarations.trail.d.ts +0 -26
- package/dist/trails/service-declarations.trail.d.ts.map +0 -1
- package/dist/trails/service-declarations.trail.js +0 -27
- package/dist/trails/service-declarations.trail.js.map +0 -1
- package/dist/trails/service-exists.trail.d.ts +0 -32
- package/dist/trails/service-exists.trail.d.ts.map +0 -1
- package/dist/trails/service-exists.trail.js +0 -29
- package/dist/trails/service-exists.trail.js.map +0 -1
- package/src/__tests__/no-throw-in-detour-target.test.ts +0 -78
- package/src/__tests__/provision-declarations.test.ts +0 -318
- package/src/__tests__/provision-exists.test.ts +0 -122
- package/src/rules/no-throw-in-detour-target.ts +0 -150
- package/src/rules/valid-detour-refs.ts +0 -189
- package/src/trails/no-throw-in-detour-target.trail.ts +0 -20
- package/src/trails/valid-detour-refs.trail.ts +0 -24
package/dist/drift.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drift.js","sourceRoot":"","sources":["../src/drift.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG/C,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"drift.js","sourceRoot":"","sources":["../src/drift.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG/C,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAgB1B;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,OAAe,EACf,IAAuB,EACD,EAAE;IACxB,IAAI,CAAC;QACH,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ACJ,CAAC;AACH,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,22 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Package: `@ontrails/warden`
|
|
8
8
|
*/
|
|
9
|
-
export type { ProjectAwareWardenRule, ProjectContext, WardenDiagnostic, WardenRule, WardenSeverity, } from './rules/index.js';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export { draftFileMarking } from './rules/draft-file-marking.js';
|
|
13
|
-
export { draftVisibleDebt } from './rules/draft-visible-debt.js';
|
|
14
|
-
export { validDetourRefs } from './rules/valid-detour-refs.js';
|
|
15
|
-
export { noDirectImplInRoute } from './rules/no-direct-impl-in-route.js';
|
|
16
|
-
export { noDirectImplementationCall } from './rules/no-direct-implementation-call.js';
|
|
17
|
-
export { noSyncResultAssumption } from './rules/no-sync-result-assumption.js';
|
|
18
|
-
export { implementationReturnsResult } from './rules/implementation-returns-result.js';
|
|
19
|
-
export { noThrowInDetourTarget } from './rules/no-throw-in-detour-target.js';
|
|
20
|
-
export { preferSchemaInference } from './rules/prefer-schema-inference.js';
|
|
21
|
-
export { provisionDeclarations } from './rules/provision-declarations.js';
|
|
22
|
-
export { provisionExists } from './rules/provision-exists.js';
|
|
23
|
-
export { validDescribeRefs } from './rules/valid-describe-refs.js';
|
|
24
|
-
export { wardenRules } from './rules/index.js';
|
|
9
|
+
export type { ProjectAwareWardenRule, ProjectContext, TopoAwareWardenRule, WardenDiagnostic, WardenRule, WardenSeverity, } from './rules/index.js';
|
|
10
|
+
export { wardenRules, wardenTopoRules } from './rules/index.js';
|
|
11
|
+
export { clearImplementationReturnsResultCache } from './rules/implementation-returns-result.js';
|
|
25
12
|
export type { WardenOptions, WardenReport } from './cli.js';
|
|
26
13
|
export { formatWardenReport, runWarden } from './cli.js';
|
|
27
14
|
export { formatGitHubAnnotations, formatJson, formatSummary, } from './formatters.js';
|
|
@@ -31,7 +18,7 @@ export { DRAFT_FILE_PREFIX, DRAFT_FILE_SEGMENT, isDraftMarkedFile, stripDraftFil
|
|
|
31
18
|
export { findStringLiterals, getStringValue, isStringLiteral, offsetToLine, parse, walk, } from './rules/ast.js';
|
|
32
19
|
export type { AstNode, StringLiteralMatch } from './rules/ast.js';
|
|
33
20
|
export { wardenTopo } from './trails/topo.js';
|
|
34
|
-
export { runWardenTrails } from './trails/run.js';
|
|
35
|
-
export {
|
|
36
|
-
export type { RuleInput, RuleOutput } from './trails/index.js';
|
|
21
|
+
export { runTopoAwareWardenTrails, runWardenTrails } from './trails/run.js';
|
|
22
|
+
export { circularRefsTrail, contourExistsTrail, contextNoSurfaceTypesTrail, crossDeclarationsTrail, deadInternalTrailTrail, diagnosticSchema, draftFileMarkingTrail, draftVisibleDebtTrail, errorMappingCompletenessTrail, exampleValidTrail, firesDeclarationsTrail, implementationReturnsResultTrail, incompleteAccessorForStandardOpTrail, incompleteCrudTrail, intentPropagationTrail, missingVisibilityTrail, missingReconcileTrail, noDirectImplInRouteTrail, noDirectImplementationCallTrail, noSyncResultAssumptionTrail, noThrowInDetourRecoverTrail, noThrowInImplementationTrail, onReferencesExistTrail, orphanedSignalTrail, permitGovernanceTrail, preferSchemaInferenceTrail, projectAwareRuleInput, referenceExistsTrail, ruleInput, ruleOutput, resourceDeclarationsTrail, resourceIdGrammarTrail, resourceExistsTrail, topoAwareRuleInput, unreachableDetourShadowingTrail, validDetourContractTrail, validDescribeRefsTrail, wardenExportSymmetryTrail, wardenRulesUseAstTrail, wrapRule, wrapTopoRule, } from './trails/index.js';
|
|
23
|
+
export type { ProjectAwareRuleInput, RuleInput, RuleOutput, TopoAwareRuleInput, } from './trails/index.js';
|
|
37
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,YAAY,EACV,sBAAsB,EACtB,cAAc,EACd,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,iBAAiB,EACjB,sBAAsB,EACtB,gCAAgC,EAChC,oCAAoC,EACpC,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,+BAA+B,EAC/B,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,SAAS,EACT,UAAU,EACV,yBAAyB,EACzB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,+BAA+B,EAC/B,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,QAAQ,EACR,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,qBAAqB,EACrB,SAAS,EACT,UAAU,EACV,kBAAkB,GACnB,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,23 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Package: `@ontrails/warden`
|
|
8
8
|
*/
|
|
9
|
-
// Individual rules
|
|
10
|
-
export { noThrowInImplementation } from './rules/no-throw-in-implementation.js';
|
|
11
|
-
export { contextNoTrailheadTypes } from './rules/context-no-trailhead-types.js';
|
|
12
|
-
export { draftFileMarking } from './rules/draft-file-marking.js';
|
|
13
|
-
export { draftVisibleDebt } from './rules/draft-visible-debt.js';
|
|
14
|
-
export { validDetourRefs } from './rules/valid-detour-refs.js';
|
|
15
|
-
export { noDirectImplInRoute } from './rules/no-direct-impl-in-route.js';
|
|
16
|
-
export { noDirectImplementationCall } from './rules/no-direct-implementation-call.js';
|
|
17
|
-
export { noSyncResultAssumption } from './rules/no-sync-result-assumption.js';
|
|
18
|
-
export { implementationReturnsResult } from './rules/implementation-returns-result.js';
|
|
19
|
-
export { noThrowInDetourTarget } from './rules/no-throw-in-detour-target.js';
|
|
20
|
-
export { preferSchemaInference } from './rules/prefer-schema-inference.js';
|
|
21
|
-
export { provisionDeclarations } from './rules/provision-declarations.js';
|
|
22
|
-
export { provisionExists } from './rules/provision-exists.js';
|
|
23
|
-
export { validDescribeRefs } from './rules/valid-describe-refs.js';
|
|
24
9
|
// Rule registry
|
|
25
|
-
export { wardenRules } from './rules/index.js';
|
|
10
|
+
export { wardenRules, wardenTopoRules } from './rules/index.js';
|
|
11
|
+
// Rule-scoped cache controls for long-lived consumers (watch mode, LSPs).
|
|
12
|
+
export { clearImplementationReturnsResultCache } from './rules/implementation-returns-result.js';
|
|
26
13
|
export { formatWardenReport, runWarden } from './cli.js';
|
|
27
14
|
// CI formatters
|
|
28
15
|
export { formatGitHubAnnotations, formatJson, formatSummary, } from './formatters.js';
|
|
@@ -31,8 +18,8 @@ export { checkDrift } from './drift.js';
|
|
|
31
18
|
export { DRAFT_FILE_PREFIX, DRAFT_FILE_SEGMENT, isDraftMarkedFile, stripDraftFileMarkers, } from './draft.js';
|
|
32
19
|
// AST helpers for repo-local tooling
|
|
33
20
|
export { findStringLiterals, getStringValue, isStringLiteral, offsetToLine, parse, walk, } from './rules/ast.js';
|
|
34
|
-
// Trail
|
|
21
|
+
// Trail layer
|
|
35
22
|
export { wardenTopo } from './trails/topo.js';
|
|
36
|
-
export { runWardenTrails } from './trails/run.js';
|
|
37
|
-
export {
|
|
23
|
+
export { runTopoAwareWardenTrails, runWardenTrails } from './trails/run.js';
|
|
24
|
+
export { circularRefsTrail, contourExistsTrail, contextNoSurfaceTypesTrail, crossDeclarationsTrail, deadInternalTrailTrail, diagnosticSchema, draftFileMarkingTrail, draftVisibleDebtTrail, errorMappingCompletenessTrail, exampleValidTrail, firesDeclarationsTrail, implementationReturnsResultTrail, incompleteAccessorForStandardOpTrail, incompleteCrudTrail, intentPropagationTrail, missingVisibilityTrail, missingReconcileTrail, noDirectImplInRouteTrail, noDirectImplementationCallTrail, noSyncResultAssumptionTrail, noThrowInDetourRecoverTrail, noThrowInImplementationTrail, onReferencesExistTrail, orphanedSignalTrail, permitGovernanceTrail, preferSchemaInferenceTrail, projectAwareRuleInput, referenceExistsTrail, ruleInput, ruleOutput, resourceDeclarationsTrail, resourceIdGrammarTrail, resourceExistsTrail, topoAwareRuleInput, unreachableDetourShadowingTrail, validDetourContractTrail, validDescribeRefsTrail, wardenExportSymmetryTrail, wardenRulesUseAstTrail, wrapRule, wrapTopoRule, } from './trails/index.js';
|
|
38
25
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH,gBAAgB;AAChB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEhE,0EAA0E;AAC1E,OAAO,EAAE,qCAAqC,EAAE,MAAM,0CAA0C,CAAC;AAIjG,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEzD,gBAAgB;AAChB,OAAO,EACL,uBAAuB,EACvB,UAAU,EACV,aAAa,GACd,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,gBAAgB;AAChB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAEpB,qCAAqC;AACrC,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,KAAK,EACL,IAAI,GACL,MAAM,gBAAgB,CAAC;AAGxB,cAAc;AACd,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,iBAAiB,EACjB,sBAAsB,EACtB,gCAAgC,EAChC,oCAAoC,EACpC,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,+BAA+B,EAC/B,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,SAAS,EACT,UAAU,EACV,yBAAyB,EACzB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,+BAA+B,EAC/B,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,QAAQ,EACR,YAAY,GACb,MAAM,mBAAmB,CAAC"}
|
package/dist/rules/ast.d.ts
CHANGED
|
@@ -11,10 +11,14 @@ export interface AstNode {
|
|
|
11
11
|
readonly key?: {
|
|
12
12
|
readonly name?: string;
|
|
13
13
|
};
|
|
14
|
-
readonly value?:
|
|
14
|
+
readonly value?: unknown;
|
|
15
15
|
readonly body?: AstNode | readonly AstNode[];
|
|
16
16
|
readonly [key: string]: unknown;
|
|
17
17
|
}
|
|
18
|
+
interface StringLiteralNode extends AstNode {
|
|
19
|
+
readonly type: 'Literal' | 'StringLiteral';
|
|
20
|
+
readonly value?: unknown;
|
|
21
|
+
}
|
|
18
22
|
/** Parse TypeScript source into an AST. Returns null on parse failure. */
|
|
19
23
|
export declare const parse: (filePath: string, sourceCode: string) => AstNode | null;
|
|
20
24
|
type WalkFn = (node: unknown, visit: (node: AstNode) => void) => void;
|
|
@@ -23,7 +27,7 @@ export declare const walk: WalkFn;
|
|
|
23
27
|
/**
|
|
24
28
|
* Walk an AST node tree without descending into nested function scopes.
|
|
25
29
|
* The root node is always traversed; only inner function boundaries are skipped.
|
|
26
|
-
* Useful for
|
|
30
|
+
* Useful for resource-access analysis where inner functions may shadow
|
|
27
31
|
* the trail context parameter name.
|
|
28
32
|
*/
|
|
29
33
|
export declare const walkScope: WalkFn;
|
|
@@ -32,24 +36,86 @@ export declare const offsetToLine: (sourceCode: string, offset: number) => numbe
|
|
|
32
36
|
/** Get the name of an Identifier node, or null. */
|
|
33
37
|
export declare const identifierName: (node: AstNode | undefined) => string | null;
|
|
34
38
|
/** Check if a node is a string literal. */
|
|
35
|
-
export declare const isStringLiteral: (node: AstNode | undefined) => node is
|
|
39
|
+
export declare const isStringLiteral: (node: AstNode | undefined) => node is StringLiteralNode;
|
|
36
40
|
/** Extract the string value from a string literal node. */
|
|
37
41
|
export declare const getStringValue: (node: AstNode) => string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Best-effort resolution of `const NAME = 'value'` declarations via regex.
|
|
44
|
+
*
|
|
45
|
+
* Returns the string value if a simple `const <name> = '...'` or `"..."` is
|
|
46
|
+
* found in the source. Returns null for anything more complex. Shared between
|
|
47
|
+
* warden rules that need to resolve identifier references to signal / trail
|
|
48
|
+
* IDs at lint time.
|
|
49
|
+
*/
|
|
50
|
+
export declare const deriveConstString: (name: string, sourceCode: string) => string | null;
|
|
38
51
|
/** Extract a string literal value, or null when the node is not a string. */
|
|
39
52
|
export declare const extractStringLiteral: (node: AstNode | undefined) => string | null;
|
|
53
|
+
export declare const extractPlainTemplateLiteral: (node: AstNode | undefined) => string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Extract a string value from either a string literal or a plain template
|
|
56
|
+
* literal (no `${...}` expressions). Returns null for anything else.
|
|
57
|
+
*/
|
|
58
|
+
export declare const extractStringOrTemplateLiteral: (node: AstNode | undefined) => string | null;
|
|
40
59
|
export interface StringLiteralMatch {
|
|
41
60
|
readonly end: number;
|
|
42
61
|
readonly node: AstNode;
|
|
43
62
|
readonly start: number;
|
|
44
63
|
readonly value: string;
|
|
45
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Names of framework constants whose value is a draft-marker prefix literal.
|
|
67
|
+
*
|
|
68
|
+
* String literals that initialize a `const` declaration with one of these
|
|
69
|
+
* names are treated as the framework's own draft-marker declarations, not as
|
|
70
|
+
* draft-id usage. This list is intentionally small and explicit — adding a
|
|
71
|
+
* new framework draft-prefix constant requires updating this set.
|
|
72
|
+
*/
|
|
73
|
+
export declare const FRAMEWORK_DRAFT_PREFIX_CONSTANT_NAMES: ReadonlySet<string>;
|
|
74
|
+
/**
|
|
75
|
+
* Collect the source offsets of string literals that initialize a framework
|
|
76
|
+
* draft-prefix constant declaration (e.g. `export const DRAFT_ID_PREFIX =
|
|
77
|
+
* '_draft.'`). Used by draft-awareness rules to skip their own marker
|
|
78
|
+
* constants.
|
|
79
|
+
*
|
|
80
|
+
* Exemption is gated on all three of:
|
|
81
|
+
* 1. The file's absolute path matches one of the two framework files that
|
|
82
|
+
* actually define these constants.
|
|
83
|
+
* 2. The declaration name is `DRAFT_ID_PREFIX` or `DRAFT_FILE_PREFIX`.
|
|
84
|
+
* 3. The string literal value is exactly `'_draft.'`.
|
|
85
|
+
*
|
|
86
|
+
* A consumer file that reuses one of these identifier names cannot hide a
|
|
87
|
+
* `_draft.*` leak — the path gate rejects it outright.
|
|
88
|
+
*/
|
|
89
|
+
export declare const collectFrameworkDraftPrefixConstantOffsets: (ast: AstNode, filePath: string) => ReadonlySet<number>;
|
|
90
|
+
/**
|
|
91
|
+
* Split source code into lines for pragma lookups. Callers should split once
|
|
92
|
+
* per `check` invocation and thread the result through to
|
|
93
|
+
* {@link hasIgnoreCommentOnLine} so we avoid re-splitting the full source on
|
|
94
|
+
* every match in files with many draft-like string literals.
|
|
95
|
+
*/
|
|
96
|
+
export declare const splitSourceLines: (sourceCode: string) => readonly string[];
|
|
97
|
+
/**
|
|
98
|
+
* Check whether the line immediately preceding `line` contains a
|
|
99
|
+
* `// warden-ignore-next-line` pragma (leading/trailing whitespace tolerated).
|
|
100
|
+
* Pragma scope is strictly one line — an intervening blank line breaks it.
|
|
101
|
+
*
|
|
102
|
+
* Takes a pre-split `lines` array so callers can split the source once per
|
|
103
|
+
* invocation instead of re-splitting for every literal they check.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* // warden-ignore-next-line
|
|
108
|
+
* const x = '_draft.intentional'; // suppressed
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
export declare const hasIgnoreCommentOnLine: (lines: readonly string[], line: number) => boolean;
|
|
46
112
|
export declare const findStringLiterals: (ast: AstNode, predicate?: (value: string, node: AstNode) => boolean) => StringLiteralMatch[];
|
|
47
113
|
/** Extract the first string argument from a CallExpression. */
|
|
48
114
|
export declare const extractFirstStringArg: (node: AstNode) => string | null;
|
|
49
|
-
/** Collect `const foo =
|
|
50
|
-
export declare const
|
|
51
|
-
/** Collect all inline `
|
|
52
|
-
export declare const
|
|
115
|
+
/** Collect `const foo = resource('id', ...)` bindings from a parsed file. */
|
|
116
|
+
export declare const collectNamedResourceIds: (ast: AstNode) => ReadonlyMap<string, string>;
|
|
117
|
+
/** Collect all inline `resource('id', ...)` definition IDs from a parsed file. */
|
|
118
|
+
export declare const collectResourceDefinitionIds: (ast: AstNode) => ReadonlySet<string>;
|
|
53
119
|
/** Backward-compatible aliases while the migration is in flight. */
|
|
54
120
|
export declare const collectNamedServiceIds: (ast: AstNode) => ReadonlyMap<string, string>;
|
|
55
121
|
/** Backward-compatible aliases while the migration is in flight. */
|
|
@@ -66,7 +132,223 @@ export interface TrailDefinition {
|
|
|
66
132
|
/** Start offset of the call expression */
|
|
67
133
|
readonly start: number;
|
|
68
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Collect the identifier bindings introduced *directly* by a scope frame
|
|
137
|
+
* node. Scope frames correspond to JS lexical scopes (function bodies, blocks,
|
|
138
|
+
* catch clauses, for-statements, switch statements, module/script roots).
|
|
139
|
+
*/
|
|
140
|
+
export declare const collectScopeFrameBindings: (node: AstNode) => ReadonlySet<string>;
|
|
141
|
+
export type ScopeAwareVisitor = (node: AstNode, scopes: readonly ReadonlySet<string>[]) => void;
|
|
142
|
+
export interface ScopeWalkOptions {
|
|
143
|
+
readonly initialScopes?: readonly ReadonlySet<string>[];
|
|
144
|
+
readonly stopAtNestedFunctions?: boolean;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Walk an AST subtree while threading lexical scope bindings through each
|
|
148
|
+
* visit. Callers can seed outer scopes and optionally stop at nested function
|
|
149
|
+
* boundaries when only the current implementation body should be analyzed.
|
|
150
|
+
*/
|
|
151
|
+
export declare const walkWithScopes: (node: unknown, visit: ScopeAwareVisitor, options?: ScopeWalkOptions) => void;
|
|
152
|
+
/**
|
|
153
|
+
* Return `true` when `node` is a non-computed member access (`a.b` /
|
|
154
|
+
* `a?.b`) and `false` for anything else, including computed access
|
|
155
|
+
* (`a[b]`) or non-member nodes. Exported as the canonical predicate so
|
|
156
|
+
* rule modules do not re-implement the check.
|
|
157
|
+
*
|
|
158
|
+
* @remarks
|
|
159
|
+
* Declared near the top of the file so the scope walker can use it
|
|
160
|
+
* without hitting `no-use-before-define`. A few sibling helpers in this
|
|
161
|
+
* module still inline the same shape under different local names for
|
|
162
|
+
* historical reasons; prefer this export for new call sites.
|
|
163
|
+
*/
|
|
164
|
+
export declare const isMemberAccessNonComputed: (node: AstNode) => boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Resolution context for namespaced framework-primitive calls. Bundles the
|
|
167
|
+
* bare namespace-binding set with an optional set of proven-safe
|
|
168
|
+
* `CallExpression` start offsets from a scope-aware pre-pass. When the set of
|
|
169
|
+
* safe starts is present, a namespaced call only resolves if its start is in
|
|
170
|
+
* that set — so a function-local shadow of the namespace import does not
|
|
171
|
+
* leak through. When absent (e.g. from test helpers), the name-only gate is
|
|
172
|
+
* used as a backward-compatible fallback.
|
|
173
|
+
*/
|
|
174
|
+
export interface FrameworkNamespaceContext {
|
|
175
|
+
readonly namespaces: ReadonlySet<string>;
|
|
176
|
+
readonly safeCallStarts?: ReadonlySet<number>;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Test hook: exposes {@link getTrailCalleeName} for unit tests.
|
|
180
|
+
*
|
|
181
|
+
* Kept unexported from the module's public surface (no re-export from
|
|
182
|
+
* `index.ts`) so internal refactors stay free.
|
|
183
|
+
*/
|
|
184
|
+
export declare const __getTrailCalleeNameForTest: (node: AstNode, context?: ReadonlySet<string> | FrameworkNamespaceContext) => string | null;
|
|
185
|
+
/**
|
|
186
|
+
* Test hook: exposes {@link collectFrameworkNamespaceBindings} for unit tests.
|
|
187
|
+
*
|
|
188
|
+
* Not re-exported from `index.ts`; the double-underscore prefix marks it as an
|
|
189
|
+
* internal-only handle so consumer code cannot rely on it.
|
|
190
|
+
*/
|
|
191
|
+
export declare const __collectFrameworkNamespaceBindingsForTest: (ast: AstNode) => ReadonlySet<string>;
|
|
69
192
|
export declare const findTrailDefinitions: (ast: AstNode) => TrailDefinition[];
|
|
193
|
+
export interface ContourDefinition {
|
|
194
|
+
/** Local binding name when the contour is assigned to a variable. */
|
|
195
|
+
readonly bindingName?: string;
|
|
196
|
+
/** Contour name string, e.g. "user". */
|
|
197
|
+
readonly name: string;
|
|
198
|
+
/** Original call expression for the contour declaration. */
|
|
199
|
+
readonly call: AstNode;
|
|
200
|
+
/** Options object argument passed to contour(), when present. */
|
|
201
|
+
readonly options: AstNode | null;
|
|
202
|
+
/** Shape object argument passed to contour(). */
|
|
203
|
+
readonly shape: AstNode;
|
|
204
|
+
/** Start offset of the call expression. */
|
|
205
|
+
readonly start: number;
|
|
206
|
+
}
|
|
207
|
+
export interface FindContourDefinitionsOptions {
|
|
208
|
+
/**
|
|
209
|
+
* When true, skip contour calls nested inside other expressions (e.g.
|
|
210
|
+
* `core.contour('inner', {...}).id()` used as a field of an outer contour).
|
|
211
|
+
* Top-level forms are still surfaced: both `const foo = contour(...)`
|
|
212
|
+
* declarations and bare `contour('name', {...});` statement-form calls that
|
|
213
|
+
* appear directly in the program body (optionally wrapped in `export`) are
|
|
214
|
+
* returned.
|
|
215
|
+
*
|
|
216
|
+
* Defaults to `false`: both top-level and inline contours are returned so
|
|
217
|
+
* that reference-site resolution can reach anonymous inline contours.
|
|
218
|
+
*/
|
|
219
|
+
readonly topLevelOnly?: boolean;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Return every `contour('name', ...)` definition reachable from the AST, in
|
|
223
|
+
* source order, deduplicated by call-expression start offset.
|
|
224
|
+
*
|
|
225
|
+
* Includes both top-level bindings (`const user = contour('user', ...)`) and
|
|
226
|
+
* inline contour calls nested inside other expressions (e.g.
|
|
227
|
+
* `contour('outer', { inner: contour('inner', ...).id() })`). Inline contours
|
|
228
|
+
* carry no `bindingName` because they have no local binding — this asymmetry
|
|
229
|
+
* is why {@link collectNamedContourIds} returns only the top-level subset
|
|
230
|
+
* while {@link collectContourDefinitionIds} returns the full set.
|
|
231
|
+
*
|
|
232
|
+
* Pass `{ topLevelOnly: true }` via `options` to opt out of inline discovery
|
|
233
|
+
* without disturbing callers that rely on the default behavior.
|
|
234
|
+
*
|
|
235
|
+
* @remarks
|
|
236
|
+
* Supplying a pre-built `context` skips the second full-AST traversal inside
|
|
237
|
+
* `buildFrameworkNamespaceContext` — useful for callers (such as
|
|
238
|
+
* {@link collectContourReferenceSites}) that already built one.
|
|
239
|
+
*/
|
|
240
|
+
export declare const findContourDefinitions: (ast: AstNode, context?: FrameworkNamespaceContext, options?: FindContourDefinitionsOptions) => ContourDefinition[];
|
|
241
|
+
/**
|
|
242
|
+
* Collect the `name` of every contour definition in a parsed file, including
|
|
243
|
+
* inline contours nested inside other expressions. Returns the same set of
|
|
244
|
+
* names that {@link findContourDefinitions} discovers under default options.
|
|
245
|
+
*/
|
|
246
|
+
export declare const collectContourDefinitionIds: (ast: AstNode) => ReadonlySet<string>;
|
|
247
|
+
/**
|
|
248
|
+
* Collect the `localBinding → contourName` map for `const foo = contour(...)`
|
|
249
|
+
* declarations. Inline contour calls are intentionally excluded because they
|
|
250
|
+
* have no local binding — use {@link collectContourDefinitionIds} when the
|
|
251
|
+
* full set of declared names is required.
|
|
252
|
+
*/
|
|
253
|
+
export declare const collectNamedContourIds: (ast: AstNode) => ReadonlyMap<string, string>;
|
|
254
|
+
/**
|
|
255
|
+
* Collect `import { foo as bar } from '...'` and `import bar from '...'`
|
|
256
|
+
* specifier mappings keyed by local binding name. The value is the original
|
|
257
|
+
* exported name for named imports. Default imports map to themselves because
|
|
258
|
+
* the exported name cannot be recovered statically — callers should fall
|
|
259
|
+
* through to `knownContourIds` membership on the local binding name.
|
|
260
|
+
*/
|
|
261
|
+
export declare const collectImportAliasMap: (ast: AstNode) => ReadonlyMap<string, string>;
|
|
262
|
+
/**
|
|
263
|
+
* Collect local binding names introduced by `import * as <name> from '<src>'`
|
|
264
|
+
* declarations whose source is NOT an `@ontrails/*` framework package. These
|
|
265
|
+
* are user-defined namespace imports of contour modules (e.g. `import * as
|
|
266
|
+
* contours from './contours'`), used to resolve `contours.user` member-access
|
|
267
|
+
* references to contour ids.
|
|
268
|
+
*
|
|
269
|
+
* Framework namespace imports (`import * as core from '@ontrails/core'`) are
|
|
270
|
+
* intentionally excluded — they carry framework primitives like
|
|
271
|
+
* `core.contour(...)` and are resolved by {@link buildFrameworkNamespaceContext}.
|
|
272
|
+
* Mixing them here would treat `core.contour` as a reference to a contour
|
|
273
|
+
* named "contour", producing false positives.
|
|
274
|
+
*/
|
|
275
|
+
export declare const collectUserNamespaceImportBindings: (ast: AstNode) => ReadonlySet<string>;
|
|
276
|
+
/**
|
|
277
|
+
* Resolution context for user-namespace member access like `contours.user`.
|
|
278
|
+
* Bundles the set of local namespace-binding names (from `import * as x from
|
|
279
|
+
* './contours'`) with an optional set of proven-safe `MemberExpression` start
|
|
280
|
+
* offsets from a scope-aware pre-pass. When `safeMemberStarts` is present, a
|
|
281
|
+
* member access only resolves to a user-namespace target if its start is in
|
|
282
|
+
* the set — so a function-local shadow of the namespace import does not leak
|
|
283
|
+
* through. When absent, the name-only gate is used as a
|
|
284
|
+
* backward-compatible fallback for ad-hoc callers.
|
|
285
|
+
*/
|
|
286
|
+
export interface UserNamespaceContext {
|
|
287
|
+
readonly bindings: ReadonlySet<string>;
|
|
288
|
+
readonly safeMemberStarts?: ReadonlySet<number>;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Build a {@link UserNamespaceContext} for `ast`, including the scope-aware
|
|
292
|
+
* `safeMemberStarts` gate. Prefer this over bare
|
|
293
|
+
* {@link collectUserNamespaceImportBindings} so member access like
|
|
294
|
+
* `contours.user` is rejected when `contours` is shadowed by a local binding.
|
|
295
|
+
*/
|
|
296
|
+
export declare const buildUserNamespaceContext: (ast: AstNode) => UserNamespaceContext;
|
|
297
|
+
export interface ContourReferenceSite {
|
|
298
|
+
/** Field on the source contour that declares the reference. */
|
|
299
|
+
readonly field: string;
|
|
300
|
+
/** Source contour name. */
|
|
301
|
+
readonly source: string;
|
|
302
|
+
/** Start offset of the field declaration. */
|
|
303
|
+
readonly start: number;
|
|
304
|
+
/** Target contour name. */
|
|
305
|
+
readonly target: string;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Read a property key or member access identifier.
|
|
309
|
+
*
|
|
310
|
+
* Returns the identifier name for `Identifier` keys, or the underlying
|
|
311
|
+
* string literal value for computed access via `['name']` / `"name"`.
|
|
312
|
+
*/
|
|
313
|
+
export declare const getPropertyName: (node: unknown) => string | null;
|
|
314
|
+
/**
|
|
315
|
+
* Resolve a local binding name to a contour ID, honoring import aliases.
|
|
316
|
+
*
|
|
317
|
+
* Strategies, in order:
|
|
318
|
+
* 1. Local `const foo = contour('name', ...)` binding → the contour name.
|
|
319
|
+
* 2. `knownContourIds` membership on the binding name itself (or the
|
|
320
|
+
* conventional `Contour` suffix strip).
|
|
321
|
+
* 3. `import { foo as bar }` → use the original exported name `foo`
|
|
322
|
+
* (and apply strategy 2 / suffix-stripping against it so aliased imports
|
|
323
|
+
* resolve correctly). If the imported name still isn't recognized, the
|
|
324
|
+
* imported name is returned so the caller can report it missing.
|
|
325
|
+
*
|
|
326
|
+
* Returns `null` only when the name belongs to no known resolution path —
|
|
327
|
+
* no local binding, no known contour ID, no import, and no suffix match.
|
|
328
|
+
* Returning `null` means "this identifier is not a contour reference we can
|
|
329
|
+
* reason about" (e.g. a bare undeclared variable), as opposed to
|
|
330
|
+
* "a contour reference whose target is missing".
|
|
331
|
+
*/
|
|
332
|
+
export declare const deriveContourIdentifierName: (bindingName: string, namedContourIds: ReadonlyMap<string, string>, knownContourIds?: ReadonlySet<string>, importAliases?: ReadonlyMap<string, string>) => string | null;
|
|
333
|
+
/**
|
|
334
|
+
* Resolve a user-namespace member access like `contours.user` to its contour
|
|
335
|
+
* id. Returns the property name (e.g. `'user'`) when the receiver identifier
|
|
336
|
+
* is a known user-defined namespace binding AND — when the caller provides a
|
|
337
|
+
* {@link UserNamespaceContext} with `safeMemberStarts` — the member access
|
|
338
|
+
* site is in that set (i.e. the receiver is not shadowed by any enclosing
|
|
339
|
+
* scope). Otherwise returns `null`.
|
|
340
|
+
*
|
|
341
|
+
* The property name is taken as the contour id verbatim — we cannot statically
|
|
342
|
+
* resolve what `contours.user` binds to without reading the other file, so we
|
|
343
|
+
* treat the member name as the candidate target and let
|
|
344
|
+
* {@link deriveContourIdentifierName}'s downstream `knownContourIds` check
|
|
345
|
+
* report a missing target.
|
|
346
|
+
*/
|
|
347
|
+
export declare const isUserNamespaceReceiverAllowed: (receiver: string, memberStart: number, ctx: UserNamespaceContext) => boolean;
|
|
348
|
+
/** Collect all contour field references declared via `.id()` in a parsed file. */
|
|
349
|
+
export declare const collectContourReferenceSites: (ast: AstNode, knownContourIds?: ReadonlySet<string>) => readonly ContourReferenceSite[];
|
|
350
|
+
/** Collect contour reference targets keyed by source contour name. */
|
|
351
|
+
export declare const collectContourReferenceTargetsByName: (ast: AstNode, knownContourIds?: ReadonlySet<string>) => ReadonlyMap<string, readonly string[]>;
|
|
70
352
|
/**
|
|
71
353
|
* Find `blaze:` property values.
|
|
72
354
|
*
|
|
@@ -76,6 +358,122 @@ export declare const findTrailDefinitions: (ast: AstNode) => TrailDefinition[];
|
|
|
76
358
|
* (e.g. `meta: { blaze: ... }`).
|
|
77
359
|
*/
|
|
78
360
|
export declare const findBlazeBodies: (node: AstNode) => AstNode[];
|
|
361
|
+
/**
|
|
362
|
+
* Collect all `signal('id', { ... })` / `signal({ id: 'x', ... })` definition IDs.
|
|
363
|
+
*
|
|
364
|
+
* Uses `findTrailDefinitions` under the hood — it already recognizes both
|
|
365
|
+
* `trail` and `signal` call sites, distinguished by the `kind` field.
|
|
366
|
+
*/
|
|
367
|
+
export declare const collectSignalDefinitionIds: (ast: AstNode) => ReadonlySet<string>;
|
|
368
|
+
/** Collect `const foo = trail('id', ...)` bindings from a parsed file. */
|
|
369
|
+
export declare const collectNamedTrailIds: (ast: AstNode) => ReadonlyMap<string, string>;
|
|
370
|
+
/** Extract the raw `crosses: [...]` array elements from a trail config. */
|
|
371
|
+
export declare const getCrossElements: (config: AstNode) => readonly AstNode[];
|
|
372
|
+
/**
|
|
373
|
+
* Resolve a single `crosses: [...]` element to its target trail ID.
|
|
374
|
+
*
|
|
375
|
+
* Handles string literals, identifier references (via `namedTrailIds` map or
|
|
376
|
+
* `const NAME = '...'` resolution), and inline `trail(...)` call expressions.
|
|
377
|
+
*/
|
|
378
|
+
export declare const deriveCrossElementId: (element: AstNode, sourceCode: string, namedTrailIds: ReadonlyMap<string, string>) => string | null;
|
|
379
|
+
/**
|
|
380
|
+
* Collect all trail IDs referenced by a single trail definition's
|
|
381
|
+
* `crosses: [...]` array, deduplicated.
|
|
382
|
+
*/
|
|
383
|
+
export declare const extractDefinitionCrossTargetIds: (config: AstNode, sourceCode: string, namedTrailIds: ReadonlyMap<string, string>) => readonly string[];
|
|
384
|
+
/** Collect all trail IDs referenced by declared `crosses: [...]` arrays. */
|
|
385
|
+
export declare const collectCrossTargetTrailIds: (ast: AstNode, sourceCode: string) => ReadonlySet<string>;
|
|
386
|
+
/** Collect the normalized intent for every trail definition in a parsed file. */
|
|
387
|
+
export declare const collectTrailIntentsById: (ast: AstNode) => ReadonlyMap<string, "destroy" | "read" | "write">;
|
|
388
|
+
export interface StoreTableDefinition {
|
|
389
|
+
/** Table name declared inside store({ ... }). */
|
|
390
|
+
readonly name: string;
|
|
391
|
+
/**
|
|
392
|
+
* Local binding name of the enclosing `store(...)` declaration, if the
|
|
393
|
+
* `store(...)` call is bound to a `const`/`let`/`var` (e.g. `db` in
|
|
394
|
+
* `const db = store({ ... })`). Null for anonymous stores.
|
|
395
|
+
*/
|
|
396
|
+
readonly storeBinding: string | null;
|
|
397
|
+
/**
|
|
398
|
+
* Stable composite key for this table in the form `${storeBinding}:${name}`,
|
|
399
|
+
* falling back to the bare `name` when the store is anonymous. Use this for
|
|
400
|
+
* cross-rule / cross-file keying so two stores with the same table name
|
|
401
|
+
* never collide.
|
|
402
|
+
*/
|
|
403
|
+
readonly key: string;
|
|
404
|
+
/** Start offset of the table property declaration. */
|
|
405
|
+
readonly start: number;
|
|
406
|
+
/** Whether the authored table opts into version tracking. */
|
|
407
|
+
readonly versioned: boolean;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Build a composite key for a store table: `${storeBinding}:${tableName}`,
|
|
411
|
+
* falling back to the bare `tableName` when the enclosing store has no local
|
|
412
|
+
* binding. Centralized so rule keying stays stable.
|
|
413
|
+
*
|
|
414
|
+
* @remarks
|
|
415
|
+
* The key is intentionally file-local (no module path prefix). Cross-file
|
|
416
|
+
* aggregation in `ProjectContext` merges keys from all files, so two files
|
|
417
|
+
* with `const db = store({ notes: ... })` both produce `db:notes` — this is
|
|
418
|
+
* the desired behavior because the warden checks for *pattern completeness*
|
|
419
|
+
* across the project and matching keys signals that the same logical table
|
|
420
|
+
* is covered. If two genuinely different tables share a binding and name,
|
|
421
|
+
* that is a code-level naming collision the developer should resolve.
|
|
422
|
+
*/
|
|
423
|
+
export declare const makeStoreTableKey: (storeBinding: string | null, tableName: string) => string;
|
|
424
|
+
/**
|
|
425
|
+
* Check if a node is a `CallExpression` to the identifier `name`.
|
|
426
|
+
*
|
|
427
|
+
* e.g. `isNamedCall(node, 'store')` matches `store({...})` but not
|
|
428
|
+
* `someObj.store()` or `storeAlt()`.
|
|
429
|
+
*/
|
|
430
|
+
export declare const isNamedCall: (node: AstNode | undefined, name: string) => boolean;
|
|
431
|
+
/**
|
|
432
|
+
* Narrow a member-expression node (`a.b` or `a['b']`) to its `object` /
|
|
433
|
+
* `property` pair, returning `null` for anything else.
|
|
434
|
+
*/
|
|
435
|
+
export declare const getMemberExpression: (node: AstNode | undefined) => {
|
|
436
|
+
readonly object?: AstNode;
|
|
437
|
+
readonly property?: AstNode;
|
|
438
|
+
} | null;
|
|
439
|
+
/**
|
|
440
|
+
* Resolve a `<store>.tables.<name>` member expression to its store binding
|
|
441
|
+
* and table name.
|
|
442
|
+
*
|
|
443
|
+
* Returns `null` for anything that isn't a two-level member access ending in
|
|
444
|
+
* `.tables.<name>`. The store binding is the identifier of the object owning
|
|
445
|
+
* `.tables` — typically the local binding from `const db = store(...)`.
|
|
446
|
+
*/
|
|
447
|
+
export declare const extractStoreTableFromMember: (node: AstNode | undefined) => {
|
|
448
|
+
readonly storeBinding: string | null;
|
|
449
|
+
readonly tableName: string;
|
|
450
|
+
} | null;
|
|
451
|
+
/**
|
|
452
|
+
* Back-compat shim for rule code that only needs the table name. Prefer
|
|
453
|
+
* `extractStoreTableFromMember` so the caller can build a composite key.
|
|
454
|
+
*/
|
|
455
|
+
export declare const extractStoreTableIdFromMember: (node: AstNode | undefined) => string | null;
|
|
456
|
+
/**
|
|
457
|
+
* Collect `const foo = <store>.tables.<name>` bindings from a parsed file,
|
|
458
|
+
* keyed by the local binding name. Values are the composite table key
|
|
459
|
+
* (`${storeBinding}:${tableName}`) so callers can dedupe across stores that
|
|
460
|
+
* share a table name.
|
|
461
|
+
*/
|
|
462
|
+
export declare const collectNamedStoreTableIds: (ast: AstNode) => ReadonlyMap<string, string>;
|
|
463
|
+
/**
|
|
464
|
+
* Resolve an argument node to a composite store-table key
|
|
465
|
+
* (`${storeBinding}:${tableName}` or bare `tableName` when anonymous).
|
|
466
|
+
*
|
|
467
|
+
* Handles the two authoring patterns:
|
|
468
|
+
* - direct member access: `db.tables.notes`
|
|
469
|
+
* - identifier reference: `const notesTable = db.tables.notes; crud(notesTable, …)`
|
|
470
|
+
*/
|
|
471
|
+
export declare const deriveStoreTableId: (node: AstNode | undefined, namedStoreTableIds: ReadonlyMap<string, string>) => string | null;
|
|
472
|
+
export declare const findStoreTableDefinitions: (ast: AstNode) => readonly StoreTableDefinition[];
|
|
473
|
+
export declare const collectVersionedStoreTableIds: (ast: AstNode) => ReadonlySet<string>;
|
|
474
|
+
export declare const collectCrudTableIds: (ast: AstNode) => ReadonlySet<string>;
|
|
475
|
+
export declare const collectReconcileTableIds: (ast: AstNode) => ReadonlySet<string>;
|
|
476
|
+
export declare const collectOnTargetSignalIds: (ast: AstNode, sourceCode: string) => ReadonlySet<string>;
|
|
79
477
|
/** Check if a node is a call to `.blaze()` on some object. */
|
|
80
478
|
export declare const isBlazeCall: (node: AstNode) => boolean;
|
|
81
479
|
export {};
|
package/dist/rules/ast.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/rules/ast.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/rules/ast.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,CA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