@intentius/chant 0.13.1 → 0.15.1
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 +45 -5
- package/dist/audit/catalog.d.ts.map +1 -1
- package/dist/audit/proof.d.ts +3 -0
- package/dist/audit/proof.d.ts.map +1 -1
- package/dist/audit/report-model.d.ts +4 -1
- package/dist/audit/report-model.d.ts.map +1 -1
- package/dist/audit/report.d.ts +3 -0
- package/dist/audit/report.d.ts.map +1 -1
- package/dist/audit/rules-doc.d.ts +8 -2
- package/dist/audit/rules-doc.d.ts.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/lexicon-rolling-upgrade.d.ts +37 -0
- package/dist/cli/commands/lexicon-rolling-upgrade.d.ts.map +1 -0
- package/dist/cli/commands/lexicon-surface-diff.d.ts +48 -0
- package/dist/cli/commands/lexicon-surface-diff.d.ts.map +1 -0
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/pinned-upgrade.d.ts +41 -0
- package/dist/cli/commands/pinned-upgrade.d.ts.map +1 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/components.d.ts +39 -0
- package/dist/cli/handlers/components.d.ts.map +1 -0
- package/dist/cli/handlers/dev.d.ts +3 -0
- package/dist/cli/handlers/dev.d.ts.map +1 -1
- package/dist/cli/handlers/graph.d.ts +4 -2
- package/dist/cli/handlers/graph.d.ts.map +1 -1
- package/dist/cli/handlers/misc.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts +49 -0
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +35 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/fetch.d.ts +22 -0
- package/dist/codegen/fetch.d.ts.map +1 -1
- package/dist/codegen/lexicon-regen.d.ts +110 -0
- package/dist/codegen/lexicon-regen.d.ts.map +1 -0
- package/dist/codegen/pinned-upgrade.d.ts +153 -0
- package/dist/codegen/pinned-upgrade.d.ts.map +1 -0
- package/dist/codegen/rolling-upgrade.d.ts +138 -0
- package/dist/codegen/rolling-upgrade.d.ts.map +1 -0
- package/dist/codegen/surface-snapshot.d.ts +173 -0
- package/dist/codegen/surface-snapshot.d.ts.map +1 -0
- package/dist/codegen/version-bump.d.ts +21 -0
- package/dist/codegen/version-bump.d.ts.map +1 -0
- package/dist/components/auto-release.d.ts +93 -0
- package/dist/components/auto-release.d.ts.map +1 -0
- package/dist/components/builders.d.ts +37 -0
- package/dist/components/builders.d.ts.map +1 -0
- package/dist/components/capability-plugin-loader.d.ts +111 -0
- package/dist/components/capability-plugin-loader.d.ts.map +1 -0
- package/dist/components/capability-plugin-schema.d.ts +24 -0
- package/dist/components/capability-plugin-schema.d.ts.map +1 -0
- package/dist/components/capability-plugin.d.ts +85 -0
- package/dist/components/capability-plugin.d.ts.map +1 -0
- package/dist/components/capability.d.ts +89 -0
- package/dist/components/capability.d.ts.map +1 -0
- package/dist/components/cli-support.d.ts +204 -0
- package/dist/components/cli-support.d.ts.map +1 -0
- package/dist/components/component.d.ts +179 -0
- package/dist/components/component.d.ts.map +1 -0
- package/dist/components/config-defaults.d.ts +41 -0
- package/dist/components/config-defaults.d.ts.map +1 -0
- package/dist/components/discover.d.ts +60 -0
- package/dist/components/discover.d.ts.map +1 -0
- package/dist/components/driver-output.d.ts +20 -0
- package/dist/components/driver-output.d.ts.map +1 -0
- package/dist/components/driver.d.ts +209 -0
- package/dist/components/driver.d.ts.map +1 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/manifest-persistence.d.ts +79 -0
- package/dist/components/manifest-persistence.d.ts.map +1 -0
- package/dist/components/pilots/alb-ecs.pilot.d.ts +27 -0
- package/dist/components/pilots/alb-ecs.pilot.d.ts.map +1 -0
- package/dist/components/pilots/dynamodb.pilot.d.ts +22 -0
- package/dist/components/pilots/dynamodb.pilot.d.ts.map +1 -0
- package/dist/components/pilots/jar-emr.pilot.d.ts +37 -0
- package/dist/components/pilots/jar-emr.pilot.d.ts.map +1 -0
- package/dist/components/pilots/lambda.pilot.d.ts +35 -0
- package/dist/components/pilots/lambda.pilot.d.ts.map +1 -0
- package/dist/components/pilots/neo4j-fanout.pilot.d.ts +17 -0
- package/dist/components/pilots/neo4j-fanout.pilot.d.ts.map +1 -0
- package/dist/components/pilots/project.d.ts +13 -0
- package/dist/components/pilots/project.d.ts.map +1 -0
- package/dist/components/presets/ecs-fargate.d.ts +59 -0
- package/dist/components/presets/ecs-fargate.d.ts.map +1 -0
- package/dist/components/presets/index.d.ts +29 -0
- package/dist/components/presets/index.d.ts.map +1 -0
- package/dist/components/presets/lambda.d.ts +35 -0
- package/dist/components/presets/lambda.d.ts.map +1 -0
- package/dist/components/presets/single-host-compose.d.ts +43 -0
- package/dist/components/presets/single-host-compose.d.ts.map +1 -0
- package/dist/components/registry.d.ts +29 -0
- package/dist/components/registry.d.ts.map +1 -0
- package/dist/components/starter-plugin.d.ts +51 -0
- package/dist/components/starter-plugin.d.ts.map +1 -0
- package/dist/components/temporal-codegen-loader.d.ts +27 -0
- package/dist/components/temporal-codegen-loader.d.ts.map +1 -0
- package/dist/components/verbs/__tests__/mock-cloud-executor.d.ts +35 -0
- package/dist/components/verbs/__tests__/mock-cloud-executor.d.ts.map +1 -0
- package/dist/components/verbs/__tests__/mock-process-runner.d.ts +45 -0
- package/dist/components/verbs/__tests__/mock-process-runner.d.ts.map +1 -0
- package/dist/components/verbs/__tests__/mock-sbom-generator.d.ts +33 -0
- package/dist/components/verbs/__tests__/mock-sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/bom-writer.d.ts +155 -0
- package/dist/components/verbs/bom-writer.d.ts.map +1 -0
- package/dist/components/verbs/build-archive.d.ts +205 -0
- package/dist/components/verbs/build-archive.d.ts.map +1 -0
- package/dist/components/verbs/build.d.ts +150 -0
- package/dist/components/verbs/build.d.ts.map +1 -0
- package/dist/components/verbs/cloud-executor.d.ts +88 -0
- package/dist/components/verbs/cloud-executor.d.ts.map +1 -0
- package/dist/components/verbs/component-bom.d.ts +103 -0
- package/dist/components/verbs/component-bom.d.ts.map +1 -0
- package/dist/components/verbs/index.d.ts +49 -0
- package/dist/components/verbs/index.d.ts.map +1 -0
- package/dist/components/verbs/license-policy.d.ts +56 -0
- package/dist/components/verbs/license-policy.d.ts.map +1 -0
- package/dist/components/verbs/lockfile-sbom-generator.d.ts +81 -0
- package/dist/components/verbs/lockfile-sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/process-runner.d.ts +64 -0
- package/dist/components/verbs/process-runner.d.ts.map +1 -0
- package/dist/components/verbs/reproducibility.d.ts +80 -0
- package/dist/components/verbs/reproducibility.d.ts.map +1 -0
- package/dist/components/verbs/sbom-generator.d.ts +157 -0
- package/dist/components/verbs/sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/sbom.d.ts +79 -0
- package/dist/components/verbs/sbom.d.ts.map +1 -0
- package/dist/components/verbs/shell.d.ts +35 -0
- package/dist/components/verbs/shell.d.ts.map +1 -0
- package/dist/components/verbs/sign.d.ts +222 -0
- package/dist/components/verbs/sign.d.ts.map +1 -0
- package/dist/components/verbs/stub.d.ts +18 -0
- package/dist/components/verbs/stub.d.ts.map +1 -0
- package/dist/components/verbs/tool-sbom-generator.d.ts +51 -0
- package/dist/components/verbs/tool-sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/verify.d.ts +106 -0
- package/dist/components/verbs/verify.d.ts.map +1 -0
- package/dist/components/verbs/vex.d.ts +65 -0
- package/dist/components/verbs/vex.d.ts.map +1 -0
- package/dist/components/verbs/vuln-gate.d.ts +91 -0
- package/dist/components/verbs/vuln-gate.d.ts.map +1 -0
- package/dist/components/verbs/vuln-scan.d.ts +116 -0
- package/dist/components/verbs/vuln-scan.d.ts.map +1 -0
- package/dist/components/verbs/wait-verify.d.ts +85 -0
- package/dist/components/verbs/wait-verify.d.ts.map +1 -0
- package/dist/config.d.ts +205 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lexicon.d.ts +78 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/build-ledger-store.d.ts +121 -0
- package/dist/lifecycle/build-ledger-store.d.ts.map +1 -0
- package/dist/lifecycle/build-ledger.d.ts +225 -0
- package/dist/lifecycle/build-ledger.d.ts.map +1 -0
- package/dist/lifecycle/git.d.ts +84 -0
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +5 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/oras-referrer-lookup.d.ts +41 -0
- package/dist/lifecycle/oras-referrer-lookup.d.ts.map +1 -0
- package/dist/lifecycle/release-ledger.d.ts +122 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -0
- package/dist/lifecycle/status.d.ts +150 -0
- package/dist/lifecycle/status.d.ts.map +1 -0
- package/dist/lint/component-checks.d.ts +95 -0
- package/dist/lint/component-checks.d.ts.map +1 -0
- package/dist/lint/engine.d.ts +23 -0
- package/dist/lint/engine.d.ts.map +1 -1
- package/dist/lint/presets/strict.json +8 -1
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-a.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-a.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-b.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-b.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/fail/orphan-lib.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/fail/orphan-lib.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/emr-job.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/emr-job.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/jar-lib.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/jar-lib.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/fail/search-service.component.d.ts +10 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/fail/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/jar-lib.component.d.ts +3 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/jar-lib.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/fail/migrator.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/fail/migrator.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/migrator.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/migrator.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/orders-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/fail/neo4j-cluster.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/fail/neo4j-cluster.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/fail/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/fail/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/pass/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/pass/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/fail/legacy-tool.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/fail/legacy-tool.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/pass/legacy-tool.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/pass/legacy-tool.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/inventory-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/inventory-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/orders-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/orders-table.component.d.ts +3 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp001-publishes-never-applies.d.ts +20 -0
- package/dist/lint/rules/comp/comp001-publishes-never-applies.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp002-dangling-wiring-ref.d.ts +28 -0
- package/dist/lint/rules/comp/comp002-dangling-wiring-ref.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp003-mutating-no-rollback.d.ts +39 -0
- package/dist/lint/rules/comp/comp003-mutating-no-rollback.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts +37 -0
- package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp005-capability-kind-is-noun.d.ts +43 -0
- package/dist/lint/rules/comp/comp005-capability-kind-is-noun.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp006-shell-needs-reason.d.ts +22 -0
- package/dist/lint/rules/comp/comp006-shell-needs-reason.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp007-composition-sprawl.d.ts +33 -0
- package/dist/lint/rules/comp/comp007-composition-sprawl.d.ts.map +1 -0
- package/dist/lint/rules/comp/index.d.ts +18 -0
- package/dist/lint/rules/comp/index.d.ts.map +1 -0
- package/dist/lint/rules/comp/support.d.ts +71 -0
- package/dist/lint/rules/comp/support.d.ts.map +1 -0
- package/dist/lsp/lexicon-providers.d.ts.map +1 -1
- package/dist/op/activity-registry.d.ts +11 -6
- package/dist/op/activity-registry.d.ts.map +1 -1
- package/dist/op/activity-runtime.d.ts +24 -0
- package/dist/op/activity-runtime.d.ts.map +1 -0
- package/dist/op/builders.d.ts +59 -0
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/index.d.ts +2 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/ownership.d.ts +20 -14
- package/dist/ownership.d.ts.map +1 -1
- package/package.json +14 -1
- package/src/audit/catalog.test.ts +74 -22
- package/src/audit/catalog.ts +74 -471
- package/src/audit/proof.ts +4 -2
- package/src/audit/report-html.test.ts +14 -7
- package/src/audit/report-model.ts +20 -9
- package/src/audit/report.test.ts +36 -13
- package/src/audit/report.ts +2 -0
- package/src/audit/rules-doc.test.ts +8 -6
- package/src/audit/rules-doc.ts +13 -5
- package/src/cli/commands/audit.ts +23 -18
- package/src/cli/commands/component-lint.test.ts +158 -0
- package/src/cli/commands/doctor.test.ts +116 -2
- package/src/cli/commands/doctor.ts +46 -0
- package/src/cli/commands/lexicon-rolling-upgrade.ts +198 -0
- package/src/cli/commands/lexicon-surface-diff.test.ts +104 -0
- package/src/cli/commands/lexicon-surface-diff.ts +185 -0
- package/src/cli/commands/lint.ts +142 -1
- package/src/cli/commands/pinned-upgrade.ts +204 -0
- package/src/cli/handlers/build.ts +58 -1
- package/src/cli/handlers/components.test.ts +504 -0
- package/src/cli/handlers/components.ts +404 -0
- package/src/cli/handlers/dev.ts +60 -1
- package/src/cli/handlers/graph.ts +47 -2
- package/src/cli/handlers/misc.ts +45 -1
- package/src/cli/handlers/run.test.ts +967 -3
- package/src/cli/handlers/run.ts +618 -11
- package/src/cli/main.test.ts +66 -0
- package/src/cli/main.ts +105 -2
- package/src/cli/registry.ts +35 -0
- package/src/codegen/fetch.test.ts +84 -3
- package/src/codegen/fetch.ts +76 -2
- package/src/codegen/lexicon-regen.test.ts +298 -0
- package/src/codegen/lexicon-regen.ts +545 -0
- package/src/codegen/pinned-upgrade.test.ts +399 -0
- package/src/codegen/pinned-upgrade.ts +423 -0
- package/src/codegen/rolling-upgrade.test.ts +333 -0
- package/src/codegen/rolling-upgrade.ts +320 -0
- package/src/codegen/surface-snapshot.test.ts +461 -0
- package/src/codegen/surface-snapshot.ts +546 -0
- package/src/codegen/version-bump.test.ts +47 -0
- package/src/codegen/version-bump.ts +39 -0
- package/src/components/README.md +130 -0
- package/src/components/SPRAWL-VALIDATION.md +181 -0
- package/src/components/__fixtures__/alb-ecs-service.json +51 -0
- package/src/components/__fixtures__/dynamodb-infra.json +32 -0
- package/src/components/__fixtures__/emr-job-consumer.json +26 -0
- package/src/components/__fixtures__/jar-lib-producer.json +16 -0
- package/src/components/__fixtures__/lambda-image-processor.json +28 -0
- package/src/components/__fixtures__/neo4j-fanout.json +34 -0
- package/src/components/__fixtures__/single-host-compose.json +29 -0
- package/src/components/auto-release.test.ts +217 -0
- package/src/components/auto-release.ts +216 -0
- package/src/components/builders.test.ts +45 -0
- package/src/components/builders.ts +71 -0
- package/src/components/capability-plugin-loader.ts +218 -0
- package/src/components/capability-plugin-schema.ts +56 -0
- package/src/components/capability-plugin.test.ts +235 -0
- package/src/components/capability-plugin.ts +108 -0
- package/src/components/capability.ts +117 -0
- package/src/components/cli-support.test.ts +579 -0
- package/src/components/cli-support.ts +481 -0
- package/src/components/component-schema.test.ts +265 -0
- package/src/components/component.schema.json +235 -0
- package/src/components/component.test.ts +251 -0
- package/src/components/component.ts +255 -0
- package/src/components/config-defaults.test.ts +263 -0
- package/src/components/config-defaults.ts +145 -0
- package/src/components/discover.test.ts +352 -0
- package/src/components/discover.ts +167 -0
- package/src/components/driver-output.ts +71 -0
- package/src/components/driver.test.ts +638 -0
- package/src/components/driver.ts +690 -0
- package/src/components/index.ts +113 -0
- package/src/components/manifest-persistence.test.ts +152 -0
- package/src/components/manifest-persistence.ts +164 -0
- package/src/components/pilots/README.md +33 -0
- package/src/components/pilots/alb-ecs.pilot.ts +63 -0
- package/src/components/pilots/dynamodb.pilot.ts +59 -0
- package/src/components/pilots/jar-emr.pilot.ts +69 -0
- package/src/components/pilots/lambda.pilot.ts +55 -0
- package/src/components/pilots/neo4j-fanout.pilot.ts +92 -0
- package/src/components/pilots/pilots-lint-clean.test.ts +78 -0
- package/src/components/pilots/pilots.test.ts +126 -0
- package/src/components/pilots/project.ts +13 -0
- package/src/components/presets/comp007-reduction.test.ts +122 -0
- package/src/components/presets/ecs-fargate.test.ts +84 -0
- package/src/components/presets/ecs-fargate.ts +103 -0
- package/src/components/presets/index.ts +32 -0
- package/src/components/presets/lambda.test.ts +35 -0
- package/src/components/presets/lambda.ts +53 -0
- package/src/components/presets/single-host-compose.test.ts +65 -0
- package/src/components/presets/single-host-compose.ts +64 -0
- package/src/components/registry.test.ts +112 -0
- package/src/components/registry.ts +37 -0
- package/src/components/starter-plugin.ts +105 -0
- package/src/components/temporal-codegen-loader.ts +41 -0
- package/src/components/verbs/__fixtures__/package-lock.json +45 -0
- package/src/components/verbs/__fixtures__/pom.xml +37 -0
- package/src/components/verbs/__fixtures__/schemas/cyclonedx-1.5.schema.json +3800 -0
- package/src/components/verbs/__fixtures__/schemas/cyclonedx-spdx-license.schema.json +621 -0
- package/src/components/verbs/__fixtures__/schemas/jsf-0.82.schema.json +240 -0
- package/src/components/verbs/__fixtures__/schemas/spdx-2.3.schema.json +740 -0
- package/src/components/verbs/__tests__/mock-cloud-executor.ts +102 -0
- package/src/components/verbs/__tests__/mock-process-runner.ts +79 -0
- package/src/components/verbs/__tests__/mock-sbom-generator.ts +85 -0
- package/src/components/verbs/bom-writer.test.ts +331 -0
- package/src/components/verbs/bom-writer.ts +386 -0
- package/src/components/verbs/build-archive.test.ts +251 -0
- package/src/components/verbs/build-archive.ts +296 -0
- package/src/components/verbs/build.test.ts +222 -0
- package/src/components/verbs/build.ts +252 -0
- package/src/components/verbs/cloud-executor.ts +181 -0
- package/src/components/verbs/component-bom.test.ts +219 -0
- package/src/components/verbs/component-bom.ts +189 -0
- package/src/components/verbs/index.ts +49 -0
- package/src/components/verbs/license-policy.ts +115 -0
- package/src/components/verbs/lockfile-sbom-generator.test.ts +195 -0
- package/src/components/verbs/lockfile-sbom-generator.ts +236 -0
- package/src/components/verbs/process-runner.test.ts +79 -0
- package/src/components/verbs/process-runner.ts +113 -0
- package/src/components/verbs/reproducibility.test.ts +24 -0
- package/src/components/verbs/reproducibility.ts +100 -0
- package/src/components/verbs/sbom-generator.test.ts +96 -0
- package/src/components/verbs/sbom-generator.ts +209 -0
- package/src/components/verbs/sbom.test.ts +184 -0
- package/src/components/verbs/sbom.ts +152 -0
- package/src/components/verbs/shell.test.ts +36 -0
- package/src/components/verbs/shell.ts +51 -0
- package/src/components/verbs/sign.test.ts +210 -0
- package/src/components/verbs/sign.ts +350 -0
- package/src/components/verbs/stub.ts +34 -0
- package/src/components/verbs/tool-sbom-generator.test.ts +194 -0
- package/src/components/verbs/tool-sbom-generator.ts +192 -0
- package/src/components/verbs/verify.test.ts +159 -0
- package/src/components/verbs/verify.ts +179 -0
- package/src/components/verbs/vex.ts +182 -0
- package/src/components/verbs/vuln-gate.test.ts +201 -0
- package/src/components/verbs/vuln-gate.ts +170 -0
- package/src/components/verbs/vuln-scan.test.ts +145 -0
- package/src/components/verbs/vuln-scan.ts +266 -0
- package/src/components/verbs/wait-verify.test.ts +111 -0
- package/src/components/verbs/wait-verify.ts +171 -0
- package/src/config.test.ts +74 -1
- package/src/config.ts +219 -0
- package/src/index.ts +32 -0
- package/src/lexicon.ts +88 -0
- package/src/lifecycle/build-ledger-store.test.ts +217 -0
- package/src/lifecycle/build-ledger-store.ts +165 -0
- package/src/lifecycle/build-ledger.test.ts +349 -0
- package/src/lifecycle/build-ledger.ts +305 -0
- package/src/lifecycle/git.test.ts +118 -0
- package/src/lifecycle/git.ts +149 -14
- package/src/lifecycle/index.ts +5 -0
- package/src/lifecycle/oras-referrer-lookup.test.ts +116 -0
- package/src/lifecycle/oras-referrer-lookup.ts +110 -0
- package/src/lifecycle/release-ledger.test.ts +209 -0
- package/src/lifecycle/release-ledger.ts +185 -0
- package/src/lifecycle/status.test.ts +330 -0
- package/src/lifecycle/status.ts +278 -0
- package/src/lint/component-checks.ts +148 -0
- package/src/lint/config.test.ts +21 -0
- package/src/lint/engine.ts +11 -2
- package/src/lint/presets/relaxed.json +8 -1
- package/src/lint/presets/strict.json +8 -1
- package/src/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-a.component.ts +9 -0
- package/src/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-b.component.ts +9 -0
- package/src/lint/rules/__fixtures__/comp/comp001/fail/orphan-lib.component.ts +11 -0
- package/src/lint/rules/__fixtures__/comp/comp001/pass/emr-job.component.ts +13 -0
- package/src/lint/rules/__fixtures__/comp/comp001/pass/jar-lib.component.ts +11 -0
- package/src/lint/rules/__fixtures__/comp/comp002/fail/search-service.component.ts +27 -0
- package/src/lint/rules/__fixtures__/comp/comp002/pass/jar-lib.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp002/pass/search-service.component.ts +23 -0
- package/src/lint/rules/__fixtures__/comp/comp003/fail/migrator.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp003/pass/migrator.component.ts +19 -0
- package/src/lint/rules/__fixtures__/comp/comp003/pass/orders-table.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp004/fail/neo4j-cluster.component.ts +20 -0
- package/src/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.ts +23 -0
- package/src/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp005/fail/search-service.component.ts +14 -0
- package/src/lint/rules/__fixtures__/comp/comp005/pass/search-service.component.ts +18 -0
- package/src/lint/rules/__fixtures__/comp/comp006/fail/legacy-tool.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp006/pass/legacy-tool.component.ts +14 -0
- package/src/lint/rules/__fixtures__/comp/comp007/fail/inventory-table.component.ts +13 -0
- package/src/lint/rules/__fixtures__/comp/comp007/fail/orders-table.component.ts +13 -0
- package/src/lint/rules/__fixtures__/comp/comp007/pass/orders-table.component.ts +12 -0
- package/src/lint/rules/__fixtures__/comp/comp007/pass/search-service.component.ts +18 -0
- package/src/lint/rules/comp/comp.test.ts +378 -0
- package/src/lint/rules/comp/comp001-publishes-never-applies.ts +78 -0
- package/src/lint/rules/comp/comp002-dangling-wiring-ref.ts +94 -0
- package/src/lint/rules/comp/comp003-mutating-no-rollback.ts +115 -0
- package/src/lint/rules/comp/comp004-gate-needs-temporal.ts +66 -0
- package/src/lint/rules/comp/comp005-capability-kind-is-noun.ts +113 -0
- package/src/lint/rules/comp/comp006-shell-needs-reason.ts +55 -0
- package/src/lint/rules/comp/comp007-composition-sprawl.ts +71 -0
- package/src/lint/rules/comp/index.ts +37 -0
- package/src/lint/rules/comp/support.ts +173 -0
- package/src/lsp/lexicon-providers.test.ts +55 -0
- package/src/lsp/lexicon-providers.ts +13 -3
- package/src/op/activity-registry.test.ts +38 -0
- package/src/op/activity-registry.ts +31 -12
- package/src/op/activity-runtime.ts +73 -0
- package/src/op/builders.ts +99 -0
- package/src/op/index.ts +3 -1
- package/src/ownership.test.ts +24 -26
- package/src/ownership.ts +26 -38
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component composition checks — the COMP* rule family (#562, epic #551).
|
|
3
|
+
*
|
|
4
|
+
* COR/EVL rules (./rule.ts, ./engine.ts) check one `ts.SourceFile`'s AST in
|
|
5
|
+
* isolation, synchronously — no execution, no cross-file knowledge. A COMP*
|
|
6
|
+
* rule cannot work that way: "publishes but never applies", "`imageRef`
|
|
7
|
+
* points at a nonexistent phase", and "identical composition repeated across
|
|
8
|
+
* components" are all properties of the *discovered component graph*, which
|
|
9
|
+
* only exists after `*.component.ts` files are actually imported (mirroring
|
|
10
|
+
* `../components/discover.ts`'s `discoverComponents`, itself async for the
|
|
11
|
+
* same reason `../discovery/index.ts`'s `discover()` is).
|
|
12
|
+
*
|
|
13
|
+
* Rather than stretch `LintRule.check(context)` (sync, single-file, AST-only)
|
|
14
|
+
* to cover this, COMP* rules follow the precedent chant already has for
|
|
15
|
+
* "check something that needs real, resolved, whole-project data":
|
|
16
|
+
* `./post-synth.ts`'s `PostSynthCheck`/`PostSynthContext`/`runPostSynthChecks`,
|
|
17
|
+
* which wraps a real (async) build result for a sync `check(ctx)` call. This
|
|
18
|
+
* module is that same shape, one layer earlier in the pipeline — over the
|
|
19
|
+
* discovered `Component` graph instead of serialized resource output — so
|
|
20
|
+
* `chant lint` (not just `chant build`) can run it. See
|
|
21
|
+
* ../components/discover.ts's own docstring for why `Component` gets a
|
|
22
|
+
* parallel, purpose-built convention rather than reusing `Declarable`'s.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import type { Component } from "../components/component";
|
|
26
|
+
import type { DiscoveredComponent } from "../components/discover";
|
|
27
|
+
import { discoverComponents } from "../components/discover";
|
|
28
|
+
import type { RollbackPolicy } from "../components/capability";
|
|
29
|
+
import type { Severity } from "./rule";
|
|
30
|
+
|
|
31
|
+
/** One discovered component, keyed by its declared name, with the file it came from. */
|
|
32
|
+
export interface ComponentCheckEntry {
|
|
33
|
+
component: Component;
|
|
34
|
+
filePath: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Context handed to a `ComponentCheck` — the whole discovered component graph for one project. */
|
|
38
|
+
export interface ComponentCheckContext {
|
|
39
|
+
/** Every discovered component, keyed by `component.name`. */
|
|
40
|
+
components: Map<string, ComponentCheckEntry>;
|
|
41
|
+
/**
|
|
42
|
+
* Every capability `kind` registered for this project — core's starter set
|
|
43
|
+
* plus whatever the active lexicons contribute (e.g. `cfn-deploy` when
|
|
44
|
+
* `lexicons: ["aws"]`). Supplied by the `chant lint` CLI, which builds the
|
|
45
|
+
* registry from the project's config; undefined when a check runs without a
|
|
46
|
+
* resolved registry (e.g. a direct unit test), in which case a rule should
|
|
47
|
+
* fall back to core's starter set. Rules that key off "is this a known verb"
|
|
48
|
+
* (e.g. COMP005) read this rather than hard-coding a verb list.
|
|
49
|
+
*/
|
|
50
|
+
knownKinds?: ReadonlySet<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Each registered verb's rollback disposition (`native`/`none-by-design`/
|
|
53
|
+
* `needs-opt-out`), derived from the project's capability registry the same
|
|
54
|
+
* way `knownKinds` is. Read by COMP003 instead of a hard-coded verb list;
|
|
55
|
+
* undefined when no registry was resolved (a check then treats every kind as
|
|
56
|
+
* `none-by-design`, i.e. flags nothing).
|
|
57
|
+
*/
|
|
58
|
+
rollbackPolicies?: ReadonlyMap<string, RollbackPolicy>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** A diagnostic from a component composition check. Shaped like `PostSynthDiagnostic`, plus a `file` so it can be merged into `LintDiagnostic`s and reported per-file like every other lint diagnostic. */
|
|
62
|
+
export interface ComponentCheckDiagnostic {
|
|
63
|
+
/** ID of the check that produced this diagnostic (e.g. "COMP001"). */
|
|
64
|
+
checkId: string;
|
|
65
|
+
severity: Severity;
|
|
66
|
+
message: string;
|
|
67
|
+
/** File the discovered component was declared in — where the diagnostic is reported. */
|
|
68
|
+
file: string;
|
|
69
|
+
/** The component name this diagnostic concerns. */
|
|
70
|
+
component: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** A composition-level lint check over the whole discovered component graph. */
|
|
74
|
+
export interface ComponentCheck {
|
|
75
|
+
/** Unique identifier, e.g. "COMP001". */
|
|
76
|
+
id: string;
|
|
77
|
+
description: string;
|
|
78
|
+
severity: Severity;
|
|
79
|
+
category: "correctness" | "style" | "performance" | "security";
|
|
80
|
+
/** Execute the check and return diagnostics. */
|
|
81
|
+
check(ctx: ComponentCheckContext): ComponentCheckDiagnostic[];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Discover every component under `path` and run every `ComponentCheck`
|
|
86
|
+
* against the resulting graph. Mirrors `runPostSynthChecks`'s shape
|
|
87
|
+
* (async discovery/build once, then every check runs sync over the result),
|
|
88
|
+
* except the input is `discoverComponents`'s result rather than a build's
|
|
89
|
+
* serialized output.
|
|
90
|
+
*
|
|
91
|
+
* Discovery errors (e.g. a duplicate component name, a `*.component.ts` file
|
|
92
|
+
* that throws on import) are surfaced as a single synthetic diagnostic per
|
|
93
|
+
* error under the pseudo-check id "COMP000" rather than silently dropped —
|
|
94
|
+
* matching how `discoverComponents`'s caller (`../components/cli-support.ts`)
|
|
95
|
+
* always surfaces `result.errors` rather than ignoring them.
|
|
96
|
+
*/
|
|
97
|
+
export async function runComponentChecks(
|
|
98
|
+
path: string,
|
|
99
|
+
checks: ComponentCheck[],
|
|
100
|
+
registryContext?: Pick<ComponentCheckContext, "knownKinds" | "rollbackPolicies">,
|
|
101
|
+
): Promise<ComponentCheckDiagnostic[]> {
|
|
102
|
+
if (checks.length === 0) return [];
|
|
103
|
+
|
|
104
|
+
const result = await discoverComponents(path);
|
|
105
|
+
const diagnostics: ComponentCheckDiagnostic[] = [];
|
|
106
|
+
|
|
107
|
+
for (const err of result.errors) {
|
|
108
|
+
diagnostics.push({
|
|
109
|
+
checkId: "COMP000",
|
|
110
|
+
severity: "error",
|
|
111
|
+
message: `Component discovery error: ${err.message}`,
|
|
112
|
+
file: err.file,
|
|
113
|
+
component: "(unknown)",
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const components = new Map<string, ComponentCheckEntry>();
|
|
118
|
+
for (const [name, discovered] of result.components) {
|
|
119
|
+
components.set(name, { component: discovered.component, filePath: discovered.filePath });
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const ctx: ComponentCheckContext = {
|
|
123
|
+
components,
|
|
124
|
+
knownKinds: registryContext?.knownKinds,
|
|
125
|
+
rollbackPolicies: registryContext?.rollbackPolicies,
|
|
126
|
+
};
|
|
127
|
+
for (const check of checks) {
|
|
128
|
+
diagnostics.push(...check.check(ctx));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return diagnostics;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** Structural type guard, mirroring `isPostSynthCheck` — used by rule discovery/registry code. */
|
|
135
|
+
export function isComponentCheck(value: unknown): value is ComponentCheck {
|
|
136
|
+
if (typeof value !== "object" || value === null) return false;
|
|
137
|
+
const v = value as Record<string, unknown>;
|
|
138
|
+
return (
|
|
139
|
+
typeof v.id === "string" &&
|
|
140
|
+
typeof v.description === "string" &&
|
|
141
|
+
typeof v.severity === "string" &&
|
|
142
|
+
typeof v.category === "string" &&
|
|
143
|
+
typeof v.check === "function"
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** Re-exported for rule modules that need the discovered shape without importing `../components/discover` directly. */
|
|
148
|
+
export type { DiscoveredComponent };
|
package/src/lint/config.test.ts
CHANGED
|
@@ -415,6 +415,13 @@ describe("loadConfig", () => {
|
|
|
415
415
|
COR013: "info",
|
|
416
416
|
COR014: "warning",
|
|
417
417
|
COR015: "warning",
|
|
418
|
+
COMP001: "error",
|
|
419
|
+
COMP002: "error",
|
|
420
|
+
COMP003: "error",
|
|
421
|
+
COMP004: "error",
|
|
422
|
+
COMP005: "error",
|
|
423
|
+
COMP006: "error",
|
|
424
|
+
COMP007: "warning",
|
|
418
425
|
});
|
|
419
426
|
});
|
|
420
427
|
|
|
@@ -458,6 +465,13 @@ describe("loadConfig", () => {
|
|
|
458
465
|
COR013: "off",
|
|
459
466
|
COR014: "off",
|
|
460
467
|
COR015: "off",
|
|
468
|
+
COMP001: "warning",
|
|
469
|
+
COMP002: "warning",
|
|
470
|
+
COMP003: "off",
|
|
471
|
+
COMP004: "warning",
|
|
472
|
+
COMP005: "off",
|
|
473
|
+
COMP006: "off",
|
|
474
|
+
COMP007: "off",
|
|
461
475
|
});
|
|
462
476
|
});
|
|
463
477
|
|
|
@@ -488,6 +502,13 @@ describe("loadConfig", () => {
|
|
|
488
502
|
COR013: "info",
|
|
489
503
|
COR014: "warning",
|
|
490
504
|
COR015: "warning",
|
|
505
|
+
COMP001: "error",
|
|
506
|
+
COMP002: "error",
|
|
507
|
+
COMP003: "error",
|
|
508
|
+
COMP004: "error",
|
|
509
|
+
COMP005: "error",
|
|
510
|
+
COMP006: "error",
|
|
511
|
+
COMP007: "warning",
|
|
491
512
|
});
|
|
492
513
|
});
|
|
493
514
|
|
package/src/lint/engine.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface LintRunResult {
|
|
|
15
15
|
/**
|
|
16
16
|
* Represents a disable directive found in source code comments
|
|
17
17
|
*/
|
|
18
|
-
interface DisableDirective {
|
|
18
|
+
export interface DisableDirective {
|
|
19
19
|
/** Line number where the directive appears (1-based) */
|
|
20
20
|
line: number;
|
|
21
21
|
/** Type of directive */
|
|
@@ -90,7 +90,16 @@ function parseDirectiveText(afterDirective: string | undefined): {
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Parse `chant-disable`/`chant-disable-line`/`chant-disable-next-line`
|
|
95
|
+
* comments out of raw file content. Exported (in addition to being used
|
|
96
|
+
* internally by `runLint`) so other diagnostic sources that are not plain
|
|
97
|
+
* per-file AST `LintRule`s — e.g. ../lint/rules/comp's component composition
|
|
98
|
+
* checks, which produce whole-component diagnostics rather than
|
|
99
|
+
* exact-line ones — can still honor at least the file-level directive form
|
|
100
|
+
* without duplicating this parsing.
|
|
101
|
+
*/
|
|
102
|
+
export function parseDisableComments(content: string): DisableDirective[] {
|
|
94
103
|
const directives: DisableDirective[] = [];
|
|
95
104
|
const lines = content.split("\n");
|
|
96
105
|
|
|
@@ -14,6 +14,13 @@
|
|
|
14
14
|
"COR012": "off",
|
|
15
15
|
"COR013": "off",
|
|
16
16
|
"COR014": "off",
|
|
17
|
-
"COR015": "off"
|
|
17
|
+
"COR015": "off",
|
|
18
|
+
"COMP001": "warning",
|
|
19
|
+
"COMP002": "warning",
|
|
20
|
+
"COMP003": "off",
|
|
21
|
+
"COMP004": "warning",
|
|
22
|
+
"COMP005": "off",
|
|
23
|
+
"COMP006": "off",
|
|
24
|
+
"COMP007": "off"
|
|
18
25
|
}
|
|
19
26
|
}
|
|
@@ -14,6 +14,13 @@
|
|
|
14
14
|
"COR012": "warning",
|
|
15
15
|
"COR013": "info",
|
|
16
16
|
"COR014": "warning",
|
|
17
|
-
"COR015": "warning"
|
|
17
|
+
"COR015": "warning",
|
|
18
|
+
"COMP001": "error",
|
|
19
|
+
"COMP002": "error",
|
|
20
|
+
"COMP003": "error",
|
|
21
|
+
"COMP004": "error",
|
|
22
|
+
"COMP005": "error",
|
|
23
|
+
"COMP006": "error",
|
|
24
|
+
"COMP007": "warning"
|
|
18
25
|
}
|
|
19
26
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Component } from "../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** Duplicate component name (see broken-b.component.ts) — exercises the COMP000 discovery-error surfacing path in component-checks.ts. */
|
|
5
|
+
export const dup: Component = {
|
|
6
|
+
name: "duplicate-name",
|
|
7
|
+
dependsOn: [],
|
|
8
|
+
deploy: [phase("Apply", [{ kind: "cfn-deploy", template: "a.json" }])],
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Component } from "../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** Duplicate component name (see broken-a.component.ts) — exercises the COMP000 discovery-error surfacing path in component-checks.ts. */
|
|
5
|
+
export const dup: Component = {
|
|
6
|
+
name: "duplicate-name",
|
|
7
|
+
dependsOn: [],
|
|
8
|
+
deploy: [phase("Apply", [{ kind: "cfn-deploy", template: "b.json" }])],
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP001 fail case: publishes an artifact nothing ever consumes — no other component references it, and no later step in this component references the Publish phase's output. */
|
|
5
|
+
export const orphanLib: Component = {
|
|
6
|
+
name: "orphan-lib",
|
|
7
|
+
archetype: "producer-library",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
build: { kind: "jvm-build", context: ".", into: "archive" },
|
|
10
|
+
deploy: [phase("Publish", [{ kind: "publish-artifact", from: "archive", to: "$env.s3" }])],
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** Consumer that references jar-lib's published artifact — makes jar-lib's publish step "consumed" for COMP001. */
|
|
5
|
+
export const emrJob: Component = {
|
|
6
|
+
name: "emr-job",
|
|
7
|
+
archetype: "infra",
|
|
8
|
+
dependsOn: ["jar-lib"],
|
|
9
|
+
deploy: [
|
|
10
|
+
phase("Submit", [{ kind: "emr-start-job-run", jar: "@jar-lib.publish.uri", args: ["--input", "$env.inputPath"] }]),
|
|
11
|
+
phase("Verify", [{ kind: "wait-job", runId: "@Submit.runId" }]),
|
|
12
|
+
],
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** Producer whose published artifact IS consumed downstream (by emr-job.component.ts) — COMP001 must not flag this. */
|
|
5
|
+
export const jarLib: Component = {
|
|
6
|
+
name: "jar-lib",
|
|
7
|
+
archetype: "producer-library",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
build: { kind: "jvm-build", context: ".", into: "archive" },
|
|
10
|
+
deploy: [phase("Publish", [{ kind: "publish-artifact", from: "archive", to: "$env.s3" }])],
|
|
11
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* COMP002 fail case: two dangling wiring references.
|
|
6
|
+
* - "@Build.digest" names a phase ("Build") that does not exist in this
|
|
7
|
+
* component's deploy (the actual phase is named "Publish").
|
|
8
|
+
* - "@missing-lib.publish.uri" names a component that was never discovered
|
|
9
|
+
* at all in this fixture directory.
|
|
10
|
+
*/
|
|
11
|
+
export const searchService: Component = {
|
|
12
|
+
name: "search-service",
|
|
13
|
+
archetype: "service",
|
|
14
|
+
dependsOn: [],
|
|
15
|
+
build: { kind: "docker-build", context: ".", into: "archive" },
|
|
16
|
+
deploy: [
|
|
17
|
+
phase("Publish", [{ kind: "publish-image", from: "archive", to: "$env.registry" }]),
|
|
18
|
+
phase("Apply", [
|
|
19
|
+
{
|
|
20
|
+
kind: "cfn-deploy",
|
|
21
|
+
template: "archive:search.template.json",
|
|
22
|
+
imageRef: "@Build.digest",
|
|
23
|
+
inputs: { jarUri: "@missing-lib.publish.uri" },
|
|
24
|
+
},
|
|
25
|
+
]),
|
|
26
|
+
],
|
|
27
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
export const jarLib: Component = {
|
|
5
|
+
name: "jar-lib",
|
|
6
|
+
archetype: "producer-library",
|
|
7
|
+
dependsOn: [],
|
|
8
|
+
build: { kind: "jvm-build", context: ".", into: "archive" },
|
|
9
|
+
deploy: [phase("Publish", [{ kind: "publish-artifact", from: "archive", to: "$env.s3" }])],
|
|
10
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP002 pass case: every wiring reference resolves — "@Publish.digest" points at this component's own "Publish" phase, and "@jar-lib.publish.uri" points at a discovered component listed in dependsOn. */
|
|
5
|
+
export const searchService: Component = {
|
|
6
|
+
name: "search-service",
|
|
7
|
+
archetype: "service",
|
|
8
|
+
dependsOn: ["jar-lib"],
|
|
9
|
+
build: { kind: "docker-build", context: ".", into: "archive" },
|
|
10
|
+
deploy: [
|
|
11
|
+
phase("Publish", [{ kind: "publish-image", from: "archive", to: "$env.registry" }]),
|
|
12
|
+
phase("Apply", [
|
|
13
|
+
{
|
|
14
|
+
kind: "cfn-deploy",
|
|
15
|
+
template: "archive:search.template.json",
|
|
16
|
+
imageRef: "@Publish.digest",
|
|
17
|
+
inputs: { jarUri: "@jar-lib.publish.uri" },
|
|
18
|
+
},
|
|
19
|
+
{ kind: "ecs-update-service", cluster: "$env.cluster", service: "search" },
|
|
20
|
+
]),
|
|
21
|
+
phase("Verify", [{ kind: "wait-steady-state", service: "search" }]),
|
|
22
|
+
],
|
|
23
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP003 fail case: "run-migration" has no native rollback, no noRollback opt-out, no component-level rollback, and no compensation sibling step. */
|
|
5
|
+
export const migrator: Component = {
|
|
6
|
+
name: "migrator",
|
|
7
|
+
archetype: "infra",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
deploy: [phase("Apply", [{ kind: "run-migration", tool: "flyway", target: "ecs-task:migrate" }])],
|
|
10
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP003 pass case: "run-migration" is a needs-opt-out kind, but declares an explicit noRollback reason. */
|
|
5
|
+
export const migrator: Component = {
|
|
6
|
+
name: "migrator",
|
|
7
|
+
archetype: "infra",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
deploy: [
|
|
10
|
+
phase("Apply", [
|
|
11
|
+
{
|
|
12
|
+
kind: "run-migration",
|
|
13
|
+
tool: "flyway",
|
|
14
|
+
target: "ecs-task:migrate",
|
|
15
|
+
noRollback: "forward-only schema migration; rolling back would drop columns already backfilled",
|
|
16
|
+
},
|
|
17
|
+
]),
|
|
18
|
+
],
|
|
19
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP003 pass case: cfn-deploy has a known native rollback, so no opt-out is required. */
|
|
5
|
+
export const ordersTable: Component = {
|
|
6
|
+
name: "orders-table",
|
|
7
|
+
archetype: "infra",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
deploy: [phase("Apply", [{ kind: "cfn-deploy", template: "archive:orders-table.template.json", onReplace: "block" }])],
|
|
10
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { gate, phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP004 fail case: a gate step with no disable directive — flagged, since the local executor cannot run it. */
|
|
5
|
+
export const neo4jCluster: Component = {
|
|
6
|
+
name: "neo4j-cluster",
|
|
7
|
+
archetype: "infra",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
deploy: [
|
|
10
|
+
phase("Seed", [
|
|
11
|
+
{ kind: "cfn-deploy", template: "archive:neo4j-az0-0.template.json" },
|
|
12
|
+
{ kind: "wait-cluster-healthy", size: 1 },
|
|
13
|
+
]),
|
|
14
|
+
phase("Node 1", [
|
|
15
|
+
gate("approve-neo4j-node-1", { description: "Confirm the seed node is healthy before rolling to node 1" }),
|
|
16
|
+
{ kind: "cfn-deploy", template: "archive:neo4j-1.template.json" },
|
|
17
|
+
{ kind: "wait-cluster-healthy", quorum: true },
|
|
18
|
+
]),
|
|
19
|
+
],
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// chant-disable COMP004 -- graduates to `chant run --temporal`; the Node 1 gate is a deliberate human-approval wait, see docs/components/orchestration.mdx
|
|
2
|
+
import type { Component } from "../../../../../../components/component";
|
|
3
|
+
import { gate, phase } from "../../../../../../components/component";
|
|
4
|
+
|
|
5
|
+
/** COMP004 pass case: a genuine gate, opted out via a file-level disable directive with a documented reason — the intended path for a component that graduates to the Temporal backend. */
|
|
6
|
+
export const neo4jCluster: Component = {
|
|
7
|
+
name: "neo4j-cluster",
|
|
8
|
+
archetype: "infra",
|
|
9
|
+
dependsOn: [],
|
|
10
|
+
deploy: [
|
|
11
|
+
phase("Seed", [
|
|
12
|
+
{ kind: "cfn-deploy", template: "archive:neo4j-az0-0.template.json" },
|
|
13
|
+
{ kind: "code-deploy", instance: 0, revision: "@Seed.templateUri" },
|
|
14
|
+
{ kind: "wait-cluster-healthy", size: 1 },
|
|
15
|
+
]),
|
|
16
|
+
phase("Node 1", [
|
|
17
|
+
gate("approve-neo4j-node-1", { description: "Confirm the seed node is healthy before rolling to node 1", timeout: "24h" }),
|
|
18
|
+
{ kind: "cfn-deploy", template: "archive:neo4j-1.template.json" },
|
|
19
|
+
{ kind: "code-deploy", instance: 1, revision: "@Seed.templateUri" },
|
|
20
|
+
{ kind: "wait-cluster-healthy", quorum: true },
|
|
21
|
+
]),
|
|
22
|
+
],
|
|
23
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP004 pass case: no gate step anywhere — nothing requires the durable backend. */
|
|
5
|
+
export const ordersTable: Component = {
|
|
6
|
+
name: "orders-table",
|
|
7
|
+
archetype: "infra",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
deploy: [phase("Apply", [{ kind: "cfn-deploy", template: "archive:orders-table.template.json" }])],
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP005 fail case: the Apply step's kind is named after this very component ("deploy-search-service") — a noun, not an operation. */
|
|
5
|
+
export const searchService: Component = {
|
|
6
|
+
name: "search-service",
|
|
7
|
+
archetype: "service",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
build: { kind: "docker-build", context: ".", into: "archive" },
|
|
10
|
+
deploy: [
|
|
11
|
+
phase("Publish", [{ kind: "publish-image", from: "archive", to: "$env.registry" }]),
|
|
12
|
+
phase("Apply", [{ kind: "deploy-search-service", imageRef: "@Publish.digest" }]),
|
|
13
|
+
],
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP005 pass case: every step kind is a verb (an operation), never the component's own name. */
|
|
5
|
+
export const searchService: Component = {
|
|
6
|
+
name: "search-service",
|
|
7
|
+
archetype: "service",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
build: { kind: "docker-build", context: ".", into: "archive" },
|
|
10
|
+
deploy: [
|
|
11
|
+
phase("Publish", [{ kind: "publish-image", from: "archive", to: "$env.registry" }]),
|
|
12
|
+
phase("Apply", [
|
|
13
|
+
{ kind: "cfn-deploy", template: "archive:search.template.json", imageRef: "@Publish.digest" },
|
|
14
|
+
{ kind: "ecs-update-service", cluster: "$env.cluster", service: "search" },
|
|
15
|
+
]),
|
|
16
|
+
phase("Verify", [{ kind: "wait-steady-state", service: "search" }]),
|
|
17
|
+
],
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP006 fail case: a raw "shell" step with no "reason" at all. */
|
|
5
|
+
export const legacyTool: Component = {
|
|
6
|
+
name: "legacy-tool",
|
|
7
|
+
archetype: "infra",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
deploy: [phase("Apply", [{ kind: "shell", cmd: "./legacy-deploy.sh" }])],
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP006 pass case: the "shell" escape hatch declares a non-empty reason. */
|
|
5
|
+
export const legacyTool: Component = {
|
|
6
|
+
name: "legacy-tool",
|
|
7
|
+
archetype: "infra",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
deploy: [
|
|
10
|
+
phase("Apply", [
|
|
11
|
+
{ kind: "shell", cmd: "./legacy-deploy.sh", reason: "no capability wraps this vendor's proprietary CLI yet" },
|
|
12
|
+
]),
|
|
13
|
+
],
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP007 fail case: identical phase/step-kind shape to orders-table.component.ts. */
|
|
5
|
+
export const inventoryTable: Component = {
|
|
6
|
+
name: "inventory-table",
|
|
7
|
+
archetype: "infra",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
deploy: [
|
|
10
|
+
phase("Apply", [{ kind: "cfn-deploy", template: "archive:inventory-table.template.json" }]),
|
|
11
|
+
phase("Verify", [{ kind: "wait-for-stack", stack: "inventory-table" }]),
|
|
12
|
+
],
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP007 fail case: identical phase/step-kind shape to inventory-table.component.ts — a declaration-sprawl hint (should reach for a preset). */
|
|
5
|
+
export const ordersTable: Component = {
|
|
6
|
+
name: "orders-table",
|
|
7
|
+
archetype: "infra",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
deploy: [
|
|
10
|
+
phase("Apply", [{ kind: "cfn-deploy", template: "archive:orders-table.template.json" }]),
|
|
11
|
+
phase("Verify", [{ kind: "wait-for-stack", stack: "orders-table" }]),
|
|
12
|
+
],
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
export const ordersTable: Component = {
|
|
5
|
+
name: "orders-table",
|
|
6
|
+
archetype: "infra",
|
|
7
|
+
dependsOn: [],
|
|
8
|
+
deploy: [
|
|
9
|
+
phase("Apply", [{ kind: "cfn-deploy", template: "archive:orders-table.template.json", onReplace: "block" }]),
|
|
10
|
+
phase("Verify", [{ kind: "wait-for-stack", stack: "orders-table" }]),
|
|
11
|
+
],
|
|
12
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Component } from "../../../../../../components/component";
|
|
2
|
+
import { phase } from "../../../../../../components/component";
|
|
3
|
+
|
|
4
|
+
/** COMP007 pass case: structurally distinct from orders-table.component.ts (service: build+publish+apply+verify vs. infra: apply+verify only) — no sprawl hint expected. */
|
|
5
|
+
export const searchService: Component = {
|
|
6
|
+
name: "search-service",
|
|
7
|
+
archetype: "service",
|
|
8
|
+
dependsOn: [],
|
|
9
|
+
build: { kind: "docker-build", context: ".", into: "archive" },
|
|
10
|
+
deploy: [
|
|
11
|
+
phase("Publish", [{ kind: "publish-image", from: "archive", to: "$env.registry" }]),
|
|
12
|
+
phase("Apply", [
|
|
13
|
+
{ kind: "cfn-deploy", template: "archive:search.template.json", imageRef: "@Publish.digest" },
|
|
14
|
+
{ kind: "ecs-update-service", cluster: "$env.cluster", service: "search" },
|
|
15
|
+
]),
|
|
16
|
+
phase("Verify", [{ kind: "wait-steady-state", service: "search" }]),
|
|
17
|
+
],
|
|
18
|
+
};
|