@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
package/dist/change-set-graph.js
CHANGED
|
@@ -18,9 +18,23 @@
|
|
|
18
18
|
* a delete of a block the source no longer declares, or a warden or sql
|
|
19
19
|
* change outside the graph.
|
|
20
20
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* An instance of a `count` or `for_each` block gets its instance node
|
|
22
|
+
* (#4454): the block node's id followed by the instance key as the planner
|
|
23
|
+
* prints it, `<root>/module.app/terraform_data.instance[0]`, with
|
|
24
|
+
* `instanceOf` naming the block node. That holds whether or not the graph
|
|
25
|
+
* lists the instance node, since a graph read of the source lists only the
|
|
26
|
+
* instances it can count (`./instance-nodes.ts`). Under an expanded module
|
|
27
|
+
* call the module key sits on the call's segment (#4486):
|
|
28
|
+
* `module.app[0].aws_eip.pool[1]` is `<root>/module.app[0]/aws_eip.pool[1]`.
|
|
29
|
+
* {@link graphNodeFor} is the same rule for a single address, which a drift
|
|
30
|
+
* row uses.
|
|
31
|
+
*
|
|
32
|
+
* Like `./change-set.ts`, this imports nothing at run time but
|
|
33
|
+
* `./instance-nodes.ts` and `./pulumi-urn.ts`, which import nothing either,
|
|
34
|
+
* so it bundles into one file with the change-set code.
|
|
23
35
|
*/
|
|
36
|
+
import { terraformInstancePath } from "./instance-nodes.js";
|
|
37
|
+
import { pulumiNodeCandidates } from "./pulumi-urn.js";
|
|
24
38
|
/**
|
|
25
39
|
* Split a terraform address into its dot-separated parts, dropping every
|
|
26
40
|
* `[...]` index. A quoted key may hold `.` or `]`, so quotes are honoured.
|
|
@@ -94,9 +108,14 @@ export function terraformBlockKey(address) {
|
|
|
94
108
|
* - `terraform`, `tofu`, `choudoufu`: `<root>/<block key>`, the root being
|
|
95
109
|
* the change-set member (`terraformBlockKey`), then the address.
|
|
96
110
|
* - `warden`, `sql`: the address.
|
|
111
|
+
* - `pulumi`: the address is a URN, and the id is `<member>/<key>` by the
|
|
112
|
+
* one URN rule (`pulumiNodeCandidates`, `./pulumi-urn.ts`, #4456); none
|
|
113
|
+
* for a provider or the root stack.
|
|
97
114
|
*/
|
|
98
115
|
export function changeSetNodeCandidates(entry) {
|
|
99
116
|
switch (entry.planner) {
|
|
117
|
+
case "pulumi":
|
|
118
|
+
return pulumiNodeCandidates(entry);
|
|
100
119
|
case "terraform":
|
|
101
120
|
case "tofu":
|
|
102
121
|
case "choudoufu": {
|
|
@@ -107,24 +126,56 @@ export function changeSetNodeCandidates(entry) {
|
|
|
107
126
|
return [entry.address];
|
|
108
127
|
}
|
|
109
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* The node an address of a member's planner is on, in `ids` (one member's
|
|
131
|
+
* node ids, without the member) with `prefix` in front: the first candidate
|
|
132
|
+
* ({@link changeSetNodeCandidates}) the graph holds, and for an instance of a
|
|
133
|
+
* terraform-family block that the graph holds, the instance node (#4454).
|
|
134
|
+
*/
|
|
135
|
+
function placeOn(entry, ids, prefix, sources) {
|
|
136
|
+
const id = changeSetNodeCandidates(entry).find((c) => ids.has(c));
|
|
137
|
+
if (id === undefined)
|
|
138
|
+
return { node: null };
|
|
139
|
+
const path = (entry.planner === "terraform" || entry.planner === "tofu" || entry.planner === "choudoufu") && id !== entry.address
|
|
140
|
+
? terraformInstancePath(entry.address)
|
|
141
|
+
: undefined;
|
|
142
|
+
// The block node the graph holds is `<root>/<block>`; its instance is
|
|
143
|
+
// `<root>/<instance>`, the module key on its call segment (#4486).
|
|
144
|
+
const root = path !== undefined && id.endsWith(`/${path.block}`) ? id.slice(0, id.length - path.block.length) : undefined;
|
|
145
|
+
if (path === undefined || root === undefined) {
|
|
146
|
+
const source = sources?.get(id);
|
|
147
|
+
return { node: `${prefix}${id}`, ...(source !== undefined ? { source } : {}) };
|
|
148
|
+
}
|
|
149
|
+
const instance = `${root}${path.instance}`;
|
|
150
|
+
const source = sources?.get(instance) ?? sources?.get(id);
|
|
151
|
+
return { node: `${prefix}${instance}`, instanceOf: `${prefix}${id}`, ...(source !== undefined ? { source } : {}) };
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* The node one engine address is on in `graph`, by the change set's mapping
|
|
155
|
+
* rules: what a drift row's `node` and `instanceOf` are (#4454), so a drift
|
|
156
|
+
* row and a change-set entry for the same instance name the same node. A null
|
|
157
|
+
* `graph` places nothing.
|
|
158
|
+
*/
|
|
159
|
+
export function graphNodeFor(entry, graph) {
|
|
160
|
+
if (graph === null)
|
|
161
|
+
return { node: null };
|
|
162
|
+
return placeOn(entry, new Set(graph.ids), graph.member ? `${graph.member}/` : "", graph.sources);
|
|
163
|
+
}
|
|
110
164
|
/**
|
|
111
165
|
* The document with each entry's `node` set from `graph`, and `graph`
|
|
112
166
|
* recording which graph it was. A null `graph` (none could be read) gives
|
|
113
|
-
* every entry `node: null`. The digest is unchanged: `node`
|
|
167
|
+
* every entry `node: null`. The digest is unchanged: `node`, `instanceOf` and
|
|
168
|
+
* `source` are not hashed.
|
|
114
169
|
*/
|
|
115
170
|
export function mapChangeSetToGraph(doc, graph) {
|
|
116
171
|
if (graph === null) {
|
|
117
|
-
return { ...doc, entries: doc.entries.map((e) => ({ ...e, node: null })), graph: null };
|
|
172
|
+
return { ...doc, entries: doc.entries.map(({ instanceOf: _i, ...e }) => ({ ...e, node: null })), graph: null };
|
|
118
173
|
}
|
|
119
174
|
const ids = new Set(graph.ids);
|
|
120
175
|
const prefix = graph.member ? `${graph.member}/` : "";
|
|
121
176
|
return {
|
|
122
177
|
...doc,
|
|
123
|
-
entries: doc.entries.map((e) => {
|
|
124
|
-
const id = changeSetNodeCandidates(e).find((c) => ids.has(c));
|
|
125
|
-
const source = id === undefined ? undefined : graph.sources?.get(id);
|
|
126
|
-
return { ...e, node: id === undefined ? null : `${prefix}${id}`, ...(source !== undefined ? { source } : {}) };
|
|
127
|
-
}),
|
|
178
|
+
entries: doc.entries.map(({ instanceOf: _i, ...e }) => ({ ...e, ...placeOn(e, ids, prefix, graph.sources) })),
|
|
128
179
|
graph: { member: graph.member, at: graph.at },
|
|
129
180
|
};
|
|
130
181
|
}
|
package/dist/change-set.d.ts
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* Each planner reaches it through an adapter that returns a
|
|
12
12
|
* {@link ChangeSetPart}: one member and its entries. The lifecycle and
|
|
13
13
|
* reconcile adapters are here; the terraform-family ones live in the
|
|
14
|
-
* terraform lexicon's `change-set` subpath
|
|
15
|
-
* lexicon's. A part another process wrote to a file reads back through
|
|
14
|
+
* terraform lexicon's `change-set` subpath, the SQL ones in the sql
|
|
15
|
+
* lexicon's and the Pulumi one in the pulumi lexicon's. A part another process wrote to a file reads back through
|
|
16
16
|
* {@link readChangeSetPartFile}. {@link composeChangeSet} joins
|
|
17
17
|
* the parts.
|
|
18
18
|
*
|
|
@@ -47,19 +47,24 @@ import type { ChangeSet as ReconcileChangeSet } from "./reconcile.js";
|
|
|
47
47
|
export declare const CHANGE_SET_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/change-set/v1/change-set.schema.json";
|
|
48
48
|
/** The read-contract version the document follows. */
|
|
49
49
|
export declare const CHANGE_SET_CONTRACT = 1;
|
|
50
|
+
/** The first chant whose change set can carry a member's `group` (ws-107, #4440). */
|
|
51
|
+
export declare const CHANGE_SET_GROUP_FLOOR = "0.124.54";
|
|
52
|
+
/** The first chant whose change set can carry a member's `placeholders` (#4463). */
|
|
53
|
+
export declare const CHANGE_SET_PLACEHOLDERS_FLOOR = "0.124.54";
|
|
50
54
|
/** What a planner proposes for one resource. `no-op`, `read` and `forget` appear only when the planner reports them. */
|
|
51
55
|
export type ChangeSetAction = "create" | "update" | "replace" | "delete" | "read" | "no-op" | "forget";
|
|
52
56
|
/** Every action, in the order the summary lists them. */
|
|
53
57
|
export declare const CHANGE_SET_ACTIONS: readonly ChangeSetAction[];
|
|
54
58
|
/** How much applying one change hurts, in the vocabulary of `./lifecycle/disruption.ts`. */
|
|
55
59
|
export type ChangeSetDisruption = "in-place" | "rolling" | "replace" | "destroy" | "unknown";
|
|
56
|
-
/** Which tool produced a member's plan. */
|
|
57
60
|
/**
|
|
58
61
|
* Which tool produced a member's plan. `sql` is a SQL schema change: a
|
|
59
62
|
* versioned plan (a product's migrations) or one of the sql lexicon's
|
|
60
63
|
* migration Ops' plans, through `@intentius/chant-lexicon-sql/change-set`.
|
|
64
|
+
* `pulumi` is a `pulumi preview --json` of a Pulumi member, through
|
|
65
|
+
* `@intentius/chant-lexicon-pulumi/change-set` (#4453); its addresses are URNs.
|
|
61
66
|
*/
|
|
62
|
-
export type ChangeSetPlanner = "terraform" | "tofu" | "choudoufu" | "chant" | "warden" | "sql";
|
|
67
|
+
export type ChangeSetPlanner = "terraform" | "tofu" | "choudoufu" | "chant" | "warden" | "sql" | "pulumi";
|
|
63
68
|
/** Every planner, in the order the schema lists them. */
|
|
64
69
|
export declare const CHANGE_SET_PLANNERS: readonly ChangeSetPlanner[];
|
|
65
70
|
/** One attribute a change writes, at top-level granularity. */
|
|
@@ -98,6 +103,18 @@ export interface ChangeSetEntry {
|
|
|
98
103
|
importing?: true;
|
|
99
104
|
/** Set on update, replace and delete. `unknown` means nobody could say. */
|
|
100
105
|
disruption?: ChangeSetDisruption;
|
|
106
|
+
/**
|
|
107
|
+
* The planner could not enumerate what this entry stands for (#4453). A
|
|
108
|
+
* Pulumi program can register resources inside an `apply()`, which does not
|
|
109
|
+
* run at preview while its input is unknown, so the preview never lists
|
|
110
|
+
* them. The pulumi adapter keeps them in the set rather than dropping them:
|
|
111
|
+
* one entry per component whose children may appear, at
|
|
112
|
+
* `pulumiMayAppearAddress` of the component, and an entry for each resource
|
|
113
|
+
* the last export holds under such a component that the preview did not
|
|
114
|
+
* list or plans to delete. An entry carrying it is never empty
|
|
115
|
+
* ({@link isEmptyChangeSet}). Part of the digest.
|
|
116
|
+
*/
|
|
117
|
+
mayAppear?: true;
|
|
101
118
|
region?: string;
|
|
102
119
|
/** The estate, environment or org the change lands in. */
|
|
103
120
|
scope?: string;
|
|
@@ -109,8 +126,19 @@ export interface ChangeSetEntry {
|
|
|
109
126
|
* a delete of a block the source no longer declares. Absent until the
|
|
110
127
|
* document is mapped onto a graph (`./change-set-graph.ts`), and never
|
|
111
128
|
* part of the digest.
|
|
129
|
+
*
|
|
130
|
+
* An instance of a `count` or `for_each` block (#4454) gets the instance
|
|
131
|
+
* node's id, the block node's id followed by the key as the planner prints
|
|
132
|
+
* it (`<member>/aws_eip.pool[0]`), and {@link instanceOf} names the block
|
|
133
|
+
* node. See `./instance-nodes.ts`.
|
|
112
134
|
*/
|
|
113
135
|
node?: string | null;
|
|
136
|
+
/**
|
|
137
|
+
* On an entry whose `node` is an instance node (#4454): the id of the block
|
|
138
|
+
* node it is an instance of, the rollup, in the same id space as `node`.
|
|
139
|
+
* Absent on every other entry. Like `node`, never part of the digest.
|
|
140
|
+
*/
|
|
141
|
+
instanceOf?: string;
|
|
114
142
|
/**
|
|
115
143
|
* The source file that declares the entry's node, from the repository
|
|
116
144
|
* root (#4025): the node's `sourceLoc.file` in the member's graph IR, with
|
|
@@ -145,9 +173,35 @@ export interface ChangeSetMember {
|
|
|
145
173
|
* summary never folds it into a group of real plans.
|
|
146
174
|
*/
|
|
147
175
|
provisional?: true;
|
|
176
|
+
/**
|
|
177
|
+
* The inputs the member was previewed with stand-in values for (#4463),
|
|
178
|
+
* sorted: a Terraform root whose `vars` read an output not known yet is
|
|
179
|
+
* planned with a typed placeholder per such variable (`var.<name>`), and
|
|
180
|
+
* every attribute those drive is marked unknown in its entries. Its plan
|
|
181
|
+
* digest covers them. The apply plans it again with the real values and
|
|
182
|
+
* holds that plan to the preview's shape. Added within contract 1 by chant
|
|
183
|
+
* {@link CHANGE_SET_PLACEHOLDERS_FLOOR}.
|
|
184
|
+
*/
|
|
185
|
+
placeholders?: string[];
|
|
148
186
|
/** The planner's own digest of the same plan, when it prints one (choudoufu's per-root digest). */
|
|
149
187
|
nativeDigest?: string;
|
|
150
188
|
holes: ChangeSetHole[];
|
|
189
|
+
/**
|
|
190
|
+
* Set on a member a capability planned with others as one group (ws-107,
|
|
191
|
+
* #4440). Part of the document's digest when present. Added within
|
|
192
|
+
* contract 1 by chant {@link CHANGE_SET_GROUP_FLOOR}.
|
|
193
|
+
*/
|
|
194
|
+
group?: ChangeSetMemberGroup;
|
|
195
|
+
}
|
|
196
|
+
/** A grouped member's group (ws-107): the group digest folded into its `planDigest`, and what it reads inside the group. */
|
|
197
|
+
export interface ChangeSetMemberGroup {
|
|
198
|
+
digest: string;
|
|
199
|
+
/**
|
|
200
|
+
* The `<component>.<output>` values it reads from another member of its
|
|
201
|
+
* group that the plan does not know, sorted. The group's apply computes
|
|
202
|
+
* them. A change set with any is never empty ({@link isEmptyChangeSet}).
|
|
203
|
+
*/
|
|
204
|
+
reads: string[];
|
|
151
205
|
}
|
|
152
206
|
/** A provider-defined side effect an apply runs: a Terraform `action` block's invocation. */
|
|
153
207
|
export interface ChangeSetSideEffect {
|
|
@@ -248,7 +302,8 @@ export declare function changeSetDigest(members: ReadonlyArray<Pick<ChangeSetMem
|
|
|
248
302
|
*
|
|
249
303
|
* A release gate's document (#4045) also hashes the `releaseDigest` and
|
|
250
304
|
* `environment` it was planned for. A document without them hashes as it
|
|
251
|
-
* always has, so no earlier digest moves.
|
|
305
|
+
* always has, so no earlier digest moves. A grouped member's `group`
|
|
306
|
+
* (ws-107) is hashed with it the same way: only when present.
|
|
252
307
|
*/
|
|
253
308
|
export declare function changeSetDocumentDigest(doc: Pick<ChangeSetDocument, "members" | "entries" | "sideEffects" | "releaseDigest" | "environment">): string;
|
|
254
309
|
/** The summary of a set of members and entries. */
|
|
@@ -278,8 +333,11 @@ export declare function verifyChangeSetDigest(doc: Pick<ChangeSetDocument, "dige
|
|
|
278
333
|
/**
|
|
279
334
|
* Whether a change set changes nothing (ws-104 question 6, #4045): it has at
|
|
280
335
|
* least one member, every member planned, none failed or provisional, no
|
|
281
|
-
* member has a hole, and every entry is a `no-op` or a `read
|
|
282
|
-
* gate over such a document passes
|
|
336
|
+
* member has a hole, and every entry is a `no-op` or a `read` that no
|
|
337
|
+
* planner marked `mayAppear`. A release gate over such a document passes
|
|
338
|
+
* without an approval. A member that reads a value its group computes in its
|
|
339
|
+
* apply (`group.reads`, ws-107 ruling 4) makes it not empty: what the plan
|
|
340
|
+
* shows may not be all the apply does.
|
|
283
341
|
*/
|
|
284
342
|
export declare function isEmptyChangeSet(doc: Pick<ChangeSetDocument, "members" | "entries">): boolean;
|
|
285
343
|
export interface LifecyclePlanPartInput {
|
package/dist/change-set.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../src/change-set.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAGH,OAAO,KAAK,EAAE,SAAS,IAAI,kBAAkB,EAAoC,MAAM,wBAAwB,CAAC;AAChH,OAAO,KAAK,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../src/change-set.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAGH,OAAO,KAAK,EAAE,SAAS,IAAI,kBAAkB,EAAoC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AID,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,IAAI,EAAE,kBAAkB,GAAG,kBAAkB,EAAE,CAAC;IAChD,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAMD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,aAAa,CAyC9E;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa,CAsB/H"}
|
package/dist/change-set.js
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* Each planner reaches it through an adapter that returns a
|
|
12
12
|
* {@link ChangeSetPart}: one member and its entries. The lifecycle and
|
|
13
13
|
* reconcile adapters are here; the terraform-family ones live in the
|
|
14
|
-
* terraform lexicon's `change-set` subpath
|
|
15
|
-
* lexicon's. A part another process wrote to a file reads back through
|
|
14
|
+
* terraform lexicon's `change-set` subpath, the SQL ones in the sql
|
|
15
|
+
* lexicon's and the Pulumi one in the pulumi lexicon's. A part another process wrote to a file reads back through
|
|
16
16
|
* {@link readChangeSetPartFile}. {@link composeChangeSet} joins
|
|
17
17
|
* the parts.
|
|
18
18
|
*
|
|
@@ -42,14 +42,19 @@
|
|
|
42
42
|
* types only, and `change-set-bundle.test.ts` holds that.
|
|
43
43
|
*/
|
|
44
44
|
import { computePlanDigest } from "./lifecycle/plan-digest.js";
|
|
45
|
+
import { NEXT_RELEASE } from "./release-floors.js";
|
|
45
46
|
/** The schema a change-set document names in `$schema`. */
|
|
46
47
|
export const CHANGE_SET_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/change-set/v1/change-set.schema.json";
|
|
47
48
|
/** The read-contract version the document follows. */
|
|
48
49
|
export const CHANGE_SET_CONTRACT = 1;
|
|
50
|
+
/** The first chant whose change set can carry a member's `group` (ws-107, #4440). */
|
|
51
|
+
export const CHANGE_SET_GROUP_FLOOR = NEXT_RELEASE;
|
|
52
|
+
/** The first chant whose change set can carry a member's `placeholders` (#4463). */
|
|
53
|
+
export const CHANGE_SET_PLACEHOLDERS_FLOOR = NEXT_RELEASE;
|
|
49
54
|
/** Every action, in the order the summary lists them. */
|
|
50
55
|
export const CHANGE_SET_ACTIONS = ["create", "update", "replace", "delete", "read", "no-op", "forget"];
|
|
51
56
|
/** Every planner, in the order the schema lists them. */
|
|
52
|
-
export const CHANGE_SET_PLANNERS = ["terraform", "tofu", "choudoufu", "chant", "warden", "sql"];
|
|
57
|
+
export const CHANGE_SET_PLANNERS = ["terraform", "tofu", "choudoufu", "chant", "warden", "sql", "pulumi"];
|
|
53
58
|
const byString = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
54
59
|
function entryKey(e) {
|
|
55
60
|
return `${e.member}\u0000${e.address}\u0000${e.deposed ?? ""}\u0000${e.action}`;
|
|
@@ -88,21 +93,22 @@ export function changeSetDigest(members) {
|
|
|
88
93
|
*
|
|
89
94
|
* A release gate's document (#4045) also hashes the `releaseDigest` and
|
|
90
95
|
* `environment` it was planned for. A document without them hashes as it
|
|
91
|
-
* always has, so no earlier digest moves.
|
|
96
|
+
* always has, so no earlier digest moves. A grouped member's `group`
|
|
97
|
+
* (ws-107) is hashed with it the same way: only when present.
|
|
92
98
|
*/
|
|
93
99
|
export function changeSetDocumentDigest(doc) {
|
|
94
100
|
const provisional = new Set(doc.members.filter((m) => m.provisional === true).map((m) => m.member));
|
|
95
101
|
const members = doc.members
|
|
96
102
|
.filter((m) => !provisional.has(m.member))
|
|
97
|
-
.map((m) => ({ member: m.member, status: m.status, holes: m.holes }))
|
|
103
|
+
.map((m) => ({ member: m.member, status: m.status, holes: m.holes, ...(m.group ? { group: { digest: m.group.digest, reads: [...m.group.reads].sort() } } : {}) }))
|
|
98
104
|
.sort((a, b) => byString(a.member, b.member));
|
|
99
|
-
// An entry's graph node (#4022)
|
|
100
|
-
// the graph the change is, not what the plan
|
|
101
|
-
// the digest: mapping a stored
|
|
105
|
+
// An entry's graph node (#4022), its block node (#4454) and its source
|
|
106
|
+
// file (#4025) say where on the graph the change is, not what the plan
|
|
107
|
+
// does, so they stay outside the digest: mapping a stored
|
|
102
108
|
// document onto a graph never moves the value its gate bound.
|
|
103
109
|
const entries = doc.entries
|
|
104
110
|
.filter((e) => !provisional.has(e.member))
|
|
105
|
-
.map(({ node: _node, source: _source, ...e }) => e)
|
|
111
|
+
.map(({ node: _node, instanceOf: _instanceOf, source: _source, ...e }) => e)
|
|
106
112
|
.sort((a, b) => byString(entryKey(a), entryKey(b)));
|
|
107
113
|
const sideEffects = (doc.sideEffects ?? []).filter((s) => !provisional.has(s.member)).sort(bySideEffect);
|
|
108
114
|
const planned = doc.releaseDigest !== undefined || doc.environment !== undefined
|
|
@@ -200,8 +206,11 @@ export function verifyChangeSetDigest(doc) {
|
|
|
200
206
|
/**
|
|
201
207
|
* Whether a change set changes nothing (ws-104 question 6, #4045): it has at
|
|
202
208
|
* least one member, every member planned, none failed or provisional, no
|
|
203
|
-
* member has a hole, and every entry is a `no-op` or a `read
|
|
204
|
-
* gate over such a document passes
|
|
209
|
+
* member has a hole, and every entry is a `no-op` or a `read` that no
|
|
210
|
+
* planner marked `mayAppear`. A release gate over such a document passes
|
|
211
|
+
* without an approval. A member that reads a value its group computes in its
|
|
212
|
+
* apply (`group.reads`, ws-107 ruling 4) makes it not empty: what the plan
|
|
213
|
+
* shows may not be all the apply does.
|
|
205
214
|
*/
|
|
206
215
|
export function isEmptyChangeSet(doc) {
|
|
207
216
|
if (doc.members.length === 0)
|
|
@@ -209,8 +218,10 @@ export function isEmptyChangeSet(doc) {
|
|
|
209
218
|
for (const m of doc.members) {
|
|
210
219
|
if (m.status !== "planned" || m.provisional === true || m.holes.length > 0)
|
|
211
220
|
return false;
|
|
221
|
+
if (m.group && m.group.reads.length > 0)
|
|
222
|
+
return false;
|
|
212
223
|
}
|
|
213
|
-
return doc.entries.every((e) => e.action === "no-op" || e.action === "read");
|
|
224
|
+
return doc.entries.every((e) => (e.action === "no-op" || e.action === "read") && e.mayAppear !== true);
|
|
214
225
|
}
|
|
215
226
|
function lifecycleAttributes(entry) {
|
|
216
227
|
const because = new Set(entry.disruptionBecause ?? []);
|
package/dist/ci-identity.d.ts
CHANGED
|
@@ -173,11 +173,16 @@ export declare function nameGlobMatch(glob: string, name: string): boolean;
|
|
|
173
173
|
* globs, so a root's glob means one thing in each.
|
|
174
174
|
*/
|
|
175
175
|
export declare function targetGlobMatch(glob: string, target: string): boolean;
|
|
176
|
+
/** One target's names: a string, or the several names a tool knows it by, such as a Terraform root's key and its directory. */
|
|
177
|
+
export type TargetNames = string | readonly string[];
|
|
176
178
|
/**
|
|
177
179
|
* The first rule that covers `env`, `member` and `target`, or undefined.
|
|
178
180
|
* With no `target`, the first rule that names no targets: the pipeline's own.
|
|
181
|
+
* A `target` given as several names is covered by a rule when any one name
|
|
182
|
+
* matches a glob, and the first rule in declared order wins, whichever name
|
|
183
|
+
* it matched.
|
|
179
184
|
*/
|
|
180
|
-
export declare function ruleFor(rules: readonly CloudIdentityRule[], env: string, member?: string, target?:
|
|
185
|
+
export declare function ruleFor(rules: readonly CloudIdentityRule[], env: string, member?: string, target?: TargetNames): CloudIdentityRule | undefined;
|
|
181
186
|
/**
|
|
182
187
|
* The plan and apply trades of the pipeline for `env` and `member`, or
|
|
183
188
|
* undefined when no rule of any cloud covers them. A cloud no rule covers
|
|
@@ -194,7 +199,7 @@ export declare function resolveCloudIdentity(decl: CloudIdentityDeclaration | un
|
|
|
194
199
|
* any cloud covers it. Each trade names one identity per cloud and no
|
|
195
200
|
* `targets`.
|
|
196
201
|
*/
|
|
197
|
-
export declare function resolveTargetCloudIdentity(decl: CloudIdentityDeclaration | undefined, env: string, member: string | undefined, target:
|
|
202
|
+
export declare function resolveTargetCloudIdentity(decl: CloudIdentityDeclaration | undefined, env: string, member: string | undefined, target: TargetNames): PipelineCloudIdentity | undefined;
|
|
198
203
|
/** The name a pull request environment's rule is matched against (#4330): any pull request's, as `pr-*` covers it. */
|
|
199
204
|
export declare const PR_ENV_IDENTITY_PROBE = "pr-1";
|
|
200
205
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-identity.d.ts","sourceRoot":"","sources":["../src/ci-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAIH,4CAA4C;AAC5C,eAAO,MAAM,MAAM,YAAI,KAAK,EAAE,KAAK,EAAE,OAAO,CAAU,CAAC;AACvD,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C,2FAA2F;AAC3F,MAAM,WAAW,iBAAiB;IAChC,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,0FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,qGAAqG;IACrG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qGAAqG;IACrG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,8HAA8H;IAC9H,QAAQ,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAC;IACl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K,MAAwC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAgBtM;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEzJ;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAwC,GAAG,gBAAgB,CAShI"}
|
package/dist/ci-identity.js
CHANGED
|
@@ -129,10 +129,13 @@ function globBody(g, paths) {
|
|
|
129
129
|
return re;
|
|
130
130
|
}
|
|
131
131
|
const matches = (globs, name) => globs === undefined || (name !== undefined && globs.some((g) => nameGlobMatch(g, name)));
|
|
132
|
-
const coversTarget = (r, target) => r.targets === undefined || (target !== undefined && r.targets.some((g) => targetGlobMatch(g,
|
|
132
|
+
const coversTarget = (r, target) => r.targets === undefined || (target !== undefined && (typeof target === "string" ? [target] : target).some((n) => r.targets.some((g) => targetGlobMatch(g, n))));
|
|
133
133
|
/**
|
|
134
134
|
* The first rule that covers `env`, `member` and `target`, or undefined.
|
|
135
135
|
* With no `target`, the first rule that names no targets: the pipeline's own.
|
|
136
|
+
* A `target` given as several names is covered by a rule when any one name
|
|
137
|
+
* matches a glob, and the first rule in declared order wins, whichever name
|
|
138
|
+
* it matched.
|
|
136
139
|
*/
|
|
137
140
|
export function ruleFor(rules, env, member, target) {
|
|
138
141
|
return rules.find((r) => matches(r.environments, env) && matches(r.members, member) && coversTarget(r, target));
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { GeneratedFile } from "../../import/generator.js";
|
|
2
|
+
import type { LexiconPlugin } from "../../lexicon.js";
|
|
3
|
+
import type { DeclaredEntity } from "../../lifecycle/identity-match.js";
|
|
4
|
+
import type { IndexDocument } from "../../lifecycle/index-document.js";
|
|
5
|
+
import { type IndexImportPlan, type IndexImportReport, type IndexImportSelection } from "../../lifecycle/index-import.js";
|
|
6
|
+
import { type ImportResult } from "./import.js";
|
|
7
|
+
export declare const INDEX_IMPORT_REPORT_FILE = "chant-index-import.json";
|
|
8
|
+
export interface IndexImportOptions {
|
|
9
|
+
/** A JSON file (one index document, or a list of the documents of one read), or `<scopeKey>[@<version>]` in the index store. */
|
|
10
|
+
index: string;
|
|
11
|
+
selection: IndexImportSelection;
|
|
12
|
+
/** Output directory (defaults to ./infra/). */
|
|
13
|
+
output?: string;
|
|
14
|
+
force?: boolean;
|
|
15
|
+
/** Where to write the report; defaults to `<output>/chant-index-import.json`. */
|
|
16
|
+
report?: string;
|
|
17
|
+
/** Where to write the adoption file for what was imported (`--adopt-out`, #4536). */
|
|
18
|
+
adoptOut?: string;
|
|
19
|
+
/** The project whose declared entities are checked (defaults to the current directory). */
|
|
20
|
+
projectDir?: string;
|
|
21
|
+
/** The project's source directory (`--src`; defaults to `sourceDir` from chant.config, then the project). */
|
|
22
|
+
src?: string;
|
|
23
|
+
/** Plugins to use instead of loading them (tests). */
|
|
24
|
+
plugins?: LexiconPlugin[];
|
|
25
|
+
/** Declared entities by lexicon instead of building the project (tests). */
|
|
26
|
+
declaredEntities?: ReadonlyMap<string, readonly DeclaredEntity[]>;
|
|
27
|
+
}
|
|
28
|
+
export interface IndexImportResult extends ImportResult {
|
|
29
|
+
report?: IndexImportReport;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The documents an index ref names: a file path, or a store ref in the
|
|
33
|
+
* grammar `chant search --index` reads (`<scopeKey>[@latest|@<version>]`,
|
|
34
|
+
* ../../lifecycle/index-join.ts), from the store chant.config's `snapshots`
|
|
35
|
+
* picks (#4519).
|
|
36
|
+
*/
|
|
37
|
+
export declare function loadIndexDocuments(ref: string, cwd: string): Promise<IndexDocument[]>;
|
|
38
|
+
/**
|
|
39
|
+
* The files an import plan writes, through each lexicon's template
|
|
40
|
+
* generator, with the plan's header on each group's first file. Pure apart
|
|
41
|
+
* from the generators, so the same plan gives byte-identical files.
|
|
42
|
+
*/
|
|
43
|
+
export declare function renderIndexImport(plan: IndexImportPlan, plugins: readonly LexiconPlugin[]): {
|
|
44
|
+
files: GeneratedFile[];
|
|
45
|
+
warnings: string[];
|
|
46
|
+
};
|
|
47
|
+
/** The report as written: two-space JSON and a final newline. */
|
|
48
|
+
export declare function indexImportReportJson(report: IndexImportReport): string;
|
|
49
|
+
export declare function importFromIndex(options: IndexImportOptions): Promise<IndexImportResult>;
|
|
50
|
+
/** One line per status: what was imported, declared and left out. */
|
|
51
|
+
export declare function summarizeIndexImport(report: IndexImportReport): string;
|
|
52
|
+
//# sourceMappingURL=import-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/import-index.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAErE,eAAO,MAAM,wBAAwB,4BAA4B,CAAC;AAElE,MAAM,WAAW,kBAAkB;IACjC,gIAAgI;IAChI,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,oBAAoB,CAAC;IAChC,+CAA+C;IAC/C,MAAM,CAAC,EA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