@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,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preset: `LambdaComponent` (#566, epic #551 §"6. Presets (Level 2 reuse)").
|
|
3
|
+
*
|
|
4
|
+
* The named-composition builder for the container-image Lambda shape
|
|
5
|
+
* (`../pilots/lambda.pilot.ts`): `docker-build` -> `publish-image` ->
|
|
6
|
+
* `lambda-deploy` -> `health-gate` against the function's alias. Distinct
|
|
7
|
+
* from `EcsFargateComponent`'s apply family on purpose — no CloudFormation
|
|
8
|
+
* stack in Apply at all, matching the pilot's documented "first pilot whose
|
|
9
|
+
* Apply phase contains no cfn-deploy" shape.
|
|
10
|
+
*/
|
|
11
|
+
import type { Component } from "../component.js";
|
|
12
|
+
export interface LambdaComponentConfig {
|
|
13
|
+
/** Component name (kebab-case) — becomes both the component's `name` and, by default, the Lambda function name. */
|
|
14
|
+
name: string;
|
|
15
|
+
/** Lambda function name. Default: `name`. */
|
|
16
|
+
functionName?: string;
|
|
17
|
+
/** Docker build context. Default: ".". */
|
|
18
|
+
context?: string;
|
|
19
|
+
/** Alias to repoint at the new version after publish. Default: "live". */
|
|
20
|
+
alias?: string;
|
|
21
|
+
/** Destination registry `publish-image` promotes to. Default: `"$env.registry"`. */
|
|
22
|
+
registry?: string;
|
|
23
|
+
/** Other components that must complete first. */
|
|
24
|
+
dependsOn?: string[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Expand a container-image AWS Lambda function to its standard
|
|
28
|
+
* Publish/Apply/Verify composition — the reference shape
|
|
29
|
+
* `lambda.pilot.ts` hand-composes. Reuses `docker-build`/`publish-image`
|
|
30
|
+
* unchanged from `EcsFargateComponent`'s build axis (build + promote-by-digest
|
|
31
|
+
* is identical for a container-image Lambda); only the apply/verify shape
|
|
32
|
+
* differs.
|
|
33
|
+
*/
|
|
34
|
+
export declare function LambdaComponent(config: LambdaComponentConfig): Component;
|
|
35
|
+
//# sourceMappingURL=lambda.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambda.d.ts","sourceRoot":"","sources":["../../../src/components/presets/lambda.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,qBAAqB;IACpC,mHAAmH;IACnH,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,SAAS,CAexE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preset: `SingleHostComposeComponent` (#566, epic #551 §"6. Presets (Level 2
|
|
3
|
+
* reuse)").
|
|
4
|
+
*
|
|
5
|
+
* The named-composition builder for the registry-less single-host Docker
|
|
6
|
+
* Compose shape (`../__fixtures__/single-host-compose.json`): `docker-build`
|
|
7
|
+
* -> `load-image-on-host` (registry-free promotion, see
|
|
8
|
+
* ../verbs/publish.ts's `load-image-on-host` docstring) -> `copy-to-host` the
|
|
9
|
+
* compose file -> `remote-exec` a `docker compose up -d` -> `wait-endpoint`
|
|
10
|
+
* against the service's health path. This is the N=1 case of the fan-out
|
|
11
|
+
* shape `neo4j-fanout.pilot.ts` composes by hand at N=3 — single-host compose
|
|
12
|
+
* and a host fleet are the same composition shape at different N (see
|
|
13
|
+
* docs/components/composition-and-wiring.mdx#fan-out-is-composition-not-orchestrator-knowledge).
|
|
14
|
+
*/
|
|
15
|
+
import type { Component } from "../component.js";
|
|
16
|
+
export interface SingleHostComposeComponentConfig {
|
|
17
|
+
/** Component name (kebab-case). */
|
|
18
|
+
name: string;
|
|
19
|
+
/** Docker build context. Default: ".". */
|
|
20
|
+
context?: string;
|
|
21
|
+
/** Path to the compose file inside the archive. Default: "archive:compose.yaml". */
|
|
22
|
+
composeFile?: string;
|
|
23
|
+
/** Destination path for the compose file on the host. Default: `/opt/<name>/compose.yaml`. */
|
|
24
|
+
hostComposePath?: string;
|
|
25
|
+
/** Target host (SSM instance id, hostname, or host group). Default: `"$env.host"`. */
|
|
26
|
+
host?: string;
|
|
27
|
+
/** Health check path polled after `docker compose up -d`. */
|
|
28
|
+
healthPath: string;
|
|
29
|
+
/** Port the health check listens on. */
|
|
30
|
+
healthPort: number;
|
|
31
|
+
/** Other components that must complete first. */
|
|
32
|
+
dependsOn?: string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Expand a single-host Docker Compose deploy to its standard
|
|
36
|
+
* Publish/Apply/Verify composition. No registry ever in the path: the built
|
|
37
|
+
* image tarball is copied straight onto the host and `docker load`ed there
|
|
38
|
+
* (`load-image-on-host`), the compose file follows the same way, and
|
|
39
|
+
* `docker compose up -d` runs via `remote-exec` — the registry-less backend
|
|
40
|
+
* axis documented in docs/components/build-archive.mdx.
|
|
41
|
+
*/
|
|
42
|
+
export declare function SingleHostComposeComponent(config: SingleHostComposeComponentConfig): Component;
|
|
43
|
+
//# sourceMappingURL=single-host-compose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"single-host-compose.d.ts","sourceRoot":"","sources":["../../../src/components/presets/single-host-compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,gCAAgC;IAC/C,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8FAA8F;IAC9F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,gCAAgC,GAAG,SAAS,CAkB9F"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The starter capability registry — one `CapabilityRegistry` pre-seeded with
|
|
3
|
+
* every verb in the starter set (epic #551, issue #554). All stubs; no cloud
|
|
4
|
+
* calls except for the #557/#558 AWS leaves (real implementations).
|
|
5
|
+
*
|
|
6
|
+
* Phase 2 (#559) promotes this convention to a first-class plugin contract
|
|
7
|
+
* (./capability-plugin.ts): the starter verb set now ships as
|
|
8
|
+
* `starterCapabilityPlugin` (./starter-plugin.ts), and `createCapabilityRegistry`
|
|
9
|
+
* below builds its registry from that plugin's `capabilities()` instead of
|
|
10
|
+
* registering each verb inline. This is a pure refactor — same kinds, same
|
|
11
|
+
* capability instances, same registration order — so every existing caller
|
|
12
|
+
* (the driver, the pilots, ./registry.test.ts) is unaffected. New code
|
|
13
|
+
* should prefer `buildCapabilityRegistry` (./capability-plugin-loader.ts),
|
|
14
|
+
* which additionally supports loading third-party capability plugins on top
|
|
15
|
+
* of this same starter set, the way lexicons are discovered today.
|
|
16
|
+
*/
|
|
17
|
+
import { CapabilityRegistry } from "./capability.js";
|
|
18
|
+
import { STARTER_VERB_FAMILIES } from "./starter-plugin.js";
|
|
19
|
+
/** Build a fresh `CapabilityRegistry` containing every starter-set verb stub. */
|
|
20
|
+
export declare function createCapabilityRegistry(): CapabilityRegistry;
|
|
21
|
+
/**
|
|
22
|
+
* Every `kind` in the starter verb set, grouped by family — useful for tests
|
|
23
|
+
* and docs generation. Re-exported here (source of truth moved to
|
|
24
|
+
* ./starter-plugin.ts to avoid a module cycle with `starterCapabilityPlugin`)
|
|
25
|
+
* so every existing import of `STARTER_VERB_FAMILIES` from this module keeps
|
|
26
|
+
* working unchanged.
|
|
27
|
+
*/
|
|
28
|
+
export { STARTER_VERB_FAMILIES };
|
|
29
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/components/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAA2B,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAElF,iFAAiF;AACjF,wBAAgB,wBAAwB,IAAI,kBAAkB,CAM7D;AAED;;;;;;GAMG;AACH,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The starter verb set (epic #551, #554/#557/#558), wrapped as a
|
|
3
|
+
* `CapabilityPlugin` (#559) — the built-in, always-loaded plugin that
|
|
4
|
+
* carries every Phase 1 capability forward under the Phase 2 plugin
|
|
5
|
+
* contract with **no behavior change**.
|
|
6
|
+
*
|
|
7
|
+
* Migration path from Phase 1 to Phase 2: Phase 1 (`createCapabilityRegistry`,
|
|
8
|
+
* ./registry.ts) constructed a `CapabilityRegistry` by registering each
|
|
9
|
+
* starter verb directly. Phase 2 introduces `CapabilityPlugin` as the
|
|
10
|
+
* discoverable, typed package contract (./capability-plugin.ts) that
|
|
11
|
+
* mirrors how lexicons are packaged (../lexicon.ts). Rather than rewrite the
|
|
12
|
+
* starter verbs, this module packages the *exact same* verb list as one
|
|
13
|
+
* `CapabilityPlugin` named "starter" — so:
|
|
14
|
+
*
|
|
15
|
+
* - `createCapabilityRegistry()` (./registry.ts) now builds its registry by
|
|
16
|
+
* registering `starterCapabilityPlugin.capabilities()` instead of calling
|
|
17
|
+
* `registry.register(...)` once per verb inline. Same kinds, same
|
|
18
|
+
* instances, same order, same resulting registry — verified by
|
|
19
|
+
* ./registry.test.ts, unchanged.
|
|
20
|
+
* - `buildCapabilityRegistry()` (./capability-plugin-loader.ts), the new
|
|
21
|
+
* Phase 2 entry point, always loads this plugin first, then layers any
|
|
22
|
+
* additional third-party capability plugins on top by `kind`.
|
|
23
|
+
* - The driver (./driver.ts) and every pilot (./pilots/*.pilot.ts) consume
|
|
24
|
+
* only a `CapabilityRegistry` instance and never construct one directly
|
|
25
|
+
* from verb modules, so neither needed to change for this migration —
|
|
26
|
+
* the compatibility guarantee #559 asks for.
|
|
27
|
+
*/
|
|
28
|
+
import type { CapabilityPlugin } from "./capability-plugin.js";
|
|
29
|
+
/**
|
|
30
|
+
* Every `kind` in the starter verb set, grouped by family, per epic #551 and
|
|
31
|
+
* docs/components/capabilities.mdx. Source of truth (moved here from
|
|
32
|
+
* ./registry.ts in #559 to avoid a module cycle: ./registry.ts's
|
|
33
|
+
* `createCapabilityRegistry` depends on `starterCapabilityPlugin`, so this
|
|
34
|
+
* plugin module cannot depend back on ./registry.ts). Re-exported from
|
|
35
|
+
* ./registry.ts unchanged for existing importers.
|
|
36
|
+
*/
|
|
37
|
+
export declare const STARTER_VERB_FAMILIES: {
|
|
38
|
+
readonly build: readonly ["docker-build", "zip-package", "jvm-build"];
|
|
39
|
+
readonly sbom: readonly ["generate-sbom"];
|
|
40
|
+
readonly supplyChainSecurity: readonly ["sign", "attest-provenance", "verify"];
|
|
41
|
+
readonly supplyChainPolicy: readonly ["scan-vulnerabilities", "vuln-gate"];
|
|
42
|
+
readonly waitVerify: readonly ["wait-cluster-healthy", "wait-endpoint", "health-gate"];
|
|
43
|
+
readonly escapeHatch: readonly ["shell"];
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* The built-in capability plugin carrying the entire Phase 1 starter verb
|
|
47
|
+
* set forward under the Phase 2 contract. Always loaded first by
|
|
48
|
+
* `buildCapabilityRegistry` (./capability-plugin-loader.ts).
|
|
49
|
+
*/
|
|
50
|
+
export declare const starterCapabilityPlugin: CapabilityPlugin;
|
|
51
|
+
//# sourceMappingURL=starter-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starter-plugin.d.ts","sourceRoot":"","sources":["../../src/components/starter-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAkBH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;CAaxB,CAAC;AA2BX;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAKrC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic loader for the durable component → Temporal codegen (#589, epic
|
|
3
|
+
* #551 §5/§8). The actual `serializeComponent` generator lives in
|
|
4
|
+
* `@intentius/chant-lexicon-temporal` (`src/component-op/serializer.ts`),
|
|
5
|
+
* mirroring `Temporal::Op` codegen — core never statically depends on the
|
|
6
|
+
* Temporal lexicon, the same boundary `../op/activity-registry.ts`'s
|
|
7
|
+
* `loadActivities`/`loadProfiles` already keep for Op activities.
|
|
8
|
+
*/
|
|
9
|
+
import type { DriverComponent } from "./driver.js";
|
|
10
|
+
/** Target environment (and env-config) baked into the generated workflow at compile time — see `serializeComponent`'s docstring in the Temporal lexicon for why this can't be resolved at workflow-run time instead. */
|
|
11
|
+
export interface ComponentTemporalCodegenOptions {
|
|
12
|
+
env?: string;
|
|
13
|
+
vars?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export interface ComponentTemporalCodegen {
|
|
16
|
+
/** Serialize one component into `{ "components/<name>/workflow.ts": "...", ... }`. */
|
|
17
|
+
serializeComponent(component: DriverComponent, options?: ComponentTemporalCodegenOptions): Record<string, string>;
|
|
18
|
+
/** Deterministic workflow function name for a component (mirrors the generated `export async function <fn>()`). */
|
|
19
|
+
componentWorkflowFnName(componentName: string): string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Dynamically import the Temporal lexicon's component codegen. Throws a
|
|
23
|
+
* friendly error if the lexicon is not installed — the durable component
|
|
24
|
+
* path needs the generator even though discovery/local execution never do.
|
|
25
|
+
*/
|
|
26
|
+
export declare function loadComponentTemporalCodegen(): Promise<ComponentTemporalCodegen>;
|
|
27
|
+
//# sourceMappingURL=temporal-codegen-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temporal-codegen-loader.d.ts","sourceRoot":"","sources":["../../src/components/temporal-codegen-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,wNAAwN;AACxN,MAAM,WAAW,+BAA+B;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,wBAAwB;IACvC,sFAAsF;IACtF,kBAAkB,CAAC,SAAS,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,+BAA+B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClH,mHAAmH;IACnH,uBAAuB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;CACxD;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,wBAAwB,CAAC,CAWtF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `MockCloudExecutor` — an in-memory fake of the *agnostic* `CloudExecutor`
|
|
3
|
+
* (../cloud-executor.ts) for tests: the `docker` build/push client and the
|
|
4
|
+
* Neo4j bolt probe, the two clients core still owns. No live docker, ever, in
|
|
5
|
+
* a test run — every method records its call and returns a canned result.
|
|
6
|
+
*
|
|
7
|
+
* The AWS clients' mock moved to the aws lexicon alongside their
|
|
8
|
+
* implementations (`@intentius/chant-lexicon-aws/components`).
|
|
9
|
+
*/
|
|
10
|
+
import type { CloudExecutor } from "../cloud-executor.js";
|
|
11
|
+
export interface RecordedCall {
|
|
12
|
+
client: string;
|
|
13
|
+
method: string;
|
|
14
|
+
args: unknown;
|
|
15
|
+
}
|
|
16
|
+
export interface FakeClusterConfig {
|
|
17
|
+
/** Number of bolt endpoints (out of however many `cluster` lists) that report healthy. Default: all of them. */
|
|
18
|
+
healthyCount?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface MockCloudExecutorOptions {
|
|
21
|
+
/** Neo4j cluster health, keyed by the comma-joined endpoint string `wait-cluster-healthy` probes. */
|
|
22
|
+
clusters?: Record<string, FakeClusterConfig>;
|
|
23
|
+
/** Force every docker call to fail (simulates a build/push failure). */
|
|
24
|
+
failDocker?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** An injected agnostic `CloudExecutor` plus the call log and cluster-health controls tests use. */
|
|
27
|
+
export interface MockCloudExecutor {
|
|
28
|
+
executor: CloudExecutor;
|
|
29
|
+
calls: RecordedCall[];
|
|
30
|
+
/** Change how many cluster members report healthy after construction (simulates a follower catching up). */
|
|
31
|
+
setClusterHealth(cluster: string, healthyCount: number): void;
|
|
32
|
+
}
|
|
33
|
+
/** Build a fresh mock agnostic `CloudExecutor`. Every method is deterministic and synchronous-fast — no real polling delay. */
|
|
34
|
+
export declare function createMockCloudExecutor(options?: MockCloudExecutorOptions): MockCloudExecutor;
|
|
35
|
+
//# sourceMappingURL=mock-cloud-executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-cloud-executor.d.ts","sourceRoot":"","sources":["../../../../src/components/verbs/__tests__/mock-cloud-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAkG,MAAM,mBAAmB,CAAC;AAEvJ,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,gHAAgH;IAChH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,wBAAwB;IACvC,qGAAqG;IACrG,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC7C,wEAAwE;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,oGAAoG;AACpG,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,aAAa,CAAC;IACxB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,4GAA4G;IAC5G,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/D;AAED,+HAA+H;AAC/H,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,wBAA6B,GAAG,iBAAiB,CAoDjG"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `MockProcessRunner` — an in-memory fake of `ProcessRunner`
|
|
3
|
+
* (../process-runner.ts) for tests. No live `syft`/`buildx`/
|
|
4
|
+
* `cyclonedx-maven`/`cdxgen`/`oras`, no child process spawned at all: every
|
|
5
|
+
* call is recorded, and `run`/`available` return scripted results — the same
|
|
6
|
+
* convention `../__tests__/mock-cloud-executor.ts` uses for `CloudExecutor`.
|
|
7
|
+
*
|
|
8
|
+
* Every test that exercises a #610 real backend (`ToolSbomGenerator`,
|
|
9
|
+
* `OrasReferrerLookup`, `publish-image`'s referrer-attach step) builds one
|
|
10
|
+
* `MockProcessRunner`, scripts which tools are "installed" and what each
|
|
11
|
+
* command's canned stdout is, and passes it in — never touching the real,
|
|
12
|
+
* `child_process`-backed runner.
|
|
13
|
+
*/
|
|
14
|
+
import type { ProcessRunner, RunOptions } from "../process-runner.js";
|
|
15
|
+
export interface RecordedProcessCall {
|
|
16
|
+
command: string;
|
|
17
|
+
options?: RunOptions;
|
|
18
|
+
}
|
|
19
|
+
export interface MockProcessRunnerOptions {
|
|
20
|
+
/** Which tools `available()` reports as installed. Default: every tool is available (opt a test into "missing tool" by naming it here with `false`, or by omitting it when `defaultAvailable` is `false`). */
|
|
21
|
+
tools?: Record<string, boolean>;
|
|
22
|
+
/** `available()`'s answer for a tool not named in `tools`. Default: `true` (most tests aren't about the missing-tool path). */
|
|
23
|
+
defaultAvailable?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Canned stdout per command, matched by a substring (the first entry whose
|
|
26
|
+
* key is included in the command string wins) — this is deliberately loose
|
|
27
|
+
* rather than an exact-string map, since the SUT constructs full shell
|
|
28
|
+
* command lines the test doesn't want to hand-reconstruct byte-for-byte
|
|
29
|
+
* just to script a response.
|
|
30
|
+
*/
|
|
31
|
+
responses?: Record<string, string>;
|
|
32
|
+
/** Command substrings that should reject (simulates the tool exiting non-zero), mapped to the error message. */
|
|
33
|
+
failures?: Record<string, string>;
|
|
34
|
+
}
|
|
35
|
+
export interface MockProcessRunner {
|
|
36
|
+
runner: ProcessRunner;
|
|
37
|
+
calls: RecordedProcessCall[];
|
|
38
|
+
/** Change a tool's reported availability after construction. */
|
|
39
|
+
setAvailable(tool: string, available: boolean): void;
|
|
40
|
+
/** Script (or replace) a command substring's canned stdout after construction. */
|
|
41
|
+
setResponse(commandSubstring: string, stdout: string): void;
|
|
42
|
+
}
|
|
43
|
+
/** Build a fresh mock `ProcessRunner`. Every method is deterministic and synchronous-fast — no real process spawned, no real delay. */
|
|
44
|
+
export declare function createMockProcessRunner(options?: MockProcessRunnerOptions): MockProcessRunner;
|
|
45
|
+
//# sourceMappingURL=mock-process-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-process-runner.d.ts","sourceRoot":"","sources":["../../../../src/components/verbs/__tests__/mock-process-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAiB,aAAa,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAElF,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,8MAA8M;IAC9M,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,+HAA+H;IAC/H,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,gHAAgH;IAChH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,gEAAgE;IAChE,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IACrD,kFAAkF;IAClF,WAAW,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7D;AAED,uIAAuI;AACvI,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,wBAA6B,GAAG,iBAAiB,CA8BjG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `MockSbomGenerator` — an in-memory fake of `SbomGenerator`
|
|
3
|
+
* (../sbom-generator.ts) for tests. No live `syft`/`docker buildx`/
|
|
4
|
+
* `cyclonedx-maven`/`cdxgen`, no network: every method records its call and
|
|
5
|
+
* returns a deterministic, canned `SbomDocument` derived from its inputs, the
|
|
6
|
+
* same convention `../__tests__/mock-cloud-executor.ts` uses for
|
|
7
|
+
* `CloudExecutor` (a fake digest suffix derived from the call's arguments,
|
|
8
|
+
* stable across calls with the same args).
|
|
9
|
+
*
|
|
10
|
+
* Every test that exercises `generate-sbom` (../sbom.ts) builds one
|
|
11
|
+
* `MockSbomGenerator` and passes it to `createGenerateSbomCapability`,
|
|
12
|
+
* never touching a real scanner.
|
|
13
|
+
*/
|
|
14
|
+
import type { SbomGenerator } from "../sbom-generator.js";
|
|
15
|
+
export interface RecordedSbomCall {
|
|
16
|
+
method: "forImage" | "forJar" | "forZip" | "forDir";
|
|
17
|
+
args: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface MockSbomGeneratorOptions {
|
|
20
|
+
/** Force every call to fail (simulates a scanner crash/timeout). */
|
|
21
|
+
fail?: boolean;
|
|
22
|
+
/** Package count reported for every generated SBOM. Default: 3. */
|
|
23
|
+
packageCount?: number;
|
|
24
|
+
/** Generator/tool name reported. Default: "mock-syft". */
|
|
25
|
+
generatorName?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface MockSbomGenerator {
|
|
28
|
+
generator: SbomGenerator;
|
|
29
|
+
calls: RecordedSbomCall[];
|
|
30
|
+
}
|
|
31
|
+
/** Build a fresh mock `SbomGenerator`. Every method is deterministic and synchronous-fast — no real scan delay. */
|
|
32
|
+
export declare function createMockSbomGenerator(options?: MockSbomGeneratorOptions): MockSbomGenerator;
|
|
33
|
+
//# sourceMappingURL=mock-sbom-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-sbom-generator.d.ts","sourceRoot":"","sources":["../../../../src/components/verbs/__tests__/mock-sbom-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAOV,aAAa,EACd,MAAM,mBAAmB,CAAC;AAG3B,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACpD,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC,oEAAoE;IACpE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,aAAa,CAAC;IACzB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B;AAED,mHAAmH;AACnH,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,wBAA6B,GAAG,iBAAiB,CAuCjG"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native JSON BOM writer (#613, epic #551 follow-up to #606). Pure
|
|
3
|
+
* TypeScript, no external binaries (no `syft`/`buildx --sbom`/`cyclonedx-maven`/
|
|
4
|
+
* `oras`/`cosign`), no network — every document below is assembled entirely
|
|
5
|
+
* from in-memory data and `JSON.stringify`.
|
|
6
|
+
*
|
|
7
|
+
* This module is the shared serialization core both real `SbomGenerator`
|
|
8
|
+
* backends in this directory build on: the software leaf
|
|
9
|
+
* (./lockfile-sbom-generator.ts, lockfile/manifest-derived package lists) and
|
|
10
|
+
* the IaC leaf (./config-bom.ts, synthesized-template-derived component
|
|
11
|
+
* lists). Neither backend hand-rolls its own SPDX/CycloneDX shape — both
|
|
12
|
+
* call `writeSpdx`/`writeCycloneDx` here so the two document standards have
|
|
13
|
+
* exactly one writer each in the whole codebase.
|
|
14
|
+
*
|
|
15
|
+
* **Why hand-write the JSON instead of a library.** No SPDX/CycloneDX SDK is
|
|
16
|
+
* a dependency of this package (matching ./cloud-executor.ts's stance on the
|
|
17
|
+
* AWS SDK: shell out or hand-roll rather than add a heavy dependency for a
|
|
18
|
+
* narrow need). Both standards' JSON forms are simple enough — a handful of
|
|
19
|
+
* required top-level fields plus an array of package/component records — that
|
|
20
|
+
* a ~100-line writer is more auditable than a dependency. Structural
|
|
21
|
+
* correctness (required fields, enum values) is verified in
|
|
22
|
+
* ./bom-writer.test.ts against each standard's own published JSON Schema
|
|
23
|
+
* (vendored as devDep test fixtures, the same convention #553 used for the
|
|
24
|
+
* Component contract schema — see ./__fixtures__/schemas/).
|
|
25
|
+
*
|
|
26
|
+
* **Format decisions, recorded for reviewers:**
|
|
27
|
+
* - SPDX **2.3** (not 2.2 or 3.0): 2.3 is what BuildKit's native `--sbom`
|
|
28
|
+
* attestation emits (referenced in ./sbom-generator.ts's module doc), so
|
|
29
|
+
* matching that version keeps a future BuildKit-backed `forImage` and this
|
|
30
|
+
* lockfile-backed backend speaking the same SPDX dialect. SPDX 3.0 is a
|
|
31
|
+
* substantially different (JSON-LD/RDF-shaped) model not yet the de facto
|
|
32
|
+
* tooling default as of this writing.
|
|
33
|
+
* - CycloneDX **1.5** (not 1.4 or 1.6): 1.5 is the version most broadly
|
|
34
|
+
* supported by consumer tooling (Dependency-Track, `cyclonedx-cli`) at
|
|
35
|
+
* time of writing and has a stable published JSON Schema; 1.6 adds fields
|
|
36
|
+
* this writer doesn't need yet.
|
|
37
|
+
* - `documentNamespace`/`serialNumber` are deterministic, derived from the
|
|
38
|
+
* subject's digest/path rather than a random UUID, so two BOM generations
|
|
39
|
+
* of byte-identical inputs produce byte-identical documents — the same
|
|
40
|
+
* content-addressing property ./build-archive.ts's `contentDigest`
|
|
41
|
+
* depends on for its "identical inputs -> identical manifest digest"
|
|
42
|
+
* guarantee (see ./sbom.test.ts's existing test of that property).
|
|
43
|
+
*
|
|
44
|
+
* **Assembly (#614).** `BomInput.subDocuments`, when present, projects each
|
|
45
|
+
* sub-document as a real nested unit rather than flattening its packages into
|
|
46
|
+
* the root's own list — CycloneDX's `metadata.component.components` +
|
|
47
|
+
* `compositions` (`aggregate: "incomplete"`, since a component BOM only
|
|
48
|
+
* composes the leaf BOMs it was given, never a closed-world claim over
|
|
49
|
+
* everything the artifact might contain), SPDX's `hasFiles`-style `CONTAINS`
|
|
50
|
+
* relationship from the root package to each sub-document's own root package
|
|
51
|
+
* plus that sub-document's own `DEPENDS_ON` edges. This is what
|
|
52
|
+
* ./component-bom.ts's `aggregateComponentBom` uses to compose a component's
|
|
53
|
+
* leaf BOMs (a software SBOM plus an IaC config-BOM) into one document
|
|
54
|
+
* without flattening away which packages came from which leaf — still one
|
|
55
|
+
* writer per standard, extended rather than duplicated.
|
|
56
|
+
*/
|
|
57
|
+
import { type SbomFormat } from "./sbom-generator.js";
|
|
58
|
+
/**
|
|
59
|
+
* One dependency/component the BOM enumerates — the standard-agnostic unit
|
|
60
|
+
* both `writeSpdx` and `writeCycloneDx` project into their own per-format
|
|
61
|
+
* package/component record shape. A generator backend (lockfile parser,
|
|
62
|
+
* config-BOM template walker) builds a `BomPackage[]` once and hands it to
|
|
63
|
+
* whichever writer the requested `format` selects.
|
|
64
|
+
*/
|
|
65
|
+
export interface BomPackage {
|
|
66
|
+
/** Package/component name (npm package name, Maven artifactId, or — for a config-BOM — a resource's logical name/type). */
|
|
67
|
+
name: string;
|
|
68
|
+
/** Version string, when known. Omitted for resources with no version concept (e.g. a CFN resource). */
|
|
69
|
+
version?: string;
|
|
70
|
+
/** Package manager / ecosystem this entry came from (e.g. "npm", "maven"), surfaced in SPDX's `externalRefs`/CycloneDX's `purl` when derivable. */
|
|
71
|
+
type?: "npm" | "maven" | "config" | "external-reference";
|
|
72
|
+
/** Package URL (purl), when derivable — e.g. `pkg:npm/left-pad@1.3.0`. */
|
|
73
|
+
purl?: string;
|
|
74
|
+
/** SPDX download location, when known. Defaults to `"NOASSERTION"` per the SPDX spec's requirement that every package declare one. */
|
|
75
|
+
downloadLocation?: string;
|
|
76
|
+
/** Names of other `BomPackage.name` entries this one depends on — projected into SPDX's `relationships` (`DEPENDS_ON`) and CycloneDX's `dependencies`. */
|
|
77
|
+
dependsOn?: string[];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* One nested BOM unit an assembly (#614) composes into its root document —
|
|
81
|
+
* projected as a real nested `components` entry in CycloneDX and a
|
|
82
|
+
* `CONTAINS`-linked sub-package group in SPDX, never flattened into the
|
|
83
|
+
* root's own package list. Typically one leaf BOM (a software SBOM or an IaC
|
|
84
|
+
* config-BOM) a component produced, see ./component-bom.ts.
|
|
85
|
+
*/
|
|
86
|
+
export interface BomSubDocument {
|
|
87
|
+
/** Human-readable name for this sub-document's own subject (e.g. an artifact's archive path). */
|
|
88
|
+
subjectName: string;
|
|
89
|
+
/** Version of this sub-document's subject, when known. */
|
|
90
|
+
subjectVersion?: string;
|
|
91
|
+
/** Stable identity for this sub-document's subject — typically the artifact digest it describes, so the assembly's `CONTAINS`/nested-component edge is traceable back to a real `BuildArchiveEntry.digest`. */
|
|
92
|
+
subjectId: string;
|
|
93
|
+
/** Every package/component this sub-document enumerates. */
|
|
94
|
+
packages: BomPackage[];
|
|
95
|
+
}
|
|
96
|
+
/** Input to both writers: the subject the BOM describes plus its enumerated packages/components. */
|
|
97
|
+
export interface BomInput {
|
|
98
|
+
/** Human-readable name for the BOM's subject (a package name, a template/stack name). */
|
|
99
|
+
subjectName: string;
|
|
100
|
+
/** Version of the subject itself, when known. */
|
|
101
|
+
subjectVersion?: string;
|
|
102
|
+
/** Stable identity for the subject, used to derive deterministic namespace/serial IDs — typically a digest or an archive-relative path. */
|
|
103
|
+
subjectId: string;
|
|
104
|
+
/** Every package/component the BOM enumerates. */
|
|
105
|
+
packages: BomPackage[];
|
|
106
|
+
/** Name of the tool that produced this document (surfaced in SPDX's `creationInfo.creators` / CycloneDX's `metadata.tools`). */
|
|
107
|
+
generator: string;
|
|
108
|
+
/**
|
|
109
|
+
* Nested BOM units to compose into this document as an assembly (#614) —
|
|
110
|
+
* present only for a component-level aggregation BOM (see
|
|
111
|
+
* ./component-bom.ts). When omitted, `writeSpdx`/`writeCycloneDx` behave
|
|
112
|
+
* exactly as before #614: a flat single-subject document.
|
|
113
|
+
*/
|
|
114
|
+
subDocuments?: BomSubDocument[];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Native SPDX-2.3 JSON writer. Emits the required top-level fields
|
|
118
|
+
* (`spdxVersion`, `dataLicense`, `SPDXID`, `name`, `documentNamespace`,
|
|
119
|
+
* `creationInfo`, `packages`) plus a `relationships` array recording the
|
|
120
|
+
* document's `DESCRIBES` edge to the subject package and each package's
|
|
121
|
+
* declared `DEPENDS_ON` edges — the "valid relationships section where
|
|
122
|
+
* applicable" #613 calls for.
|
|
123
|
+
*
|
|
124
|
+
* When `input.subDocuments` is present (#614 assembly), each sub-document's
|
|
125
|
+
* own root package is emitted alongside the top-level subject, linked from
|
|
126
|
+
* the top-level subject via a `CONTAINS` relationship, with that
|
|
127
|
+
* sub-document's own packages and `DEPENDS_ON` edges nested under an
|
|
128
|
+
* SPDX-ID namespace unique to it (`SPDXRef-Package-sub<n>-...`) so packages
|
|
129
|
+
* from different leaf BOMs never collide even if same-named.
|
|
130
|
+
*/
|
|
131
|
+
export declare function writeSpdx(input: BomInput, now?: () => Date): string;
|
|
132
|
+
/**
|
|
133
|
+
* Native CycloneDX-1.5 JSON writer. Emits the required top-level fields
|
|
134
|
+
* (`bomFormat`, `specVersion`, `serialNumber`, `version`, `metadata`,
|
|
135
|
+
* `components`) plus a `dependencies` array recording the root subject's
|
|
136
|
+
* direct dependencies and each component's own declared dependencies.
|
|
137
|
+
*
|
|
138
|
+
* When `input.subDocuments` is present (#614 assembly), each sub-document is
|
|
139
|
+
* projected as a real nested component under `metadata.component.components`
|
|
140
|
+
* (CycloneDX's own "hierarchical representation of component assemblies,
|
|
141
|
+
* similar to system -> subsystem -> parts" per its schema doc) — never
|
|
142
|
+
* flattened into the root's own `components` array — with a `compositions`
|
|
143
|
+
* entry recording the aggregate as `"incomplete"` (this document composes
|
|
144
|
+
* exactly the leaf BOMs it was given, not a closed-world claim over
|
|
145
|
+
* everything the artifact might contain) and a root `dependencies` edge from
|
|
146
|
+
* the top-level subject to each sub-document's root.
|
|
147
|
+
*/
|
|
148
|
+
export declare function writeCycloneDx(input: BomInput, now?: () => Date): string;
|
|
149
|
+
/** Serialize `input` in the requested `format` and wrap it as the project-wide `{ format, mediaType, bytes }` doc shape (./sbom-generator.ts's `SbomDocument`, minus `generator`/`packageCount` which the caller fills in). */
|
|
150
|
+
export declare function writeBom(format: SbomFormat, input: BomInput, now?: () => Date): {
|
|
151
|
+
format: SbomFormat;
|
|
152
|
+
mediaType: string;
|
|
153
|
+
bytes: string;
|
|
154
|
+
};
|
|
155
|
+
//# sourceMappingURL=bom-writer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bom-writer.d.ts","sourceRoot":"","sources":["../../../src/components/verbs/bom-writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAEH,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAIrE;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,2HAA2H;IAC3H,IAAI,EAAE,MAAM,CAAC;IACb,uGAAuG;IACvG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mJAAmJ;IACnJ,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,oBAAoB,CAAC;IACzD,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sIAAsI;IACtI,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0JAA0J;IAC1J,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,iGAAiG;IACjG,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+MAA+M;IAC/M,SAAS,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB;AAED,oGAAoG;AACpG,MAAM,WAAW,QAAQ;IACvB,yFAAyF;IACzF,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2IAA2I;IAC3I,SAAS,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,gIAAgI;IAChI,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;CACjC;AAyDD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,GAAE,MAAM,IAAuB,GAAG,MAAM,CAyErF;AAsBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,GAAE,MAAM,IAAuB,GAAG,MAAM,CAgE1F;AAUD,+NAA+N;AAC/N,wBAAgB,QAAQ,CACtB,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,QAAQ,EACf,GAAG,CAAC,EAAE,MAAM,IAAI,GACf;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAG1D"}
|