@codyswann/lisa 7.1.4 → 8.0.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/all/copy-overwrite/scripts/check-npm-publish-landed.mjs +0 -2
- package/all/copy-overwrite/scripts/lib/push-timing.mjs +3 -6
- package/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +31 -32
- package/all/copy-overwrite/scripts/lisa-hooks/block-managed-file-edits.sh +201 -20
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +3 -2
- package/dist/cli/admit-cmd.d.ts.map +1 -1
- package/dist/cli/admit-cmd.js +16 -10
- package/dist/cli/admit-cmd.js.map +1 -1
- package/dist/cli/apply.d.ts.map +1 -1
- package/dist/cli/apply.js +2 -2
- package/dist/cli/apply.js.map +1 -1
- package/dist/cli/check-cmd.d.ts.map +1 -1
- package/dist/cli/check-cmd.js +8 -4
- package/dist/cli/check-cmd.js.map +1 -1
- package/dist/cli/doctor-coderabbit.js +2 -2
- package/dist/cli/doctor-coderabbit.js.map +1 -1
- package/dist/cli/doctor-readiness-supply-chain-python.d.ts +5 -1
- package/dist/cli/doctor-readiness-supply-chain-python.d.ts.map +1 -1
- package/dist/cli/doctor-readiness-supply-chain-python.js +44 -10
- package/dist/cli/doctor-readiness-supply-chain-python.js.map +1 -1
- package/dist/cli/doctor-readiness.js +2 -2
- package/dist/cli/doctor-readiness.js.map +1 -1
- package/dist/cli/doctor-worker-journey.js +2 -2
- package/dist/cli/doctor-worker-journey.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +7 -4
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/file-upstream-cmd.d.ts.map +1 -1
- package/dist/cli/file-upstream-cmd.js +20 -25
- package/dist/cli/file-upstream-cmd.js.map +1 -1
- package/dist/cli/gh-cli.d.ts +2 -2
- package/dist/cli/gh-cli.d.ts.map +1 -1
- package/dist/cli/gh-cli.js +13 -6
- package/dist/cli/gh-cli.js.map +1 -1
- package/dist/cli/health-cmd.d.ts.map +1 -1
- package/dist/cli/health-cmd.js +7 -19
- package/dist/cli/health-cmd.js.map +1 -1
- package/dist/cli/lisa-test-run-jest-merge.js +5 -5
- package/dist/cli/lisa-test-run-jest-merge.js.map +1 -1
- package/dist/cli/lisa-test-run.js +8 -4
- package/dist/cli/lisa-test-run.js.map +1 -1
- package/dist/cli/pr-landing.js +2 -2
- package/dist/cli/pr-landing.js.map +1 -1
- package/dist/cli/update-check.d.ts.map +1 -1
- package/dist/cli/update-check.js +7 -4
- package/dist/cli/update-check.js.map +1 -1
- package/dist/cli/update-cmd.d.ts.map +1 -1
- package/dist/cli/update-cmd.js +7 -4
- package/dist/cli/update-cmd.js.map +1 -1
- package/dist/cli/worktree-ownership.d.ts.map +1 -1
- package/dist/cli/worktree-ownership.js +3 -3
- package/dist/cli/worktree-ownership.js.map +1 -1
- package/dist/codex/hooks-catalog.d.ts +151 -0
- package/dist/codex/hooks-catalog.d.ts.map +1 -0
- package/dist/codex/hooks-catalog.js +315 -0
- package/dist/codex/hooks-catalog.js.map +1 -0
- package/dist/codex/hooks-compatibility.d.ts +14 -0
- package/dist/codex/hooks-compatibility.d.ts.map +1 -0
- package/dist/codex/hooks-compatibility.js +196 -0
- package/dist/codex/hooks-compatibility.js.map +1 -0
- package/dist/codex/hooks-installer.d.ts +2 -49
- package/dist/codex/hooks-installer.d.ts.map +1 -1
- package/dist/codex/hooks-installer.js +5 -546
- package/dist/codex/hooks-installer.js.map +1 -1
- package/dist/codex/hooks-source-links.d.ts +11 -0
- package/dist/codex/hooks-source-links.d.ts.map +1 -0
- package/dist/codex/hooks-source-links.js +74 -0
- package/dist/codex/hooks-source-links.js.map +1 -0
- package/dist/codex/scripts/block-migration-edits.sh +2 -2
- package/dist/codex/scripts/block-suppress-directives.sh +3 -3
- package/dist/codex/scripts/format-on-edit.sh +2 -2
- package/dist/codex/scripts/lint-on-edit.sh +2 -2
- package/dist/codex/scripts/lisa-edit-gate.sh +19 -15
- package/dist/codex/scripts/rubocop-on-edit.sh +2 -2
- package/dist/codex/scripts/sg-scan-on-edit.sh +2 -2
- package/dist/configs/coverage-scope.d.ts +0 -23
- package/dist/configs/coverage-scope.d.ts.map +1 -1
- package/dist/configs/coverage-scope.js +2 -3
- package/dist/configs/coverage-scope.js.map +1 -1
- package/dist/configs/eslint/base.d.ts +2 -113
- package/dist/configs/eslint/base.d.ts.map +1 -1
- package/dist/configs/eslint/base.js +2 -165
- package/dist/configs/eslint/base.js.map +1 -1
- package/dist/configs/eslint/cdk.d.ts.map +1 -1
- package/dist/configs/eslint/cdk.js +82 -66
- package/dist/configs/eslint/cdk.js.map +1 -1
- package/dist/configs/eslint/expo-overrides.d.ts +103 -0
- package/dist/configs/eslint/expo-overrides.d.ts.map +1 -0
- package/dist/configs/eslint/expo-overrides.js +187 -0
- package/dist/configs/eslint/expo-overrides.js.map +1 -0
- package/dist/configs/eslint/expo.d.ts +2 -7
- package/dist/configs/eslint/expo.d.ts.map +1 -1
- package/dist/configs/eslint/expo.js +186 -258
- package/dist/configs/eslint/expo.js.map +1 -1
- package/dist/configs/eslint/nestjs.d.ts.map +1 -1
- package/dist/configs/eslint/nestjs.js +86 -70
- package/dist/configs/eslint/nestjs.js.map +1 -1
- package/dist/configs/eslint/process-environment-bans.d.ts +41 -0
- package/dist/configs/eslint/process-environment-bans.d.ts.map +1 -0
- package/dist/configs/eslint/process-environment-bans.js +50 -0
- package/dist/configs/eslint/process-environment-bans.js.map +1 -0
- package/dist/configs/eslint/shared-rules.d.ts +130 -0
- package/dist/configs/eslint/shared-rules.d.ts.map +1 -0
- package/dist/configs/eslint/shared-rules.js +233 -0
- package/dist/configs/eslint/shared-rules.js.map +1 -0
- package/dist/configs/eslint/typescript.d.ts.map +1 -1
- package/dist/configs/eslint/typescript.js +2 -4
- package/dist/configs/eslint/typescript.js.map +1 -1
- package/dist/configs/vitest/base.d.ts +2 -2
- package/dist/configs/vitest/base.d.ts.map +1 -1
- package/dist/configs/vitest/base.js +5 -5
- package/dist/configs/vitest/base.js.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.d.ts.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.js +3 -2
- package/dist/configs/vitest/coverage-reports-directory.js.map +1 -1
- package/dist/configs/vitest/refusal-announcement.js +2 -2
- package/dist/configs/vitest/refusal-announcement.js.map +1 -1
- package/dist/core/admission-lock.js +2 -3
- package/dist/core/admission-lock.js.map +1 -1
- package/dist/core/admission-state.d.ts.map +1 -1
- package/dist/core/admission-state.js +11 -5
- package/dist/core/admission-state.js.map +1 -1
- package/dist/core/admission.d.ts.map +1 -1
- package/dist/core/admission.js +2 -2
- package/dist/core/admission.js.map +1 -1
- package/dist/core/bootstrap-environment.d.ts.map +1 -1
- package/dist/core/bootstrap-environment.js +8 -5
- package/dist/core/bootstrap-environment.js.map +1 -1
- package/dist/core/downstream-names.d.ts.map +1 -1
- package/dist/core/downstream-names.js +48 -47
- package/dist/core/downstream-names.js.map +1 -1
- package/dist/core/effectiveness-store.d.ts.map +1 -1
- package/dist/core/effectiveness-store.js +3 -5
- package/dist/core/effectiveness-store.js.map +1 -1
- package/dist/core/gate-declaration-drift.d.ts.map +1 -1
- package/dist/core/gate-declaration-drift.js +46 -27
- package/dist/core/gate-declaration-drift.js.map +1 -1
- package/dist/core/kane-cli-process.d.ts.map +1 -1
- package/dist/core/kane-cli-process.js +46 -33
- package/dist/core/kane-cli-process.js.map +1 -1
- package/dist/core/kane-cli.d.ts.map +1 -1
- package/dist/core/kane-cli.js +3 -4
- package/dist/core/kane-cli.js.map +1 -1
- package/dist/core/lisa-agent-emit-extra.d.ts +75 -0
- package/dist/core/lisa-agent-emit-extra.d.ts.map +1 -0
- package/dist/core/lisa-agent-emit-extra.js +231 -0
- package/dist/core/lisa-agent-emit-extra.js.map +1 -0
- package/dist/core/lisa-agent-emit.d.ts +79 -0
- package/dist/core/lisa-agent-emit.d.ts.map +1 -0
- package/dist/core/lisa-agent-emit.js +224 -0
- package/dist/core/lisa-agent-emit.js.map +1 -0
- package/dist/core/lisa-deletions.d.ts +116 -0
- package/dist/core/lisa-deletions.d.ts.map +1 -0
- package/dist/core/lisa-deletions.js +316 -0
- package/dist/core/lisa-deletions.js.map +1 -0
- package/dist/core/lisa-file-results.d.ts +58 -0
- package/dist/core/lisa-file-results.d.ts.map +1 -0
- package/dist/core/lisa-file-results.js +173 -0
- package/dist/core/lisa-file-results.js.map +1 -0
- package/dist/core/lisa-maintenance.d.ts +139 -0
- package/dist/core/lisa-maintenance.d.ts.map +1 -0
- package/dist/core/lisa-maintenance.js +324 -0
- package/dist/core/lisa-maintenance.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.d.ts +7 -5
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +44 -6036
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.json +6021 -0
- package/dist/core/lisa-plugin-sync.d.ts +96 -0
- package/dist/core/lisa-plugin-sync.d.ts.map +1 -0
- package/dist/core/lisa-plugin-sync.js +216 -0
- package/dist/core/lisa-plugin-sync.js.map +1 -0
- package/dist/core/lisa-plugins.d.ts +42 -0
- package/dist/core/lisa-plugins.d.ts.map +1 -0
- package/dist/core/lisa-plugins.js +155 -0
- package/dist/core/lisa-plugins.js.map +1 -0
- package/dist/core/lisa-state.d.ts +202 -0
- package/dist/core/lisa-state.d.ts.map +1 -0
- package/dist/core/lisa-state.js +205 -0
- package/dist/core/lisa-state.js.map +1 -0
- package/dist/core/lisa-summary-stats.d.ts +74 -0
- package/dist/core/lisa-summary-stats.d.ts.map +1 -0
- package/dist/core/lisa-summary-stats.js +189 -0
- package/dist/core/lisa-summary-stats.js.map +1 -0
- package/dist/core/lisa-summary.d.ts +34 -0
- package/dist/core/lisa-summary.d.ts.map +1 -0
- package/dist/core/lisa-summary.js +144 -0
- package/dist/core/lisa-summary.js.map +1 -0
- package/dist/core/lisa-templates.d.ts +98 -0
- package/dist/core/lisa-templates.d.ts.map +1 -0
- package/dist/core/lisa-templates.js +251 -0
- package/dist/core/lisa-templates.js.map +1 -0
- package/dist/core/lisa.d.ts +14 -903
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +30 -2275
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/plugin-command.d.ts.map +1 -1
- package/dist/core/plugin-command.js +117 -61
- package/dist/core/plugin-command.js.map +1 -1
- package/dist/core/template-ownership.d.ts.map +1 -1
- package/dist/core/template-ownership.js +0 -1
- package/dist/core/template-ownership.js.map +1 -1
- package/dist/core/upstream-attribution-body.d.ts +4 -11
- package/dist/core/upstream-attribution-body.d.ts.map +1 -1
- package/dist/core/upstream-attribution-body.js +61 -373
- package/dist/core/upstream-attribution-body.js.map +1 -1
- package/dist/core/upstream-attribution-fields.d.ts +40 -0
- package/dist/core/upstream-attribution-fields.d.ts.map +1 -0
- package/dist/core/upstream-attribution-fields.js +167 -0
- package/dist/core/upstream-attribution-fields.js.map +1 -0
- package/dist/core/upstream-attribution-files.d.ts +15 -0
- package/dist/core/upstream-attribution-files.d.ts.map +1 -0
- package/dist/core/upstream-attribution-files.js +156 -0
- package/dist/core/upstream-attribution-files.js.map +1 -0
- package/dist/core/upstream-attribution-guards.d.ts +80 -0
- package/dist/core/upstream-attribution-guards.d.ts.map +1 -0
- package/dist/core/upstream-attribution-guards.js +284 -0
- package/dist/core/upstream-attribution-guards.js.map +1 -0
- package/dist/core/upstream-evidence-manifest.d.ts +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +67 -30420
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.json +30518 -0
- package/dist/health/agentic-contract.d.ts +94 -0
- package/dist/health/agentic-contract.d.ts.map +1 -0
- package/dist/health/agentic-contract.js +2 -0
- package/dist/health/agentic-contract.js.map +1 -0
- package/dist/health/agentic-evidence.d.ts +16 -0
- package/dist/health/agentic-evidence.d.ts.map +1 -0
- package/dist/health/agentic-evidence.js +213 -0
- package/dist/health/agentic-evidence.js.map +1 -0
- package/dist/health/agentic.d.ts +11 -74
- package/dist/health/agentic.d.ts.map +1 -1
- package/dist/health/agentic.js +42 -216
- package/dist/health/agentic.js.map +1 -1
- package/dist/health/deadline.d.ts +4 -1
- package/dist/health/deadline.d.ts.map +1 -1
- package/dist/health/deadline.js +4 -3
- package/dist/health/deadline.js.map +1 -1
- package/dist/health/deterministic-inputs.d.ts.map +1 -1
- package/dist/health/deterministic-inputs.js +3 -11
- package/dist/health/deterministic-inputs.js.map +1 -1
- package/dist/health/deterministic-probes.d.ts +52 -0
- package/dist/health/deterministic-probes.d.ts.map +1 -0
- package/dist/health/deterministic-probes.js +142 -0
- package/dist/health/deterministic-probes.js.map +1 -0
- package/dist/health/deterministic.d.ts +2 -25
- package/dist/health/deterministic.d.ts.map +1 -1
- package/dist/health/deterministic.js +14 -106
- package/dist/health/deterministic.js.map +1 -1
- package/dist/health/finding-utils.d.ts +4 -3
- package/dist/health/finding-utils.d.ts.map +1 -1
- package/dist/health/finding-utils.js +4 -4
- package/dist/health/finding-utils.js.map +1 -1
- package/dist/health/governance-probes.d.ts +29 -24
- package/dist/health/governance-probes.d.ts.map +1 -1
- package/dist/health/governance-probes.js +29 -25
- package/dist/health/governance-probes.js.map +1 -1
- package/dist/health/hook-inspection.d.ts +4 -3
- package/dist/health/hook-inspection.d.ts.map +1 -1
- package/dist/health/hook-inspection.js +17 -11
- package/dist/health/hook-inspection.js.map +1 -1
- package/dist/health/plugin-inspection.d.ts +6 -4
- package/dist/health/plugin-inspection.d.ts.map +1 -1
- package/dist/health/plugin-inspection.js +10 -9
- package/dist/health/plugin-inspection.js.map +1 -1
- package/dist/health/prepare.js +24 -8
- package/dist/health/prepare.js.map +1 -1
- package/dist/health/project-probes.d.ts +14 -7
- package/dist/health/project-probes.d.ts.map +1 -1
- package/dist/health/project-probes.js +14 -9
- package/dist/health/project-probes.js.map +1 -1
- package/dist/health/ruleset-compare.d.ts +30 -0
- package/dist/health/ruleset-compare.d.ts.map +1 -0
- package/dist/health/ruleset-compare.js +143 -0
- package/dist/health/ruleset-compare.js.map +1 -0
- package/dist/health/ruleset-config-checks.d.ts +66 -0
- package/dist/health/ruleset-config-checks.d.ts.map +1 -0
- package/dist/health/ruleset-config-checks.js +190 -0
- package/dist/health/ruleset-config-checks.js.map +1 -0
- package/dist/health/ruleset-expected.d.ts +39 -0
- package/dist/health/ruleset-expected.d.ts.map +1 -0
- package/dist/health/ruleset-expected.js +181 -0
- package/dist/health/ruleset-expected.js.map +1 -0
- package/dist/health/ruleset-gh.d.ts +85 -0
- package/dist/health/ruleset-gh.d.ts.map +1 -0
- package/dist/health/ruleset-gh.js +177 -0
- package/dist/health/ruleset-gh.js.map +1 -0
- package/dist/health/ruleset-inspection.d.ts +13 -117
- package/dist/health/ruleset-inspection.d.ts.map +1 -1
- package/dist/health/ruleset-inspection.js +8 -738
- package/dist/health/ruleset-inspection.js.map +1 -1
- package/dist/health/ruleset-normalize.d.ts +32 -0
- package/dist/health/ruleset-normalize.d.ts.map +1 -0
- package/dist/health/ruleset-normalize.js +160 -0
- package/dist/health/ruleset-normalize.js.map +1 -0
- package/dist/health/template-compose.d.ts +9 -0
- package/dist/health/template-compose.d.ts.map +1 -0
- package/dist/health/template-compose.js +105 -0
- package/dist/health/template-compose.js.map +1 -0
- package/dist/health/template-inspection.d.ts +5 -52
- package/dist/health/template-inspection.d.ts.map +1 -1
- package/dist/health/template-inspection.js +13 -435
- package/dist/health/template-inspection.js.map +1 -1
- package/dist/health/template-plan.d.ts +33 -0
- package/dist/health/template-plan.d.ts.map +1 -0
- package/dist/health/template-plan.js +154 -0
- package/dist/health/template-plan.js.map +1 -0
- package/dist/health/template-shape.d.ts +19 -0
- package/dist/health/template-shape.d.ts.map +1 -0
- package/dist/health/template-shape.js +122 -0
- package/dist/health/template-shape.js.map +1 -0
- package/dist/health/workflow-excerpt.d.ts +15 -0
- package/dist/health/workflow-excerpt.d.ts.map +1 -0
- package/dist/health/workflow-excerpt.js +88 -0
- package/dist/health/workflow-excerpt.js.map +1 -0
- package/dist/health/workflow-inputs-inspection.d.ts +16 -0
- package/dist/health/workflow-inputs-inspection.d.ts.map +1 -0
- package/dist/health/workflow-inputs-inspection.js +116 -0
- package/dist/health/workflow-inputs-inspection.js.map +1 -0
- package/dist/opencode/plugin-templates/block-managed-file-edits.sh +201 -20
- package/dist/standards/capture.d.ts.map +1 -1
- package/dist/standards/capture.js +73 -25
- package/dist/standards/capture.js.map +1 -1
- package/dist/standards/contract.d.ts.map +1 -1
- package/dist/standards/contract.js +26 -9
- package/dist/standards/contract.js.map +1 -1
- package/dist/standards/git-state.d.ts.map +1 -1
- package/dist/standards/git-state.js +2 -2
- package/dist/standards/git-state.js.map +1 -1
- package/dist/standards/registry-checks.d.ts +34 -0
- package/dist/standards/registry-checks.d.ts.map +1 -0
- package/dist/standards/registry-checks.js +137 -0
- package/dist/standards/registry-checks.js.map +1 -0
- package/dist/standards/registry.d.ts +3 -13
- package/dist/standards/registry.d.ts.map +1 -1
- package/dist/standards/registry.js +105 -194
- package/dist/standards/registry.js.map +1 -1
- package/dist/standards/storage.js +8 -10
- package/dist/standards/storage.js.map +1 -1
- package/dist/strategies/deduplicate-arrays.d.ts +18 -0
- package/dist/strategies/deduplicate-arrays.d.ts.map +1 -0
- package/dist/strategies/deduplicate-arrays.js +25 -0
- package/dist/strategies/deduplicate-arrays.js.map +1 -0
- package/dist/strategies/package-lisa-detect.d.ts +10 -0
- package/dist/strategies/package-lisa-detect.d.ts.map +1 -0
- package/dist/strategies/package-lisa-detect.js +178 -0
- package/dist/strategies/package-lisa-detect.js.map +1 -0
- package/dist/strategies/package-lisa-direct-floors.d.ts +16 -0
- package/dist/strategies/package-lisa-direct-floors.d.ts.map +1 -0
- package/dist/strategies/package-lisa-direct-floors.js +37 -0
- package/dist/strategies/package-lisa-direct-floors.js.map +1 -0
- package/dist/strategies/package-lisa-host-pins.d.ts +43 -0
- package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -0
- package/dist/strategies/package-lisa-host-pins.js +254 -0
- package/dist/strategies/package-lisa-host-pins.js.map +1 -0
- package/dist/strategies/package-lisa-manifest-guards.d.ts +59 -0
- package/dist/strategies/package-lisa-manifest-guards.d.ts.map +1 -0
- package/dist/strategies/package-lisa-manifest-guards.js +234 -0
- package/dist/strategies/package-lisa-manifest-guards.js.map +1 -0
- package/dist/strategies/package-lisa-pin-alignment.d.ts +34 -0
- package/dist/strategies/package-lisa-pin-alignment.d.ts.map +1 -0
- package/dist/strategies/package-lisa-pin-alignment.js +106 -0
- package/dist/strategies/package-lisa-pin-alignment.js.map +1 -0
- package/dist/strategies/package-lisa-script-notes.d.ts +19 -0
- package/dist/strategies/package-lisa-script-notes.d.ts.map +1 -0
- package/dist/strategies/package-lisa-script-notes.js +145 -0
- package/dist/strategies/package-lisa-script-notes.js.map +1 -0
- package/dist/strategies/package-lisa-template-apply.d.ts +53 -0
- package/dist/strategies/package-lisa-template-apply.d.ts.map +1 -0
- package/dist/strategies/package-lisa-template-apply.js +216 -0
- package/dist/strategies/package-lisa-template-apply.js.map +1 -0
- package/dist/strategies/package-lisa-template-merge.d.ts +42 -0
- package/dist/strategies/package-lisa-template-merge.d.ts.map +1 -0
- package/dist/strategies/package-lisa-template-merge.js +202 -0
- package/dist/strategies/package-lisa-template-merge.js.map +1 -0
- package/dist/strategies/package-lisa-types.d.ts +5 -0
- package/dist/strategies/package-lisa-types.d.ts.map +1 -1
- package/dist/strategies/package-lisa.d.ts +1 -195
- package/dist/strategies/package-lisa.d.ts.map +1 -1
- package/dist/strategies/package-lisa.js +27 -1333
- package/dist/strategies/package-lisa.js.map +1 -1
- package/dist/strategies/tagged-merge-sections.d.ts +68 -0
- package/dist/strategies/tagged-merge-sections.d.ts.map +1 -0
- package/dist/strategies/tagged-merge-sections.js +113 -0
- package/dist/strategies/tagged-merge-sections.js.map +1 -0
- package/dist/strategies/tagged-merge.d.ts +1 -90
- package/dist/strategies/tagged-merge.d.ts.map +1 -1
- package/dist/strategies/tagged-merge.js +19 -190
- package/dist/strategies/tagged-merge.js.map +1 -1
- package/dist/utils/bounded-stream.d.ts +30 -0
- package/dist/utils/bounded-stream.d.ts.map +1 -0
- package/dist/utils/bounded-stream.js +63 -0
- package/dist/utils/bounded-stream.js.map +1 -0
- package/dist/utils/fibonacci.d.ts +3 -3
- package/dist/utils/fibonacci.d.ts.map +1 -1
- package/dist/utils/fibonacci.js +48 -10
- package/dist/utils/fibonacci.js.map +1 -1
- package/dist/utils/memo.d.ts +25 -0
- package/dist/utils/memo.d.ts.map +1 -0
- package/dist/utils/memo.js +32 -0
- package/dist/utils/memo.js.map +1 -0
- package/dist/utils/postinstall-trampoline.d.ts.map +1 -1
- package/dist/utils/postinstall-trampoline.js +3 -20
- package/dist/utils/postinstall-trampoline.js.map +1 -1
- package/dist/utils/process-environment.d.ts +42 -0
- package/dist/utils/process-environment.d.ts.map +1 -0
- package/dist/utils/process-environment.js +52 -0
- package/dist/utils/process-environment.js.map +1 -0
- package/dist/utils/resolve-executable.d.ts +89 -0
- package/dist/utils/resolve-executable.d.ts.map +1 -0
- package/dist/utils/resolve-executable.js +224 -0
- package/dist/utils/resolve-executable.js.map +1 -0
- package/dist/utils/shell-command-line.d.ts +9 -0
- package/dist/utils/shell-command-line.d.ts.map +1 -0
- package/dist/utils/shell-command-line.js +43 -0
- package/dist/utils/shell-command-line.js.map +1 -0
- package/dist/utils/usage-accounting-totals.d.ts +19 -0
- package/dist/utils/usage-accounting-totals.d.ts.map +1 -0
- package/dist/utils/usage-accounting-totals.js +145 -0
- package/dist/utils/usage-accounting-totals.js.map +1 -0
- package/dist/utils/usage-accounting.d.ts +2 -14
- package/dist/utils/usage-accounting.d.ts.map +1 -1
- package/dist/utils/usage-accounting.js +2 -169
- package/dist/utils/usage-accounting.js.map +1 -1
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-react-violations.test.js +213 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-valid.test.js +251 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-violations.test.js +222 -0
- package/eslint-plugin-code-organization/__tests__/statement-order-tester.js +42 -0
- package/eslint-plugin-code-organization/rules/enforce-statement-order.js +6 -8
- package/expo/copy-overwrite/jest.setup.ts +11 -10
- package/expo/create-only/scripts/zap-baseline.sh +6 -18
- package/harper-fabric/create-only/scripts/zap-baseline.sh +7 -9
- package/nestjs/create-only/scripts/zap-baseline.sh +6 -7
- package/package.json +4 -4
- package/phaser/copy-overwrite/.husky/pre-push.verify +2 -0
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/lisa/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa/hooks/ticket-sync-reminder.sh +2 -17
- package/plugins/lisa/hooks/track-plan-sessions.sh +7 -131
- package/plugins/lisa/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-agy/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-agy/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-agy/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-copilot/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-copilot/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-copilot/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-copilot/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-cursor/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-cursor/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-cursor/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-cursor/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-devin/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-devin/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-devin/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-devin/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo/.codex-plugin/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-agy/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-agy/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-copilot/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-cursor/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-devin/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-copilot/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-cursor/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-devin/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs/.codex-plugin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-agy/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-copilot/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-copilot/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-cursor/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-cursor/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-devin/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-devin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-copilot/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-copilot/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-cursor/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-cursor/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-devin/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-devin/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-copilot/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-cursor/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-devin/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/src/base/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/src/base/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/src/base/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/src/base/hooks/ticket-sync-reminder.sh +2 -17
- package/plugins/src/base/hooks/track-plan-sessions.sh +7 -131
- package/plugins/src/base/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/src/base/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/src/expo/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/src/expo/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/src/harper-fabric/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/src/harper-fabric/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/src/nestjs/hooks/block-migration-edits.sh +1 -1
- package/plugins/src/nestjs/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/nestjs/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/src/nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/src/rails/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/rails/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/src/rails/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/src/typescript/hooks/block-suppress-directives.sh +2 -2
- package/plugins/src/typescript/hooks/format-on-edit.sh +2 -2
- package/plugins/src/typescript/hooks/lint-on-edit.sh +2 -2
- package/plugins/src/typescript/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/typescript/hooks/sg-scan-on-edit.sh +3 -3
- package/scripts/build-plugins.sh +1 -1
- package/scripts/check-derived-artifacts.mjs +2 -2
- package/scripts/check-generated-artifact-merge-coverage.mjs +45 -4
- package/scripts/check-orphan-test-processes.mjs +0 -1
- package/scripts/check-self-dependency-pin.mjs +0 -2
- package/scripts/claude-remote-setup.sh +12 -7
- package/scripts/cleanup-amplify-branches.sh +0 -1
- package/scripts/generate-export-surface.mjs +131 -61
- package/scripts/generate-lisa-owned-hash-ledger.mjs +87 -102
- package/scripts/generate-upstream-evidence-manifest.mjs +56 -49
- package/scripts/github-status-check.sh +5 -25
- package/scripts/install-claude-plugins.sh +10 -8
- package/scripts/lib/merge-generated-json.mjs +274 -0
- package/scripts/lib/upstream-manifest-staleness.mjs +38 -34
- package/scripts/lib/upstream-public-commits.mjs +35 -18
- package/scripts/lisa-commit-and-pr-local.sh +1 -1
- package/scripts/lisa-enforcement-fallback.sh +31 -32
- package/scripts/lisa-github-environments.sh +5 -1
- package/scripts/lisa-github-repo-settings.sh +5 -1
- package/scripts/lisa-github-repo-setup.sh +1 -2
- package/scripts/lisa-github-rulesets.sh +8 -8
- package/scripts/lisa-remote-env/session-start.sh +18 -5
- package/scripts/lisa-rollback-release.mjs +0 -2
- package/scripts/lisa-update-local.sh +1 -1
- package/scripts/merge-generated-artifact.mjs +18 -6
- package/scripts/raise-self-dependency-pin.mjs +0 -2
- package/scripts/run-artifact-checks.mjs +1 -1
- package/scripts/verify-packed-learnings-contract.mjs +36 -3
- package/scripts/verify-self-pin-raise.mjs +0 -2
- package/typescript/copy-contents/.husky/commit-msg +8 -2
- package/typescript/copy-contents/.husky/post-checkout +2 -0
- package/typescript/copy-contents/.husky/post-merge +2 -0
- package/typescript/copy-contents/.husky/pre-commit +10 -3
- package/typescript/copy-contents/.husky/pre-push +29 -16
- package/typescript/copy-contents/.husky/prepare-commit-msg +2 -0
- package/typescript/create-only/.husky/pre-push.local +2 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +0 -643
|
@@ -59,7 +59,7 @@ cd "$CLAUDE_PROJECT_DIR" || exit 0
|
|
|
59
59
|
# would silently stop proving the others.
|
|
60
60
|
# ---------------------------------------------------------------------------
|
|
61
61
|
if [ -f "$LISA_HOOK_DIR/lisa-edit-gate.sh" ]; then
|
|
62
|
-
# shellcheck source
|
|
62
|
+
# shellcheck source=lisa-edit-gate.sh
|
|
63
63
|
. "$LISA_HOOK_DIR/lisa-edit-gate.sh"
|
|
64
64
|
if LISA_GATE_COMMANDS="$(lisa_edit_gate_tasks post-tool format-conformance)"; then
|
|
65
65
|
lisa_edit_gate_run "$FILE_PATH" "$LISA_GATE_COMMANDS"
|
|
@@ -91,7 +91,7 @@ echo "🎨 Running Prettier on: $FILE_PATH"
|
|
|
91
91
|
$PRETTIER_CMD --write "$FILE_PATH" 2>&1 | grep -v "run v" | grep -v "Done in"
|
|
92
92
|
|
|
93
93
|
# Check the exit status
|
|
94
|
-
if [ ${PIPESTATUS[0]} -eq 0 ]; then
|
|
94
|
+
if [ "${PIPESTATUS[0]}" -eq 0 ]; then
|
|
95
95
|
echo "✓ Successfully formatted: $(basename "$FILE_PATH")"
|
|
96
96
|
else
|
|
97
97
|
echo "⚠ Prettier formatting failed for: $FILE_PATH" >&2
|
|
@@ -39,7 +39,7 @@ if [ -z "${CLAUDE_PROJECT_DIR:-}" ]; then
|
|
|
39
39
|
fi
|
|
40
40
|
|
|
41
41
|
# Check if file is in a source directory
|
|
42
|
-
RELATIVE_PATH="${FILE_PATH
|
|
42
|
+
RELATIVE_PATH="${FILE_PATH#"$CLAUDE_PROJECT_DIR"/}"
|
|
43
43
|
case "$RELATIVE_PATH" in
|
|
44
44
|
src/*|apps/*|libs/*|test/*|tests/*|features/*|components/*|hooks/*|screens/*|app/*|constants/*|utils/*|providers/*|stores/*) ;;
|
|
45
45
|
*) exit 0 ;;
|
|
@@ -61,7 +61,7 @@ cd "$CLAUDE_PROJECT_DIR" || exit 0
|
|
|
61
61
|
# would silently stop proving the others.
|
|
62
62
|
# ---------------------------------------------------------------------------
|
|
63
63
|
if [ -f "$LISA_HOOK_DIR/lisa-edit-gate.sh" ]; then
|
|
64
|
-
# shellcheck source
|
|
64
|
+
# shellcheck source=lisa-edit-gate.sh
|
|
65
65
|
. "$LISA_HOOK_DIR/lisa-edit-gate.sh"
|
|
66
66
|
if LISA_GATE_COMMANDS="$(lisa_edit_gate_tasks post-tool code-style)"; then
|
|
67
67
|
lisa_edit_gate_run "$FILE_PATH" "$LISA_GATE_COMMANDS"
|
|
@@ -93,9 +93,9 @@ lisa_edit_gate_tasks() {
|
|
|
93
93
|
# not.
|
|
94
94
|
LISA_GATE_IDS="$*"
|
|
95
95
|
export LISA_GATE_IDS
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
# The filter is read from a quoted heredoc so its JavaScript reaches node
|
|
97
|
+
# byte for byte: no shell expansion applies to it.
|
|
98
|
+
_lisa_filter="$(cat <<'LISA_EDIT_GATE_FILTER'
|
|
99
99
|
let raw = "";
|
|
100
100
|
process.stdin.on("data", chunk => { raw += chunk }).on("end", () => {
|
|
101
101
|
let resolved;
|
|
@@ -113,18 +113,22 @@ process.stdin.on("data", chunk => { raw += chunk }).on("end", () => {
|
|
|
113
113
|
if (commands.length === 0) process.exit(1);
|
|
114
114
|
process.stdout.write(commands.join("\n"));
|
|
115
115
|
});
|
|
116
|
-
|
|
116
|
+
LISA_EDIT_GATE_FILTER
|
|
117
|
+
)"
|
|
118
|
+
_lisa_out="$(
|
|
119
|
+
node "$_lisa_registry" list \
|
|
120
|
+
--moment="$_lisa_moment" --json 2>/dev/null | node -e "$_lisa_filter"
|
|
117
121
|
)" || {
|
|
118
|
-
unset _lisa_moment _lisa_registry _lisa_out
|
|
122
|
+
unset _lisa_moment _lisa_registry _lisa_filter _lisa_out
|
|
119
123
|
return 1
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
[ -n "$_lisa_out" ] || {
|
|
123
|
-
unset _lisa_moment _lisa_registry _lisa_out
|
|
127
|
+
unset _lisa_moment _lisa_registry _lisa_filter _lisa_out
|
|
124
128
|
return 1
|
|
125
129
|
}
|
|
126
130
|
printf '%s' "$_lisa_out"
|
|
127
|
-
unset _lisa_moment _lisa_registry _lisa_out
|
|
131
|
+
unset _lisa_moment _lisa_registry _lisa_filter _lisa_out
|
|
128
132
|
return 0
|
|
129
133
|
}
|
|
130
134
|
|
|
@@ -138,15 +142,15 @@ lisa_edit_gate_run() {
|
|
|
138
142
|
shift
|
|
139
143
|
LISA_EDITED_FILE="$_lisa_file"
|
|
140
144
|
export LISA_EDITED_FILE
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
#
|
|
146
|
-
|
|
147
|
-
$
|
|
145
|
+
# Each line is split into words by `read -a`, never by an unquoted
|
|
146
|
+
# expansion: the resolver validated every word as plain, and reading them
|
|
147
|
+
# into an array keeps them from being glob-expanded as well.
|
|
148
|
+
printf '%s\n' "$*" | while read -r -a _lisa_words; do
|
|
149
|
+
[ "${#_lisa_words[@]}" -gt 0 ] || continue
|
|
150
|
+
echo "Running declared gate task: ${_lisa_words[*]}"
|
|
151
|
+
"${_lisa_words[@]}" || exit 2
|
|
148
152
|
done
|
|
149
153
|
_lisa_status=$?
|
|
150
|
-
unset _lisa_file
|
|
154
|
+
unset _lisa_file _lisa_words
|
|
151
155
|
return $_lisa_status
|
|
152
156
|
}
|
|
@@ -29,7 +29,7 @@ if [ -z "${CLAUDE_PROJECT_DIR:-}" ]; then
|
|
|
29
29
|
fi
|
|
30
30
|
|
|
31
31
|
# Check if file is in a source directory
|
|
32
|
-
RELATIVE_PATH="${FILE_PATH
|
|
32
|
+
RELATIVE_PATH="${FILE_PATH#"$CLAUDE_PROJECT_DIR"/}"
|
|
33
33
|
case "$RELATIVE_PATH" in
|
|
34
34
|
src/*|apps/*|libs/*|test/*|tests/*|features/*|components/*|hooks/*|screens/*|app/*|constants/*|utils/*|providers/*|stores/*) ;;
|
|
35
35
|
*) exit 0 ;;
|
|
@@ -51,7 +51,7 @@ cd "$CLAUDE_PROJECT_DIR" || exit 0
|
|
|
51
51
|
# would silently stop proving the others.
|
|
52
52
|
# ---------------------------------------------------------------------------
|
|
53
53
|
if [ -f "$LISA_HOOK_DIR/lisa-edit-gate.sh" ]; then
|
|
54
|
-
# shellcheck source
|
|
54
|
+
# shellcheck source=lisa-edit-gate.sh
|
|
55
55
|
. "$LISA_HOOK_DIR/lisa-edit-gate.sh"
|
|
56
56
|
if LISA_GATE_COMMANDS="$(lisa_edit_gate_tasks post-tool structural-rules)"; then
|
|
57
57
|
lisa_edit_gate_run "$FILE_PATH" "$LISA_GATE_COMMANDS"
|
|
@@ -66,7 +66,7 @@ if [ ! -f "sgconfig.yml" ]; then
|
|
|
66
66
|
fi
|
|
67
67
|
|
|
68
68
|
# Verify rules are defined
|
|
69
|
-
RULE_COUNT=$(find ast-grep/rules -name "*.yml" -o -name "*.yaml" 2>/dev/null | grep -
|
|
69
|
+
RULE_COUNT=$(find ast-grep/rules -name "*.yml" -o -name "*.yaml" 2>/dev/null | grep -vc ".gitkeep")
|
|
70
70
|
if [ "$RULE_COUNT" -eq 0 ]; then
|
|
71
71
|
exit 0
|
|
72
72
|
fi
|
package/scripts/build-plugins.sh
CHANGED
|
@@ -82,7 +82,7 @@ write_materialized_manifest() {
|
|
|
82
82
|
process.stdin.on("data", chunk => { raw += chunk; });
|
|
83
83
|
process.stdin.on("end", () => {
|
|
84
84
|
const paths = [...new Set(raw.split("\n").filter(Boolean))].sort();
|
|
85
|
-
fs.writeFileSync(process.argv[1],
|
|
85
|
+
fs.writeFileSync(process.argv[1], JSON.stringify(paths, null, 2) + "\n");
|
|
86
86
|
});
|
|
87
87
|
' "$MATERIALIZED_MANIFEST"
|
|
88
88
|
}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Lisa has four artifact families derived from tracked sources:
|
|
7
7
|
*
|
|
8
|
-
* - `src/core/upstream-evidence-manifest.
|
|
8
|
+
* - `src/core/upstream-evidence-manifest.json`, regenerated by
|
|
9
9
|
* `bun run build:upstream-evidence-manifest`
|
|
10
|
-
* - `src/core/lisa-owned-hash-ledger.
|
|
10
|
+
* - `src/core/lisa-owned-hash-ledger.json`, regenerated by
|
|
11
11
|
* `bun run build:lisa-owned-hash-ledger`
|
|
12
12
|
* - `src/core/nightly-e2e-guard-behavior-certificate.ts`, regenerated by
|
|
13
13
|
* `bun run build:nightly-guard-certificate`
|
|
@@ -31,6 +31,12 @@
|
|
|
31
31
|
* would make the driver run, fail to parse, exit 1 and leave the conflict
|
|
32
32
|
* exactly where it was — a control announcing coverage it does not have.
|
|
33
33
|
*
|
|
34
|
+
* Since CodySwannGT/lisa#4929 the manifest and the ledger are JSON, and a JSON
|
|
35
|
+
* artifact is judged by the driver's JSON parser instead: a top-level object of
|
|
36
|
+
* RECORDS whose entries are scalars or lists of scalars. The same boundary holds
|
|
37
|
+
* there — `two-channel-couplings.json` nests deeper and `export-surface.json`
|
|
38
|
+
* carries top-level counts, so both are still refused.
|
|
39
|
+
*
|
|
34
40
|
* So the unregistered set is a **capability boundary**, not an oversight, and
|
|
35
41
|
* this guard's job is to hold that distinction rather than to erase it.
|
|
36
42
|
*
|
|
@@ -58,6 +64,11 @@ import path from "node:path";
|
|
|
58
64
|
import process from "node:process";
|
|
59
65
|
|
|
60
66
|
import { invokedAsScript } from "./lib/invoked-as-script.mjs";
|
|
67
|
+
import {
|
|
68
|
+
isJsonArtifact,
|
|
69
|
+
parseJsonArtifact,
|
|
70
|
+
renderJsonArtifact,
|
|
71
|
+
} from "./lib/merge-generated-json.mjs";
|
|
61
72
|
import { parseArtifact, renderArtifact } from "./merge-generated-artifact.mjs";
|
|
62
73
|
|
|
63
74
|
/** The driver name `.gitattributes` maps an artifact to. */
|
|
@@ -81,13 +92,13 @@ export const DISPOSITION = Object.freeze({
|
|
|
81
92
|
*/
|
|
82
93
|
export const GENERATED_ARTIFACTS = Object.freeze([
|
|
83
94
|
Object.freeze({
|
|
84
|
-
path: "src/core/upstream-evidence-manifest.
|
|
95
|
+
path: "src/core/upstream-evidence-manifest.json",
|
|
85
96
|
check: "check:upstream-evidence-manifest",
|
|
86
97
|
disposition: DISPOSITION.DRIVER,
|
|
87
98
|
reason: "",
|
|
88
99
|
}),
|
|
89
100
|
Object.freeze({
|
|
90
|
-
path: "src/core/lisa-owned-hash-ledger.
|
|
101
|
+
path: "src/core/lisa-owned-hash-ledger.json",
|
|
91
102
|
check: "check:lisa-owned-hash-ledger",
|
|
92
103
|
disposition: DISPOSITION.DRIVER,
|
|
93
104
|
reason: "",
|
|
@@ -97,7 +108,7 @@ export const GENERATED_ARTIFACTS = Object.freeze([
|
|
|
97
108
|
check: "check:two-channel-couplings",
|
|
98
109
|
disposition: DISPOSITION.UNSUPPORTED,
|
|
99
110
|
reason:
|
|
100
|
-
"nested: `ratified` / `inspected` / `counts` sub-objects, which the driver's
|
|
111
|
+
"nested: `ratified` / `inspected` / `counts` sub-objects and a top-level `couplings` list, which the driver's record-of-entries JSON parser rejects",
|
|
101
112
|
}),
|
|
102
113
|
Object.freeze({
|
|
103
114
|
path: "src/core/nightly-e2e-guard-behavior-certificate.ts",
|
|
@@ -111,7 +122,7 @@ export const GENERATED_ARTIFACTS = Object.freeze([
|
|
|
111
122
|
check: "check:export-surface",
|
|
112
123
|
disposition: DISPOSITION.UNSUPPORTED,
|
|
113
124
|
reason:
|
|
114
|
-
"
|
|
125
|
+
"top-level scalars (`$generatedBy`, and the `$modules` / `$names` counts that change on every surface edit) beside the `surface` record, which the driver's record-of-entries JSON parser rejects",
|
|
115
126
|
}),
|
|
116
127
|
Object.freeze({
|
|
117
128
|
path: "docs/agentic-readiness-questionnaire.md",
|
|
@@ -178,6 +189,7 @@ export function mapsToDriver(attributes, artifactPath) {
|
|
|
178
189
|
* @returns {{ok: boolean, reason: string, entries: number}} Verdict, why not, and the entry count.
|
|
179
190
|
*/
|
|
180
191
|
export function driverCanStructure(text) {
|
|
192
|
+
if (isJsonArtifact(text)) return jsonDriverCanStructure(text);
|
|
181
193
|
const parsed = parseArtifact(text);
|
|
182
194
|
if (!parsed.ok) return { ok: false, reason: parsed.reason, entries: 0 };
|
|
183
195
|
if (renderArtifact(parsed.chunks) !== text)
|
|
@@ -200,6 +212,35 @@ export function driverCanStructure(text) {
|
|
|
200
212
|
};
|
|
201
213
|
}
|
|
202
214
|
|
|
215
|
+
/**
|
|
216
|
+
* {@link driverCanStructure} for a JSON artifact, which the driver merges on a
|
|
217
|
+
* parsed model: it parses into records of entries, re-renders to the same
|
|
218
|
+
* bytes, and yields at least one entry.
|
|
219
|
+
* @param {string} text - The artifact's contents
|
|
220
|
+
* @returns {{ok: boolean, reason: string, entries: number}} Verdict, why not, and the entry count.
|
|
221
|
+
*/
|
|
222
|
+
function jsonDriverCanStructure(text) {
|
|
223
|
+
const parsed = parseJsonArtifact(text);
|
|
224
|
+
if (!parsed.ok) return { ok: false, reason: parsed.reason, entries: 0 };
|
|
225
|
+
if (renderJsonArtifact(parsed.records) !== text)
|
|
226
|
+
return {
|
|
227
|
+
ok: false,
|
|
228
|
+
reason: "parsed, but re-emitting it changed the bytes",
|
|
229
|
+
entries: 0,
|
|
230
|
+
};
|
|
231
|
+
const entries = [...parsed.records.values()].reduce(
|
|
232
|
+
(total, record) => total + record.size,
|
|
233
|
+
0
|
|
234
|
+
);
|
|
235
|
+
return entries > 0
|
|
236
|
+
? { ok: true, reason: "", entries }
|
|
237
|
+
: {
|
|
238
|
+
ok: false,
|
|
239
|
+
reason: "parsed and round-tripped, but structured ZERO entries",
|
|
240
|
+
entries: 0,
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
|
|
203
244
|
/**
|
|
204
245
|
* Checks wired into `check:artifacts` that no artifact declares.
|
|
205
246
|
* @param {string} packageJson - Contents of `package.json`
|
|
@@ -167,7 +167,6 @@ export function selectOrphans(rows, minAgeSeconds) {
|
|
|
167
167
|
* @returns {string} Raw `ps` output.
|
|
168
168
|
*/
|
|
169
169
|
function readProcessTable() {
|
|
170
|
-
// eslint-disable-next-line sonarjs/no-os-command-from-path -- fixed executable and argv
|
|
171
170
|
return boundedExecFileSync("ps", ["-eo", "pid,ppid,etime,command"], {
|
|
172
171
|
encoding: "utf8",
|
|
173
172
|
maxBuffer: 32 * 1024 * 1024,
|
|
@@ -554,7 +554,6 @@ async function mainNewestInstallable(registry, injected) {
|
|
|
554
554
|
return 0;
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
/* c8 ignore start -- CLI wiring, exercised through main() in tests */
|
|
558
557
|
if (invokedAsScript(import.meta.url)) {
|
|
559
558
|
main(process.argv.slice(2))
|
|
560
559
|
.then(code => {
|
|
@@ -565,4 +564,3 @@ if (invokedAsScript(import.meta.url)) {
|
|
|
565
564
|
process.exitCode = 1;
|
|
566
565
|
});
|
|
567
566
|
}
|
|
568
|
-
/* c8 ignore stop */
|
|
@@ -63,12 +63,13 @@ if ! need jq; then
|
|
|
63
63
|
fi
|
|
64
64
|
if ! need gh; then
|
|
65
65
|
echo "Installing gh..."
|
|
66
|
-
apt_get update -y && apt_get install -y gh
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
if ! { apt_get update -y && apt_get install -y gh; }; then
|
|
67
|
+
type -p curl >/dev/null && curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
|
|
68
|
+
| sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
|
|
69
|
+
&& echo "deb [signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
|
|
70
|
+
| sudo tee /etc/apt/sources.list.d/github-cli.list >/dev/null \
|
|
71
|
+
&& apt_get update -y && apt_get install -y gh
|
|
72
|
+
fi
|
|
72
73
|
fi
|
|
73
74
|
require jq
|
|
74
75
|
require gh
|
|
@@ -120,7 +121,11 @@ case "$PM" in
|
|
|
120
121
|
esac
|
|
121
122
|
if [ ! -d node_modules ]; then
|
|
122
123
|
echo "Installing project dependencies (${PM_INSTALL})..."
|
|
123
|
-
for i in 1 2 3; do
|
|
124
|
+
for i in 1 2 3; do
|
|
125
|
+
if $PM_INSTALL; then break; fi
|
|
126
|
+
echo "${PM_INSTALL} attempt $i failed; retrying..."
|
|
127
|
+
sleep 5
|
|
128
|
+
done
|
|
124
129
|
fi
|
|
125
130
|
[ -d node_modules ] || { echo "FATAL: ${PM_INSTALL} failed after retries" >&2; exit 1; }
|
|
126
131
|
|
|
@@ -101,7 +101,6 @@ log_info "Found $app_count Amplify app(s)"
|
|
|
101
101
|
echo ""
|
|
102
102
|
|
|
103
103
|
# Process each app
|
|
104
|
-
total_deleted=0
|
|
105
104
|
|
|
106
105
|
echo "$apps_json" | jq -r '.apps[] | "\(.appId)|\(.name)"' | while IFS='|' read -r app_id app_name; do
|
|
107
106
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
* — Lisa cannot see the consumer's importer, and the consumer has no dependency
|
|
40
40
|
* to declare — so the exported names are the only shared contract there is.
|
|
41
41
|
*
|
|
42
|
-
* It reads exports **statically**,
|
|
42
|
+
* It reads exports **statically**, from the TypeScript compiler's syntax tree
|
|
43
|
+
* (a runtime dependency already), so an `export const` written inside a
|
|
44
|
+
* template string or a comment is text, not a declaration. It does not
|
|
43
45
|
* execute the modules, and it therefore cannot see a name attached at runtime.
|
|
44
46
|
* That limit is deliberate: importing 130 shipped scripts to enumerate them
|
|
45
47
|
* would run their top-level code during a build.
|
|
@@ -49,6 +51,8 @@ import { execFileSync } from "node:child_process";
|
|
|
49
51
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
50
52
|
import path from "node:path";
|
|
51
53
|
|
|
54
|
+
import ts from "typescript";
|
|
55
|
+
|
|
52
56
|
/**
|
|
53
57
|
* Fixed absolute git locations, in the order they are tried.
|
|
54
58
|
*
|
|
@@ -89,52 +93,14 @@ const SHIPPED_ROOTS = [
|
|
|
89
93
|
* exported name per line is what makes a removal show up as a DELETED line in
|
|
90
94
|
* the pull request that causes it — which is the entire point of recording the
|
|
91
95
|
* surface. At 974 names that is well past the 300-line ceiling `max-lines`
|
|
92
|
-
* applies to source
|
|
93
|
-
*
|
|
96
|
+
* applies to source — the reason the sibling generated artifacts (the hash
|
|
97
|
+
* ledger and the evidence manifest) are JSON too. Data does not need to be source: as JSON
|
|
94
98
|
* the artifact keeps the per-name diff, needs no waiver, and its reader becomes
|
|
95
99
|
* `JSON.parse` instead of a hand-rolled line parser that could silently
|
|
96
100
|
* disagree with the renderer.
|
|
97
101
|
*/
|
|
98
102
|
const ARTIFACT = "src/core/export-surface.json";
|
|
99
103
|
|
|
100
|
-
/**
|
|
101
|
-
* Declaration forms that introduce a named export.
|
|
102
|
-
*
|
|
103
|
-
* Anchored at line start, because an `export` inside a string or a comment is
|
|
104
|
-
* not a declaration and counting it would make the artifact disagree with the
|
|
105
|
-
* module. The corpus was surveyed before this list was written: 613 `function`,
|
|
106
|
-
* 306 `const`, 38 `async function`, 14 `class`, 4 brace-lists.
|
|
107
|
-
*/
|
|
108
|
-
const DECLARATION =
|
|
109
|
-
/^export\s+(?:async\s+)?(?:function|const|let|var|class)\s+([A-Za-z_$][\w$]*)/gm;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* `export { a, b as c }` — the re-export form, on one line or many.
|
|
113
|
-
*
|
|
114
|
-
* The body is `[^}]*`, which crosses newlines, because the reader used to walk
|
|
115
|
-
* the source a line at a time and so could only ever see a list that closed on
|
|
116
|
-
* the line it opened on. A multiline block contributed NOTHING to the artifact,
|
|
117
|
-
* and a removal from one was therefore never reported while the check went on
|
|
118
|
-
* passing — the exact failure this file exists against (CodySwannGT/lisa#4006).
|
|
119
|
-
*
|
|
120
|
-
* Still anchored with `m` rather than dropped, so an `export {` inside a string
|
|
121
|
-
* or a comment is no more countable than it was before.
|
|
122
|
-
*/
|
|
123
|
-
const BRACE_LIST = /^export\s*\{([^}]*)\}/gm;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* `export * as ns from "mod"` — the namespace re-export form.
|
|
127
|
-
*
|
|
128
|
-
* `ns` is a name a consumer imports, so it belongs on the surface. Its bare
|
|
129
|
-
* sibling `export * from "mod"` stays invisible: it introduces no name of its
|
|
130
|
-
* own, and enumerating what it forwards would mean resolving and reading the
|
|
131
|
-
* other module, which is the dynamic behavior this reader deliberately avoids.
|
|
132
|
-
*/
|
|
133
|
-
const NAMESPACE_REEXPORT = /^export\s*\*\s+as\s+([A-Za-z_$][\w$]*)\s+from\b/gm;
|
|
134
|
-
|
|
135
|
-
/** Comments inside a brace list — a commented-out name is not on the surface. */
|
|
136
|
-
const CLAUSE_COMMENT = /\/\*[\s\S]*?\*\/|\/\/[^\n]*/g;
|
|
137
|
-
|
|
138
104
|
/**
|
|
139
105
|
* Every tracked, shipped `.mjs` path.
|
|
140
106
|
* @param {string} cwd Repository root.
|
|
@@ -152,32 +118,83 @@ export function shippedScripts(cwd = process.cwd()) {
|
|
|
152
118
|
.sort((left, right) => (left < right ? -1 : left > right ? 1 : 0));
|
|
153
119
|
}
|
|
154
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Whether a statement carries a given modifier keyword.
|
|
123
|
+
* @param {ts.Statement} statement A top-level statement.
|
|
124
|
+
* @param {ts.SyntaxKind} kind The modifier to look for.
|
|
125
|
+
* @returns {boolean} True when present.
|
|
126
|
+
*/
|
|
127
|
+
function hasModifier(statement, kind) {
|
|
128
|
+
return (
|
|
129
|
+
ts.canHaveModifiers(statement) ? (ts.getModifiers(statement) ?? []) : []
|
|
130
|
+
).some(modifier => modifier.kind === kind);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Every identifier a binding introduces, through destructuring.
|
|
135
|
+
* @param {ts.BindingName} name A variable declaration's name.
|
|
136
|
+
* @returns {string[]} The bound identifiers.
|
|
137
|
+
*/
|
|
138
|
+
function boundNames(name) {
|
|
139
|
+
if (ts.isIdentifier(name)) return [name.text];
|
|
140
|
+
return name.elements.flatMap(element =>
|
|
141
|
+
ts.isOmittedExpression(element) ? [] : boundNames(element.name)
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The names one top-level statement adds to the module's exports.
|
|
147
|
+
* @param {ts.Statement} statement A top-level statement.
|
|
148
|
+
* @returns {string[]} Exported names; empty when the statement exports none.
|
|
149
|
+
*/
|
|
150
|
+
function statementExports(statement) {
|
|
151
|
+
if (ts.isExportDeclaration(statement)) {
|
|
152
|
+
const clause = statement.exportClause;
|
|
153
|
+
// `export * from "mod"` introduces no name of its own.
|
|
154
|
+
if (clause === undefined) return [];
|
|
155
|
+
if (ts.isNamespaceExport(clause)) return [clause.name.text];
|
|
156
|
+
// `a as b` exports b; the local name is not part of the surface.
|
|
157
|
+
return clause.elements.map(element => element.name.text);
|
|
158
|
+
}
|
|
159
|
+
if (!hasModifier(statement, ts.SyntaxKind.ExportKeyword)) return [];
|
|
160
|
+
if (hasModifier(statement, ts.SyntaxKind.DefaultKeyword)) return [];
|
|
161
|
+
if (ts.isVariableStatement(statement)) {
|
|
162
|
+
return statement.declarationList.declarations.flatMap(declaration =>
|
|
163
|
+
boundNames(declaration.name)
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
if (
|
|
167
|
+
(ts.isFunctionDeclaration(statement) || ts.isClassDeclaration(statement)) &&
|
|
168
|
+
statement.name !== undefined
|
|
169
|
+
) {
|
|
170
|
+
return [statement.name.text];
|
|
171
|
+
}
|
|
172
|
+
return [];
|
|
173
|
+
}
|
|
174
|
+
|
|
155
175
|
/**
|
|
156
176
|
* The names one module exports.
|
|
157
177
|
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* under `m`, which is what keeps an `export` inside a string or a comment out.
|
|
178
|
+
* Read from the syntax tree, so only real top-level export declarations count:
|
|
179
|
+
* an `export const` inside a template string, a comment, or a nested scope is
|
|
180
|
+
* not on the surface. `export default` is deliberately excluded: it has no
|
|
181
|
+
* name to compare, so recording it would add a row that can never change
|
|
182
|
+
* meaningfully.
|
|
164
183
|
* @param {string} source Module source.
|
|
165
184
|
* @returns {string[]} Exported names, sorted and deduplicated.
|
|
166
185
|
*/
|
|
167
186
|
export function exportedNames(source) {
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
}
|
|
187
|
+
const file = ts.createSourceFile(
|
|
188
|
+
"module.mjs",
|
|
189
|
+
source,
|
|
190
|
+
ts.ScriptTarget.Latest,
|
|
191
|
+
false,
|
|
192
|
+
ts.ScriptKind.JS
|
|
193
|
+
);
|
|
194
|
+
const names = new Set(
|
|
195
|
+
file.statements.flatMap(statement => statementExports(statement))
|
|
196
|
+
);
|
|
197
|
+
names.delete("default");
|
|
181
198
|
return [...names].sort((left, right) =>
|
|
182
199
|
left < right ? -1 : left > right ? 1 : 0
|
|
183
200
|
);
|
|
@@ -258,6 +275,34 @@ export function removedExports(before, after) {
|
|
|
258
275
|
);
|
|
259
276
|
}
|
|
260
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Keep only the removals that were real exports at the earlier revision.
|
|
280
|
+
*
|
|
281
|
+
* An artifact recorded by an older reader can list a name that was never
|
|
282
|
+
* exported: the regex reader it replaced counted `export const` lines inside
|
|
283
|
+
* template strings. Reporting such a name as removed would announce an API
|
|
284
|
+
* break that never happened. Each candidate is re-read from the module's
|
|
285
|
+
* source at that revision with today's reader; a module that cannot be read
|
|
286
|
+
* there keeps its removal, so the check fails closed rather than going quiet.
|
|
287
|
+
* @param {Array<{file: string, name: string}>} removals From {@link removedExports}.
|
|
288
|
+
* @param {(file: string) => string|null} sourceAt The module's source at the earlier revision, or null.
|
|
289
|
+
* @returns {Array<{file: string, name: string}>} The removals that were real exports.
|
|
290
|
+
*/
|
|
291
|
+
export function confirmedRemovals(removals, sourceAt) {
|
|
292
|
+
const cache = new Map();
|
|
293
|
+
const namesIn = file => {
|
|
294
|
+
if (!cache.has(file)) {
|
|
295
|
+
const source = sourceAt(file);
|
|
296
|
+
cache.set(file, source === null ? null : new Set(exportedNames(source)));
|
|
297
|
+
}
|
|
298
|
+
return cache.get(file);
|
|
299
|
+
};
|
|
300
|
+
return removals.filter(({ file, name }) => {
|
|
301
|
+
const names = namesIn(file);
|
|
302
|
+
return names === null || names.has(name);
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
|
|
261
306
|
/**
|
|
262
307
|
* The changelog section a release carries when it removes exports.
|
|
263
308
|
*
|
|
@@ -303,6 +348,28 @@ function surfaceAt(ref, cwd) {
|
|
|
303
348
|
}
|
|
304
349
|
}
|
|
305
350
|
|
|
351
|
+
/**
|
|
352
|
+
* A file's contents at a git revision.
|
|
353
|
+
* @param {string} ref Git revision.
|
|
354
|
+
* @param {string} file Repo-relative path.
|
|
355
|
+
* @param {string} cwd Repository root.
|
|
356
|
+
* @returns {string|null} The source, or null when it cannot be read there.
|
|
357
|
+
*/
|
|
358
|
+
function sourceAtRevision(ref, file, cwd) {
|
|
359
|
+
try {
|
|
360
|
+
return execFileSync(GIT_BIN, ["show", `${ref}:${file}`], {
|
|
361
|
+
cwd,
|
|
362
|
+
encoding: "utf8",
|
|
363
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
364
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
365
|
+
});
|
|
366
|
+
} catch {
|
|
367
|
+
// probe-direction: fail-closed — an unreadable revision returns null, and
|
|
368
|
+
// confirmedRemovals keeps the removal it could not disprove.
|
|
369
|
+
return null;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
306
373
|
/**
|
|
307
374
|
* Classify what an argument vector asks `--removed-since` to do.
|
|
308
375
|
*
|
|
@@ -370,7 +437,10 @@ function main() {
|
|
|
370
437
|
);
|
|
371
438
|
return 2;
|
|
372
439
|
}
|
|
373
|
-
const removals =
|
|
440
|
+
const removals = confirmedRemovals(
|
|
441
|
+
removedExports(before, currentSurface(cwd)),
|
|
442
|
+
file => sourceAtRevision(since, file, cwd)
|
|
443
|
+
);
|
|
374
444
|
const section = changelogSection(removals);
|
|
375
445
|
process.stdout.write(
|
|
376
446
|
section === ""
|