@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.
Files changed (270) hide show
  1. package/dist/action-pins.d.ts +2 -0
  2. package/dist/action-pins.js +3 -0
  3. package/dist/ci-detect.d.ts +13 -0
  4. package/dist/ci-detect.js +12 -0
  5. package/dist/ci-evidence-claims.d.ts +12 -0
  6. package/dist/ci-evidence-claims.js +12 -0
  7. package/dist/ci-system.d.ts +66 -0
  8. package/dist/ci-system.js +61 -0
  9. package/dist/cli/handlers/build.js +27 -0
  10. package/dist/cli/handlers/release-doctor.d.ts +12 -0
  11. package/dist/cli/handlers/release-doctor.js +118 -0
  12. package/dist/cli/handlers/release-init.d.ts +10 -0
  13. package/dist/cli/handlers/release-init.js +374 -0
  14. package/dist/cli/handlers/release.d.ts +43 -2
  15. package/dist/cli/handlers/release.js +667 -39
  16. package/dist/cli/handlers/run-generate.js +11 -0
  17. package/dist/cli/main.d.ts +2 -0
  18. package/dist/cli/main.js +44 -101
  19. package/dist/cli/parse-args.js +48 -0
  20. package/dist/cli/registry.d.ts +16 -0
  21. package/dist/cli/release-commands/artifacts.d.ts +3 -0
  22. package/dist/cli/release-commands/artifacts.js +14 -0
  23. package/dist/cli/release-commands/candidates.d.ts +3 -0
  24. package/dist/cli/release-commands/candidates.js +16 -0
  25. package/dist/cli/release-commands/changed.d.ts +3 -0
  26. package/dist/cli/release-commands/changed.js +14 -0
  27. package/dist/cli/release-commands/compose.d.ts +3 -0
  28. package/dist/cli/release-commands/compose.js +16 -0
  29. package/dist/cli/release-commands/cut.d.ts +3 -0
  30. package/dist/cli/release-commands/cut.js +50 -0
  31. package/dist/cli/release-commands/doctor.d.ts +3 -0
  32. package/dist/cli/release-commands/doctor.js +14 -0
  33. package/dist/cli/release-commands/export.d.ts +3 -0
  34. package/dist/cli/release-commands/export.js +12 -0
  35. package/dist/cli/release-commands/images.d.ts +3 -0
  36. package/dist/cli/release-commands/images.js +13 -0
  37. package/dist/cli/release-commands/index.d.ts +8 -0
  38. package/dist/cli/release-commands/index.js +52 -0
  39. package/dist/cli/release-commands/init.d.ts +3 -0
  40. package/dist/cli/release-commands/init.js +19 -0
  41. package/dist/cli/release-commands/list.d.ts +3 -0
  42. package/dist/cli/release-commands/list.js +10 -0
  43. package/dist/cli/release-commands/next.d.ts +3 -0
  44. package/dist/cli/release-commands/next.js +13 -0
  45. package/dist/cli/release-commands/publish.d.ts +3 -0
  46. package/dist/cli/release-commands/publish.js +22 -0
  47. package/dist/cli/release-commands/stamp.d.ts +3 -0
  48. package/dist/cli/release-commands/stamp.js +15 -0
  49. package/dist/cli/release-commands/status.d.ts +3 -0
  50. package/dist/cli/release-commands/status.js +17 -0
  51. package/dist/cli/release-commands/tag.d.ts +3 -0
  52. package/dist/cli/release-commands/tag.js +12 -0
  53. package/dist/cli/release-commands/types.d.ts +20 -0
  54. package/dist/cli/release-commands/types.js +1 -0
  55. package/dist/cli/release-commands/verify.d.ts +3 -0
  56. package/dist/cli/release-commands/verify.js +15 -0
  57. package/dist/cli/release-commands/workflow.d.ts +3 -0
  58. package/dist/cli/release-commands/workflow.js +15 -0
  59. package/dist/cloud-lister/index.d.ts +4 -1
  60. package/dist/cloud-lister/index.js +2 -1
  61. package/dist/cloud-lister/kubernetes-components.d.ts +56 -0
  62. package/dist/cloud-lister/kubernetes-components.js +642 -0
  63. package/dist/cloud-lister/kubernetes.d.ts +18 -0
  64. package/dist/cloud-lister/kubernetes.js +26 -1
  65. package/dist/cloud-lister/mask.d.ts +5 -1
  66. package/dist/cloud-lister/mask.js +14 -5
  67. package/dist/components/cli-support.d.ts +1 -1
  68. package/dist/components/cli-support.js +1 -1
  69. package/dist/config-environments.d.ts +8 -1
  70. package/dist/config-environments.js +2 -0
  71. package/dist/config-import.d.ts +1 -1
  72. package/dist/config-import.js +6 -2
  73. package/dist/config-sandbox.d.ts +1 -1
  74. package/dist/config-sandbox.js +3 -3
  75. package/dist/config.d.ts +369 -10
  76. package/dist/config.js +127 -7
  77. package/dist/deep-observation.js +9 -3
  78. package/dist/floor-table.data.js +21 -1
  79. package/dist/forge-remote.d.ts +13 -0
  80. package/dist/forge-remote.js +15 -0
  81. package/dist/lexicon.d.ts +45 -4
  82. package/dist/lifecycle/__fixtures__/package-files.d.ts +32 -0
  83. package/dist/lifecycle/__fixtures__/package-files.js +72 -0
  84. package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +62 -0
  85. package/dist/lifecycle/__fixtures__/publish-fakes.js +275 -3
  86. package/dist/lifecycle/publish-attachments.d.ts +2 -1
  87. package/dist/lifecycle/publish-attachments.js +19 -2
  88. package/dist/lifecycle/publish-cargo.d.ts +99 -0
  89. package/dist/lifecycle/publish-cargo.js +412 -0
  90. package/dist/lifecycle/publish-credentials.d.ts +1 -1
  91. package/dist/lifecycle/publish-credentials.js +13 -0
  92. package/dist/lifecycle/publish-declaration.d.ts +322 -4
  93. package/dist/lifecycle/publish-declaration.js +340 -9
  94. package/dist/lifecycle/publish-forge.d.ts +45 -2
  95. package/dist/lifecycle/publish-forge.js +434 -34
  96. package/dist/lifecycle/publish-git-ssh.d.ts +15 -0
  97. package/dist/lifecycle/publish-git-ssh.js +30 -4
  98. package/dist/lifecycle/publish-github.d.ts +40 -2
  99. package/dist/lifecycle/publish-github.js +100 -3
  100. package/dist/lifecycle/publish-helm.d.ts +83 -0
  101. package/dist/lifecycle/publish-helm.js +452 -0
  102. package/dist/lifecycle/publish-homebrew.d.ts +7 -9
  103. package/dist/lifecycle/publish-homebrew.js +34 -197
  104. package/dist/lifecycle/publish-index.d.ts +141 -0
  105. package/dist/lifecycle/publish-index.js +719 -0
  106. package/dist/lifecycle/publish-marketplace.js +77 -0
  107. package/dist/lifecycle/publish-maven.d.ts +79 -0
  108. package/dist/lifecycle/publish-maven.js +364 -0
  109. package/dist/lifecycle/publish-mcp-registry.d.ts +66 -0
  110. package/dist/lifecycle/publish-mcp-registry.js +305 -0
  111. package/dist/lifecycle/publish-npm.d.ts +27 -1
  112. package/dist/lifecycle/publish-npm.js +216 -3
  113. package/dist/lifecycle/publish-nuget.d.ts +93 -0
  114. package/dist/lifecycle/publish-nuget.js +377 -0
  115. package/dist/lifecycle/publish-oci.d.ts +91 -2
  116. package/dist/lifecycle/publish-oci.js +247 -8
  117. package/dist/lifecycle/publish-package-files.d.ts +16 -0
  118. package/dist/lifecycle/publish-package-files.js +39 -0
  119. package/dist/lifecycle/publish-pypi.d.ts +138 -0
  120. package/dist/lifecycle/publish-pypi.js +657 -0
  121. package/dist/lifecycle/publish-record.d.ts +6 -3
  122. package/dist/lifecycle/publish-record.js +6 -3
  123. package/dist/lifecycle/publish-rubygems.d.ts +84 -0
  124. package/dist/lifecycle/publish-rubygems.js +366 -0
  125. package/dist/lifecycle/publish-signing.d.ts +147 -0
  126. package/dist/lifecycle/publish-signing.js +257 -0
  127. package/dist/lifecycle/publish-targets.d.ts +37 -1
  128. package/dist/lifecycle/publish-targets.js +102 -0
  129. package/dist/lifecycle/publish-tauri.js +43 -0
  130. package/dist/lifecycle/publish-train-names.d.ts +57 -0
  131. package/dist/lifecycle/publish-train-names.js +123 -0
  132. package/dist/lifecycle/publish-verify.d.ts +121 -0
  133. package/dist/lifecycle/publish-verify.js +130 -0
  134. package/dist/lifecycle/query.js +8 -0
  135. package/dist/lifecycle/release-artifacts.d.ts +290 -0
  136. package/dist/lifecycle/release-artifacts.js +808 -0
  137. package/dist/lifecycle/release-changelog.d.ts +13 -1
  138. package/dist/lifecycle/release-changelog.js +35 -2
  139. package/dist/lifecycle/release-cut.d.ts +64 -4
  140. package/dist/lifecycle/release-cut.js +147 -34
  141. package/dist/lifecycle/release-doctor.d.ts +113 -0
  142. package/dist/lifecycle/release-doctor.js +1198 -0
  143. package/dist/lifecycle/release-green.d.ts +86 -0
  144. package/dist/lifecycle/release-green.js +286 -0
  145. package/dist/lifecycle/release-init-registries.d.ts +48 -0
  146. package/dist/lifecycle/release-init-registries.js +97 -0
  147. package/dist/lifecycle/release-init.d.ts +275 -0
  148. package/dist/lifecycle/release-init.js +984 -0
  149. package/dist/lifecycle/release-intents.d.ts +73 -0
  150. package/dist/lifecycle/release-intents.js +128 -0
  151. package/dist/lifecycle/release-next.d.ts +111 -0
  152. package/dist/lifecycle/release-next.js +251 -0
  153. package/dist/lifecycle/release-prerelease.d.ts +19 -0
  154. package/dist/lifecycle/release-prerelease.js +30 -0
  155. package/dist/lifecycle/release-publish.d.ts +256 -10
  156. package/dist/lifecycle/release-publish.js +247 -35
  157. package/dist/lifecycle/release-status-change.d.ts +226 -0
  158. package/dist/lifecycle/release-status-change.js +478 -0
  159. package/dist/lifecycle/release-status.d.ts +11 -0
  160. package/dist/lifecycle/release-status.js +1 -1
  161. package/dist/lifecycle/release-store.d.ts +73 -2
  162. package/dist/lifecycle/release-store.js +32 -1
  163. package/dist/lifecycle/release-tag.d.ts +142 -0
  164. package/dist/lifecycle/release-tag.js +322 -0
  165. package/dist/lifecycle/release-verify.d.ts +73 -1
  166. package/dist/lifecycle/release-verify.js +117 -2
  167. package/dist/lifecycle/release-version-formats.d.ts +73 -0
  168. package/dist/lifecycle/release-version-formats.js +570 -0
  169. package/dist/lifecycle/release-version.d.ts +58 -10
  170. package/dist/lifecycle/release-version.js +164 -36
  171. package/dist/lifecycle/release-workstation.d.ts +3 -2
  172. package/dist/lifecycle/release-workstation.js +3 -2
  173. package/dist/op/generate-pipeline.js +1 -1
  174. package/dist/op/local-executor.d.ts +1 -1
  175. package/dist/op/local-executor.js +2 -2
  176. package/dist/op/op-waves-evidence.js +9 -2
  177. package/dist/pr-forge-base.js +4 -2
  178. package/dist/pr-forge.d.ts +20 -2
  179. package/dist/pr-forge.js +46 -10
  180. package/dist/release-floors.d.ts +8 -1
  181. package/dist/release-floors.js +9 -2
  182. package/dist/sensitive-key.d.ts +12 -0
  183. package/dist/sensitive-key.js +52 -0
  184. package/dist/tool-pins.d.ts +40 -0
  185. package/dist/tool-pins.js +66 -0
  186. package/dist/ts-loader.d.ts +8 -0
  187. package/dist/ts-loader.js +19 -0
  188. package/dist/wave-runtime.mjs +345 -342
  189. package/dist/workspace/ci-forge.d.ts +17 -0
  190. package/dist/workspace/ci-forge.js +17 -0
  191. package/dist/workspace/ci-init.js +1 -1
  192. package/dist/workspace/composites.schema.json +1 -0
  193. package/dist/workspace/declaration.d.ts +8 -0
  194. package/dist/workspace/declaration.js +12 -0
  195. package/dist/workspace/declaration.schema.json +8 -0
  196. package/dist/workspace/environments.d.ts +2 -0
  197. package/dist/workspace/environments.js +1 -1
  198. package/dist/workspace/identity-gate-rule.d.ts +61 -5
  199. package/dist/workspace/identity-gate-rule.js +81 -12
  200. package/dist/workspace/lexicon-outputs.d.ts +1 -1
  201. package/dist/workspace/lexicon-outputs.js +1 -1
  202. package/dist/workspace/member-pipeline.d.ts +2 -1
  203. package/dist/workspace/member-pipeline.js +5 -2
  204. package/dist/workspace/reason-codes.d.ts +2 -0
  205. package/dist/workspace/reason-codes.js +3 -1
  206. package/dist/workspace/release-changed.d.ts +75 -4
  207. package/dist/workspace/release-changed.js +205 -34
  208. package/dist/workspace/release-changed.schema.json +20 -2
  209. package/dist/workspace/release-steps/artifacts.d.ts +7 -0
  210. package/dist/workspace/release-steps/artifacts.js +45 -0
  211. package/dist/workspace/release-steps/builds.d.ts +12 -0
  212. package/dist/workspace/release-steps/builds.js +38 -0
  213. package/dist/workspace/release-steps/doctor.d.ts +8 -0
  214. package/dist/workspace/release-steps/doctor.js +14 -0
  215. package/dist/workspace/release-steps/goreleaser.d.ts +16 -0
  216. package/dist/workspace/release-steps/goreleaser.js +36 -0
  217. package/dist/workspace/release-steps/green.d.ts +3 -0
  218. package/dist/workspace/release-steps/green.js +6 -0
  219. package/dist/workspace/release-steps/images.d.ts +22 -0
  220. package/dist/workspace/release-steps/images.js +59 -0
  221. package/dist/workspace/release-steps/index.d.ts +9 -0
  222. package/dist/workspace/release-steps/index.js +50 -0
  223. package/dist/workspace/release-steps/nfpm.d.ts +13 -0
  224. package/dist/workspace/release-steps/nfpm.js +29 -0
  225. package/dist/workspace/release-steps/nuget.d.ts +14 -0
  226. package/dist/workspace/release-steps/nuget.js +16 -0
  227. package/dist/workspace/release-steps/pypi.d.ts +15 -0
  228. package/dist/workspace/release-steps/pypi.js +21 -0
  229. package/dist/workspace/release-steps/qemu.d.ts +21 -0
  230. package/dist/workspace/release-steps/qemu.js +35 -0
  231. package/dist/workspace/release-steps/signing.d.ts +18 -0
  232. package/dist/workspace/release-steps/signing.js +30 -0
  233. package/dist/workspace/release-steps/stamp.d.ts +3 -0
  234. package/dist/workspace/release-steps/stamp.js +4 -0
  235. package/dist/workspace/release-steps/targets.d.ts +31 -0
  236. package/dist/workspace/release-steps/targets.js +40 -0
  237. package/dist/workspace/release-steps/types.d.ts +104 -0
  238. package/dist/workspace/release-steps/types.js +2 -0
  239. package/dist/workspace/release-steps/verify.d.ts +3 -0
  240. package/dist/workspace/release-steps/verify.js +4 -0
  241. package/dist/workspace/release-toolchains.d.ts +59 -0
  242. package/dist/workspace/release-toolchains.js +133 -0
  243. package/dist/workspace/release-train-workflow.d.ts +36 -0
  244. package/dist/workspace/release-train-workflow.js +121 -0
  245. package/dist/workspace/release-train.d.ts +3 -1
  246. package/dist/workspace/release-train.js +20 -3
  247. package/dist/workspace/release-workflow.d.ts +183 -59
  248. package/dist/workspace/release-workflow.js +570 -201
  249. package/dist/workspace/releases.schema.json +70 -1
  250. package/dist/workspace/search-contract.d.ts +1 -1
  251. package/dist/workspace/security.js +9 -2
  252. package/dist/workspace/train-cut.d.ts +182 -0
  253. package/dist/workspace/train-cut.js +504 -0
  254. package/dist/workspace/train-prepare.d.ts +64 -0
  255. package/dist/workspace/train-prepare.js +313 -0
  256. package/dist/workspace/train-publish.d.ts +177 -0
  257. package/dist/workspace/train-publish.js +574 -0
  258. package/dist/workspace/train-range-labels.d.ts +33 -0
  259. package/dist/workspace/train-range-labels.js +109 -0
  260. package/dist/workspace/train-shell.d.ts +5 -0
  261. package/dist/workspace/train-shell.js +17 -0
  262. package/dist/workspace/trust/check-evidence-report.d.ts +3 -7
  263. package/dist/workspace/trust/check-evidence-report.js +3 -7
  264. package/dist/workspace/trust/seal.d.ts +13 -3
  265. package/dist/workspace/trust/seal.js +14 -4
  266. package/dist/workspace/work-cli.d.ts +3 -2
  267. package/dist/workspace/work-cli.js +3 -2
  268. package/dist/workspace/workspace-ledger.d.ts +14 -1
  269. package/dist/workspace/workspace-ledger.js +33 -7
  270. 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 {};