@codyswann/lisa 7.1.5 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -30435
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.json +30520 -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 +5 -5
- 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
|
@@ -16,7 +16,7 @@ command -v jq >/dev/null 2>&1 || exit 0
|
|
|
16
16
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
17
17
|
FILE_PATHS=$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')
|
|
18
18
|
if [ -z "$FILE_PATHS" ] && [ -f "$SCRIPT_DIR/_extract-edit-paths.sh" ]; then
|
|
19
|
-
# shellcheck source
|
|
19
|
+
# shellcheck source=_extract-edit-paths.sh
|
|
20
20
|
. "$SCRIPT_DIR/_extract-edit-paths.sh"
|
|
21
21
|
FILE_PATHS=$(lisa_extract_edit_paths "$JSON_INPUT")
|
|
22
22
|
fi
|
|
@@ -38,6 +38,187 @@ normalize_path() {
|
|
|
38
38
|
printf '%s' "$path"
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
# lisa_glob_ere <glob>
|
|
42
|
+
#
|
|
43
|
+
# Set `lisa_glob_ere_result` to an anchored ERE that matches exactly the
|
|
44
|
+
# strings the shell's `case` matches with <glob>, so
|
|
45
|
+
# `[[ $path =~ $lisa_glob_ere_result ]]` can stand in for an unquoted `case`
|
|
46
|
+
# pattern: `*` is any run of characters (slashes included), `?` is one
|
|
47
|
+
# character, `[...]` is a bracket expression (`!` or `^` negates it), a
|
|
48
|
+
# backslash makes the next character literal, and an unterminated `[` is a
|
|
49
|
+
# literal `[`. Every other character is literal, so an ERE metacharacter in a
|
|
50
|
+
# glob is matched as itself rather than obeyed. Returns 1, matching nothing, for a trailing backslash: it escapes
|
|
51
|
+
# nothing, and the shell's matcher then matches nothing either.
|
|
52
|
+
#
|
|
53
|
+
# A range compares code points, as bash 5 does by default (`globasciiranges`)
|
|
54
|
+
# and as minimatch does. Measured against bash 3.2's `case` in the C locale:
|
|
55
|
+
# no mismatch over 3,127 pattern/path pairs and over a second fuzz of 3,795.
|
|
56
|
+
# Two differences remain, both in a bracket. Under a UTF-8 locale bash 3.2
|
|
57
|
+
# orders a range by collation (`[]-a]`). And a bracket holding an unterminated
|
|
58
|
+
# `[.` or `[=`, or an unterminated `[:` after other members (`[a[:]`), is read
|
|
59
|
+
# by bash 3.2 with its earlier members dropped; this reads every member.
|
|
60
|
+
#
|
|
61
|
+
# No subshells: this runs on every agent edit (it is the copy in
|
|
62
|
+
# block-managed-file-edits.sh), so each helper appends to a
|
|
63
|
+
# variable instead of printing.
|
|
64
|
+
lisa_glob_ere() {
|
|
65
|
+
local glob="$1" char
|
|
66
|
+
local -i i=0 n=${#1}
|
|
67
|
+
lisa_glob_ere_result=""
|
|
68
|
+
while [ "$i" -lt "$n" ]; do
|
|
69
|
+
char="${glob:i:1}"
|
|
70
|
+
case "$char" in
|
|
71
|
+
"*") lisa_glob_ere_result+=".*" ;;
|
|
72
|
+
"?") lisa_glob_ere_result+="." ;;
|
|
73
|
+
"\\")
|
|
74
|
+
[ "$((i + 1))" -lt "$n" ] || return 1
|
|
75
|
+
i+=1
|
|
76
|
+
lisa_glob_ere_literal "${glob:i:1}"
|
|
77
|
+
;;
|
|
78
|
+
"[")
|
|
79
|
+
if lisa_glob_bracket_end "$glob" "$i"; then
|
|
80
|
+
lisa_glob_bracket_ere "${glob:i+1:lisa_glob_close-i-1}"
|
|
81
|
+
i=$lisa_glob_close
|
|
82
|
+
else
|
|
83
|
+
lisa_glob_ere_literal "["
|
|
84
|
+
fi
|
|
85
|
+
;;
|
|
86
|
+
*) lisa_glob_ere_literal "$char" ;;
|
|
87
|
+
esac
|
|
88
|
+
i+=1
|
|
89
|
+
done
|
|
90
|
+
lisa_glob_ere_result="^${lisa_glob_ere_result}\$"
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
# lisa_glob_ere_literal <char>
|
|
94
|
+
#
|
|
95
|
+
# Append one character to `lisa_glob_ere_result`, written so an ERE matches
|
|
96
|
+
# it literally.
|
|
97
|
+
lisa_glob_ere_literal() {
|
|
98
|
+
case "$1" in
|
|
99
|
+
"^") lisa_glob_ere_result+="\\^" ;;
|
|
100
|
+
"\\") lisa_glob_ere_result+="[\\]" ;;
|
|
101
|
+
"[") lisa_glob_ere_result+="[[]" ;;
|
|
102
|
+
"." | "+" | "(" | ")" | "{" | "}" | "|" | "$" | "*" | "?") lisa_glob_ere_result+="[$1]" ;;
|
|
103
|
+
*) lisa_glob_ere_result+="$1" ;;
|
|
104
|
+
esac
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
# lisa_glob_bracket_end <glob> <open>
|
|
108
|
+
#
|
|
109
|
+
# Set `lisa_glob_close` to the index of the `]` closing the bracket opened
|
|
110
|
+
# at <open>, or return 1 when it is never closed. A `]` straight after the
|
|
111
|
+
# opening (or after its `!`/`^`) is a member, `[:name:]`, `[.x.]` and `[=x=]`
|
|
112
|
+
# are single members, and a backslash escapes the next character, as in the
|
|
113
|
+
# shell's own matcher.
|
|
114
|
+
lisa_glob_bracket_end() {
|
|
115
|
+
local glob="$1" rest name mark
|
|
116
|
+
local -i i=$(($2 + 1)) n=${#1} start
|
|
117
|
+
case "${glob:i:1}" in "!" | "^") i+=1 ;; esac
|
|
118
|
+
start=$i
|
|
119
|
+
while [ "$i" -lt "$n" ]; do
|
|
120
|
+
case "${glob:i:1}" in
|
|
121
|
+
"]")
|
|
122
|
+
if [ "$i" -gt "$start" ]; then
|
|
123
|
+
lisa_glob_close=$i
|
|
124
|
+
return 0
|
|
125
|
+
fi
|
|
126
|
+
;;
|
|
127
|
+
"\\") i+=1 ;;
|
|
128
|
+
"[")
|
|
129
|
+
mark="${glob:i+1:1}"
|
|
130
|
+
case "$mark" in
|
|
131
|
+
":" | "." | "=")
|
|
132
|
+
rest="${glob:i+2}"
|
|
133
|
+
case "$rest" in
|
|
134
|
+
*"$mark]"*)
|
|
135
|
+
name="${rest%%"$mark]"*}"
|
|
136
|
+
i+=$((${#name} + 3))
|
|
137
|
+
;;
|
|
138
|
+
esac
|
|
139
|
+
;;
|
|
140
|
+
esac
|
|
141
|
+
;;
|
|
142
|
+
esac
|
|
143
|
+
i+=1
|
|
144
|
+
done
|
|
145
|
+
return 1
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
# lisa_glob_bracket_ere <body>
|
|
149
|
+
#
|
|
150
|
+
# Append the ERE bracket expression for a glob bracket body to
|
|
151
|
+
# `lisa_glob_ere_result`. An escaped member loses its backslash, and a literal
|
|
152
|
+
# `]`, `^` or `-` is placed where an ERE bracket reads it literally: first, not
|
|
153
|
+
# first, and last. A `[:name:]`, `[.x.]` or `[=x=]` is copied whole; any other
|
|
154
|
+
# `[` is a literal member, placed after the others so it never opens a class
|
|
155
|
+
# the ERE would reject (`[[:]`). A `-` straight after a range is literal, as
|
|
156
|
+
# the shell reads `[a-c-e]`, rather than a second range the ERE would reject.
|
|
157
|
+
lisa_glob_bracket_ere() {
|
|
158
|
+
local body="$1" negate="" members="" close="" open="" caret="" dash=""
|
|
159
|
+
local char next rest
|
|
160
|
+
local -i i=0 n=${#1} after_range=0
|
|
161
|
+
case "${body:0:1}" in "!" | "^") negate="^" i=1 ;; esac
|
|
162
|
+
if [ "${body:i:1}" = "]" ]; then
|
|
163
|
+
close="]"
|
|
164
|
+
i+=1
|
|
165
|
+
fi
|
|
166
|
+
while [ "$i" -lt "$n" ]; do
|
|
167
|
+
char="${body:i:1}"
|
|
168
|
+
next="${body:i+1:1}"
|
|
169
|
+
if [ "$char" = "\\" ] && [ "$((i + 1))" -lt "$n" ]; then
|
|
170
|
+
i+=1
|
|
171
|
+
case "$next" in
|
|
172
|
+
"]") close="]" ;;
|
|
173
|
+
"^") caret="^" ;;
|
|
174
|
+
"-") dash="-" ;;
|
|
175
|
+
*) members+="$next" ;;
|
|
176
|
+
esac
|
|
177
|
+
after_range=0
|
|
178
|
+
elif [ "$char" = "^" ] && [ -z "$members$close" ]; then
|
|
179
|
+
caret="^"
|
|
180
|
+
after_range=0
|
|
181
|
+
elif [ "$char" = "[" ]; then
|
|
182
|
+
rest="${body:i+2}"
|
|
183
|
+
case "$next" in
|
|
184
|
+
":" | "." | "=")
|
|
185
|
+
case "$rest" in
|
|
186
|
+
*"$next]"*)
|
|
187
|
+
rest="${rest%%"$next]"*}"
|
|
188
|
+
members+="[${next}${rest}${next}]"
|
|
189
|
+
i+=$((${#rest} + 3))
|
|
190
|
+
;;
|
|
191
|
+
# An unterminated `[:` opens nothing, and the shell drops its
|
|
192
|
+
# `[`; any other unterminated opener leaves a literal `[`.
|
|
193
|
+
*) if [ "$next" != ":" ]; then open="["; fi ;;
|
|
194
|
+
esac
|
|
195
|
+
;;
|
|
196
|
+
*) open="[" ;;
|
|
197
|
+
esac
|
|
198
|
+
after_range=0
|
|
199
|
+
elif [ "$char" = "-" ] && [ "$after_range" -eq 1 ]; then
|
|
200
|
+
dash="-"
|
|
201
|
+
after_range=0
|
|
202
|
+
elif [ "$char" = "-" ] && [ -n "$members$close" ] && [ "$((i + 1))" -lt "$n" ]; then
|
|
203
|
+
members+="-${next}"
|
|
204
|
+
i+=1
|
|
205
|
+
after_range=1
|
|
206
|
+
elif [ "$char" = "-" ]; then
|
|
207
|
+
if [ -z "$members$close" ]; then members+="-"; else dash="-"; fi
|
|
208
|
+
after_range=0
|
|
209
|
+
else
|
|
210
|
+
members+="$char"
|
|
211
|
+
after_range=0
|
|
212
|
+
fi
|
|
213
|
+
i+=1
|
|
214
|
+
done
|
|
215
|
+
if [ -z "$close$members$open$dash" ]; then
|
|
216
|
+
members="$caret"
|
|
217
|
+
caret=""
|
|
218
|
+
fi
|
|
219
|
+
lisa_glob_ere_result+="[${negate}${close}${members}${open}${caret}${dash}]"
|
|
220
|
+
}
|
|
221
|
+
|
|
41
222
|
matches_glob() {
|
|
42
223
|
local file="$1"
|
|
43
224
|
local glob="$2"
|
|
@@ -68,26 +249,30 @@ matches_glob() {
|
|
|
68
249
|
case "$file" in
|
|
69
250
|
*/*) file_dir="${file%/*}" ;;
|
|
70
251
|
esac
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
252
|
+
# The globs are globs on purpose, matched through their ERE so no
|
|
253
|
+
# expansion is left unquoted. A glob with no ERE matches nothing.
|
|
254
|
+
lisa_glob_ere "$base_glob" || return 1
|
|
255
|
+
[[ $file_base =~ $lisa_glob_ere_result ]] || return 1
|
|
75
256
|
[ -z "$dir_glob" ] && return 0
|
|
76
257
|
# Match the directory exactly, or as a suffix so absolute/prefixed paths
|
|
77
258
|
# (e.g. /repo/harper-app/foo.js) still resolve.
|
|
78
259
|
case "$file_dir" in
|
|
79
|
-
|
|
260
|
+
*/"$dir_glob") return 0 ;;
|
|
80
261
|
esac
|
|
262
|
+
lisa_glob_ere "$dir_glob" || return 1
|
|
263
|
+
if [[ $file_dir =~ $lisa_glob_ere_result ]]; then
|
|
264
|
+
return 0
|
|
265
|
+
fi
|
|
81
266
|
return 1
|
|
82
267
|
;;
|
|
83
268
|
esac
|
|
84
269
|
|
|
85
270
|
# Literal (wildcard-free) globs.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
271
|
+
if lisa_glob_ere "$glob" && [[ $file =~ $lisa_glob_ere_result ]]; then
|
|
272
|
+
return 0
|
|
273
|
+
fi
|
|
274
|
+
lisa_glob_ere "*/$glob" || return 1
|
|
275
|
+
[[ $file =~ $lisa_glob_ere_result ]]
|
|
91
276
|
}
|
|
92
277
|
|
|
93
278
|
# Project-owned allowlist of hand-written files that live under harper-app/ and
|
|
@@ -28,7 +28,7 @@ run_check() {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
if [ -f "$SCRIPT_DIR/_extract-edit-paths.sh" ]; then
|
|
31
|
-
# shellcheck source
|
|
31
|
+
# shellcheck source=_extract-edit-paths.sh
|
|
32
32
|
. "$SCRIPT_DIR/_extract-edit-paths.sh"
|
|
33
33
|
FILE_PATHS=$(lisa_extract_edit_paths "$JSON_INPUT")
|
|
34
34
|
if [ -n "$FILE_PATHS" ]; then
|
|
@@ -75,7 +75,7 @@ LISA_HOOK_DIR="$(cd "$(dirname "$0")" 2>/dev/null && pwd)"
|
|
|
75
75
|
if [ -n "${CLAUDE_PROJECT_DIR:-}" ] &&
|
|
76
76
|
[ -f "$LISA_HOOK_DIR/lisa-edit-gate.sh" ] &&
|
|
77
77
|
cd "$CLAUDE_PROJECT_DIR" 2>/dev/null; then
|
|
78
|
-
# shellcheck source
|
|
78
|
+
# shellcheck source=lisa-edit-gate.sh
|
|
79
79
|
. "$LISA_HOOK_DIR/lisa-edit-gate.sh"
|
|
80
80
|
if LISA_GATE_COMMANDS="$(lisa_edit_gate_tasks pre-tool migration-provenance)"; then
|
|
81
81
|
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
|
}
|
|
@@ -190,36 +190,49 @@ import { AppModule } from "./app.module";
|
|
|
190
190
|
type ServerlessHandler = ReturnType<typeof serverlessExpress>;
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
|
-
*
|
|
194
|
-
* @
|
|
195
|
-
* @returns Async function that returns the cached or newly created server
|
|
193
|
+
* Bootstraps the Nest application and wraps it for API Gateway
|
|
194
|
+
* @returns The serverless-express handler for this container
|
|
196
195
|
*/
|
|
197
|
-
const
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
const nestApp = await NestFactory.create(AppModule, {
|
|
207
|
-
cors: {
|
|
208
|
-
origin: "*",
|
|
209
|
-
methods: "GET,HEAD,PUT,PATCH,POST,DELETE",
|
|
210
|
-
preflightContinue: false,
|
|
211
|
-
optionsSuccessStatus: 204,
|
|
212
|
-
},
|
|
213
|
-
});
|
|
196
|
+
const createServer = async (): Promise<ServerlessHandler> => {
|
|
197
|
+
const nestApp = await NestFactory.create(AppModule, {
|
|
198
|
+
cors: {
|
|
199
|
+
origin: "*",
|
|
200
|
+
methods: "GET,HEAD,PUT,PATCH,POST,DELETE",
|
|
201
|
+
preflightContinue: false,
|
|
202
|
+
optionsSuccessStatus: 204,
|
|
203
|
+
},
|
|
204
|
+
});
|
|
214
205
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return cachedServer;
|
|
219
|
-
};
|
|
206
|
+
await nestApp.init();
|
|
207
|
+
const app = nestApp.getHttpAdapter().getInstance();
|
|
208
|
+
return serverlessExpress({ app });
|
|
220
209
|
};
|
|
221
210
|
|
|
222
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Caches the server across Lambda warm starts
|
|
213
|
+
* @description The cache is the one piece of mutable state, so it lives on a
|
|
214
|
+
* class instead of a module-level `let`. Caching the promise (not the result)
|
|
215
|
+
* means concurrent cold-start invocations share one bootstrap; a failed
|
|
216
|
+
* bootstrap is dropped so the next invocation retries it.
|
|
217
|
+
*/
|
|
218
|
+
class ServerCache {
|
|
219
|
+
private server: Promise<ServerlessHandler> | undefined;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Returns the cached server, bootstrapping it on first use
|
|
223
|
+
* @returns The serverless-express handler
|
|
224
|
+
*/
|
|
225
|
+
get(): Promise<ServerlessHandler> {
|
|
226
|
+
this.server ??= createServer().catch((error: unknown) => {
|
|
227
|
+
this.server = undefined;
|
|
228
|
+
throw error;
|
|
229
|
+
});
|
|
230
|
+
return this.server;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const serverCache = new ServerCache();
|
|
235
|
+
const getServer = (): Promise<ServerlessHandler> => serverCache.get();
|
|
223
236
|
|
|
224
237
|
/**
|
|
225
238
|
* Lambda handler function
|
|
@@ -4,38 +4,15 @@ Detailed patterns for TypeORM observability including the X-Ray logger implement
|
|
|
4
4
|
|
|
5
5
|
## Custom X-Ray Logger
|
|
6
6
|
|
|
7
|
-
The custom logger provides distributed tracing in production while working gracefully in local environments where X-Ray is
|
|
7
|
+
The custom logger provides distributed tracing in production while working gracefully in local environments where no X-Ray segment is active. `aws-xray-sdk-core` is a regular dependency of every Lisa NestJS project, so it is imported statically; outside a traced Lambda invocation there is simply no current segment, and the logger skips tracing.
|
|
8
8
|
|
|
9
9
|
### typeorm-xray-logger.ts
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
import { Logger as NestLogger } from "@nestjs/common";
|
|
13
|
+
import { getSegment, type Subsegment } from "aws-xray-sdk-core";
|
|
13
14
|
import type { Logger as TypeOrmLogger, QueryRunner } from "typeorm";
|
|
14
15
|
|
|
15
|
-
/**
|
|
16
|
-
* X-Ray segment interface for type safety.
|
|
17
|
-
*/
|
|
18
|
-
interface XRaySegment {
|
|
19
|
-
addNewSubsegment(name: string): XRaySubsegment;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* X-Ray subsegment interface for type safety.
|
|
24
|
-
*/
|
|
25
|
-
interface XRaySubsegment {
|
|
26
|
-
addAnnotation(key: string, value: string | number | boolean): void;
|
|
27
|
-
addMetadata(key: string, value: unknown): void;
|
|
28
|
-
addError(error: Error): void;
|
|
29
|
-
close(): void;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* X-Ray SDK namespace interface.
|
|
34
|
-
*/
|
|
35
|
-
interface XRayNamespace {
|
|
36
|
-
getSegment(): XRaySegment | null;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
16
|
/**
|
|
40
17
|
* Query type extracted from SQL.
|
|
41
18
|
*/
|
|
@@ -90,23 +67,6 @@ const sanitizeParameters = (
|
|
|
90
67
|
return `[${parameters.length} parameters]`;
|
|
91
68
|
};
|
|
92
69
|
|
|
93
|
-
/**
|
|
94
|
-
* Attempt to get X-Ray namespace with graceful fallback.
|
|
95
|
-
*
|
|
96
|
-
* @returns X-Ray namespace or null if unavailable
|
|
97
|
-
*/
|
|
98
|
-
const getXRayNamespace = (): XRayNamespace | null => {
|
|
99
|
-
try {
|
|
100
|
-
// Dynamic import to avoid hard dependency on X-Ray SDK
|
|
101
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports -- Dynamic require for optional dependency
|
|
102
|
-
const AWSXRay = require("aws-xray-sdk-core");
|
|
103
|
-
return AWSXRay.getNamespace() as XRayNamespace;
|
|
104
|
-
} catch {
|
|
105
|
-
// X-Ray SDK not available (local development)
|
|
106
|
-
return null;
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
|
|
110
70
|
/**
|
|
111
71
|
* TypeORM logger with AWS X-Ray distributed tracing integration.
|
|
112
72
|
*
|
|
@@ -129,11 +89,10 @@ export class TypeOrmXRayLogger implements TypeOrmLogger {
|
|
|
129
89
|
* @param name - The subsegment name
|
|
130
90
|
* @returns The subsegment or null if X-Ray unavailable
|
|
131
91
|
*/
|
|
132
|
-
private createSubsegment(name: string):
|
|
92
|
+
private createSubsegment(name: string): Subsegment | null {
|
|
133
93
|
try {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
return segment?.addNewSubsegment(name) ?? null;
|
|
94
|
+
// No current segment outside a traced invocation (local development).
|
|
95
|
+
return getSegment()?.addNewSubsegment(name) ?? null;
|
|
137
96
|
} catch {
|
|
138
97
|
// Silently fail - X-Ray tracing is optional
|
|
139
98
|
return null;
|
|
@@ -145,7 +104,7 @@ export class TypeOrmXRayLogger implements TypeOrmLogger {
|
|
|
145
104
|
*
|
|
146
105
|
* @param subsegment - The subsegment to close
|
|
147
106
|
*/
|
|
148
|
-
private closeSubsegment(subsegment:
|
|
107
|
+
private closeSubsegment(subsegment: Subsegment | null): void {
|
|
149
108
|
try {
|
|
150
109
|
subsegment?.close();
|
|
151
110
|
} catch {
|
|
@@ -465,9 +424,9 @@ describe("TypeOrmXRayLogger", () => {
|
|
|
465
424
|
});
|
|
466
425
|
|
|
467
426
|
describe("graceful degradation", () => {
|
|
468
|
-
it("should work without X-Ray
|
|
469
|
-
//
|
|
470
|
-
//
|
|
427
|
+
it("should work without an active X-Ray segment", () => {
|
|
428
|
+
// Tests run outside a traced Lambda invocation, so there is no segment;
|
|
429
|
+
// the logger should fall back to NestJS Logger
|
|
471
430
|
expect(() => {
|
|
472
431
|
logger.logQuery("SELECT 1", []);
|
|
473
432
|
logger.logQueryError("Test error", "SELECT 1", []);
|
|
@@ -482,23 +441,24 @@ describe("TypeOrmXRayLogger", () => {
|
|
|
482
441
|
|
|
483
442
|
For production environments with X-Ray:
|
|
484
443
|
|
|
485
|
-
###
|
|
444
|
+
### X-Ray SDK
|
|
486
445
|
|
|
487
|
-
|
|
488
|
-
bun add aws-xray-sdk-core
|
|
489
|
-
```
|
|
446
|
+
`aws-xray-sdk-core` is already a dependency of every Lisa NestJS project; no install step is needed.
|
|
490
447
|
|
|
491
448
|
### Lambda Handler Integration
|
|
492
449
|
|
|
493
450
|
```typescript
|
|
451
|
+
import * as http from "node:http";
|
|
452
|
+
import * as https from "node:https";
|
|
453
|
+
import { S3Client } from "@aws-sdk/client-s3";
|
|
494
454
|
import * as AWSXRay from "aws-xray-sdk-core";
|
|
495
455
|
|
|
496
|
-
// Capture
|
|
497
|
-
AWSXRay.
|
|
456
|
+
// Capture AWS SDK v3 calls, one client at a time
|
|
457
|
+
const s3 = AWSXRay.captureAWSv3Client(new S3Client({}));
|
|
498
458
|
|
|
499
459
|
// Capture HTTP calls
|
|
500
|
-
AWSXRay.captureHTTPsGlobal(
|
|
501
|
-
AWSXRay.captureHTTPsGlobal(
|
|
460
|
+
AWSXRay.captureHTTPsGlobal(http);
|
|
461
|
+
AWSXRay.captureHTTPsGlobal(https);
|
|
502
462
|
```
|
|
503
463
|
|
|
504
464
|
### serverless.yml Configuration
|
|
@@ -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
|
}
|
|
@@ -34,7 +34,7 @@ if [ -z "${CLAUDE_PROJECT_DIR:-}" ]; then
|
|
|
34
34
|
fi
|
|
35
35
|
|
|
36
36
|
# Check if file is in a recognized source directory, excluding generated/vendored paths
|
|
37
|
-
RELATIVE_PATH="${FILE_PATH
|
|
37
|
+
RELATIVE_PATH="${FILE_PATH#"$CLAUDE_PROJECT_DIR"/}"
|
|
38
38
|
case "$RELATIVE_PATH" in
|
|
39
39
|
db/migrate/*|db/schema.rb) exit 0 ;;
|
|
40
40
|
vendor/*|bin/*|tmp/*|node_modules/*) exit 0 ;;
|
|
@@ -60,7 +60,7 @@ cd "$CLAUDE_PROJECT_DIR" || exit 0
|
|
|
60
60
|
# would silently stop proving the others.
|
|
61
61
|
# ---------------------------------------------------------------------------
|
|
62
62
|
if [ -f "$LISA_HOOK_DIR/lisa-edit-gate.sh" ]; then
|
|
63
|
-
# shellcheck source
|
|
63
|
+
# shellcheck source=lisa-edit-gate.sh
|
|
64
64
|
. "$LISA_HOOK_DIR/lisa-edit-gate.sh"
|
|
65
65
|
if LISA_GATE_COMMANDS="$(lisa_edit_gate_tasks post-tool code-style format-conformance)"; then
|
|
66
66
|
lisa_edit_gate_run "$FILE_PATH" "$LISA_GATE_COMMANDS"
|
|
@@ -33,7 +33,7 @@ if [ -z "${CLAUDE_PROJECT_DIR:-}" ]; then
|
|
|
33
33
|
fi
|
|
34
34
|
|
|
35
35
|
# Check if file is in a recognized source directory
|
|
36
|
-
RELATIVE_PATH="${FILE_PATH
|
|
36
|
+
RELATIVE_PATH="${FILE_PATH#"$CLAUDE_PROJECT_DIR"/}"
|
|
37
37
|
case "$RELATIVE_PATH" in
|
|
38
38
|
app/*|lib/*|config/*|spec/*) ;;
|
|
39
39
|
*) exit 0 ;;
|
|
@@ -55,7 +55,7 @@ cd "$CLAUDE_PROJECT_DIR" || exit 0
|
|
|
55
55
|
# would silently stop proving the others.
|
|
56
56
|
# ---------------------------------------------------------------------------
|
|
57
57
|
if [ -f "$LISA_HOOK_DIR/lisa-edit-gate.sh" ]; then
|
|
58
|
-
# shellcheck source
|
|
58
|
+
# shellcheck source=lisa-edit-gate.sh
|
|
59
59
|
. "$LISA_HOOK_DIR/lisa-edit-gate.sh"
|
|
60
60
|
if LISA_GATE_COMMANDS="$(lisa_edit_gate_tasks post-tool structural-rules)"; then
|
|
61
61
|
lisa_edit_gate_run "$FILE_PATH" "$LISA_GATE_COMMANDS"
|
|
@@ -70,7 +70,7 @@ if [ ! -f "sgconfig.yml" ]; then
|
|
|
70
70
|
fi
|
|
71
71
|
|
|
72
72
|
# Verify rules are defined
|
|
73
|
-
RULE_COUNT=$(find ast-grep/rules -name "*.yml" -o -name "*.yaml" 2>/dev/null | grep -
|
|
73
|
+
RULE_COUNT=$(find ast-grep/rules -name "*.yml" -o -name "*.yaml" 2>/dev/null | grep -vc ".gitkeep")
|
|
74
74
|
if [ "$RULE_COUNT" -eq 0 ]; then
|
|
75
75
|
exit 0
|
|
76
76
|
fi
|
|
@@ -95,7 +95,7 @@ LISA_HOOK_DIR="$(cd "$(dirname "$0")" 2>/dev/null && pwd)"
|
|
|
95
95
|
if [ -n "${CLAUDE_PROJECT_DIR:-}" ] &&
|
|
96
96
|
[ -f "$LISA_HOOK_DIR/lisa-edit-gate.sh" ] &&
|
|
97
97
|
cd "$CLAUDE_PROJECT_DIR" 2>/dev/null; then
|
|
98
|
-
# shellcheck source
|
|
98
|
+
# shellcheck source=lisa-edit-gate.sh
|
|
99
99
|
. "$LISA_HOOK_DIR/lisa-edit-gate.sh"
|
|
100
100
|
if LISA_GATE_COMMANDS="$(lisa_edit_gate_tasks pre-tool suppression-residue)"; then
|
|
101
101
|
# The declared task's own exit status decides the write: non-zero refuses,
|
|
@@ -157,7 +157,7 @@ read_before() {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
# The edit object $1: tool_input itself for Edit, edits[$1] for MultiEdit.
|
|
160
|
-
EDIT_AT=
|
|
160
|
+
EDIT_AT=".tool_input | (if (.edits // null) != null then .edits[\$i] else . end)"
|
|
161
161
|
|
|
162
162
|
# One string field ($2) of edit $1, empty when absent.
|
|
163
163
|
edit_field() {
|