@mannyc1/ts-release 0.0.6 → 0.2.2
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 +124 -87
- package/CHANGELOG.md +115 -0
- package/LICENSE +21 -0
- package/README.md +272 -540
- package/SPEC.md +206 -305
- package/apps/release-ts/README.md +32 -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 +117 -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 +39239 -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 +8 -0
- package/dist/drivers/archive.d.ts.map +1 -0
- package/dist/drivers/archive.js +101 -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/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 +6 -0
- package/dist/drivers/workspace.d.ts.map +1 -0
- package/dist/drivers/workspace.js +49 -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/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 +772 -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 +644 -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 +1116 -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 +337 -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 +61 -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 +102 -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 +340 -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 +40 -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/platform/bun.ts +38 -0
- package/src/platform/credentials.ts +1083 -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 +954 -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 +459 -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 +1331 -0
- package/src/release/prepared-ref.ts +193 -0
- package/src/release/prepared-store.ts +377 -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 -59
- package/templates/bun-cli-github/README.md +12 -0
- package/templates/bun-cli-github/release.config.json +51 -0
- package/templates/github-actions/release.yml +57 -0
- package/templates/github-actions/reviewed-release.yml +80 -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/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 -36
- package/dist/domain/artifact.d.ts.map +0 -1
- package/dist/domain/artifact.js +0 -29
- package/dist/domain/artifact.js.map +0 -1
- package/dist/domain/evidence.d.ts +0 -108
- package/dist/domain/evidence.d.ts.map +0 -1
- package/dist/domain/evidence.js +0 -96
- package/dist/domain/evidence.js.map +0 -1
- package/dist/domain/operation.d.ts +0 -153
- package/dist/domain/operation.d.ts.map +0 -1
- package/dist/domain/operation.js +0 -320
- package/dist/domain/operation.js.map +0 -1
- package/dist/domain/release.d.ts +0 -141
- package/dist/domain/release.d.ts.map +0 -1
- package/dist/domain/release.js +0 -127
- package/dist/domain/release.js.map +0 -1
- package/dist/domain/remote-state.d.ts +0 -85
- package/dist/domain/remote-state.d.ts.map +0 -1
- package/dist/domain/remote-state.js +0 -77
- package/dist/domain/remote-state.js.map +0 -1
- package/dist/domain/status.d.ts +0 -43
- package/dist/domain/status.d.ts.map +0 -1
- package/dist/domain/status.js +0 -51
- package/dist/domain/status.js.map +0 -1
- package/dist/domain/target.d.ts +0 -135
- package/dist/domain/target.d.ts.map +0 -1
- package/dist/domain/target.js +0 -137
- 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/workflow-phases.d.ts +0 -3
- package/dist/internal/workflow-phases.d.ts.map +0 -1
- package/dist/internal/workflow-phases.js +0 -2
- package/dist/internal/workflow-phases.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 -84
- 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 -81
- package/dist/planner/errors.d.ts.map +0 -1
- package/dist/planner/errors.js +0 -70
- package/dist/planner/errors.js.map +0 -1
- package/dist/planner/evidence-recorder.d.ts +0 -26
- package/dist/planner/evidence-recorder.d.ts.map +0 -1
- package/dist/planner/evidence-recorder.js +0 -330
- 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 -159
- package/dist/planner/executor.js.map +0 -1
- package/dist/planner/normalize-release.d.ts +0 -16
- package/dist/planner/normalize-release.d.ts.map +0 -1
- package/dist/planner/normalize-release.js +0 -218
- 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 -261
- package/dist/planner/reconcile.js.map +0 -1
- package/dist/planner/release-eligibility.d.ts +0 -39
- package/dist/planner/release-eligibility.d.ts.map +0 -1
- package/dist/planner/release-eligibility.js +0 -578
- package/dist/planner/release-eligibility.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 -238
- package/dist/planner/render-plan.js.map +0 -1
- package/dist/planner/status.d.ts +0 -40
- package/dist/planner/status.d.ts.map +0 -1
- package/dist/planner/status.js +0 -313
- package/dist/planner/status.js.map +0 -1
- package/dist/targets/adapter-helpers.d.ts +0 -64
- package/dist/targets/adapter-helpers.d.ts.map +0 -1
- package/dist/targets/adapter-helpers.js +0 -124
- 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 -125
- 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 -97
- 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 -118
- 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 -103
- 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 -78
- 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 -252
- package/dist/workflows/config.d.ts.map +0 -1
- package/dist/workflows/config.js +0 -465
- 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 -527
- package/dist/workflows/diagnostics.js.map +0 -1
- package/dist/workflows/evidence.d.ts +0 -26
- package/dist/workflows/evidence.d.ts.map +0 -1
- package/dist/workflows/evidence.js +0 -44
- package/dist/workflows/evidence.js.map +0 -1
- package/dist/workflows/index.d.ts +0 -7
- package/dist/workflows/index.d.ts.map +0 -1
- package/dist/workflows/index.js +0 -6
- 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 -441
- 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,64 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { ArtifactInventoryItem, Checksum } from "../domain/artifact.js";
|
|
3
|
-
import { CommandSpec, PublishCommandOperation, ValidateCommandOperation, ValidationNoteOperation } from "../domain/operation.js";
|
|
4
|
-
import { ReleaseModel } from "../domain/release.js";
|
|
5
|
-
import { TargetAuthSetup, TargetCapabilities, TargetConfig, TargetDryRunSupport, TargetMutability, TargetValidationStrategy } from "../domain/target.js";
|
|
6
|
-
import { PlanConstructionError } from "../planner/errors.js";
|
|
7
|
-
export type * from "../types/effect-internal.js";
|
|
8
|
-
interface DryRunValidationNoteOptions {
|
|
9
|
-
readonly id: string;
|
|
10
|
-
readonly targetId: string;
|
|
11
|
-
readonly dryRunSupport: Exclude<TargetDryRunSupport, "native">;
|
|
12
|
-
readonly simulatedDescription: string;
|
|
13
|
-
readonly skippedDescription: string;
|
|
14
|
-
readonly simulatedMessage: string;
|
|
15
|
-
readonly skippedMessage: string;
|
|
16
|
-
}
|
|
17
|
-
interface ReadOnlyCommandValidationOptions {
|
|
18
|
-
readonly id: string;
|
|
19
|
-
readonly targetId: string;
|
|
20
|
-
readonly description: string;
|
|
21
|
-
readonly gateReason: string;
|
|
22
|
-
readonly command: CommandSpec;
|
|
23
|
-
}
|
|
24
|
-
interface DryRunValidationOperationOptions extends Omit<DryRunValidationNoteOptions, "dryRunSupport"> {
|
|
25
|
-
readonly dryRunSupport: TargetDryRunSupport;
|
|
26
|
-
readonly nativeDescription: string;
|
|
27
|
-
readonly nativeGateReason: string;
|
|
28
|
-
readonly command: CommandSpec;
|
|
29
|
-
}
|
|
30
|
-
interface ArtifactErrorReasons {
|
|
31
|
-
readonly targetId: string;
|
|
32
|
-
readonly directoryReason: string;
|
|
33
|
-
readonly checksumReason: string;
|
|
34
|
-
}
|
|
35
|
-
interface UnsupportedCatalogTokenEnvOptions {
|
|
36
|
-
readonly targetId: string;
|
|
37
|
-
readonly targetLabel: string;
|
|
38
|
-
readonly tokenEnv: string | undefined;
|
|
39
|
-
}
|
|
40
|
-
interface CatalogGitPushOperationOptions {
|
|
41
|
-
readonly id: string;
|
|
42
|
-
readonly targetId: string;
|
|
43
|
-
readonly description: string;
|
|
44
|
-
readonly mutability: TargetMutability;
|
|
45
|
-
readonly directory: string | undefined;
|
|
46
|
-
readonly irreversibleReason: string;
|
|
47
|
-
readonly externallyVisibleReason: string;
|
|
48
|
-
}
|
|
49
|
-
export declare const noAuthCommand: (executable: string, args: ReadonlyArray<string>) => CommandSpec;
|
|
50
|
-
export declare const catalogPathBaseName: (pathName: string) => string;
|
|
51
|
-
export declare const rejectUnsupportedCatalogTokenEnv: (options: UnsupportedCatalogTokenEnvOptions) => Effect.Effect<undefined, PlanConstructionError, never>;
|
|
52
|
-
export declare const catalogGitPushOperation: (options: CatalogGitPushOperationOptions) => PublishCommandOperation;
|
|
53
|
-
export declare const validationStrategyForDryRun: (dryRunSupport: TargetDryRunSupport) => TargetValidationStrategy;
|
|
54
|
-
export declare const targetCapabilitiesFor: (target: TargetConfig, validationStrategy: TargetValidationStrategy, authSetup?: TargetAuthSetup | undefined) => TargetCapabilities;
|
|
55
|
-
export declare const readOnlyCommandValidationOperation: (options: ReadOnlyCommandValidationOptions) => ValidateCommandOperation;
|
|
56
|
-
export declare const validationNoteOperation: (options: DryRunValidationNoteOptions) => ValidationNoteOperation;
|
|
57
|
-
export declare const dryRunValidationOperation: (options: DryRunValidationOperationOptions) => ValidateCommandOperation | ValidationNoteOperation;
|
|
58
|
-
export declare const rejectNoDryRunInStrictMode: (target: import("../domain/target.js").NpmRegistryTarget | import("../domain/target.js").GitHubReleaseTarget | import("../domain/target.js").HomebrewTapTarget | import("../domain/target.js").PyPiRegistryTarget | import("../domain/target.js").ScoopBucketTarget, model: ReleaseModel, reason: string) => Effect.Effect<undefined, PlanConstructionError, never>;
|
|
59
|
-
export declare const findRequiredArtifact: (model: ReleaseModel, targetId: string, artifactId: string, missingReason: string) => Effect.Effect<ArtifactInventoryItem, PlanConstructionError, never>;
|
|
60
|
-
export declare const requireSha256FileArtifact: (artifact: ArtifactInventoryItem, reasons: ArtifactErrorReasons) => Effect.Effect<{
|
|
61
|
-
artifact: ArtifactInventoryItem;
|
|
62
|
-
checksum: Checksum;
|
|
63
|
-
}, PlanConstructionError, never>;
|
|
64
|
-
//# sourceMappingURL=adapter-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-helpers.d.ts","sourceRoot":"","sources":["../../src/targets/adapter-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EAIxB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EAEzB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,mBAAmB,6BAA6B,CAAA;AAEhD,UAAU,2BAA2B;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAA;IAC9D,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;IACrC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;IACnC,QAAQ,CAAC,gBAAgB,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M,CAAA;CACzC;AAED,eAAO,MAAM,aAAa,GACxB,YAAY,MAAM,EAClB,MAAM,aAAa,CAAC,MAAM,CAAC,KAC1B,WAMC,CAAA;AAEJ,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,KAAG,MAGtD,CAAA;AAED,eAAO,MAAM,gCAAgC,wGAY3C,CAAA;AAEF,eAAO,MAAM,uBAAuB,GAAI,SAAS,8BAA8B,KAAG,uBAYjF,CAAA;AAED,eAAO,MAAM,2BAA2B,GAAI,eAAe,mBAAmB,KAAG,wBAQhF,CAAA;AAED,eAAO,MAAM,qBAAqB,GAChC,QAAQ,YAAY,EACpB,oBAAoB,wBAAwB,EAC5C,YAAY,eAAe,GAAG,SAAS,KACtC,kBAUC,CAAA;AAEJ,eAAO,MAAM,kCAAkC,GAC7C,SAAS,gCAAgC,KACxC,wBAQC,CAAA;AAEJ,eAAO,MAAM,uBAAuB,GAAI,SAAS,2BAA2B,KAAG,uBAU3E,CAAA;AAEJ,eAAO,MAAM,yBAAyB,GACpC,SAAS,gCAAgC,KACxC,wBAAwB,GAAG,uBAiBxB,CAAA;AAEN,eAAO,MAAM,0BAA0B,qWAarC,CAAA;AAEF,eAAO,MAAM,oBAAoB,0JAgB/B,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;gCAsBpC,CAAA"}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { CommandSpec, PublishCommandOperation, ValidateCommandOperation, ValidationNoteOperation, executeGate, irreversibleGate, noApprovalGate } 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
|
-
gate: publishRisk === "irreversible"
|
|
31
|
-
? irreversibleGate(options.irreversibleReason)
|
|
32
|
-
: executeGate(options.externallyVisibleReason),
|
|
33
|
-
command: noAuthCommand("git", ["-C", options.directory ?? ".", "push"])
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
export const validationStrategyForDryRun = (dryRunSupport) => {
|
|
37
|
-
if (dryRunSupport === "native") {
|
|
38
|
-
return "native-command";
|
|
39
|
-
}
|
|
40
|
-
if (dryRunSupport === "simulated") {
|
|
41
|
-
return "simulated-plan";
|
|
42
|
-
}
|
|
43
|
-
return "skipped";
|
|
44
|
-
};
|
|
45
|
-
export const targetCapabilitiesFor = (target, validationStrategy, authSetup) => TargetCapabilities.make({
|
|
46
|
-
targetId: target.id,
|
|
47
|
-
targetTag: target._tag,
|
|
48
|
-
authRequirement: targetAuthRequirement(target),
|
|
49
|
-
dryRunSupport: target.dryRunSupport,
|
|
50
|
-
mutability: target.mutability,
|
|
51
|
-
recovery: target.recovery,
|
|
52
|
-
validationStrategy,
|
|
53
|
-
...(authSetup === undefined ? {} : { authSetup })
|
|
54
|
-
});
|
|
55
|
-
export const readOnlyCommandValidationOperation = (options) => ValidateCommandOperation.make({
|
|
56
|
-
id: options.id,
|
|
57
|
-
targetId: options.targetId,
|
|
58
|
-
description: options.description,
|
|
59
|
-
risk: "read-only",
|
|
60
|
-
gate: noApprovalGate(options.gateReason),
|
|
61
|
-
command: options.command
|
|
62
|
-
});
|
|
63
|
-
export const validationNoteOperation = (options) => ValidationNoteOperation.make({
|
|
64
|
-
id: options.id,
|
|
65
|
-
targetId: options.targetId,
|
|
66
|
-
description: options.dryRunSupport === "simulated" ? options.simulatedDescription : options.skippedDescription,
|
|
67
|
-
risk: "read-only",
|
|
68
|
-
gate: noApprovalGate("Validation notes do not modify local or remote state."),
|
|
69
|
-
message: options.dryRunSupport === "simulated" ? options.simulatedMessage : options.skippedMessage,
|
|
70
|
-
skipped: options.dryRunSupport === "none",
|
|
71
|
-
severity: options.dryRunSupport === "simulated" ? "info" : "warning"
|
|
72
|
-
});
|
|
73
|
-
export const dryRunValidationOperation = (options) => options.dryRunSupport === "native"
|
|
74
|
-
? readOnlyCommandValidationOperation({
|
|
75
|
-
id: options.id,
|
|
76
|
-
targetId: options.targetId,
|
|
77
|
-
description: options.nativeDescription,
|
|
78
|
-
gateReason: options.nativeGateReason,
|
|
79
|
-
command: options.command
|
|
80
|
-
})
|
|
81
|
-
: validationNoteOperation({
|
|
82
|
-
id: options.id,
|
|
83
|
-
targetId: options.targetId,
|
|
84
|
-
dryRunSupport: options.dryRunSupport,
|
|
85
|
-
simulatedDescription: options.simulatedDescription,
|
|
86
|
-
skippedDescription: options.skippedDescription,
|
|
87
|
-
simulatedMessage: options.simulatedMessage,
|
|
88
|
-
skippedMessage: options.skippedMessage
|
|
89
|
-
});
|
|
90
|
-
export const rejectNoDryRunInStrictMode = Effect.fn("rejectNoDryRunInStrictMode")(function* (target, model, reason) {
|
|
91
|
-
if (model.strict && target.dryRunSupport === "none") {
|
|
92
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
93
|
-
targetId: target.id,
|
|
94
|
-
reason
|
|
95
|
-
}));
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
export const findRequiredArtifact = Effect.fn("findRequiredArtifact")(function* (model, targetId, artifactId, missingReason) {
|
|
99
|
-
const artifact = model.artifacts.find((item) => item.id === artifactId);
|
|
100
|
-
if (artifact === undefined) {
|
|
101
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
102
|
-
targetId,
|
|
103
|
-
reason: missingReason
|
|
104
|
-
}));
|
|
105
|
-
}
|
|
106
|
-
return artifact;
|
|
107
|
-
});
|
|
108
|
-
export const requireSha256FileArtifact = Effect.fn("requireSha256FileArtifact")(function* (artifact, reasons) {
|
|
109
|
-
if (artifact.format === "directory") {
|
|
110
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
111
|
-
targetId: reasons.targetId,
|
|
112
|
-
reason: reasons.directoryReason
|
|
113
|
-
}));
|
|
114
|
-
}
|
|
115
|
-
if (artifact.checksum === undefined || artifact.checksum.algorithm !== "sha256") {
|
|
116
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
117
|
-
targetId: reasons.targetId,
|
|
118
|
-
reason: reasons.checksumReason
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
const checksum = artifact.checksum;
|
|
122
|
-
return { artifact, checksum };
|
|
123
|
-
});
|
|
124
|
-
//# 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;AAEvC,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACf,MAAM,wBAAwB,CAAA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B,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;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEzD,mBAAmB,6BAA6B,CAAA;AAEhD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC,UA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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;IAC1D,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;CAC3D,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,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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,EAOL,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;AA6FjE,eAAO,MAAM,oBAAoB,4VAkD/B,CAAA;AAEF,eAAO,MAAM,aAAa,EAAE,mBAI3B,CAAA"}
|
package/dist/targets/github.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { executeGate, HttpJsonArrayObjectFieldEqualsCheck, HttpJsonEqualsCheck, irreversibleGate, noApprovalGate, 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
|
-
gate: noApprovalGate("GitHub CLI release verification is read-only."),
|
|
27
|
-
command: githubReleaseViewCommand(target, model)
|
|
28
|
-
})
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
const tag = githubReleaseTag(model);
|
|
32
|
-
const title = githubReleaseTitle(model);
|
|
33
|
-
const isPrerelease = target.prerelease === true;
|
|
34
|
-
const artifactChecks = githubTargetArtifacts(target, model).map((artifact) => HttpJsonArrayObjectFieldEqualsCheck.make({
|
|
35
|
-
path: ["assets"],
|
|
36
|
-
field: "name",
|
|
37
|
-
expected: githubReleaseAssetName(artifact.path)
|
|
38
|
-
}));
|
|
39
|
-
return [
|
|
40
|
-
VerifyHttpOperation.make({
|
|
41
|
-
id: `${target.id}:github-release-verify-http`,
|
|
42
|
-
targetId: target.id,
|
|
43
|
-
description: "Verify the GitHub release through the GitHub API.",
|
|
44
|
-
risk: "read-only",
|
|
45
|
-
gate: noApprovalGate("GitHub API release verification is read-only."),
|
|
46
|
-
request: githubReleaseRequestSpec(target, tag),
|
|
47
|
-
expectedStatus: 200,
|
|
48
|
-
checks: [
|
|
49
|
-
HttpJsonEqualsCheck.make({
|
|
50
|
-
path: ["tag_name"],
|
|
51
|
-
expected: tag
|
|
52
|
-
}),
|
|
53
|
-
HttpJsonEqualsCheck.make({
|
|
54
|
-
path: ["name"],
|
|
55
|
-
expected: title
|
|
56
|
-
}),
|
|
57
|
-
HttpJsonEqualsCheck.make({
|
|
58
|
-
path: ["draft"],
|
|
59
|
-
expected: false
|
|
60
|
-
}),
|
|
61
|
-
HttpJsonEqualsCheck.make({
|
|
62
|
-
path: ["prerelease"],
|
|
63
|
-
expected: isPrerelease
|
|
64
|
-
}),
|
|
65
|
-
...artifactChecks
|
|
66
|
-
]
|
|
67
|
-
})
|
|
68
|
-
];
|
|
69
|
-
};
|
|
70
|
-
const githubDryRunOperation = (target, dryRunSupport) => validationNoteOperation({
|
|
71
|
-
id: `${target.id}:gh-release-dry-run`,
|
|
72
|
-
targetId: target.id,
|
|
73
|
-
dryRunSupport,
|
|
74
|
-
simulatedDescription: "Record simulated GitHub release dry-run validation.",
|
|
75
|
-
skippedDescription: "Record skipped GitHub release dry-run validation.",
|
|
76
|
-
simulatedMessage: "GitHub release dry-run validation is simulated by the deterministic release plan; gh release create has no native dry-run command.",
|
|
77
|
-
skippedMessage: "GitHub release dry-run validation was skipped because this target declares no dry-run support."
|
|
78
|
-
});
|
|
79
|
-
export const planGitHubOperations = Effect.fn("planGitHubOperations")(function* (target, model) {
|
|
80
|
-
const dryRunSupport = target.dryRunSupport;
|
|
81
|
-
if (dryRunSupport === "native") {
|
|
82
|
-
return yield* Effect.fail(PlanConstructionError.make({
|
|
83
|
-
targetId: target.id,
|
|
84
|
-
reason: "GitHub release targets do not support native dry-run; use simulated dry-run support."
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
yield* rejectNoDryRunInStrictMode(target, model, "GitHub release target declares no dry-run support in strict mode.");
|
|
88
|
-
yield* rejectDirectoryAssets(target, model);
|
|
89
|
-
const publishRisk = target.mutability === "immutable" ? "irreversible" : "externally-visible";
|
|
90
|
-
const publishGate = publishRisk === "irreversible"
|
|
91
|
-
? irreversibleGate("Creating this GitHub release is externally visible and configured as immutable.")
|
|
92
|
-
: executeGate("Creating or updating a GitHub release is externally visible.");
|
|
93
|
-
return [
|
|
94
|
-
readOnlyCommandValidationOperation({
|
|
95
|
-
id: `${target.id}:gh-version`,
|
|
96
|
-
targetId: target.id,
|
|
97
|
-
description: "Check GitHub CLI availability.",
|
|
98
|
-
gateReason: "CLI availability validation is read-only.",
|
|
99
|
-
command: githubGhCommand(target, ["--version"], false)
|
|
100
|
-
}),
|
|
101
|
-
readOnlyCommandValidationOperation({
|
|
102
|
-
id: `${target.id}:gh-auth-status`,
|
|
103
|
-
targetId: target.id,
|
|
104
|
-
description: "Validate GitHub CLI authentication.",
|
|
105
|
-
gateReason: "gh auth status checks authentication without publishing.",
|
|
106
|
-
command: githubGhCommand(target, ["auth", "status"], true)
|
|
107
|
-
}),
|
|
108
|
-
githubDryRunOperation(target, dryRunSupport),
|
|
109
|
-
PublishCommandOperation.make({
|
|
110
|
-
id: `${target.id}:gh-release-create`,
|
|
111
|
-
targetId: target.id,
|
|
112
|
-
description: `Create GitHub release for ${model.identity.name}@${model.identity.version}.`,
|
|
113
|
-
risk: publishRisk,
|
|
114
|
-
gate: publishGate,
|
|
115
|
-
command: githubReleaseCreateCommand(target, model)
|
|
116
|
-
}),
|
|
117
|
-
...githubVerificationOperations(target, model)
|
|
118
|
-
];
|
|
119
|
-
});
|
|
120
|
-
export const GitHubAdapter = {
|
|
121
|
-
targetTag: "GitHubReleaseTarget",
|
|
122
|
-
capabilities: githubTargetCapabilities,
|
|
123
|
-
planOperations: planGitHubOperations
|
|
124
|
-
};
|
|
125
|
-
//# 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,WAAW,EACX,mCAAmC,EACnC,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EAEd,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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C,UAAU,EAAE,2CAA2C;YACvD,OAAO,EAAE,eAAe,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;SACvD,CAAC;QACF,kCAAkC,CAAC;YACjC,EAAE,EAAE,GAAG,MAAM,CAAC,EAAE,iBAAiB;YACjC,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,WAAW,EAAE,qCAAqC;YAClD,UAAU,EAAE,0DAA0D;YACtE,OAAO,EAAE,eAAe,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC;SAC3D,CAAC;QACF,qBAAqB,CAAC,MAAM,EAAE,aAAa,CAAC;QAC5C,uBAAuB,CAAC,IAAI,CAAC;YAC3B,EAAE,EAAE,GAAG,MAAM,CAAC,EAAE,oBAAoB;YACpC,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,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;AACvC,OAAO,EAGL,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;AA6DlF,eAAO,MAAM,sBAAsB,4ZA8CjC,CAAA;AAEF,eAAO,MAAM,eAAe,EAAE,qBAI7B,CAAA"}
|
package/dist/targets/homebrew.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { executeGate, RenderFileOperation } from "../domain/operation.js";
|
|
3
|
-
import { catalogGitPushOperation, catalogPathBaseName, dryRunValidationOperation, findRequiredArtifact, noAuthCommand, readOnlyCommandValidationOperation, requireSha256FileArtifact, rejectNoDryRunInStrictMode, rejectUnsupportedCatalogTokenEnv, targetCapabilitiesFor, validationStrategyForDryRun } from "./adapter-helpers.js";
|
|
4
|
-
const rejectUnsupportedTokenEnv = Effect.fn("rejectUnsupportedHomebrewTokenEnv")(function* (target) {
|
|
5
|
-
return yield* rejectUnsupportedCatalogTokenEnv({
|
|
6
|
-
targetId: target.id,
|
|
7
|
-
targetLabel: "Homebrew tap",
|
|
8
|
-
tokenEnv: target.tokenEnv
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
export const homebrewTargetCapabilities = (target) => targetCapabilitiesFor(target, validationStrategyForDryRun(target.dryRunSupport));
|
|
12
|
-
const rubyString = (value) => JSON.stringify(value);
|
|
13
|
-
const formulaClassName = (formulaName) => {
|
|
14
|
-
const parts = formulaName.split(/[^A-Za-z0-9]+/).filter((part) => part.length > 0);
|
|
15
|
-
const className = parts.map((part) => `${part.slice(0, 1).toUpperCase()}${part.slice(1)}`).join("");
|
|
16
|
-
return className.length === 0 ? "GeneratedFormula" : className;
|
|
17
|
-
};
|
|
18
|
-
const renderFormula = (target, model) => Effect.gen(function* () {
|
|
19
|
-
const artifact = yield* findRequiredArtifact(model, target.id, target.artifactId, `Homebrew target references missing artifact ${target.artifactId}.`);
|
|
20
|
-
const validated = yield* requireSha256FileArtifact(artifact, {
|
|
21
|
-
targetId: target.id,
|
|
22
|
-
directoryReason: "Homebrew formula artifacts must be file-like, not directories.",
|
|
23
|
-
checksumReason: "Homebrew formula rendering requires a sha256 artifact checksum."
|
|
24
|
-
});
|
|
25
|
-
const installLines = target.installPath === undefined
|
|
26
|
-
? [" prefix.install Dir[\"*\"]"]
|
|
27
|
-
: [` bin.install ${rubyString(target.installPath)} => ${rubyString(target.formulaName)}`];
|
|
28
|
-
const homepage = target.homepage ?? `https://github.com/${target.repository}`;
|
|
29
|
-
const url = target.url ?? validated.artifact.path;
|
|
30
|
-
return [
|
|
31
|
-
`class ${formulaClassName(target.formulaName)} < Formula`,
|
|
32
|
-
` desc ${rubyString(`${model.identity.name} ${model.identity.version} release artifact`)}`,
|
|
33
|
-
` homepage ${rubyString(homepage)}`,
|
|
34
|
-
` url ${rubyString(url)}`,
|
|
35
|
-
` sha256 ${rubyString(validated.checksum.value)}`,
|
|
36
|
-
` version ${rubyString(model.identity.version)}`,
|
|
37
|
-
"",
|
|
38
|
-
" def install",
|
|
39
|
-
...installLines,
|
|
40
|
-
" end",
|
|
41
|
-
"end",
|
|
42
|
-
""
|
|
43
|
-
].join("\n");
|
|
44
|
-
});
|
|
45
|
-
const dryRunOperation = (target) => dryRunValidationOperation({
|
|
46
|
-
id: `${target.id}:brew-audit`,
|
|
47
|
-
targetId: target.id,
|
|
48
|
-
dryRunSupport: target.dryRunSupport,
|
|
49
|
-
nativeDescription: "Validate generated Homebrew formula with brew audit.",
|
|
50
|
-
nativeGateReason: "brew audit validates the generated formula without publishing.",
|
|
51
|
-
command: noAuthCommand("brew", ["audit", "--strict", "--formula", target.formulaPath]),
|
|
52
|
-
simulatedDescription: "Record simulated Homebrew formula validation.",
|
|
53
|
-
skippedDescription: "Record skipped Homebrew formula validation.",
|
|
54
|
-
simulatedMessage: "Homebrew formula validation is simulated by the deterministic release plan.",
|
|
55
|
-
skippedMessage: "Homebrew formula validation was skipped because this target declares no dry-run support."
|
|
56
|
-
});
|
|
57
|
-
export const planHomebrewOperations = Effect.fn("planHomebrewOperations")(function* (target, model) {
|
|
58
|
-
yield* rejectUnsupportedTokenEnv(target);
|
|
59
|
-
yield* rejectNoDryRunInStrictMode(target, model, "Homebrew tap target declares no dry-run support in strict mode.");
|
|
60
|
-
const formula = yield* renderFormula(target, model);
|
|
61
|
-
const operations = [
|
|
62
|
-
RenderFileOperation.make({
|
|
63
|
-
id: `${target.id}:homebrew-render-formula`,
|
|
64
|
-
targetId: target.id,
|
|
65
|
-
description: `Render Homebrew formula ${catalogPathBaseName(target.formulaPath)}.`,
|
|
66
|
-
risk: "writes-local",
|
|
67
|
-
gate: executeGate("Rendering a Homebrew formula writes a local generated file."),
|
|
68
|
-
path: target.formulaPath,
|
|
69
|
-
contents: formula
|
|
70
|
-
})
|
|
71
|
-
];
|
|
72
|
-
if (target.dryRunSupport === "native") {
|
|
73
|
-
operations.push(readOnlyCommandValidationOperation({
|
|
74
|
-
id: `${target.id}:brew-version`,
|
|
75
|
-
targetId: target.id,
|
|
76
|
-
description: "Check Homebrew CLI availability.",
|
|
77
|
-
gateReason: "CLI availability validation is read-only.",
|
|
78
|
-
command: noAuthCommand("brew", ["--version"])
|
|
79
|
-
}));
|
|
80
|
-
}
|
|
81
|
-
operations.push(dryRunOperation(target), catalogGitPushOperation({
|
|
82
|
-
id: `${target.id}:homebrew-push`,
|
|
83
|
-
targetId: target.id,
|
|
84
|
-
description: `Push Homebrew tap update for ${model.identity.name}@${model.identity.version}.`,
|
|
85
|
-
mutability: target.mutability,
|
|
86
|
-
directory: target.tapDirectory,
|
|
87
|
-
irreversibleReason: "Pushing a Homebrew tap update is configured as irreversible.",
|
|
88
|
-
externallyVisibleReason: "Pushing a Homebrew tap update is externally visible."
|
|
89
|
-
}));
|
|
90
|
-
return operations;
|
|
91
|
-
});
|
|
92
|
-
export const HomebrewAdapter = {
|
|
93
|
-
targetTag: "HomebrewTapTarget",
|
|
94
|
-
capabilities: homebrewTargetCapabilities,
|
|
95
|
-
planOperations: planHomebrewOperations
|
|
96
|
-
};
|
|
97
|
-
//# sourceMappingURL=homebrew.js.map
|