@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
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { CommandSpec, PublishCommandOperation, ValidateCommandOperation, ValidationNoteOperation } from "../domain/operation.js";
|
|
3
|
-
import { TargetCapabilities, targetAuthRequirement } from "../domain/target.js";
|
|
4
|
-
import { PlanConstructionError } from "../planner/errors.js";
|
|
5
|
-
export const noAuthCommand = (executable, args) => CommandSpec.make({
|
|
6
|
-
executable,
|
|
7
|
-
args: [...args],
|
|
8
|
-
requiredEnv: [],
|
|
9
|
-
redactedEnv: []
|
|
10
|
-
});
|
|
11
|
-
export const catalogPathBaseName = (pathName) => {
|
|
12
|
-
const parts = pathName.replaceAll("\\", "/").split("/");
|
|
13
|
-
return parts[parts.length - 1] ?? pathName;
|
|
14
|
-
};
|
|
15
|
-
export const rejectUnsupportedCatalogTokenEnv = Effect.fn("rejectUnsupportedCatalogTokenEnv")(function* (options) {
|
|
16
|
-
if (options.tokenEnv !== undefined) {
|
|
17
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
18
|
-
targetId: options.targetId,
|
|
19
|
-
reason: `${options.targetLabel} targets currently publish with plain git push and require Git credentials to be configured outside the release plan; tokenEnv is not supported yet.`
|
|
20
|
-
}));
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
export const catalogGitPushOperation = (options) => {
|
|
24
|
-
const publishRisk = options.mutability === "immutable" ? "irreversible" : "externally-visible";
|
|
25
|
-
return PublishCommandOperation.make({
|
|
26
|
-
id: options.id,
|
|
27
|
-
targetId: options.targetId,
|
|
28
|
-
description: options.description,
|
|
29
|
-
risk: publishRisk,
|
|
30
|
-
command: noAuthCommand("git", ["-C", options.directory ?? ".", "push"])
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
const catalogFilePath = (filePath, directory) => {
|
|
34
|
-
if (directory === undefined) {
|
|
35
|
-
return filePath;
|
|
36
|
-
}
|
|
37
|
-
const normalizedFilePath = filePath.replaceAll("\\", "/");
|
|
38
|
-
const normalizedDirectory = directory.replaceAll("\\", "/").replace(/\/+$/, "");
|
|
39
|
-
const prefix = `${normalizedDirectory}/`;
|
|
40
|
-
return normalizedFilePath.startsWith(prefix)
|
|
41
|
-
? normalizedFilePath.slice(prefix.length)
|
|
42
|
-
: filePath;
|
|
43
|
-
};
|
|
44
|
-
export const catalogGitPublishOperations = (options) => [
|
|
45
|
-
PublishCommandOperation.make({
|
|
46
|
-
id: `${options.id}:add`,
|
|
47
|
-
targetId: options.targetId,
|
|
48
|
-
description: `Stage ${catalogPathBaseName(options.filePath)} for ${options.targetId}.`,
|
|
49
|
-
risk: "writes-local",
|
|
50
|
-
command: noAuthCommand("git", [
|
|
51
|
-
"-C",
|
|
52
|
-
options.directory ?? ".",
|
|
53
|
-
"add",
|
|
54
|
-
catalogFilePath(options.filePath, options.directory)
|
|
55
|
-
])
|
|
56
|
-
}),
|
|
57
|
-
PublishCommandOperation.make({
|
|
58
|
-
id: `${options.id}:commit`,
|
|
59
|
-
targetId: options.targetId,
|
|
60
|
-
description: `Commit ${catalogPathBaseName(options.filePath)} for ${options.targetId}.`,
|
|
61
|
-
risk: "writes-local",
|
|
62
|
-
command: noAuthCommand("git", [
|
|
63
|
-
"-C",
|
|
64
|
-
options.directory ?? ".",
|
|
65
|
-
"commit",
|
|
66
|
-
"-m",
|
|
67
|
-
options.commitMessage
|
|
68
|
-
])
|
|
69
|
-
}),
|
|
70
|
-
catalogGitPushOperation(options)
|
|
71
|
-
];
|
|
72
|
-
export const validationStrategyForDryRun = (dryRunSupport) => {
|
|
73
|
-
if (dryRunSupport === "native") {
|
|
74
|
-
return "native-command";
|
|
75
|
-
}
|
|
76
|
-
if (dryRunSupport === "simulated") {
|
|
77
|
-
return "simulated-plan";
|
|
78
|
-
}
|
|
79
|
-
return "skipped";
|
|
80
|
-
};
|
|
81
|
-
export const targetCapabilitiesFor = (target, validationStrategy, authSetup) => TargetCapabilities.make({
|
|
82
|
-
targetId: target.id,
|
|
83
|
-
targetTag: target._tag,
|
|
84
|
-
authRequirement: targetAuthRequirement(target),
|
|
85
|
-
dryRunSupport: target.dryRunSupport,
|
|
86
|
-
mutability: target.mutability,
|
|
87
|
-
recovery: target.recovery,
|
|
88
|
-
validationStrategy,
|
|
89
|
-
...(authSetup === undefined ? {} : { authSetup })
|
|
90
|
-
});
|
|
91
|
-
export const readOnlyCommandValidationOperation = (options) => ValidateCommandOperation.make({
|
|
92
|
-
id: options.id,
|
|
93
|
-
targetId: options.targetId,
|
|
94
|
-
description: options.description,
|
|
95
|
-
risk: "read-only",
|
|
96
|
-
command: options.command
|
|
97
|
-
});
|
|
98
|
-
export const validationNoteOperation = (options) => ValidationNoteOperation.make({
|
|
99
|
-
id: options.id,
|
|
100
|
-
targetId: options.targetId,
|
|
101
|
-
description: options.dryRunSupport === "simulated" ? options.simulatedDescription : options.skippedDescription,
|
|
102
|
-
risk: "read-only",
|
|
103
|
-
message: options.dryRunSupport === "simulated" ? options.simulatedMessage : options.skippedMessage,
|
|
104
|
-
skipped: options.dryRunSupport === "none",
|
|
105
|
-
severity: options.dryRunSupport === "simulated" ? "info" : "warning"
|
|
106
|
-
});
|
|
107
|
-
export const dryRunValidationOperation = (options) => options.dryRunSupport === "native"
|
|
108
|
-
? readOnlyCommandValidationOperation({
|
|
109
|
-
id: options.id,
|
|
110
|
-
targetId: options.targetId,
|
|
111
|
-
description: options.nativeDescription,
|
|
112
|
-
command: options.command
|
|
113
|
-
})
|
|
114
|
-
: validationNoteOperation({
|
|
115
|
-
id: options.id,
|
|
116
|
-
targetId: options.targetId,
|
|
117
|
-
dryRunSupport: options.dryRunSupport,
|
|
118
|
-
simulatedDescription: options.simulatedDescription,
|
|
119
|
-
skippedDescription: options.skippedDescription,
|
|
120
|
-
simulatedMessage: options.simulatedMessage,
|
|
121
|
-
skippedMessage: options.skippedMessage
|
|
122
|
-
});
|
|
123
|
-
export const rejectNoDryRunInStrictMode = Effect.fn("rejectNoDryRunInStrictMode")(function* (target, model, reason) {
|
|
124
|
-
if (model.strict && target.dryRunSupport === "none") {
|
|
125
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
126
|
-
targetId: target.id,
|
|
127
|
-
reason
|
|
128
|
-
}));
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
export const findRequiredArtifact = Effect.fn("findRequiredArtifact")(function* (model, targetId, artifactId, missingReason) {
|
|
132
|
-
const artifact = model.artifacts.find((item) => item.id === artifactId);
|
|
133
|
-
if (artifact === undefined) {
|
|
134
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
135
|
-
targetId,
|
|
136
|
-
reason: missingReason
|
|
137
|
-
}));
|
|
138
|
-
}
|
|
139
|
-
return artifact;
|
|
140
|
-
});
|
|
141
|
-
const artifactMatchesVariantCriteria = (artifact, criteria) => {
|
|
142
|
-
const variant = artifact.variant;
|
|
143
|
-
if (variant === undefined) {
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
return (criteria.os === undefined || variant.os === criteria.os) &&
|
|
147
|
-
(criteria.arch === undefined || variant.arch === criteria.arch) &&
|
|
148
|
-
(criteria.libc === undefined || variant.libc === criteria.libc) &&
|
|
149
|
-
(criteria.binaryName === undefined || variant.binaryName === criteria.binaryName) &&
|
|
150
|
-
(criteria.executableExtension === undefined || variant.executableExtension === criteria.executableExtension) &&
|
|
151
|
-
(criteria.installPath === undefined || variant.installPath === criteria.installPath) &&
|
|
152
|
-
(criteria.targetTriple === undefined || variant.targetTriple === criteria.targetTriple);
|
|
153
|
-
};
|
|
154
|
-
export const findArtifactsByVariant = (model, criteria) => model.artifacts.filter((artifact) => artifactMatchesVariantCriteria(artifact, criteria));
|
|
155
|
-
export const findRequiredArtifactVariant = Effect.fn("findRequiredArtifactVariant")(function* (model, targetId, criteria, missingReason, multipleReason = "Multiple artifacts matched the requested installable variant.") {
|
|
156
|
-
const artifacts = findArtifactsByVariant(model, criteria);
|
|
157
|
-
if (artifacts.length === 0) {
|
|
158
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
159
|
-
targetId,
|
|
160
|
-
reason: missingReason
|
|
161
|
-
}));
|
|
162
|
-
}
|
|
163
|
-
if (artifacts.length > 1) {
|
|
164
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
165
|
-
targetId,
|
|
166
|
-
reason: multipleReason
|
|
167
|
-
}));
|
|
168
|
-
}
|
|
169
|
-
const artifact = artifacts[0];
|
|
170
|
-
if (artifact === undefined) {
|
|
171
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
172
|
-
targetId,
|
|
173
|
-
reason: missingReason
|
|
174
|
-
}));
|
|
175
|
-
}
|
|
176
|
-
return artifact;
|
|
177
|
-
});
|
|
178
|
-
export const requireSha256FileArtifact = Effect.fn("requireSha256FileArtifact")(function* (artifact, reasons) {
|
|
179
|
-
if (artifact.format === "directory") {
|
|
180
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
181
|
-
targetId: reasons.targetId,
|
|
182
|
-
reason: reasons.directoryReason
|
|
183
|
-
}));
|
|
184
|
-
}
|
|
185
|
-
if (artifact.checksum === undefined || artifact.checksum.algorithm !== "sha256") {
|
|
186
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
187
|
-
targetId: reasons.targetId,
|
|
188
|
-
reason: reasons.checksumReason
|
|
189
|
-
}));
|
|
190
|
-
}
|
|
191
|
-
const checksum = artifact.checksum;
|
|
192
|
-
return { artifact, checksum };
|
|
193
|
-
});
|
|
194
|
-
//# sourceMappingURL=adapter-helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-helpers.js","sourceRoot":"","sources":["../../src/targets/adapter-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAQvC,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAEL,kBAAkB,EAKlB,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAkE5D,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,UAAkB,EAClB,IAA2B,EACd,EAAE,CACf,WAAW,CAAC,IAAI,CAAC;IACf,UAAU;IACV,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IACf,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE;CAChB,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAgB,EAAU,EAAE;IAC9D,MAAM,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACvD,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAA;AAC5C,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gCAAgC,GAAG,MAAM,CAAC,EAAE,CAAC,kC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,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CACvB,qBAAqB,CAAC,IAAI,CAAC;YACzB,QAAQ;YACR,MAAM,EAAE,aAAa;SACtB,CAAC,CACH,CAAA;IACH,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,EAAE,CAAC,2BAA2B,CAAC,CAAC,QAAQ,CAAC,EACvF,QAA+B,EAC/B,OAA6B;IAE7B,IAAI,QAAQ,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CACvB,qBAAqB,CAAC,IAAI,CAAC;YACzB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,MAAM,EAAE,OAAO,CAAC,eAAe;SAChC,CAAC,CACH,CAAA;IACH,CAAC;IACD,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,QAAQ,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;QAChF,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CACvB,qBAAqB,CAAC,IAAI,CAAC;YACzB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,MAAM,EAAE,OAAO,CAAC,cAAc;SAC/B,CAAC,CACH,CAAA;IACH,CAAC;IACD,MAAM,QAAQ,GAAa,QAAQ,CAAC,QAAQ,CAAA;IAC5C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA;AAC/B,CAAC,CAAC,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { Operation } from "../domain/operation.js";
|
|
3
|
-
import { ReleaseModel } from "../domain/release.js";
|
|
4
|
-
import { GitHubReleaseTarget, HomebrewTapTarget, NpmRegistryTarget, PyPiRegistryTarget, ScoopBucketTarget, TargetCapabilities, TargetConfig } from "../domain/target.js";
|
|
5
|
-
import { PlanConstructionError } from "../planner/errors.js";
|
|
6
|
-
export type * from "../types/effect-internal.js";
|
|
7
|
-
export interface TargetAdapter<Target extends TargetConfig> {
|
|
8
|
-
readonly targetTag: Target["_tag"];
|
|
9
|
-
readonly capabilities: (target: Target) => TargetCapabilities;
|
|
10
|
-
readonly planOperations: (target: Target, model: ReleaseModel) => Effect.Effect<ReadonlyArray<Operation>, PlanConstructionError>;
|
|
11
|
-
}
|
|
12
|
-
export type NpmTargetAdapter = TargetAdapter<NpmRegistryTarget>;
|
|
13
|
-
export type GitHubTargetAdapter = TargetAdapter<GitHubReleaseTarget>;
|
|
14
|
-
export type HomebrewTargetAdapter = TargetAdapter<HomebrewTapTarget>;
|
|
15
|
-
export type PyPiTargetAdapter = TargetAdapter<PyPiRegistryTarget>;
|
|
16
|
-
export type ScoopTargetAdapter = TargetAdapter<ScoopBucketTarget>;
|
|
17
|
-
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/targets/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACb,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,mBAAmB,6BAA6B,CAAA;AAEhD,MAAM,WAAW,aAAa,CAAC,MAAM,SAAS,YAAY;IACxD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IAClC,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,kBAAkB,CAAA;IAC7D,QAAQ,CAAC,cAAc,EAAE,CACvB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,YAAY,KAChB,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,qBAAqB,CAAC,CAAA;CACpE;AAED,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAA;AAC/D,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAA;AACpE,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAA;AACpE,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAAA;AACjE,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAA"}
|
package/dist/targets/adapter.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/targets/adapter.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { CommandSpec, HttpEnvHeader, HttpHeader, HttpRequestSpec } from "../domain/operation.js";
|
|
2
|
-
import { ReleaseModel, ReleasePlan } from "../domain/release.js";
|
|
3
|
-
import { GitHubReleaseTarget } from "../domain/target.js";
|
|
4
|
-
export type * from "../types/effect-internal.js";
|
|
5
|
-
export interface GitHubReleaseContext {
|
|
6
|
-
readonly identity: ReleaseModel["identity"] | ReleasePlan["identity"];
|
|
7
|
-
readonly artifacts: ReleaseModel["artifacts"] | ReleasePlan["artifacts"];
|
|
8
|
-
}
|
|
9
|
-
export declare const githubAuthEnvNames: (target: GitHubReleaseTarget) => ReadonlyArray<string>;
|
|
10
|
-
export declare const githubGhCommand: (target: GitHubReleaseTarget, args: ReadonlyArray<string>, includeAuth: boolean) => CommandSpec;
|
|
11
|
-
export declare const githubTargetArtifacts: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => import("../domain/artifact.js").ArtifactInventoryItem[];
|
|
12
|
-
export declare const githubReleaseAssetName: (pathName: string) => string;
|
|
13
|
-
export declare const githubTargetArtifactAssetNames: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => ReadonlyArray<string>;
|
|
14
|
-
export declare const githubReleaseTag: (context: GitHubReleaseContext) => string;
|
|
15
|
-
export declare const githubReleaseTitle: (context: GitHubReleaseContext) => string;
|
|
16
|
-
export declare const githubReleaseCreateArgs: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => ReadonlyArray<string>;
|
|
17
|
-
export declare const githubReleaseApiUrl: (target: GitHubReleaseTarget, tag: string) => string;
|
|
18
|
-
export declare const githubApiHeaders: () => ReadonlyArray<HttpHeader>;
|
|
19
|
-
export declare const githubApiEnvHeaders: (target: GitHubReleaseTarget) => ReadonlyArray<HttpEnvHeader>;
|
|
20
|
-
export declare const githubApiGetRequestSpec: (target: GitHubReleaseTarget, url: string) => HttpRequestSpec;
|
|
21
|
-
export declare const githubReleaseRequestSpec: (target: GitHubReleaseTarget, tag: string) => HttpRequestSpec;
|
|
22
|
-
export declare const githubReleaseCreateCommand: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => CommandSpec;
|
|
23
|
-
export declare const githubReleaseViewCommand: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => CommandSpec;
|
|
24
|
-
export declare const githubReleasePublishDraftCommand: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => CommandSpec;
|
|
25
|
-
//# sourceMappingURL=github-release.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github-release.d.ts","sourceRoot":"","sources":["../../src/targets/github-release.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,UAAU,EACV,eAAe,EAChB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACh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L,eAAO,MAAM,uBAAuB,GAClC,QAAQ,mBAAmB,EAC3B,KAAK,MAAM,KACV,eAQC,CAAA;AAEJ,eAAO,MAAM,wBAAwB,GACnC,QAAQ,mBAAmB,EAC3B,KAAK,MAAM,KACV,eACgE,CAAA;AAEnE,eAAO,MAAM,0BAA0B,GACrC,QAAQ,mBAAmB,EAC3B,SAAS,oBAAoB,KAC5B,WACsE,CAAA;AAEzE,eAAO,MAAM,wBAAwB,GACnC,QAAQ,mBAAmB,EAC3B,SAAS,oBAAoB,KAC5B,WAaA,CAAA;AAEH,eAAO,MAAM,gCAAgC,GAC3C,QAAQ,mBAAmB,EAC3B,SAAS,oBAAoB,KAC5B,WAYA,CAAA"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { CommandSpec, HttpEnvHeader, HttpHeader, HttpRequestSpec } from "../domain/operation.js";
|
|
2
|
-
export const githubAuthEnvNames = (target) => target.tokenEnv === undefined ? [] : [target.tokenEnv];
|
|
3
|
-
export const githubGhCommand = (target, args, includeAuth) => CommandSpec.make({
|
|
4
|
-
executable: "gh",
|
|
5
|
-
args: [...args],
|
|
6
|
-
requiredEnv: includeAuth ? githubAuthEnvNames(target) : [],
|
|
7
|
-
redactedEnv: includeAuth ? githubAuthEnvNames(target) : []
|
|
8
|
-
});
|
|
9
|
-
export const githubTargetArtifacts = (target, context) => context.artifacts.filter((artifact) => artifact.consumers.includes(target.id));
|
|
10
|
-
export const githubReleaseAssetName = (pathName) => {
|
|
11
|
-
const parts = pathName.replaceAll("\\", "/").split("/");
|
|
12
|
-
return parts[parts.length - 1] ?? pathName;
|
|
13
|
-
};
|
|
14
|
-
export const githubTargetArtifactAssetNames = (target, context) => githubTargetArtifacts(target, context).map((artifact) => githubReleaseAssetName(artifact.path));
|
|
15
|
-
export const githubReleaseTag = (context) => context.identity.tag ?? context.identity.version;
|
|
16
|
-
export const githubReleaseTitle = (context) => `${context.identity.name} ${context.identity.version}`;
|
|
17
|
-
export const githubReleaseCreateArgs = (target, context) => {
|
|
18
|
-
const args = [
|
|
19
|
-
"release",
|
|
20
|
-
"create",
|
|
21
|
-
githubReleaseTag(context),
|
|
22
|
-
"--repo",
|
|
23
|
-
target.repository,
|
|
24
|
-
"--title",
|
|
25
|
-
githubReleaseTitle(context)
|
|
26
|
-
];
|
|
27
|
-
if (target.draft === true) {
|
|
28
|
-
args.push("--draft");
|
|
29
|
-
}
|
|
30
|
-
if (target.prerelease === true) {
|
|
31
|
-
args.push("--prerelease");
|
|
32
|
-
}
|
|
33
|
-
if (context.identity.notes !== undefined) {
|
|
34
|
-
args.push("--notes", context.identity.notes);
|
|
35
|
-
}
|
|
36
|
-
for (const artifact of githubTargetArtifacts(target, context)) {
|
|
37
|
-
args.push(artifact.path);
|
|
38
|
-
}
|
|
39
|
-
return args;
|
|
40
|
-
};
|
|
41
|
-
export const githubReleaseApiUrl = (target, tag) => `https://api.github.com/repos/${target.repository}/releases/tags/${encodeURIComponent(tag)}`;
|
|
42
|
-
export const githubApiHeaders = () => [
|
|
43
|
-
HttpHeader.make({ name: "Accept", value: "application/vnd.github+json" }),
|
|
44
|
-
HttpHeader.make({ name: "X-GitHub-Api-Version", value: "2022-11-28" })
|
|
45
|
-
];
|
|
46
|
-
export const githubApiEnvHeaders = (target) => target.tokenEnv === undefined
|
|
47
|
-
? []
|
|
48
|
-
: [
|
|
49
|
-
HttpEnvHeader.make({
|
|
50
|
-
name: "Authorization",
|
|
51
|
-
valueEnv: target.tokenEnv,
|
|
52
|
-
prefix: "Bearer "
|
|
53
|
-
})
|
|
54
|
-
];
|
|
55
|
-
export const githubApiGetRequestSpec = (target, url) => HttpRequestSpec.make({
|
|
56
|
-
method: "GET",
|
|
57
|
-
url,
|
|
58
|
-
headers: githubApiHeaders(),
|
|
59
|
-
envHeaders: githubApiEnvHeaders(target),
|
|
60
|
-
requiredEnv: githubAuthEnvNames(target),
|
|
61
|
-
redactedEnv: githubAuthEnvNames(target)
|
|
62
|
-
});
|
|
63
|
-
export const githubReleaseRequestSpec = (target, tag) => githubApiGetRequestSpec(target, githubReleaseApiUrl(target, tag));
|
|
64
|
-
export const githubReleaseCreateCommand = (target, context) => githubGhCommand(target, githubReleaseCreateArgs(target, context), true);
|
|
65
|
-
export const githubReleaseViewCommand = (target, context) => githubGhCommand(target, [
|
|
66
|
-
"release",
|
|
67
|
-
"view",
|
|
68
|
-
githubReleaseTag(context),
|
|
69
|
-
"--repo",
|
|
70
|
-
target.repository,
|
|
71
|
-
"--json",
|
|
72
|
-
"tagName,name,isDraft,isPrerelease,assets"
|
|
73
|
-
], true);
|
|
74
|
-
export const githubReleasePublishDraftCommand = (target, context) => githubGhCommand(target, [
|
|
75
|
-
"release",
|
|
76
|
-
"edit",
|
|
77
|
-
githubReleaseTag(context),
|
|
78
|
-
"--repo",
|
|
79
|
-
target.repository,
|
|
80
|
-
"--draft=false"
|
|
81
|
-
], true);
|
|
82
|
-
//# sourceMappingURL=github-release.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github-release.js","sourceRoot":"","sources":["../../src/targets/github-release.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,UAAU,EACV,eAAe,EAChB,MAAM,wBAAwB,CAAA;AAW/B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAA2B,EAAyB,EAAE,CACvF,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AAExD,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,MAA2B,EAC3B,IAA2B,EAC3B,WAAoB,EACP,EAAE,CACf,WAAW,CAAC,IAAI,CAAC;IACf,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IACf,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;IAC1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IACT,MAAM;IACN,gBAAgB,CAAC,OAAO,CAAC;IACzB,QAAQ;IACR,MAAM,CAAC,UAAU;IACjB,eAAe;CAChB,EACD,IAAI,CACL,CAAA"}
|
package/dist/targets/github.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { PublishCommandOperation, VerifyHttpOperation, VerifyRemoteOperation } from "../domain/operation.js";
|
|
3
|
-
import { ReleaseModel } from "../domain/release.js";
|
|
4
|
-
import { GitHubReleaseTarget, TargetCapabilities } from "../domain/target.js";
|
|
5
|
-
import { PlanConstructionError } from "../planner/errors.js";
|
|
6
|
-
import { GitHubTargetAdapter } from "./adapter.js";
|
|
7
|
-
export type * from "../types/effect-internal.js";
|
|
8
|
-
export declare const githubTargetCapabilities: (target: GitHubReleaseTarget) => TargetCapabilities;
|
|
9
|
-
export declare const planGitHubOperations: (target: GitHubReleaseTarget, model: ReleaseModel) => Effect.Effect<(import("../domain/operation.js").RenderFileOperation | import("../domain/operation.js").ValidateCommandOperation | import("../domain/operation.js").ValidationNoteOperation | PublishCommandOperation | VerifyRemoteOperation | VerifyHttpOperation)[], PlanConstructionError, never>;
|
|
10
|
-
export declare const GitHubAdapter: GitHubTargetAdapter;
|
|
11
|
-
//# sourceMappingURL=github.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/targets/github.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAIL,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAGnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAmBlD,mBAAmB,6BAA6B,CAAA;AAKhD,eAAO,MAAM,wBAAwB,GAAI,QAAQ,mBAAmB,KAAG,kBACN,CAAA;AA2FjE,eAAO,MAAM,oBAAoB,4VA4C/B,CAAA;AAEF,eAAO,MAAM,aAAa,EAAE,mBAI3B,CAAA"}
|
package/dist/targets/github.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { HttpJsonArrayObjectFieldEqualsCheck, HttpJsonEqualsCheck, PublishCommandOperation, VerifyHttpOperation, VerifyRemoteOperation } from "../domain/operation.js";
|
|
3
|
-
import { PlanConstructionError } from "../planner/errors.js";
|
|
4
|
-
import { readOnlyCommandValidationOperation, rejectNoDryRunInStrictMode, targetCapabilitiesFor, validationNoteOperation } from "./adapter-helpers.js";
|
|
5
|
-
import { githubGhCommand, githubReleaseAssetName, githubReleaseCreateCommand, githubReleaseRequestSpec, githubReleaseTag, githubReleaseTitle, githubReleaseViewCommand, githubTargetArtifacts } from "./github-release.js";
|
|
6
|
-
const githubValidationStrategy = (target) => target.dryRunSupport === "none" ? "skipped" : "simulated-plan";
|
|
7
|
-
export const githubTargetCapabilities = (target) => targetCapabilitiesFor(target, githubValidationStrategy(target));
|
|
8
|
-
const rejectDirectoryAssets = Effect.fn("github.rejectDirectoryAssets")(function* (target, model) {
|
|
9
|
-
const directoryAsset = githubTargetArtifacts(target, model).find((artifact) => artifact.format === "directory");
|
|
10
|
-
if (directoryAsset === undefined) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
14
|
-
targetId: target.id,
|
|
15
|
-
reason: "GitHub release assets must be file-like, not directories."
|
|
16
|
-
}));
|
|
17
|
-
});
|
|
18
|
-
const githubVerificationOperations = (target, model) => {
|
|
19
|
-
if (target.draft === true) {
|
|
20
|
-
return [
|
|
21
|
-
VerifyRemoteOperation.make({
|
|
22
|
-
id: `${target.id}:github-release-verify-gh`,
|
|
23
|
-
targetId: target.id,
|
|
24
|
-
description: "Verify the GitHub draft release through the GitHub CLI.",
|
|
25
|
-
risk: "read-only",
|
|
26
|
-
command: githubReleaseViewCommand(target, model)
|
|
27
|
-
})
|
|
28
|
-
];
|
|
29
|
-
}
|
|
30
|
-
const tag = githubReleaseTag(model);
|
|
31
|
-
const title = githubReleaseTitle(model);
|
|
32
|
-
const isPrerelease = target.prerelease === true;
|
|
33
|
-
const artifactChecks = githubTargetArtifacts(target, model).map((artifact) => HttpJsonArrayObjectFieldEqualsCheck.make({
|
|
34
|
-
path: ["assets"],
|
|
35
|
-
field: "name",
|
|
36
|
-
expected: githubReleaseAssetName(artifact.path)
|
|
37
|
-
}));
|
|
38
|
-
return [
|
|
39
|
-
VerifyHttpOperation.make({
|
|
40
|
-
id: `${target.id}:github-release-verify-http`,
|
|
41
|
-
targetId: target.id,
|
|
42
|
-
description: "Verify the GitHub release through the GitHub API.",
|
|
43
|
-
risk: "read-only",
|
|
44
|
-
request: githubReleaseRequestSpec(target, tag),
|
|
45
|
-
expectedStatus: 200,
|
|
46
|
-
checks: [
|
|
47
|
-
HttpJsonEqualsCheck.make({
|
|
48
|
-
path: ["tag_name"],
|
|
49
|
-
expected: tag
|
|
50
|
-
}),
|
|
51
|
-
HttpJsonEqualsCheck.make({
|
|
52
|
-
path: ["name"],
|
|
53
|
-
expected: title
|
|
54
|
-
}),
|
|
55
|
-
HttpJsonEqualsCheck.make({
|
|
56
|
-
path: ["draft"],
|
|
57
|
-
expected: false
|
|
58
|
-
}),
|
|
59
|
-
HttpJsonEqualsCheck.make({
|
|
60
|
-
path: ["prerelease"],
|
|
61
|
-
expected: isPrerelease
|
|
62
|
-
}),
|
|
63
|
-
...artifactChecks
|
|
64
|
-
]
|
|
65
|
-
})
|
|
66
|
-
];
|
|
67
|
-
};
|
|
68
|
-
const githubDryRunOperation = (target, dryRunSupport) => validationNoteOperation({
|
|
69
|
-
id: `${target.id}:gh-release-dry-run`,
|
|
70
|
-
targetId: target.id,
|
|
71
|
-
dryRunSupport,
|
|
72
|
-
simulatedDescription: "Record simulated GitHub release dry-run validation.",
|
|
73
|
-
skippedDescription: "Record skipped GitHub release dry-run validation.",
|
|
74
|
-
simulatedMessage: "GitHub release dry-run validation is simulated by the deterministic release plan; gh release create has no native dry-run command.",
|
|
75
|
-
skippedMessage: "GitHub release dry-run validation was skipped because this target declares no dry-run support."
|
|
76
|
-
});
|
|
77
|
-
export const planGitHubOperations = Effect.fn("planGitHubOperations")(function* (target, model) {
|
|
78
|
-
const dryRunSupport = target.dryRunSupport;
|
|
79
|
-
if (dryRunSupport === "native") {
|
|
80
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
81
|
-
targetId: target.id,
|
|
82
|
-
reason: "GitHub release targets do not support native dry-run; use simulated dry-run support."
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
yield* rejectNoDryRunInStrictMode(target, model, "GitHub release target declares no dry-run support in strict mode.");
|
|
86
|
-
yield* rejectDirectoryAssets(target, model);
|
|
87
|
-
const publishRisk = target.mutability === "immutable" ? "irreversible" : "externally-visible";
|
|
88
|
-
return [
|
|
89
|
-
readOnlyCommandValidationOperation({
|
|
90
|
-
id: `${target.id}:gh-version`,
|
|
91
|
-
targetId: target.id,
|
|
92
|
-
description: "Check GitHub CLI availability.",
|
|
93
|
-
command: githubGhCommand(target, ["--version"], false)
|
|
94
|
-
}),
|
|
95
|
-
readOnlyCommandValidationOperation({
|
|
96
|
-
id: `${target.id}:gh-auth-status`,
|
|
97
|
-
targetId: target.id,
|
|
98
|
-
description: "Validate GitHub CLI authentication.",
|
|
99
|
-
command: githubGhCommand(target, ["auth", "status"], true)
|
|
100
|
-
}),
|
|
101
|
-
githubDryRunOperation(target, dryRunSupport),
|
|
102
|
-
PublishCommandOperation.make({
|
|
103
|
-
id: `${target.id}:gh-release-create`,
|
|
104
|
-
targetId: target.id,
|
|
105
|
-
description: `Create GitHub release for ${model.identity.name}@${model.identity.version}.`,
|
|
106
|
-
risk: publishRisk,
|
|
107
|
-
command: githubReleaseCreateCommand(target, model)
|
|
108
|
-
}),
|
|
109
|
-
...githubVerificationOperations(target, model)
|
|
110
|
-
];
|
|
111
|
-
});
|
|
112
|
-
export const GitHubAdapter = {
|
|
113
|
-
targetTag: "GitHubReleaseTarget",
|
|
114
|
-
capabilities: githubTargetCapabilities,
|
|
115
|
-
planOperations: planGitHubOperations
|
|
116
|
-
};
|
|
117
|
-
//# sourceMappingURL=github.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github.js","sourceRoot":"","sources":["../../src/targets/github.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EACL,mCAAmC,EACnC,mBAAmB,EAEnB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wBAAwB,CAAA;AAQ/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAEL,eAAe,EACf,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;AAI5B,MAAM,wBAAwB,GAAG,CAAC,MAA2B,EAA4B,EAAE,CACzF,MAAM,CAAC,aAAa,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAA;AAEhE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,MAA2B,EAAsB,EAAE,CAC1F,qBAAqB,CAAC,MAAM,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAA;AAEjE,MAAM,qBAAqB,GAAG,MAAM,CAAC,EAAE,C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pC,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,WAAW,EAAE,6BAA6B,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,GAAG;YAC1F,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,0BAA0B,CAAC,MAAM,EAAE,KAAK,CAAC;SACnD,CAAC;QACF,GAAG,4BAA4B,CAAC,MAAM,EAAE,KAAK,CAAC;KACZ,CAAA;AACtC,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAwB;IAChD,SAAS,EAAE,qBAAqB;IAChC,YAAY,EAAE,wBAAwB;IACtC,cAAc,EAAE,oBAAoB;CACrC,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { RenderFileOperation } from "../domain/operation.js";
|
|
3
|
-
import { ReleaseModel } from "../domain/release.js";
|
|
4
|
-
import { HomebrewTapTarget, TargetCapabilities } from "../domain/target.js";
|
|
5
|
-
import { PlanConstructionError } from "../planner/errors.js";
|
|
6
|
-
import { HomebrewTargetAdapter } from "./adapter.js";
|
|
7
|
-
export type * from "../types/effect-internal.js";
|
|
8
|
-
export declare const homebrewTargetCapabilities: (target: HomebrewTapTarget) => TargetCapabilities;
|
|
9
|
-
export declare const planHomebrewOperations: (target: HomebrewTapTarget, model: ReleaseModel) => Effect.Effect<(RenderFileOperation | import("../domain/operation.js").ValidateCommandOperation | import("../domain/operation.js").ValidationNoteOperation | import("../domain/operation.js").PublishCommandOperation | import("../domain/operation.js").VerifyRemoteOperation | import("../domain/operation.js").VerifyHttpOperation)[], PlanConstructionError, never>;
|
|
10
|
-
export declare const HomebrewAdapter: HomebrewTargetAdapter;
|
|
11
|
-
//# sourceMappingURL=homebrew.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"homebrew.d.ts","sourceRoot":"","sources":["../../src/targets/homebrew.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAMvC,OAAO,EAEL,mBAAmB,EACpB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAepD,mBAAmB,6BAA6B,CAAA;AAUhD,eAAO,MAAM,0BAA0B,GAAI,QAAQ,iBAAiB,KAAG,kBACW,CAAA;AAyOlF,eAAO,MAAM,sBAAsB,4ZA4CjC,CAAA;AAEF,eAAO,MAAM,eAAe,EAAE,qBAI7B,CAAA"}
|