@intentius/chant 0.124.51 → 0.124.54
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/dist/audit/discover.d.ts.map +1 -1
- package/dist/audit/discover.js +3 -1
- package/dist/behaviour.d.ts +1 -1
- package/dist/behaviour.d.ts.map +1 -1
- package/dist/capabilities/templates.d.ts +65 -0
- package/dist/capabilities/templates.d.ts.map +1 -0
- package/dist/capabilities/templates.js +193 -0
- package/dist/capabilities/templates.json +145 -0
- package/dist/change-set-graph.d.ts +35 -3
- package/dist/change-set-graph.d.ts.map +1 -1
- package/dist/change-set-graph.js +60 -9
- package/dist/change-set.d.ts +65 -7
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +23 -12
- package/dist/ci-identity.d.ts +7 -2
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +4 -1
- package/dist/cli/commands/import-index.d.ts +52 -0
- package/dist/cli/commands/import-index.d.ts.map +1 -0
- package/dist/cli/commands/import-index.js +226 -0
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +4 -2
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/components.js +11 -2
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +16 -3
- package/dist/cli/handlers/graph.d.ts.map +1 -1
- package/dist/cli/handlers/graph.js +22 -4
- package/dist/cli/handlers/index-cloud.d.ts +14 -0
- package/dist/cli/handlers/index-cloud.d.ts.map +1 -0
- package/dist/cli/handlers/index-cloud.js +22 -0
- package/dist/cli/handlers/index-diff.d.ts +18 -0
- package/dist/cli/handlers/index-diff.d.ts.map +1 -0
- package/dist/cli/handlers/index-diff.js +142 -0
- package/dist/cli/handlers/lifecycle-drift.d.ts +25 -0
- package/dist/cli/handlers/lifecycle-drift.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle-drift.js +64 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +188 -28
- package/dist/cli/handlers/misc.d.ts +9 -0
- package/dist/cli/handlers/misc.d.ts.map +1 -1
- package/dist/cli/handlers/misc.js +77 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +17 -3
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +89 -15
- package/dist/cli/handlers/query.d.ts.map +1 -1
- package/dist/cli/handlers/query.js +28 -4
- package/dist/cli/handlers/scenario.d.ts.map +1 -1
- package/dist/cli/handlers/scenario.js +8 -7
- package/dist/cli/handlers/search.d.ts +34 -4
- package/dist/cli/handlers/search.d.ts.map +1 -1
- package/dist/cli/handlers/search.js +216 -36
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +55 -1
- package/dist/cli/mcp/lifecycle-tools.d.ts.map +1 -1
- package/dist/cli/mcp/lifecycle-tools.js +3 -2
- package/dist/cli/mcp/resource-handlers.d.ts.map +1 -1
- package/dist/cli/mcp/resource-handlers.js +4 -3
- package/dist/cli/mcp/workspace-tools.js +1 -1
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +55 -2
- package/dist/cli/registry.d.ts +19 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cloud-lister/aws.d.ts +35 -0
- package/dist/cloud-lister/aws.d.ts.map +1 -0
- package/dist/cloud-lister/aws.js +203 -0
- package/dist/cloud-lister/azure.d.ts +34 -0
- package/dist/cloud-lister/azure.d.ts.map +1 -0
- package/dist/cloud-lister/azure.js +129 -0
- package/dist/cloud-lister/common.d.ts +40 -0
- package/dist/cloud-lister/common.d.ts.map +1 -0
- package/dist/cloud-lister/common.js +83 -0
- package/dist/cloud-lister/credentials.d.ts +50 -0
- package/dist/cloud-lister/credentials.d.ts.map +1 -0
- package/dist/cloud-lister/credentials.js +86 -0
- package/dist/cloud-lister/fakes.d.ts +27 -0
- package/dist/cloud-lister/fakes.d.ts.map +1 -0
- package/dist/cloud-lister/fakes.js +50 -0
- package/dist/cloud-lister/gcp.d.ts +42 -0
- package/dist/cloud-lister/gcp.d.ts.map +1 -0
- package/dist/cloud-lister/gcp.js +143 -0
- package/dist/cloud-lister/guard.d.ts +49 -0
- package/dist/cloud-lister/guard.d.ts.map +1 -0
- package/dist/cloud-lister/guard.js +103 -0
- package/dist/cloud-lister/ids.d.ts +23 -0
- package/dist/cloud-lister/ids.d.ts.map +1 -0
- package/dist/cloud-lister/ids.js +42 -0
- package/dist/cloud-lister/index.d.ts +67 -0
- package/dist/cloud-lister/index.d.ts.map +1 -0
- package/dist/cloud-lister/index.js +102 -0
- package/dist/cloud-lister/kubernetes.d.ts +64 -0
- package/dist/cloud-lister/kubernetes.d.ts.map +1 -0
- package/dist/cloud-lister/kubernetes.js +276 -0
- package/dist/cloud-lister/markers.d.ts +31 -0
- package/dist/cloud-lister/markers.d.ts.map +1 -0
- package/dist/cloud-lister/markers.js +73 -0
- package/dist/cloud-lister/mask.d.ts +31 -0
- package/dist/cloud-lister/mask.d.ts.map +1 -0
- package/dist/cloud-lister/mask.js +74 -0
- package/dist/cloud-lister/sigv4.d.ts +29 -0
- package/dist/cloud-lister/sigv4.d.ts.map +1 -0
- package/dist/cloud-lister/sigv4.js +54 -0
- package/dist/cloud-lister/transport.d.ts +55 -0
- package/dist/cloud-lister/transport.d.ts.map +1 -0
- package/dist/cloud-lister/transport.js +86 -0
- package/dist/cloud-lister/types.d.ts +121 -0
- package/dist/cloud-lister/types.d.ts.map +1 -0
- package/dist/cloud-lister/types.js +24 -0
- package/dist/components/capability-plugin-loader.d.ts.map +1 -1
- package/dist/components/capability-plugin-loader.js +6 -0
- package/dist/components/capability-plugin.d.ts +9 -0
- package/dist/components/capability-plugin.d.ts.map +1 -1
- package/dist/components/capability.d.ts +224 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +21 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +58 -14
- package/dist/components/covered-round.d.ts +173 -0
- package/dist/components/covered-round.d.ts.map +1 -0
- package/dist/components/covered-round.js +200 -0
- package/dist/components/declared-reads.d.ts +38 -0
- package/dist/components/declared-reads.d.ts.map +1 -0
- package/dist/components/declared-reads.js +131 -0
- package/dist/components/deploy-units.d.ts.map +1 -1
- package/dist/components/deploy-units.js +4 -0
- package/dist/components/driver.d.ts +42 -1
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +74 -3
- package/dist/components/fan-out-run.d.ts +23 -1
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +82 -14
- package/dist/components/fan-out-support.d.ts +6 -0
- package/dist/components/fan-out-support.d.ts.map +1 -1
- package/dist/components/fan-out-support.js +4 -1
- package/dist/components/fan-out.d.ts +28 -0
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/groups.d.ts +229 -0
- package/dist/components/groups.d.ts.map +1 -0
- package/dist/components/groups.js +760 -0
- package/dist/components/index.d.ts +7 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -0
- package/dist/components/plan-shape-conformance.d.ts +48 -0
- package/dist/components/plan-shape-conformance.d.ts.map +1 -0
- package/dist/components/plan-shape-conformance.js +122 -0
- package/dist/components/pr-run.d.ts +62 -7
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +354 -53
- package/dist/components/promote-rounds.d.ts +9 -0
- package/dist/components/promote-rounds.d.ts.map +1 -1
- package/dist/components/promote-rounds.js +23 -2
- package/dist/components/promote.d.ts +17 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +36 -6
- package/dist/components/release-gate.d.ts +23 -1
- package/dist/components/release-gate.d.ts.map +1 -1
- package/dist/components/release-gate.js +97 -33
- package/dist/components/run-groups.d.ts +58 -0
- package/dist/components/run-groups.d.ts.map +1 -0
- package/dist/components/run-groups.js +78 -0
- package/dist/components/starter-plugin.d.ts +1 -0
- package/dist/components/starter-plugin.d.ts.map +1 -1
- package/dist/components/starter-plugin.js +6 -1
- package/dist/components/verbs/index.d.ts +1 -0
- package/dist/components/verbs/index.d.ts.map +1 -1
- package/dist/components/verbs/index.js +1 -0
- package/dist/components/verbs/member-outputs.d.ts +187 -0
- package/dist/components/verbs/member-outputs.d.ts.map +1 -0
- package/dist/components/verbs/member-outputs.js +218 -0
- package/dist/components/wave-plan.d.ts +2 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +4 -1
- package/dist/config.d.ts +60 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +27 -0
- package/dist/deep-observation.d.ts +1 -13
- package/dist/deep-observation.d.ts.map +1 -1
- package/dist/deep-observation.js +5 -22
- package/dist/drift-record.d.ts +542 -0
- package/dist/drift-record.d.ts.map +1 -0
- package/dist/drift-record.js +886 -0
- package/dist/engine-facts.d.ts +144 -0
- package/dist/engine-facts.d.ts.map +1 -0
- package/dist/engine-facts.js +14 -0
- package/dist/graph-ir.d.ts +153 -2
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/graph-ir.js +224 -6
- package/dist/graph-refs.d.ts +145 -0
- package/dist/graph-refs.d.ts.map +1 -1
- package/dist/graph-refs.js +305 -0
- package/dist/graph-schema/fixtures/adopt.json +15 -0
- package/dist/graph-schema/fixtures/choudoufu.engine-graph.json +169 -0
- package/dist/graph-schema/fixtures/index.json +68 -0
- package/dist/graph-schema/fixtures/plunge.engine-graph.json +158 -0
- package/dist/graph-schema/fixtures.d.ts +23 -0
- package/dist/graph-schema/fixtures.d.ts.map +1 -0
- package/dist/graph-schema/fixtures.js +246 -0
- package/dist/graph-schema/generate.d.ts +15 -0
- package/dist/graph-schema/generate.d.ts.map +1 -0
- package/dist/graph-schema/generate.js +267 -0
- package/dist/graph-schema/graph.schema.json +1387 -0
- package/dist/health.schema.json +2 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/instance-nodes.d.ts +159 -0
- package/dist/instance-nodes.d.ts.map +1 -0
- package/dist/instance-nodes.js +231 -0
- package/dist/lexicon.d.ts +72 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/adoption-file.d.ts +56 -0
- package/dist/lifecycle/adoption-file.d.ts.map +1 -0
- package/dist/lifecycle/adoption-file.js +123 -0
- package/dist/lifecycle/cloud-index.d.ts +186 -0
- package/dist/lifecycle/cloud-index.d.ts.map +1 -0
- package/dist/lifecycle/cloud-index.js +618 -0
- package/dist/lifecycle/derive-edges.d.ts +59 -0
- package/dist/lifecycle/derive-edges.d.ts.map +1 -0
- package/dist/lifecycle/derive-edges.js +126 -0
- package/dist/lifecycle/git.d.ts +10 -9
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +7 -1
- package/dist/lifecycle/identity-match.d.ts +133 -0
- package/dist/lifecycle/identity-match.d.ts.map +1 -0
- package/dist/lifecycle/identity-match.js +147 -0
- package/dist/lifecycle/index-diff.d.ts +224 -0
- package/dist/lifecycle/index-diff.d.ts.map +1 -0
- package/dist/lifecycle/index-diff.js +327 -0
- package/dist/lifecycle/index-document.d.ts +130 -0
- package/dist/lifecycle/index-document.d.ts.map +1 -0
- package/dist/lifecycle/index-document.js +189 -0
- package/dist/lifecycle/index-drift.d.ts +121 -0
- package/dist/lifecycle/index-drift.d.ts.map +1 -0
- package/dist/lifecycle/index-drift.js +178 -0
- package/dist/lifecycle/index-import.d.ts +168 -0
- package/dist/lifecycle/index-import.d.ts.map +1 -0
- package/dist/lifecycle/index-import.js +515 -0
- package/dist/lifecycle/index-join.d.ts +129 -0
- package/dist/lifecycle/index-join.d.ts.map +1 -0
- package/dist/lifecycle/index-join.js +248 -0
- package/dist/lifecycle/index.d.ts +4 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/index.js +4 -0
- package/dist/lifecycle/observation-baseline.d.ts +61 -21
- package/dist/lifecycle/observation-baseline.d.ts.map +1 -1
- package/dist/lifecycle/observation-baseline.js +144 -19
- package/dist/lifecycle/observe.d.ts.map +1 -1
- package/dist/lifecycle/observe.js +6 -1
- package/dist/lifecycle/query.d.ts +45 -4
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +89 -7
- package/dist/lifecycle/replay.d.ts +10 -3
- package/dist/lifecycle/replay.d.ts.map +1 -1
- package/dist/lifecycle/replay.js +10 -6
- package/dist/lifecycle/scenario.d.ts +4 -3
- package/dist/lifecycle/scenario.d.ts.map +1 -1
- package/dist/lifecycle/snapshot-store-fake.d.ts +9 -0
- package/dist/lifecycle/snapshot-store-fake.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store-fake.js +21 -0
- package/dist/lifecycle/snapshot-store-s3.d.ts +102 -0
- package/dist/lifecycle/snapshot-store-s3.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store-s3.js +254 -0
- package/dist/lifecycle/snapshot-store.d.ts +170 -0
- package/dist/lifecycle/snapshot-store.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store.js +832 -0
- package/dist/lifecycle/snapshot.d.ts +11 -0
- package/dist/lifecycle/snapshot.d.ts.map +1 -1
- package/dist/lifecycle/snapshot.js +18 -5
- package/dist/lifecycle/type-listing.d.ts +148 -0
- package/dist/lifecycle/type-listing.d.ts.map +1 -0
- package/dist/lifecycle/type-listing.js +166 -0
- package/dist/lint/component-checks.d.ts +15 -1
- package/dist/lint/component-checks.d.ts.map +1 -1
- package/dist/lint/component-checks.js +1 -0
- package/dist/lint/presets/relaxed.json +2 -1
- package/dist/lint/presets/strict.json +2 -1
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.js +13 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.js +8 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.d.ts +33 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.js +123 -0
- package/dist/lint/rules/comp/index.d.ts +2 -1
- package/dist/lint/rules/comp/index.d.ts.map +1 -1
- package/dist/lint/rules/comp/index.js +4 -1
- package/dist/observation.d.ts +19 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +18 -1
- package/dist/op/activities/activity-contracts.d.ts +1 -1
- package/dist/op/activities/activity-contracts.js +1 -1
- package/dist/op/activities/change-set.d.ts +6 -4
- package/dist/op/activities/change-set.d.ts.map +1 -1
- package/dist/op/activities/change-set.js +4 -2
- package/dist/op/activity-failure.d.ts +27 -0
- package/dist/op/activity-failure.d.ts.map +1 -1
- package/dist/op/activity-failure.js +31 -0
- package/dist/op/index.d.ts +2 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -1
- package/dist/op/local-executor.d.ts +5 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-executor.js +22 -8
- package/dist/pr-loop.d.ts +92 -3
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +62 -3
- package/dist/pulumi-urn.d.ts +101 -0
- package/dist/pulumi-urn.d.ts.map +1 -0
- package/dist/pulumi-urn.js +131 -0
- package/dist/release-floors.d.ts +23 -0
- package/dist/release-floors.d.ts.map +1 -0
- package/dist/release-floors.js +22 -0
- package/dist/sensitive-key.d.ts +23 -0
- package/dist/sensitive-key.d.ts.map +1 -0
- package/dist/sensitive-key.js +31 -0
- package/dist/wave-runtime.mjs +234 -234
- package/dist/workspace/adoption-report.d.ts +53 -0
- package/dist/workspace/adoption-report.d.ts.map +1 -0
- package/dist/workspace/adoption-report.js +76 -0
- package/dist/workspace/capabilities-contract.d.ts +7 -0
- package/dist/workspace/capabilities-contract.d.ts.map +1 -1
- package/dist/workspace/capabilities-contract.js +2 -1
- package/dist/workspace/capabilities.schema.json +98 -0
- package/dist/workspace/change-set.schema.json +42 -3
- package/dist/workspace/ci-cloud-identity.d.ts +13 -1
- package/dist/workspace/ci-cloud-identity.d.ts.map +1 -1
- package/dist/workspace/ci-cloud-identity.js +30 -1
- package/dist/workspace/compose-graph.d.ts +10 -1
- package/dist/workspace/compose-graph.d.ts.map +1 -1
- package/dist/workspace/compose-graph.js +6 -1
- package/dist/workspace/conformance/index.d.ts +1 -1
- package/dist/workspace/conformance/index.d.ts.map +1 -1
- package/dist/workspace/conformance/index.js +6 -1
- package/dist/workspace/drift-cli.d.ts +81 -0
- package/dist/workspace/drift-cli.d.ts.map +1 -0
- package/dist/workspace/drift-cli.js +317 -0
- package/dist/workspace/drift.schema.json +672 -0
- package/dist/workspace/graph-cli.d.ts +2 -0
- package/dist/workspace/graph-cli.d.ts.map +1 -1
- package/dist/workspace/graph-cli.js +3 -0
- package/dist/workspace/graph.schema.json +72 -0
- package/dist/workspace/init.d.ts +5 -1
- package/dist/workspace/init.d.ts.map +1 -1
- package/dist/workspace/init.js +55 -9
- package/dist/workspace/ledger.schema.json +1 -1
- package/dist/workspace/nested-graph.d.ts.map +1 -1
- package/dist/workspace/nested-graph.js +2 -0
- package/dist/workspace/pr-report.schema.json +76 -3
- package/dist/workspace/promote-waves.d.ts +112 -0
- package/dist/workspace/promote-waves.d.ts.map +1 -0
- package/dist/workspace/promote-waves.js +290 -0
- package/dist/workspace/promote.d.ts +84 -2
- package/dist/workspace/promote.d.ts.map +1 -1
- package/dist/workspace/promote.js +347 -61
- package/dist/workspace/reason-codes.d.ts +12 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +14 -0
- package/dist/workspace/search-contract.d.ts +3 -3
- package/dist/workspace/search-contract.d.ts.map +1 -1
- package/dist/workspace/search-contract.js +2 -0
- package/dist/workspace/search.schema.json +103 -5
- package/package.json +14 -1
- package/src/__fixtures__/drift-record/README.md +58 -0
- package/src/__fixtures__/drift-record/choudoufu-cone.ndjson +4 -0
- package/src/__fixtures__/drift-record/choudoufu-resource.ndjson +3 -0
- package/src/__fixtures__/drift-record/component-status-ledger.json +65 -0
- package/src/__fixtures__/drift-record/component-status.json +91 -0
- package/src/__fixtures__/drift-record/deep-diff.json +259 -0
- package/src/__fixtures__/drift-record/lifecycle-diff-live.json +825 -0
- package/src/__fixtures__/drift-record/live-diff.json +125 -0
- package/src/audit/discover.e2e.test.ts +14 -0
- package/src/audit/discover.ts +3 -1
- package/src/behaviour.ts +1 -1
- package/src/capabilities/templates.json +145 -0
- package/src/capabilities/templates.test.ts +212 -0
- package/src/capabilities/templates.ts +204 -0
- package/src/change-set-bundle.test.ts +83 -0
- package/src/change-set-graph.ts +80 -9
- package/src/change-set.test.ts +24 -0
- package/src/change-set.ts +77 -14
- package/src/ci-identity-targets.test.ts +23 -0
- package/src/ci-identity.ts +10 -4
- package/src/cli/commands/import-index.test.ts +117 -0
- package/src/cli/commands/import-index.ts +265 -0
- package/src/cli/commands/lint.ts +4 -2
- package/src/cli/handlers/components.test.ts +9 -0
- package/src/cli/handlers/components.ts +12 -2
- package/src/cli/handlers/fan-out.ts +17 -3
- package/src/cli/handlers/graph.test.ts +42 -0
- package/src/cli/handlers/graph.ts +26 -4
- package/src/cli/handlers/index-cloud.ts +32 -0
- package/src/cli/handlers/index-diff.test.ts +68 -0
- package/src/cli/handlers/index-diff.ts +146 -0
- package/src/cli/handlers/ledger-root-member.test.ts +161 -0
- package/src/cli/handlers/lifecycle-drift.ts +68 -0
- package/src/cli/handlers/lifecycle.test.ts +33 -11
- package/src/cli/handlers/lifecycle.ts +205 -30
- package/src/cli/handlers/misc.ts +73 -0
- package/src/cli/handlers/pr-waves-blocked.test.ts +37 -2
- package/src/cli/handlers/pr.ts +16 -3
- package/src/cli/handlers/promote.test.ts +64 -0
- package/src/cli/handlers/promote.ts +81 -6
- package/src/cli/handlers/query.ts +27 -4
- package/src/cli/handlers/run-declared-reads-cli.test.ts +187 -0
- package/src/cli/handlers/run-groups-cli.test.ts +229 -0
- package/src/cli/handlers/scenario.test.ts +13 -0
- package/src/cli/handlers/scenario.ts +8 -7
- package/src/cli/handlers/search-index.test.ts +255 -0
- package/src/cli/handlers/search-json.test.ts +1 -1
- package/src/cli/handlers/search-ownership.test.ts +194 -0
- package/src/cli/handlers/search.ts +271 -38
- package/src/cli/main.test.ts +7 -0
- package/src/cli/main.ts +56 -1
- package/src/cli/mcp/lifecycle-tools.ts +3 -2
- package/src/cli/mcp/resource-handlers.ts +4 -3
- package/src/cli/mcp/workspace-tools.ts +1 -1
- package/src/cli/parse-args.ts +40 -2
- package/src/cli/registry.ts +19 -1
- package/src/cloud-lister/aws.test.ts +202 -0
- package/src/cloud-lister/aws.ts +226 -0
- package/src/cloud-lister/azure.test.ts +132 -0
- package/src/cloud-lister/azure.ts +142 -0
- package/src/cloud-lister/common.ts +115 -0
- package/src/cloud-lister/credentials.ts +110 -0
- package/src/cloud-lister/fakes.ts +66 -0
- package/src/cloud-lister/gcp.test.ts +121 -0
- package/src/cloud-lister/gcp.ts +159 -0
- package/src/cloud-lister/guard.test.ts +198 -0
- package/src/cloud-lister/guard.ts +111 -0
- package/src/cloud-lister/ids.ts +54 -0
- package/src/cloud-lister/index.ts +134 -0
- package/src/cloud-lister/kubernetes.test.ts +160 -0
- package/src/cloud-lister/kubernetes.ts +284 -0
- package/src/cloud-lister/markers.ts +74 -0
- package/src/cloud-lister/mask.ts +77 -0
- package/src/cloud-lister/shape.test.ts +81 -0
- package/src/cloud-lister/sigv4.ts +70 -0
- package/src/cloud-lister/transport.ts +118 -0
- package/src/cloud-lister/types.ts +135 -0
- package/src/components/capability-plugin-loader.ts +4 -0
- package/src/components/capability-plugin.ts +10 -0
- package/src/components/capability.ts +238 -0
- package/src/components/cli-support.ts +70 -14
- package/src/components/covered-round.test.ts +166 -0
- package/src/components/covered-round.ts +293 -0
- package/src/components/declared-reads.test.ts +103 -0
- package/src/components/declared-reads.ts +134 -0
- package/src/components/deploy-units.ts +4 -0
- package/src/components/driver.ts +101 -4
- package/src/components/fan-out-run.ts +95 -15
- package/src/components/fan-out-support.ts +10 -1
- package/src/components/fan-out.ts +30 -0
- package/src/components/groups.test.ts +320 -0
- package/src/components/groups.ts +880 -0
- package/src/components/index.ts +59 -0
- package/src/components/plan-shape-conformance.ts +130 -0
- package/src/components/pr-env-run-bundle.test.ts +2 -0
- package/src/components/pr-run.test.ts +728 -4
- package/src/components/pr-run.ts +395 -55
- package/src/components/promote-rounds.ts +25 -2
- package/src/components/promote.ts +55 -5
- package/src/components/registry.test.ts +1 -1
- package/src/components/release-gate.ts +115 -30
- package/src/components/release-groups.test.ts +362 -0
- package/src/components/run-groups.ts +113 -0
- package/src/components/starter-plugin.ts +6 -0
- package/src/components/verbs/index.ts +1 -0
- package/src/components/verbs/member-outputs.test.ts +205 -0
- package/src/components/verbs/member-outputs.ts +308 -0
- package/src/components/wave-plan.ts +5 -2
- package/src/config.ts +44 -0
- package/src/deep-observation.ts +5 -23
- package/src/drift-record.test.ts +596 -0
- package/src/drift-record.ts +1206 -0
- package/src/engine-facts.guard.test.ts +111 -0
- package/src/engine-facts.test.ts +178 -0
- package/src/engine-facts.ts +154 -0
- package/src/gated-waves-bundle.test.ts +2 -0
- package/src/graph-ir-live.test.ts +92 -0
- package/src/graph-ir.ts +317 -7
- package/src/graph-refs.ts +416 -0
- package/src/graph-schema/fixtures/adopt.json +15 -0
- package/src/graph-schema/fixtures/choudoufu.engine-graph.json +169 -0
- package/src/graph-schema/fixtures/index.json +68 -0
- package/src/graph-schema/fixtures/plunge.engine-graph.json +158 -0
- package/src/graph-schema/fixtures.ts +267 -0
- package/src/graph-schema/generate.ts +263 -0
- package/src/graph-schema/graph-schema.test.ts +153 -0
- package/src/graph-schema/graph.schema.json +1387 -0
- package/src/health.schema.json +2 -1
- package/src/identity.ts +2 -0
- package/src/index.ts +2 -0
- package/src/instance-nodes.ts +288 -0
- package/src/lexicon.ts +76 -0
- package/src/lifecycle/__fixtures__/index-diff/20261026T120000Z-aaaaaaaaaaaa.json +149 -0
- package/src/lifecycle/__fixtures__/index-diff/20261026T130000Z-bbbbbbbbbbbb.json +127 -0
- package/src/lifecycle/adoption-file.test.ts +100 -0
- package/src/lifecycle/adoption-file.ts +154 -0
- package/src/lifecycle/cloud-index.test.ts +517 -0
- package/src/lifecycle/cloud-index.ts +736 -0
- package/src/lifecycle/derive-edges.test.ts +193 -0
- package/src/lifecycle/derive-edges.ts +182 -0
- package/src/lifecycle/git.ts +10 -4
- package/src/lifecycle/identity-match.test.ts +308 -0
- package/src/lifecycle/identity-match.ts +257 -0
- package/src/lifecycle/index-diff.test.ts +198 -0
- package/src/lifecycle/index-diff.ts +476 -0
- package/src/lifecycle/index-document.test.ts +64 -0
- package/src/lifecycle/index-document.ts +299 -0
- package/src/lifecycle/index-drift.test.ts +191 -0
- package/src/lifecycle/index-drift.ts +304 -0
- package/src/lifecycle/index-import.test.ts +255 -0
- package/src/lifecycle/index-import.ts +634 -0
- package/src/lifecycle/index-join.test.ts +250 -0
- package/src/lifecycle/index-join.ts +304 -0
- package/src/lifecycle/index-store-load-bearing.test.ts +187 -0
- package/src/lifecycle/index.ts +4 -0
- package/src/lifecycle/member-ledger.test.ts +25 -7
- package/src/lifecycle/observation-baseline.test.ts +72 -1
- package/src/lifecycle/observation-baseline.ts +190 -27
- package/src/lifecycle/observe.ts +6 -1
- package/src/lifecycle/query.test.ts +69 -1
- package/src/lifecycle/query.ts +103 -10
- package/src/lifecycle/replay.test.ts +9 -5
- package/src/lifecycle/replay.ts +9 -5
- package/src/lifecycle/scenario.ts +4 -3
- package/src/lifecycle/snapshot-store-fake.ts +29 -0
- package/src/lifecycle/snapshot-store-s3.ts +316 -0
- package/src/lifecycle/snapshot-store.test.ts +385 -0
- package/src/lifecycle/snapshot-store.ts +981 -0
- package/src/lifecycle/snapshot.test.ts +13 -0
- package/src/lifecycle/snapshot.ts +23 -6
- package/src/lifecycle/type-listing.test.ts +166 -0
- package/src/lifecycle/type-listing.ts +309 -0
- package/src/lint/component-checks.ts +17 -1
- package/src/lint/config.test.ts +3 -0
- package/src/lint/presets/relaxed.json +2 -1
- package/src/lint/presets/strict.json +2 -1
- package/src/lint/rules/__fixtures__/comp/comp008/fail/dns.component.ts +15 -0
- package/src/lint/rules/__fixtures__/comp/comp008/pass/dns.component.ts +10 -0
- package/src/lint/rules/comp/comp.test.ts +2 -1
- package/src/lint/rules/comp/comp008-applies-signal-only-root.ts +121 -0
- package/src/lint/rules/comp/comp008.test.ts +77 -0
- package/src/lint/rules/comp/index.ts +4 -1
- package/src/observation-edges.test.ts +33 -0
- package/src/observation.ts +36 -1
- package/src/op/activities/activity-contracts.ts +1 -1
- package/src/op/activities/change-set.ts +8 -5
- package/src/op/activity-failure.ts +36 -0
- package/src/op/index.ts +2 -1
- package/src/op/local-executor.test.ts +80 -0
- package/src/op/local-executor.ts +27 -9
- package/src/pr-loop-bundle.test.ts +5 -2
- package/src/pr-loop.test.ts +57 -1
- package/src/pr-loop.ts +154 -6
- package/src/pulumi-urn.ts +151 -0
- package/src/release-floors.ts +22 -0
- package/src/sensitive-key.ts +34 -0
- package/src/workspace/adoption-report.test.ts +61 -0
- package/src/workspace/adoption-report.ts +103 -0
- package/src/workspace/capabilities-contract.test.ts +4 -0
- package/src/workspace/capabilities-contract.ts +9 -1
- package/src/workspace/capabilities.schema.json +98 -0
- package/src/workspace/change-set.schema.json +42 -3
- package/src/workspace/ci-cloud-identity.ts +31 -1
- package/src/workspace/compose-graph.test.ts +12 -0
- package/src/workspace/compose-graph.ts +12 -1
- package/src/workspace/conformance/conformance.e2e.test.ts +2 -1
- package/src/workspace/conformance/index.ts +6 -1
- package/src/workspace/drift-cli.test.ts +65 -0
- package/src/workspace/drift-cli.ts +365 -0
- package/src/workspace/drift.schema.json +672 -0
- package/src/workspace/graph-cli.ts +5 -0
- package/src/workspace/graph.schema.json +72 -0
- package/src/workspace/init.test.ts +38 -1
- package/src/workspace/init.ts +50 -8
- package/src/workspace/intent-gaps.test.ts +18 -2
- package/src/workspace/ledger.schema.json +1 -1
- package/src/workspace/nested-graph.ts +1 -0
- package/src/workspace/pr-report.schema.json +76 -3
- package/src/workspace/promote-waves.test.ts +296 -0
- package/src/workspace/promote-waves.ts +340 -0
- package/src/workspace/promote.test.ts +158 -4
- package/src/workspace/promote.ts +398 -57
- package/src/workspace/reason-codes.test.ts +4 -1
- package/src/workspace/reason-codes.ts +14 -0
- package/src/workspace/search-contract.ts +2 -0
- package/src/workspace/search.schema.json +103 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-support.d.ts","sourceRoot":"","sources":["../../src/components/cli-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAKH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAiC,KAAK,SAAS,EAAE,KAAK,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAClH,OAAO,EAQL,KAAK,eAAe,EAGpB,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"cli-support.d.ts","sourceRoot":"","sources":["../../src/components/cli-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAKH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAiC,KAAK,SAAS,EAAE,KAAK,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAClH,OAAO,EAQL,KAAK,eAAe,EAGpB,KAAK,eAAe,EAErB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,E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AAE,OAAO,EAAE,eAAe,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAchJ;AAED,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,mBAAmB,CAAC,CAmM9B"}
|
|
@@ -33,7 +33,9 @@ import { dirname, relative } from "node:path";
|
|
|
33
33
|
import { existsSync, statSync } from "node:fs";
|
|
34
34
|
import { getHeadCommit } from "../lifecycle/git.js";
|
|
35
35
|
import { buildCapabilityRegistry } from "./capability-plugin-loader.js";
|
|
36
|
+
import { componentSetFanOut, formRunGroups, planAndRunComponentGroup } from "./groups.js";
|
|
36
37
|
import { applyConfigDefaults } from "./config-defaults.js";
|
|
38
|
+
import { withDeclaredReads } from "./declared-reads.js";
|
|
37
39
|
import { loadChantConfig } from "../config.js";
|
|
38
40
|
/** Discover components under `path` and shape them for `chant list --components`. */
|
|
39
41
|
export async function listComponents(path, sandbox) {
|
|
@@ -348,6 +350,13 @@ function resolveComponentList(selector, discovered, all) {
|
|
|
348
350
|
};
|
|
349
351
|
}
|
|
350
352
|
const enabled = withoutDisabled(discovered, all);
|
|
353
|
+
return { success: true, ...dependencyClosure(names, enabled), list: { named: names, enabled } };
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* `names` and every component of `enabled` they depend on, transitively, in
|
|
357
|
+
* `enabled`'s order, and which of those the names did not give (#3950).
|
|
358
|
+
*/
|
|
359
|
+
export function dependencyClosure(names, enabled) {
|
|
351
360
|
const byName = new Map(enabled.map((c) => [c.name, c]));
|
|
352
361
|
const included = new Set();
|
|
353
362
|
const visit = (name) => {
|
|
@@ -362,20 +371,13 @@ function resolveComponentList(selector, discovered, all) {
|
|
|
362
371
|
visit(name);
|
|
363
372
|
const targets = enabled.filter((c) => included.has(c.name));
|
|
364
373
|
const named = new Set(names);
|
|
365
|
-
return {
|
|
374
|
+
return { targets, added: targets.map((c) => c.name).filter((n) => !named.has(n)) };
|
|
366
375
|
}
|
|
367
376
|
export async function runComponents(path, selector, options = {}) {
|
|
368
377
|
const resolved = await resolveComponentTargets(path, selector, options.sandbox, options.buildParams);
|
|
369
378
|
if (!resolved.success) {
|
|
370
379
|
return { success: false, selected: [], error: resolved.error };
|
|
371
380
|
}
|
|
372
|
-
const targets = resolved.targets;
|
|
373
|
-
const narrowed = options.targets ?? {};
|
|
374
|
-
const outside = Object.keys(narrowed).filter((name) => !targets.some((c) => c.name === name));
|
|
375
|
-
if (outside.length > 0) {
|
|
376
|
-
return { success: false, selected: [], error: `--target names ${outside.join(", ")}, which this run does not run` };
|
|
377
|
-
}
|
|
378
|
-
const targeted = Object.keys(narrowed).length > 0 ? { targets: narrowed } : {};
|
|
379
381
|
// (#629) Resolve `chant.config.ts`'s `sbom`/`signing`/`vulnPolicy` sections
|
|
380
382
|
// and fill their defaults into every recognized step (`generate-sbom`,
|
|
381
383
|
// `sign`/`attest-provenance`, `verify`, `vuln-gate`) that didn't already
|
|
@@ -393,8 +395,28 @@ export async function runComponents(path, selector, options = {}) {
|
|
|
393
395
|
lexicons: lexiconNames(config.lexicons),
|
|
394
396
|
}));
|
|
395
397
|
const env = options.env ?? "local";
|
|
396
|
-
|
|
397
|
-
|
|
398
|
+
// #4516: the reads a capability finds in its steps' files (a template's
|
|
399
|
+
// Fn::ImportValue) order a set run as `deriveFanOut` orders a fan-out, so an
|
|
400
|
+
// importer runs after the component whose export it reads. A list takes its
|
|
401
|
+
// closure again with them written in, so a listed importer pulls in its
|
|
402
|
+
// exporter. A single name runs on its own, against seeded outputs.
|
|
403
|
+
let resolvedTargets;
|
|
404
|
+
let added = resolved.added ?? [];
|
|
405
|
+
if (resolved.list) {
|
|
406
|
+
const enabled = await withDeclaredReads(resolved.list.enabled.map((component) => applyConfigDefaults(component, config)), registry, path);
|
|
407
|
+
({ targets: resolvedTargets, added } = dependencyClosure(resolved.list.named, enabled));
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
const defaulted = resolved.targets.map((component) => applyConfigDefaults(component, config));
|
|
411
|
+
resolvedTargets = selector === "all" ? await withDeclaredReads(defaulted, registry, path) : defaulted;
|
|
412
|
+
}
|
|
413
|
+
const selected = resolvedTargets.map((c) => c.name);
|
|
414
|
+
const narrowed = options.targets ?? {};
|
|
415
|
+
const outside = Object.keys(narrowed).filter((name) => !selected.includes(name));
|
|
416
|
+
if (outside.length > 0) {
|
|
417
|
+
return { success: false, selected: [], error: `--target names ${outside.join(", ")}, which this run does not run` };
|
|
418
|
+
}
|
|
419
|
+
const targeted = Object.keys(narrowed).length > 0 ? { targets: narrowed } : {};
|
|
398
420
|
// Cross-component/cross-stack outputs to resolve references against. Seeded
|
|
399
421
|
// from a caller (a downstream CI job passing an upstream job's dumped
|
|
400
422
|
// outputs via `--seed-outputs`); grows as this run's components complete.
|
|
@@ -409,16 +431,37 @@ export async function runComponents(path, selector, options = {}) {
|
|
|
409
431
|
const releaseIdentity = () => (revision ? { revision } : {});
|
|
410
432
|
try {
|
|
411
433
|
if (selector === "all" || isComponentList(selector)) {
|
|
434
|
+
// ws-107 (#4465): the components a capability takes as one plan in their
|
|
435
|
+
// wave and apply as one group, by the rule the pull-request run uses.
|
|
436
|
+
// A cycle or unknown dependency throws here the error the driver would:
|
|
437
|
+
// `componentSetFanOut` drops a dependency outside the set, so the full
|
|
438
|
+
// graph is resolved first.
|
|
439
|
+
resolveComponentGraph(resolvedTargets);
|
|
440
|
+
const grouped = await formRunGroups({ components: resolvedTargets, plan: componentSetFanOut(resolvedTargets), registry, env });
|
|
412
441
|
if (isComponentList(selector) && options.onPlan) {
|
|
413
442
|
// Resolved here, before dispatch, so the order is printed before any
|
|
414
|
-
// component runs.
|
|
415
|
-
|
|
416
|
-
const graph = resolveComponentGraph(resolvedTargets);
|
|
417
|
-
options.onPlan({ order: graph.order, waves: graph.waves, added: resolved.added ?? [] });
|
|
443
|
+
// component runs.
|
|
444
|
+
options.onPlan({ order: grouped.order, waves: grouped.waves.filter((w) => w.length > 0), added });
|
|
418
445
|
}
|
|
446
|
+
const byName = new Map(resolvedTargets.map((c) => [c.name, c]));
|
|
447
|
+
const groups = grouped.groups?.length
|
|
448
|
+
? {
|
|
449
|
+
waves: grouped.waves,
|
|
450
|
+
groups: grouped.groups,
|
|
451
|
+
run: (group, componentOutputs) => planAndRunComponentGroup({
|
|
452
|
+
group,
|
|
453
|
+
components: byName,
|
|
454
|
+
registry,
|
|
455
|
+
env,
|
|
456
|
+
ctxOf: (name) => deployContext({ env, releaseIdentity, ...targeted }, name),
|
|
457
|
+
componentOutputs,
|
|
458
|
+
}),
|
|
459
|
+
}
|
|
460
|
+
: undefined;
|
|
419
461
|
const run = await runInterpretDriver(resolvedTargets, registry, {
|
|
420
462
|
env,
|
|
421
463
|
releaseIdentity,
|
|
464
|
+
...(groups ? { groups } : {}),
|
|
422
465
|
...targeted,
|
|
423
466
|
componentOutputs: seedOutputs,
|
|
424
467
|
...(emit ? { onRunEvent: emit } : {}),
|
|
@@ -430,6 +473,7 @@ export async function runComponents(path, selector, options = {}) {
|
|
|
430
473
|
selected,
|
|
431
474
|
components: resolvedTargets,
|
|
432
475
|
buildParams: options.buildParams,
|
|
476
|
+
...(grouped.groups?.length || grouped.fallbacks?.length ? { grouped } : {}),
|
|
433
477
|
...(run.status === "gated" && run.gate
|
|
434
478
|
? {
|
|
435
479
|
gated: {
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Covered rounds (#4419): a round planned after an upstream applied is
|
|
3
|
+
* covered by the pull request's first approval when it does only what that
|
|
4
|
+
* approval previewed.
|
|
5
|
+
*
|
|
6
|
+
* A member that reads an output an upstream in the same change has not
|
|
7
|
+
* created yet is previewed with a hole: the input is marked unknown
|
|
8
|
+
* (`PrMember.unknownInputs`). Once the upstream applied, the apply plans the
|
|
9
|
+
* member again with the real value. That fresh plan is covered when
|
|
10
|
+
*
|
|
11
|
+
* - it touches only components the first plan previewed,
|
|
12
|
+
* - within each, only the logical ids and actions previewed (and no
|
|
13
|
+
* replacement the preview did not show), and
|
|
14
|
+
* - the only inputs that differ are the ones the preview marked unknown.
|
|
15
|
+
*
|
|
16
|
+
* A lexicon that can say more than the change set's entries (CloudFormation
|
|
17
|
+
* previews the member with placeholder parameters and reads the real change
|
|
18
|
+
* set afterwards) supplies a {@link PlanShape} on its `CapabilityPlan`.
|
|
19
|
+
* Core decides coverage; the lexicon only reports what it planned.
|
|
20
|
+
*
|
|
21
|
+
* A shape may go below the entry, to the properties a change touches and the
|
|
22
|
+
* ones an unknown input drives. Where it does, a property may drop out when
|
|
23
|
+
* an unknown input drives it (the real value turned out equal to the current
|
|
24
|
+
* one), and never otherwise, and a property may never be added.
|
|
25
|
+
*
|
|
26
|
+
* Coverage binds to the digest of the first approval. {@link coveredRound}
|
|
27
|
+
* takes that digest and records it, so a round planned for a different
|
|
28
|
+
* composition never counts as covered by an approval of another one.
|
|
29
|
+
*/
|
|
30
|
+
import type { ChangeSetAction, ChangeSetDocument } from "../change-set.js";
|
|
31
|
+
/** CloudFormation's `Replacement`, in lower case. */
|
|
32
|
+
export type ShapeReplacement = "true" | "false" | "conditional";
|
|
33
|
+
/** One resource a plan touches. */
|
|
34
|
+
export interface PlanShapeEntry {
|
|
35
|
+
/** The resource's id in the lexicon's own terms: a CloudFormation logical id, a Terraform address. */
|
|
36
|
+
logicalId: string;
|
|
37
|
+
action: ChangeSetAction;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the change replaces the resource, for an `update` or `replace`.
|
|
40
|
+
* `conditional` is the preview not knowing, because a parameter it
|
|
41
|
+
* depends on was a placeholder. Absent means the lexicon does not say.
|
|
42
|
+
*/
|
|
43
|
+
replacement?: ShapeReplacement;
|
|
44
|
+
/** The resource's type, when the lexicon says. Compared for equality when both sides carry it. */
|
|
45
|
+
type?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The properties the change touches, when the lexicon lists them. Present
|
|
48
|
+
* on both sides, the fresh plan may touch fewer where an unknown input
|
|
49
|
+
* drives them, and never more.
|
|
50
|
+
*/
|
|
51
|
+
properties?: string[];
|
|
52
|
+
/**
|
|
53
|
+
* The properties an unknown input drives. On an update a subset of
|
|
54
|
+
* `properties`; on a create, where a planner cannot list properties, they
|
|
55
|
+
* stand alone. Present (even empty) on an entry that carries detail.
|
|
56
|
+
*/
|
|
57
|
+
unknown?: string[];
|
|
58
|
+
}
|
|
59
|
+
/** What one member's plan does, without the values: what a lexicon supplies and core compares. */
|
|
60
|
+
export interface PlanShape {
|
|
61
|
+
/** The member the shape is of, as in the change set. */
|
|
62
|
+
member: string;
|
|
63
|
+
/** Every resource the plan touches. A `no-op` or `read` entry may be left out. */
|
|
64
|
+
entries: PlanShapeEntry[];
|
|
65
|
+
/**
|
|
66
|
+
* The inputs the plan was made without, as `<component>.<output>`: the
|
|
67
|
+
* ones the preview marked unknown. A fresh plan lists none of them; it
|
|
68
|
+
* is the inputs that were filled in that are recorded.
|
|
69
|
+
*/
|
|
70
|
+
unknownInputs: string[];
|
|
71
|
+
/**
|
|
72
|
+
* The inputs the plan read with a value, by reference. When both shapes
|
|
73
|
+
* carry a reference, the values must be equal, or an input that was
|
|
74
|
+
* known has changed. Optional: a shape without it is checked on its
|
|
75
|
+
* entries alone, plus the change set's own attributes in core.
|
|
76
|
+
*/
|
|
77
|
+
knownInputs?: Record<string, unknown>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Every way `fresh` goes beyond `previewed`, as reasons; none means covered.
|
|
81
|
+
* Both are shapes of the same member.
|
|
82
|
+
*
|
|
83
|
+
* The fresh plan may match the preview exactly, or be narrower where an
|
|
84
|
+
* unknown input drives it: a property whose real value equals the current one
|
|
85
|
+
* drops out, a replacement that depended on a stand-in may not happen. It
|
|
86
|
+
* may never add a resource, add a property, change an action or a type,
|
|
87
|
+
* replace more than previewed, read an input that is still unknown, or read a
|
|
88
|
+
* known input as another value.
|
|
89
|
+
*/
|
|
90
|
+
export declare function planShapeDifferences(previewed: PlanShape, fresh: PlanShape): string[];
|
|
91
|
+
/**
|
|
92
|
+
* Why `fresh` is not covered by `previewed`, or `undefined` when it is: the
|
|
93
|
+
* first of {@link planShapeDifferences}.
|
|
94
|
+
*/
|
|
95
|
+
export declare function planShapeCovers(previewed: PlanShape, fresh: PlanShape): string | undefined;
|
|
96
|
+
/** A shape in the order that makes equal shapes digest equal. */
|
|
97
|
+
export declare function normalizePlanShape(shape: PlanShape): PlanShape;
|
|
98
|
+
export declare function planShapeDigest(shape: PlanShape): string;
|
|
99
|
+
/**
|
|
100
|
+
* What a lexicon hands the run for a previewed member, through
|
|
101
|
+
* `DeployContext.plans[member]`. `kind` is the lexicon's own so its `run`
|
|
102
|
+
* can tell a shape from its other artifacts.
|
|
103
|
+
*/
|
|
104
|
+
export interface PlanShapeArtifact {
|
|
105
|
+
kind: string;
|
|
106
|
+
member: string;
|
|
107
|
+
shape: PlanShape;
|
|
108
|
+
digest: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Thrown by a member's `run` when the change it created is not covered by the
|
|
112
|
+
* shape previewed. The change set is deleted unexecuted. `planMoved` is
|
|
113
|
+
* core's mark for a moved plan, so the command that applied it exits 3.
|
|
114
|
+
*/
|
|
115
|
+
export declare class PlanShapeMovedError extends Error {
|
|
116
|
+
readonly member: string;
|
|
117
|
+
readonly differences: string[];
|
|
118
|
+
readonly planMoved = true;
|
|
119
|
+
constructor(member: string, differences: string[]);
|
|
120
|
+
}
|
|
121
|
+
/** The shape a change-set document gives for `member`, when its lexicon supplies none. */
|
|
122
|
+
export declare function shapeFromChangeSet(doc: ChangeSetDocument, member: string, inputs?: {
|
|
123
|
+
unknownInputs?: string[];
|
|
124
|
+
knownInputs?: Record<string, unknown>;
|
|
125
|
+
}): PlanShape;
|
|
126
|
+
/** What a round was covered by, as the report records it (`PrRound.covered`). */
|
|
127
|
+
export interface RoundCover {
|
|
128
|
+
/** The digest of the first approval, which the coverage is bound to. */
|
|
129
|
+
digest: string;
|
|
130
|
+
/** The inputs the first plan marked unknown and this round planned with a value, `<component>.<output>`, sorted. */
|
|
131
|
+
filledInputs: string[];
|
|
132
|
+
}
|
|
133
|
+
export type RoundCoverage = ({
|
|
134
|
+
covered: true;
|
|
135
|
+
} & RoundCover) | {
|
|
136
|
+
covered: false;
|
|
137
|
+
reason: string;
|
|
138
|
+
};
|
|
139
|
+
/** One side of the comparison: a plan set, as far as coverage needs it. */
|
|
140
|
+
export interface CoverageSide {
|
|
141
|
+
doc: ChangeSetDocument;
|
|
142
|
+
/** Per member, its component and (first plan only) the inputs it was previewed without. */
|
|
143
|
+
members: {
|
|
144
|
+
member: string;
|
|
145
|
+
component: string;
|
|
146
|
+
unknownInputs?: string[];
|
|
147
|
+
}[];
|
|
148
|
+
/** Shapes a lexicon supplied, by member. Where absent, the change set gives the shape. */
|
|
149
|
+
shapes?: Record<string, PlanShape>;
|
|
150
|
+
}
|
|
151
|
+
export interface CoveredRoundInput {
|
|
152
|
+
/** The first plan, whose approval is being relied on. */
|
|
153
|
+
approved: CoverageSide;
|
|
154
|
+
/** The digest that approval binds: the report's `digest`. */
|
|
155
|
+
approvedDigest: string;
|
|
156
|
+
/** The round's fresh plan. */
|
|
157
|
+
fresh: CoverageSide;
|
|
158
|
+
/**
|
|
159
|
+
* Known inputs that changed between the first plan and the round, as
|
|
160
|
+
* `<component>.<output>`: an input the first plan read with a value that
|
|
161
|
+
* stands as another one now. Core reads them from the outputs.
|
|
162
|
+
*/
|
|
163
|
+
changedKnown?: ReadonlyMap<string, string[]> | Record<string, string[]>;
|
|
164
|
+
/** The check on the change set's own attributes, per member (`planCoveredBy`). */
|
|
165
|
+
attributes?: (member: string) => string | undefined;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Whether the approval of `approvedDigest` covers `fresh`. Covered, the
|
|
169
|
+
* result names the digest and the inputs that were filled in; not covered,
|
|
170
|
+
* the reason, which the apply reports with the approval it asks for.
|
|
171
|
+
*/
|
|
172
|
+
export declare function coveredRound(input: CoveredRoundInput): RoundCoverage;
|
|
173
|
+
//# sourceMappingURL=covered-round.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"covered-round.d.ts","sourceRoot":"","sources":["../../src/components/covered-round.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGxE,qDAAqD;AACrD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC;AAEhE,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B,sGAAsG;IACtG,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,eAAe,CAAC;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,kGAAkG;IAClG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,kGAAkG;AAClG,MAAM,WAAW,SAAS;IACxB,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B;;;;OAIG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AASD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM,EAAE,CAkDrF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAE1F;AA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CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;IAC3E,0FAA0F;IAC1F,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,iBAAiB;IAChC,yDAAyD;IACzD,QAAQ,EAAE,YAAY,CAAC;IACvB,6DAA6D;IAC7D,cAAc,EAAE,MAAM,CAAC;IACvB,8BAA8B;IAC9B,KAAK,EAAE,YAAY,CAAC;IACpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxE,kFAAkF;IAClF,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CACrD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,aAAa,CAyBpE"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Covered rounds (#4419): a round planned after an upstream applied is
|
|
3
|
+
* covered by the pull request's first approval when it does only what that
|
|
4
|
+
* approval previewed.
|
|
5
|
+
*
|
|
6
|
+
* A member that reads an output an upstream in the same change has not
|
|
7
|
+
* created yet is previewed with a hole: the input is marked unknown
|
|
8
|
+
* (`PrMember.unknownInputs`). Once the upstream applied, the apply plans the
|
|
9
|
+
* member again with the real value. That fresh plan is covered when
|
|
10
|
+
*
|
|
11
|
+
* - it touches only components the first plan previewed,
|
|
12
|
+
* - within each, only the logical ids and actions previewed (and no
|
|
13
|
+
* replacement the preview did not show), and
|
|
14
|
+
* - the only inputs that differ are the ones the preview marked unknown.
|
|
15
|
+
*
|
|
16
|
+
* A lexicon that can say more than the change set's entries (CloudFormation
|
|
17
|
+
* previews the member with placeholder parameters and reads the real change
|
|
18
|
+
* set afterwards) supplies a {@link PlanShape} on its `CapabilityPlan`.
|
|
19
|
+
* Core decides coverage; the lexicon only reports what it planned.
|
|
20
|
+
*
|
|
21
|
+
* A shape may go below the entry, to the properties a change touches and the
|
|
22
|
+
* ones an unknown input drives. Where it does, a property may drop out when
|
|
23
|
+
* an unknown input drives it (the real value turned out equal to the current
|
|
24
|
+
* one), and never otherwise, and a property may never be added.
|
|
25
|
+
*
|
|
26
|
+
* Coverage binds to the digest of the first approval. {@link coveredRound}
|
|
27
|
+
* takes that digest and records it, so a round planned for a different
|
|
28
|
+
* composition never counts as covered by an approval of another one.
|
|
29
|
+
*/
|
|
30
|
+
import { computePlanDigest } from "../lifecycle/plan-digest.js";
|
|
31
|
+
const SKIPPED = new Set(["no-op", "read"]);
|
|
32
|
+
const REPLACEMENT_RANK = { false: 0, conditional: 1, true: 2 };
|
|
33
|
+
/** An entry with property detail is compared whatever its action: a lexicon that lists properties means it. */
|
|
34
|
+
const skipped = (e) => SKIPPED.has(e.action) && e.properties === undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Every way `fresh` goes beyond `previewed`, as reasons; none means covered.
|
|
37
|
+
* Both are shapes of the same member.
|
|
38
|
+
*
|
|
39
|
+
* The fresh plan may match the preview exactly, or be narrower where an
|
|
40
|
+
* unknown input drives it: a property whose real value equals the current one
|
|
41
|
+
* drops out, a replacement that depended on a stand-in may not happen. It
|
|
42
|
+
* may never add a resource, add a property, change an action or a type,
|
|
43
|
+
* replace more than previewed, read an input that is still unknown, or read a
|
|
44
|
+
* known input as another value.
|
|
45
|
+
*/
|
|
46
|
+
export function planShapeDifferences(previewed, fresh) {
|
|
47
|
+
const member = fresh.member;
|
|
48
|
+
const out = [];
|
|
49
|
+
const was = new Map(previewed.entries.map((e) => [e.logicalId, e]));
|
|
50
|
+
const now = new Set();
|
|
51
|
+
for (const e of fresh.entries) {
|
|
52
|
+
if (skipped(e))
|
|
53
|
+
continue;
|
|
54
|
+
now.add(e.logicalId);
|
|
55
|
+
const p = was.get(e.logicalId);
|
|
56
|
+
if (!p) {
|
|
57
|
+
out.push(`${member} now plans to ${e.action} ${e.logicalId}, which the first plan did not`);
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (p.action !== e.action)
|
|
61
|
+
out.push(`${member} now plans to ${e.action} ${e.logicalId}, where the first plan showed ${p.action}`);
|
|
62
|
+
if (p.type !== undefined && e.type !== undefined && p.type !== e.type)
|
|
63
|
+
out.push(`${member} now has ${e.logicalId} as ${e.type}, where the first plan showed ${p.type}`);
|
|
64
|
+
if (p.properties && e.properties) {
|
|
65
|
+
const extra = e.properties.filter((x) => !p.properties.includes(x));
|
|
66
|
+
if (extra.length > 0)
|
|
67
|
+
out.push(`${member} now also changes ${extra.join(", ")} on ${e.logicalId}`);
|
|
68
|
+
const driven = p.unknown ?? [];
|
|
69
|
+
const lost = p.properties.filter((x) => !driven.includes(x) && !e.properties.includes(x));
|
|
70
|
+
if (lost.length > 0)
|
|
71
|
+
out.push(`${member} no longer changes ${lost.join(", ")} on ${e.logicalId}, which no unknown input drives`);
|
|
72
|
+
}
|
|
73
|
+
if (e.replacement === "true" && p.replacement !== "true" && p.replacement !== "conditional") {
|
|
74
|
+
out.push(`${member} now replaces ${e.logicalId}, which the first plan did not show`);
|
|
75
|
+
}
|
|
76
|
+
else if (e.replacement === "conditional" && p.replacement !== "conditional" && p.replacement !== "true") {
|
|
77
|
+
out.push(`${member} may now replace ${e.logicalId}, which the first plan did not show`);
|
|
78
|
+
}
|
|
79
|
+
else if (e.replacement && p.replacement && p.unknown?.length === 0 && REPLACEMENT_RANK[e.replacement] < REPLACEMENT_RANK[p.replacement]) {
|
|
80
|
+
out.push(`${member} replacement of ${e.logicalId} was ${p.replacement}, now ${e.replacement}, and no unknown input drives it`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
// A previewed change that is gone: allowed only where unknown inputs drive all of it.
|
|
84
|
+
for (const p of previewed.entries) {
|
|
85
|
+
if (now.has(p.logicalId) || skipped(p) || !p.properties)
|
|
86
|
+
continue;
|
|
87
|
+
const driven = p.unknown ?? [];
|
|
88
|
+
if (!(p.properties.length > 0 && p.properties.every((x) => driven.includes(x)))) {
|
|
89
|
+
out.push(`${member} no longer plans to ${p.action} ${p.logicalId}, which the first plan did and no unknown input drives`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const unknown = new Set(previewed.unknownInputs);
|
|
93
|
+
const stillUnknown = fresh.unknownInputs[0];
|
|
94
|
+
if (stillUnknown)
|
|
95
|
+
out.push(`${member} still reads ${stillUnknown}, which is not known yet`);
|
|
96
|
+
for (const [ref, value] of Object.entries(fresh.knownInputs ?? {})) {
|
|
97
|
+
if (unknown.has(ref))
|
|
98
|
+
continue;
|
|
99
|
+
if (!previewed.knownInputs)
|
|
100
|
+
continue;
|
|
101
|
+
if (!(ref in previewed.knownInputs))
|
|
102
|
+
out.push(`${member} now reads ${ref}, which the first plan did not`);
|
|
103
|
+
else if (JSON.stringify(previewed.knownInputs[ref] ?? null) !== JSON.stringify(value ?? null)) {
|
|
104
|
+
out.push(`${member} now reads ${ref} as a different value than the first plan`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return out;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Why `fresh` is not covered by `previewed`, or `undefined` when it is: the
|
|
111
|
+
* first of {@link planShapeDifferences}.
|
|
112
|
+
*/
|
|
113
|
+
export function planShapeCovers(previewed, fresh) {
|
|
114
|
+
return planShapeDifferences(previewed, fresh)[0];
|
|
115
|
+
}
|
|
116
|
+
/** A shape in the order that makes equal shapes digest equal. */
|
|
117
|
+
export function normalizePlanShape(shape) {
|
|
118
|
+
const sorted = (xs) => [...new Set(xs)].sort();
|
|
119
|
+
return {
|
|
120
|
+
member: shape.member,
|
|
121
|
+
entries: shape.entries
|
|
122
|
+
.map((e) => ({
|
|
123
|
+
logicalId: e.logicalId,
|
|
124
|
+
action: e.action,
|
|
125
|
+
...(e.replacement ? { replacement: e.replacement } : {}),
|
|
126
|
+
...(e.type !== undefined ? { type: e.type } : {}),
|
|
127
|
+
...(e.properties ? { properties: sorted(e.properties) } : {}),
|
|
128
|
+
...(e.unknown ? { unknown: sorted(e.unknown) } : {}),
|
|
129
|
+
}))
|
|
130
|
+
.sort((a, b) => a.logicalId.localeCompare(b.logicalId) || a.action.localeCompare(b.action)),
|
|
131
|
+
unknownInputs: sorted(shape.unknownInputs),
|
|
132
|
+
...(shape.knownInputs ? { knownInputs: shape.knownInputs } : {}),
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export function planShapeDigest(shape) {
|
|
136
|
+
return computePlanDigest("plan-shape", normalizePlanShape(shape));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Thrown by a member's `run` when the change it created is not covered by the
|
|
140
|
+
* shape previewed. The change set is deleted unexecuted. `planMoved` is
|
|
141
|
+
* core's mark for a moved plan, so the command that applied it exits 3.
|
|
142
|
+
*/
|
|
143
|
+
export class PlanShapeMovedError extends Error {
|
|
144
|
+
constructor(member, differences) {
|
|
145
|
+
super(`"${member}": refusing to apply. The change differs from the preview that was approved: ${differences.join("; ")}. Plan it again.`);
|
|
146
|
+
this.member = member;
|
|
147
|
+
this.differences = differences;
|
|
148
|
+
this.planMoved = true;
|
|
149
|
+
this.name = "PlanShapeMovedError";
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/** The shape a change-set document gives for `member`, when its lexicon supplies none. */
|
|
153
|
+
export function shapeFromChangeSet(doc, member, inputs = {}) {
|
|
154
|
+
return {
|
|
155
|
+
member,
|
|
156
|
+
entries: doc.entries
|
|
157
|
+
.filter((e) => e.member === member)
|
|
158
|
+
.map((e) => ({ logicalId: e.deposed ? `${e.address}#${e.deposed}` : e.address, action: e.action })),
|
|
159
|
+
unknownInputs: [...(inputs.unknownInputs ?? [])].sort(),
|
|
160
|
+
...(inputs.knownInputs ? { knownInputs: inputs.knownInputs } : {}),
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Whether the approval of `approvedDigest` covers `fresh`. Covered, the
|
|
165
|
+
* result names the digest and the inputs that were filled in; not covered,
|
|
166
|
+
* the reason, which the apply reports with the approval it asks for.
|
|
167
|
+
*/
|
|
168
|
+
export function coveredRound(input) {
|
|
169
|
+
const { approved, fresh } = input;
|
|
170
|
+
const previewedComponents = new Set(approved.members.map((m) => m.component));
|
|
171
|
+
const approvedMember = new Map(approved.members.map((m) => [m.member, m]));
|
|
172
|
+
const filled = new Set();
|
|
173
|
+
for (const m of fresh.members) {
|
|
174
|
+
if (!previewedComponents.has(m.component))
|
|
175
|
+
return { covered: false, reason: `${m.component} was not in the first plan` };
|
|
176
|
+
const was = approvedMember.get(m.member);
|
|
177
|
+
if (!was)
|
|
178
|
+
return { covered: false, reason: `${m.member} was not in the first plan` };
|
|
179
|
+
if (was.component !== m.component)
|
|
180
|
+
return { covered: false, reason: `${m.member} moved from ${was.component} to ${m.component}` };
|
|
181
|
+
const previewed = approved.shapes?.[m.member] ?? shapeFromChangeSet(approved.doc, m.member, { unknownInputs: was.unknownInputs });
|
|
182
|
+
const both = [...new Set([...(previewed.unknownInputs ?? []), ...(was.unknownInputs ?? [])])];
|
|
183
|
+
// A lexicon that only knows the upstream stack lists the bare component; the member names the output. Keep the named one.
|
|
184
|
+
const unknownInputs = both.filter((ref) => !both.some((other) => other.startsWith(`${ref}.`))).sort();
|
|
185
|
+
const now = fresh.shapes?.[m.member] ?? shapeFromChangeSet(fresh.doc, m.member);
|
|
186
|
+
const reason = planShapeCovers({ ...previewed, unknownInputs }, now);
|
|
187
|
+
if (reason)
|
|
188
|
+
return { covered: false, reason };
|
|
189
|
+
const changed = (input.changedKnown instanceof Map ? input.changedKnown.get(m.component) : input.changedKnown?.[m.component]) ?? [];
|
|
190
|
+
const changedKnown = changed.filter((ref) => !unknownInputs.includes(ref));
|
|
191
|
+
if (changedKnown.length > 0)
|
|
192
|
+
return { covered: false, reason: `${m.member} reads ${changedKnown.join(", ")}, which the first plan read as another value` };
|
|
193
|
+
const attrs = input.attributes?.(m.member);
|
|
194
|
+
if (attrs)
|
|
195
|
+
return { covered: false, reason: attrs };
|
|
196
|
+
for (const ref of unknownInputs)
|
|
197
|
+
filled.add(ref);
|
|
198
|
+
}
|
|
199
|
+
return { covered: true, digest: input.approvedDigest, filledInputs: [...filled].sort() };
|
|
200
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads a capability finds in the files its steps name (#4466).
|
|
3
|
+
*
|
|
4
|
+
* A read core can see is a `stackOutput()` or `@<component>.publish.*`
|
|
5
|
+
* reference in a step. A CloudFormation template that imports another
|
|
6
|
+
* stack's export reads that stack too, but the read sits inside the
|
|
7
|
+
* template. A capability that can find such reads says so through
|
|
8
|
+
* `Capability.declaredReads`, and {@link withDeclaredReads} writes each one
|
|
9
|
+
* into the reader's step as the `stackOutput()` reference a person would have
|
|
10
|
+
* written, plus a `dependsOn` on the upstream. From there on it is an ordinary
|
|
11
|
+
* read: it orders the fan-out, it is named under `unknownInputs` while the
|
|
12
|
+
* upstream's plan cannot say the value, and a reader whose plan read another
|
|
13
|
+
* value than the upstream applied is held for a round.
|
|
14
|
+
*/
|
|
15
|
+
import type { CapabilityRegistry, DeclaredRead } from "./capability.js";
|
|
16
|
+
import type { DriverComponent } from "./driver.js";
|
|
17
|
+
/** A declared read with the kind of the step it names. */
|
|
18
|
+
export type PlacedRead = DeclaredRead & {
|
|
19
|
+
index: number;
|
|
20
|
+
kind: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Each capability's declared reads among `components` (#4466): every read a
|
|
24
|
+
* capability with `declaredReads` reports between two components of the
|
|
25
|
+
* project, its own reads of itself left out. A capability that throws
|
|
26
|
+
* reports none.
|
|
27
|
+
*/
|
|
28
|
+
export declare function declaredReadsOf(components: readonly DriverComponent[], registry: CapabilityRegistry, root: string): Promise<PlacedRead[]>;
|
|
29
|
+
/**
|
|
30
|
+
* `components` with each declared read written in (#4466): the reader's
|
|
31
|
+
* step gets `{ stackOutput: { stack: upstream, name: output } }` at the
|
|
32
|
+
* read's place, unless something sits there already, and the reader depends
|
|
33
|
+
* on the upstream. Components no read names come back as they were.
|
|
34
|
+
*/
|
|
35
|
+
export declare function applyDeclaredReads(components: readonly DriverComponent[], reads: readonly PlacedRead[]): DriverComponent[];
|
|
36
|
+
/** {@link declaredReadsOf} and {@link applyDeclaredReads} in one: `components` with their declared reads written in. */
|
|
37
|
+
export declare function withDeclaredReads(components: readonly DriverComponent[], registry: CapabilityRegistry, root: string): Promise<DriverComponent[]>;
|
|
38
|
+
//# sourceMappingURL=declared-reads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declared-reads.d.ts","sourceRoot":"","sources":["../../src/components/declared-reads.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAsB,MAAM,cAAc,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAA2B,MAAM,UAAU,CAAC;AAGzE,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAmCxE;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,UAAU,EAAE,SAAS,eAAe,EAAE,EACtC,QAAQ,EAAE,kBAAkB,EAC5B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,UAAU,EAAE,CAAC,CA6BvB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,EAAE,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,eAAe,EAAE,CAyB1H;AAED,wHAAwH;AACxH,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAGtJ"}
|