@intentius/chant 0.13.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/catalog.d.ts +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 +56 -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 +92 -0
- package/src/op/index.ts +3 -1
- package/src/ownership.test.ts +24 -26
- package/src/ownership.ts +26 -38
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI-facing helpers over component discovery (#560, epic #551) — kept
|
|
3
|
+
* separate from ../cli/commands/{list,describe}.ts and
|
|
4
|
+
* ../cli/handlers/graph.ts so those files stay thin dispatchers and the
|
|
5
|
+
* component-specific report shaping lives alongside the rest of the
|
|
6
|
+
* component subsystem, the same way ../op/discover.ts's results are shaped
|
|
7
|
+
* inline by its own CLI callers rather than a `cli` folder inside `op/`.
|
|
8
|
+
*
|
|
9
|
+
* Surfaces components in the three places the issue asks for:
|
|
10
|
+
* - `chant list --components` — inventory (mirrors `ListEntity`/`listCommand`).
|
|
11
|
+
* - `chant describe <name> --components` — one component's full JSON contract
|
|
12
|
+
* projection (mirrors `describeCommand`'s effective-config view).
|
|
13
|
+
* - `chant graph --components` — dependency order/waves from `dependsOn`
|
|
14
|
+
* (mirrors `computeStackGraph`/`runStackGraph`, but reuses
|
|
15
|
+
* `resolveComponentGraph` from ../driver.ts since a component's `dependsOn`
|
|
16
|
+
* is already a flat name list — no AttrRef-style inference needed).
|
|
17
|
+
* - `chant build --components --generate gitlab` — generate mode (#563):
|
|
18
|
+
* synthesize CI YAML from the same discovered declarations instead of
|
|
19
|
+
* running them, via `generateGitlabPipeline` (../generate-gitlab.ts).
|
|
20
|
+
* - `chant run --components <name|all>` — interpret mode (#585): dispatch
|
|
21
|
+
* discovered component(s) through the interpret `driver.ts` on the local
|
|
22
|
+
* executor, the CLI entrypoint the driver (#556) never had.
|
|
23
|
+
*/
|
|
24
|
+
import { type Archetype } from "./component.js";
|
|
25
|
+
import { type DriverComponent, type DriverRunResult } from "./driver.js";
|
|
26
|
+
import { type ComponentPipelineOptions } from "../lexicon.js";
|
|
27
|
+
import type { CapabilityRegistry } from "./capability.js";
|
|
28
|
+
import { type ChantConfig } from "../config.js";
|
|
29
|
+
/** One component in `chant list --components` output. */
|
|
30
|
+
export interface ListedComponent {
|
|
31
|
+
name: string;
|
|
32
|
+
archetype: Archetype;
|
|
33
|
+
dependsOn: string[];
|
|
34
|
+
hasBuild: boolean;
|
|
35
|
+
phases: string[];
|
|
36
|
+
filePath: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ListComponentsResult {
|
|
39
|
+
success: boolean;
|
|
40
|
+
components: ListedComponent[];
|
|
41
|
+
errors: string[];
|
|
42
|
+
}
|
|
43
|
+
/** Discover components under `path` and shape them for `chant list --components`. */
|
|
44
|
+
export declare function listComponents(path: string): Promise<ListComponentsResult>;
|
|
45
|
+
/** One component's full JSON contract projection, for `chant describe <name> --components`. */
|
|
46
|
+
export interface DescribedComponent {
|
|
47
|
+
name: string;
|
|
48
|
+
filePath: string;
|
|
49
|
+
/** The component's JSON contract projection (validates against component.schema.json). */
|
|
50
|
+
json: unknown;
|
|
51
|
+
}
|
|
52
|
+
export interface DescribeComponentResult {
|
|
53
|
+
success: boolean;
|
|
54
|
+
component: string;
|
|
55
|
+
described?: DescribedComponent;
|
|
56
|
+
output: string;
|
|
57
|
+
}
|
|
58
|
+
/** Find and project one named component, for `chant describe <name> --components`. */
|
|
59
|
+
export declare function describeComponent(path: string, name: string): Promise<DescribeComponentResult>;
|
|
60
|
+
/** Dependency order/waves for `chant graph --components`, from every discovered component's `dependsOn`. */
|
|
61
|
+
export interface ComponentGraphResult {
|
|
62
|
+
success: boolean;
|
|
63
|
+
order: string[];
|
|
64
|
+
waves: string[][];
|
|
65
|
+
edges: Array<{
|
|
66
|
+
from: string;
|
|
67
|
+
to: string;
|
|
68
|
+
}>;
|
|
69
|
+
error?: string;
|
|
70
|
+
}
|
|
71
|
+
/** Compute the components' dependency graph under `path`, for `chant graph --components`. */
|
|
72
|
+
export declare function computeComponentGraph(path: string): Promise<ComponentGraphResult>;
|
|
73
|
+
/** A generate-mode target lexicon name — any lexicon whose plugin implements `generateComponentPipeline` (currently gitlab; github/forgejo as they add it). */
|
|
74
|
+
export type GenerateLexicon = string;
|
|
75
|
+
/** Result of `chant build --components --generate <lexicon>`. */
|
|
76
|
+
export interface GenerateComponentsResult {
|
|
77
|
+
success: boolean;
|
|
78
|
+
/** The synthesized CI YAML, when `success` is true. */
|
|
79
|
+
yaml?: string;
|
|
80
|
+
/** Wave-ordered stage names (one entry per wave). */
|
|
81
|
+
stages?: string[];
|
|
82
|
+
/** Every generated job, for a machine-readable view (`--format json`). */
|
|
83
|
+
jobs?: Array<{
|
|
84
|
+
jobName: string;
|
|
85
|
+
component: string;
|
|
86
|
+
stage: string;
|
|
87
|
+
needs: string[];
|
|
88
|
+
}>;
|
|
89
|
+
error?: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Generate mode (#563): discover every `Component` under `path` and
|
|
93
|
+
* synthesize a thin CI pipeline for `lexicon` that triggers each component's
|
|
94
|
+
* own composition in dependency order/waves — the same `resolveComponentGraph`
|
|
95
|
+
* order `chant graph --components`/the interpret driver use. No deploy logic
|
|
96
|
+
* is inlined into the generated YAML; a cross-cutting change goes through
|
|
97
|
+
* `options`, never per component. The CI-specific synthesis is contributed by
|
|
98
|
+
* the target lexicon's `generateComponentPipeline` (#688); core owns only the
|
|
99
|
+
* generic discovery + graph.
|
|
100
|
+
*/
|
|
101
|
+
export declare function generateComponentsPipeline(path: string, lexicon: GenerateLexicon, options?: ComponentPipelineOptions): Promise<GenerateComponentsResult>;
|
|
102
|
+
/**
|
|
103
|
+
* Find the first `gate` step anywhere in a component's `deploy`/`rollback`
|
|
104
|
+
* composition (including nested fan-out phases), mirroring
|
|
105
|
+
* `../op/local-executor.ts`'s `findGate`. Used as a pre-flight check so
|
|
106
|
+
* `chant run --components` fails before any step runs — matching
|
|
107
|
+
* `runOpLocal`'s behavior for Ops — rather than only failing mid-run when the
|
|
108
|
+
* driver itself reaches the gated phase (`DriverGateUnsupportedError`).
|
|
109
|
+
*/
|
|
110
|
+
export declare function findComponentGate(component: DriverComponent): {
|
|
111
|
+
signalName: string;
|
|
112
|
+
} | undefined;
|
|
113
|
+
/** Options for `runComponents` (backs `chant run --components <name|all> [--env <env>]`). */
|
|
114
|
+
export interface RunComponentsOptions {
|
|
115
|
+
/** Target environment name, threaded into every capability's `DeployContext.env` (default: "local"). */
|
|
116
|
+
env?: string;
|
|
117
|
+
/** Additional capability plugin package names to load on top of the built-in starter set (see `buildCapabilityRegistry`). */
|
|
118
|
+
capabilityPlugins?: string[];
|
|
119
|
+
/**
|
|
120
|
+
* Pre-built registry to dispatch through, bypassing `buildCapabilityRegistry`
|
|
121
|
+
* entirely. Real callers (the CLI handler) should leave this unset; it exists
|
|
122
|
+
* so tests can inject a registry wired to a `MockCloudExecutor` (mirroring
|
|
123
|
+
* `../components/pilots/pilots-e2e.test.ts`'s `buildRegistry`) instead of the
|
|
124
|
+
* default starter set, whose non-pilot verbs are still typed stubs that throw
|
|
125
|
+
* `CapabilityNotImplementedError` (see `./verbs/stub.ts`).
|
|
126
|
+
*/
|
|
127
|
+
registry?: CapabilityRegistry;
|
|
128
|
+
/**
|
|
129
|
+
* Pre-loaded project config to resolve `sbom`/`signing`/`vulnPolicy`
|
|
130
|
+
* defaults from (#629), bypassing `loadChantConfig` entirely. Real callers
|
|
131
|
+
* (the CLI handler) should leave this unset — `runComponents` loads
|
|
132
|
+
* `chant.config.ts`/`chant.config.json` from `path` itself; this exists so
|
|
133
|
+
* tests can inject a config object directly, the same escape hatch
|
|
134
|
+
* `registry` above provides for the capability registry.
|
|
135
|
+
*/
|
|
136
|
+
config?: ChantConfig;
|
|
137
|
+
/**
|
|
138
|
+
* Cross-component/cross-stack outputs to seed the run with — keyed by
|
|
139
|
+
* component name, the same shape `DriverRunResult.componentOutputs` produces.
|
|
140
|
+
* The CLI populates this from `--seed-outputs` files (an upstream CI job's
|
|
141
|
+
* dumped outputs), so a single-component run in a downstream job can resolve
|
|
142
|
+
* `stackOutput()`/`@<name>.publish.*` references to a component that already
|
|
143
|
+
* ran elsewhere. Merged with, and overridden by, outputs this run produces.
|
|
144
|
+
*/
|
|
145
|
+
componentOutputs?: Record<string, Record<string, unknown>>;
|
|
146
|
+
}
|
|
147
|
+
/** Result of `chant run --components <name|all>`. */
|
|
148
|
+
export interface RunComponentsResult {
|
|
149
|
+
success: boolean;
|
|
150
|
+
/** The driver's run result, when the run reached the driver (even on a failed component). */
|
|
151
|
+
run?: DriverRunResult;
|
|
152
|
+
/** Component names actually dispatched to the driver, in run order. */
|
|
153
|
+
selected: string[];
|
|
154
|
+
error?: string;
|
|
155
|
+
/** Set when a selected component (or one of its `deploy`/`rollback` phases) contains a `gate` the local executor cannot run. */
|
|
156
|
+
gateUnsupported?: {
|
|
157
|
+
component: string;
|
|
158
|
+
signalName: string;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Run one named component, or every discovered component (`selector ===
|
|
163
|
+
* "all"`), through the interpret driver (`../components/driver.ts`) on the
|
|
164
|
+
* local in-process executor — the CLI entrypoint the driver never had (#585,
|
|
165
|
+
* follow-up to #556). Discovers the full component set first, then either:
|
|
166
|
+
* - `selector === "all"`: resolves the whole set's dependency order/waves
|
|
167
|
+
* and dispatches every component through `runInterpretDriver`, matching
|
|
168
|
+
* what the generated orchestrator Op will eventually do — the same
|
|
169
|
+
* order `chant graph --components` reports.
|
|
170
|
+
* - a single name: dispatches just that component via `runComponentDeploy`,
|
|
171
|
+
* without requiring the rest of its `dependsOn` graph to be present in
|
|
172
|
+
* this invocation. This mirrors generate mode's per-job invocation model
|
|
173
|
+
* (`generate-gitlab.ts`) — each CI job triggers exactly one component, and
|
|
174
|
+
* cross-job/cross-wave ordering is the CI DAG's (`needs:`) job, not this
|
|
175
|
+
* command's; requiring the full graph here would make `chant run
|
|
176
|
+
* --components <name>` fail for any component whose `dependsOn` names
|
|
177
|
+
* infra outside the discovered set (e.g. a shared stack, per the
|
|
178
|
+
* `search-service` pilot), which is exactly the common case.
|
|
179
|
+
*
|
|
180
|
+
* Pre-flights every selected component for a `gate` step and fails before any
|
|
181
|
+
* step runs (`gateUnsupported`), matching `runOpLocal`'s pre-flight
|
|
182
|
+
* `findGate` check for Ops — gated components need a durable (Temporal)
|
|
183
|
+
* backend, which is out of scope here (issue #585 scopes Temporal-backed
|
|
184
|
+
* component execution to what already exists for Ops; the epic tracks
|
|
185
|
+
* graduating a gated component to `--temporal` separately).
|
|
186
|
+
*/
|
|
187
|
+
/** Result of resolving a `<name|all>` selector against discovered components — shared by the local (`runComponents`) and durable (Temporal codegen, #589) entrypoints. */
|
|
188
|
+
export interface ResolvedComponentTargets {
|
|
189
|
+
success: boolean;
|
|
190
|
+
targets: DriverComponent[];
|
|
191
|
+
error?: string;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Discover every component under `path` and resolve `selector` (`"all"` or a
|
|
195
|
+
* single component name) to the `DriverComponent`(s) to run, with no gate
|
|
196
|
+
* check and no dispatch — just discovery + selection, factored out of
|
|
197
|
+
* `runComponents` so the durable Temporal entrypoint (`chant run --components
|
|
198
|
+
* <name> --temporal`, #589) can reuse the exact same selection semantics
|
|
199
|
+
* without also inheriting the local executor's pre-flight gate rejection
|
|
200
|
+
* (gates are exactly what the durable path exists to support).
|
|
201
|
+
*/
|
|
202
|
+
export declare function resolveComponentTargets(path: string, selector: string): Promise<ResolvedComponentTargets>;
|
|
203
|
+
export declare function runComponents(path: string, selector: string, options?: RunComponentsOptions): Promise<RunComponentsResult>;
|
|
204
|
+
//# sourceMappingURL=cli-support.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-support.d.ts","sourceRoot":"","sources":["../../src/components/cli-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAQL,KAAK,eAAe,EAEpB,KAAK,eAAe,EACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAuC,KAAK,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEhG,OAAO,KAAK,EAAE,kBAAkB,E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AAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC5D;AAED,qDAAqD;AACrD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,6FAA6F;IAC7F,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB,uEAAuE;IACvE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gIAAgI;IAChI,eAAe,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,0KAA0K;AAC1K,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAsB/G;AAED,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,mBAAmB,CAAC,CAkF9B"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed `Component` authoring form — Phase 2 (#560, epic #551).
|
|
3
|
+
*
|
|
4
|
+
* This is the real authoring frontend the docs (component-contract.mdx,
|
|
5
|
+
* composition-and-wiring.mdx) describe and that `pilots/authoring-shape.ts`
|
|
6
|
+
* (#555's stopgap) explicitly deferred to this issue. It mirrors
|
|
7
|
+
* `component.schema.json` field-for-field, so `projectToJson` stays a
|
|
8
|
+
* structural no-op — the interesting content lives in each component's
|
|
9
|
+
* composition, not in a bespoke serializer.
|
|
10
|
+
*
|
|
11
|
+
* See https://intentius.io/chant/components/component-contract/ and
|
|
12
|
+
* https://intentius.io/chant/components/composition-and-wiring/.
|
|
13
|
+
*/
|
|
14
|
+
/** Mirrors `$defs.Archetype` in component.schema.json. */
|
|
15
|
+
export type Archetype = "service" | "infra" | "producer-library";
|
|
16
|
+
/** Mirrors `$defs.StackOutputReference`. */
|
|
17
|
+
export interface StackOutputReference {
|
|
18
|
+
stackOutput: {
|
|
19
|
+
stack: string;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Mirrors `$defs.WiringValue` — a literal, or one of the reference forms
|
|
25
|
+
* (`$env.*`, `@Phase.field`, `@<component>.publish.uri|digest|key`, or a
|
|
26
|
+
* `{ stackOutput }` object), all resolved by the graph rather than by
|
|
27
|
+
* orchestrator code. Loosened to `string` for the literal/`$env`/prior-step/
|
|
28
|
+
* artifact-reference forms since they share one representation; only
|
|
29
|
+
* `stackOutput` needs its own shape.
|
|
30
|
+
*/
|
|
31
|
+
export type Wiring = string | StackOutputReference;
|
|
32
|
+
/** Mirrors `$defs.BuildSpec`. */
|
|
33
|
+
export interface BuildSpec {
|
|
34
|
+
/** Build capability verb, keyed by artifact type, e.g. "docker-build", "zip-package", "jvm-build". */
|
|
35
|
+
kind: string;
|
|
36
|
+
/** Build context path (e.g. a Docker build context directory). */
|
|
37
|
+
context?: string;
|
|
38
|
+
/** Build output always lands in the self-contained BuildArchive. */
|
|
39
|
+
into?: "archive";
|
|
40
|
+
/**
|
|
41
|
+
* Optional component-level SBOM authoring hint (#606, epic #551 follow-up
|
|
42
|
+
* to #564/#568) — not itself a `generate-sbom` step (that is composed
|
|
43
|
+
* explicitly in `deploy`/build tooling, see
|
|
44
|
+
* ../verbs/sbom.ts's `GenerateSbomInput`); this is metadata an authoring
|
|
45
|
+
* frontend or generator can read when deciding whether/how to compose
|
|
46
|
+
* that step for this component. Rides `BuildSpec`'s existing
|
|
47
|
+
* `additionalProperties: true` in component.schema.json — no schema change
|
|
48
|
+
* needed for this extension.
|
|
49
|
+
*/
|
|
50
|
+
sbom?: {
|
|
51
|
+
/** Preferred SBOM format for this component, overriding `chant.config.ts`'s project-wide `sbom.format` default (see ../../config.ts's `resolveSbomFormat`). */
|
|
52
|
+
format?: "spdx" | "cyclonedx";
|
|
53
|
+
/** Set true to skip SBOM generation for this component even where a project default would otherwise include it. `generate-sbom` is never invoked implicitly — this only documents intent for whatever composes the component's build phase. */
|
|
54
|
+
optOut?: boolean;
|
|
55
|
+
};
|
|
56
|
+
[extra: string]: unknown;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Mirrors `$defs.Step` — one capability invocation, the leaf unit of a
|
|
60
|
+
* composition. `kind` selects the capability (a verb, e.g. "cfn-deploy",
|
|
61
|
+
* "publish-image", "ecs-update-service"); the remaining properties are that
|
|
62
|
+
* capability's typed input. `kind: "gate"` is reserved for `Gate` below, not
|
|
63
|
+
* a capability — use `gate()` to author one.
|
|
64
|
+
*/
|
|
65
|
+
export interface Step {
|
|
66
|
+
kind: string;
|
|
67
|
+
/** Reference to a published image digest, typically `"@Publish.digest"`. */
|
|
68
|
+
imageRef?: Wiring;
|
|
69
|
+
/** Reference to a published JAR/artifact location, e.g. `"@jar-lib.publish.uri"`. */
|
|
70
|
+
jar?: Wiring;
|
|
71
|
+
/** Reference to a published revision/bundle location for host/code-delivery capabilities. */
|
|
72
|
+
revision?: Wiring;
|
|
73
|
+
/** Named inputs passed into an apply step; each may be a literal or any wiring reference. */
|
|
74
|
+
inputs?: Record<string, Wiring>;
|
|
75
|
+
[param: string]: unknown;
|
|
76
|
+
}
|
|
77
|
+
/** Mirrors `$defs.Gate` — pauses the composition for an external signal (typically human approval). */
|
|
78
|
+
export interface Gate {
|
|
79
|
+
kind: "gate";
|
|
80
|
+
signalName: string;
|
|
81
|
+
/** Duration string bounding the wait, e.g. "48h". Default: "48h". */
|
|
82
|
+
timeout?: string;
|
|
83
|
+
/** Human-readable description of the action required to unblock this gate. */
|
|
84
|
+
description?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Mirrors `$defs.Phase` — one named phase of a deploy composition. A step may
|
|
88
|
+
* itself be a nested `Phase`, which is how a fan-out unit becomes a mini-
|
|
89
|
+
* composition (see composition-and-wiring.mdx).
|
|
90
|
+
*/
|
|
91
|
+
export interface Phase {
|
|
92
|
+
phase: string;
|
|
93
|
+
steps: Array<Step | Gate | Phase>;
|
|
94
|
+
/** Run all steps in this phase concurrently instead of sequentially. */
|
|
95
|
+
parallel?: boolean;
|
|
96
|
+
/** Compensation phases for this phase, executed in reverse order on failure. */
|
|
97
|
+
onFailure?: Phase[];
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The typed `Component` authoring form — projects 1:1 to the JSON contract
|
|
101
|
+
* (component.schema.json). `archetype` is optional on both sides: when
|
|
102
|
+
* omitted here, `projectToJson` infers it structurally (see
|
|
103
|
+
* `inferArchetype`) so the JSON projection always carries an explicit value,
|
|
104
|
+
* matching how the merged fixtures are authored.
|
|
105
|
+
*/
|
|
106
|
+
export interface Component {
|
|
107
|
+
name: string;
|
|
108
|
+
/** Optional explicit archetype hint; inferred from the composition shape when omitted (see `inferArchetype`). */
|
|
109
|
+
archetype?: Archetype;
|
|
110
|
+
/** Other component names that must complete before this one runs. Ordering only — no logic. */
|
|
111
|
+
dependsOn: string[];
|
|
112
|
+
/** Optional: source -> BuildArchive. Omitted entirely for config-only / infra components. */
|
|
113
|
+
build?: BuildSpec;
|
|
114
|
+
/** The component's own composition over shared capabilities. */
|
|
115
|
+
deploy: Phase[];
|
|
116
|
+
/** Optional standalone verify phases, for components that separate verification from `deploy`. */
|
|
117
|
+
verify?: Phase[];
|
|
118
|
+
/** Optional explicit compensation phases, executed in reverse order on terminal failure of `deploy`. */
|
|
119
|
+
rollback?: Phase[];
|
|
120
|
+
/**
|
|
121
|
+
* Optional: the live lexicon entity/resource name(s) this component owns,
|
|
122
|
+
* when they differ from `name` (#598). `chant components status --live`
|
|
123
|
+
* joins the release ledger against live evidence by name; components and
|
|
124
|
+
* lexicon entities are different namespaces in general (see
|
|
125
|
+
* `../lifecycle/status.ts`), so a component whose deploy composition
|
|
126
|
+
* targets an entity/resource declared under a different name must say so
|
|
127
|
+
* explicitly here. A component that owns several entities (e.g. a fan-out
|
|
128
|
+
* cluster with one stack per node) may list them all — live evidence is
|
|
129
|
+
* aggregated across every name. Omitted entirely (the common case for the
|
|
130
|
+
* pilot components) falls back to `[name]`, preserving the original
|
|
131
|
+
* name == entity join with no behavior change.
|
|
132
|
+
*/
|
|
133
|
+
liveNames?: string[];
|
|
134
|
+
}
|
|
135
|
+
/** Author a named phase. `steps` may mix capability `Step`s, `Gate`s, and nested `Phase`s (fan-out). */
|
|
136
|
+
export declare function phase(name: string, steps: Array<Step | Gate | Phase>, opts?: {
|
|
137
|
+
parallel?: boolean;
|
|
138
|
+
}): Phase;
|
|
139
|
+
/** Author a gate step — pauses the composition for an external signal (typically human approval). */
|
|
140
|
+
export declare function gate(signalName: string, opts?: {
|
|
141
|
+
timeout?: string;
|
|
142
|
+
description?: string;
|
|
143
|
+
}): Gate;
|
|
144
|
+
/**
|
|
145
|
+
* Author a cross-stack output reference — the TypeScript-side equivalent of
|
|
146
|
+
* the JSON contract's `{ stackOutput: { stack, name } }` (schema
|
|
147
|
+
* `StackOutputReference`), e.g. `stackOutput("shared-alb", "ListenerArn")`.
|
|
148
|
+
* Resolved by `chant graph --stacks`, never by orchestrator code.
|
|
149
|
+
*/
|
|
150
|
+
export declare function stackOutput(stack: string, name: string): StackOutputReference;
|
|
151
|
+
/**
|
|
152
|
+
* Infer a component's archetype from the shape of its composition, when no
|
|
153
|
+
* explicit `archetype` is authored — matching the archetype table in
|
|
154
|
+
* component-contract.mdx:
|
|
155
|
+
* - **producer-library**: has a `build`, and every step across `deploy` is a
|
|
156
|
+
* publish-family step (or a gate) — build -> publish only, no apply.
|
|
157
|
+
* - **service**: has a `build` and at least one non-publish, non-gate step
|
|
158
|
+
* (an apply/verify step) — build -> publish -> apply -> verify.
|
|
159
|
+
* - **infra**: no `build` — apply -> verify only.
|
|
160
|
+
*
|
|
161
|
+
* This is a structural heuristic, not a capability-registry lookup (see
|
|
162
|
+
* `BUILD_ONLY_HINT`/`isPublishStep` above): it only needs to distinguish
|
|
163
|
+
* "nothing but publish" from "something else happens after publish", which
|
|
164
|
+
* every merged pilot/fixture satisfies without consulting the registry.
|
|
165
|
+
*/
|
|
166
|
+
export declare function inferArchetype(component: Pick<Component, "build" | "deploy">): Archetype;
|
|
167
|
+
/**
|
|
168
|
+
* Project a typed `Component` to its plain-JSON contract form
|
|
169
|
+
* (component.schema.json). Field names already match the schema 1:1, so
|
|
170
|
+
* projection is mechanical: a deep `JSON.parse(JSON.stringify())` round-trip
|
|
171
|
+
* (dropping `undefined` optional fields) plus filling in `archetype` via
|
|
172
|
+
* `inferArchetype` when the author didn't supply one explicitly. Kept
|
|
173
|
+
* intentionally dumb beyond that inference — the schema/fixtures stay the
|
|
174
|
+
* source of truth for shape, not this function.
|
|
175
|
+
*/
|
|
176
|
+
export declare function projectToJson(component: Component): unknown;
|
|
177
|
+
/** Runtime type guard: true if `value` looks like a `Component` (has the required `name`/`dependsOn`/`deploy` shape). Used by discovery to pick exported `Component` values out of a `*.component.ts` module without requiring a class/marker symbol. */
|
|
178
|
+
export declare function isComponent(value: unknown): value is Component;
|
|
179
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/components/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,0DAA0D;AAC1D,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,kBAAkB,CAAC;AAEjE,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,E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CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAM3D;AAED,yPAAyP;AACzP,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAQ9D"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config-defaults pass (#629, epic #551 follow-up to #606/#622/#626) — the
|
|
3
|
+
* missing link between `chant.config.ts`'s `sbom`/`signing`/`vulnPolicy`
|
|
4
|
+
* sections and the steps that actually consume them.
|
|
5
|
+
*
|
|
6
|
+
* Before this module, `resolveSigningDefaults`/`resolveVulnPolicy`
|
|
7
|
+
* (../config.ts) were never called anywhere in the `chant run --components`
|
|
8
|
+
* path, and `resolveSbomFormat` was only ever called in post-hoc display
|
|
9
|
+
* code. A component author had to hand-code `format`/`keyless`/`oidcIssuer`/
|
|
10
|
+
* `policy` into every `generate-sbom`/`sign`/`attest-provenance`/`verify`/
|
|
11
|
+
* `vuln-gate` step, even when the project already declared a project-wide
|
|
12
|
+
* default in `chant.config.ts` — the config sections were decorative.
|
|
13
|
+
*
|
|
14
|
+
* `applyConfigDefaults` walks a `DriverComponent`'s `deploy` composition
|
|
15
|
+
* (including nested fan-out phases and `onFailure` compensation phases) and
|
|
16
|
+
* returns a new component with each recognized step's config-driven fields
|
|
17
|
+
* filled in *only where the step didn't already set them* — per-step value
|
|
18
|
+
* wins over config wins over the capability's own built-in default, the
|
|
19
|
+
* precedence every one of the `resolve*` docstrings in ../config.ts already
|
|
20
|
+
* claims. This module is the caller that finally makes that claim true.
|
|
21
|
+
*
|
|
22
|
+
* Kept entirely outside `./driver.ts`: the driver stays capability-agnostic
|
|
23
|
+
* (it dispatches by `kind` and knows nothing about `sbom`/`signing`/
|
|
24
|
+
* `vulnPolicy`) — this pass transforms the component's plain-data composition
|
|
25
|
+
* *before* it ever reaches the driver, the same "resolve config, then hand a
|
|
26
|
+
* capability-agnostic caller a fully-formed input" convention `resolveSbomFormat`'s
|
|
27
|
+
* own docstring already describes for its callers.
|
|
28
|
+
*/
|
|
29
|
+
import type { ChantConfig } from "../config.js";
|
|
30
|
+
import type { DriverComponent } from "./driver.js";
|
|
31
|
+
/**
|
|
32
|
+
* Return `component` with `chant.config.ts`'s `sbom`/`signing`/`vulnPolicy`
|
|
33
|
+
* defaults filled into its `deploy` (and `rollback`, which shares the same
|
|
34
|
+
* `DriverPhase[]` shape and can equally carry a `verify`/`vuln-gate` step)
|
|
35
|
+
* composition, wherever a step didn't already specify the value itself.
|
|
36
|
+
* Non-destructive: returns a new component/phase/step tree, never mutates
|
|
37
|
+
* `component` in place, so a caller holding the original discovered
|
|
38
|
+
* `DriverComponent` (e.g. for `chant describe`) is unaffected.
|
|
39
|
+
*/
|
|
40
|
+
export declare function applyConfigDefaults(component: DriverComponent, config: ChantConfig): DriverComponent;
|
|
41
|
+
//# sourceMappingURL=config-defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-defaults.d.ts","sourceRoot":"","sources":["../../src/components/config-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAuC,MAAM,UAAU,CAAC;AAkGrF;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,GAAG,eAAe,CAMpG"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component discovery — Phase 2 (#560, epic #551).
|
|
3
|
+
*
|
|
4
|
+
* Mirrors chant's existing declarable discovery
|
|
5
|
+
* (`../discovery/index.ts`'s `discover()`, built on `findInfraFiles`) as
|
|
6
|
+
* closely as a structurally distinct type allows, and borrows its
|
|
7
|
+
* file-suffix convention from Op discovery
|
|
8
|
+
* (`../op/discover.ts`'s `discoverOps()`, `*.op.ts`): a component is any
|
|
9
|
+
* `Component`-shaped value (see `./component.ts`'s `isComponent`) exported
|
|
10
|
+
* (by any export name, not just `default`) from a `*.component.ts` file.
|
|
11
|
+
*
|
|
12
|
+
* Why a dedicated convention rather than folding into `discover()`:
|
|
13
|
+
* `Declarable` (`../declarable.ts`) is a lexicon-resource marker —
|
|
14
|
+
* `{ lexicon, entityType, kind, [DECLARABLE_MARKER]: true }` — and a
|
|
15
|
+
* `Component` has none of that shape (no `lexicon`, and its `deploy`
|
|
16
|
+
* composition is data the capability driver interprets, not a serializable
|
|
17
|
+
* lexicon resource). Reusing `collectEntities`/`isDeclarable` would mean
|
|
18
|
+
* either stretching the `Declarable` marker to cover an unrelated shape or
|
|
19
|
+
* silently ignoring components during the existing walk. A parallel,
|
|
20
|
+
* purpose-built collector keeps both conventions simple: `*.ts` + the
|
|
21
|
+
* `Declarable` marker for resources, `*.component.ts` + the `Component`
|
|
22
|
+
* shape for components — exactly how `*.op.ts` is already a parallel,
|
|
23
|
+
* purpose-built convention for Ops.
|
|
24
|
+
*
|
|
25
|
+
* Filename convention (`*.component.ts`) is documented here rather than
|
|
26
|
+
* inferred from export shape alone so a project can `grep` for its
|
|
27
|
+
* components the same way it can for `*.op.ts` files, and so discovery does
|
|
28
|
+
* not have to import (and risk side-effecting) every `.ts` file in the
|
|
29
|
+
* project looking for stray `Component`-shaped objects.
|
|
30
|
+
*/
|
|
31
|
+
import { DiscoveryError } from "../errors.js";
|
|
32
|
+
import { type Component } from "./component.js";
|
|
33
|
+
/** One discovered component, paired with the file it was exported from. */
|
|
34
|
+
export interface DiscoveredComponent {
|
|
35
|
+
component: Component;
|
|
36
|
+
/** The export name the component was found under (informational; components are keyed by their own `.name`, not this). */
|
|
37
|
+
exportName: string;
|
|
38
|
+
filePath: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ComponentDiscoveryResult {
|
|
41
|
+
/** Discovered components, keyed by `component.name` (the schema identity), not by export name or file. */
|
|
42
|
+
components: Map<string, DiscoveredComponent>;
|
|
43
|
+
/** Every `*.component.ts` file that was scanned. */
|
|
44
|
+
sourceFiles: string[];
|
|
45
|
+
errors: DiscoveryError[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Discover every `Component` declared under `path`: scan for `*.component.ts`
|
|
49
|
+
* files, import each, and collect every export whose value satisfies
|
|
50
|
+
* `isComponent` (any export name — not just `default` — so a file may
|
|
51
|
+
* declare several related components, matching how a resource file can
|
|
52
|
+
* export several `Declarable`s). Duplicate `component.name` across files (or
|
|
53
|
+
* within one file) is a discovery error, matching `collectEntities`'s
|
|
54
|
+
* duplicate-export handling and `discoverOps`'s duplicate-Op-name handling —
|
|
55
|
+
* except the identity compared is the schema-level `name` field, since two
|
|
56
|
+
* different export bindings could otherwise declare the same component name
|
|
57
|
+
* and silently collide at deploy time.
|
|
58
|
+
*/
|
|
59
|
+
export declare function discoverComponents(path: string): Promise<ComponentDiscoveryResult>;
|
|
60
|
+
//# sourceMappingURL=discover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/components/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAMH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE1D,2EAA2E;AAC3E,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,SAAS,CAAC;IACrB,0HAA0H;IAC1H,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,0GAA0G;IAC1G,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC7C,oDAAoD;IACpD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,cAAc,EAAE,CAAC;CAC1B;AAuDD;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CA+CxF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderers for `chant run --components` (#585) — the interpret driver's CLI
|
|
3
|
+
* output. Mirrors `../op/local-output.ts`'s `renderHuman`/`renderJson` pair
|
|
4
|
+
* for Ops: both consume the same `DriverRunResult` (`./driver.ts`);
|
|
5
|
+
* `renderDriverHuman` is the default (logs to stderr), `renderDriverJson`
|
|
6
|
+
* prints the machine-readable result as JSON on stdout and nothing else.
|
|
7
|
+
*/
|
|
8
|
+
import type { DriverRunResult } from "./driver.js";
|
|
9
|
+
type Writer = (line: string) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Render an interpret-driver run result as human-readable progress. Defaults
|
|
12
|
+
* to stderr so stdout stays clean for piping (the `--json` renderer owns
|
|
13
|
+
* stdout). Groups records by component, then by phase, matching the driver's
|
|
14
|
+
* own wave/phase/step nesting.
|
|
15
|
+
*/
|
|
16
|
+
export declare function renderDriverHuman(result: DriverRunResult, write?: Writer): void;
|
|
17
|
+
/** Render an interpret-driver run result as JSON on stdout (and nothing else on stdout). */
|
|
18
|
+
export declare function renderDriverJson(result: DriverRunResult, write?: Writer): void;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=driver-output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver-output.d.ts","sourceRoot":"","sources":["../../src/components/driver-output.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,UAAU,CAAC;AAElE,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAsBrC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,GAAE,MAAe,GAAG,IAAI,CA2BvF;AAED,4FAA4F;AAC5F,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,GAAE,MAAe,GAAG,IAAI,CAEtF"}
|