@codyswann/lisa 7.1.5 → 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 -30435
- 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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { PackageJsonPlan, ResolvedPackageLisaTemplate } from "./package-lisa-types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Every package a manifest declares, in any dependency section.
|
|
4
|
+
* @param projectJson - Host package.json as read
|
|
5
|
+
* @returns Package names, each at most once
|
|
6
|
+
*/
|
|
7
|
+
export declare function declaredDependencies(projectJson: Record<string, unknown>): readonly string[];
|
|
8
|
+
/**
|
|
9
|
+
* Dependencies an `adopt` entry would delete, before the mention check runs.
|
|
10
|
+
* @remarks
|
|
11
|
+
* Only these are worth asking git about: a key the template forces is never
|
|
12
|
+
* reclaimed, and one holding a value Lisa did not write is the host's own.
|
|
13
|
+
* @param projectJson - Host package.json as read
|
|
14
|
+
* @param template - Resolved template carrying the adopt section
|
|
15
|
+
* @returns Package names, each at most once
|
|
16
|
+
*/
|
|
17
|
+
export declare function adoptableDependencies(projectJson: Record<string, unknown>, template: ResolvedPackageLisaTemplate): readonly string[];
|
|
18
|
+
/**
|
|
19
|
+
* Apply the template after fitting its forced package-manager floor to the
|
|
20
|
+
* host's manager, so a bun host never receives an npm floor (#4848).
|
|
21
|
+
* @param projectJson - Current project's package.json
|
|
22
|
+
* @param template - Merged package.lisa.json template
|
|
23
|
+
* @param restricted - True when the template was reduced to security pins
|
|
24
|
+
* @param projectDir - Host directory, or undefined when no tree is available
|
|
25
|
+
* @param readApplyingVersion - Reports the Lisa version performing the apply
|
|
26
|
+
* @param invokingPackageManager - Manager that launched this apply, if any
|
|
27
|
+
* @param mentioned - Packages the host names outside its manifest, which a
|
|
28
|
+
* dependency `adopt` entry must never delete
|
|
29
|
+
* @returns Modified package.json plus operator-visible notes
|
|
30
|
+
*/
|
|
31
|
+
export declare function applyHostFittedTemplate(projectJson: Record<string, unknown>, template: ResolvedPackageLisaTemplate, restricted: boolean, projectDir: string | undefined, readApplyingVersion: () => string, invokingPackageManager: string | undefined, mentioned: ReadonlySet<string>): PackageJsonPlan;
|
|
32
|
+
/**
|
|
33
|
+
* Apply force/defaults/merge/remove logic to project's package.json
|
|
34
|
+
* @remarks
|
|
35
|
+
* Processing order:
|
|
36
|
+
* 1. Apply force: Deep merge with Lisa values winning (entire section replaced)
|
|
37
|
+
* 2. Apply defaults: Deep merge with project values winning (only set if missing)
|
|
38
|
+
* 3. Apply merge: Concatenate arrays and deduplicate
|
|
39
|
+
* 4. Apply remove: Delete retired keys from their sections (runs last so an
|
|
40
|
+
* earlier phase cannot reintroduce a removed key)
|
|
41
|
+
* @param projectJson - Current project's package.json
|
|
42
|
+
* @param template - Merged package.lisa.json template
|
|
43
|
+
* @param fileName - Basename used in error messages
|
|
44
|
+
* @param restricted - True when the template was reduced to security pins,
|
|
45
|
+
* which is the postinstall path and Lisa's own repository
|
|
46
|
+
* @param readApplyingVersion - Reports the Lisa version performing the apply;
|
|
47
|
+
* only called on an unrestricted apply
|
|
48
|
+
* @param mentioned - Packages the host names outside its manifest. Omitted,
|
|
49
|
+
* every package counts as mentioned and no dependency is reclaimed.
|
|
50
|
+
* @returns Modified package.json plus operator-visible notes
|
|
51
|
+
*/
|
|
52
|
+
export declare function applyTemplate(projectJson: Record<string, unknown>, template: ResolvedPackageLisaTemplate, fileName: string, restricted: boolean, readApplyingVersion: () => string, mentioned?: ReadonlySet<string>): PackageJsonPlan;
|
|
53
|
+
//# sourceMappingURL=package-lisa-template-apply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-lisa-template-apply.d.ts","sourceRoot":"","sources":["../../src/strategies/package-lisa-template-apply.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,eAAe,EACf,2BAA2B,EAC5B,MAAM,yBAAyB,CAAC;AAajC;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,SAAS,MAAM,EAAE,CAQnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,QAAQ,EAAE,2BAA2B,GACpC,SAAS,MAAM,EAAE,CAenB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,QAAQ,EAAE,2BAA2B,EACrC,UAAU,EAAE,OAAO,EACnB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,mBAAmB,EAAE,MAAM,MAAM,EACjC,sBAAsB,EAAE,MAAM,GAAG,SAAS,EAC1C,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,GAC7B,eAAe,CAiBjB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,QAAQ,EAAE,2BAA2B,EACrC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,OAAO,EACnB,mBAAmB,EAAE,MAAM,MAAM,EACjC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC9B,eAAe,CA+CjB"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file package-lisa-template-apply.ts
|
|
3
|
+
* @description Applies a resolved package.lisa.json template to a host
|
|
4
|
+
* package.json: force, adopt, defaults, merge and remove, then the Lisa pin and
|
|
5
|
+
* the operator notes.
|
|
6
|
+
* @module strategies
|
|
7
|
+
*/
|
|
8
|
+
import { asRecord } from "../core/override-floors.js";
|
|
9
|
+
import { deepMerge } from "../utils/json-utils.js";
|
|
10
|
+
import { deduplicateArrays } from "./deduplicate-arrays.js";
|
|
11
|
+
import { detectHostPackageManager, fitDevEnginesToHost, retireDevEnginesFloor, } from "./package-lisa-dev-engines.js";
|
|
12
|
+
import { preserveHigherHostPins } from "./package-lisa-host-pins.js";
|
|
13
|
+
import { alignLisaPin } from "./package-lisa-pin-alignment.js";
|
|
14
|
+
import { describeScriptChanges } from "./package-lisa-script-notes.js";
|
|
15
|
+
/** The manifest name used in error messages. */
|
|
16
|
+
const PACKAGE_JSON = "package.json";
|
|
17
|
+
/** Sections whose keys name packages a host's code may import. */
|
|
18
|
+
const DEPENDENCY_SECTIONS = new Set([
|
|
19
|
+
"dependencies",
|
|
20
|
+
"devDependencies",
|
|
21
|
+
"optionalDependencies",
|
|
22
|
+
"peerDependencies",
|
|
23
|
+
]);
|
|
24
|
+
/**
|
|
25
|
+
* Every package a manifest declares, in any dependency section.
|
|
26
|
+
* @param projectJson - Host package.json as read
|
|
27
|
+
* @returns Package names, each at most once
|
|
28
|
+
*/
|
|
29
|
+
export function declaredDependencies(projectJson) {
|
|
30
|
+
return [
|
|
31
|
+
...new Set([...DEPENDENCY_SECTIONS].flatMap(section => Object.keys(asRecord(projectJson[section])))),
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Dependencies an `adopt` entry would delete, before the mention check runs.
|
|
36
|
+
* @remarks
|
|
37
|
+
* Only these are worth asking git about: a key the template forces is never
|
|
38
|
+
* reclaimed, and one holding a value Lisa did not write is the host's own.
|
|
39
|
+
* @param projectJson - Host package.json as read
|
|
40
|
+
* @param template - Resolved template carrying the adopt section
|
|
41
|
+
* @returns Package names, each at most once
|
|
42
|
+
*/
|
|
43
|
+
export function adoptableDependencies(projectJson, template) {
|
|
44
|
+
const names = Object.entries(template.adopt)
|
|
45
|
+
.filter(([sectionName]) => DEPENDENCY_SECTIONS.has(sectionName))
|
|
46
|
+
.flatMap(([sectionName, recognised]) => {
|
|
47
|
+
const forcedHere = asRecord(asRecord(template.force)[sectionName]);
|
|
48
|
+
return Object.entries(asRecord(projectJson[sectionName])).flatMap(([key, value]) => typeof value === "string" &&
|
|
49
|
+
!(key in forcedHere) &&
|
|
50
|
+
(recognised[key] ?? []).includes(value)
|
|
51
|
+
? [key]
|
|
52
|
+
: []);
|
|
53
|
+
});
|
|
54
|
+
return [...new Set(names)];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Apply the template after fitting its forced package-manager floor to the
|
|
58
|
+
* host's manager, so a bun host never receives an npm floor (#4848).
|
|
59
|
+
* @param projectJson - Current project's package.json
|
|
60
|
+
* @param template - Merged package.lisa.json template
|
|
61
|
+
* @param restricted - True when the template was reduced to security pins
|
|
62
|
+
* @param projectDir - Host directory, or undefined when no tree is available
|
|
63
|
+
* @param readApplyingVersion - Reports the Lisa version performing the apply
|
|
64
|
+
* @param invokingPackageManager - Manager that launched this apply, if any
|
|
65
|
+
* @param mentioned - Packages the host names outside its manifest, which a
|
|
66
|
+
* dependency `adopt` entry must never delete
|
|
67
|
+
* @returns Modified package.json plus operator-visible notes
|
|
68
|
+
*/
|
|
69
|
+
export function applyHostFittedTemplate(projectJson, template, restricted, projectDir, readApplyingVersion, invokingPackageManager, mentioned) {
|
|
70
|
+
const fitted = fitDevEnginesToHost(template, detectHostPackageManager(projectDir, projectJson, invokingPackageManager), projectJson);
|
|
71
|
+
const applied = applyTemplate(projectJson, fitted.template, PACKAGE_JSON, restricted, readApplyingVersion, mentioned);
|
|
72
|
+
return fitted.retire
|
|
73
|
+
? { ...applied, packageJson: retireDevEnginesFloor(applied.packageJson) }
|
|
74
|
+
: applied;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Apply force/defaults/merge/remove logic to project's package.json
|
|
78
|
+
* @remarks
|
|
79
|
+
* Processing order:
|
|
80
|
+
* 1. Apply force: Deep merge with Lisa values winning (entire section replaced)
|
|
81
|
+
* 2. Apply defaults: Deep merge with project values winning (only set if missing)
|
|
82
|
+
* 3. Apply merge: Concatenate arrays and deduplicate
|
|
83
|
+
* 4. Apply remove: Delete retired keys from their sections (runs last so an
|
|
84
|
+
* earlier phase cannot reintroduce a removed key)
|
|
85
|
+
* @param projectJson - Current project's package.json
|
|
86
|
+
* @param template - Merged package.lisa.json template
|
|
87
|
+
* @param fileName - Basename used in error messages
|
|
88
|
+
* @param restricted - True when the template was reduced to security pins,
|
|
89
|
+
* which is the postinstall path and Lisa's own repository
|
|
90
|
+
* @param readApplyingVersion - Reports the Lisa version performing the apply;
|
|
91
|
+
* only called on an unrestricted apply
|
|
92
|
+
* @param mentioned - Packages the host names outside its manifest. Omitted,
|
|
93
|
+
* every package counts as mentioned and no dependency is reclaimed.
|
|
94
|
+
* @returns Modified package.json plus operator-visible notes
|
|
95
|
+
*/
|
|
96
|
+
export function applyTemplate(projectJson, template, fileName, restricted, readApplyingVersion, mentioned) {
|
|
97
|
+
// Phase 1: Apply force (Lisa's values completely replace project's), then
|
|
98
|
+
// restore any dependency pin the host had raised ABOVE Lisa's floor.
|
|
99
|
+
const afterForce = preserveHigherHostPins(projectJson, deepMerge(projectJson, template.force), fileName);
|
|
100
|
+
// Phase 1.5: Reclaim keys still carrying a value Lisa itself wrote, so the
|
|
101
|
+
// defaults phase can install the current one. A host value Lisa does not
|
|
102
|
+
// recognise as its own is left alone — that is the whole point.
|
|
103
|
+
const afterAdopt = applyAdoptSections(afterForce.packageJson, template, name => mentioned === undefined || mentioned.has(name));
|
|
104
|
+
// Phase 2: Apply defaults (project's values preserved, Lisa provides fallback)
|
|
105
|
+
const afterDefaults = deepMerge(template.defaults, afterAdopt);
|
|
106
|
+
// Phase 3: Apply merge (concatenate and deduplicate arrays)
|
|
107
|
+
const afterMerge = applyMergeSections(afterDefaults, template.merge);
|
|
108
|
+
// Phase 4: Apply remove (delete retired keys from their sections)
|
|
109
|
+
const afterRemove = applyRemoveSections(afterMerge, template.remove);
|
|
110
|
+
// Phase 5: Make the host's pin name the version that wrote these templates.
|
|
111
|
+
// A restricted apply is the postinstall path, where the installed package
|
|
112
|
+
// IS the applying version, so there is nothing to reconcile — and rewriting
|
|
113
|
+
// the host's manifest from inside their `install` is not this phase's to do.
|
|
114
|
+
const pinned = restricted
|
|
115
|
+
? { packageJson: afterRemove, notes: [] }
|
|
116
|
+
: alignLisaPin(afterRemove, readApplyingVersion());
|
|
117
|
+
// Phase 6: Say out loud what the host lost, and which gates nothing runs.
|
|
118
|
+
return {
|
|
119
|
+
packageJson: pinned.packageJson,
|
|
120
|
+
notes: [
|
|
121
|
+
...afterForce.notes,
|
|
122
|
+
...pinned.notes,
|
|
123
|
+
...describeScriptChanges(projectJson, pinned.packageJson, template),
|
|
124
|
+
],
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Drop every key still carrying a value Lisa itself wrote.
|
|
129
|
+
* @remarks
|
|
130
|
+
* The deletion is what lets the `defaults` phase, which never overwrites, reach
|
|
131
|
+
* a key Lisa used to force. Nothing else is touched: a value absent from the
|
|
132
|
+
* adopt list is the host's own work by definition, and keeping it is the entire
|
|
133
|
+
* behaviour this exists to provide.
|
|
134
|
+
*
|
|
135
|
+
* A dependency needs one more proof than a script. Keeping the version Lisa
|
|
136
|
+
* wrote says nothing about whether the host imports the package, so a
|
|
137
|
+
* dependency key is cleared only when the host also never mentions it
|
|
138
|
+
* (CodySwannGT/lisa#4932, `package-mentions.ts`).
|
|
139
|
+
* @param packageJson - The document as the force phase left it
|
|
140
|
+
* @param template - Resolved template carrying the adopt section
|
|
141
|
+
* @param isMentioned - Whether the host names a package outside its manifest
|
|
142
|
+
* @returns The document with Lisa-authored values cleared
|
|
143
|
+
*/
|
|
144
|
+
function applyAdoptSections(packageJson, template, isMentioned) {
|
|
145
|
+
return Object.entries(template.adopt).reduce((document, [sectionName, recognised]) => {
|
|
146
|
+
const section = document[sectionName];
|
|
147
|
+
if (!isPlainSection(section)) {
|
|
148
|
+
return document;
|
|
149
|
+
}
|
|
150
|
+
// A key the template also FORCES already holds Lisa's current value.
|
|
151
|
+
// Clearing it would delete what force just wrote and leave the key to
|
|
152
|
+
// whatever `defaults` happens to carry — so force wins, and adopt is a
|
|
153
|
+
// no-op there. Adopt only has meaning for a key Lisa has handed back.
|
|
154
|
+
const forcedHere = asRecord(asRecord(template.force)[sectionName]);
|
|
155
|
+
const guarded = DEPENDENCY_SECTIONS.has(sectionName);
|
|
156
|
+
const entries = Object.entries(section);
|
|
157
|
+
const kept = entries.filter(([key, value]) => typeof value !== "string" ||
|
|
158
|
+
key in forcedHere ||
|
|
159
|
+
!(recognised[key] ?? []).includes(value) ||
|
|
160
|
+
(guarded && isMentioned(key)));
|
|
161
|
+
if (kept.length === entries.length) {
|
|
162
|
+
return document;
|
|
163
|
+
}
|
|
164
|
+
return { ...document, [sectionName]: Object.fromEntries(kept) };
|
|
165
|
+
}, packageJson);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Is this package.json value a section object whose keys can be edited?
|
|
169
|
+
* @param section - The value found under a section name
|
|
170
|
+
* @returns True for a plain, non-null, non-array object
|
|
171
|
+
*/
|
|
172
|
+
function isPlainSection(section) {
|
|
173
|
+
return (section !== null && typeof section === "object" && !Array.isArray(section));
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Delete retired keys from their package.json sections
|
|
177
|
+
* @remarks
|
|
178
|
+
* Used to clean up keys Lisa previously forced and has since renamed or
|
|
179
|
+
* retired (e.g. the "knip" script renamed to "knip:check"). Runs after
|
|
180
|
+
* force/defaults/merge so a removed key cannot be reintroduced within the
|
|
181
|
+
* same apply. Sections that don't exist or aren't objects are left alone.
|
|
182
|
+
* @param packageJson - Current package.json after force/defaults/merge applied
|
|
183
|
+
* @param removeSections - Map of section name to keys to delete from it
|
|
184
|
+
* @returns Package.json with retired keys removed
|
|
185
|
+
*/
|
|
186
|
+
function applyRemoveSections(packageJson, removeSections) {
|
|
187
|
+
return Object.entries(removeSections).reduce((result, [sectionName, keysToRemove]) => {
|
|
188
|
+
const section = result[sectionName];
|
|
189
|
+
// A missing or falsy section, or one that is not a plain object, has
|
|
190
|
+
// nothing to remove.
|
|
191
|
+
if (!section || !isPlainSection(section)) {
|
|
192
|
+
return result;
|
|
193
|
+
}
|
|
194
|
+
const cleaned = Object.fromEntries(Object.entries(section).filter(([key]) => !keysToRemove.includes(key)));
|
|
195
|
+
return { ...result, [sectionName]: cleaned };
|
|
196
|
+
}, { ...packageJson });
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Apply merge-section arrays to package.json
|
|
200
|
+
* Concatenates Lisa's items and project's items, deduplicated by JSON.stringify equality.
|
|
201
|
+
* @param packageJson - Current package.json after force/defaults applied
|
|
202
|
+
* @param mergeSections - Merge sections from template
|
|
203
|
+
* @returns Package.json with merge sections applied
|
|
204
|
+
*/
|
|
205
|
+
function applyMergeSections(packageJson, mergeSections) {
|
|
206
|
+
return Object.entries(mergeSections).reduce((result, [key, lisaItems]) => {
|
|
207
|
+
const projectItems = result[key] || [];
|
|
208
|
+
// A field that exists but is not an array is replaced with Lisa's items;
|
|
209
|
+
// otherwise Lisa's items come first, then the project's unique items.
|
|
210
|
+
const merged = Array.isArray(projectItems)
|
|
211
|
+
? deduplicateArrays(lisaItems, projectItems)
|
|
212
|
+
: lisaItems;
|
|
213
|
+
return { ...result, [key]: merged };
|
|
214
|
+
}, { ...packageJson });
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=package-lisa-template-apply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-lisa-template-apply.js","sourceRoot":"","sources":["../../src/strategies/package-lisa-template-apply.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO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AAM,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACtC,CAAC,EACD,EAAE,GAAG,WAAW,EAAE,CACnB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ProjectType } from "../core/config.js";
|
|
2
|
+
import type { ResolvedPackageLisaTemplate } from "./package-lisa-types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Load and merge all package.lisa.json templates from type hierarchy
|
|
5
|
+
* @remarks
|
|
6
|
+
* Inheritance chain: all → typescript → specific types (expo, nestjs, cdk, npm-package)
|
|
7
|
+
* Child types override parent types in force, defaults, and merge sections.
|
|
8
|
+
* Templates are read one after another, in chain order, so the first unreadable
|
|
9
|
+
* template is the one that fails the resolution.
|
|
10
|
+
* @param lisaDir - Root Lisa directory path
|
|
11
|
+
* @param detectedTypes - Project types to load templates for
|
|
12
|
+
* @returns Merged template with force, defaults, merge sections
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadAndMergeTemplates(lisaDir: string, detectedTypes: readonly ProjectType[]): Promise<ResolvedPackageLisaTemplate>;
|
|
15
|
+
/**
|
|
16
|
+
* Reduce a resolved template to only the security-critical sections —
|
|
17
|
+
* `force.resolutions` and `force.overrides`, plus the retirements aimed at
|
|
18
|
+
* those same two sections — dropping force.scripts, defaults, merge, and
|
|
19
|
+
* every other retirement. Used during skip-git-check (postinstall) applies so
|
|
20
|
+
* dependency pins still apply without clobbering host config.
|
|
21
|
+
*
|
|
22
|
+
* Retiring an override is as security-critical as writing one, so it travels
|
|
23
|
+
* with them. Dropping it left a pin that turns out to be harmful with no way
|
|
24
|
+
* to reach a host through postinstall: the template stops forcing the key,
|
|
25
|
+
* but the copy already written into the host's package.json stays. That is
|
|
26
|
+
* how `brace-expansion >=5.0.9` would have survived its own removal.
|
|
27
|
+
* Retirements aimed at other sections stay behind, because deleting host
|
|
28
|
+
* scripts or dependencies is exactly the config clobbering this path avoids.
|
|
29
|
+
*
|
|
30
|
+
* The retained overrides/resolutions may contain `$name` self-references or
|
|
31
|
+
* literal pins that normalize to `$name` later. Both resolve against a direct
|
|
32
|
+
* dependency of that name. If the restricted template drops the backing direct
|
|
33
|
+
* dep, postinstall can validate against the host's wider range and fail the
|
|
34
|
+
* normalization guard. So we also pull the package's forced pin from
|
|
35
|
+
* force.dependencies / force.devDependencies into the restricted set.
|
|
36
|
+
* @param template - Fully merged template from the type hierarchy
|
|
37
|
+
* @returns Template carrying force.resolutions/force.overrides, the direct
|
|
38
|
+
* dependencies that back any direct-dependency override within them, and
|
|
39
|
+
* the retirements aimed at those same two sections
|
|
40
|
+
*/
|
|
41
|
+
export declare function restrictToSecurityPins(template: ResolvedPackageLisaTemplate): ResolvedPackageLisaTemplate;
|
|
42
|
+
//# sourceMappingURL=package-lisa-template-merge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-lisa-template-merge.d.ts","sourceRoot":"","sources":["../../src/strategies/package-lisa-template-merge.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQrD,OAAO,KAAK,EAEV,2BAA2B,EAC5B,MAAM,yBAAyB,CAAC;AAYjC;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,SAAS,WAAW,EAAE,GACpC,OAAO,CAAC,2BAA2B,CAAC,CActC;AA4GD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,2BAA2B,GACpC,2BAA2B,CA4B7B"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file package-lisa-template-merge.ts
|
|
3
|
+
* @description Resolves the package.lisa.json templates along a project's
|
|
4
|
+
* type-inheritance chain into one template, and reduces it to the security
|
|
5
|
+
* pins the postinstall path may apply.
|
|
6
|
+
* @module strategies
|
|
7
|
+
*/
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { PROJECT_TYPE_HIERARCHY, PROJECT_TYPE_ORDER } from "../core/config.js";
|
|
10
|
+
import { asRecord, OVERRIDE_SECTIONS } from "../core/override-floors.js";
|
|
11
|
+
import { deepMerge, readJsonOrNull } from "../utils/json-utils.js";
|
|
12
|
+
import { collectDollarReferences, collectLiteralOverrideNames, } from "./package-lisa-manifest-guards.js";
|
|
13
|
+
/** The template every resolution starts from: every section empty. */
|
|
14
|
+
const EMPTY_TEMPLATE = {
|
|
15
|
+
force: {},
|
|
16
|
+
defaults: {},
|
|
17
|
+
merge: {},
|
|
18
|
+
remove: {},
|
|
19
|
+
adopt: {},
|
|
20
|
+
minimums: {},
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Load and merge all package.lisa.json templates from type hierarchy
|
|
24
|
+
* @remarks
|
|
25
|
+
* Inheritance chain: all → typescript → specific types (expo, nestjs, cdk, npm-package)
|
|
26
|
+
* Child types override parent types in force, defaults, and merge sections.
|
|
27
|
+
* Templates are read one after another, in chain order, so the first unreadable
|
|
28
|
+
* template is the one that fails the resolution.
|
|
29
|
+
* @param lisaDir - Root Lisa directory path
|
|
30
|
+
* @param detectedTypes - Project types to load templates for
|
|
31
|
+
* @returns Merged template with force, defaults, merge sections
|
|
32
|
+
*/
|
|
33
|
+
export async function loadAndMergeTemplates(lisaDir, detectedTypes) {
|
|
34
|
+
// Process types in order: all, then typescript, then specific types
|
|
35
|
+
const typesToProcess = ["all", ...expandTypeHierarchy(detectedTypes)];
|
|
36
|
+
return typesToProcess.reduce(async (pending, type) => {
|
|
37
|
+
const accumulator = await pending;
|
|
38
|
+
const template = await readJsonOrNull(path.join(lisaDir, type, "package-lisa", "package.lisa.json"));
|
|
39
|
+
// A missing template for this type is skipped; the child overrides the parent.
|
|
40
|
+
return template ? mergeTemplates(accumulator, template) : accumulator;
|
|
41
|
+
}, Promise.resolve(EMPTY_TEMPLATE));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Expand project types to include parent types, sorted by hierarchy order
|
|
45
|
+
* @remarks
|
|
46
|
+
* Type hierarchy: expo/nestjs/cdk/npm-package inherit from typescript
|
|
47
|
+
* This expands a list to include parents and sorts by PROJECT_TYPE_ORDER
|
|
48
|
+
* so parents are processed before children (enabling child overrides).
|
|
49
|
+
* Example: [cdk] → [typescript, cdk]
|
|
50
|
+
* @param types - Project types detected
|
|
51
|
+
* @returns Expanded types including parents, sorted parents-first
|
|
52
|
+
*/
|
|
53
|
+
function expandTypeHierarchy(types) {
|
|
54
|
+
const parents = types.flatMap(type => {
|
|
55
|
+
const parent = PROJECT_TYPE_HIERARCHY[type];
|
|
56
|
+
return parent ? [parent] : [];
|
|
57
|
+
});
|
|
58
|
+
return Array.from(new Set([...types, ...parents])).sort((a, b) => PROJECT_TYPE_ORDER.indexOf(a) - PROJECT_TYPE_ORDER.indexOf(b));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Merge two template objects
|
|
62
|
+
* Child template (override) values win in force and defaults.
|
|
63
|
+
* Merge and remove arrays are concatenated without deduplication at merge time.
|
|
64
|
+
* @param parent - Parent template (e.g., "all" or "typescript")
|
|
65
|
+
* @param child - Child template (e.g., "expo") that overrides parent
|
|
66
|
+
* @returns Merged template
|
|
67
|
+
*/
|
|
68
|
+
function mergeTemplates(parent, child) {
|
|
69
|
+
return {
|
|
70
|
+
force: deepMerge(parent.force, child.force || {}),
|
|
71
|
+
defaults: deepMerge(parent.defaults, child.defaults || {}),
|
|
72
|
+
merge: mergeMergeSections(parent.merge, child.merge || {}),
|
|
73
|
+
remove: mergeMergeSections(parent.remove, child.remove || {}),
|
|
74
|
+
adopt: mergeAdoptSections(parent.adopt, child.adopt || {}),
|
|
75
|
+
minimums: { ...parent.minimums, ...child.minimums },
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Merge two merge-section objects
|
|
80
|
+
* Arrays are concatenated (deduplication happens later when applied to package.json)
|
|
81
|
+
* @param parent - Parent merge sections
|
|
82
|
+
* @param child - Child merge sections
|
|
83
|
+
* @returns Merged sections, parent keys first in their original order
|
|
84
|
+
*/
|
|
85
|
+
function mergeMergeSections(parent, child) {
|
|
86
|
+
return Object.entries(child).reduce((result, [key, value]) => ({
|
|
87
|
+
...result,
|
|
88
|
+
[key]: key in result ? [...result[key], ...value] : value,
|
|
89
|
+
}), { ...parent });
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Merge two `adopt` sections, taking the UNION of the recognised values.
|
|
93
|
+
* @remarks
|
|
94
|
+
* Union, not child-overrides-parent as `force` and `defaults` use. Every entry
|
|
95
|
+
* is a value Lisa is known to have written, and a host may have taken any of
|
|
96
|
+
* them from any layer of the chain it has passed through. Dropping the parent's
|
|
97
|
+
* list would stop recognising a value Lisa really did author, and the cost of
|
|
98
|
+
* that is not cosmetic: the host gets warned that it customised something it
|
|
99
|
+
* never touched, and stops tracking the template.
|
|
100
|
+
* @param parent - Parent template's adopt section
|
|
101
|
+
* @param child - Child template's adopt section
|
|
102
|
+
* @returns Per-section, per-key union of the two, order-preserving and deduped
|
|
103
|
+
*/
|
|
104
|
+
function mergeAdoptSections(parent, child) {
|
|
105
|
+
const sections = new Set([...Object.keys(parent), ...Object.keys(child)]);
|
|
106
|
+
return Object.fromEntries(Array.from(sections).map(section => {
|
|
107
|
+
const parentKeys = parent[section] ?? {};
|
|
108
|
+
const childKeys = child[section] ?? {};
|
|
109
|
+
const keys = new Set([
|
|
110
|
+
...Object.keys(parentKeys),
|
|
111
|
+
...Object.keys(childKeys),
|
|
112
|
+
]);
|
|
113
|
+
return [
|
|
114
|
+
section,
|
|
115
|
+
Object.fromEntries(Array.from(keys).map(key => [
|
|
116
|
+
key,
|
|
117
|
+
Array.from(new Set([...(parentKeys[key] ?? []), ...(childKeys[key] ?? [])])),
|
|
118
|
+
])),
|
|
119
|
+
];
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Reduce a resolved template to only the security-critical sections —
|
|
124
|
+
* `force.resolutions` and `force.overrides`, plus the retirements aimed at
|
|
125
|
+
* those same two sections — dropping force.scripts, defaults, merge, and
|
|
126
|
+
* every other retirement. Used during skip-git-check (postinstall) applies so
|
|
127
|
+
* dependency pins still apply without clobbering host config.
|
|
128
|
+
*
|
|
129
|
+
* Retiring an override is as security-critical as writing one, so it travels
|
|
130
|
+
* with them. Dropping it left a pin that turns out to be harmful with no way
|
|
131
|
+
* to reach a host through postinstall: the template stops forcing the key,
|
|
132
|
+
* but the copy already written into the host's package.json stays. That is
|
|
133
|
+
* how `brace-expansion >=5.0.9` would have survived its own removal.
|
|
134
|
+
* Retirements aimed at other sections stay behind, because deleting host
|
|
135
|
+
* scripts or dependencies is exactly the config clobbering this path avoids.
|
|
136
|
+
*
|
|
137
|
+
* The retained overrides/resolutions may contain `$name` self-references or
|
|
138
|
+
* literal pins that normalize to `$name` later. Both resolve against a direct
|
|
139
|
+
* dependency of that name. If the restricted template drops the backing direct
|
|
140
|
+
* dep, postinstall can validate against the host's wider range and fail the
|
|
141
|
+
* normalization guard. So we also pull the package's forced pin from
|
|
142
|
+
* force.dependencies / force.devDependencies into the restricted set.
|
|
143
|
+
* @param template - Fully merged template from the type hierarchy
|
|
144
|
+
* @returns Template carrying force.resolutions/force.overrides, the direct
|
|
145
|
+
* dependencies that back any direct-dependency override within them, and
|
|
146
|
+
* the retirements aimed at those same two sections
|
|
147
|
+
*/
|
|
148
|
+
export function restrictToSecurityPins(template) {
|
|
149
|
+
const pins = {
|
|
150
|
+
...(template.force.resolutions === undefined
|
|
151
|
+
? {}
|
|
152
|
+
: { resolutions: template.force.resolutions }),
|
|
153
|
+
...(template.force.overrides === undefined
|
|
154
|
+
? {}
|
|
155
|
+
: { overrides: template.force.overrides }),
|
|
156
|
+
};
|
|
157
|
+
const force = { ...pins, ...backingDirectDeps(template, pins) };
|
|
158
|
+
const remove = Object.fromEntries(OVERRIDE_SECTIONS.filter(section => template.remove[section] !== undefined).map(section => [section, template.remove[section]]));
|
|
159
|
+
// `adopt` reclaims a key so `defaults` can rewrite it, and `defaults` is
|
|
160
|
+
// dropped here — carrying it alone would delete a host script and put
|
|
161
|
+
// nothing back.
|
|
162
|
+
// A minimum is a library choice, not a security pin, so the postinstall
|
|
163
|
+
// path leaves it to the full apply.
|
|
164
|
+
return {
|
|
165
|
+
force,
|
|
166
|
+
defaults: {},
|
|
167
|
+
merge: {},
|
|
168
|
+
remove,
|
|
169
|
+
adopt: {},
|
|
170
|
+
minimums: {},
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* For every direct-dependency override in the restricted overrides/resolutions,
|
|
175
|
+
* find the forced pin for `name` in the full template's force.dependencies /
|
|
176
|
+
* force.devDependencies, so the backing direct dependency is materialized. A
|
|
177
|
+
* devDependencies pin wins over dependencies when both exist.
|
|
178
|
+
* @param template - Fully merged template (source of the forced dep pins)
|
|
179
|
+
* @param pins - The restricted force section's overrides and resolutions
|
|
180
|
+
* @returns `devDependencies` and/or `dependencies` sections to add to the
|
|
181
|
+
* restricted force section, each present only when it has an entry
|
|
182
|
+
*/
|
|
183
|
+
function backingDirectDeps(template, pins) {
|
|
184
|
+
const sections = [pins.resolutions, pins.overrides];
|
|
185
|
+
const referenced = Array.from(new Set([
|
|
186
|
+
...collectDollarReferences(sections),
|
|
187
|
+
...collectLiteralOverrideNames(sections),
|
|
188
|
+
]));
|
|
189
|
+
const forceDeps = asRecord(template.force.dependencies);
|
|
190
|
+
const forceDevDeps = asRecord(template.force.devDependencies);
|
|
191
|
+
const devDeps = Object.fromEntries(referenced
|
|
192
|
+
.filter(name => forceDevDeps[name] !== undefined)
|
|
193
|
+
.map(name => [name, forceDevDeps[name]]));
|
|
194
|
+
const deps = Object.fromEntries(referenced
|
|
195
|
+
.filter(name => forceDevDeps[name] === undefined && forceDeps[name] !== undefined)
|
|
196
|
+
.map(name => [name, forceDeps[name]]));
|
|
197
|
+
return {
|
|
198
|
+
...(Object.keys(devDeps).length > 0 ? { devDependencies: devDeps } : {}),
|
|
199
|
+
...(Object.keys(deps).length > 0 ? { dependencies: deps } : {}),
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=package-lisa-template-merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-lisa-template-merge.js","sourceRoot":"","sources":["../../src/strategies/package-lisa-template-merge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EACL,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,mCAAmC,CAAC;AAM3C,sEAAsE;AACtE,MAAM,cAAc,GAAgC;IAClD,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,EAAE;IACZ,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,EAAE;CACb,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAAe,EACf,aAAqC;IAErC,oEAAoE;IACpE,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,GAAG,mBAAmB,CAAC,aAAa,CAAC,CAAC,CAAC;IACtE,OAAO,cAAc,CAAC,MAAM,CAC1B,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QACtB,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC;QAClC,MAAM,QAAQ,GAAG,MAAM,cAAc,CACnC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,mBAAmB,CAAC,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C,CACxC,CAAC;IACF,OAAO;QACL,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -137,5 +137,10 @@ export interface ResolvedPackageLisaTemplate extends PackageLisaTemplate {
|
|
|
137
137
|
adopt: Record<string, Record<string, string[]>>;
|
|
138
138
|
minimums: Record<string, string>;
|
|
139
139
|
}
|
|
140
|
+
/** Planned package.json content plus messages the operator should see. */
|
|
141
|
+
export interface PackageJsonPlan {
|
|
142
|
+
readonly packageJson: Record<string, unknown>;
|
|
143
|
+
readonly notes: readonly string[];
|
|
144
|
+
}
|
|
140
145
|
export {};
|
|
141
146
|
//# sourceMappingURL=package-lisa-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-lisa-types.d.ts","sourceRoot":"","sources":["../../src/strategies/package-lisa-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;GAIG;AACH,UAAU,YAAY;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;GAKG;AACH,UAAU,eAAe;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,UAAU,YAAY;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,UAAU,aAAa;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;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