@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
|
@@ -8,12 +8,28 @@ export declare const QUERY_SCHEMA_VERSION = 1;
|
|
|
8
8
|
* for a project outside a workspace.
|
|
9
9
|
*/
|
|
10
10
|
export declare const QUERY_TABLES: {
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* One row per resource in each environment's newest snapshot. `attributes`
|
|
13
|
+
* is JSON. `ownership` is chant's marker verdict; `marker_stack` and
|
|
14
|
+
* `marker_env` (#4534) are the stack and env that marker names, read off
|
|
15
|
+
* the resource. `engine_ownership` and `engine_owned_by` (#4534) are an
|
|
16
|
+
* ownership engine's verdict and what bound the node (choudoufu, plunge;
|
|
17
|
+
* the snapshot's `facts.ownership` and `facts.ownedBy`), shown beside
|
|
18
|
+
* chant's and never in place of it. NULL means unknown.
|
|
19
|
+
*/
|
|
20
|
+
readonly resources: readonly [readonly ["member", "TEXT"], readonly ["env", "TEXT"], readonly ["stack", "TEXT"], readonly ["lexicon", "TEXT"], readonly ["name", "TEXT"], readonly ["type", "TEXT"], readonly ["physical_id", "TEXT"], readonly ["status", "TEXT"], readonly ["last_updated", "TEXT"], readonly ["ownership", "TEXT"], readonly ["attributes", "TEXT"], readonly ["git_sha", "TEXT"], readonly ["observed_at", "TEXT"], readonly ["marker_stack", "TEXT"], readonly ["marker_env", "TEXT"], readonly ["engine_ownership", "TEXT"], readonly ["engine_owned_by", "TEXT"]];
|
|
13
21
|
/** One row per snapshot file: what was observed, when, and how many resources it holds. */
|
|
14
22
|
readonly snapshots: readonly [readonly ["member", "TEXT"], readonly ["env", "TEXT"], readonly ["stack", "TEXT"], readonly ["lexicon", "TEXT"], readonly ["git_sha", "TEXT"], readonly ["observed_at", "TEXT"], readonly ["depth", "TEXT"], readonly ["resources", "INTEGER"], readonly ["unobserved", "INTEGER"]];
|
|
15
|
-
/**
|
|
16
|
-
|
|
23
|
+
/**
|
|
24
|
+
* One row per Op run record. `labels` and `outcomes` are JSON. `root_member`
|
|
25
|
+
* (#4482) is the workspace member whose directory holds the terraform root
|
|
26
|
+
* a TerraformApplyOp run applied, read off its `TerraformRootPath` outcome.
|
|
27
|
+
* NULL means unknown (#4508): any other run, outside a workspace, or a run
|
|
28
|
+
* whose Init step failed before it resolved the root's directory, since the
|
|
29
|
+
* Op names its root only by key and Init is what resolves it. A run whose
|
|
30
|
+
* `terraform init` itself failed still names it (#4512).
|
|
31
|
+
*/
|
|
32
|
+
readonly runs: readonly [readonly ["member", "TEXT"], readonly ["id", "TEXT"], readonly ["op", "TEXT"], readonly ["env", "TEXT"], readonly ["started", "TEXT"], readonly ["ended", "TEXT"], readonly ["status", "TEXT"], readonly ["git_sha", "TEXT"], readonly ["forge", "TEXT"], readonly ["run_url", "TEXT"], readonly ["failure_code", "TEXT"], readonly ["failure_reason", "TEXT"], readonly ["failed_phase", "TEXT"], readonly ["gate", "TEXT"], readonly ["steward", "TEXT"], readonly ["labels", "TEXT"], readonly ["outcomes", "TEXT"], readonly ["root_member", "TEXT"]];
|
|
17
33
|
/** One row per gate ledger line: `kind` is `pending` or `resolution`. `signed` is 1 for a sealed approval. */
|
|
18
34
|
readonly gates: readonly [readonly ["member", "TEXT"], readonly ["op", "TEXT"], readonly ["gate", "TEXT"], readonly ["kind", "TEXT"], readonly ["timestamp", "TEXT"], readonly ["resolved_by", "TEXT"], readonly ["relayed_by", "TEXT"], readonly ["approver_kind", "TEXT"], readonly ["plan_digest", "TEXT"], readonly ["environment", "TEXT"], readonly ["release_digest", "TEXT"], readonly ["git_sha", "TEXT"], readonly ["run_id", "TEXT"], readonly ["url", "TEXT"], readonly ["note", "TEXT"], readonly ["expires_at", "TEXT"], readonly ["origin", "TEXT"], readonly ["empty", "INTEGER"], readonly ["signed", "INTEGER"]];
|
|
19
35
|
/** One row per deploy record in `<env>/releases.jsonl`. `promoted_from`, `restores` and `redeploys` are JSON. */
|
|
@@ -23,6 +39,20 @@ export declare const QUERY_TABLES: {
|
|
|
23
39
|
/** One row per line of `_releases/cuts.jsonl`. `signed` is 1 for a signed cut. */
|
|
24
40
|
readonly cuts: readonly [readonly ["member", "TEXT"], readonly ["release_digest", "TEXT"], readonly ["label", "TEXT"], readonly ["actor", "TEXT"], readonly ["timestamp", "TEXT"], readonly ["run_id", "TEXT"], readonly ["forge", "TEXT"], readonly ["channel", "TEXT"], readonly ["signed", "INTEGER"], readonly ["composed_base", "TEXT"]];
|
|
25
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* The first chant that writes `root_member` on a `runs` row, in `chant query`
|
|
44
|
+
* and in `chant ledger runs --json` (#4482, #4500). A contract field added
|
|
45
|
+
* within version 1: a reader treats a row from an older chant as lacking it.
|
|
46
|
+
*/
|
|
47
|
+
export declare const LEDGER_ROOT_MEMBER_FLOOR = "0.124.54";
|
|
48
|
+
/**
|
|
49
|
+
* The first chant that writes `marker_stack`, `marker_env`,
|
|
50
|
+
* `engine_ownership` and `engine_owned_by` on a `resources` row, in
|
|
51
|
+
* `chant query` and in `chant ledger resources --json` (#4534). Columns added
|
|
52
|
+
* within version 1: a reader treats a row from an older chant as lacking
|
|
53
|
+
* them, which reads as unknown.
|
|
54
|
+
*/
|
|
55
|
+
export declare const QUERY_OWNERSHIP_COLUMNS_FLOOR = "0.124.54";
|
|
26
56
|
export type QueryTable = keyof typeof QUERY_TABLES;
|
|
27
57
|
/** The table that describes the others: one row per column, with the schema version. */
|
|
28
58
|
export declare const SCHEMA_TABLE = "chant_schema";
|
|
@@ -34,6 +64,17 @@ export type QueryData = Record<QueryTable, QueryRow[]>;
|
|
|
34
64
|
export interface QueryLedger {
|
|
35
65
|
member: string | null;
|
|
36
66
|
port: LedgerReadPort;
|
|
67
|
+
/**
|
|
68
|
+
* The snapshot family of the index store (#4519, `snapshotReadPort`). Given,
|
|
69
|
+
* the `resources` and `snapshots` rows come from it and snapshot files on
|
|
70
|
+
* `port` are skipped. Absent, they come from `port`, as before the store.
|
|
71
|
+
*/
|
|
72
|
+
snapshots?: LedgerReadPort;
|
|
73
|
+
/**
|
|
74
|
+
* The member whose directory holds a workspace-relative path, or null
|
|
75
|
+
* (#4482). Given in a workspace; without it `root_member` is NULL.
|
|
76
|
+
*/
|
|
77
|
+
ownerOfPath?: (path: string) => string | null;
|
|
37
78
|
}
|
|
38
79
|
export interface QueryLoad {
|
|
39
80
|
data: QueryData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/lifecycle/query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/lifecycle/query.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAOpD,6CAA6C;AAC7C,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAItC;;;;;GAKG;AACH,eAAO,MAAM,YAAY;IACvB;;;;;;;;OAQG;;IAEH,2FAA2F;;IAE3F;;;;;;;;OAQG;;IAEH,8GAA8G;;IAE9G,iHAAiH;;IAEjH,4IAA4I;;IAE5I,kFAAkF;;CAEH,CAAC;AAElF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,aAAe,CAAC;AAErD;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,aAAe,CAAC;AAE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AG,MAAM,CAG7C;AAED,mDAAmD;AACnD,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAoCjF;AAID,0DAA0D;AAC1D,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,WAAW,GAAG,MAAM,CAMxD"}
|
package/dist/lifecycle/query.js
CHANGED
|
@@ -2,6 +2,7 @@ import { parseGateLedger, GATES_DIR } from "./gate-ledger.js";
|
|
|
2
2
|
import { parseReleaseLedger, releaseLedgerLines } from "./release-read.js";
|
|
3
3
|
import { CUTS_FILE, parseCuts, parseRelease, RELEASES_DIR, verifyReleaseDigest } from "./release-store.js";
|
|
4
4
|
import { opOfRunLedgerFile, parseRunLedger } from "./run-ledger.js";
|
|
5
|
+
import { NEXT_RELEASE } from "../release-floors.js";
|
|
5
6
|
/** The version of the table schema below. */
|
|
6
7
|
export const QUERY_SCHEMA_VERSION = 1;
|
|
7
8
|
/**
|
|
@@ -11,12 +12,28 @@ export const QUERY_SCHEMA_VERSION = 1;
|
|
|
11
12
|
* for a project outside a workspace.
|
|
12
13
|
*/
|
|
13
14
|
export const QUERY_TABLES = {
|
|
14
|
-
/**
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* One row per resource in each environment's newest snapshot. `attributes`
|
|
17
|
+
* is JSON. `ownership` is chant's marker verdict; `marker_stack` and
|
|
18
|
+
* `marker_env` (#4534) are the stack and env that marker names, read off
|
|
19
|
+
* the resource. `engine_ownership` and `engine_owned_by` (#4534) are an
|
|
20
|
+
* ownership engine's verdict and what bound the node (choudoufu, plunge;
|
|
21
|
+
* the snapshot's `facts.ownership` and `facts.ownedBy`), shown beside
|
|
22
|
+
* chant's and never in place of it. NULL means unknown.
|
|
23
|
+
*/
|
|
24
|
+
resources: [["member", "TEXT"], ["env", "TEXT"], ["stack", "TEXT"], ["lexicon", "TEXT"], ["name", "TEXT"], ["type", "TEXT"], ["physical_id", "TEXT"], ["status", "TEXT"], ["last_updated", "TEXT"], ["ownership", "TEXT"], ["attributes", "TEXT"], ["git_sha", "TEXT"], ["observed_at", "TEXT"], ["marker_stack", "TEXT"], ["marker_env", "TEXT"], ["engine_ownership", "TEXT"], ["engine_owned_by", "TEXT"]],
|
|
16
25
|
/** One row per snapshot file: what was observed, when, and how many resources it holds. */
|
|
17
26
|
snapshots: [["member", "TEXT"], ["env", "TEXT"], ["stack", "TEXT"], ["lexicon", "TEXT"], ["git_sha", "TEXT"], ["observed_at", "TEXT"], ["depth", "TEXT"], ["resources", "INTEGER"], ["unobserved", "INTEGER"]],
|
|
18
|
-
/**
|
|
19
|
-
|
|
27
|
+
/**
|
|
28
|
+
* One row per Op run record. `labels` and `outcomes` are JSON. `root_member`
|
|
29
|
+
* (#4482) is the workspace member whose directory holds the terraform root
|
|
30
|
+
* a TerraformApplyOp run applied, read off its `TerraformRootPath` outcome.
|
|
31
|
+
* NULL means unknown (#4508): any other run, outside a workspace, or a run
|
|
32
|
+
* whose Init step failed before it resolved the root's directory, since the
|
|
33
|
+
* Op names its root only by key and Init is what resolves it. A run whose
|
|
34
|
+
* `terraform init` itself failed still names it (#4512).
|
|
35
|
+
*/
|
|
36
|
+
runs: [["member", "TEXT"], ["id", "TEXT"], ["op", "TEXT"], ["env", "TEXT"], ["started", "TEXT"], ["ended", "TEXT"], ["status", "TEXT"], ["git_sha", "TEXT"], ["forge", "TEXT"], ["run_url", "TEXT"], ["failure_code", "TEXT"], ["failure_reason", "TEXT"], ["failed_phase", "TEXT"], ["gate", "TEXT"], ["steward", "TEXT"], ["labels", "TEXT"], ["outcomes", "TEXT"], ["root_member", "TEXT"]],
|
|
20
37
|
/** One row per gate ledger line: `kind` is `pending` or `resolution`. `signed` is 1 for a sealed approval. */
|
|
21
38
|
gates: [["member", "TEXT"], ["op", "TEXT"], ["gate", "TEXT"], ["kind", "TEXT"], ["timestamp", "TEXT"], ["resolved_by", "TEXT"], ["relayed_by", "TEXT"], ["approver_kind", "TEXT"], ["plan_digest", "TEXT"], ["environment", "TEXT"], ["release_digest", "TEXT"], ["git_sha", "TEXT"], ["run_id", "TEXT"], ["url", "TEXT"], ["note", "TEXT"], ["expires_at", "TEXT"], ["origin", "TEXT"], ["empty", "INTEGER"], ["signed", "INTEGER"]],
|
|
22
39
|
/** One row per deploy record in `<env>/releases.jsonl`. `promoted_from`, `restores` and `redeploys` are JSON. */
|
|
@@ -26,6 +43,20 @@ export const QUERY_TABLES = {
|
|
|
26
43
|
/** One row per line of `_releases/cuts.jsonl`. `signed` is 1 for a signed cut. */
|
|
27
44
|
cuts: [["member", "TEXT"], ["release_digest", "TEXT"], ["label", "TEXT"], ["actor", "TEXT"], ["timestamp", "TEXT"], ["run_id", "TEXT"], ["forge", "TEXT"], ["channel", "TEXT"], ["signed", "INTEGER"], ["composed_base", "TEXT"]],
|
|
28
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* The first chant that writes `root_member` on a `runs` row, in `chant query`
|
|
48
|
+
* and in `chant ledger runs --json` (#4482, #4500). A contract field added
|
|
49
|
+
* within version 1: a reader treats a row from an older chant as lacking it.
|
|
50
|
+
*/
|
|
51
|
+
export const LEDGER_ROOT_MEMBER_FLOOR = NEXT_RELEASE;
|
|
52
|
+
/**
|
|
53
|
+
* The first chant that writes `marker_stack`, `marker_env`,
|
|
54
|
+
* `engine_ownership` and `engine_owned_by` on a `resources` row, in
|
|
55
|
+
* `chant query` and in `chant ledger resources --json` (#4534). Columns added
|
|
56
|
+
* within version 1: a reader treats a row from an older chant as lacking
|
|
57
|
+
* them, which reads as unknown.
|
|
58
|
+
*/
|
|
59
|
+
export const QUERY_OWNERSHIP_COLUMNS_FLOOR = NEXT_RELEASE;
|
|
29
60
|
/** The table that describes the others: one row per column, with the schema version. */
|
|
30
61
|
export const SCHEMA_TABLE = "chant_schema";
|
|
31
62
|
/** A statement that can't run, or a Node.js with no SQLite. The message is for a person. */
|
|
@@ -51,7 +82,25 @@ function snapshotRows(member, env, file, s, data) {
|
|
|
51
82
|
const resources = Object.entries(s.resources);
|
|
52
83
|
data.snapshots.push({ member, env, stack, lexicon: s.lexicon, ...at, depth: s.depth ?? "identity", resources: resources.length, unobserved: Object.keys(s.unobserved ?? {}).length });
|
|
53
84
|
for (const [name, r] of resources) {
|
|
54
|
-
data.resources.push({
|
|
85
|
+
data.resources.push({
|
|
86
|
+
member,
|
|
87
|
+
env,
|
|
88
|
+
stack,
|
|
89
|
+
lexicon: s.lexicon,
|
|
90
|
+
name,
|
|
91
|
+
type: str(r?.type),
|
|
92
|
+
physical_id: str(r?.physicalId),
|
|
93
|
+
status: str(r?.status),
|
|
94
|
+
last_updated: str(r?.lastUpdated),
|
|
95
|
+
ownership: str(r?.ownership),
|
|
96
|
+
attributes: json(r?.attributes),
|
|
97
|
+
...at,
|
|
98
|
+
// Read as data from the snapshot (#4534): a projection for people, never a decision.
|
|
99
|
+
marker_stack: str(r?.marker?.stack),
|
|
100
|
+
marker_env: str(r?.marker?.env),
|
|
101
|
+
engine_ownership: str(r?.facts?.ownership),
|
|
102
|
+
engine_owned_by: str(r?.facts?.ownedBy),
|
|
103
|
+
});
|
|
55
104
|
}
|
|
56
105
|
}
|
|
57
106
|
function gateRow(member, r) {
|
|
@@ -80,6 +129,19 @@ function gateRow(member, r) {
|
|
|
80
129
|
signed: bit(res?.seal !== undefined),
|
|
81
130
|
};
|
|
82
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* The member a run's `TerraformRootPath` outcome falls in (#4482): the
|
|
134
|
+
* workspace-relative directory of the root a TerraformApplyOp's Init step
|
|
135
|
+
* resolved. A local `chant run` records under the member that declares the
|
|
136
|
+
* Op, so this is what names the member whose root it applied when the two
|
|
137
|
+
* differ, as for a choudoufu member applied from a chant one.
|
|
138
|
+
*/
|
|
139
|
+
function rootMemberOf(outcomes, ownerOfPath) {
|
|
140
|
+
const path = outcomes?.TerraformRootPath;
|
|
141
|
+
if (typeof path !== "string" || !ownerOfPath)
|
|
142
|
+
return null;
|
|
143
|
+
return ownerOfPath(path);
|
|
144
|
+
}
|
|
83
145
|
/**
|
|
84
146
|
* Read every table's rows from the ledgers, in the order given. A ledger
|
|
85
147
|
* whose branch is absent reads as no rows. A line or file that is not its
|
|
@@ -89,11 +151,31 @@ function gateRow(member, r) {
|
|
|
89
151
|
export async function loadQueryData(ledgers) {
|
|
90
152
|
const data = empty(() => []);
|
|
91
153
|
const malformed = empty(() => 0);
|
|
92
|
-
for (const { member, port } of ledgers) {
|
|
154
|
+
for (const { member, port, ownerOfPath, snapshots } of ledgers) {
|
|
155
|
+
if (snapshots) {
|
|
156
|
+
for (const env of (await snapshots.trees()).filter((t) => !t.startsWith("_")).sort()) {
|
|
157
|
+
for (const file of (await snapshots.list(env)).sort()) {
|
|
158
|
+
if (!file.endsWith(".json"))
|
|
159
|
+
continue;
|
|
160
|
+
const text = await snapshots.read(env, file);
|
|
161
|
+
let parsed;
|
|
162
|
+
try {
|
|
163
|
+
parsed = text === null ? null : JSON.parse(text);
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
parsed = null;
|
|
167
|
+
}
|
|
168
|
+
if (isSnapshot(parsed))
|
|
169
|
+
snapshotRows(member, env, file, parsed, data);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
93
173
|
const trees = (await port.trees()).sort();
|
|
94
174
|
for (const env of trees.filter((t) => !t.startsWith("_"))) {
|
|
95
175
|
for (const file of (await port.list(env)).sort()) {
|
|
96
176
|
if (file.endsWith(".json")) {
|
|
177
|
+
if (snapshots)
|
|
178
|
+
continue;
|
|
97
179
|
const text = await port.read(env, file);
|
|
98
180
|
let parsed;
|
|
99
181
|
try {
|
|
@@ -122,7 +204,7 @@ export async function loadQueryData(ledgers) {
|
|
|
122
204
|
const { records, malformed: bad } = parseRunLedger(text);
|
|
123
205
|
malformed.runs += bad;
|
|
124
206
|
for (const r of records) {
|
|
125
|
-
data.runs.push({ member, id: r.id, op: r.op, env: r.env, started: r.started, ended: r.ended, status: r.status, git_sha: str(r.gitSha), forge: str(r.runOrigin?.forge), run_url: str(r.runOrigin?.url), failure_code: str(r.failure?.code), failure_reason: str(r.failure?.reason), failed_phase: str(r.failure?.phase), gate: str(r.gate?.name), steward: str(r.steward), labels: json(r.labels ?? {}), outcomes: json(r.outcomes ?? {}) });
|
|
207
|
+
data.runs.push({ member, id: r.id, op: r.op, env: r.env, started: r.started, ended: r.ended, status: r.status, git_sha: str(r.gitSha), forge: str(r.runOrigin?.forge), run_url: str(r.runOrigin?.url), failure_code: str(r.failure?.code), failure_reason: str(r.failure?.reason), failed_phase: str(r.failure?.phase), gate: str(r.gate?.name), steward: str(r.steward), labels: json(r.labels ?? {}), outcomes: json(r.outcomes ?? {}), root_member: rootMemberOf(r.outcomes, ownerOfPath) });
|
|
126
208
|
}
|
|
127
209
|
}
|
|
128
210
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* recorded estate had to reach for the live endpoint, and a snapshot could
|
|
14
14
|
* answer most questions but never all of them.
|
|
15
15
|
*/
|
|
16
|
+
import { type SnapshotStore } from "./snapshot-store.js";
|
|
16
17
|
import type { LiveObservation } from "../graph-ir.js";
|
|
17
18
|
import type { ObservationDepth } from "./types.js";
|
|
18
19
|
/**
|
|
@@ -25,7 +26,7 @@ import type { ObservationDepth } from "./types.js";
|
|
|
25
26
|
* is shared. Nothing downstream needs to know which source it got.
|
|
26
27
|
*
|
|
27
28
|
* `latest` is the only ref for now. A specific commit is the natural extension
|
|
28
|
-
* and the
|
|
29
|
+
* and the store already supports it (`SnapshotStore.readAt`), but "answer from what
|
|
29
30
|
* is recorded" is the question worth settling first.
|
|
30
31
|
*/
|
|
31
32
|
/**
|
|
@@ -36,8 +37,14 @@ import type { ObservationDepth } from "./types.js";
|
|
|
36
37
|
* failure here means the caller says the plain version of the message, never
|
|
37
38
|
* that the command fails.
|
|
38
39
|
*/
|
|
39
|
-
export declare function hasSnapshot(environment: string
|
|
40
|
-
|
|
40
|
+
export declare function hasSnapshot(environment: string, opts?: {
|
|
41
|
+
store?: SnapshotStore;
|
|
42
|
+
}): Promise<boolean>;
|
|
43
|
+
export declare function replaySnapshots(environment: string, ref: string, scopedStacks: Set<string>,
|
|
44
|
+
/** The index store to read (#4519). Default: the project's. */
|
|
45
|
+
opts?: {
|
|
46
|
+
store?: SnapshotStore;
|
|
47
|
+
}): Promise<{
|
|
41
48
|
observations: LiveObservation[];
|
|
42
49
|
commit: string;
|
|
43
50
|
timestamp: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../src/lifecycle/replay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../src/lifecycle/replay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAsD,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE1G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAqB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAOzG;AAED,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC;AACzB,+DAA+D;AAC/D,IAAI,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,GAC/B,OAAO,CACN;IAAE,YAAY,EAAE,eAAe,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,GAC/F;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CACnC,CA+IA"}
|
package/dist/lifecycle/replay.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* recorded estate had to reach for the live endpoint, and a snapshot could
|
|
14
14
|
* answer most questions but never all of them.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
16
|
+
import { readEnvironmentSnapshotsFrom, resolveSnapshotStore } from "./snapshot-store.js";
|
|
17
17
|
import { unqualifiedKey } from "./identity.js";
|
|
18
18
|
/**
|
|
19
19
|
* Rebuild observations from a recorded snapshot (#1266).
|
|
@@ -25,7 +25,7 @@ import { unqualifiedKey } from "./identity.js";
|
|
|
25
25
|
* is shared. Nothing downstream needs to know which source it got.
|
|
26
26
|
*
|
|
27
27
|
* `latest` is the only ref for now. A specific commit is the natural extension
|
|
28
|
-
* and the
|
|
28
|
+
* and the store already supports it (`SnapshotStore.readAt`), but "answer from what
|
|
29
29
|
* is recorded" is the question worth settling first.
|
|
30
30
|
*/
|
|
31
31
|
/**
|
|
@@ -36,22 +36,26 @@ import { unqualifiedKey } from "./identity.js";
|
|
|
36
36
|
* failure here means the caller says the plain version of the message, never
|
|
37
37
|
* that the command fails.
|
|
38
38
|
*/
|
|
39
|
-
export async function hasSnapshot(environment) {
|
|
39
|
+
export async function hasSnapshot(environment, opts) {
|
|
40
40
|
try {
|
|
41
|
-
|
|
41
|
+
const store = opts?.store ?? (await resolveSnapshotStore());
|
|
42
|
+
return (await store.keys(environment)).length > 0;
|
|
42
43
|
}
|
|
43
44
|
catch {
|
|
44
45
|
return false;
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
|
-
export async function replaySnapshots(environment, ref, scopedStacks
|
|
48
|
+
export async function replaySnapshots(environment, ref, scopedStacks,
|
|
49
|
+
/** The index store to read (#4519). Default: the project's. */
|
|
50
|
+
opts) {
|
|
48
51
|
if (ref !== "latest" && ref !== "true") {
|
|
49
52
|
return {
|
|
50
53
|
error: `chant search --at only accepts "latest" for now, got "${ref}"`,
|
|
51
54
|
hint: "a specific snapshot commit is not wired up yet",
|
|
52
55
|
};
|
|
53
56
|
}
|
|
54
|
-
const
|
|
57
|
+
const store = opts?.store ?? (await resolveSnapshotStore());
|
|
58
|
+
const stored = await readEnvironmentSnapshotsFrom(store, environment);
|
|
55
59
|
if (stored.size === 0) {
|
|
56
60
|
return {
|
|
57
61
|
error: `No snapshots found for environment "${environment}"`,
|
|
@@ -43,9 +43,10 @@ export interface ScenarioGivenFile {
|
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* `given: snapshot("prod")` — the last snapshot recorded for that environment
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
46
|
+
* in the project's index store (one file per lexicon, read through
|
|
47
|
+
* ./snapshot-store.ts, #4519), replayed exactly as `chant lifecycle plan`
|
|
48
|
+
* reads its own prior snapshot. With no store (`none`) a scenario names a
|
|
49
|
+
* checked-in fixture instead.
|
|
49
50
|
*/
|
|
50
51
|
export interface ScenarioGivenEnv {
|
|
51
52
|
readonly kind: "env";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario.d.ts","sourceRoot":"","sources":["../../src/lifecycle/scenario.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;iEAEiE;AACjE,eAAO,MAAM,eAAe,eAA+B,CAAC;AAE5D,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,oBAAoB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED
|
|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K,EAAE,aAAa,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,mBAAmB,CAoBpF;AAmID,6CAA6C;AAC7C,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAOvE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAM5G"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A {@link SnapshotStore} made of the methods a test supplies, every other
|
|
3
|
+
* method reading as empty (#4519). It imports nothing at runtime, so a
|
|
4
|
+
* `vi.mock` factory can load it while the modules the real store needs are
|
|
5
|
+
* themselves mocked.
|
|
6
|
+
*/
|
|
7
|
+
import type { SnapshotStore } from "./snapshot-store.js";
|
|
8
|
+
export declare function fakeSnapshotStore(parts?: Partial<SnapshotStore>): SnapshotStore;
|
|
9
|
+
//# sourceMappingURL=snapshot-store-fake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot-store-fake.d.ts","sourceRoot":"","sources":["../../src/lifecycle/snapshot-store-fake.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,wBAAgB,iBAAiB,CAAC,KAAK,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,aAAa,CAoBnF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function fakeSnapshotStore(parts = {}) {
|
|
2
|
+
return {
|
|
3
|
+
kind: "git-ref",
|
|
4
|
+
where: "the test store",
|
|
5
|
+
writable: true,
|
|
6
|
+
write: async () => ({ written: true }),
|
|
7
|
+
readLatest: async () => null,
|
|
8
|
+
readAt: async () => null,
|
|
9
|
+
list: async () => [],
|
|
10
|
+
keys: async () => [],
|
|
11
|
+
environments: async () => [],
|
|
12
|
+
writeIndex: async () => ({ written: false, reason: "the test store keeps no index" }),
|
|
13
|
+
listIndex: async () => [],
|
|
14
|
+
readIndexAt: async () => null,
|
|
15
|
+
readIndexLatest: async () => null,
|
|
16
|
+
readIndexScope: async () => null,
|
|
17
|
+
fetch: async () => { },
|
|
18
|
+
publish: async () => ({ status: "local" }),
|
|
19
|
+
...parts,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/** Explicit credentials. */
|
|
2
|
+
export interface S3StoreCredentials {
|
|
3
|
+
accessKeyId: string;
|
|
4
|
+
secretAccessKey: string;
|
|
5
|
+
sessionToken?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Where an s3 store keeps its objects. */
|
|
8
|
+
export interface S3StoreSettings {
|
|
9
|
+
bucket: string;
|
|
10
|
+
/** Key prefix, without leading or trailing `/`. Default `chant`. */
|
|
11
|
+
prefix?: string;
|
|
12
|
+
/** Signing region. Default `us-east-1`. */
|
|
13
|
+
region?: string;
|
|
14
|
+
/** An S3-compatible endpoint (an emulator, MinIO). With one, credentials must be explicit. */
|
|
15
|
+
endpoint?: string;
|
|
16
|
+
/** Path-style addressing. Default: on with an endpoint, off without. */
|
|
17
|
+
forcePathStyle?: boolean;
|
|
18
|
+
credentials?: S3StoreCredentials;
|
|
19
|
+
}
|
|
20
|
+
/** The `fetch` the medium calls. Tests pass a fake. */
|
|
21
|
+
export type S3Fetch = (url: string, init: {
|
|
22
|
+
method: string;
|
|
23
|
+
headers: Record<string, string>;
|
|
24
|
+
body?: string;
|
|
25
|
+
}) => Promise<{
|
|
26
|
+
status: number;
|
|
27
|
+
headers: {
|
|
28
|
+
get(name: string): string | null;
|
|
29
|
+
};
|
|
30
|
+
text(): Promise<string>;
|
|
31
|
+
}>;
|
|
32
|
+
export declare class S3StoreError extends Error {
|
|
33
|
+
readonly status?: number | undefined;
|
|
34
|
+
constructor(message: string, status?: number | undefined);
|
|
35
|
+
}
|
|
36
|
+
/** One object version, newest first in {@link S3Medium.versions}. */
|
|
37
|
+
export interface S3ObjectVersion {
|
|
38
|
+
key: string;
|
|
39
|
+
versionId: string;
|
|
40
|
+
lastModified: string;
|
|
41
|
+
isLatest: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Resolve the credentials the medium signs with, by the rule in the module
|
|
45
|
+
* header. Exported for the test that pins it.
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveS3Credentials(settings: S3StoreSettings, env?: Record<string, string | undefined>): S3StoreCredentials;
|
|
48
|
+
/** RFC 3986 percent-encoding, as S3 signs it. */
|
|
49
|
+
export declare function encodeRfc3986(value: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* SigV4 headers for one S3 request. S3 signs the path encoded once, which is
|
|
52
|
+
* how {@link S3Medium} builds it, so the URL's pathname is the canonical URI
|
|
53
|
+
* as it stands.
|
|
54
|
+
*/
|
|
55
|
+
export declare function signS3Request(req: {
|
|
56
|
+
method: string;
|
|
57
|
+
url: string;
|
|
58
|
+
headers: Record<string, string>;
|
|
59
|
+
body: string;
|
|
60
|
+
region: string;
|
|
61
|
+
credentials: S3StoreCredentials;
|
|
62
|
+
now?: Date;
|
|
63
|
+
}): Record<string, string>;
|
|
64
|
+
/**
|
|
65
|
+
* Get, put and list over one bucket. Keys passed in are relative to the
|
|
66
|
+
* store's prefix.
|
|
67
|
+
*/
|
|
68
|
+
export declare class S3Medium {
|
|
69
|
+
readonly settings: S3StoreSettings;
|
|
70
|
+
private readonly prefix;
|
|
71
|
+
private readonly region;
|
|
72
|
+
private readonly fetchImpl;
|
|
73
|
+
private credentials?;
|
|
74
|
+
constructor(settings: S3StoreSettings, opts?: {
|
|
75
|
+
fetch?: S3Fetch;
|
|
76
|
+
env?: Record<string, string | undefined>;
|
|
77
|
+
});
|
|
78
|
+
/** `s3://bucket/prefix`, for messages. */
|
|
79
|
+
get where(): string;
|
|
80
|
+
private fullKey;
|
|
81
|
+
private stripPrefix;
|
|
82
|
+
private url;
|
|
83
|
+
private request;
|
|
84
|
+
/** The object's content, or null when absent. `versionId` reads an older version. */
|
|
85
|
+
get(key: string, versionId?: string): Promise<string | null>;
|
|
86
|
+
/**
|
|
87
|
+
* Put an object. With `ifAbsent`, an existing key is not overwritten and
|
|
88
|
+
* the result says `exists`. Returns the version id when the bucket keeps
|
|
89
|
+
* versions.
|
|
90
|
+
*/
|
|
91
|
+
put(key: string, content: string, opts?: {
|
|
92
|
+
ifAbsent?: boolean;
|
|
93
|
+
}): Promise<{
|
|
94
|
+
exists: boolean;
|
|
95
|
+
versionId?: string;
|
|
96
|
+
}>;
|
|
97
|
+
/** The names directly under `dir/`: files, and directories with a trailing `/`. */
|
|
98
|
+
list(dir: string): Promise<string[]>;
|
|
99
|
+
/** Every version of every key under `dir/` (recursively), newest first. */
|
|
100
|
+
versions(dir: string): Promise<S3ObjectVersion[]>;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=snapshot-store-s3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot-store-s3.d.ts","sourceRoot":"","sources":["../../src/lifecycle/snapshot-store-s3.ts"],"names":[],"mappings":"AAiCA,4BAA4B;AAC5B,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,2CAA2C;AAC3C,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,MAAM,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