@mannyc1/ts-release 0.0.7 → 0.3.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/ARCHITECTURE.md +184 -92
- package/CHANGELOG.md +197 -0
- package/LICENSE +21 -0
- package/README.md +404 -327
- package/SPEC.md +257 -310
- package/apps/release-ts/README.md +39 -0
- package/apps/release-ts/src/cli/command.ts +164 -0
- package/apps/release-ts/src/cli/commands.ts +351 -0
- package/apps/release-ts/src/cli/main.ts +43 -0
- package/apps/release-ts/src/cli/node-main.ts +49 -0
- package/apps/ts-release-agents/LICENSE +21 -0
- package/apps/ts-release-agents/README.md +21 -0
- package/apps/ts-release-agents/evals/cases.json +11 -0
- package/apps/ts-release-agents/manifests/claude.json +5 -0
- package/apps/ts-release-agents/manifests/codex.json +5 -0
- package/apps/ts-release-agents/package.json +11 -0
- package/apps/ts-release-agents/skills/release/SKILL.md +48 -0
- package/apps/ts-release-agents/skills/release/references/configuration.md +18 -0
- package/apps/ts-release-agents/skills/release/references/recovery.md +10 -0
- package/apps/ts-release-agents/skills/release/references/staged-workflow.md +12 -0
- package/apps/ts-release-agents/skills/release/references/target-selection.md +13 -0
- package/apps/ts-release-agents/skills/release/references/verification.md +14 -0
- package/apps/ts-release-agents/src/build.ts +105 -0
- package/apps/ts-release-agents/src/check.ts +122 -0
- package/apps/ts-release-agents/src/install.ts +121 -0
- package/apps/ts-release-agents/test/contract.test.ts +56 -0
- package/apps/ts-release-agents/tsconfig.json +5 -0
- package/dist/api/api.d.ts +15 -0
- package/dist/api/api.d.ts.map +1 -0
- package/dist/api/api.js +244 -0
- package/dist/api/api.js.map +1 -0
- package/dist/api/errors.d.ts +39 -0
- package/dist/api/errors.d.ts.map +1 -0
- package/dist/api/errors.js +32 -0
- package/dist/api/errors.js.map +1 -0
- package/dist/api/input.d.ts +10 -0
- package/dist/api/input.d.ts.map +1 -0
- package/dist/api/input.js +73 -0
- package/dist/api/input.js.map +1 -0
- package/dist/api/runtime.d.ts +18 -0
- package/dist/api/runtime.d.ts.map +1 -0
- package/dist/api/runtime.js +7 -0
- package/dist/api/runtime.js.map +1 -0
- package/dist/api/types.d.ts +76 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +17 -0
- package/dist/api/types.js.map +1 -0
- package/dist/bin/ts-release.js +39346 -0
- package/dist/capabilities/bun-targets.d.ts +3 -0
- package/dist/capabilities/bun-targets.d.ts.map +1 -0
- package/dist/capabilities/bun-targets.js +3 -0
- package/dist/capabilities/bun-targets.js.map +1 -0
- package/dist/capabilities/field-ownership.d.ts +17 -0
- package/dist/capabilities/field-ownership.d.ts.map +1 -0
- package/dist/capabilities/field-ownership.js +40 -0
- package/dist/capabilities/field-ownership.js.map +1 -0
- package/dist/capabilities/module.d.ts +91 -0
- package/dist/capabilities/module.d.ts.map +1 -0
- package/dist/capabilities/module.js +2 -0
- package/dist/capabilities/module.js.map +1 -0
- package/dist/capabilities/registry.d.ts +829 -0
- package/dist/capabilities/registry.d.ts.map +1 -0
- package/dist/capabilities/registry.js +291 -0
- package/dist/capabilities/registry.js.map +1 -0
- package/dist/config/config.d.ts +6 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +42 -0
- package/dist/config/config.js.map +1 -0
- package/dist/correction/coordinator.d.ts +248 -0
- package/dist/correction/coordinator.d.ts.map +1 -0
- package/dist/correction/coordinator.js +274 -0
- package/dist/correction/coordinator.js.map +1 -0
- package/dist/correction/index.d.ts +3 -0
- package/dist/correction/index.d.ts.map +1 -0
- package/dist/correction/index.js +3 -0
- package/dist/correction/index.js.map +1 -0
- package/dist/correction/intent.d.ts +111 -0
- package/dist/correction/intent.d.ts.map +1 -0
- package/dist/correction/intent.js +146 -0
- package/dist/correction/intent.js.map +1 -0
- package/dist/drivers/archive.d.ts +9 -0
- package/dist/drivers/archive.d.ts.map +1 -0
- package/dist/drivers/archive.js +105 -0
- package/dist/drivers/archive.js.map +1 -0
- package/dist/drivers/contain.d.ts +6 -0
- package/dist/drivers/contain.d.ts.map +1 -0
- package/dist/drivers/contain.js +17 -0
- package/dist/drivers/contain.js.map +1 -0
- package/dist/drivers/environment.d.ts +4 -0
- package/dist/drivers/environment.d.ts.map +1 -0
- package/dist/drivers/environment.js +18 -0
- package/dist/drivers/environment.js.map +1 -0
- package/dist/drivers/errors.d.ts +9 -0
- package/dist/drivers/errors.d.ts.map +1 -0
- package/dist/drivers/errors.js +6 -0
- package/dist/drivers/errors.js.map +1 -0
- package/dist/drivers/glob.d.ts +2 -0
- package/dist/drivers/glob.d.ts.map +1 -0
- package/dist/drivers/glob.js +162 -0
- package/dist/drivers/glob.js.map +1 -0
- package/dist/drivers/process.d.ts +48 -0
- package/dist/drivers/process.d.ts.map +1 -0
- package/dist/drivers/process.js +257 -0
- package/dist/drivers/process.js.map +1 -0
- package/dist/drivers/python-wheel.d.ts +21 -0
- package/dist/drivers/python-wheel.d.ts.map +1 -0
- package/dist/drivers/python-wheel.js +109 -0
- package/dist/drivers/python-wheel.js.map +1 -0
- package/dist/drivers/redact.d.ts +4 -0
- package/dist/drivers/redact.d.ts.map +1 -0
- package/dist/drivers/redact.js +24 -0
- package/dist/drivers/redact.js.map +1 -0
- package/dist/drivers/seccomp-helper-source.d.ts +7 -0
- package/dist/drivers/seccomp-helper-source.d.ts.map +1 -0
- package/dist/drivers/seccomp-helper-source.js +121 -0
- package/dist/drivers/seccomp-helper-source.js.map +1 -0
- package/dist/drivers/utils.d.ts +4 -0
- package/dist/drivers/utils.d.ts.map +1 -0
- package/dist/drivers/utils.js +5 -0
- package/dist/drivers/utils.js.map +1 -0
- package/dist/drivers/workspace.d.ts +9 -0
- package/dist/drivers/workspace.d.ts.map +1 -0
- package/dist/drivers/workspace.js +53 -0
- package/dist/drivers/workspace.js.map +1 -0
- package/dist/extensions/provider-adapter.d.ts +48 -0
- package/dist/extensions/provider-adapter.d.ts.map +1 -0
- package/dist/extensions/provider-adapter.js +64 -0
- package/dist/extensions/provider-adapter.js.map +1 -0
- package/dist/host.d.ts +33 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +20 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +19 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/model/artifact-collection.d.ts +84 -0
- package/dist/model/artifact-collection.d.ts.map +1 -0
- package/dist/model/artifact-collection.js +185 -0
- package/dist/model/artifact-collection.js.map +1 -0
- package/dist/model/authority.d.ts +89 -0
- package/dist/model/authority.d.ts.map +1 -0
- package/dist/model/authority.js +80 -0
- package/dist/model/authority.js.map +1 -0
- package/dist/model/bun-targets.d.ts +34 -0
- package/dist/model/bun-targets.d.ts.map +1 -0
- package/dist/model/bun-targets.js +17 -0
- package/dist/model/bun-targets.js.map +1 -0
- package/dist/model/canonical.d.ts +8 -0
- package/dist/model/canonical.d.ts.map +1 -0
- package/dist/model/canonical.js +205 -0
- package/dist/model/canonical.js.map +1 -0
- package/dist/model/catalog.d.ts +76 -0
- package/dist/model/catalog.d.ts.map +1 -0
- package/dist/model/catalog.js +174 -0
- package/dist/model/catalog.js.map +1 -0
- package/dist/model/digest.d.ts +53 -0
- package/dist/model/digest.d.ts.map +1 -0
- package/dist/model/digest.js +127 -0
- package/dist/model/digest.js.map +1 -0
- package/dist/model/errors.d.ts +14 -0
- package/dist/model/errors.d.ts.map +1 -0
- package/dist/model/errors.js +8 -0
- package/dist/model/errors.js.map +1 -0
- package/dist/model/primitives.d.ts +19 -0
- package/dist/model/primitives.d.ts.map +1 -0
- package/dist/model/primitives.js +18 -0
- package/dist/model/primitives.js.map +1 -0
- package/dist/model/pypi.d.ts +12 -0
- package/dist/model/pypi.d.ts.map +1 -0
- package/dist/model/pypi.js +20 -0
- package/dist/model/pypi.js.map +1 -0
- package/dist/model/python-distribution.d.ts +33 -0
- package/dist/model/python-distribution.d.ts.map +1 -0
- package/dist/model/python-distribution.js +367 -0
- package/dist/model/python-distribution.js.map +1 -0
- package/dist/model/secret-patterns.d.ts +2 -0
- package/dist/model/secret-patterns.d.ts.map +1 -0
- package/dist/model/secret-patterns.js +12 -0
- package/dist/model/secret-patterns.js.map +1 -0
- package/dist/operation-journal/authority.d.ts +3 -0
- package/dist/operation-journal/authority.d.ts.map +1 -0
- package/dist/operation-journal/authority.js +147 -0
- package/dist/operation-journal/authority.js.map +1 -0
- package/dist/operation-journal/aws/deadline.d.ts +12 -0
- package/dist/operation-journal/aws/deadline.d.ts.map +1 -0
- package/dist/operation-journal/aws/deadline.js +38 -0
- package/dist/operation-journal/aws/deadline.js.map +1 -0
- package/dist/operation-journal/aws/oidc.d.ts +27 -0
- package/dist/operation-journal/aws/oidc.d.ts.map +1 -0
- package/dist/operation-journal/aws/oidc.js +361 -0
- package/dist/operation-journal/aws/oidc.js.map +1 -0
- package/dist/operation-journal/aws/policy.d.ts +42 -0
- package/dist/operation-journal/aws/policy.d.ts.map +1 -0
- package/dist/operation-journal/aws/policy.js +404 -0
- package/dist/operation-journal/aws/policy.js.map +1 -0
- package/dist/operation-journal/aws/s3-boundary.d.ts +17 -0
- package/dist/operation-journal/aws/s3-boundary.d.ts.map +1 -0
- package/dist/operation-journal/aws/s3-boundary.js +417 -0
- package/dist/operation-journal/aws/s3-boundary.js.map +1 -0
- package/dist/operation-journal/aws.d.ts +11 -0
- package/dist/operation-journal/aws.d.ts.map +1 -0
- package/dist/operation-journal/aws.js +50 -0
- package/dist/operation-journal/aws.js.map +1 -0
- package/dist/operation-journal/canonical.d.ts +52 -0
- package/dist/operation-journal/canonical.d.ts.map +1 -0
- package/dist/operation-journal/canonical.js +282 -0
- package/dist/operation-journal/canonical.js.map +1 -0
- package/dist/operation-journal/model.d.ts +251 -0
- package/dist/operation-journal/model.d.ts.map +1 -0
- package/dist/operation-journal/model.js +56 -0
- package/dist/operation-journal/model.js.map +1 -0
- package/dist/operation-journal/reducer.d.ts +28 -0
- package/dist/operation-journal/reducer.d.ts.map +1 -0
- package/dist/operation-journal/reducer.js +73 -0
- package/dist/operation-journal/reducer.js.map +1 -0
- package/dist/operation-journal/s3.d.ts +7 -0
- package/dist/operation-journal/s3.d.ts.map +1 -0
- package/dist/operation-journal/s3.js +667 -0
- package/dist/operation-journal/s3.js.map +1 -0
- package/dist/operation-journal.d.ts +14 -0
- package/dist/operation-journal.d.ts.map +1 -0
- package/dist/operation-journal.js +12 -0
- package/dist/operation-journal.js.map +1 -0
- package/dist/platform/bun.d.ts +7 -0
- package/dist/platform/bun.d.ts.map +1 -0
- package/dist/platform/bun.js +15 -0
- package/dist/platform/bun.js.map +1 -0
- package/dist/platform/credentials.d.ts +32 -0
- package/dist/platform/credentials.d.ts.map +1 -0
- package/dist/platform/credentials.js +834 -0
- package/dist/platform/credentials.js.map +1 -0
- package/dist/platform/host-support.d.ts +2 -0
- package/dist/platform/host-support.d.ts.map +1 -0
- package/dist/platform/host-support.js +4 -0
- package/dist/platform/host-support.js.map +1 -0
- package/dist/platform/node.d.ts +7 -0
- package/dist/platform/node.d.ts.map +1 -0
- package/dist/platform/node.js +15 -0
- package/dist/platform/node.js.map +1 -0
- package/dist/platform/release-runtime.d.ts +11 -0
- package/dist/platform/release-runtime.d.ts.map +1 -0
- package/dist/platform/release-runtime.js +34 -0
- package/dist/platform/release-runtime.js.map +1 -0
- package/dist/platform/services.d.ts +15 -0
- package/dist/platform/services.d.ts.map +1 -0
- package/dist/platform/services.js +30 -0
- package/dist/platform/services.js.map +1 -0
- package/dist/platform/source-observer.d.ts +5 -0
- package/dist/platform/source-observer.d.ts.map +1 -0
- package/dist/platform/source-observer.js +159 -0
- package/dist/platform/source-observer.js.map +1 -0
- package/dist/provider-sdk.d.ts +14 -0
- package/dist/provider-sdk.d.ts.map +1 -0
- package/dist/provider-sdk.js +10 -0
- package/dist/provider-sdk.js.map +1 -0
- package/dist/publication/adapter.d.ts +212 -0
- package/dist/publication/adapter.d.ts.map +1 -0
- package/dist/publication/adapter.js +83 -0
- package/dist/publication/adapter.js.map +1 -0
- package/dist/publication/authority.d.ts +137 -0
- package/dist/publication/authority.d.ts.map +1 -0
- package/dist/publication/authority.js +233 -0
- package/dist/publication/authority.js.map +1 -0
- package/dist/publication/catalog-git.d.ts +37 -0
- package/dist/publication/catalog-git.d.ts.map +1 -0
- package/dist/publication/catalog-git.js +451 -0
- package/dist/publication/catalog-git.js.map +1 -0
- package/dist/publication/claim.d.ts +39 -0
- package/dist/publication/claim.d.ts.map +1 -0
- package/dist/publication/claim.js +31 -0
- package/dist/publication/claim.js.map +1 -0
- package/dist/publication/coordinator.d.ts +246 -0
- package/dist/publication/coordinator.d.ts.map +1 -0
- package/dist/publication/coordinator.js +370 -0
- package/dist/publication/coordinator.js.map +1 -0
- package/dist/publication/github.d.ts +36 -0
- package/dist/publication/github.d.ts.map +1 -0
- package/dist/publication/github.js +695 -0
- package/dist/publication/github.js.map +1 -0
- package/dist/publication/http.d.ts +69 -0
- package/dist/publication/http.d.ts.map +1 -0
- package/dist/publication/http.js +29 -0
- package/dist/publication/http.js.map +1 -0
- package/dist/publication/index.d.ts +5 -0
- package/dist/publication/index.d.ts.map +1 -0
- package/dist/publication/index.js +5 -0
- package/dist/publication/index.js.map +1 -0
- package/dist/publication/npm.d.ts +40 -0
- package/dist/publication/npm.d.ts.map +1 -0
- package/dist/publication/npm.js +359 -0
- package/dist/publication/npm.js.map +1 -0
- package/dist/publication/profiles.d.ts +136 -0
- package/dist/publication/profiles.d.ts.map +1 -0
- package/dist/publication/profiles.js +90 -0
- package/dist/publication/profiles.js.map +1 -0
- package/dist/publication/publisher.d.ts +82 -0
- package/dist/publication/publisher.d.ts.map +1 -0
- package/dist/publication/publisher.js +53 -0
- package/dist/publication/publisher.js.map +1 -0
- package/dist/publication/pypi.d.ts +45 -0
- package/dist/publication/pypi.d.ts.map +1 -0
- package/dist/publication/pypi.js +369 -0
- package/dist/publication/pypi.js.map +1 -0
- package/dist/publication/recovery.d.ts +663 -0
- package/dist/publication/recovery.d.ts.map +1 -0
- package/dist/publication/recovery.js +252 -0
- package/dist/publication/recovery.js.map +1 -0
- package/dist/publication/report.d.ts +1061 -0
- package/dist/publication/report.d.ts.map +1 -0
- package/dist/publication/report.js +441 -0
- package/dist/publication/report.js.map +1 -0
- package/dist/recipes/config.d.ts +296 -0
- package/dist/recipes/config.d.ts.map +1 -0
- package/dist/recipes/config.js +325 -0
- package/dist/recipes/config.js.map +1 -0
- package/dist/release/capabilities.d.ts +12 -0
- package/dist/release/capabilities.d.ts.map +1 -0
- package/dist/release/capabilities.js +395 -0
- package/dist/release/capabilities.js.map +1 -0
- package/dist/release/compiler.d.ts +5 -0
- package/dist/release/compiler.d.ts.map +1 -0
- package/dist/release/compiler.js +19 -0
- package/dist/release/compiler.js.map +1 -0
- package/dist/release/config.d.ts +5 -0
- package/dist/release/config.d.ts.map +1 -0
- package/dist/release/config.js +10 -0
- package/dist/release/config.js.map +1 -0
- package/dist/release/context.d.ts +96 -0
- package/dist/release/context.d.ts.map +1 -0
- package/dist/release/context.js +168 -0
- package/dist/release/context.js.map +1 -0
- package/dist/release/graph.d.ts +271 -0
- package/dist/release/graph.d.ts.map +1 -0
- package/dist/release/graph.js +766 -0
- package/dist/release/graph.js.map +1 -0
- package/dist/release/inspect.d.ts +88 -0
- package/dist/release/inspect.d.ts.map +1 -0
- package/dist/release/inspect.js +75 -0
- package/dist/release/inspect.js.map +1 -0
- package/dist/release/prepare.d.ts +24 -0
- package/dist/release/prepare.d.ts.map +1 -0
- package/dist/release/prepare.js +1115 -0
- package/dist/release/prepare.js.map +1 -0
- package/dist/release/prepared-ref.d.ts +60 -0
- package/dist/release/prepared-ref.d.ts.map +1 -0
- package/dist/release/prepared-ref.js +131 -0
- package/dist/release/prepared-ref.js.map +1 -0
- package/dist/release/prepared-store.d.ts +90 -0
- package/dist/release/prepared-store.d.ts.map +1 -0
- package/dist/release/prepared-store.js +339 -0
- package/dist/release/prepared-store.js.map +1 -0
- package/dist/release/prepared.d.ts +172 -0
- package/dist/release/prepared.d.ts.map +1 -0
- package/dist/release/prepared.js +268 -0
- package/dist/release/prepared.js.map +1 -0
- package/dist/release/staging.d.ts +31 -0
- package/dist/release/staging.d.ts.map +1 -0
- package/dist/release/staging.js +218 -0
- package/dist/release/staging.js.map +1 -0
- package/dist/resolve/authored.d.ts +53 -0
- package/dist/resolve/authored.d.ts.map +1 -0
- package/dist/resolve/authored.js +55 -0
- package/dist/resolve/authored.js.map +1 -0
- package/dist/resolve/encode.d.ts +3 -0
- package/dist/resolve/encode.d.ts.map +1 -0
- package/dist/resolve/encode.js +21 -0
- package/dist/resolve/encode.js.map +1 -0
- package/dist/resolve/errors.d.ts +7 -0
- package/dist/resolve/errors.d.ts.map +1 -0
- package/dist/resolve/errors.js +17 -0
- package/dist/resolve/errors.js.map +1 -0
- package/dist/resolve/facts.d.ts +12 -0
- package/dist/resolve/facts.d.ts.map +1 -0
- package/dist/resolve/facts.js +18 -0
- package/dist/resolve/facts.js.map +1 -0
- package/dist/resolve/resolve.d.ts +10 -0
- package/dist/resolve/resolve.d.ts.map +1 -0
- package/dist/resolve/resolve.js +242 -0
- package/dist/resolve/resolve.js.map +1 -0
- package/dist/store.d.ts +11 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +9 -0
- package/dist/store.js.map +1 -0
- package/examples/README.md +20 -30
- package/examples/github-release/release.config.json +11 -18
- package/examples/homebrew-tap/README.md +11 -0
- package/examples/homebrew-tap/release.config.json +40 -28
- package/examples/multi-target/release.config.json +28 -53
- package/examples/npm-first-publish/release.config.json +23 -25
- package/examples/npm-only/release.config.json +22 -30
- package/examples/portable-cli/README.md +17 -0
- package/examples/portable-cli/artifacts/portable-example-0.1.0-darwin-arm64 +1 -0
- package/examples/portable-cli/artifacts/portable-example-0.1.0-darwin-x64 +1 -0
- package/examples/portable-cli/artifacts/portable-example-0.1.0-linux-arm64 +1 -0
- package/examples/portable-cli/artifacts/portable-example-0.1.0-linux-x64 +1 -0
- package/examples/portable-cli/artifacts/portable-example-0.1.0-windows-x64.exe +1 -0
- package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-macosx_10_15_x86_64.whl +1 -0
- package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-macosx_11_0_arm64.whl +1 -0
- package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-manylinux2014_aarch64.whl +1 -0
- package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-manylinux2014_x86_64.whl +1 -0
- package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-win_amd64.whl +1 -0
- package/examples/portable-cli/package.json +9 -0
- package/examples/portable-cli/release.config.json +53 -0
- package/examples/portable-cli/src/cli.ts +3 -0
- package/examples/pypi-registry/README.md +8 -0
- package/examples/scoop-bucket/README.md +10 -0
- package/examples/scoop-bucket/release.config.json +40 -30
- package/package.json +73 -154
- package/src/api/api.ts +365 -0
- package/src/api/errors.ts +36 -0
- package/src/api/input.ts +92 -0
- package/src/api/runtime.ts +14 -0
- package/src/api/types.ts +103 -0
- package/src/capabilities/bun-targets.ts +2 -0
- package/src/capabilities/field-ownership.ts +60 -0
- package/src/capabilities/module.ts +158 -0
- package/src/capabilities/registry.ts +333 -0
- package/src/config/config.ts +48 -0
- package/src/correction/coordinator.ts +336 -0
- package/src/correction/index.ts +2 -0
- package/src/correction/intent.ts +172 -0
- package/src/drivers/archive.ts +111 -0
- package/src/drivers/contain.ts +20 -0
- package/src/drivers/environment.ts +28 -0
- package/src/drivers/errors.ts +6 -0
- package/src/drivers/glob.ts +137 -0
- package/src/drivers/process.ts +339 -0
- package/src/drivers/python-wheel.ts +145 -0
- package/src/drivers/redact.ts +31 -0
- package/src/drivers/seccomp-helper-source.ts +121 -0
- package/src/drivers/utils.ts +10 -0
- package/src/drivers/workspace.ts +46 -0
- package/src/extensions/provider-adapter.ts +99 -0
- package/src/host.ts +140 -0
- package/src/index.ts +64 -0
- package/src/model/artifact-collection.ts +237 -0
- package/src/model/authority.ts +116 -0
- package/src/model/bun-targets.ts +34 -0
- package/src/model/canonical.ts +205 -0
- package/src/model/catalog.ts +220 -0
- package/src/model/digest.ts +172 -0
- package/src/model/errors.ts +6 -0
- package/src/model/primitives.ts +37 -0
- package/src/model/pypi.ts +30 -0
- package/src/model/python-distribution.ts +360 -0
- package/src/model/secret-patterns.ts +11 -0
- package/src/operation-journal/authority.ts +162 -0
- package/src/operation-journal/aws/deadline.ts +41 -0
- package/src/operation-journal/aws/oidc.ts +439 -0
- package/src/operation-journal/aws/policy.ts +491 -0
- package/src/operation-journal/aws/s3-boundary.ts +562 -0
- package/src/operation-journal/aws.ts +60 -0
- package/src/operation-journal/canonical.ts +373 -0
- package/src/operation-journal/model.ts +301 -0
- package/src/operation-journal/reducer.ts +112 -0
- package/src/operation-journal/s3.ts +884 -0
- package/src/operation-journal.ts +51 -0
- package/src/platform/bun.ts +38 -0
- package/src/platform/credentials.ts +1151 -0
- package/src/platform/host-support.ts +4 -0
- package/src/platform/node.ts +38 -0
- package/src/platform/release-runtime.ts +47 -0
- package/src/platform/services.ts +57 -0
- package/src/platform/source-observer.ts +193 -0
- package/src/provider-sdk.ts +48 -0
- package/src/publication/adapter.ts +132 -0
- package/src/publication/authority.ts +397 -0
- package/src/publication/catalog-git.ts +603 -0
- package/src/publication/claim.ts +51 -0
- package/src/publication/coordinator.ts +578 -0
- package/src/publication/github.ts +1022 -0
- package/src/publication/http.ts +101 -0
- package/src/publication/index.ts +4 -0
- package/src/publication/npm.ts +525 -0
- package/src/publication/profiles.ts +94 -0
- package/src/publication/publisher.ts +130 -0
- package/src/publication/pypi.ts +463 -0
- package/src/publication/recovery.ts +349 -0
- package/src/publication/report.ts +628 -0
- package/src/recipes/config.ts +395 -0
- package/src/release/capabilities.ts +460 -0
- package/src/release/compiler.ts +28 -0
- package/src/release/config.ts +12 -0
- package/src/release/context.ts +223 -0
- package/src/release/graph.ts +866 -0
- package/src/release/inspect.ts +83 -0
- package/src/release/prepare.ts +1329 -0
- package/src/release/prepared-ref.ts +193 -0
- package/src/release/prepared-store.ts +378 -0
- package/src/release/prepared.ts +299 -0
- package/src/release/staging.ts +257 -0
- package/src/resolve/authored.ts +64 -0
- package/src/resolve/encode.ts +22 -0
- package/src/resolve/errors.ts +15 -0
- package/src/resolve/facts.ts +18 -0
- package/src/resolve/resolve.ts +328 -0
- package/src/store.ts +28 -0
- package/templates/README.md +55 -72
- package/templates/bun-cli-github/README.md +7 -9
- package/templates/bun-cli-github/release.config.json +35 -73
- package/templates/github-actions/release.yml +74 -0
- package/templates/github-actions/reviewed-release.yml +115 -0
- package/templates/multi-target-homebrew/README.md +10 -0
- package/templates/multi-target-homebrew/release.config.json +43 -60
- package/templates/multi-target-scoop/README.md +10 -0
- package/templates/multi-target-scoop/release.config.json +43 -62
- package/templates/npm-github/release.config.json +25 -38
- package/templates/npm-github/reviewed-release.config.json +37 -0
- package/templates/npm-only/README.md +10 -0
- package/templates/npm-only/release.config.json +15 -30
- package/templates/portable-cli/README.md +13 -0
- package/templates/portable-cli/release.config.json +53 -0
- package/dist/artifacts/adapter.d.ts +0 -39
- package/dist/artifacts/adapter.d.ts.map +0 -1
- package/dist/artifacts/adapter.js +0 -23
- package/dist/artifacts/adapter.js.map +0 -1
- package/dist/artifacts/registry.d.ts +0 -21
- package/dist/artifacts/registry.d.ts.map +0 -1
- package/dist/artifacts/registry.js +0 -21
- package/dist/artifacts/registry.js.map +0 -1
- package/dist/config/errors.d.ts +0 -24
- package/dist/config/errors.d.ts.map +0 -1
- package/dist/config/errors.js +0 -19
- package/dist/config/errors.js.map +0 -1
- package/dist/config/load.d.ts +0 -9
- package/dist/config/load.d.ts.map +0 -1
- package/dist/config/load.js +0 -29
- package/dist/config/load.js.map +0 -1
- package/dist/config/schema.d.ts +0 -12
- package/dist/config/schema.d.ts.map +0 -1
- package/dist/config/schema.js +0 -19
- package/dist/config/schema.js.map +0 -1
- package/dist/domain/artifact.d.ts +0 -118
- package/dist/domain/artifact.d.ts.map +0 -1
- package/dist/domain/artifact.js +0 -197
- package/dist/domain/artifact.js.map +0 -1
- package/dist/domain/evidence.d.ts +0 -59
- package/dist/domain/evidence.d.ts.map +0 -1
- package/dist/domain/evidence.js +0 -51
- package/dist/domain/evidence.js.map +0 -1
- package/dist/domain/operation.d.ts +0 -143
- package/dist/domain/operation.d.ts.map +0 -1
- package/dist/domain/operation.js +0 -198
- package/dist/domain/operation.js.map +0 -1
- package/dist/domain/release.d.ts +0 -93
- package/dist/domain/release.d.ts.map +0 -1
- package/dist/domain/release.js +0 -82
- package/dist/domain/release.js.map +0 -1
- package/dist/domain/remote-state.d.ts +0 -58
- package/dist/domain/remote-state.d.ts.map +0 -1
- package/dist/domain/remote-state.js +0 -55
- package/dist/domain/remote-state.js.map +0 -1
- package/dist/domain/target.d.ts +0 -148
- package/dist/domain/target.d.ts.map +0 -1
- package/dist/domain/target.js +0 -151
- package/dist/domain/target.js.map +0 -1
- package/dist/host/host.d.ts +0 -32
- package/dist/host/host.d.ts.map +0 -1
- package/dist/host/host.js +0 -24
- package/dist/host/host.js.map +0 -1
- package/dist/host/http-live.d.ts +0 -6
- package/dist/host/http-live.d.ts.map +0 -1
- package/dist/host/http-live.js +0 -86
- package/dist/host/http-live.js.map +0 -1
- package/dist/host/http.d.ts +0 -43
- package/dist/host/http.d.ts.map +0 -1
- package/dist/host/http.js +0 -59
- package/dist/host/http.js.map +0 -1
- package/dist/host/platform.d.ts +0 -10
- package/dist/host/platform.d.ts.map +0 -1
- package/dist/host/platform.js +0 -114
- package/dist/host/platform.js.map +0 -1
- package/dist/host/test.d.ts +0 -23
- package/dist/host/test.d.ts.map +0 -1
- package/dist/host/test.js +0 -222
- package/dist/host/test.js.map +0 -1
- package/dist/internal/workspace-path.d.ts +0 -15
- package/dist/internal/workspace-path.d.ts.map +0 -1
- package/dist/internal/workspace-path.js +0 -36
- package/dist/internal/workspace-path.js.map +0 -1
- package/dist/planner/artifact-inventory.d.ts +0 -9
- package/dist/planner/artifact-inventory.d.ts.map +0 -1
- package/dist/planner/artifact-inventory.js +0 -86
- package/dist/planner/artifact-inventory.js.map +0 -1
- package/dist/planner/create-release-plan.d.ts +0 -5
- package/dist/planner/create-release-plan.d.ts.map +0 -1
- package/dist/planner/create-release-plan.js +0 -25
- package/dist/planner/create-release-plan.js.map +0 -1
- package/dist/planner/errors.d.ts +0 -67
- package/dist/planner/errors.d.ts.map +0 -1
- package/dist/planner/errors.js +0 -58
- package/dist/planner/errors.js.map +0 -1
- package/dist/planner/evidence-recorder.d.ts +0 -28
- package/dist/planner/evidence-recorder.d.ts.map +0 -1
- package/dist/planner/evidence-recorder.js +0 -362
- package/dist/planner/evidence-recorder.js.map +0 -1
- package/dist/planner/executor.d.ts +0 -58
- package/dist/planner/executor.d.ts.map +0 -1
- package/dist/planner/executor.js +0 -147
- package/dist/planner/executor.js.map +0 -1
- package/dist/planner/normalize-release.d.ts +0 -19
- package/dist/planner/normalize-release.d.ts.map +0 -1
- package/dist/planner/normalize-release.js +0 -342
- package/dist/planner/normalize-release.js.map +0 -1
- package/dist/planner/reconcile.d.ts +0 -17
- package/dist/planner/reconcile.d.ts.map +0 -1
- package/dist/planner/reconcile.js +0 -259
- package/dist/planner/reconcile.js.map +0 -1
- package/dist/planner/render-plan.d.ts +0 -15
- package/dist/planner/render-plan.d.ts.map +0 -1
- package/dist/planner/render-plan.js +0 -231
- package/dist/planner/render-plan.js.map +0 -1
- package/dist/targets/adapter-helpers.d.ts +0 -79
- package/dist/targets/adapter-helpers.d.ts.map +0 -1
- package/dist/targets/adapter-helpers.js +0 -194
- package/dist/targets/adapter-helpers.js.map +0 -1
- package/dist/targets/adapter.d.ts +0 -17
- package/dist/targets/adapter.d.ts.map +0 -1
- package/dist/targets/adapter.js +0 -2
- package/dist/targets/adapter.js.map +0 -1
- package/dist/targets/github-release.d.ts +0 -25
- package/dist/targets/github-release.d.ts.map +0 -1
- package/dist/targets/github-release.js +0 -82
- package/dist/targets/github-release.js.map +0 -1
- package/dist/targets/github.d.ts +0 -11
- package/dist/targets/github.d.ts.map +0 -1
- package/dist/targets/github.js +0 -117
- package/dist/targets/github.js.map +0 -1
- package/dist/targets/homebrew.d.ts +0 -11
- package/dist/targets/homebrew.d.ts.map +0 -1
- package/dist/targets/homebrew.js +0 -210
- package/dist/targets/homebrew.js.map +0 -1
- package/dist/targets/live.d.ts +0 -5
- package/dist/targets/live.d.ts.map +0 -1
- package/dist/targets/live.js +0 -50
- package/dist/targets/live.js.map +0 -1
- package/dist/targets/npm.d.ts +0 -10
- package/dist/targets/npm.d.ts.map +0 -1
- package/dist/targets/npm.js +0 -112
- package/dist/targets/npm.js.map +0 -1
- package/dist/targets/pypi.d.ts +0 -11
- package/dist/targets/pypi.d.ts.map +0 -1
- package/dist/targets/pypi.js +0 -141
- package/dist/targets/pypi.js.map +0 -1
- package/dist/targets/registry.d.ts +0 -25
- package/dist/targets/registry.d.ts.map +0 -1
- package/dist/targets/registry.js +0 -34
- package/dist/targets/registry.js.map +0 -1
- package/dist/targets/scoop.d.ts +0 -11
- package/dist/targets/scoop.d.ts.map +0 -1
- package/dist/targets/scoop.js +0 -88
- package/dist/targets/scoop.js.map +0 -1
- package/dist/types/effect-internal.d.ts +0 -5
- package/dist/types/effect-internal.d.ts.map +0 -1
- package/dist/types/effect-internal.js +0 -2
- package/dist/types/effect-internal.js.map +0 -1
- package/dist/workflows/config.d.ts +0 -202
- package/dist/workflows/config.d.ts.map +0 -1
- package/dist/workflows/config.js +0 -420
- package/dist/workflows/config.js.map +0 -1
- package/dist/workflows/diagnostics.d.ts +0 -62
- package/dist/workflows/diagnostics.d.ts.map +0 -1
- package/dist/workflows/diagnostics.js +0 -530
- package/dist/workflows/diagnostics.js.map +0 -1
- package/dist/workflows/distribution.d.ts +0 -25
- package/dist/workflows/distribution.d.ts.map +0 -1
- package/dist/workflows/distribution.js +0 -24
- package/dist/workflows/distribution.js.map +0 -1
- package/dist/workflows/evidence.d.ts +0 -17
- package/dist/workflows/evidence.d.ts.map +0 -1
- package/dist/workflows/evidence.js +0 -32
- package/dist/workflows/evidence.js.map +0 -1
- package/dist/workflows/index.d.ts +0 -8
- package/dist/workflows/index.d.ts.map +0 -1
- package/dist/workflows/index.js +0 -7
- package/dist/workflows/index.js.map +0 -1
- package/dist/workflows/init.d.ts +0 -84
- package/dist/workflows/init.d.ts.map +0 -1
- package/dist/workflows/init.js +0 -487
- package/dist/workflows/init.js.map +0 -1
- package/dist/workflows/live.d.ts +0 -9
- package/dist/workflows/live.d.ts.map +0 -1
- package/dist/workflows/live.js +0 -7
- package/dist/workflows/live.js.map +0 -1
- package/dist/workflows/options.d.ts +0 -30
- package/dist/workflows/options.d.ts.map +0 -1
- package/dist/workflows/options.js +0 -16
- package/dist/workflows/options.js.map +0 -1
- package/examples/non-strict-skips/artifacts/release-example-skips-0.1.0.tgz +0 -1
- package/examples/non-strict-skips/release.config.json +0 -31
- package/examples/pypi-registry/release.config.json +0 -31
- package/templates/github-actions/plan-and-approved-execute.yml +0 -58
- package/templates/github-actions/plan-only.yml +0 -33
- package/templates/github-actions/trusted-publishing.yml +0 -61
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema"
|
|
2
|
+
import { CompletePreparedReleaseRef } from "../release/prepared-ref.js"
|
|
3
|
+
|
|
4
|
+
export class ReleaseInputError
|
|
5
|
+
extends Schema.TaggedErrorClass<ReleaseInputError>()("ReleaseInputError", { reason: Schema.String }) {}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Cross-host preparation is deliberately reserved for plan 235. Recognizing
|
|
9
|
+
* these two tags before strict input decoding gives callers an actionable,
|
|
10
|
+
* typed refusal without publishing a partial-bundle shape prematurely.
|
|
11
|
+
*/
|
|
12
|
+
export class PreparationModeUnsupported
|
|
13
|
+
extends Schema.TaggedErrorClass<PreparationModeUnsupported>()("PreparationModeUnsupported", {
|
|
14
|
+
mode: Schema.Literals(["partition", "merge"]),
|
|
15
|
+
owner: Schema.Literal("plan-235"),
|
|
16
|
+
reason: Schema.String
|
|
17
|
+
}) {}
|
|
18
|
+
|
|
19
|
+
export class ReleasePreparationError
|
|
20
|
+
extends Schema.TaggedErrorClass<ReleasePreparationError>()("ReleasePreparationError", {
|
|
21
|
+
cause: Schema.String
|
|
22
|
+
}) {}
|
|
23
|
+
|
|
24
|
+
export class ReleaseAbortedError
|
|
25
|
+
extends Schema.TaggedErrorClass<ReleaseAbortedError>()("ReleaseAbortedError", {
|
|
26
|
+
prepared: Schema.optionalKey(CompletePreparedReleaseRef),
|
|
27
|
+
cause: Schema.String
|
|
28
|
+
}) {}
|
|
29
|
+
|
|
30
|
+
/** Product-boundary failure after a truthful total report has been emitted. */
|
|
31
|
+
export class ReleaseIncompleteError
|
|
32
|
+
extends Schema.TaggedErrorClass<ReleaseIncompleteError>()("ReleaseIncompleteError", {
|
|
33
|
+
prepared: CompletePreparedReleaseRef,
|
|
34
|
+
status: Schema.Literals(["blocked", "uncertain"]),
|
|
35
|
+
reason: Schema.String
|
|
36
|
+
}) {}
|
package/src/api/input.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema"
|
|
2
|
+
import { existsSync, realpathSync, statSync } from "node:fs"
|
|
3
|
+
import { isAbsolute } from "node:path"
|
|
4
|
+
import { CompletePreparedReleaseRef } from "../release/prepared-ref.js"
|
|
5
|
+
import { AuthoredCorrection } from "../correction/intent.js"
|
|
6
|
+
import { PreparationModeUnsupported, ReleaseInputError } from "./errors.js"
|
|
7
|
+
import type {
|
|
8
|
+
CorrectInput,
|
|
9
|
+
InspectInput,
|
|
10
|
+
ObserveInput,
|
|
11
|
+
PrepareInput,
|
|
12
|
+
PublishInput,
|
|
13
|
+
ReleaseInput
|
|
14
|
+
} from "./types.js"
|
|
15
|
+
|
|
16
|
+
const prepareInput = Schema.Struct({
|
|
17
|
+
config: Schema.Unknown,
|
|
18
|
+
workspace: Schema.String
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const inspectConfigInput = Schema.Struct({
|
|
22
|
+
config: Schema.Unknown,
|
|
23
|
+
workspace: Schema.String
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const preparedInput = Schema.Struct({ prepared: CompletePreparedReleaseRef })
|
|
27
|
+
const inspectInput = Schema.Union([inspectConfigInput, preparedInput])
|
|
28
|
+
const publishInput = preparedInput
|
|
29
|
+
const observeInput = preparedInput
|
|
30
|
+
|
|
31
|
+
const releaseInput = Schema.Struct({
|
|
32
|
+
config: Schema.Unknown,
|
|
33
|
+
workspace: Schema.String,
|
|
34
|
+
allowEmpty: Schema.optionalKey(Schema.Boolean)
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
const correctInput = Schema.Struct({
|
|
38
|
+
prepared: CompletePreparedReleaseRef,
|
|
39
|
+
correction: AuthoredCorrection
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
const decode = <S extends Schema.Top & Schema.Decoder<unknown>>(
|
|
43
|
+
schema: S,
|
|
44
|
+
value: unknown
|
|
45
|
+
): S["Type"] => {
|
|
46
|
+
try {
|
|
47
|
+
return Schema.decodeUnknownSync(schema, { onExcessProperty: "error" })(value) as S["Type"]
|
|
48
|
+
} catch (cause) {
|
|
49
|
+
throw new ReleaseInputError({
|
|
50
|
+
reason: String(cause).split("\n").slice(0, 8).join("\n").slice(0, 500)
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const rejectReservedPreparationMode = (value: unknown): void => {
|
|
56
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return
|
|
57
|
+
const mode = (value as { readonly mode?: unknown }).mode
|
|
58
|
+
if (mode !== "partition" && mode !== "merge") return
|
|
59
|
+
throw PreparationModeUnsupported.make({
|
|
60
|
+
mode,
|
|
61
|
+
owner: "plan-235",
|
|
62
|
+
reason: `Preparation mode '${mode}' is reserved and unsupported until plan 235 adds its first certified producer.`
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const decodePrepareInput = (value: unknown): PrepareInput => {
|
|
67
|
+
rejectReservedPreparationMode(value)
|
|
68
|
+
return decode(prepareInput, value)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export const decodeReleaseInput = (value: unknown): ReleaseInput => {
|
|
72
|
+
rejectReservedPreparationMode(value)
|
|
73
|
+
return decode(releaseInput, value)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const decodeObserveInput = (value: unknown): ObserveInput => decode(observeInput, value)
|
|
77
|
+
export const decodePublishInput = (value: unknown): PublishInput => decode(publishInput, value)
|
|
78
|
+
export const decodeCorrectInput = (value: unknown): CorrectInput => decode(correctInput, value)
|
|
79
|
+
export const decodeInspectInput = (value: unknown): InspectInput => decode(inspectInput, value)
|
|
80
|
+
|
|
81
|
+
export const absoluteDirectory = (value: string, field: string): string => {
|
|
82
|
+
if (!isAbsolute(value) || !existsSync(value)) {
|
|
83
|
+
throw new ReleaseInputError({ reason: `${field} must be an existing absolute directory.` })
|
|
84
|
+
}
|
|
85
|
+
const canonical = realpathSync(value)
|
|
86
|
+
if (!statSync(canonical).isDirectory()) {
|
|
87
|
+
throw new ReleaseInputError({ reason: `${field} must be a directory.` })
|
|
88
|
+
}
|
|
89
|
+
return canonical
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export const workspaceRoot = (value: string): string => absoluteDirectory(value, "workspace")
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as Context from "effect/Context"
|
|
2
|
+
import * as Schema from "effect/Schema"
|
|
3
|
+
import type { SourceObserverShape } from "../release/context.js"
|
|
4
|
+
import type { RunCommand } from "../drivers/process.js"
|
|
5
|
+
|
|
6
|
+
export class ReleaseRuntimeError
|
|
7
|
+
extends Schema.TaggedErrorClass<ReleaseRuntimeError>()("ReleaseRuntimeError", { reason: Schema.String }) {}
|
|
8
|
+
|
|
9
|
+
export interface ReleaseRuntimeShape {
|
|
10
|
+
readonly source: SourceObserverShape
|
|
11
|
+
readonly run: RunCommand
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class ReleaseRuntime extends Context.Service<ReleaseRuntime, ReleaseRuntimeShape>()("ReleaseRuntime") {}
|
package/src/api/types.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type * as Layer from "effect/Layer"
|
|
2
|
+
import * as Schema from "effect/Schema"
|
|
3
|
+
import type { CredentialProvider } from "../publication/authority.js"
|
|
4
|
+
import type { AuthoredCorrection } from "../correction/intent.js"
|
|
5
|
+
import type { ObservationReport, ReleaseReport as ReleaseReportType } from "../publication/report.js"
|
|
6
|
+
import { SafeReason } from "../publication/report.js"
|
|
7
|
+
import type {
|
|
8
|
+
AuthorizedMutationHttp,
|
|
9
|
+
HttpAuthorizer
|
|
10
|
+
} from "../publication/http.js"
|
|
11
|
+
import type {
|
|
12
|
+
CertifiedPublisherSpawn,
|
|
13
|
+
NpmUserConfigResource
|
|
14
|
+
} from "../publication/publisher.js"
|
|
15
|
+
import type { ReleaseInspection, PreparedReleaseInspection } from "../release/inspect.js"
|
|
16
|
+
import {
|
|
17
|
+
CompletePreparedReleaseRef,
|
|
18
|
+
type CompletePreparedReleaseRef as CompletePreparedReleaseRefValue
|
|
19
|
+
} from "../release/prepared-ref.js"
|
|
20
|
+
import type { PreparedReleaseStore } from "../release/prepared-store.js"
|
|
21
|
+
import type { ReleaseRuntime } from "./runtime.js"
|
|
22
|
+
import type { CustomProviderAdapter } from "../extensions/provider-adapter.js"
|
|
23
|
+
|
|
24
|
+
export type ReleaseApiServices =
|
|
25
|
+
| ReleaseRuntime
|
|
26
|
+
| PreparedReleaseStore
|
|
27
|
+
| CredentialProvider
|
|
28
|
+
| HttpAuthorizer
|
|
29
|
+
| AuthorizedMutationHttp
|
|
30
|
+
| NpmUserConfigResource
|
|
31
|
+
| CertifiedPublisherSpawn
|
|
32
|
+
|
|
33
|
+
export type ReleaseApiLayer = Layer.Layer<ReleaseApiServices>
|
|
34
|
+
export type InspectOutput = ReleaseInspection | PreparedReleaseInspection
|
|
35
|
+
|
|
36
|
+
/** Custom application composition only; stock CLI/Action pass no adapters. */
|
|
37
|
+
export interface ReleaseApiOptions {
|
|
38
|
+
readonly providerAdapters?: ReadonlyArray<CustomProviderAdapter>
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface PrepareInput {
|
|
42
|
+
readonly config: unknown
|
|
43
|
+
readonly workspace: string
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type InspectInput =
|
|
47
|
+
| {
|
|
48
|
+
readonly config: unknown
|
|
49
|
+
readonly workspace: string
|
|
50
|
+
readonly prepared?: never
|
|
51
|
+
}
|
|
52
|
+
| {
|
|
53
|
+
readonly prepared: CompletePreparedReleaseRefValue
|
|
54
|
+
readonly config?: never
|
|
55
|
+
readonly workspace?: never
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ObserveInput {
|
|
59
|
+
readonly prepared: CompletePreparedReleaseRefValue
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface PublishInput {
|
|
63
|
+
readonly prepared: CompletePreparedReleaseRefValue
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ReleaseInput extends PrepareInput {
|
|
67
|
+
/** Diagnostic-only opt-in for exercising an intentionally empty graph. */
|
|
68
|
+
readonly allowEmpty?: boolean
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface CorrectInput {
|
|
72
|
+
readonly prepared: CompletePreparedReleaseRefValue
|
|
73
|
+
/** Human-authored correction; destination facts are derived from prepared. */
|
|
74
|
+
readonly correction: AuthoredCorrection
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Plan 224 keeps correction on the durable-reference boundary while plan 229
|
|
79
|
+
* owns the first executable authored-correction grammar.
|
|
80
|
+
*/
|
|
81
|
+
export class CorrectionReport extends Schema.Class<CorrectionReport>("CorrectionReport")({
|
|
82
|
+
prepared: CompletePreparedReleaseRef,
|
|
83
|
+
status: Schema.Literals(["unsupported", "complete", "blocked", "uncertain"]),
|
|
84
|
+
provider: Schema.Literals(["npm", "github", "catalog-git"]),
|
|
85
|
+
reason: SafeReason,
|
|
86
|
+
proposal: Schema.String,
|
|
87
|
+
report: Schema.optionalKey(Schema.Unknown)
|
|
88
|
+
}) {}
|
|
89
|
+
|
|
90
|
+
export interface ReleaseResult {
|
|
91
|
+
readonly prepared: CompletePreparedReleaseRefValue
|
|
92
|
+
readonly report: ReleaseReportType
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface ReleaseApi {
|
|
96
|
+
readonly inspect: (input: InspectInput) => Promise<InspectOutput>
|
|
97
|
+
readonly prepare: (input: PrepareInput) => Promise<CompletePreparedReleaseRefValue>
|
|
98
|
+
readonly observe: (input: ObserveInput) => Promise<ObservationReport>
|
|
99
|
+
readonly publish: (input: PublishInput) => Promise<ReleaseReportType>
|
|
100
|
+
readonly release: (input: ReleaseInput) => Promise<ReleaseResult>
|
|
101
|
+
readonly correct: (input: CorrectInput) => Promise<CorrectionReport>
|
|
102
|
+
readonly dispose: () => Promise<void>
|
|
103
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
CapabilityId,
|
|
3
|
+
CapabilityModule,
|
|
4
|
+
FieldEffect
|
|
5
|
+
} from "./module.js"
|
|
6
|
+
|
|
7
|
+
export interface ConfigFieldOwnership {
|
|
8
|
+
readonly path: string
|
|
9
|
+
readonly owner: CapabilityId | "authoring"
|
|
10
|
+
readonly effect: FieldEffect
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface FieldOwnershipReport {
|
|
14
|
+
readonly rows: ReadonlyArray<ConfigFieldOwnership>
|
|
15
|
+
readonly failures: ReadonlyArray<string>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Exact join between the generated authored schema paths and executable
|
|
20
|
+
* modules. Prefix matches are intentionally forbidden: a broad `publish`
|
|
21
|
+
* entry cannot accidentally claim npm authentication fields.
|
|
22
|
+
*/
|
|
23
|
+
export const validateFieldOwnership = (
|
|
24
|
+
schemaPaths: ReadonlyArray<string>,
|
|
25
|
+
modules: ReadonlyArray<CapabilityModule>
|
|
26
|
+
): FieldOwnershipReport => {
|
|
27
|
+
const failures: Array<string> = []
|
|
28
|
+
const assignments = new Map<string, Array<ConfigFieldOwnership>>()
|
|
29
|
+
|
|
30
|
+
for (const module of modules) {
|
|
31
|
+
for (const field of module.fields) {
|
|
32
|
+
const rows = assignments.get(field.path) ?? []
|
|
33
|
+
rows.push({ path: field.path, owner: module.id, effect: field.effect })
|
|
34
|
+
assignments.set(field.path, rows)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
assignments.set("$schema", [{
|
|
38
|
+
path: "$schema",
|
|
39
|
+
owner: "authoring",
|
|
40
|
+
effect: "authoring-only"
|
|
41
|
+
}])
|
|
42
|
+
|
|
43
|
+
const schema = new Set(schemaPaths)
|
|
44
|
+
for (const path of schemaPaths) {
|
|
45
|
+
const owners = assignments.get(path) ?? []
|
|
46
|
+
if (owners.length === 0) failures.push(`public config field has no canonical owner: ${path}`)
|
|
47
|
+
if (owners.length > 1) {
|
|
48
|
+
failures.push(`public config field has multiple canonical owners: ${path} (${owners.map((row) => row.owner).join(", ")})`)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
for (const path of assignments.keys()) {
|
|
52
|
+
if (!schema.has(path)) failures.push(`field ownership names no public config field: ${path}`)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const rows = schemaPaths.flatMap((path) => {
|
|
56
|
+
const assignment = assignments.get(path)
|
|
57
|
+
return assignment?.length === 1 ? assignment : []
|
|
58
|
+
})
|
|
59
|
+
return { rows, failures }
|
|
60
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { CandidateConfig } from "../recipes/config.js"
|
|
2
|
+
import type { ReleaseSubject } from "../publication/coordinator.js"
|
|
3
|
+
import type {
|
|
4
|
+
AuthorizedMutationHttpShape,
|
|
5
|
+
HttpAuthorizerShape
|
|
6
|
+
} from "../publication/http.js"
|
|
7
|
+
import type {
|
|
8
|
+
CertifiedPublisherSpawnShape,
|
|
9
|
+
NpmUserConfigResourceShape
|
|
10
|
+
} from "../publication/publisher.js"
|
|
11
|
+
import type { PublicationProfileRegistration } from "../publication/recovery.js"
|
|
12
|
+
import type { PublicationClaimStoreShape } from "../publication/claim.js"
|
|
13
|
+
import type {
|
|
14
|
+
PreparedGitHubPublication,
|
|
15
|
+
PreparedCatalogPublication,
|
|
16
|
+
PreparedNpmPublication,
|
|
17
|
+
PreparedPyPiPublication
|
|
18
|
+
} from "../release/prepared.js"
|
|
19
|
+
import type { PreparedBundle } from "../release/prepared-store.js"
|
|
20
|
+
import type { VerifiedReleaseContext } from "../release/context.js"
|
|
21
|
+
import type {
|
|
22
|
+
CapabilityContribution,
|
|
23
|
+
OutputDeclaration
|
|
24
|
+
} from "../release/graph.js"
|
|
25
|
+
import type { ObservedFacts } from "../resolve/facts.js"
|
|
26
|
+
|
|
27
|
+
/** The deliberately small, installed product algebra. Inclusion means support. */
|
|
28
|
+
export type CapabilityId =
|
|
29
|
+
| "release.identity"
|
|
30
|
+
| "prepare.source"
|
|
31
|
+
| "prepare.package"
|
|
32
|
+
| "render.homebrew"
|
|
33
|
+
| "render.scoop"
|
|
34
|
+
| "publish.npm"
|
|
35
|
+
| "publish.pypi"
|
|
36
|
+
| "publish.catalog-git"
|
|
37
|
+
| "publish.github"
|
|
38
|
+
|
|
39
|
+
export type FieldEffect =
|
|
40
|
+
| "resolved-intent"
|
|
41
|
+
| "graph"
|
|
42
|
+
| "prepared-bytes"
|
|
43
|
+
| "runtime-requirement"
|
|
44
|
+
| "recovery-policy"
|
|
45
|
+
| "authoring-only"
|
|
46
|
+
|
|
47
|
+
export interface OwnedConfigField {
|
|
48
|
+
/** Exact path emitted by scripts/lib/config-fields.ts; prefixes never count. */
|
|
49
|
+
readonly path: string
|
|
50
|
+
readonly effect: FieldEffect
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface CapabilityCertification {
|
|
54
|
+
/** Evidence references do not install a capability. */
|
|
55
|
+
readonly tests: ReadonlyArray<string>
|
|
56
|
+
readonly boundary: "root-api" | "provider-protocol"
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface CapabilityRequirements {
|
|
60
|
+
readonly executionHosts: ReadonlyArray<"linux" | "darwin">
|
|
61
|
+
readonly nativeTools: ReadonlyArray<string>
|
|
62
|
+
readonly artifactTargets: ReadonlyArray<string>
|
|
63
|
+
readonly credentialStrategies: ReadonlyArray<string>
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface CompilationSnapshot {
|
|
67
|
+
readonly config: CandidateConfig
|
|
68
|
+
readonly context: VerifiedReleaseContext
|
|
69
|
+
/** Immutable outputs from the preceding explicit compilation phase. */
|
|
70
|
+
readonly availableArtifacts: ReadonlyArray<OutputDeclaration>
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface CapabilityCommon {
|
|
74
|
+
readonly id: CapabilityId
|
|
75
|
+
readonly fields: ReadonlyArray<OwnedConfigField>
|
|
76
|
+
readonly requirements: CapabilityRequirements
|
|
77
|
+
readonly certification: CapabilityCertification
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Canonical authored identity and observed facts have one resolver. */
|
|
81
|
+
export interface ResolutionCapability extends CapabilityCommon {
|
|
82
|
+
readonly _tag: "ResolutionCapability"
|
|
83
|
+
readonly resolve: (authored: unknown, facts: ObservedFacts) => CandidateConfig
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** Preparation has no provider, credential, or subject surface. */
|
|
87
|
+
export interface PreparationCapability extends CapabilityCommon {
|
|
88
|
+
readonly _tag: "PreparationCapability"
|
|
89
|
+
readonly phase: "source" | "package" | "render"
|
|
90
|
+
readonly contribute: (input: CompilationSnapshot) => CapabilityContribution
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Opaque provider services supplied only by the default or custom host layer. */
|
|
94
|
+
export interface PublicationSubjectServices {
|
|
95
|
+
readonly http: HttpAuthorizerShape
|
|
96
|
+
readonly mutationHttp: AuthorizedMutationHttpShape
|
|
97
|
+
readonly userConfigs: NpmUserConfigResourceShape
|
|
98
|
+
readonly publisher: CertifiedPublisherSpawnShape
|
|
99
|
+
readonly claims: PublicationClaimStoreShape
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface PublicationCapabilityCommon extends CapabilityCommon {
|
|
103
|
+
readonly _tag: "PublicationCapability"
|
|
104
|
+
/** The exact registration also consumed by recovery documentation. */
|
|
105
|
+
readonly profile: PublicationProfileRegistration
|
|
106
|
+
readonly contribute: (input: CompilationSnapshot) => CapabilityContribution
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface NpmPublicationCapability extends PublicationCapabilityCommon {
|
|
110
|
+
readonly id: "publish.npm"
|
|
111
|
+
readonly preparedTag: "PreparedNpmPublication"
|
|
112
|
+
readonly subjects: (
|
|
113
|
+
bundle: PreparedBundle,
|
|
114
|
+
publication: PreparedNpmPublication,
|
|
115
|
+
services: PublicationSubjectServices
|
|
116
|
+
) => readonly [ReleaseSubject]
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface GitHubPublicationCapability extends PublicationCapabilityCommon {
|
|
120
|
+
readonly id: "publish.github"
|
|
121
|
+
readonly preparedTag: "PreparedGitHubPublication"
|
|
122
|
+
readonly subjects: (
|
|
123
|
+
bundle: PreparedBundle,
|
|
124
|
+
publication: PreparedGitHubPublication,
|
|
125
|
+
services: PublicationSubjectServices
|
|
126
|
+
) => readonly [ReleaseSubject]
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface PyPiPublicationCapability extends PublicationCapabilityCommon {
|
|
130
|
+
readonly id: "publish.pypi"
|
|
131
|
+
readonly preparedTag: "PreparedPyPiPublication"
|
|
132
|
+
readonly subjects: (
|
|
133
|
+
bundle: PreparedBundle,
|
|
134
|
+
publication: PreparedPyPiPublication,
|
|
135
|
+
services: PublicationSubjectServices
|
|
136
|
+
) => ReadonlyArray<ReleaseSubject>
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface CatalogPublicationCapability extends PublicationCapabilityCommon {
|
|
140
|
+
readonly id: "publish.catalog-git"
|
|
141
|
+
readonly preparedTag: "PreparedCatalogPublication"
|
|
142
|
+
readonly subjects: (
|
|
143
|
+
bundle: PreparedBundle,
|
|
144
|
+
publication: PreparedCatalogPublication,
|
|
145
|
+
services: PublicationSubjectServices
|
|
146
|
+
) => readonly [ReleaseSubject]
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export type PublicationCapability =
|
|
150
|
+
| NpmPublicationCapability
|
|
151
|
+
| PyPiPublicationCapability
|
|
152
|
+
| CatalogPublicationCapability
|
|
153
|
+
| GitHubPublicationCapability
|
|
154
|
+
|
|
155
|
+
export type CapabilityModule =
|
|
156
|
+
| ResolutionCapability
|
|
157
|
+
| PreparationCapability
|
|
158
|
+
| PublicationCapability
|