@intentius/chant 0.57.0 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/catalog.d.ts +51 -1
- package/dist/audit/catalog.d.ts.map +1 -1
- package/dist/audit/core.d.ts +36 -1
- package/dist/audit/core.d.ts.map +1 -1
- package/dist/audit/discover.d.ts +26 -9
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/audit/lineage.d.ts +10 -0
- package/dist/audit/lineage.d.ts.map +1 -0
- package/dist/audit/prior-art.d.ts +385 -0
- package/dist/audit/prior-art.d.ts.map +1 -0
- package/dist/audit/proof.d.ts +16 -0
- package/dist/audit/proof.d.ts.map +1 -1
- package/dist/audit/report-html.d.ts.map +1 -1
- package/dist/audit/report-model.d.ts +8 -1
- package/dist/audit/report-model.d.ts.map +1 -1
- package/dist/audit/report.d.ts.map +1 -1
- package/dist/audit/rules-doc.d.ts +3 -0
- package/dist/audit/rules-doc.d.ts.map +1 -1
- package/dist/audit/secrets.d.ts +15 -0
- package/dist/audit/secrets.d.ts.map +1 -1
- package/dist/audit/terraform-state.d.ts +46 -0
- package/dist/audit/terraform-state.d.ts.map +1 -0
- package/dist/build.d.ts +17 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/claimed-fields.d.ts +161 -0
- package/dist/claimed-fields.d.ts.map +1 -0
- package/dist/cli/build-params-cli.d.ts +2 -2
- package/dist/cli/command-group.d.ts +14 -0
- package/dist/cli/command-group.d.ts.map +1 -1
- package/dist/cli/commands/audit.d.ts +17 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/carve-bridge.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon-docs.d.ts +1 -1
- package/dist/cli/commands/check-lexicon-examples.d.ts +16 -6
- package/dist/cli/commands/check-lexicon-examples.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon/templates/codegen.d.ts +1 -0
- package/dist/cli/commands/init-lexicon/templates/codegen.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon/templates/project.d.ts +7 -0
- package/dist/cli/commands/init-lexicon/templates/project.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/lint.d.ts +13 -0
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/onboard.d.ts +2 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +82 -16
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts +49 -42
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts +12 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/op-tools.d.ts +16 -1
- package/dist/cli/mcp/op-tools.d.ts.map +1 -1
- package/dist/cli/mcp/resource-handlers.d.ts.map +1 -1
- package/dist/cli/mcp/resources/context.d.ts.map +1 -1
- package/dist/cli/plugins.d.ts +22 -0
- package/dist/cli/plugins.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +40 -9
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/generate-post-synth-barrel.d.ts +1 -1
- package/dist/components/auto-release.d.ts +10 -20
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/capability.d.ts +4 -4
- package/dist/components/cli-support.d.ts +24 -22
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/component.d.ts +21 -6
- package/dist/components/component.d.ts.map +1 -1
- package/dist/components/driver-output.d.ts.map +1 -1
- package/dist/components/driver.d.ts +73 -37
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/manifest-persistence.d.ts +1 -9
- package/dist/components/manifest-persistence.d.ts.map +1 -1
- package/dist/components/run-progress.d.ts +6 -6
- package/dist/components/run-progress.d.ts.map +1 -1
- package/dist/components/verbs/run-agent.d.ts +10 -22
- package/dist/components/verbs/run-agent.d.ts.map +1 -1
- package/dist/components/verbs/verify.d.ts +2 -2
- package/dist/deep-observation.d.ts +17 -0
- package/dist/deep-observation.d.ts.map +1 -1
- package/dist/detectLexicon.d.ts +13 -0
- package/dist/detectLexicon.d.ts.map +1 -1
- package/dist/discovery/files.d.ts +4 -4
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/param-deps.d.ts +33 -0
- package/dist/discovery/param-deps.d.ts.map +1 -1
- package/dist/discovery/sandbox/bundle.d.ts.map +1 -1
- package/dist/discovery/sandbox/config-wire.d.ts +2 -2
- package/dist/fold/foldable-helpers.d.ts +5 -1
- package/dist/fold/foldable-helpers.d.ts.map +1 -1
- package/dist/fold-provenance.d.ts +236 -0
- package/dist/fold-provenance.d.ts.map +1 -0
- package/dist/graph-ops.d.ts +1 -1
- package/dist/held-elsewhere.d.ts +85 -0
- package/dist/held-elsewhere.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/kubectl-context.d.ts +3 -3
- package/dist/lexicon-config.d.ts +4 -4
- package/dist/lexicon-plugin-helpers.d.ts +1 -1
- package/dist/lexicon.d.ts +273 -16
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/change-set.d.ts +13 -0
- package/dist/lifecycle/change-set.d.ts.map +1 -1
- package/dist/lifecycle/deep-diff.d.ts +133 -6
- package/dist/lifecycle/deep-diff.d.ts.map +1 -1
- package/dist/lifecycle/deep-observe.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +79 -3
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +1 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.d.ts +2 -2
- package/dist/lifecycle/run-ledger.d.ts +53 -0
- package/dist/lifecycle/run-ledger.d.ts.map +1 -0
- package/dist/lifecycle/symptoms.d.ts +3 -3
- package/dist/lifecycle/symptoms.d.ts.map +1 -1
- package/dist/lint/config.d.ts +81 -2
- package/dist/lint/config.d.ts.map +1 -1
- package/dist/lint/post-synth.d.ts +55 -2
- package/dist/lint/post-synth.d.ts.map +1 -1
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts +1 -1
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts.map +1 -1
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts +1 -1
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts.map +1 -1
- package/dist/lint/rules/comp/comp004-gate-needs-durable-runtime.d.ts +44 -0
- package/dist/lint/rules/comp/comp004-gate-needs-durable-runtime.d.ts.map +1 -0
- package/dist/lint/rules/comp/index.d.ts +1 -1
- package/dist/lint/rules/comp/index.d.ts.map +1 -1
- package/dist/lint/rules/op/index.d.ts +16 -0
- package/dist/lint/rules/op/index.d.ts.map +1 -0
- package/dist/lint/rules/op/ops012-activity-contract.d.ts +27 -0
- package/dist/lint/rules/op/ops012-activity-contract.d.ts.map +1 -0
- package/dist/lint/rules/op/ops013-step-output-ref.d.ts +61 -0
- package/dist/lint/rules/op/ops013-step-output-ref.d.ts.map +1 -0
- package/dist/lint/rules/op/ops014-converge-rule-refusals.d.ts +55 -0
- package/dist/lint/rules/op/ops014-converge-rule-refusals.d.ts.map +1 -0
- package/dist/lint/rules/op/support.d.ts +12 -0
- package/dist/lint/rules/op/support.d.ts.map +1 -0
- package/dist/lint/suppressions.d.ts +108 -0
- package/dist/lint/suppressions.d.ts.map +1 -0
- package/dist/live-endpoint.d.ts +1 -1
- package/dist/op/activities/activity-contracts.d.ts +54 -0
- package/dist/op/activities/activity-contracts.d.ts.map +1 -0
- package/dist/op/activities/apply.d.ts +262 -0
- package/dist/op/activities/apply.d.ts.map +1 -0
- package/dist/op/activities/build.d.ts +13 -0
- package/dist/op/activities/build.d.ts.map +1 -0
- package/dist/op/activities/converge.d.ts +110 -0
- package/dist/op/activities/converge.d.ts.map +1 -0
- package/dist/op/activities/env-teardown.d.ts +76 -0
- package/dist/op/activities/env-teardown.d.ts.map +1 -0
- package/dist/op/activities/guard-validate.d.ts +64 -0
- package/dist/op/activities/guard-validate.d.ts.map +1 -0
- package/dist/op/activities/http-check.d.ts +34 -0
- package/dist/op/activities/http-check.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +31 -0
- package/dist/op/activities/index.d.ts.map +1 -0
- package/dist/op/activities/lexicon-upgrade.d.ts +182 -0
- package/dist/op/activities/lexicon-upgrade.d.ts.map +1 -0
- package/dist/op/activities/lifecycle.d.ts +42 -0
- package/dist/op/activities/lifecycle.d.ts.map +1 -0
- package/dist/op/activities/pipeline-audit.d.ts +84 -0
- package/dist/op/activities/pipeline-audit.d.ts.map +1 -0
- package/dist/op/activities/policy.d.ts +17 -0
- package/dist/op/activities/policy.d.ts.map +1 -0
- package/dist/op/activities/reconcile.d.ts +149 -0
- package/dist/op/activities/reconcile.d.ts.map +1 -0
- package/dist/op/activities/shell.d.ts +13 -0
- package/dist/op/activities/shell.d.ts.map +1 -0
- package/dist/op/activities/teardown.d.ts +10 -0
- package/dist/op/activities/teardown.d.ts.map +1 -0
- package/dist/op/activities/util.d.ts +7 -0
- package/dist/op/activities/util.d.ts.map +1 -0
- package/dist/op/activities/wait.d.ts +28 -0
- package/dist/op/activities/wait.d.ts.map +1 -0
- package/dist/op/activities/workflow-audit.d.ts +92 -0
- package/dist/op/activities/workflow-audit.d.ts.map +1 -0
- package/dist/op/activity-contract-registry.d.ts +76 -0
- package/dist/op/activity-contract-registry.d.ts.map +1 -0
- package/dist/op/activity-contract.d.ts +25 -18
- package/dist/op/activity-contract.d.ts.map +1 -1
- package/dist/op/activity-failure.d.ts +28 -0
- package/dist/op/activity-failure.d.ts.map +1 -0
- package/dist/op/activity-profiles.d.ts +118 -0
- package/dist/op/activity-profiles.d.ts.map +1 -0
- package/dist/op/activity-registry.d.ts +22 -38
- package/dist/op/activity-registry.d.ts.map +1 -1
- package/dist/op/activity-runtime.d.ts +3 -14
- package/dist/op/activity-runtime.d.ts.map +1 -1
- package/dist/op/builders.d.ts +85 -30
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/change-signal.d.ts +91 -0
- package/dist/op/change-signal.d.ts.map +1 -0
- package/dist/op/composites/apply-op.d.ts +118 -0
- package/dist/op/composites/apply-op.d.ts.map +1 -0
- package/dist/op/composites/converge-op.d.ts +120 -0
- package/dist/op/composites/converge-op.d.ts.map +1 -0
- package/dist/op/composites/index.d.ts +26 -0
- package/dist/op/composites/index.d.ts.map +1 -0
- package/dist/op/composites/lexicon-upgrade-op.d.ts +78 -0
- package/dist/op/composites/lexicon-upgrade-op.d.ts.map +1 -0
- package/dist/op/composites/pipeline-audit-op.d.ts +50 -0
- package/dist/op/composites/pipeline-audit-op.d.ts.map +1 -0
- package/dist/op/composites/reconcile-op.d.ts +57 -0
- package/dist/op/composites/reconcile-op.d.ts.map +1 -0
- package/dist/op/composites/watch-op.d.ts +60 -0
- package/dist/op/composites/watch-op.d.ts.map +1 -0
- package/dist/op/composites/workflow-audit-op.d.ts +57 -0
- package/dist/op/composites/workflow-audit-op.d.ts.map +1 -0
- package/dist/op/converge-rule.d.ts +12 -10
- package/dist/op/converge-rule.d.ts.map +1 -1
- package/dist/op/cron.d.ts +51 -0
- package/dist/op/cron.d.ts.map +1 -0
- package/dist/op/discover.d.ts +9 -0
- package/dist/op/discover.d.ts.map +1 -1
- package/dist/op/duration.d.ts +11 -0
- package/dist/op/duration.d.ts.map +1 -0
- package/dist/op/emulator-lifecycle.d.ts.map +1 -1
- package/dist/op/gate-name.d.ts +40 -0
- package/dist/op/gate-name.d.ts.map +1 -0
- package/dist/op/gate-summary.d.ts +43 -0
- package/dist/op/gate-summary.d.ts.map +1 -0
- package/dist/op/gate.d.ts +90 -0
- package/dist/op/gate.d.ts.map +1 -0
- package/dist/op/generate-pipeline.d.ts +9 -0
- package/dist/op/generate-pipeline.d.ts.map +1 -1
- package/dist/op/index.d.ts +29 -9
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/local-executor.d.ts +114 -28
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-output.d.ts +11 -1
- package/dist/op/local-output.d.ts.map +1 -1
- package/dist/op/op-ir.d.ts +185 -0
- package/dist/op/op-ir.d.ts.map +1 -0
- package/dist/op/op-verb-class.d.ts +10 -2
- package/dist/op/op-verb-class.d.ts.map +1 -1
- package/dist/op/operator.d.ts +93 -5
- package/dist/op/operator.d.ts.map +1 -1
- package/dist/op/receipt-store.d.ts +1 -1
- package/dist/op/receipt-store.d.ts.map +1 -1
- package/dist/op/resource.d.ts +15 -1
- package/dist/op/resource.d.ts.map +1 -1
- package/dist/op/runtime.d.ts +200 -0
- package/dist/op/runtime.d.ts.map +1 -0
- package/dist/op/runtimes/local.d.ts +29 -0
- package/dist/op/runtimes/local.d.ts.map +1 -0
- package/dist/op/step-output-ref.d.ts +15 -13
- package/dist/op/step-output-ref.d.ts.map +1 -1
- package/dist/op/types.d.ts +96 -29
- package/dist/op/types.d.ts.map +1 -1
- package/dist/ownership.d.ts +1 -1
- package/dist/provenance.d.ts +21 -0
- package/dist/provenance.d.ts.map +1 -1
- package/dist/serializer-walker.d.ts.map +1 -1
- package/dist/terraform/bridge.d.ts +26 -7
- package/dist/terraform/bridge.d.ts.map +1 -1
- package/dist/terraform/carve-provider.d.ts +28 -2
- package/dist/terraform/carve-provider.d.ts.map +1 -1
- package/dist/terraform/data-source-shape.d.ts +77 -0
- package/dist/terraform/data-source-shape.d.ts.map +1 -0
- package/dist/terraform/graph.d.ts.map +1 -1
- package/dist/terraform/providers/kubernetes.d.ts +5 -0
- package/dist/terraform/providers/kubernetes.d.ts.map +1 -1
- package/dist/terraform/tier-map.d.ts +16 -4
- package/dist/terraform/tier-map.d.ts.map +1 -1
- package/dist/terraform/types.d.ts +8 -0
- package/dist/terraform/types.d.ts.map +1 -1
- package/package.json +6 -1
- package/src/audit/catalog.test.ts +79 -3
- package/src/audit/catalog.ts +111 -13
- package/src/audit/core.test.ts +26 -0
- package/src/audit/core.ts +84 -18
- package/src/audit/discover.test.ts +39 -0
- package/src/audit/discover.ts +202 -18
- package/src/audit/lineage.ts +100 -0
- package/src/audit/prior-art.ts +153 -0
- package/src/audit/proof.test.ts +67 -0
- package/src/audit/proof.ts +70 -0
- package/src/audit/report-html.ts +9 -4
- package/src/audit/report-model.ts +16 -2
- package/src/audit/report.test.ts +33 -0
- package/src/audit/report.ts +5 -3
- package/src/audit/rules-doc.test.ts +34 -2
- package/src/audit/rules-doc.ts +82 -9
- package/src/audit/secrets.ts +15 -3
- package/src/audit/terraform-state.test.ts +144 -0
- package/src/audit/terraform-state.ts +131 -0
- package/src/build.ts +31 -1
- package/src/claimed-fields.test.ts +145 -0
- package/src/claimed-fields.ts +208 -0
- package/src/cli/build-params-cli.ts +2 -2
- package/src/cli/command-group.ts +14 -0
- package/src/cli/commands/__fixtures__/audit-terraform/infra/.terraform/providers/lock.txt +1 -0
- package/src/cli/commands/__fixtures__/audit-terraform/infra/main.tf +1 -0
- package/src/cli/commands/__fixtures__/audit-terraform/infra/modules/foo/main.tf +1 -0
- package/src/cli/commands/__fixtures__/audit-terraform/infra/variables.tf +3 -0
- package/src/cli/commands/__fixtures__/init-lexicon-output/package.json +13 -4
- package/src/cli/commands/__fixtures__/init-lexicon-output/src/codegen/docs-cli.ts +4 -0
- package/src/cli/commands/__fixtures__/init-lexicon-output/src/codegen/package.ts +1 -0
- package/src/cli/commands/__fixtures__/init-lexicon-output/src/package-cli.ts +21 -0
- package/src/cli/commands/__snapshots__/init-lexicon.test.ts.snap +1 -0
- package/src/cli/commands/audit.test.ts +191 -11
- package/src/cli/commands/audit.ts +78 -28
- package/src/cli/commands/build.test.ts +330 -9
- package/src/cli/commands/build.ts +170 -24
- package/src/cli/commands/carve-bridge.test.ts +237 -14
- package/src/cli/commands/carve-bridge.ts +21 -17
- package/src/cli/commands/carve-emit-k8s.test.ts +17 -10
- package/src/cli/commands/check-lexicon-docs.ts +1 -1
- package/src/cli/commands/check-lexicon-examples.test.ts +29 -1
- package/src/cli/commands/check-lexicon-examples.ts +42 -10
- package/src/cli/commands/init-lexicon/templates/codegen.ts +9 -0
- package/src/cli/commands/init-lexicon/templates/project.ts +44 -4
- package/src/cli/commands/init-lexicon.test.ts +97 -2
- package/src/cli/commands/init-lexicon.ts +4 -2
- package/src/cli/commands/init.test.ts +35 -1
- package/src/cli/commands/init.ts +14 -3
- package/src/cli/commands/lint.test.ts +194 -1
- package/src/cli/commands/lint.ts +205 -7
- package/src/cli/commands/onboard.test.ts +75 -0
- package/src/cli/commands/onboard.ts +54 -23
- package/src/cli/handlers/build.test.ts +81 -1
- package/src/cli/handlers/build.ts +15 -1
- package/src/cli/handlers/graph.test.ts +3 -3
- package/src/cli/handlers/lifecycle.test.ts +195 -12
- package/src/cli/handlers/lifecycle.ts +123 -6
- package/src/cli/handlers/misc.ts +1 -1
- package/src/cli/handlers/operator.test.ts +183 -11
- package/src/cli/handlers/operator.ts +341 -55
- package/src/cli/handlers/run.test.ts +568 -1295
- package/src/cli/handlers/run.ts +446 -912
- package/src/cli/main.test.ts +22 -16
- package/src/cli/main.ts +66 -33
- package/src/cli/mcp/op-tools.ts +147 -88
- package/src/cli/mcp/resource-handlers.ts +10 -37
- package/src/cli/mcp/resources/context.ts +11 -12
- package/src/cli/mcp/server.test.ts +25 -27
- package/src/cli/mcp/server.ts +2 -2
- package/src/cli/plugins.test.ts +68 -2
- package/src/cli/plugins.ts +39 -0
- package/src/cli/registry.ts +40 -9
- package/src/codegen/docs.ts +1 -1
- package/src/codegen/generate-post-synth-barrel.test.ts +1 -1
- package/src/codegen/generate-post-synth-barrel.ts +1 -1
- package/src/components/README.md +4 -3
- package/src/components/__fixtures__/neo4j-fanout.json +1 -1
- package/src/components/auto-release.test.ts +4 -20
- package/src/components/auto-release.ts +17 -42
- package/src/components/capability.ts +4 -4
- package/src/components/cli-support.test.ts +28 -12
- package/src/components/cli-support.ts +60 -47
- package/src/components/component-schema.test.ts +18 -2
- package/src/components/component.schema.json +18 -5
- package/src/components/component.test.ts +2 -2
- package/src/components/component.ts +27 -7
- package/src/components/config-defaults.test.ts +2 -2
- package/src/components/driver-output.ts +14 -2
- package/src/components/driver.test.ts +109 -20
- package/src/components/driver.ts +201 -84
- package/src/components/index.ts +1 -6
- package/src/components/manifest-persistence.test.ts +2 -20
- package/src/components/manifest-persistence.ts +4 -24
- package/src/components/pilots/neo4j-fanout.pilot.ts +3 -3
- package/src/components/pilots/pilots-lint-clean.test.ts +11 -10
- package/src/components/run-progress.ts +6 -6
- package/src/components/verbs/run-agent.test.ts +19 -0
- package/src/components/verbs/run-agent.ts +12 -24
- package/src/components/verbs/verify.ts +2 -2
- package/src/deep-observation.test.ts +75 -0
- package/src/deep-observation.ts +48 -0
- package/src/detectLexicon.ts +18 -1
- package/src/discovery/collect.test.ts +3 -3
- package/src/discovery/files.ts +4 -4
- package/src/discovery/fold-import.test.ts +1 -1
- package/src/discovery/fold-import.ts +105 -2
- package/src/discovery/param-deps.test.ts +112 -1
- package/src/discovery/param-deps.ts +193 -0
- package/src/discovery/sandbox/bundle.ts +15 -1
- package/src/discovery/sandbox/config-wire.test.ts +2 -2
- package/src/discovery/sandbox/config-wire.ts +2 -2
- package/src/fold/fold.test.ts +56 -0
- package/src/fold/foldable-helpers.ts +82 -2
- package/src/fold-provenance-exclusion.test.ts +186 -0
- package/src/fold-provenance.test.ts +495 -0
- package/src/fold-provenance.ts +441 -0
- package/src/graph-ops.test.ts +3 -3
- package/src/graph-ops.ts +1 -1
- package/src/held-elsewhere.test.ts +102 -0
- package/src/held-elsewhere.ts +114 -0
- package/src/index.ts +3 -0
- package/src/kubectl-context.ts +3 -3
- package/src/lexicon-config.test.ts +5 -5
- package/src/lexicon-config.ts +4 -4
- package/src/lexicon-plugin-helpers.ts +1 -1
- package/src/lexicon.ts +296 -16
- package/src/lifecycle/change-set.test.ts +49 -0
- package/src/lifecycle/change-set.ts +67 -0
- package/src/lifecycle/converge-ledger.ts +1 -1
- package/src/lifecycle/deep-diff.test.ts +267 -14
- package/src/lifecycle/deep-diff.ts +217 -14
- package/src/lifecycle/deep-observe.test.ts +3 -1
- package/src/lifecycle/deep-observe.ts +16 -6
- package/src/lifecycle/gate-ledger.test.ts +74 -2
- package/src/lifecycle/gate-ledger.ts +154 -36
- package/src/lifecycle/index.ts +1 -0
- package/src/lifecycle/release-ledger.ts +2 -2
- package/src/lifecycle/run-ledger.test.ts +268 -0
- package/src/lifecycle/run-ledger.ts +201 -0
- package/src/lifecycle/symptoms.ts +3 -3
- package/src/lint/config.test.ts +82 -1
- package/src/lint/config.ts +112 -3
- package/src/lint/pipeline-change-gate.test.ts +2 -2
- package/src/lint/policy.test.ts +1 -1
- package/src/lint/post-synth.test.ts +31 -0
- package/src/lint/post-synth.ts +54 -1
- package/src/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.ts +2 -2
- package/src/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.ts +1 -1
- package/src/lint/rules/comp/comp.test.ts +27 -1
- package/src/lint/rules/comp/comp004-gate-needs-durable-runtime.ts +76 -0
- package/src/lint/rules/comp/index.ts +3 -3
- package/src/lint/rules/op/index.ts +23 -0
- package/src/lint/rules/op/ops012-activity-contract.test.ts +161 -0
- package/src/lint/rules/op/ops012-activity-contract.ts +64 -0
- package/src/lint/rules/op/ops013-step-output-ref.test.ts +237 -0
- package/src/lint/rules/op/ops013-step-output-ref.ts +98 -0
- package/src/lint/rules/op/ops014-converge-rule-refusals.test.ts +263 -0
- package/src/lint/rules/op/ops014-converge-rule-refusals.ts +179 -0
- package/src/lint/rules/op/support.ts +11 -0
- package/src/lint/suppressions.test.ts +163 -0
- package/src/lint/suppressions.ts +204 -0
- package/src/live-endpoint.ts +1 -1
- package/src/op/activities/activity-contracts.ts +66 -0
- package/src/op/activities/apply.test.ts +567 -0
- package/src/op/activities/apply.ts +662 -0
- package/src/op/activities/build.ts +26 -0
- package/src/op/activities/converge.test.ts +330 -0
- package/src/op/activities/converge.ts +449 -0
- package/src/op/activities/env-teardown.test.ts +187 -0
- package/src/op/activities/env-teardown.ts +171 -0
- package/src/op/activities/guard-validate.test.ts +139 -0
- package/src/op/activities/guard-validate.ts +223 -0
- package/src/op/activities/http-check.test.ts +48 -0
- package/src/op/activities/http-check.ts +55 -0
- package/src/op/activities/index.ts +119 -0
- package/src/op/activities/lexicon-upgrade.test.ts +492 -0
- package/src/op/activities/lexicon-upgrade.ts +673 -0
- package/src/op/activities/lifecycle.ts +85 -0
- package/src/op/activities/pipeline-audit.test.ts +67 -0
- package/src/op/activities/pipeline-audit.ts +201 -0
- package/src/op/activities/policy.test.ts +19 -0
- package/src/op/activities/policy.ts +37 -0
- package/src/op/activities/reconcile.test.ts +161 -0
- package/src/op/activities/reconcile.ts +354 -0
- package/src/op/activities/shell.ts +26 -0
- package/src/op/activities/teardown.ts +22 -0
- package/src/op/activities/util.ts +6 -0
- package/src/op/activities/wait.ts +69 -0
- package/src/op/activities/workflow-audit.test.ts +90 -0
- package/src/op/activities/workflow-audit.ts +203 -0
- package/src/op/activity-contract-registry.test.ts +98 -0
- package/src/op/activity-contract-registry.ts +114 -0
- package/src/op/activity-contract.test.ts +1 -1
- package/src/op/activity-contract.ts +37 -33
- package/src/op/activity-failure.ts +34 -0
- package/src/op/activity-profiles.test.ts +56 -0
- package/src/op/activity-profiles.ts +116 -0
- package/src/op/activity-registry.test.ts +37 -28
- package/src/op/activity-registry.ts +27 -56
- package/src/op/activity-runtime.ts +3 -47
- package/src/op/builders-exports.test.ts +0 -49
- package/src/op/builders-typed.test.ts +164 -0
- package/src/op/builders.ts +125 -41
- package/src/op/change-signal.test.ts +117 -0
- package/src/op/change-signal.ts +169 -0
- package/src/op/composites/apply-op.ts +218 -0
- package/src/op/composites/composites.test.ts +379 -0
- package/src/op/composites/converge-op.test.ts +168 -0
- package/src/op/composites/converge-op.ts +214 -0
- package/src/op/composites/index.ts +26 -0
- package/src/op/composites/lexicon-upgrade-op.test.ts +68 -0
- package/src/op/composites/lexicon-upgrade-op.ts +134 -0
- package/src/op/composites/pipeline-audit-op.test.ts +25 -0
- package/src/op/composites/pipeline-audit-op.ts +78 -0
- package/src/op/composites/reconcile-op.test.ts +51 -0
- package/src/op/composites/reconcile-op.ts +110 -0
- package/src/op/composites/watch-op.ts +108 -0
- package/src/op/composites/workflow-audit-op.test.ts +25 -0
- package/src/op/composites/workflow-audit-op.ts +88 -0
- package/src/op/converge-rule.ts +12 -10
- package/src/op/cron.test.ts +128 -0
- package/src/op/cron.ts +149 -0
- package/src/op/discover-root.test.ts +105 -1
- package/src/op/discover.test.ts +6 -2
- package/src/op/discover.ts +84 -16
- package/src/op/duration.ts +21 -0
- package/src/op/effect-step.test.ts +29 -14
- package/src/op/emulator-lifecycle.ts +1 -2
- package/src/op/gate-name.test.ts +65 -0
- package/src/op/gate-name.ts +60 -0
- package/src/op/gate-summary.ts +84 -0
- package/src/op/gate.ts +155 -0
- package/src/op/generate-pipeline.test.ts +65 -3
- package/src/op/generate-pipeline.ts +19 -2
- package/src/op/index.ts +48 -8
- package/src/op/local-executor.test.ts +178 -34
- package/src/op/local-executor.ts +371 -102
- package/src/op/local-output.test.ts +95 -11
- package/src/op/local-output.ts +33 -4
- package/src/op/op-ir.test.ts +292 -0
- package/src/op/op-ir.ts +419 -0
- package/src/op/op-verb-class.test.ts +2 -2
- package/src/op/op-verb-class.ts +19 -5
- package/src/op/op.test.ts +28 -7
- package/src/op/operator.test.ts +543 -6
- package/src/op/operator.ts +203 -20
- package/src/op/receipt-store.ts +1 -1
- package/src/op/resource.ts +20 -2
- package/src/op/runtime.ts +203 -0
- package/src/op/runtimes/local.test.ts +181 -0
- package/src/op/runtimes/local.ts +212 -0
- package/src/op/step-output-ref.ts +15 -13
- package/src/op/types.ts +106 -26
- package/src/ownership.ts +1 -1
- package/src/provenance.test.ts +6 -0
- package/src/provenance.ts +21 -1
- package/src/serializer-walker.test.ts +42 -0
- package/src/serializer-walker.ts +21 -2
- package/src/terraform/aws-resources.test.ts +13 -4
- package/src/terraform/bridge.test.ts +22 -9
- package/src/terraform/bridge.ts +89 -28
- package/src/terraform/carve-provider.ts +38 -2
- package/src/terraform/data-source-shape.ts +95 -0
- package/src/terraform/graph.ts +35 -7
- package/src/terraform/providers/kubernetes.ts +48 -2
- package/src/terraform/tier-map.ts +21 -6
- package/src/terraform/types.ts +8 -0
- package/dist/cli/handlers/op-progress.d.ts +0 -90
- package/dist/cli/handlers/op-progress.d.ts.map +0 -1
- package/dist/cli/handlers/run-client.d.ts +0 -127
- package/dist/cli/handlers/run-client.d.ts.map +0 -1
- package/dist/cli/handlers/run-report.d.ts +0 -5
- package/dist/cli/handlers/run-report.d.ts.map +0 -1
- package/dist/components/temporal-codegen-loader.d.ts +0 -27
- package/dist/components/temporal-codegen-loader.d.ts.map +0 -1
- package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts +0 -37
- package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts.map +0 -1
- package/src/cli/handlers/op-progress.test.ts +0 -268
- package/src/cli/handlers/op-progress.ts +0 -248
- package/src/cli/handlers/run-client.test.ts +0 -82
- package/src/cli/handlers/run-client.ts +0 -219
- package/src/cli/handlers/run-report.test.ts +0 -62
- package/src/cli/handlers/run-report.ts +0 -122
- package/src/components/temporal-codegen-loader.ts +0 -41
- package/src/lint/rules/comp/comp004-gate-needs-temporal.ts +0 -66
package/dist/op/types.d.ts
CHANGED
|
@@ -1,30 +1,62 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Op type definitions — the data model for a named, phased
|
|
2
|
+
* Op type definitions — the data model for a named, phased Op.
|
|
3
3
|
*
|
|
4
|
-
* These types are intentionally free of
|
|
5
|
-
* in core without
|
|
4
|
+
* These types are intentionally free of any runtime SDK's imports, so they can
|
|
5
|
+
* live in core without core depending on a runtime.
|
|
6
6
|
*/
|
|
7
7
|
import type { EffectReceiptRef } from "./receipt-store.js";
|
|
8
|
+
import type { ActivityProfileName } from "./activity-profiles.js";
|
|
8
9
|
export interface OpConfig {
|
|
9
|
-
/** Kebab-case identifier.
|
|
10
|
+
/** Kebab-case identifier. Names the Op's output directory (`dist/ops/<name>/`), and is the name `chant run <name>` and another Op's `depends` refer to. */
|
|
10
11
|
name: string;
|
|
11
12
|
/** Human-readable description shown in `chant run list` and deployment reports. */
|
|
12
13
|
overview: string;
|
|
13
|
-
/** Temporal task queue. Defaults to `name`. */
|
|
14
|
-
taskQueue?: string;
|
|
15
|
-
/** Temporal namespace. Defaults to chant.config.ts defaultProfile's namespace. */
|
|
16
|
-
namespace?: string;
|
|
17
14
|
/** Ordered list of execution phases. */
|
|
18
15
|
phases: PhaseDefinition[];
|
|
19
16
|
/** Other Op names that must be complete before this Op can run. */
|
|
20
17
|
depends?: string[];
|
|
21
18
|
/** Compensation phases executed on terminal failure (run in reverse order). */
|
|
22
19
|
onFailure?: PhaseDefinition[];
|
|
23
|
-
/**
|
|
24
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Discovery keys for this Op — free-form `name: value` pairs a reader
|
|
22
|
+
* filters on. `ConvergeOp` sets `Converge: "true"` and `Env`, `WatchOp`
|
|
23
|
+
* sets `Watch`, and `discoverConvergeOps` (`./operator.ts`) reads both;
|
|
24
|
+
* `chant run list` prints whatever is here.
|
|
25
|
+
*
|
|
26
|
+
* These are the discovery half of what `searchAttributes` used to carry
|
|
27
|
+
* (#2118). The other half — a run's own outcome (`Phase`, `Drift`,
|
|
28
|
+
* `Approver`, `RollbackFailed`) — is not a property of the declaration at
|
|
29
|
+
* all and now lands on the run ledger as a fact
|
|
30
|
+
* (`../lifecycle/run-ledger.ts`), written per run rather than declared once.
|
|
31
|
+
*/
|
|
32
|
+
labels?: Record<string, string>;
|
|
33
|
+
/**
|
|
34
|
+
* The cadence this Op runs on, when it has one (#2120). Runtime-neutral
|
|
35
|
+
* data, not a scheduler: the github/gitlab/forgejo lexicons render it as a
|
|
36
|
+
* CI cron ({@link ScheduledOpSpec}), `chant operator` reads it as this Op's
|
|
37
|
+
* tick cadence, a hosting lexicon hands it to its own scheduler, and the
|
|
38
|
+
* local one-shot executor ignores it.
|
|
39
|
+
*/
|
|
40
|
+
schedule?: OpSchedule;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* An Op's cadence (#2120). The cron is validated at `Op()` construction by
|
|
44
|
+
* the permissive 5-/6-field parser in `./cron.ts`, the same one a lexicon's
|
|
45
|
+
* own post-synth cron check imports.
|
|
46
|
+
*/
|
|
47
|
+
export interface OpSchedule {
|
|
48
|
+
/** 5- or 6-field cron expression, read in the running host's local time. */
|
|
49
|
+
cron: string;
|
|
50
|
+
/**
|
|
51
|
+
* What a fire does while the previous run is still going. `"skip"` is the
|
|
52
|
+
* only value — and the default — because that is what a level-triggered
|
|
53
|
+
* tick wants: the next fire re-observes everything anyway, so queueing a
|
|
54
|
+
* backlog buys nothing a single later tick does not.
|
|
55
|
+
*/
|
|
56
|
+
overlap?: "skip";
|
|
25
57
|
}
|
|
26
58
|
export interface PhaseDefinition {
|
|
27
|
-
/** Display name shown in progress output
|
|
59
|
+
/** Display name shown in progress output. */
|
|
28
60
|
name: string;
|
|
29
61
|
/** Ordered steps within the phase. */
|
|
30
62
|
steps: StepDefinition[];
|
|
@@ -56,27 +88,47 @@ export interface ActivityStep {
|
|
|
56
88
|
*/
|
|
57
89
|
args?: Record<string, unknown>;
|
|
58
90
|
/**
|
|
59
|
-
* Key from
|
|
91
|
+
* Key from {@link ACTIVITY_PROFILES} controlling timeout + retry.
|
|
60
92
|
* Default: "fastIdempotent"
|
|
61
93
|
*/
|
|
62
|
-
profile?:
|
|
94
|
+
profile?: ActivityProfileName;
|
|
63
95
|
/**
|
|
64
|
-
* Surface this activity's return value as a
|
|
96
|
+
* Surface this activity's return value as a named run outcome.
|
|
65
97
|
*
|
|
66
|
-
* The
|
|
67
|
-
* `
|
|
68
|
-
*
|
|
69
|
-
*
|
|
98
|
+
* The local executor captures it into the step's record and folds it into
|
|
99
|
+
* the run ledger's `outcomes` (`../lifecycle/run-ledger.ts`); a hosting
|
|
100
|
+
* lexicon's serializer may additionally publish it to whatever index that
|
|
101
|
+
* runtime queries by. Useful for reading back a run by outcome (e.g. `Drift:
|
|
102
|
+
* "true"/"false"` from a lifecycleDiff activity).
|
|
103
|
+
*
|
|
104
|
+
* An array publishes several attributes off the same result in one upsert
|
|
105
|
+
* (#2105): one activity can answer more than one question about a run, and
|
|
106
|
+
* `choudoufuLivePlan`'s drift boolean plus its unowned and adoptable counts
|
|
107
|
+
* are three attributes over a single live read that nothing would be gained
|
|
108
|
+
* by splitting into three steps. A single object is the same thing with one
|
|
109
|
+
* entry, and stays the authored form everywhere one attribute is enough.
|
|
70
110
|
*
|
|
71
111
|
* `from` is a dot-path into the return value (e.g. `"drifted"` for
|
|
72
112
|
* `{ drifted: boolean }`); when omitted, the whole return value is
|
|
73
|
-
*
|
|
113
|
+
* recorded.
|
|
74
114
|
*/
|
|
75
|
-
outcomeAttribute?:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
115
|
+
outcomeAttribute?: OutcomeAttribute | OutcomeAttribute[];
|
|
116
|
+
}
|
|
117
|
+
/** One named run outcome published off a step's return value. */
|
|
118
|
+
export interface OutcomeAttribute {
|
|
119
|
+
/** The outcome's name, as it appears in the run ledger's `outcomes`. */
|
|
120
|
+
name: string;
|
|
121
|
+
/** Dot-path into the activity's return value; the whole value when omitted. */
|
|
122
|
+
from?: string;
|
|
79
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* {@link ActivityStep.outcomeAttribute} as a list, whichever form it was
|
|
126
|
+
* authored in. `[]` when the step publishes none, so every consumer can
|
|
127
|
+
* iterate without first asking which of the two shapes it is holding.
|
|
128
|
+
*/
|
|
129
|
+
export declare function outcomeAttributesOf(step: {
|
|
130
|
+
outcomeAttribute?: OutcomeAttribute | OutcomeAttribute[];
|
|
131
|
+
}): OutcomeAttribute[];
|
|
80
132
|
/**
|
|
81
133
|
* Read-compare-run-write over an effect receipt (#1834, epic #1703). The
|
|
82
134
|
* runtime reads the live receipt through the receipt store, compares it
|
|
@@ -99,20 +151,35 @@ export interface EffectStep {
|
|
|
99
151
|
expectation?: string;
|
|
100
152
|
/**
|
|
101
153
|
* Steps run when the live receipt does not match, in authored order. A gate
|
|
102
|
-
* authored here
|
|
154
|
+
* authored here is reached only when the effect will fire. Effect steps do not
|
|
103
155
|
* nest.
|
|
104
156
|
*/
|
|
105
157
|
steps: Array<ActivityStep | GateStep>;
|
|
106
|
-
/** Annotation carried into the
|
|
158
|
+
/** Annotation carried into the Op's build output as a comment. */
|
|
107
159
|
description?: string;
|
|
108
160
|
}
|
|
109
|
-
|
|
161
|
+
/** Everything on a gate step except the key that names it. */
|
|
162
|
+
export interface GateStepBase {
|
|
110
163
|
kind: "gate";
|
|
111
|
-
/**
|
|
112
|
-
signalName: string;
|
|
113
|
-
/** Temporal duration string. Default: "48h". */
|
|
164
|
+
/** How long a recorded pending gate stays valid, as a duration string. Default: "48h". */
|
|
114
165
|
timeout?: string;
|
|
115
166
|
/** Human-readable description of the action required to unblock this gate. */
|
|
116
167
|
description?: string;
|
|
117
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* A human approval decided against the gate ledger. The name lives on `gate`;
|
|
171
|
+
* `signalName` is the key it carried through 0.58.0 and is still accepted
|
|
172
|
+
* (#2202) — read both through `gateName()` in `./gate-name.ts` rather than
|
|
173
|
+
* reaching for either key directly.
|
|
174
|
+
*/
|
|
175
|
+
export type GateStep = GateStepBase & ({
|
|
176
|
+
/** The gate's name — what `chant approve <op> <gate>` resolves. */
|
|
177
|
+
gate: string;
|
|
178
|
+
/** @deprecated Renamed to `gate` in #2202. Accepted through 0.59.0, removed in 0.60.0. */
|
|
179
|
+
signalName?: string;
|
|
180
|
+
} | {
|
|
181
|
+
gate?: undefined;
|
|
182
|
+
/** @deprecated Renamed to `gate` in #2202. Accepted through 0.59.0, removed in 0.60.0. */
|
|
183
|
+
signalName: string;
|
|
184
|
+
});
|
|
118
185
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/op/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/op/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/op/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,MAAM,WAAW,QAAQ;IACvB,2JAA2J;IAC3J,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC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C;IACb,0FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,YAAY,GACjC,CACI;IACE,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GACD;IACE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,0FAA0F;IAC1F,UAAU,EAAE,MAAM,CAAC;CACpB,CACJ,CAAC"}
|
package/dist/ownership.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export interface ChannelKeys {
|
|
|
40
40
|
/**
|
|
41
41
|
* The label-based ownership convention (`app.kubernetes.io/managed-by` +
|
|
42
42
|
* `chant.intentius.io/{stack,env}`) — the default, shared by every label-based
|
|
43
|
-
* lexicon (k8s, gcp, helm, and the
|
|
43
|
+
* lexicon (k8s, gcp, helm, and the `k8sApply` activity's `kubectl --prune`
|
|
44
44
|
* selector). AWS and Azure tag keys are defined in their own lexicons.
|
|
45
45
|
*/
|
|
46
46
|
export declare const LABEL_OWNERSHIP_KEYS: ChannelKeys;
|
package/dist/provenance.d.ts
CHANGED
|
@@ -67,6 +67,20 @@ export interface EntityProvenance {
|
|
|
67
67
|
* is governed by `tier`, which is what an editor needs to know. Under-reports
|
|
68
68
|
* (a shape the collector does not follow drops a dependency) and never
|
|
69
69
|
* over-reports a parameter the expression does not mention.
|
|
70
|
+
* - `composite-parameter` — the fold interpreted the composite's factory body,
|
|
71
|
+
* and the expression for this path reads the named factory parameter paths
|
|
72
|
+
* (chant #2161). Same syntactic-dependency discipline as `build-param`, and
|
|
73
|
+
* for the same reason: a shape the collector does not follow drops a
|
|
74
|
+
* parameter, it never invents one.
|
|
75
|
+
* - `composite-literal` — the fold interpreted the factory body and the
|
|
76
|
+
* expression for this path reads no parameter at all. The composite fixes
|
|
77
|
+
* this field, and no argument at the call site moves it.
|
|
78
|
+
*
|
|
79
|
+
* The coarse `composite` and the two fine kinds are not alternatives. A build
|
|
80
|
+
* records `composite` when it expanded a composite without interpreting its
|
|
81
|
+
* body (the run path, an inadmissible factory), and that is why
|
|
82
|
+
* ./fold-provenance.ts answers `unknown` there rather than falling through to a
|
|
83
|
+
* direct declaration.
|
|
70
84
|
*/
|
|
71
85
|
export type PathOrigin = {
|
|
72
86
|
kind: "authored";
|
|
@@ -77,6 +91,13 @@ export type PathOrigin = {
|
|
|
77
91
|
} | {
|
|
78
92
|
kind: "build-param";
|
|
79
93
|
params: string[];
|
|
94
|
+
} | {
|
|
95
|
+
kind: "composite-parameter";
|
|
96
|
+
composite: string;
|
|
97
|
+
parameters: string[];
|
|
98
|
+
} | {
|
|
99
|
+
kind: "composite-literal";
|
|
100
|
+
composite: string;
|
|
80
101
|
};
|
|
81
102
|
/**
|
|
82
103
|
* Merge provenance onto an entity. Non-enumerable so it is invisible to
|
package/dist/provenance.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACpC;AAED
|
|
1
|
+
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,UAAU,CAAC,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AAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,GAAG,SAAS,EACvD,IAAI,EAAE,MAAM,GACX,UAAU,GAAG,SAAS,CAQxB;AAED,wDAAwD;AACxD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAa7D;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,sCAAsC;IACtC,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,KAAK,GAAG,SAAS,CAAC;CACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer-walker.d.ts","sourceRoot":"","sources":["../src/serializer-walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"serializer-walker.d.ts","sourceRoot":"","sources":["../src/serializer-walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO/C,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACzD,mEAAmE;IACnE,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1C,+DAA+D;IAC/D,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC;CAChF;AAED;;;GAGG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,EACpC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAyFT"}
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
* - inbound edge → the survivor loses its reference to the carved resource.
|
|
8
8
|
* Bridge: add a `data` source for the (now chant-managed) resource and
|
|
9
9
|
* rewrite the survivor's `type.name.attr` references to `data.type.name.attr`.
|
|
10
|
+
* The provider's data-source shape (`data-source-shape.ts`, #2034) decides
|
|
11
|
+
* both halves — the data type and body, and the attribute path survivors
|
|
12
|
+
* read through, which need not be the resource's own.
|
|
10
13
|
* Required immediately, or `terraform plan` errors on the dangling ref.
|
|
11
14
|
* An `output` block reading the carved resource is such a survivor (#1638):
|
|
12
15
|
* same data source, same textual rewrite, applied to the output's value.
|
|
@@ -21,15 +24,29 @@
|
|
|
21
24
|
* is reversible via `terraform import`.
|
|
22
25
|
*/
|
|
23
26
|
import { type CarveReport } from "./carve.js";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
|
|
27
|
+
import { type DataSourceShape } from "./data-source-shape.js";
|
|
28
|
+
/** How one carved resource is read back, and the literals to render it with. */
|
|
29
|
+
export interface CarvedDataSource {
|
|
30
|
+
/**
|
|
31
|
+
* The type's data-source shape (`dataSourceShapeOf`): the `data` type, its
|
|
32
|
+
* arguments and where each comes from, and the survivor path translation.
|
|
33
|
+
*/
|
|
34
|
+
shape?: DataSourceShape;
|
|
35
|
+
/**
|
|
36
|
+
* Literals resolved from the carved block, keyed by the shape field's source
|
|
37
|
+
* path — `{ bucket: "myapp-assets-prod" }`, or for a manifest
|
|
38
|
+
* `{ "manifest.apiVersion": "v1", "manifest.metadata.name": "app-config" }`.
|
|
39
|
+
*/
|
|
40
|
+
values?: Record<string, string>;
|
|
29
41
|
}
|
|
30
42
|
export interface DataSourceBlock {
|
|
31
43
|
/** Carved resource address the data source stands in for. */
|
|
32
44
|
address: string;
|
|
45
|
+
/**
|
|
46
|
+
* The `data` type. Usually the carved resource's own type; the shape can
|
|
47
|
+
* name another, as `kubernetes_manifest` reads back through
|
|
48
|
+
* `data "kubernetes_resource"` (#2034).
|
|
49
|
+
*/
|
|
33
50
|
type: string;
|
|
34
51
|
name: string;
|
|
35
52
|
hcl: string;
|
|
@@ -70,10 +87,12 @@ export interface BridgePlan {
|
|
|
70
87
|
*
|
|
71
88
|
* @param report the boundary report (from `boundaryReport`)
|
|
72
89
|
* @param files every `.tf` file in the estate, as { path, content }
|
|
73
|
-
* @param
|
|
90
|
+
* @param readBacks how each carved address is read back as a data source, and
|
|
91
|
+
* the literals to render it with (`dataSourceShapeOf` +
|
|
92
|
+
* the graph node's `dataSourceValues`)
|
|
74
93
|
*/
|
|
75
94
|
export declare function generateBridge(report: CarveReport, files: Array<{
|
|
76
95
|
path: string;
|
|
77
96
|
content: string;
|
|
78
|
-
}>,
|
|
97
|
+
}>, readBacks: Map<string, CarvedDataSource>): BridgePlan;
|
|
79
98
|
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/terraform/bridge.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/terraform/bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAmB,KAAK,eAAe,EAAmB,MAAM,qBAAqB,CAAC;AAG7F,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,eAAe;IAC9B,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,qFAAqF;IACrF,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,+EAA+E;IAC/E,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,8EAA8E;IAC9E,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB;AA8DD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,EAC/C,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,GACvC,UAAU,CA8DZ"}
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
* provider at runtime still can — the seam does not foreclose it, it just does
|
|
28
28
|
* not require plugin loading for the paths that run without one.
|
|
29
29
|
*/
|
|
30
|
+
import { type DataSourceShape } from "./data-source-shape.js";
|
|
30
31
|
import type { StateResource } from "./state.js";
|
|
31
32
|
export interface TierInfo {
|
|
32
33
|
tier: 1 | 2 | 3;
|
|
@@ -88,10 +89,20 @@ export interface CarveProvider {
|
|
|
88
89
|
readonly tiers: Readonly<Record<string, TierInfo>>;
|
|
89
90
|
/**
|
|
90
91
|
* Terraform type → the HCL attribute carrying the physical name. A dotted
|
|
91
|
-
* entry is a path into nested
|
|
92
|
-
*
|
|
92
|
+
* entry is a path into nested values (`manifest.metadata.name`), which a
|
|
93
|
+
* flat `attr = value` body cannot express, so it implies no data-source
|
|
94
|
+
* shape on its own — see {@link dataSourceShapes}.
|
|
93
95
|
*/
|
|
94
96
|
readonly identityAttrs?: Readonly<Record<string, string>>;
|
|
97
|
+
/**
|
|
98
|
+
* Terraform type → how `carve bridge` reads it back as a `data` source
|
|
99
|
+
* (#2034): the data-source type, where each argument comes from in the
|
|
100
|
+
* carved body, and how a survivor's attribute path translates. Needed when
|
|
101
|
+
* the data source is not the resource's own type, or when its body is more
|
|
102
|
+
* than one flat argument. A type with a plain identity attribute and no
|
|
103
|
+
* entry here gets that attribute's shape ({@link identityAttrShape}).
|
|
104
|
+
*/
|
|
105
|
+
readonly dataSourceShapes?: Readonly<Record<string, DataSourceShape>>;
|
|
95
106
|
/**
|
|
96
107
|
* Sub-resource Terraform type → parent type, for types Terraform splits out
|
|
97
108
|
* of the resource the native spec keeps them in.
|
|
@@ -139,4 +150,19 @@ export declare function carveTierMap(): Readonly<Record<string, TierInfo>>;
|
|
|
139
150
|
export declare function carveIdentityAttr(tfType: string): string | undefined;
|
|
140
151
|
/** The parent Terraform type this sub-resource folds into, if any. */
|
|
141
152
|
export declare function carveFoldParent(tfType: string): string | undefined;
|
|
153
|
+
/**
|
|
154
|
+
* How `carve bridge` reads this type back as a `data` source (#2034), or
|
|
155
|
+
* undefined when it cannot be read back at all — which is what makes
|
|
156
|
+
* `canBridge` refuse it.
|
|
157
|
+
*
|
|
158
|
+
* Resolution order:
|
|
159
|
+
* 1. a shape the owning provider declared for the type;
|
|
160
|
+
* 2. otherwise the shape a plain identity attribute implies (same type, one
|
|
161
|
+
* required argument) — the path every AWS and google type takes;
|
|
162
|
+
* 3. otherwise undefined, when the identity attribute is a dotted path into
|
|
163
|
+
* nested values and no provider declared a shape for it;
|
|
164
|
+
* 4. and for a type with no identity attribute at all, the bare data-source
|
|
165
|
+
* type: the bridge still emits a block, with a TODO for the body.
|
|
166
|
+
*/
|
|
167
|
+
export declare function carveDataSourceShape(tfType: string): DataSourceShape | undefined;
|
|
142
168
|
//# sourceMappingURL=carve-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carve-provider.d.ts","sourceRoot":"","sources":["../../src/terraform/carve-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
1
|
+
{"version":3,"file":"carve-provider.d.ts","sourceRoot":"","sources":["../../src/terraform/carve-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChB,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACrC;AAED,sFAAsF;AACtF,MAAM,WAAW,kBAAkB;IACjC,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAC;IAChB,oFAAoF;IAC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B,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACvD;AAqBD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,IAAI,CAYzE;AAED,wDAAwD;AACxD,wBAAgB,cAAc,IAAI,SAAS,aAAa,EAAE,CAEzD;AAsCD,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAE9E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAE7E;AAED,4FAA4F;AAC5F,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAE5C;AAED,4GAA4G;AAC5G,wBAAgB,YAAY,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAEjE;AAED,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEpE;AAED,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAElE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAMhF"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a carved Terraform type is read back as a `data` source (#2034).
|
|
3
|
+
*
|
|
4
|
+
* `carve bridge` replaces a carved resource with a data source the survivors
|
|
5
|
+
* read instead. Until now a carve provider said only which attribute carries
|
|
6
|
+
* the physical name (`identityAttrs`), and the bridge assumed the data source
|
|
7
|
+
* was the same type as the resource, with that one attribute in its body:
|
|
8
|
+
*
|
|
9
|
+
* data "aws_s3_bucket" "assets" { bucket = "myapp-assets-prod" }
|
|
10
|
+
*
|
|
11
|
+
* That assumption holds for AWS and google, and breaks for Kubernetes twice
|
|
12
|
+
* over. `kubernetes_manifest` names itself by `manifest.metadata.name`, a path
|
|
13
|
+
* into a nested value that a flat `attr = value` body cannot express; and the
|
|
14
|
+
* kubernetes provider ships no `kubernetes_manifest` data source at all
|
|
15
|
+
* (verified against hashicorp/kubernetes v3.2.1: 27 data sources, none a
|
|
16
|
+
* manifest). Its generic read is `data "kubernetes_resource"`, with a
|
|
17
|
+
* different type, different arguments, a nested `metadata` block, and its own
|
|
18
|
+
* attribute path for survivors to read through.
|
|
19
|
+
*
|
|
20
|
+
* So a provider contributes a *shape*: the data-source type, where each
|
|
21
|
+
* argument comes from in the carved body, and how a survivor's attribute path
|
|
22
|
+
* translates. An identity attribute is one instance of that shape
|
|
23
|
+
* ({@link identityAttrShape}), so nothing that bridges today changes.
|
|
24
|
+
*/
|
|
25
|
+
/** One argument of the data-source body, and where its value comes from. */
|
|
26
|
+
export interface ShapeField {
|
|
27
|
+
/** Argument name in the emitted data source, e.g. `api_version`. */
|
|
28
|
+
name: string;
|
|
29
|
+
/**
|
|
30
|
+
* Dotted path into the carved resource's HCL body the literal is read from,
|
|
31
|
+
* e.g. `manifest.apiVersion`. Nested blocks are walked by segment.
|
|
32
|
+
*/
|
|
33
|
+
from: string;
|
|
34
|
+
/**
|
|
35
|
+
* A shape that cannot resolve a required field renders the TODO body rather
|
|
36
|
+
* than a data source missing an argument Terraform needs.
|
|
37
|
+
*/
|
|
38
|
+
required?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** A nested block in the data-source body, e.g. `metadata { name = "x" }`. */
|
|
41
|
+
export interface ShapeBlock {
|
|
42
|
+
name: string;
|
|
43
|
+
fields: readonly ShapeField[];
|
|
44
|
+
}
|
|
45
|
+
export interface DataSourceShape {
|
|
46
|
+
/** The `data` type standing in for the carved resource, e.g. `kubernetes_resource`. */
|
|
47
|
+
type: string;
|
|
48
|
+
/** Flat `name = value` arguments of the body. */
|
|
49
|
+
args?: readonly ShapeField[];
|
|
50
|
+
/** Nested `name { ... }` blocks of the body. */
|
|
51
|
+
blocks?: readonly ShapeBlock[];
|
|
52
|
+
/**
|
|
53
|
+
* The carved resource's top-level attribute → the data source's, for the
|
|
54
|
+
* survivor rewrite. `kubernetes_manifest` exposes both `manifest` (what the
|
|
55
|
+
* config declared) and `object` (the API server's read-back), and
|
|
56
|
+
* `kubernetes_resource` exposes only `object`, so both map to `object`. An
|
|
57
|
+
* attribute with no entry passes through unchanged, which is what every
|
|
58
|
+
* same-type identity-attribute shape wants.
|
|
59
|
+
*/
|
|
60
|
+
readAttrs?: Readonly<Record<string, string>>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The shape a plain identity attribute implies: the same type as the resource,
|
|
64
|
+
* one required argument, no path translation. Returns undefined for a dotted
|
|
65
|
+
* attribute, which is a path into nested values and needs a declared shape.
|
|
66
|
+
*/
|
|
67
|
+
export declare function identityAttrShape(tfType: string, attr: string): DataSourceShape | undefined;
|
|
68
|
+
/** Every source path the shape reads, for the graph to resolve out of the carved block. */
|
|
69
|
+
export declare function shapeSourcePaths(shape: DataSourceShape): string[];
|
|
70
|
+
/**
|
|
71
|
+
* Translate a survivor's attribute path onto the data source. `path` is the
|
|
72
|
+
* text after the address, leading dot included (`.manifest.data.log_level`) or
|
|
73
|
+
* empty. Only the first segment is mapped: everything under it is the object's
|
|
74
|
+
* own structure, which the data source reproduces.
|
|
75
|
+
*/
|
|
76
|
+
export declare function rewriteReadPath(shape: DataSourceShape | undefined, path: string): string;
|
|
77
|
+
//# sourceMappingURL=data-source-shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-source-shape.d.ts","sourceRoot":"","sources":["../../src/terraform/data-source-shape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,UAAU;IACzB,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,IAAI,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,gDAAgD;IAChD,MAAM,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC/B;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAG3F;AAED,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,EAAE,CAIjE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAMxF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/terraform/graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/terraform/graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAU,MAAM,SAAS,CAAC;AAErE;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;AAKpE,UAAU,MAAM;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AA4BD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAe/D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,EAAE,CAe/D;AAsFD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAqFhF;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAEtE;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAEvE"}
|
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
* can only name the family, and `adopt` reads the body to learn the rest —
|
|
19
19
|
* which is also why one rule here covers every CRD.
|
|
20
20
|
*
|
|
21
|
+
* It has no `kubernetes_manifest` data source either, so it does not read back
|
|
22
|
+
* as its own type. `MANIFEST_READ_BACK` below is the shape `carve bridge` uses
|
|
23
|
+
* instead: `data "kubernetes_resource"`, built from the manifest's own
|
|
24
|
+
* apiVersion/kind/metadata (#2034).
|
|
25
|
+
*
|
|
21
26
|
* It has no live adoption path. `carve emit --env` filters a live export by a
|
|
22
27
|
* native type, and there is no type to filter by until the body is read; state
|
|
23
28
|
* is where the body is. `liveSelectorType` therefore returns undefined and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kubernetes.d.ts","sourceRoot":"","sources":["../../../src/terraform/providers/kubernetes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"kubernetes.d.ts","sourceRoot":"","sources":["../../../src/terraform/providers/kubernetes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAiB,aAAa,EAA2B,MAAM,mBAAmB,CAAC;AA+N/F,eAAO,MAAM,uBAAuB,EAAE,aAcrC,CAAC"}
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
* provider registered after module load has to be visible here.
|
|
18
18
|
*/
|
|
19
19
|
import { type TierInfo } from "./carve-provider.js";
|
|
20
|
+
import type { DataSourceShape } from "./data-source-shape.js";
|
|
20
21
|
export { carveEmitTypes, type TierInfo } from "./carve-provider.js";
|
|
22
|
+
export type { DataSourceShape } from "./data-source-shape.js";
|
|
21
23
|
/** TF resource type → native tier, over every registered provider. Absent = unsupported (score 0). */
|
|
22
24
|
export declare function tierMap(): Readonly<Record<string, TierInfo>>;
|
|
23
25
|
export declare function resolveTier(tfType: string): TierInfo | null;
|
|
@@ -42,10 +44,20 @@ export declare function foldParentOf(tfType: string): string | undefined;
|
|
|
42
44
|
*/
|
|
43
45
|
export declare function canCarveEmit(tfType: string): boolean;
|
|
44
46
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
47
|
+
* How `chant carve bridge` reads this type back as a `data` source: the
|
|
48
|
+
* data-source type, where each argument comes from in the carved body, and how
|
|
49
|
+
* a survivor's attribute path translates (#2034). Undefined when the type
|
|
50
|
+
* cannot be read back at all.
|
|
51
|
+
*/
|
|
52
|
+
export declare function dataSourceShapeOf(tfType: string): DataSourceShape | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Can `chant carve bridge` render a Terraform `data` source for this type?
|
|
55
|
+
* True whenever its provider contributes a shape — declared, or implied by a
|
|
56
|
+
* plain identity attribute. False for a dotted identity attribute with no
|
|
57
|
+
* declared shape: that is a path into nested values, and a flat `attr = value`
|
|
58
|
+
* body cannot express it (`manifest.metadata.name = "x"` is not valid HCL). A
|
|
59
|
+
* type with no identity attribute at all still bridges; the bridge writes a
|
|
60
|
+
* TODO comment for the body.
|
|
49
61
|
*/
|
|
50
62
|
export declare function canBridge(tfType: string): boolean;
|
|
51
63
|
//# sourceMappingURL=tier-map.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tier-map.d.ts","sourceRoot":"","sources":["../../src/terraform/tier-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"tier-map.d.ts","sourceRoot":"","sources":["../../src/terraform/tier-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,sGAAsG;AACtG,wBAAgB,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAE5D;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE/D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAE7E;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEjD"}
|
|
@@ -33,6 +33,14 @@ export interface TfNode {
|
|
|
33
33
|
* emit. Undefined when the identity attribute is absent or interpolated.
|
|
34
34
|
*/
|
|
35
35
|
identity?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The literals the type's data-source shape reads out of the block (#2034),
|
|
38
|
+
* keyed by the shape field's source path (`manifest.metadata.name`). This is
|
|
39
|
+
* what `carve bridge` renders the `data` body from — a superset of
|
|
40
|
+
* `identity`, since a shape can need more than one value (`api_version`,
|
|
41
|
+
* `kind` and `metadata.name` for a `kubernetes_manifest`).
|
|
42
|
+
*/
|
|
43
|
+
dataSourceValues?: Record<string, string>;
|
|
36
44
|
}
|
|
37
45
|
/**
|
|
38
46
|
* A directed dependency edge: `from` references `to`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/terraform/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,+EAA+E;AAC/E,MAAM,WAAW,MAAM;IACrB,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC5B,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/terraform/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,+EAA+E;AAC/E,MAAM,WAAW,MAAM;IACrB,sEAAsE;IACtE,OAAO,EAAE,M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GAAG,OAAO,CAAC;CACtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -59,6 +59,11 @@
|
|
|
59
59
|
"types": "./dist/op/index.d.ts",
|
|
60
60
|
"default": "./src/op/index.ts"
|
|
61
61
|
},
|
|
62
|
+
"./op/activities": {
|
|
63
|
+
"development": "./src/op/activities/index.ts",
|
|
64
|
+
"types": "./dist/op/activities/index.d.ts",
|
|
65
|
+
"default": "./src/op/activities/index.ts"
|
|
66
|
+
},
|
|
62
67
|
"./components": {
|
|
63
68
|
"development": "./src/components/index.ts",
|
|
64
69
|
"types": "./dist/components/index.d.ts",
|