@intentius/chant 0.124.100 → 0.124.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-pins.d.ts +2 -0
- package/dist/action-pins.js +3 -0
- package/dist/ci-detect.d.ts +13 -0
- package/dist/ci-detect.js +12 -0
- package/dist/ci-evidence-claims.d.ts +12 -0
- package/dist/ci-evidence-claims.js +12 -0
- package/dist/ci-system.d.ts +66 -0
- package/dist/ci-system.js +61 -0
- package/dist/cli/handlers/build.js +27 -0
- package/dist/cli/handlers/release-doctor.d.ts +12 -0
- package/dist/cli/handlers/release-doctor.js +118 -0
- package/dist/cli/handlers/release-init.d.ts +10 -0
- package/dist/cli/handlers/release-init.js +374 -0
- package/dist/cli/handlers/release.d.ts +43 -2
- package/dist/cli/handlers/release.js +667 -39
- package/dist/cli/handlers/run-generate.js +11 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +44 -101
- package/dist/cli/parse-args.js +48 -0
- package/dist/cli/registry.d.ts +16 -0
- package/dist/cli/release-commands/artifacts.d.ts +3 -0
- package/dist/cli/release-commands/artifacts.js +14 -0
- package/dist/cli/release-commands/candidates.d.ts +3 -0
- package/dist/cli/release-commands/candidates.js +16 -0
- package/dist/cli/release-commands/changed.d.ts +3 -0
- package/dist/cli/release-commands/changed.js +14 -0
- package/dist/cli/release-commands/compose.d.ts +3 -0
- package/dist/cli/release-commands/compose.js +16 -0
- package/dist/cli/release-commands/cut.d.ts +3 -0
- package/dist/cli/release-commands/cut.js +50 -0
- package/dist/cli/release-commands/doctor.d.ts +3 -0
- package/dist/cli/release-commands/doctor.js +14 -0
- package/dist/cli/release-commands/export.d.ts +3 -0
- package/dist/cli/release-commands/export.js +12 -0
- package/dist/cli/release-commands/images.d.ts +3 -0
- package/dist/cli/release-commands/images.js +13 -0
- package/dist/cli/release-commands/index.d.ts +8 -0
- package/dist/cli/release-commands/index.js +52 -0
- package/dist/cli/release-commands/init.d.ts +3 -0
- package/dist/cli/release-commands/init.js +19 -0
- package/dist/cli/release-commands/list.d.ts +3 -0
- package/dist/cli/release-commands/list.js +10 -0
- package/dist/cli/release-commands/next.d.ts +3 -0
- package/dist/cli/release-commands/next.js +13 -0
- package/dist/cli/release-commands/publish.d.ts +3 -0
- package/dist/cli/release-commands/publish.js +22 -0
- package/dist/cli/release-commands/stamp.d.ts +3 -0
- package/dist/cli/release-commands/stamp.js +15 -0
- package/dist/cli/release-commands/status.d.ts +3 -0
- package/dist/cli/release-commands/status.js +17 -0
- package/dist/cli/release-commands/tag.d.ts +3 -0
- package/dist/cli/release-commands/tag.js +12 -0
- package/dist/cli/release-commands/types.d.ts +20 -0
- package/dist/cli/release-commands/types.js +1 -0
- package/dist/cli/release-commands/verify.d.ts +3 -0
- package/dist/cli/release-commands/verify.js +15 -0
- package/dist/cli/release-commands/workflow.d.ts +3 -0
- package/dist/cli/release-commands/workflow.js +15 -0
- package/dist/cloud-lister/index.d.ts +4 -1
- package/dist/cloud-lister/index.js +2 -1
- package/dist/cloud-lister/kubernetes-components.d.ts +56 -0
- package/dist/cloud-lister/kubernetes-components.js +642 -0
- package/dist/cloud-lister/kubernetes.d.ts +18 -0
- package/dist/cloud-lister/kubernetes.js +26 -1
- package/dist/cloud-lister/mask.d.ts +5 -1
- package/dist/cloud-lister/mask.js +14 -5
- package/dist/components/cli-support.d.ts +1 -1
- package/dist/components/cli-support.js +1 -1
- package/dist/config-environments.d.ts +8 -1
- package/dist/config-environments.js +2 -0
- package/dist/config-import.d.ts +1 -1
- package/dist/config-import.js +6 -2
- package/dist/config-sandbox.d.ts +1 -1
- package/dist/config-sandbox.js +3 -3
- package/dist/config.d.ts +369 -10
- package/dist/config.js +127 -7
- package/dist/deep-observation.js +9 -3
- package/dist/floor-table.data.js +21 -1
- package/dist/forge-remote.d.ts +13 -0
- package/dist/forge-remote.js +15 -0
- package/dist/lexicon.d.ts +45 -4
- package/dist/lifecycle/__fixtures__/package-files.d.ts +32 -0
- package/dist/lifecycle/__fixtures__/package-files.js +72 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +62 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.js +275 -3
- package/dist/lifecycle/publish-attachments.d.ts +2 -1
- package/dist/lifecycle/publish-attachments.js +19 -2
- package/dist/lifecycle/publish-cargo.d.ts +99 -0
- package/dist/lifecycle/publish-cargo.js +412 -0
- package/dist/lifecycle/publish-credentials.d.ts +1 -1
- package/dist/lifecycle/publish-credentials.js +13 -0
- package/dist/lifecycle/publish-declaration.d.ts +322 -4
- package/dist/lifecycle/publish-declaration.js +340 -9
- package/dist/lifecycle/publish-forge.d.ts +45 -2
- package/dist/lifecycle/publish-forge.js +434 -34
- package/dist/lifecycle/publish-git-ssh.d.ts +15 -0
- package/dist/lifecycle/publish-git-ssh.js +30 -4
- package/dist/lifecycle/publish-github.d.ts +40 -2
- package/dist/lifecycle/publish-github.js +100 -3
- package/dist/lifecycle/publish-helm.d.ts +83 -0
- package/dist/lifecycle/publish-helm.js +452 -0
- package/dist/lifecycle/publish-homebrew.d.ts +7 -9
- package/dist/lifecycle/publish-homebrew.js +34 -197
- package/dist/lifecycle/publish-index.d.ts +141 -0
- package/dist/lifecycle/publish-index.js +719 -0
- package/dist/lifecycle/publish-marketplace.js +77 -0
- package/dist/lifecycle/publish-maven.d.ts +79 -0
- package/dist/lifecycle/publish-maven.js +364 -0
- package/dist/lifecycle/publish-mcp-registry.d.ts +66 -0
- package/dist/lifecycle/publish-mcp-registry.js +305 -0
- package/dist/lifecycle/publish-npm.d.ts +27 -1
- package/dist/lifecycle/publish-npm.js +216 -3
- package/dist/lifecycle/publish-nuget.d.ts +93 -0
- package/dist/lifecycle/publish-nuget.js +377 -0
- package/dist/lifecycle/publish-oci.d.ts +91 -2
- package/dist/lifecycle/publish-oci.js +247 -8
- package/dist/lifecycle/publish-package-files.d.ts +16 -0
- package/dist/lifecycle/publish-package-files.js +39 -0
- package/dist/lifecycle/publish-pypi.d.ts +138 -0
- package/dist/lifecycle/publish-pypi.js +657 -0
- package/dist/lifecycle/publish-record.d.ts +6 -3
- package/dist/lifecycle/publish-record.js +6 -3
- package/dist/lifecycle/publish-rubygems.d.ts +84 -0
- package/dist/lifecycle/publish-rubygems.js +366 -0
- package/dist/lifecycle/publish-signing.d.ts +147 -0
- package/dist/lifecycle/publish-signing.js +257 -0
- package/dist/lifecycle/publish-targets.d.ts +37 -1
- package/dist/lifecycle/publish-targets.js +102 -0
- package/dist/lifecycle/publish-tauri.js +43 -0
- package/dist/lifecycle/publish-train-names.d.ts +57 -0
- package/dist/lifecycle/publish-train-names.js +123 -0
- package/dist/lifecycle/publish-verify.d.ts +121 -0
- package/dist/lifecycle/publish-verify.js +130 -0
- package/dist/lifecycle/query.js +8 -0
- package/dist/lifecycle/release-artifacts.d.ts +290 -0
- package/dist/lifecycle/release-artifacts.js +808 -0
- package/dist/lifecycle/release-changelog.d.ts +13 -1
- package/dist/lifecycle/release-changelog.js +35 -2
- package/dist/lifecycle/release-cut.d.ts +64 -4
- package/dist/lifecycle/release-cut.js +147 -34
- package/dist/lifecycle/release-doctor.d.ts +113 -0
- package/dist/lifecycle/release-doctor.js +1198 -0
- package/dist/lifecycle/release-green.d.ts +86 -0
- package/dist/lifecycle/release-green.js +286 -0
- package/dist/lifecycle/release-init-registries.d.ts +48 -0
- package/dist/lifecycle/release-init-registries.js +97 -0
- package/dist/lifecycle/release-init.d.ts +275 -0
- package/dist/lifecycle/release-init.js +984 -0
- package/dist/lifecycle/release-intents.d.ts +73 -0
- package/dist/lifecycle/release-intents.js +128 -0
- package/dist/lifecycle/release-next.d.ts +111 -0
- package/dist/lifecycle/release-next.js +251 -0
- package/dist/lifecycle/release-prerelease.d.ts +19 -0
- package/dist/lifecycle/release-prerelease.js +30 -0
- package/dist/lifecycle/release-publish.d.ts +256 -10
- package/dist/lifecycle/release-publish.js +247 -35
- package/dist/lifecycle/release-status-change.d.ts +226 -0
- package/dist/lifecycle/release-status-change.js +478 -0
- package/dist/lifecycle/release-status.d.ts +11 -0
- package/dist/lifecycle/release-status.js +1 -1
- package/dist/lifecycle/release-store.d.ts +73 -2
- package/dist/lifecycle/release-store.js +32 -1
- package/dist/lifecycle/release-tag.d.ts +142 -0
- package/dist/lifecycle/release-tag.js +322 -0
- package/dist/lifecycle/release-verify.d.ts +73 -1
- package/dist/lifecycle/release-verify.js +117 -2
- package/dist/lifecycle/release-version-formats.d.ts +73 -0
- package/dist/lifecycle/release-version-formats.js +570 -0
- package/dist/lifecycle/release-version.d.ts +58 -10
- package/dist/lifecycle/release-version.js +164 -36
- package/dist/lifecycle/release-workstation.d.ts +3 -2
- package/dist/lifecycle/release-workstation.js +3 -2
- package/dist/op/generate-pipeline.js +1 -1
- package/dist/op/local-executor.d.ts +1 -1
- package/dist/op/local-executor.js +2 -2
- package/dist/op/op-waves-evidence.js +9 -2
- package/dist/pr-forge-base.js +4 -2
- package/dist/pr-forge.d.ts +20 -2
- package/dist/pr-forge.js +46 -10
- package/dist/release-floors.d.ts +8 -1
- package/dist/release-floors.js +9 -2
- package/dist/sensitive-key.d.ts +12 -0
- package/dist/sensitive-key.js +52 -0
- package/dist/tool-pins.d.ts +40 -0
- package/dist/tool-pins.js +66 -0
- package/dist/ts-loader.d.ts +8 -0
- package/dist/ts-loader.js +19 -0
- package/dist/wave-runtime.mjs +345 -342
- package/dist/workspace/ci-forge.d.ts +17 -0
- package/dist/workspace/ci-forge.js +17 -0
- package/dist/workspace/ci-init.js +1 -1
- package/dist/workspace/composites.schema.json +1 -0
- package/dist/workspace/declaration.d.ts +8 -0
- package/dist/workspace/declaration.js +12 -0
- package/dist/workspace/declaration.schema.json +8 -0
- package/dist/workspace/environments.d.ts +2 -0
- package/dist/workspace/environments.js +1 -1
- package/dist/workspace/identity-gate-rule.d.ts +61 -5
- package/dist/workspace/identity-gate-rule.js +81 -12
- package/dist/workspace/lexicon-outputs.d.ts +1 -1
- package/dist/workspace/lexicon-outputs.js +1 -1
- package/dist/workspace/member-pipeline.d.ts +2 -1
- package/dist/workspace/member-pipeline.js +5 -2
- package/dist/workspace/reason-codes.d.ts +2 -0
- package/dist/workspace/reason-codes.js +3 -1
- package/dist/workspace/release-changed.d.ts +75 -4
- package/dist/workspace/release-changed.js +205 -34
- package/dist/workspace/release-changed.schema.json +20 -2
- package/dist/workspace/release-steps/artifacts.d.ts +7 -0
- package/dist/workspace/release-steps/artifacts.js +45 -0
- package/dist/workspace/release-steps/builds.d.ts +12 -0
- package/dist/workspace/release-steps/builds.js +38 -0
- package/dist/workspace/release-steps/doctor.d.ts +8 -0
- package/dist/workspace/release-steps/doctor.js +14 -0
- package/dist/workspace/release-steps/goreleaser.d.ts +16 -0
- package/dist/workspace/release-steps/goreleaser.js +36 -0
- package/dist/workspace/release-steps/green.d.ts +3 -0
- package/dist/workspace/release-steps/green.js +6 -0
- package/dist/workspace/release-steps/images.d.ts +22 -0
- package/dist/workspace/release-steps/images.js +59 -0
- package/dist/workspace/release-steps/index.d.ts +9 -0
- package/dist/workspace/release-steps/index.js +50 -0
- package/dist/workspace/release-steps/nfpm.d.ts +13 -0
- package/dist/workspace/release-steps/nfpm.js +29 -0
- package/dist/workspace/release-steps/nuget.d.ts +14 -0
- package/dist/workspace/release-steps/nuget.js +16 -0
- package/dist/workspace/release-steps/pypi.d.ts +15 -0
- package/dist/workspace/release-steps/pypi.js +21 -0
- package/dist/workspace/release-steps/qemu.d.ts +21 -0
- package/dist/workspace/release-steps/qemu.js +35 -0
- package/dist/workspace/release-steps/signing.d.ts +18 -0
- package/dist/workspace/release-steps/signing.js +30 -0
- package/dist/workspace/release-steps/stamp.d.ts +3 -0
- package/dist/workspace/release-steps/stamp.js +4 -0
- package/dist/workspace/release-steps/targets.d.ts +31 -0
- package/dist/workspace/release-steps/targets.js +40 -0
- package/dist/workspace/release-steps/types.d.ts +104 -0
- package/dist/workspace/release-steps/types.js +2 -0
- package/dist/workspace/release-steps/verify.d.ts +3 -0
- package/dist/workspace/release-steps/verify.js +4 -0
- package/dist/workspace/release-toolchains.d.ts +59 -0
- package/dist/workspace/release-toolchains.js +133 -0
- package/dist/workspace/release-train-workflow.d.ts +36 -0
- package/dist/workspace/release-train-workflow.js +121 -0
- package/dist/workspace/release-train.d.ts +3 -1
- package/dist/workspace/release-train.js +20 -3
- package/dist/workspace/release-workflow.d.ts +183 -59
- package/dist/workspace/release-workflow.js +570 -201
- package/dist/workspace/releases.schema.json +70 -1
- package/dist/workspace/search-contract.d.ts +1 -1
- package/dist/workspace/security.js +9 -2
- package/dist/workspace/train-cut.d.ts +182 -0
- package/dist/workspace/train-cut.js +504 -0
- package/dist/workspace/train-prepare.d.ts +64 -0
- package/dist/workspace/train-prepare.js +313 -0
- package/dist/workspace/train-publish.d.ts +177 -0
- package/dist/workspace/train-publish.js +574 -0
- package/dist/workspace/train-range-labels.d.ts +33 -0
- package/dist/workspace/train-range-labels.js +109 -0
- package/dist/workspace/train-shell.d.ts +5 -0
- package/dist/workspace/train-shell.js +17 -0
- package/dist/workspace/trust/check-evidence-report.d.ts +3 -7
- package/dist/workspace/trust/check-evidence-report.js +3 -7
- package/dist/workspace/trust/seal.d.ts +13 -3
- package/dist/workspace/trust/seal.js +14 -4
- package/dist/workspace/work-cli.d.ts +3 -2
- package/dist/workspace/work-cli.js +3 -2
- package/dist/workspace/workspace-ledger.d.ts +14 -1
- package/dist/workspace/workspace-ledger.js +33 -7
- package/package.json +1 -1
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Files a release builds once, in its cut (#5151): binaries, archives of
|
|
3
|
+
* them, a checksums file, or what goreleaser writes.
|
|
4
|
+
*
|
|
5
|
+
* `release.artifacts` in `chant.config.ts` lists them, in order:
|
|
6
|
+
*
|
|
7
|
+
* - `{ name, build, outputs, platforms?, archive? }`: the cut runs `build` in
|
|
8
|
+
* the member's directory, once, or once per platform with
|
|
9
|
+
* `CHANT_RELEASE_OS`, `CHANT_RELEASE_ARCH` and `CHANT_RELEASE_EXT` set
|
|
10
|
+
* (`.exe` on Windows, else empty), and records each file `outputs` names.
|
|
11
|
+
* An output may hold `{os}`, `{arch}`, `{ext}`, `{label}` and `{version}`,
|
|
12
|
+
* and `*` or `?` within a path segment. With `archive`, chant packs each
|
|
13
|
+
* platform's outputs, with `archive.files` beside them, into a tar.gz
|
|
14
|
+
* (a zip on Windows), and the release records the archives in place of
|
|
15
|
+
* the outputs. chant writes the archives itself, every entry dated
|
|
16
|
+
* `SOURCE_DATE_EPOCH` and owned by root, so the same files pack to the
|
|
17
|
+
* same bytes.
|
|
18
|
+
* - `{ name, outputs, platforms?, archive?, builtBy? }`, with no `build`
|
|
19
|
+
* (#5183): files something else built, such as a `release.workflow.builds`
|
|
20
|
+
* job on another runner, whose archive the release workflow unpacks into
|
|
21
|
+
* the checkout before the cut. The cut runs nothing and records the files
|
|
22
|
+
* at `outputs`, per platform, packing them as above; one that is not there
|
|
23
|
+
* stops it (`release-artifact-not-built`). `builtBy` names the build jobs
|
|
24
|
+
* that write them, and `outputs` defaults to those jobs' outputs. Under
|
|
25
|
+
* `--at` the cut reads them from the checkout it runs in, which must be at
|
|
26
|
+
* the commit it cuts.
|
|
27
|
+
* - `{ name, goreleaser: { config?, dist?, types? } }`: the cut runs
|
|
28
|
+
* `goreleaser release --snapshot --clean --skip=publish`, so goreleaser
|
|
29
|
+
* builds and publishes nothing, checks that `<dist>/metadata.json` gives
|
|
30
|
+
* the release's label as the version (the config's
|
|
31
|
+
* `snapshot.version_template` is `{{ .Env.CHANT_RELEASE_LABEL }}`), and
|
|
32
|
+
* records the files `<dist>/artifacts.json` lists of `types`. chant's own
|
|
33
|
+
* targets publish them. The goreleaser run is `CHANT_GORELEASER` when set,
|
|
34
|
+
* which `chant release workflow` points at the version it pins
|
|
35
|
+
* (../tool-pins.ts), else `goreleaser` on the PATH.
|
|
36
|
+
* - `{ name, helm: { chart, dir?, appVersion? } }` (#5233): chant packs the
|
|
37
|
+
* Helm chart in the directory `chart` into `<dir>/<chart name>-<version>.tgz`
|
|
38
|
+
* itself, as `helm package` lays it out (the chart's files under a
|
|
39
|
+
* directory named for it, less what `.helmignore` and helm's own default
|
|
40
|
+
* leave out), with `version` in `Chart.yaml` set to the label from its first
|
|
41
|
+
* digit and, with `appVersion`, `appVersion` set to the label. Every entry is
|
|
42
|
+
* dated `SOURCE_DATE_EPOCH`, so the same chart packs to the same bytes. No
|
|
43
|
+
* helm is needed; a chart's dependencies are packed as they sit in its
|
|
44
|
+
* `charts/` directory.
|
|
45
|
+
* - `{ name, nfpm: { config?, packagers?, platforms?, dir?, fileName? } }`
|
|
46
|
+
* (#5233): the cut runs nfpm once per packager (`deb` and `rpm` by default)
|
|
47
|
+
* and platform, with `CHANT_RELEASE_VERSION` (the label from its first
|
|
48
|
+
* digit), `CHANT_RELEASE_LABEL`, `CHANT_RELEASE_OS` and `CHANT_RELEASE_ARCH`
|
|
49
|
+
* set for the config to read, and records each package. The config's
|
|
50
|
+
* `version` must name `${CHANT_RELEASE_VERSION}` or `${CHANT_RELEASE_LABEL}`
|
|
51
|
+
* (`release-artifact-version-mismatch`). The nfpm run is `CHANT_NFPM` when
|
|
52
|
+
* set, which `chant release workflow` points at the version it pins
|
|
53
|
+
* (../tool-pins.ts), else `nfpm` on the PATH.
|
|
54
|
+
* - `{ name, checksums, of? }`: a file of `<sha256> <file name>` lines, as
|
|
55
|
+
* `sha256sum` writes and checks them, over the files of the entries `of`
|
|
56
|
+
* names (default: every entry before it).
|
|
57
|
+
*
|
|
58
|
+
* Each file is recorded in the release as an `asset` artifact whose
|
|
59
|
+
* `component` is the entry's name, so a publish target that reads a file at
|
|
60
|
+
* a recorded path refuses one whose digest differs
|
|
61
|
+
* (`publish-artifact-digest-mismatch`, ./publish-targets.ts). A forge,
|
|
62
|
+
* homebrew or index target names an entry's files with `artifact:<name>` in its
|
|
63
|
+
* `assets`.
|
|
64
|
+
*
|
|
65
|
+
* A dispatched release workflow hands the files from the cut job to the
|
|
66
|
+
* publish job, which checks them against the record (`chant release
|
|
67
|
+
* artifacts --from`). A workflow on a release tag builds them again from
|
|
68
|
+
* the release's commit (`chant release artifacts <label>`) and refuses a
|
|
69
|
+
* file that differs, which needs builds that write the same bytes twice.
|
|
70
|
+
*/
|
|
71
|
+
import type { Release, ReleaseArtifact } from "./release-store.js";
|
|
72
|
+
/** The first chant with `release.artifacts`, `chant release artifacts` and `artifact:<name>` in a forge or homebrew target's `assets` (#5151). */
|
|
73
|
+
export declare const RELEASE_ARTIFACTS_FLOOR = "0.124.101";
|
|
74
|
+
/** The variable naming the goreleaser binary the cut runs. */
|
|
75
|
+
export declare const GORELEASER_ENV = "CHANT_GORELEASER";
|
|
76
|
+
/** The first chant with `helm` and `nfpm` entries in `release.artifacts` (#5233). */
|
|
77
|
+
export declare const RELEASE_ARTIFACTS_PACKAGES_FLOOR = "0.124.102";
|
|
78
|
+
/** The variable naming the nfpm binary the cut runs (#5233). */
|
|
79
|
+
export declare const NFPM_ENV = "CHANT_NFPM";
|
|
80
|
+
/** How an archive entry packs a platform's outputs. */
|
|
81
|
+
export interface ReleaseArchiveSpec {
|
|
82
|
+
/** The archive's file name without its extension. May hold `{name}`, `{os}`, `{arch}`, `{label}` and `{version}`. Default `{name}_{os}_{arch}`, or `{name}` with no platforms. */
|
|
83
|
+
name?: string;
|
|
84
|
+
/** The directory the archives are written to, relative to the member. Default `dist`. */
|
|
85
|
+
dir?: string;
|
|
86
|
+
/** Files of the member packed beside the outputs at their own paths, such as `README.md` and `LICENSE`. */
|
|
87
|
+
files?: string[];
|
|
88
|
+
/** `tar.gz` or `zip`. Default `tar.gz`, and `zip` for a Windows platform. */
|
|
89
|
+
format?: "tar.gz" | "zip";
|
|
90
|
+
}
|
|
91
|
+
/** Files a command of the product's builds. */
|
|
92
|
+
export interface ReleaseArtifactBuild {
|
|
93
|
+
/** The entry's name: the `component` of each file it records, and what `artifact:<name>` and a checksums entry's `of` name. */
|
|
94
|
+
name: string;
|
|
95
|
+
/** The shell command, run in the member's directory, that writes the outputs. */
|
|
96
|
+
build: string;
|
|
97
|
+
/** The files it writes, relative to the member. */
|
|
98
|
+
outputs: string[];
|
|
99
|
+
/** The platforms, `os/arch`, to run `build` for, once each. */
|
|
100
|
+
platforms?: string[];
|
|
101
|
+
/** Pack each platform's outputs into an archive, recorded in their place. `true` takes every default. */
|
|
102
|
+
archive?: ReleaseArchiveSpec | true;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Files built before the cut, by something other than the cut (#5183): a
|
|
106
|
+
* `release.workflow.builds` job on another runner, or a step before it. The
|
|
107
|
+
* cut records the files at `outputs` as they are.
|
|
108
|
+
*/
|
|
109
|
+
export interface ReleaseArtifactPrebuilt {
|
|
110
|
+
name: string;
|
|
111
|
+
/** The files, relative to the member; the same placeholders and globs as a build's. Default: the outputs of the `builtBy` jobs, with no platforms. */
|
|
112
|
+
outputs?: string[];
|
|
113
|
+
/** The `release.workflow.builds` jobs that write the files, by name. */
|
|
114
|
+
builtBy?: string | string[];
|
|
115
|
+
/** The platforms, `os/arch`, the outputs are filled in for, once each. */
|
|
116
|
+
platforms?: string[];
|
|
117
|
+
/** Pack each platform's outputs into an archive, recorded in their place. */
|
|
118
|
+
archive?: ReleaseArchiveSpec | true;
|
|
119
|
+
}
|
|
120
|
+
/** A `release.workflow.builds` job, as far as `builtBy` reads it. */
|
|
121
|
+
export interface ReleaseBuildJobRef {
|
|
122
|
+
name: string;
|
|
123
|
+
outputs: readonly string[];
|
|
124
|
+
}
|
|
125
|
+
/** Files goreleaser builds, in snapshot mode. */
|
|
126
|
+
export interface ReleaseArtifactGoreleaser {
|
|
127
|
+
name: string;
|
|
128
|
+
goreleaser: {
|
|
129
|
+
/** The goreleaser config, relative to the member. Default: goreleaser's own search (`.goreleaser.yaml` and the rest). */
|
|
130
|
+
config?: string;
|
|
131
|
+
/** goreleaser's `dist` directory, relative to the member. Default `dist`. */
|
|
132
|
+
dist?: string;
|
|
133
|
+
/** The `type`s of `artifacts.json` entries to record. Default {@link GORELEASER_TYPES}. */
|
|
134
|
+
types?: string[];
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/** A checksums file over other entries' files. */
|
|
138
|
+
export interface ReleaseArtifactChecksums {
|
|
139
|
+
name: string;
|
|
140
|
+
/** The file, relative to the member, such as `dist/SHA256SUMS` or `dist/checksums.txt`. */
|
|
141
|
+
checksums: string;
|
|
142
|
+
/** The entries it covers. Default: every entry before it. */
|
|
143
|
+
of?: string[];
|
|
144
|
+
}
|
|
145
|
+
/** A Helm chart chant packs itself (#5233). */
|
|
146
|
+
export interface ReleaseArtifactHelm {
|
|
147
|
+
name: string;
|
|
148
|
+
helm: {
|
|
149
|
+
/** The chart's directory, holding `Chart.yaml`, relative to the member. */
|
|
150
|
+
chart: string;
|
|
151
|
+
/** The directory the chart archive is written to, relative to the member. Default `dist`. */
|
|
152
|
+
dir?: string;
|
|
153
|
+
/** Set `appVersion` in the packed `Chart.yaml` to the release's label too. Default false. */
|
|
154
|
+
appVersion?: boolean;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
/** The package formats an nfpm entry builds. */
|
|
158
|
+
export declare const NFPM_PACKAGERS: readonly ["deb", "rpm", "apk", "archlinux", "ipk"];
|
|
159
|
+
export type NfpmPackager = (typeof NFPM_PACKAGERS)[number];
|
|
160
|
+
/** Linux packages nfpm builds from files the member has, such as an earlier entry's binaries (#5233). */
|
|
161
|
+
export interface ReleaseArtifactNfpm {
|
|
162
|
+
name: string;
|
|
163
|
+
nfpm: {
|
|
164
|
+
/** The nfpm config, relative to the member. Default `nfpm.yaml`. */
|
|
165
|
+
config?: string;
|
|
166
|
+
/** The package formats. Default `["deb", "rpm"]`. */
|
|
167
|
+
packagers?: NfpmPackager[];
|
|
168
|
+
/** The platforms, `os/arch`, to package for, once each, with `CHANT_RELEASE_OS` and `CHANT_RELEASE_ARCH` set. Default: once, for the config's own `arch`. */
|
|
169
|
+
platforms?: string[];
|
|
170
|
+
/** The directory the packages are written to, relative to the member. Default `dist`. */
|
|
171
|
+
dir?: string;
|
|
172
|
+
/** Each package's file name without its extension: `{name}`, `{version}`, `{label}`, `{os}`, `{arch}` and `{packager}`. Default `{name}_{version}_{arch}`, or `{name}_{version}` with no platforms. */
|
|
173
|
+
fileName?: string;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
export type ReleaseArtifactDeclaration = ReleaseArtifactBuild | ReleaseArtifactPrebuilt | ReleaseArtifactGoreleaser | ReleaseArtifactChecksums | ReleaseArtifactHelm | ReleaseArtifactNfpm;
|
|
177
|
+
/**
|
|
178
|
+
* The `artifacts.json` types recorded from goreleaser by default: what its
|
|
179
|
+
* own release would upload. A `Binary` is recorded only when it sits at the
|
|
180
|
+
* top of `dist`, as goreleaser writes an uploadable binary; the binaries it
|
|
181
|
+
* builds for archives sit in a directory per target.
|
|
182
|
+
*/
|
|
183
|
+
export declare const GORELEASER_TYPES: readonly string[];
|
|
184
|
+
export declare class ReleaseArtifactError extends Error {
|
|
185
|
+
readonly code: string;
|
|
186
|
+
readonly fix?: string | undefined;
|
|
187
|
+
constructor(code: string, message: string, fix?: string | undefined);
|
|
188
|
+
}
|
|
189
|
+
/** Whether the cut records an entry's files as something else built them, with no command of its own (#5183). */
|
|
190
|
+
export declare function isPrebuilt(a: ReleaseArtifactDeclaration): a is ReleaseArtifactPrebuilt;
|
|
191
|
+
/** The label from its first digit, as a formula's and goreleaser's version reads it: `v1.4.0` is `1.4.0`. */
|
|
192
|
+
export declare function labelVersion(label: string | null): string | null;
|
|
193
|
+
/**
|
|
194
|
+
* Check `release.artifacts`: names valid and unique and not an image's, one
|
|
195
|
+
* of `build`, `goreleaser` and `checksums`, paths inside the member,
|
|
196
|
+
* platforms of the form os/arch, placeholders chant fills, and a checksums
|
|
197
|
+
* entry's `of` naming entries before it.
|
|
198
|
+
*/
|
|
199
|
+
export declare function checkReleaseArtifacts(artifacts: readonly ReleaseArtifactDeclaration[], o?: {
|
|
200
|
+
imageNames?: readonly string[];
|
|
201
|
+
builds?: readonly ReleaseBuildJobRef[];
|
|
202
|
+
}): void;
|
|
203
|
+
/** The files a path names, `*` and `?` matched within a segment, sorted. */
|
|
204
|
+
export declare function expandOutput(cwd: string, pattern: string): string[];
|
|
205
|
+
export interface BuildArtifactsInput {
|
|
206
|
+
artifacts: readonly ReleaseArtifactDeclaration[];
|
|
207
|
+
/** The member's directory. */
|
|
208
|
+
cwd: string;
|
|
209
|
+
/** The commit's time in seconds: each build's `SOURCE_DATE_EPOCH`, and the time of every archive entry. */
|
|
210
|
+
sourceDateEpoch: number;
|
|
211
|
+
label: string | null;
|
|
212
|
+
env?: NodeJS.ProcessEnv;
|
|
213
|
+
/** Image names, which an entry may not take. */
|
|
214
|
+
imageNames?: readonly string[];
|
|
215
|
+
/** `release.workflow.builds`, which `builtBy` names (#5183). */
|
|
216
|
+
builds?: readonly ReleaseBuildJobRef[];
|
|
217
|
+
/**
|
|
218
|
+
* Where the files of an entry with no command sit (#5183), when not in
|
|
219
|
+
* `cwd`: the member's directory in the checkout the cut runs from, when it
|
|
220
|
+
* builds in a checkout of another commit (`--at`). They are copied to the
|
|
221
|
+
* same paths in `cwd`.
|
|
222
|
+
*/
|
|
223
|
+
prebuiltFrom?: string;
|
|
224
|
+
/** Run one command; the default runs it through the shell with its output on stderr. */
|
|
225
|
+
run?: (command: string, o: {
|
|
226
|
+
cwd: string;
|
|
227
|
+
env: NodeJS.ProcessEnv;
|
|
228
|
+
}) => number | null;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Build every entry, in order, and return each file as the release's asset
|
|
232
|
+
* artifact. A command that fails, an output it did not write, a goreleaser
|
|
233
|
+
* version that is not the label, or two entries writing one path stops the
|
|
234
|
+
* cut.
|
|
235
|
+
*/
|
|
236
|
+
export declare function buildReleaseArtifacts(i: BuildArtifactsInput): ReleaseArtifact[];
|
|
237
|
+
/** Helm's ignore rules: a `.helmignore`'s lines and helm's default, `templates/.?*`. */
|
|
238
|
+
interface HelmIgnoreRule {
|
|
239
|
+
re: RegExp;
|
|
240
|
+
negate: boolean;
|
|
241
|
+
dirOnly: boolean;
|
|
242
|
+
/** No `/` in the pattern: it matches a path's last segment. */
|
|
243
|
+
base: boolean;
|
|
244
|
+
}
|
|
245
|
+
/** The rules of a `.helmignore`, after helm's default. A `**` is refused, as helm refuses it. */
|
|
246
|
+
export declare function helmIgnoreRules(text: string | null, where: string): HelmIgnoreRule[];
|
|
247
|
+
/** Whether helm leaves `rel` (a path from the chart's directory) out of the chart, as its ignore package decides. */
|
|
248
|
+
export declare function helmIgnored(rules: readonly HelmIgnoreRule[], rel: string, dir: boolean): boolean;
|
|
249
|
+
/** The top-level `version` of an nfpm config, unquoted, or null. */
|
|
250
|
+
export declare function nfpmConfigVersion(text: string): string | null;
|
|
251
|
+
/** Whether an nfpm config's version carries the release's: it names the variable chant sets, or is the label or its version. */
|
|
252
|
+
export declare function nfpmVersionFollowsLabel(version: string | null, label: string, labelVer: string): boolean;
|
|
253
|
+
interface ArchiveEntry {
|
|
254
|
+
/** The path inside the archive. */
|
|
255
|
+
name: string;
|
|
256
|
+
abs: string;
|
|
257
|
+
/** The entry's bytes, in place of the file's (its mode is still the file's), such as a chart's `Chart.yaml` with its version set (#5233). */
|
|
258
|
+
bytes?: Buffer;
|
|
259
|
+
}
|
|
260
|
+
/** An entry of a zip: a file, or bytes with no file (#5232), which get mode 0644. */
|
|
261
|
+
export type ZipEntry = ArchiveEntry | {
|
|
262
|
+
name: string;
|
|
263
|
+
bytes: Buffer;
|
|
264
|
+
};
|
|
265
|
+
/** A gzipped ustar archive of the entries in order, each dated `mtime`, owned by uid and gid 0 and mode 0755 when executable, else 0644. */
|
|
266
|
+
export declare function tarGzArchive(entries: readonly ArchiveEntry[], mtime: number): Buffer;
|
|
267
|
+
/** A zip of the entries in order, deflated, each dated `mtime` (UTC) with its Unix mode. */
|
|
268
|
+
export declare function zipArchive(entries: readonly ZipEntry[], mtime: number): Buffer;
|
|
269
|
+
/** The files the release records for `names`, the entries `release.artifacts` declares. */
|
|
270
|
+
export declare function releaseArtifactFiles(release: Pick<Release, "artifactDigests">, names: readonly string[]): ReleaseArtifact[];
|
|
271
|
+
/** Where a recorded file differs from the release in `cwd`: missing, or another digest. */
|
|
272
|
+
export declare function artifactFileProblems(cwd: string, files: readonly ReleaseArtifact[]): Array<{
|
|
273
|
+
path: string;
|
|
274
|
+
problem: "missing" | "digest";
|
|
275
|
+
digest?: string;
|
|
276
|
+
recorded: string;
|
|
277
|
+
}>;
|
|
278
|
+
/** Copy each file from `from` to the same path under `to`. A file missing from `from` is refused. */
|
|
279
|
+
export declare function copyArtifactFiles(files: readonly {
|
|
280
|
+
path: string;
|
|
281
|
+
}[], from: string, to: string, o?: {
|
|
282
|
+
missingOk?: boolean;
|
|
283
|
+
}): void;
|
|
284
|
+
/** Whether any entry is packaged by nfpm, for the workflow's install step (#5233). */
|
|
285
|
+
export declare function usesNfpm(artifacts: readonly ReleaseArtifactDeclaration[]): boolean;
|
|
286
|
+
/** Whether any entry is built by goreleaser, for the workflow's install step. */
|
|
287
|
+
export declare function usesGoreleaser(artifacts: readonly ReleaseArtifactDeclaration[]): boolean;
|
|
288
|
+
/** The `artifact:<name>` prefix a forge, homebrew or index target's `assets` names an entry's files with. */
|
|
289
|
+
export declare const ARTIFACT_REF = "artifact:";
|
|
290
|
+
export {};
|