@intentius/chant 0.124.102 → 0.124.104
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/secrets.d.ts +6 -0
- package/dist/audit/secrets.js +9 -2
- package/dist/cli/commands/import-index.d.ts +15 -0
- package/dist/cli/commands/import-index.js +37 -3
- package/dist/cli/commands/onboard.js +8 -8
- package/dist/cli/handlers/lifecycle.js +6 -0
- package/dist/cli/handlers/release-config.d.ts +15 -0
- package/dist/cli/handlers/release-config.js +58 -0
- package/dist/cli/handlers/release-init.js +3 -1
- package/dist/cli/handlers/release.js +36 -3
- package/dist/cli/main.js +24 -3
- package/dist/cli/parse-args.js +12 -0
- package/dist/cli/registry.d.ts +4 -0
- package/dist/cli/release-commands/cut.js +3 -0
- package/dist/cloud-lister/kubernetes-components.js +1 -2
- package/dist/config-import.js +26 -4
- package/dist/config.d.ts +14 -0
- package/dist/config.js +4 -0
- package/dist/floor-table.data.js +13 -11
- package/dist/floor-table.js +3 -1
- package/dist/graph-refs.d.ts +9 -0
- package/dist/graph-refs.js +9 -7
- package/dist/lifecycle/cloud-index.d.ts +6 -0
- package/dist/lifecycle/cloud-index.js +32 -5
- package/dist/lifecycle/identity-match.d.ts +18 -2
- package/dist/lifecycle/identity-match.js +10 -5
- package/dist/lifecycle/index-drift.d.ts +13 -0
- package/dist/lifecycle/index-drift.js +21 -3
- package/dist/lifecycle/index-import.d.ts +15 -0
- package/dist/lifecycle/index-import.js +25 -2
- package/dist/lifecycle/index-join.d.ts +1 -1
- package/dist/lifecycle/index-join.js +1 -1
- package/dist/lifecycle/publish-declaration.d.ts +6 -0
- package/dist/lifecycle/publish-declaration.js +19 -3
- package/dist/lifecycle/publish-forge.d.ts +2 -0
- package/dist/lifecycle/publish-forge.js +3 -1
- package/dist/lifecycle/publish-helm.js +1 -2
- package/dist/lifecycle/publish-maven.js +1 -2
- package/dist/lifecycle/publish-npm.js +1 -1
- package/dist/lifecycle/publish-nuget.js +1 -2
- package/dist/lifecycle/publish-oci.d.ts +27 -0
- package/dist/lifecycle/publish-oci.js +63 -8
- package/dist/lifecycle/publish-rubygems.js +1 -2
- package/dist/lifecycle/release-artifacts.js +1 -2
- package/dist/lifecycle/release-changelog.d.ts +18 -5
- package/dist/lifecycle/release-changelog.js +22 -10
- package/dist/lifecycle/release-cut.d.ts +13 -1
- package/dist/lifecycle/release-cut.js +3 -0
- package/dist/lifecycle/release-images.d.ts +32 -2
- package/dist/lifecycle/release-images.js +70 -2
- package/dist/lifecycle/release-init-goreleaser-images.d.ts +21 -0
- package/dist/lifecycle/release-init-goreleaser-images.js +160 -0
- package/dist/lifecycle/release-init.d.ts +22 -0
- package/dist/lifecycle/release-init.js +96 -16
- package/dist/local-chant.d.ts +3 -0
- package/dist/local-chant.js +28 -2
- package/dist/release-floors.d.ts +10 -6
- package/dist/release-floors.js +10 -6
- package/dist/ts-loader.d.ts +12 -3
- package/dist/ts-loader.js +27 -11
- package/dist/wave-runtime.mjs +291 -290
- package/dist/workspace/catalog-edges.d.ts +22 -0
- package/dist/workspace/catalog-edges.js +23 -0
- package/dist/workspace/release-steps/goreleaser.d.ts +6 -3
- package/dist/workspace/release-steps/goreleaser.js +12 -6
- package/dist/workspace/release-toolchains.d.ts +6 -0
- package/dist/workspace/release-toolchains.js +8 -0
- package/dist/workspace/release-train-workflow.d.ts +39 -3
- package/dist/workspace/release-train-workflow.js +258 -9
- package/dist/workspace/release-train.js +5 -1
- package/dist/workspace/release-workflow.d.ts +37 -0
- package/dist/workspace/release-workflow.js +97 -16
- package/dist/workspace/train-artifacts.d.ts +107 -0
- package/dist/workspace/train-artifacts.js +238 -0
- package/dist/workspace/train-cut.d.ts +34 -1
- package/dist/workspace/train-cut.js +98 -14
- package/dist/workspace/train-publish.d.ts +9 -0
- package/dist/workspace/train-publish.js +27 -1
- package/package.json +2 -2
package/dist/floor-table.data.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
// Written by scripts/floor-table.ts (#4792) from the floor constants under
|
|
2
|
-
// packages/core/src and in each lexicon's src/chant-floors.ts (#4916); run
|
|
3
|
-
// `npx tsx scripts/floor-table.ts` after adding one.
|
|
4
|
-
// scripts/release-floors.ts fails while this file is stale.
|
|
5
|
-
import { NEXT_RELEASE } from "./release-floors.js";
|
|
6
1
|
export const FLOOR_ROWS = [
|
|
7
2
|
{ name: "CACHE4_PIN_FLOOR", version: "0.124.78", gates: "The first chant whose table has the `cache4` row (#4816).", issue: "#4816", file: "action-pins.ts", modules: ["@intentius/chant/action-pins"] },
|
|
8
3
|
{ name: "AGENT_GUARD_FLOOR", version: "0.124.77", gates: "The first chant with the shared agent guard (#4770).", issue: "#4770", file: "agent-guard.ts", modules: ["@intentius/chant/agent-guard", "@intentius/chant/ci-product"] },
|
|
@@ -73,9 +68,10 @@ export const FLOOR_ROWS = [
|
|
|
73
68
|
{ name: "PRODUCT_MCP_HOOK_FLOOR", version: "0.124.55", gates: "Telemetry and MCP (#4555).", issue: "#4555", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
|
|
74
69
|
{ name: "FORGE_CI_FLOOR", version: "0.124.101", gates: "The first chant with `@intentius/chant/ci-system`, `ci.forge` and `ci.system` in the workspace declaration, an environment executor's `ci`, forge reads from a Prow job's environment (#5170), and `--generate prow` with `--repo` for `chant build --components` and `chant run` (#5189).", issue: "#5189", file: "ci-system.ts", modules: ["@intentius/chant/ci-system"] },
|
|
75
70
|
{ name: "APPROVE_CONFIRM_FLOOR", version: "0.124.55", gates: "The first chant with `confirmApproval` here, the type-the-name confirmation a product's approve word asks through (#4575).", issue: "#4575", file: "cli/handlers/approve-confirm.ts", modules: ["@intentius/chant/cli/handlers/approve-confirm"] },
|
|
71
|
+
{ name: "RELEASE_CONFIG_UNREADABLE_FLOOR", version: "0.124.104", gates: "The first chant whose `chant release` commands refuse a config they can't load with `release-config-unreadable`, and that reads `chant.config.ts` with the project's tsx when its own install has none (#5263).", issue: "#5263", file: "cli/handlers/release-config.ts", modules: ["@intentius/chant/cli/handlers/release-config"] },
|
|
76
72
|
{ name: "PRODUCT_MCP_PROPOSE_FLOOR", version: "0.124.58", gates: "The first chant whose `chant serve mcp` has the `--propose` tier and serves `forgeWrite` product tools on it (chant#4655).", issue: "#4655", file: "cli/mcp/product-tools.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/cli/mcp/product-tools"] },
|
|
77
73
|
{ name: "MCP_TOOL_ANNOTATIONS_FLOOR", version: "0.124.79", gates: "The first chant whose `tools/list` gives MCP tool annotations: a tool's `annotations`, and `readOnlyHint`/`destructiveHint` from `readOnly: true` or `forgeWrite: true` (chant#4823).", issue: "#4823", file: "cli/mcp/product-tools.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/cli/mcp/product-tools"] },
|
|
78
|
-
{ name: "K8S_COMPONENTS_FLOOR", version:
|
|
74
|
+
{ name: "K8S_COMPONENTS_FLOOR", version: "0.124.102", gates: "The first chant with `inferK8sComponents`, the applications of a live Kubernetes read as a component graph (#5252).", issue: "#5252", file: "cloud-lister/kubernetes-components.ts", modules: ["@intentius/chant/cloud-lister/index", "@intentius/chant/cloud-lister/kubernetes-components"] },
|
|
79
75
|
{ name: "DEPLOY_ADOPT_FLOOR", version: "0.124.55", gates: "The first chant whose `run --components` takes `--adopt`.", file: "components/adoption.ts", modules: ["@intentius/chant/components/adoption"] },
|
|
80
76
|
{ name: "CI_SERVICES_FLOOR", version: "0.124.55", gates: "The first chant with `LexiconPlugin.ciServices` and this module (#4572).", issue: "#4572", file: "components/ci-services.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/components/ci-services"] },
|
|
81
77
|
{ name: "PR_ENV_COMPONENTS_FLOOR", version: "0.124.77", gates: "The first chant with the component adapter and teardown, and the terraform lexicon's copies on them (#4762).", issue: "#4762", file: "components/pr-env-components.ts", modules: ["@intentius/chant/components/pr-env-components"] },
|
|
@@ -104,18 +100,20 @@ export const FLOOR_ROWS = [
|
|
|
104
100
|
{ name: "PUBLISH_FORGE_LATEST_FLOOR", version: "0.124.63", gates: "The first chant that reads `latest` on a forge target and sends it as GitHub's `make_latest` (#4676).", issue: "#4676", file: "lifecycle/publish-forge.ts", modules: ["@intentius/chant/lifecycle/publish-forge"] },
|
|
105
101
|
{ name: "PUBLISH_FORGE_NOTES_FLOOR", version: "0.124.71", gates: "The first chant whose forge target reads `notes` and may have no assets (#4658).", issue: "#4658", file: "lifecycle/publish-forge.ts", modules: ["@intentius/chant/lifecycle/publish-forge"] },
|
|
106
102
|
{ name: "PUBLISH_FORGE_GENERATED_NOTES_FLOOR", version: "0.124.101", gates: "The first chant whose forge target generates notes, `notes.generate` (#5153).", issue: "#5153", file: "lifecycle/publish-forge.ts", modules: ["@intentius/chant/lifecycle/publish-forge"] },
|
|
107
|
-
{ name: "
|
|
103
|
+
{ name: "PUBLISH_FORGE_NOTES_EXCLUDE_FLOOR", version: "0.124.104", gates: "The first chant whose forge target's notes from commits take `exclude` and `nonConventional` (#5270).", issue: "#5270", file: "lifecycle/publish-forge.ts", modules: ["@intentius/chant/lifecycle/publish-forge"] },
|
|
104
|
+
{ name: "PUBLISH_HELM_FLOOR", version: "0.124.102", gates: "The first chant that publishes a `helm` target (#5233).", issue: "#5233", file: "lifecycle/publish-helm.ts", modules: ["@intentius/chant/lifecycle/publish-helm"] },
|
|
108
105
|
{ name: "PUBLISH_HOMEBREW_FLOOR", version: "0.124.63", gates: "The first chant that publishes a `homebrew` target (#4676).", issue: "#4676", file: "lifecycle/publish-homebrew.ts", modules: ["@intentius/chant/lifecycle/publish-homebrew"] },
|
|
109
106
|
{ name: "PUBLISH_HOMEBREW_SSH_KEY_FLOOR", version: "0.124.64", gates: "The first chant that reads a homebrew target's `sshKeyEnv` (#4699).", issue: "#4699", file: "lifecycle/publish-homebrew.ts", modules: ["@intentius/chant/lifecycle/publish-homebrew"] },
|
|
110
107
|
{ name: "PUBLISH_INDEX_FLOOR", version: "0.124.101", gates: "The first chant that publishes an `index` target (#5158).", issue: "#5158", file: "lifecycle/publish-index.ts", modules: ["@intentius/chant/lifecycle/publish-index"] },
|
|
111
108
|
{ name: "PUBLISH_MARKETPLACE_FLOOR", version: "0.124.63", gates: "The first chant that publishes a `marketplace` target (#4676).", issue: "#4676", file: "lifecycle/publish-marketplace.ts", modules: ["@intentius/chant/lifecycle/publish-marketplace"] },
|
|
112
109
|
{ name: "PUBLISH_MARKETPLACE_AUTH_FLOOR", version: "0.124.64", gates: "The first chant that reads a marketplace target's `auth` (#4698).", issue: "#4698", file: "lifecycle/publish-marketplace.ts", modules: ["@intentius/chant/lifecycle/publish-marketplace"] },
|
|
113
110
|
{ name: "PUBLISH_MARKETPLACE_ON_REFUSAL_FLOOR", version: "0.124.64", gates: "The first chant that reads a marketplace target's `onRefusal` (#4698).", issue: "#4698", file: "lifecycle/publish-marketplace.ts", modules: ["@intentius/chant/lifecycle/publish-marketplace"] },
|
|
114
|
-
{ name: "PUBLISH_MAVEN_FLOOR", version:
|
|
111
|
+
{ name: "PUBLISH_MAVEN_FLOOR", version: "0.124.102", gates: "The first chant that publishes a `maven` target (#5232).", issue: "#5232", file: "lifecycle/publish-maven.ts", modules: ["@intentius/chant/lifecycle/publish-maven"] },
|
|
115
112
|
{ name: "PUBLISH_MCP_REGISTRY_FLOOR", version: "0.124.101", gates: "The first chant with the `mcp-registry` publish target: a `server.json` published to the MCP Registry after the packages it names, with GitHub OIDC, and the `mcp-registry-*` checks of `chant release doctor` (#5162).", issue: "#5162", file: "lifecycle/publish-mcp-registry.ts", modules: ["@intentius/chant/lifecycle/publish-mcp-registry"] },
|
|
116
|
-
{ name: "PUBLISH_NUGET_FLOOR", version:
|
|
113
|
+
{ name: "PUBLISH_NUGET_FLOOR", version: "0.124.102", gates: "The first chant that publishes a `nuget` target (#5232).", issue: "#5232", file: "lifecycle/publish-nuget.ts", modules: ["@intentius/chant/lifecycle/publish-nuget"] },
|
|
114
|
+
{ name: "OCI_PLATFORM_TAGS_FLOOR", version: "0.124.104", gates: "The first chant whose oci target takes `platformTags`, a tag for each platform's image in the index (#5269).", issue: "#5269", file: "lifecycle/publish-oci.ts", modules: ["@intentius/chant/lifecycle/publish-oci"] },
|
|
117
115
|
{ name: "PUBLISH_PYPI_FLOOR", version: "0.124.101", gates: "The first chant that publishes a `pypi` target (#5167).", issue: "#5167", file: "lifecycle/publish-pypi.ts", modules: ["@intentius/chant/lifecycle/publish-pypi"] },
|
|
118
|
-
{ name: "PUBLISH_RUBYGEMS_FLOOR", version:
|
|
116
|
+
{ name: "PUBLISH_RUBYGEMS_FLOOR", version: "0.124.102", gates: "The first chant that publishes a `rubygems` target (#5232).", issue: "#5232", file: "lifecycle/publish-rubygems.ts", modules: ["@intentius/chant/lifecycle/publish-rubygems"] },
|
|
119
117
|
{ name: "PUBLISH_TAURI_UPDATER_FLOOR", version: "0.124.63", gates: "The first chant that publishes a `tauri-updater` target (#4676).", issue: "#4676", file: "lifecycle/publish-tauri.ts", modules: ["@intentius/chant/lifecycle/publish-tauri"] },
|
|
120
118
|
{ name: "LEDGER_ROOT_MEMBER_FLOOR", version: "0.124.54", gates: "The first chant that writes `root_member` on a `runs` row, in `chant query` and in `chant ledger runs --json` (#4482, #4500).", issue: "#4482", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
|
|
121
119
|
{ name: "QUERY_OWNERSHIP_COLUMNS_FLOOR", version: "0.124.54", gates: "The first chant that writes `marker_stack`, `marker_env`, `engine_ownership` and `engine_owned_by` on a `resources` row, in `chant query` and in `chant ledger resources --json` (#4534).", issue: "#4534", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
|
|
@@ -124,14 +122,16 @@ export const FLOOR_ROWS = [
|
|
|
124
122
|
{ name: "LEDGER_CONTROL_ENTRIES_FLOOR", version: "0.124.55", gates: "The first chant with the `control_entries` table (#4593), added within version 1.", issue: "#4593", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
|
|
125
123
|
{ name: "LEDGER_RELEASE_STATUS_FLOOR", version: "0.124.55", gates: "The first chant with the `release_status` table (#4596), added within version 1 (chant#4551's ruling C).", issue: "#4551", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
|
|
126
124
|
{ name: "RELEASE_ARTIFACTS_FLOOR", version: "0.124.101", gates: "The first chant with `release.artifacts`, `chant release artifacts` and `artifact:<name>` in a forge or homebrew target's `assets` (#5151).", issue: "#5151", file: "lifecycle/release-artifacts.ts", modules: ["@intentius/chant/lifecycle/release-artifacts"] },
|
|
127
|
-
{ name: "RELEASE_ARTIFACTS_PACKAGES_FLOOR", version:
|
|
125
|
+
{ name: "RELEASE_ARTIFACTS_PACKAGES_FLOOR", version: "0.124.102", gates: "The first chant with `helm` and `nfpm` entries in `release.artifacts` (#5233).", issue: "#5233", file: "lifecycle/release-artifacts.ts", modules: ["@intentius/chant/lifecycle/release-artifacts"] },
|
|
128
126
|
{ name: "RELEASE_CATALOG_FLOOR", version: "0.124.55", gates: "The first chant that writes and reads a release catalog (#4595).", issue: "#4595", file: "lifecycle/release-catalog.ts", modules: ["@intentius/chant/lifecycle/release-catalog"] },
|
|
129
127
|
{ name: "RELEASE_CUT_LANE_FLOOR", version: "0.124.64", gates: "The first chant that cuts from a lane's green tag and writes `lane` on the cut line (#4692).", issue: "#4692", file: "lifecycle/release-cut.ts", modules: ["@intentius/chant/lifecycle/release-cut"] },
|
|
130
128
|
{ name: "RELEASE_CUT_OVERRIDE_FLOOR", version: "0.124.64", gates: "The first chant that cuts a commit that is not green under an override and writes `override` on the cut line (#4693).", issue: "#4693", file: "lifecycle/release-cut.ts", modules: ["@intentius/chant/lifecycle/release-cut"] },
|
|
129
|
+
{ name: "RELEASE_CHECK_FLOOR", version: "0.124.104", gates: "The first chant whose `chant release cut` runs `release.check`, shell lines that refuse the cut with `release-check-failed` before anything is recorded or tagged, in a dry run too (#5261).", issue: "#5261", file: "lifecycle/release-cut.ts", modules: ["@intentius/chant/lifecycle/release-cut"] },
|
|
131
130
|
{ name: "RELEASE_DOCTOR_FLOOR", version: "0.124.101", gates: "The first chant with `chant release doctor`, which checks each `release.publish` target before a cut, and whose `chant release workflow` runs it in a dispatched release's cut job (`release.workflow.doctor`) (#5161).", issue: "#5161", file: "lifecycle/release-doctor.ts", modules: ["@intentius/chant/lifecycle/release-doctor"] },
|
|
132
131
|
{ name: "RELEASE_IMAGES_FLOOR", version: "0.124.71", gates: "The first chant with `release.images`, `CHANT_RELEASE_DIGESTS`, `chant release images` and an npm target's `pins` (#4657).", issue: "#4657", file: "lifecycle/release-images.ts", modules: ["@intentius/chant/lifecycle/release-images"] },
|
|
133
132
|
{ name: "RELEASE_IMAGE_DOCKERFILE_FLOOR", version: "0.124.78", gates: "The first chant whose `release.images` takes a Dockerfile entry, with `releaseImagePins` and `writeReleaseImagePins` for a product's package build (#4819).", issue: "#4819", file: "lifecycle/release-images.ts", modules: ["@intentius/chant/lifecycle/release-images"] },
|
|
134
133
|
{ name: "RELEASE_IMAGE_ARGS_FLOOR", version: "0.124.88", gates: "The first chant whose Dockerfile entry in `release.images` takes `args`, build arguments beside the two chant passes (#4908).", issue: "#4908", file: "lifecycle/release-images.ts", modules: ["@intentius/chant/lifecycle/release-images"] },
|
|
134
|
+
{ name: "RELEASE_IMAGE_LABELS_FLOOR", version: "0.124.104", gates: "The first chant whose Dockerfile entry takes `labels`, OCI labels on the image, and `{label}` and `{version}` in `args` and `labels` values, and whose image builds see `CHANT_RELEASE_VERSION`; and whose default archive moves out of a goreleaser entry's `dist` (#5269).", issue: "#5269", file: "lifecycle/release-images.ts", modules: ["@intentius/chant/lifecycle/release-images"] },
|
|
135
135
|
{ name: "RUN_ORIGIN_CHANT_FLOOR", version: "0.124.30", gates: "The first chant that writes `runOrigin.forge: \"chant\"`, for a job `chant ci run` ran (#4094).", issue: "#4094", file: "lifecycle/release-ledger.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/release-ledger"] },
|
|
136
136
|
{ name: "RUN_ORIGIN_JOB_FLOOR", version: "0.124.32", gates: "The first chant that writes `runOrigin.jobId` and `runOrigin.attempt`, for a forge job that ran `chant ci run` (#4156).", issue: "#4156", file: "lifecycle/release-ledger.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/release-ledger"] },
|
|
137
137
|
{ name: "RELEASE_RECORD_VERSION_FLOOR", version: "0.124.55", gates: "The first chant that writes and reads `releaseVersion` on a release record (#4595).", issue: "#4595", file: "lifecycle/release-ledger.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/release-ledger"] },
|
|
@@ -292,6 +292,8 @@ export const FLOOR_ROWS = [
|
|
|
292
292
|
{ name: "RELEASE_CANDIDATES_CLOSES_FLOOR", version: "0.124.63", gates: "The first chant whose candidates carry `changes[].closes` and `groups[].issue` (#4649).", issue: "#4649", file: "workspace/release-candidates.ts", modules: ["@intentius/chant/workspace/release-candidates"] },
|
|
293
293
|
{ name: "RELEASE_CANDIDATES_LANE_FLOOR", version: "0.124.64", gates: "The first chant whose candidates document carries `lane` and reads a lane's tags (#4692).", issue: "#4692", file: "workspace/release-candidates.ts", modules: ["@intentius/chant/workspace/release-candidates"] },
|
|
294
294
|
{ name: "TRAIN_PROMOTE_FLOOR", version: "0.124.98", gates: "The first chant that writes ReleaseTrainRecord.trainDigest and has `chant workspace train promote` (#4037).", issue: "#4037", file: "workspace/release-train.ts", modules: ["@intentius/chant/workspace/release-train"] },
|
|
295
|
+
{ name: "TRAIN_ARTIFACTS_FLOOR", version: "0.124.103", gates: "The first chant with `chant workspace train artifacts`, `train verify` and `train cut --doctor`, and a train publish that gives a member with images its digests in `CHANT_RELEASE_DIGESTS` (#5216): what the train workflow's cut and publish jobs run.", issue: "#5216", file: "workspace/train-artifacts.ts", modules: ["@intentius/chant/workspace/train-artifacts"] },
|
|
296
|
+
{ name: "TRAIN_BUILDS_FLOOR", version: "0.124.104", gates: "The first chant with `chant workspace train cut --plan-only` and `--planned` (#5237): what the train workflow's gate and cut jobs run when a member declares `release.workflow.builds`.", issue: "#5237", file: "workspace/train-cut.ts", modules: ["@intentius/chant/workspace/train-cut"] },
|
|
295
297
|
{ name: "TRAIN_PUBLISH_TARGETS_FLOOR", version: "0.124.101", gates: "The first chant whose `chant workspace train publish` orders and resumes members of every target kind (#5165): the oci, forge, homebrew, index, marketplace, pypi, cargo, mcp-registry and tauri-updater targets name what they publish and need, say whether a pinned release is published, and wait until a reveal is served before the next layer; a member's `release.dependsOn` names members a manifest doesn't show.", issue: "#5165", file: "workspace/train-publish.ts", modules: ["@intentius/chant/workspace/train-publish"] },
|
|
296
298
|
{ name: "PROW_LEXICON_FLOOR", version: "0.124.101", package: "@intentius/chant-lexicon-prow", gates: "The first prow lexicon release: `Presubmit`, `Postsubmit`, `Periodic` and `JobConfig`, `emitJobConfig` for plain job data, `forgeJobConfig` for one repository's jobs keyed by its owner/name (#5170), the generators behind `chant build --components --generate prow` and `chant run --generate prow` (#5189), `chant import` of a job config, and the PROW rules (#5169).", issue: "#5169", file: "lexicons/prow/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-prow", "@intentius/chant-lexicon-prow/chant-floors", "@intentius/chant-lexicon-prow/index"] },
|
|
297
299
|
{ name: "MODULE_CONSUMERS_FLOOR", version: "0.124.55", package: "@intentius/chant-lexicon-terraform", gates: "The first terraform lexicon release that has `moduleConsumers`, the scan of every registry module call a root makes, with `readRegistryCatalog` and `deprecatedPins` beside it on `./registry` (#4599).", issue: "#4599", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/registry", "@intentius/chant-lexicon-terraform/registry/index"] },
|
package/dist/floor-table.js
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
* rows are written by scripts/floor-table.ts from the constants themselves
|
|
13
13
|
* (./floor-table.data.ts), and scripts/release-floors.ts fails while a floor
|
|
14
14
|
* is missing from them. A floor added since the last release has the version
|
|
15
|
-
* of the next one, NEXT_RELEASE
|
|
15
|
+
* of the next one, NEXT_RELEASE; core's prepack writes each floor still on
|
|
16
|
+
* NEXT_RELEASE as the release that first carried it, read from the release
|
|
17
|
+
* tags, or as the version being packed (#5260). Each name is
|
|
16
18
|
* declared once (#4916), and scripts/floor-table.ts fails on a second.
|
|
17
19
|
*
|
|
18
20
|
* `chant dev dead-guards` (./dead-guards.ts) reads this table against a
|
package/dist/graph-refs.d.ts
CHANGED
|
@@ -457,6 +457,15 @@ export interface NodeIdentityValue {
|
|
|
457
457
|
/** `native-id`, or the cloud id's kind (`arn`, `provider-id`, ...). */
|
|
458
458
|
kind: string;
|
|
459
459
|
value: string;
|
|
460
|
+
/**
|
|
461
|
+
* The attribute paths this value names the node at (#5250): a holder's
|
|
462
|
+
* string at `path` joins only when `path` is one of these or ends in `.`
|
|
463
|
+
* plus one. For a name that is unique only among objects of one kind (a
|
|
464
|
+
* Kubernetes cluster-scoped name), where the same string at another field
|
|
465
|
+
* names something else. Absent: the value names the node wherever it
|
|
466
|
+
* appears.
|
|
467
|
+
*/
|
|
468
|
+
paths?: readonly string[];
|
|
460
469
|
}
|
|
461
470
|
/** The lexicon whose nodes can be identity-matched, and the values that name each one. */
|
|
462
471
|
export interface IdentityOwners {
|
package/dist/graph-refs.js
CHANGED
|
@@ -491,7 +491,7 @@ export function reconstructIdentityEdges(nodes, owners, scopeOf, existing = [])
|
|
|
491
491
|
const sorted = [...nodes].sort((a, b) => byString(a.id, b.id));
|
|
492
492
|
const ownerBy = new Map(owners.map((o) => [o.lexicon, o]));
|
|
493
493
|
const keyOf = (scope, value) => `${scope.account}\u0000${scope.region ?? ""}\u0000${value}`;
|
|
494
|
-
// key -> node id -> the rule that names it
|
|
494
|
+
// key -> node id -> the rule that names it, and the paths it names the node at
|
|
495
495
|
const index = new Map();
|
|
496
496
|
const own = new Map();
|
|
497
497
|
for (const node of sorted) {
|
|
@@ -501,15 +501,15 @@ export function reconstructIdentityEdges(nodes, owners, scopeOf, existing = [])
|
|
|
501
501
|
const scope = scopeOf(node);
|
|
502
502
|
const values = (owner.identities ?? defaultNodeIdentities)(node);
|
|
503
503
|
own.set(node.id, new Set(values.map((v) => v.value)));
|
|
504
|
-
for (const { kind, value } of values) {
|
|
504
|
+
for (const { kind, value, paths } of values) {
|
|
505
505
|
if (!identityCandidateValue(value))
|
|
506
506
|
continue;
|
|
507
507
|
const k = keyOf(scope, value);
|
|
508
508
|
const m = index.get(k) ?? index.set(k, new Map()).get(k);
|
|
509
509
|
const rule = identityMatchRuleId(owner.lexicon, node.kind, kind);
|
|
510
510
|
const prev = m.get(node.id);
|
|
511
|
-
if (prev === undefined || byString(rule, prev) < 0)
|
|
512
|
-
m.set(node.id, rule);
|
|
511
|
+
if (prev === undefined || byString(rule, prev.rule) < 0)
|
|
512
|
+
m.set(node.id, { rule, paths });
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
const joined = new Set(existing.map((e) => `${e.from}|${e.to}`));
|
|
@@ -523,10 +523,12 @@ export function reconstructIdentityEdges(nodes, owners, scopeOf, existing = [])
|
|
|
523
523
|
if (!identityCandidateValue(value) || mine.has(value))
|
|
524
524
|
continue;
|
|
525
525
|
const found = new Map();
|
|
526
|
-
for (const k of keys(value))
|
|
527
|
-
for (const [id, rule] of index.get(k) ?? [])
|
|
528
|
-
if (id !== holder.id)
|
|
526
|
+
for (const k of keys(value)) {
|
|
527
|
+
for (const [id, { rule, paths }] of index.get(k) ?? []) {
|
|
528
|
+
if (id !== holder.id && (paths === undefined || paths.some((p) => path === p || path.endsWith(`.${p}`))))
|
|
529
529
|
found.set(id, rule);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
530
532
|
if (found.size === 0)
|
|
531
533
|
continue;
|
|
532
534
|
if (found.size > 1) {
|
|
@@ -145,6 +145,12 @@ export interface IndexSummary {
|
|
|
145
145
|
notObserved: number;
|
|
146
146
|
};
|
|
147
147
|
notes: string[];
|
|
148
|
+
/** The same notes with their kind and, where there is one, the command to run yourself. */
|
|
149
|
+
noteDetails: Array<{
|
|
150
|
+
kind?: string;
|
|
151
|
+
message: string;
|
|
152
|
+
command?: string;
|
|
153
|
+
}>;
|
|
148
154
|
}
|
|
149
155
|
export interface RunCloudIndexOptions extends IndexCloudDeps {
|
|
150
156
|
/** The command name in messages: `chant index` (default) or `behold index`. */
|
|
@@ -477,6 +477,31 @@ export async function substrateLexicons(substrate) {
|
|
|
477
477
|
}
|
|
478
478
|
return { lexicons: [plugin] };
|
|
479
479
|
}
|
|
480
|
+
/** A kind that repeats more than this many times prints as one line with a count. */
|
|
481
|
+
const NOTE_REPEAT_LIMIT = 3;
|
|
482
|
+
/** The note lines the CLI prints: a command goes under its note, a long run of one kind collapses to a count. */
|
|
483
|
+
function noteLines(details) {
|
|
484
|
+
const byKind = new Map();
|
|
485
|
+
for (const n of details)
|
|
486
|
+
if (n.kind)
|
|
487
|
+
byKind.set(n.kind, (byKind.get(n.kind) ?? 0) + 1);
|
|
488
|
+
const lines = [];
|
|
489
|
+
const seen = new Set();
|
|
490
|
+
for (const n of details) {
|
|
491
|
+
const count = n.kind ? (byKind.get(n.kind) ?? 0) : 0;
|
|
492
|
+
if (n.kind && count > NOTE_REPEAT_LIMIT) {
|
|
493
|
+
if (seen.has(n.kind))
|
|
494
|
+
continue;
|
|
495
|
+
seen.add(n.kind);
|
|
496
|
+
lines.push(` note: ${count} ${n.kind} notes, for example: ${n.message}\n (all ${count} are in the stored version and in --json)\n`);
|
|
497
|
+
continue;
|
|
498
|
+
}
|
|
499
|
+
lines.push(` note: ${n.message}\n`);
|
|
500
|
+
if (n.command)
|
|
501
|
+
lines.push(` run: ${n.command}\n`);
|
|
502
|
+
}
|
|
503
|
+
return lines;
|
|
504
|
+
}
|
|
480
505
|
function summarize(doc) {
|
|
481
506
|
const nodes = doc.graph.nodes;
|
|
482
507
|
const unmapped = nodes.filter((n) => n.unmappedKind === true).length;
|
|
@@ -571,11 +596,12 @@ export async function runCloudIndex(argv, opts = {}) {
|
|
|
571
596
|
return 1;
|
|
572
597
|
}
|
|
573
598
|
const { doc, write } = result;
|
|
574
|
-
const
|
|
599
|
+
const noteDetails = [];
|
|
575
600
|
if (lex.note)
|
|
576
|
-
|
|
601
|
+
noteDetails.push({ message: lex.note });
|
|
577
602
|
for (const n of doc.notes ?? [])
|
|
578
|
-
|
|
603
|
+
noteDetails.push({ kind: n.kind, message: n.message, ...(n.command ? { command: n.command } : {}) });
|
|
604
|
+
const notes = noteDetails.map((n) => n.message);
|
|
579
605
|
const version = write.path ? basename(write.path) : undefined;
|
|
580
606
|
const summary = {
|
|
581
607
|
substrate: args.substrate,
|
|
@@ -590,6 +616,7 @@ export async function runCloudIndex(argv, opts = {}) {
|
|
|
590
616
|
...(write.reason ? { reason: write.reason } : {}),
|
|
591
617
|
...summarize(doc),
|
|
592
618
|
notes,
|
|
619
|
+
noteDetails,
|
|
593
620
|
};
|
|
594
621
|
if (args.json) {
|
|
595
622
|
out(`${JSON.stringify(summary, null, 2)}\n`);
|
|
@@ -597,8 +624,8 @@ export async function runCloudIndex(argv, opts = {}) {
|
|
|
597
624
|
else {
|
|
598
625
|
out(`${args.substrate} ${scope.scopeId}: ${summary.nodes} nodes (${summary.typed} typed, ${summary.unmapped} of unknown kind), ${summary.derivedEdges} derived edges\n`);
|
|
599
626
|
out(`coverage: ${summary.coverage.listed} (type, location) listed, ${summary.coverage.notObserved} not observed\n`);
|
|
600
|
-
for (const
|
|
601
|
-
out(
|
|
627
|
+
for (const line of noteLines(noteDetails))
|
|
628
|
+
out(line);
|
|
602
629
|
if (write.written)
|
|
603
630
|
out(`${command}: wrote ${version} under ${summary.scopeKey} in ${store.where}\n`);
|
|
604
631
|
else
|
|
@@ -39,14 +39,21 @@ export type DeclaredIdentity = {
|
|
|
39
39
|
kind: "identifier";
|
|
40
40
|
/** The inventory API's type name the identifier belongs to (the CloudFormation type for aws). */
|
|
41
41
|
listedType: string;
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* The identifier as the index's `nativeId` spells it (Cloud Control's,
|
|
44
|
+
* `|`-joined for a multi-part one), or as the lexicon's
|
|
45
|
+
* {@link IndexIdentity.nodeKey} spells a node's key.
|
|
46
|
+
*/
|
|
43
47
|
identifier: string;
|
|
44
48
|
/** A global type is indexed once per account at location `global`. */
|
|
45
49
|
global: boolean;
|
|
46
50
|
/**
|
|
47
51
|
* The location the declaration itself names, ahead of the entity's
|
|
48
52
|
* region: a Kubernetes namespace, or `cluster` for a cluster-scoped
|
|
49
|
-
* kind.
|
|
53
|
+
* kind. `"*"` matches the identifier at every location, for a
|
|
54
|
+
* declaration whose location is not a literal (an Azure resource that
|
|
55
|
+
* takes its resource group's), and absence is then read from the
|
|
56
|
+
* coverage at `*`. Absent: `global` or the region.
|
|
50
57
|
*/
|
|
51
58
|
location?: string;
|
|
52
59
|
/**
|
|
@@ -78,6 +85,13 @@ export interface IndexIdentity {
|
|
|
78
85
|
* Absent: its native id and its ARN cloud ids.
|
|
79
86
|
*/
|
|
80
87
|
nodeIdentities?(node: IRNode): NodeIdentityValue[];
|
|
88
|
+
/**
|
|
89
|
+
* The value a declared identifier is compared with, for a substrate whose
|
|
90
|
+
* native id holds parts no declaration spells: the resource group in an
|
|
91
|
+
* Azure id, the project and location in a GCP asset name. Undefined leaves
|
|
92
|
+
* the node out of the match. Absent: its native id.
|
|
93
|
+
*/
|
|
94
|
+
nodeKey?(node: IRNode): string | undefined;
|
|
81
95
|
}
|
|
82
96
|
/** One declared entity, as the build output names it. */
|
|
83
97
|
export interface DeclaredEntity {
|
|
@@ -126,6 +140,8 @@ export interface MatchOptions {
|
|
|
126
140
|
/** The region of an entity that names none. */
|
|
127
141
|
region?: string;
|
|
128
142
|
}
|
|
143
|
+
/** A declared location that matches every indexed location ({@link DeclaredIdentity}). */
|
|
144
|
+
export declare const ANY_LOCATION = "*";
|
|
129
145
|
/**
|
|
130
146
|
* Whether the index looked at (type, location), from its coverage. `listed`
|
|
131
147
|
* means a missing node is absent; anything else is a reason it is not
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { indexCoverageFor } from "./index-document.js";
|
|
2
2
|
const byString = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
3
|
+
/** A declared location that matches every indexed location ({@link DeclaredIdentity}). */
|
|
4
|
+
export const ANY_LOCATION = "*";
|
|
3
5
|
/** The documents must be cloud reads of one substrate, one account and one read, or a candidate from another read would bind. */
|
|
4
6
|
function cloudScopes(docs, substrate) {
|
|
5
7
|
const scopes = [];
|
|
@@ -80,17 +82,20 @@ export function matchDeclaredToIndex(entities, docs, identity, options = {}) {
|
|
|
80
82
|
// listedType -> nativeId -> nodes, and the same keyed by lexicon kind
|
|
81
83
|
const byIdentity = new Map();
|
|
82
84
|
const byKind = new Map();
|
|
83
|
-
const add = (index, t, n) => {
|
|
85
|
+
const add = (index, t, key, n) => {
|
|
84
86
|
const m = index.get(t) ?? index.set(t, new Map()).get(t);
|
|
85
|
-
(m.get(
|
|
87
|
+
(m.get(key) ?? m.set(key, []).get(key)).push(n);
|
|
86
88
|
};
|
|
87
89
|
for (const d of docs) {
|
|
88
90
|
for (const n of d.graph.nodes) {
|
|
89
91
|
if (n.nativeId === undefined)
|
|
90
92
|
continue;
|
|
91
|
-
|
|
93
|
+
const key = identity.nodeKey ? identity.nodeKey(n) : n.nativeId;
|
|
94
|
+
if (key === undefined)
|
|
95
|
+
continue;
|
|
96
|
+
add(byIdentity, listedTypeOf(n), key, n);
|
|
92
97
|
if (!n.unmappedKind)
|
|
93
|
-
add(byKind, n.kind, n);
|
|
98
|
+
add(byKind, n.kind, key, n);
|
|
94
99
|
}
|
|
95
100
|
}
|
|
96
101
|
const matches = {};
|
|
@@ -105,7 +110,7 @@ export function matchDeclaredToIndex(entities, docs, identity, options = {}) {
|
|
|
105
110
|
const region = entity.region ?? options.region;
|
|
106
111
|
const location = declared.location ?? (declared.global ? "global" : region);
|
|
107
112
|
const all = (declared.entityKind !== undefined ? byKind.get(declared.entityKind) : byIdentity.get(listedType))?.get(identifier) ?? [];
|
|
108
|
-
const inScope = location === undefined ? all : all.filter((n) => n.location === location);
|
|
113
|
+
const inScope = location === undefined || location === ANY_LOCATION ? all : all.filter((n) => n.location === location);
|
|
109
114
|
const candidates = [...new Set(inScope.map((n) => n.id))].sort(byString);
|
|
110
115
|
if (candidates.length > 1) {
|
|
111
116
|
matches[entity.name] = {
|
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
* and the observation baseline (`.chant/observation-baseline/<env>.json`,
|
|
16
16
|
* #4519) subtracted, value-bound. An accepted deviation stays quiet until
|
|
17
17
|
* the indexed value moves again.
|
|
18
|
+
*
|
|
19
|
+
* The index carries what the provider's listing returned, which is often
|
|
20
|
+
* a few properties per type (Cloud Control's `ListResources` gives a role
|
|
21
|
+
* its name and path, not its trust policy). A declared top-level property
|
|
22
|
+
* the indexed node does not carry was never observed, so it is left out
|
|
23
|
+
* of the comparison and reported as not observed, never as drift to
|
|
24
|
+
* `<absent>`. The record says so in `attributesUnobserved`.
|
|
18
25
|
* 3. Every row becomes one drift record (`drift: "v1"`, ../drift-record.ts).
|
|
19
26
|
*
|
|
20
27
|
* A row that is not bound is reported with its join verdict and never
|
|
@@ -83,6 +90,12 @@ export interface IndexDriftLexiconResult {
|
|
|
83
90
|
joins: Record<string, IndexJoin>;
|
|
84
91
|
/** The deep diff over the bound rows only. Unbound rows are never in it. */
|
|
85
92
|
deep: DeepDiffResult;
|
|
93
|
+
/**
|
|
94
|
+
* Per bound row, the declared top-level properties its indexed node does
|
|
95
|
+
* not carry, sorted. They were left out of {@link deep}: the index never
|
|
96
|
+
* observed them. Rows with none are not listed.
|
|
97
|
+
*/
|
|
98
|
+
unobservedProperties: Record<string, string[]>;
|
|
86
99
|
}
|
|
87
100
|
export interface IndexDriftCounts {
|
|
88
101
|
/** Declared entities compared. */
|
|
@@ -86,6 +86,7 @@ export function diffDeclaredAgainstIndex(input) {
|
|
|
86
86
|
// The bound rows are the observed side, each its indexed node's tree.
|
|
87
87
|
const bound = new Map();
|
|
88
88
|
const resources = {};
|
|
89
|
+
const unobservedProperties = {};
|
|
89
90
|
for (const [name, entity] of entities) {
|
|
90
91
|
const j = joins[name];
|
|
91
92
|
if (j?.verdict !== "bound")
|
|
@@ -93,11 +94,24 @@ export function diffDeclaredAgainstIndex(input) {
|
|
|
93
94
|
const hit = indexed.get(j.node);
|
|
94
95
|
if (!hit)
|
|
95
96
|
continue;
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
const attrs = (hit.attrs ?? {});
|
|
98
|
+
// Only what the index observed is compared: a declared property the
|
|
99
|
+
// listing never returned is unknown, not removed.
|
|
100
|
+
const props = {};
|
|
101
|
+
const missing = [];
|
|
102
|
+
for (const [key, value] of Object.entries(entity.props ?? {})) {
|
|
103
|
+
if (Object.prototype.hasOwnProperty.call(attrs, key))
|
|
104
|
+
props[key] = value;
|
|
105
|
+
else
|
|
106
|
+
missing.push(key);
|
|
107
|
+
}
|
|
108
|
+
if (missing.length > 0)
|
|
109
|
+
unobservedProperties[name] = missing.sort();
|
|
110
|
+
bound.set(name, { ...entity, props });
|
|
111
|
+
resources[name] = { type: entity.entityType, physicalId: hit.physicalId ?? j.nativeId, properties: attrs };
|
|
98
112
|
}
|
|
99
113
|
const deep = diffDeepObservation(bound, { resources, unobserved: {} }, plugin.deepNormalizationHooks, baselineForLexicon(input.baseline, lexicon));
|
|
100
|
-
byLexicon[lexicon] = { joins, deep };
|
|
114
|
+
byLexicon[lexicon] = { joins, deep, unobservedProperties };
|
|
101
115
|
// Bound rows: the deep diff's records, and in-sync for a row whose every
|
|
102
116
|
// difference is accepted (the deep diff lists it under neither).
|
|
103
117
|
const deepRecords = new Map(deepDiffDriftRecords({ ...adapter, diff: deep, command }).map((r) => [r.address, r]));
|
|
@@ -109,6 +123,7 @@ export function diffDeclaredAgainstIndex(input) {
|
|
|
109
123
|
if (j?.verdict === "bound" && bound.has(name)) {
|
|
110
124
|
counts.bound++;
|
|
111
125
|
const r = deepRecords.get(name);
|
|
126
|
+
const missing = unobservedProperties[name];
|
|
112
127
|
records.push(driftRecord({
|
|
113
128
|
...(r ?? {
|
|
114
129
|
member: input.member,
|
|
@@ -122,6 +137,9 @@ export function diffDeclaredAgainstIndex(input) {
|
|
|
122
137
|
address: address(name),
|
|
123
138
|
...at,
|
|
124
139
|
resourceType: entity.entityType,
|
|
140
|
+
...(missing
|
|
141
|
+
? { attributesUnobserved: { reason: "not-reached", detail: `the index does not carry ${missing.join(", ")}; compared only the properties it holds` } }
|
|
142
|
+
: {}),
|
|
125
143
|
}));
|
|
126
144
|
continue;
|
|
127
145
|
}
|
|
@@ -34,12 +34,16 @@ export interface IndexImportCodegen {
|
|
|
34
34
|
* `DeletionPolicy: Retain` on every imported resource, #4536). `notes`
|
|
35
35
|
* go into the file's header comment after the logical id (the k8s
|
|
36
36
|
* lexicon names the keys of a Secret it writes as a referenced secret).
|
|
37
|
+
* `missing` names the top-level properties the type requires that the
|
|
38
|
+
* node's attrs do not hold; each becomes a parameter from
|
|
39
|
+
* {@link requiredParameter}.
|
|
37
40
|
*/
|
|
38
41
|
resource(node: IRNode): {
|
|
39
42
|
type: string;
|
|
40
43
|
properties: Record<string, unknown>;
|
|
41
44
|
attributes?: Record<string, unknown>;
|
|
42
45
|
notes?: readonly string[];
|
|
46
|
+
missing?: readonly string[];
|
|
43
47
|
} | {
|
|
44
48
|
unsupported: string;
|
|
45
49
|
};
|
|
@@ -55,6 +59,15 @@ export interface IndexImportCodegen {
|
|
|
55
59
|
logicalId: string;
|
|
56
60
|
path: string;
|
|
57
61
|
}): ParameterIR;
|
|
62
|
+
/**
|
|
63
|
+
* The parameter that stands in for a required property the listing did
|
|
64
|
+
* not hold. Absent: such a property is named in the header only.
|
|
65
|
+
*/
|
|
66
|
+
requiredParameter?(name: string, context: {
|
|
67
|
+
node: IRNode;
|
|
68
|
+
logicalId: string;
|
|
69
|
+
path: string;
|
|
70
|
+
}): ParameterIR;
|
|
58
71
|
/** A reference to that parameter, as a property value in this lexicon's IR. */
|
|
59
72
|
parameterReference(name: string): unknown;
|
|
60
73
|
/** The type's short name for logical ids (`Bucket` for `AWS::S3::Bucket`). Absent: the kind's last segment. */
|
|
@@ -107,6 +120,8 @@ export interface IndexImportParameterReport {
|
|
|
107
120
|
node: string;
|
|
108
121
|
path: string;
|
|
109
122
|
group: string;
|
|
123
|
+
/** Why the value is a parameter: `masked` in the index, or a required property the listing did not hold. */
|
|
124
|
+
cause: "masked" | "missing";
|
|
110
125
|
}
|
|
111
126
|
/** The import report (`chant-index-import.json`), deterministic for one index and selection. */
|
|
112
127
|
export interface IndexImportReport {
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
* comment in the file names the edge and why;
|
|
24
24
|
* - a value the listing masked (`[REDACTED]`) is never written. Each one
|
|
25
25
|
* becomes a parameter to fill in;
|
|
26
|
+
* - a property the lexicon requires that the listing does not hold (a
|
|
27
|
+
* listing returns part of a resource's model) becomes a parameter to fill
|
|
28
|
+
* in too, with a header line saying so, rather than source that leaves it
|
|
29
|
+
* out;
|
|
26
30
|
* - output is deterministic: nodes, edges, parameters and logical ids are
|
|
27
31
|
* ordered by id, so the same index and selection give the same IR, and the
|
|
28
32
|
* same files.
|
|
@@ -357,6 +361,7 @@ export function planIndexImport(docs, selection, lexicons, options = {}) {
|
|
|
357
361
|
properties: r.properties,
|
|
358
362
|
...(r.attributes ? { attributes: r.attributes } : {}),
|
|
359
363
|
...(r.notes && r.notes.length > 0 ? { notes: r.notes } : {}),
|
|
364
|
+
...(r.missing && r.missing.length > 0 ? { missing: [...new Set(r.missing)].sort(byString) } : {}),
|
|
360
365
|
});
|
|
361
366
|
}
|
|
362
367
|
// Groups: lexicon + location. Global nodes join their lexicon's only regional group, when there is one.
|
|
@@ -465,17 +470,35 @@ export function planIndexImport(docs, selection, lexicons, options = {}) {
|
|
|
465
470
|
references.push({ path: at, target: e.to, ...(e.rule ? { rule: e.rule } : {}), written: "reference" });
|
|
466
471
|
}
|
|
467
472
|
const params = [];
|
|
468
|
-
|
|
473
|
+
const parameterName = (at) => {
|
|
469
474
|
let name = `${logicalId}${pascalWords(at)}`;
|
|
470
475
|
for (let i = 2; usedParams.has(name); i++)
|
|
471
476
|
name = `${logicalId}${pascalWords(at)}${i}`;
|
|
472
477
|
usedParams.add(name);
|
|
478
|
+
return name;
|
|
479
|
+
};
|
|
480
|
+
for (const { at, parts } of maskedPaths(props)) {
|
|
481
|
+
const name = parameterName(at);
|
|
473
482
|
parameters.push(w.codegen.secretParameter(name, { node: w.node, logicalId, path: at }));
|
|
474
483
|
props = setExact(props, parts, w.codegen.parameterReference(name));
|
|
475
484
|
params.push(name);
|
|
476
|
-
parameterReports.push({ name, node: w.node.id, path: at, group: dir });
|
|
485
|
+
parameterReports.push({ name, node: w.node.id, path: at, group: dir, cause: "masked" });
|
|
477
486
|
header.push(`${logicalId}.${at} was masked in the index; fill in the parameter ${name}`);
|
|
478
487
|
}
|
|
488
|
+
for (const at of w.missing ?? []) {
|
|
489
|
+
if (props[at] !== undefined)
|
|
490
|
+
continue;
|
|
491
|
+
if (!w.codegen.requiredParameter) {
|
|
492
|
+
header.push(`${logicalId}.${at} is required and the index listing did not hold it; add it before building`);
|
|
493
|
+
continue;
|
|
494
|
+
}
|
|
495
|
+
const name = parameterName(at);
|
|
496
|
+
parameters.push(w.codegen.requiredParameter(name, { node: w.node, logicalId, path: at }));
|
|
497
|
+
props = { ...props, [at]: w.codegen.parameterReference(name) };
|
|
498
|
+
params.push(name);
|
|
499
|
+
parameterReports.push({ name, node: w.node.id, path: at, group: dir, cause: "missing" });
|
|
500
|
+
header.push(`${logicalId}.${at} is required and the index listing did not hold it; fill in the parameter ${name}`);
|
|
501
|
+
}
|
|
479
502
|
if (references.length > 0)
|
|
480
503
|
report.references = references;
|
|
481
504
|
if (params.length > 0)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* `--live` lays a live read over it (`sourceOverlayGraphs`).
|
|
15
15
|
*
|
|
16
16
|
* The join goes through each lexicon's own index match, its plugin's
|
|
17
|
-
* `indexIdentity` (#4523, ./identity-match.ts). aws
|
|
17
|
+
* `indexIdentity` (#4523, ./identity-match.ts). aws, k8s, gcp and azure have one; a lexicon with
|
|
18
18
|
* none gets `not-observed`, reason `unsupported-kind`, on every row, never a
|
|
19
19
|
* guessed match. The verdicts:
|
|
20
20
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* `--live` lays a live read over it (`sourceOverlayGraphs`).
|
|
15
15
|
*
|
|
16
16
|
* The join goes through each lexicon's own index match, its plugin's
|
|
17
|
-
* `indexIdentity` (#4523, ./identity-match.ts). aws
|
|
17
|
+
* `indexIdentity` (#4523, ./identity-match.ts). aws, k8s, gcp and azure have one; a lexicon with
|
|
18
18
|
* none gets `not-observed`, reason `unsupported-kind`, on every row, never a
|
|
19
19
|
* guessed match. The verdicts:
|
|
20
20
|
*
|
|
@@ -55,6 +55,7 @@ export declare const OciPublishSchema: z.ZodObject<{
|
|
|
55
55
|
image: z.ZodString;
|
|
56
56
|
repository: z.ZodString;
|
|
57
57
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
58
|
+
platformTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
58
59
|
usernameEnv: z.ZodOptional<z.ZodString>;
|
|
59
60
|
passwordEnv: z.ZodOptional<z.ZodString>;
|
|
60
61
|
sbom: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
@@ -79,6 +80,8 @@ export declare const ForgePublishSchema: z.ZodObject<{
|
|
|
79
80
|
forge: "forge";
|
|
80
81
|
}>>;
|
|
81
82
|
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
83
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
84
|
+
nonConventional: z.ZodOptional<z.ZodBoolean>;
|
|
82
85
|
before: z.ZodOptional<z.ZodString>;
|
|
83
86
|
after: z.ZodOptional<z.ZodString>;
|
|
84
87
|
}, z.core.$strict>>;
|
|
@@ -336,6 +339,7 @@ export declare const PublishDeclarationSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
336
339
|
image: z.ZodString;
|
|
337
340
|
repository: z.ZodString;
|
|
338
341
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
342
|
+
platformTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
339
343
|
usernameEnv: z.ZodOptional<z.ZodString>;
|
|
340
344
|
passwordEnv: z.ZodOptional<z.ZodString>;
|
|
341
345
|
sbom: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
@@ -358,6 +362,8 @@ export declare const PublishDeclarationSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
358
362
|
forge: "forge";
|
|
359
363
|
}>>;
|
|
360
364
|
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
365
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
366
|
+
nonConventional: z.ZodOptional<z.ZodBoolean>;
|
|
361
367
|
before: z.ZodOptional<z.ZodString>;
|
|
362
368
|
after: z.ZodOptional<z.ZodString>;
|
|
363
369
|
}, z.core.$strict>>;
|