@intentius/chant 0.124.100 → 0.124.101

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 (223) 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-system.d.ts +66 -0
  6. package/dist/ci-system.js +61 -0
  7. package/dist/cli/handlers/build.js +27 -0
  8. package/dist/cli/handlers/release-doctor.d.ts +12 -0
  9. package/dist/cli/handlers/release-doctor.js +118 -0
  10. package/dist/cli/handlers/release-init.d.ts +10 -0
  11. package/dist/cli/handlers/release-init.js +342 -0
  12. package/dist/cli/handlers/release.d.ts +42 -1
  13. package/dist/cli/handlers/release.js +656 -31
  14. package/dist/cli/handlers/run-generate.js +11 -0
  15. package/dist/cli/main.d.ts +2 -0
  16. package/dist/cli/main.js +44 -101
  17. package/dist/cli/parse-args.js +48 -0
  18. package/dist/cli/registry.d.ts +16 -0
  19. package/dist/cli/release-commands/artifacts.d.ts +3 -0
  20. package/dist/cli/release-commands/artifacts.js +14 -0
  21. package/dist/cli/release-commands/candidates.d.ts +3 -0
  22. package/dist/cli/release-commands/candidates.js +16 -0
  23. package/dist/cli/release-commands/changed.d.ts +3 -0
  24. package/dist/cli/release-commands/changed.js +14 -0
  25. package/dist/cli/release-commands/compose.d.ts +3 -0
  26. package/dist/cli/release-commands/compose.js +16 -0
  27. package/dist/cli/release-commands/cut.d.ts +3 -0
  28. package/dist/cli/release-commands/cut.js +49 -0
  29. package/dist/cli/release-commands/doctor.d.ts +3 -0
  30. package/dist/cli/release-commands/doctor.js +14 -0
  31. package/dist/cli/release-commands/export.d.ts +3 -0
  32. package/dist/cli/release-commands/export.js +12 -0
  33. package/dist/cli/release-commands/images.d.ts +3 -0
  34. package/dist/cli/release-commands/images.js +13 -0
  35. package/dist/cli/release-commands/index.d.ts +8 -0
  36. package/dist/cli/release-commands/index.js +52 -0
  37. package/dist/cli/release-commands/init.d.ts +3 -0
  38. package/dist/cli/release-commands/init.js +16 -0
  39. package/dist/cli/release-commands/list.d.ts +3 -0
  40. package/dist/cli/release-commands/list.js +10 -0
  41. package/dist/cli/release-commands/next.d.ts +3 -0
  42. package/dist/cli/release-commands/next.js +13 -0
  43. package/dist/cli/release-commands/publish.d.ts +3 -0
  44. package/dist/cli/release-commands/publish.js +22 -0
  45. package/dist/cli/release-commands/stamp.d.ts +3 -0
  46. package/dist/cli/release-commands/stamp.js +15 -0
  47. package/dist/cli/release-commands/status.d.ts +3 -0
  48. package/dist/cli/release-commands/status.js +17 -0
  49. package/dist/cli/release-commands/tag.d.ts +3 -0
  50. package/dist/cli/release-commands/tag.js +12 -0
  51. package/dist/cli/release-commands/types.d.ts +20 -0
  52. package/dist/cli/release-commands/types.js +1 -0
  53. package/dist/cli/release-commands/verify.d.ts +3 -0
  54. package/dist/cli/release-commands/verify.js +15 -0
  55. package/dist/cli/release-commands/workflow.d.ts +3 -0
  56. package/dist/cli/release-commands/workflow.js +13 -0
  57. package/dist/components/cli-support.d.ts +1 -1
  58. package/dist/components/cli-support.js +1 -1
  59. package/dist/config-environments.d.ts +8 -1
  60. package/dist/config-environments.js +2 -0
  61. package/dist/config.d.ts +294 -9
  62. package/dist/config.js +100 -5
  63. package/dist/floor-table.data.js +15 -1
  64. package/dist/forge-remote.d.ts +13 -0
  65. package/dist/forge-remote.js +15 -0
  66. package/dist/lexicon.d.ts +41 -2
  67. package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +62 -0
  68. package/dist/lifecycle/__fixtures__/publish-fakes.js +270 -3
  69. package/dist/lifecycle/publish-attachments.d.ts +2 -1
  70. package/dist/lifecycle/publish-attachments.js +19 -2
  71. package/dist/lifecycle/publish-cargo.d.ts +99 -0
  72. package/dist/lifecycle/publish-cargo.js +412 -0
  73. package/dist/lifecycle/publish-credentials.d.ts +1 -1
  74. package/dist/lifecycle/publish-credentials.js +8 -0
  75. package/dist/lifecycle/publish-declaration.d.ts +199 -4
  76. package/dist/lifecycle/publish-declaration.js +200 -9
  77. package/dist/lifecycle/publish-forge.d.ts +45 -2
  78. package/dist/lifecycle/publish-forge.js +434 -34
  79. package/dist/lifecycle/publish-git-ssh.d.ts +15 -0
  80. package/dist/lifecycle/publish-git-ssh.js +30 -4
  81. package/dist/lifecycle/publish-github.d.ts +40 -2
  82. package/dist/lifecycle/publish-github.js +100 -3
  83. package/dist/lifecycle/publish-homebrew.d.ts +7 -9
  84. package/dist/lifecycle/publish-homebrew.js +34 -197
  85. package/dist/lifecycle/publish-index.d.ts +141 -0
  86. package/dist/lifecycle/publish-index.js +719 -0
  87. package/dist/lifecycle/publish-marketplace.js +77 -0
  88. package/dist/lifecycle/publish-mcp-registry.d.ts +66 -0
  89. package/dist/lifecycle/publish-mcp-registry.js +306 -0
  90. package/dist/lifecycle/publish-npm.js +165 -2
  91. package/dist/lifecycle/publish-oci.d.ts +34 -1
  92. package/dist/lifecycle/publish-oci.js +246 -7
  93. package/dist/lifecycle/publish-pypi.d.ts +136 -0
  94. package/dist/lifecycle/publish-pypi.js +657 -0
  95. package/dist/lifecycle/publish-record.d.ts +6 -3
  96. package/dist/lifecycle/publish-record.js +6 -3
  97. package/dist/lifecycle/publish-signing.d.ts +147 -0
  98. package/dist/lifecycle/publish-signing.js +257 -0
  99. package/dist/lifecycle/publish-targets.d.ts +27 -1
  100. package/dist/lifecycle/publish-targets.js +80 -0
  101. package/dist/lifecycle/publish-tauri.js +43 -0
  102. package/dist/lifecycle/publish-train-names.d.ts +54 -0
  103. package/dist/lifecycle/publish-train-names.js +118 -0
  104. package/dist/lifecycle/publish-verify.d.ts +121 -0
  105. package/dist/lifecycle/publish-verify.js +130 -0
  106. package/dist/lifecycle/query.js +8 -0
  107. package/dist/lifecycle/release-artifacts.d.ts +212 -0
  108. package/dist/lifecycle/release-artifacts.js +571 -0
  109. package/dist/lifecycle/release-changelog.d.ts +13 -1
  110. package/dist/lifecycle/release-changelog.js +35 -2
  111. package/dist/lifecycle/release-cut.d.ts +58 -3
  112. package/dist/lifecycle/release-cut.js +132 -34
  113. package/dist/lifecycle/release-doctor.d.ts +113 -0
  114. package/dist/lifecycle/release-doctor.js +996 -0
  115. package/dist/lifecycle/release-green.d.ts +86 -0
  116. package/dist/lifecycle/release-green.js +286 -0
  117. package/dist/lifecycle/release-init.d.ts +255 -0
  118. package/dist/lifecycle/release-init.js +859 -0
  119. package/dist/lifecycle/release-intents.d.ts +73 -0
  120. package/dist/lifecycle/release-intents.js +128 -0
  121. package/dist/lifecycle/release-next.d.ts +111 -0
  122. package/dist/lifecycle/release-next.js +252 -0
  123. package/dist/lifecycle/release-prerelease.d.ts +19 -0
  124. package/dist/lifecycle/release-prerelease.js +30 -0
  125. package/dist/lifecycle/release-publish.d.ts +256 -10
  126. package/dist/lifecycle/release-publish.js +246 -34
  127. package/dist/lifecycle/release-status-change.d.ts +226 -0
  128. package/dist/lifecycle/release-status-change.js +478 -0
  129. package/dist/lifecycle/release-status.d.ts +11 -0
  130. package/dist/lifecycle/release-status.js +1 -1
  131. package/dist/lifecycle/release-store.d.ts +73 -2
  132. package/dist/lifecycle/release-store.js +32 -1
  133. package/dist/lifecycle/release-tag.d.ts +142 -0
  134. package/dist/lifecycle/release-tag.js +323 -0
  135. package/dist/lifecycle/release-verify.d.ts +73 -1
  136. package/dist/lifecycle/release-verify.js +117 -2
  137. package/dist/lifecycle/release-version-formats.d.ts +73 -0
  138. package/dist/lifecycle/release-version-formats.js +570 -0
  139. package/dist/lifecycle/release-version.d.ts +58 -10
  140. package/dist/lifecycle/release-version.js +164 -36
  141. package/dist/lifecycle/release-workstation.d.ts +3 -2
  142. package/dist/lifecycle/release-workstation.js +3 -2
  143. package/dist/op/generate-pipeline.js +1 -1
  144. package/dist/pr-forge-base.js +4 -2
  145. package/dist/pr-forge.d.ts +20 -2
  146. package/dist/pr-forge.js +46 -10
  147. package/dist/release-floors.d.ts +8 -1
  148. package/dist/release-floors.js +9 -2
  149. package/dist/tool-pins.d.ts +38 -0
  150. package/dist/tool-pins.js +54 -0
  151. package/dist/wave-runtime.mjs +337 -334
  152. package/dist/workspace/ci-forge.d.ts +17 -0
  153. package/dist/workspace/ci-forge.js +17 -0
  154. package/dist/workspace/ci-init.js +1 -1
  155. package/dist/workspace/composites.schema.json +1 -0
  156. package/dist/workspace/declaration.d.ts +8 -0
  157. package/dist/workspace/declaration.js +12 -0
  158. package/dist/workspace/declaration.schema.json +8 -0
  159. package/dist/workspace/environments.d.ts +2 -0
  160. package/dist/workspace/environments.js +1 -1
  161. package/dist/workspace/identity-gate-rule.d.ts +61 -5
  162. package/dist/workspace/identity-gate-rule.js +81 -12
  163. package/dist/workspace/member-pipeline.d.ts +2 -1
  164. package/dist/workspace/member-pipeline.js +5 -2
  165. package/dist/workspace/reason-codes.d.ts +2 -0
  166. package/dist/workspace/reason-codes.js +3 -1
  167. package/dist/workspace/release-changed.d.ts +75 -4
  168. package/dist/workspace/release-changed.js +205 -34
  169. package/dist/workspace/release-changed.schema.json +20 -2
  170. package/dist/workspace/release-steps/artifacts.d.ts +7 -0
  171. package/dist/workspace/release-steps/artifacts.js +45 -0
  172. package/dist/workspace/release-steps/builds.d.ts +12 -0
  173. package/dist/workspace/release-steps/builds.js +38 -0
  174. package/dist/workspace/release-steps/doctor.d.ts +8 -0
  175. package/dist/workspace/release-steps/doctor.js +14 -0
  176. package/dist/workspace/release-steps/goreleaser.d.ts +16 -0
  177. package/dist/workspace/release-steps/goreleaser.js +36 -0
  178. package/dist/workspace/release-steps/green.d.ts +3 -0
  179. package/dist/workspace/release-steps/green.js +6 -0
  180. package/dist/workspace/release-steps/images.d.ts +22 -0
  181. package/dist/workspace/release-steps/images.js +59 -0
  182. package/dist/workspace/release-steps/index.d.ts +9 -0
  183. package/dist/workspace/release-steps/index.js +46 -0
  184. package/dist/workspace/release-steps/pypi.d.ts +15 -0
  185. package/dist/workspace/release-steps/pypi.js +21 -0
  186. package/dist/workspace/release-steps/qemu.d.ts +21 -0
  187. package/dist/workspace/release-steps/qemu.js +35 -0
  188. package/dist/workspace/release-steps/signing.d.ts +18 -0
  189. package/dist/workspace/release-steps/signing.js +30 -0
  190. package/dist/workspace/release-steps/stamp.d.ts +3 -0
  191. package/dist/workspace/release-steps/stamp.js +4 -0
  192. package/dist/workspace/release-steps/targets.d.ts +31 -0
  193. package/dist/workspace/release-steps/targets.js +40 -0
  194. package/dist/workspace/release-steps/types.d.ts +104 -0
  195. package/dist/workspace/release-steps/types.js +2 -0
  196. package/dist/workspace/release-steps/verify.d.ts +3 -0
  197. package/dist/workspace/release-steps/verify.js +4 -0
  198. package/dist/workspace/release-toolchains.d.ts +59 -0
  199. package/dist/workspace/release-toolchains.js +133 -0
  200. package/dist/workspace/release-train-workflow.d.ts +29 -0
  201. package/dist/workspace/release-train-workflow.js +85 -0
  202. package/dist/workspace/release-train.d.ts +3 -1
  203. package/dist/workspace/release-train.js +20 -3
  204. package/dist/workspace/release-workflow.d.ts +160 -61
  205. package/dist/workspace/release-workflow.js +539 -193
  206. package/dist/workspace/releases.schema.json +70 -1
  207. package/dist/workspace/search-contract.d.ts +1 -1
  208. package/dist/workspace/security.js +9 -2
  209. package/dist/workspace/train-cut.d.ts +182 -0
  210. package/dist/workspace/train-cut.js +482 -0
  211. package/dist/workspace/train-prepare.d.ts +61 -0
  212. package/dist/workspace/train-prepare.js +267 -0
  213. package/dist/workspace/train-publish.d.ts +177 -0
  214. package/dist/workspace/train-publish.js +575 -0
  215. package/dist/workspace/train-range-labels.d.ts +33 -0
  216. package/dist/workspace/train-range-labels.js +109 -0
  217. package/dist/workspace/trust/seal.d.ts +13 -3
  218. package/dist/workspace/trust/seal.js +14 -4
  219. package/dist/workspace/work-cli.d.ts +3 -2
  220. package/dist/workspace/work-cli.js +3 -2
  221. package/dist/workspace/workspace-ledger.d.ts +14 -1
  222. package/dist/workspace/workspace-ledger.js +33 -7
  223. package/package.json +1 -1
@@ -0,0 +1,212 @@
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, checksums, of? }`: a file of `<sha256> <file name>` lines, as
37
+ * `sha256sum` writes and checks them, over the files of the entries `of`
38
+ * names (default: every entry before it).
39
+ *
40
+ * Each file is recorded in the release as an `asset` artifact whose
41
+ * `component` is the entry's name, so a publish target that reads a file at
42
+ * a recorded path refuses one whose digest differs
43
+ * (`publish-artifact-digest-mismatch`, ./publish-targets.ts). A forge,
44
+ * homebrew or index target names an entry's files with `artifact:<name>` in its
45
+ * `assets`.
46
+ *
47
+ * A dispatched release workflow hands the files from the cut job to the
48
+ * publish job, which checks them against the record (`chant release
49
+ * artifacts --from`). A workflow on a release tag builds them again from
50
+ * the release's commit (`chant release artifacts <label>`) and refuses a
51
+ * file that differs, which needs builds that write the same bytes twice.
52
+ */
53
+ import type { Release, ReleaseArtifact } from "./release-store.js";
54
+ /** The first chant with `release.artifacts`, `chant release artifacts` and `artifact:<name>` in a forge or homebrew target's `assets` (#5151). */
55
+ export declare const RELEASE_ARTIFACTS_FLOOR = "0.124.101";
56
+ /** The variable naming the goreleaser binary the cut runs. */
57
+ export declare const GORELEASER_ENV = "CHANT_GORELEASER";
58
+ /** How an archive entry packs a platform's outputs. */
59
+ export interface ReleaseArchiveSpec {
60
+ /** 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. */
61
+ name?: string;
62
+ /** The directory the archives are written to, relative to the member. Default `dist`. */
63
+ dir?: string;
64
+ /** Files of the member packed beside the outputs at their own paths, such as `README.md` and `LICENSE`. */
65
+ files?: string[];
66
+ /** `tar.gz` or `zip`. Default `tar.gz`, and `zip` for a Windows platform. */
67
+ format?: "tar.gz" | "zip";
68
+ }
69
+ /** Files a command of the product's builds. */
70
+ export interface ReleaseArtifactBuild {
71
+ /** The entry's name: the `component` of each file it records, and what `artifact:<name>` and a checksums entry's `of` name. */
72
+ name: string;
73
+ /** The shell command, run in the member's directory, that writes the outputs. */
74
+ build: string;
75
+ /** The files it writes, relative to the member. */
76
+ outputs: string[];
77
+ /** The platforms, `os/arch`, to run `build` for, once each. */
78
+ platforms?: string[];
79
+ /** Pack each platform's outputs into an archive, recorded in their place. `true` takes every default. */
80
+ archive?: ReleaseArchiveSpec | true;
81
+ }
82
+ /**
83
+ * Files built before the cut, by something other than the cut (#5183): a
84
+ * `release.workflow.builds` job on another runner, or a step before it. The
85
+ * cut records the files at `outputs` as they are.
86
+ */
87
+ export interface ReleaseArtifactPrebuilt {
88
+ name: string;
89
+ /** 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. */
90
+ outputs?: string[];
91
+ /** The `release.workflow.builds` jobs that write the files, by name. */
92
+ builtBy?: string | string[];
93
+ /** The platforms, `os/arch`, the outputs are filled in for, once each. */
94
+ platforms?: string[];
95
+ /** Pack each platform's outputs into an archive, recorded in their place. */
96
+ archive?: ReleaseArchiveSpec | true;
97
+ }
98
+ /** A `release.workflow.builds` job, as far as `builtBy` reads it. */
99
+ export interface ReleaseBuildJobRef {
100
+ name: string;
101
+ outputs: readonly string[];
102
+ }
103
+ /** Files goreleaser builds, in snapshot mode. */
104
+ export interface ReleaseArtifactGoreleaser {
105
+ name: string;
106
+ goreleaser: {
107
+ /** The goreleaser config, relative to the member. Default: goreleaser's own search (`.goreleaser.yaml` and the rest). */
108
+ config?: string;
109
+ /** goreleaser's `dist` directory, relative to the member. Default `dist`. */
110
+ dist?: string;
111
+ /** The `type`s of `artifacts.json` entries to record. Default {@link GORELEASER_TYPES}. */
112
+ types?: string[];
113
+ };
114
+ }
115
+ /** A checksums file over other entries' files. */
116
+ export interface ReleaseArtifactChecksums {
117
+ name: string;
118
+ /** The file, relative to the member, such as `dist/SHA256SUMS` or `dist/checksums.txt`. */
119
+ checksums: string;
120
+ /** The entries it covers. Default: every entry before it. */
121
+ of?: string[];
122
+ }
123
+ export type ReleaseArtifactDeclaration = ReleaseArtifactBuild | ReleaseArtifactPrebuilt | ReleaseArtifactGoreleaser | ReleaseArtifactChecksums;
124
+ /**
125
+ * The `artifacts.json` types recorded from goreleaser by default: what its
126
+ * own release would upload. A `Binary` is recorded only when it sits at the
127
+ * top of `dist`, as goreleaser writes an uploadable binary; the binaries it
128
+ * builds for archives sit in a directory per target.
129
+ */
130
+ export declare const GORELEASER_TYPES: readonly string[];
131
+ export declare class ReleaseArtifactError extends Error {
132
+ readonly code: string;
133
+ readonly fix?: string | undefined;
134
+ constructor(code: string, message: string, fix?: string | undefined);
135
+ }
136
+ /** Whether the cut records an entry's files as something else built them, with no command of its own (#5183). */
137
+ export declare function isPrebuilt(a: ReleaseArtifactDeclaration): a is ReleaseArtifactPrebuilt;
138
+ /** The label from its first digit, as a formula's and goreleaser's version reads it: `v1.4.0` is `1.4.0`. */
139
+ export declare function labelVersion(label: string | null): string | null;
140
+ /**
141
+ * Check `release.artifacts`: names valid and unique and not an image's, one
142
+ * of `build`, `goreleaser` and `checksums`, paths inside the member,
143
+ * platforms of the form os/arch, placeholders chant fills, and a checksums
144
+ * entry's `of` naming entries before it.
145
+ */
146
+ export declare function checkReleaseArtifacts(artifacts: readonly ReleaseArtifactDeclaration[], o?: {
147
+ imageNames?: readonly string[];
148
+ builds?: readonly ReleaseBuildJobRef[];
149
+ }): void;
150
+ /** The files a path names, `*` and `?` matched within a segment, sorted. */
151
+ export declare function expandOutput(cwd: string, pattern: string): string[];
152
+ export interface BuildArtifactsInput {
153
+ artifacts: readonly ReleaseArtifactDeclaration[];
154
+ /** The member's directory. */
155
+ cwd: string;
156
+ /** The commit's time in seconds: each build's `SOURCE_DATE_EPOCH`, and the time of every archive entry. */
157
+ sourceDateEpoch: number;
158
+ label: string | null;
159
+ env?: NodeJS.ProcessEnv;
160
+ /** Image names, which an entry may not take. */
161
+ imageNames?: readonly string[];
162
+ /** `release.workflow.builds`, which `builtBy` names (#5183). */
163
+ builds?: readonly ReleaseBuildJobRef[];
164
+ /**
165
+ * Where the files of an entry with no command sit (#5183), when not in
166
+ * `cwd`: the member's directory in the checkout the cut runs from, when it
167
+ * builds in a checkout of another commit (`--at`). They are copied to the
168
+ * same paths in `cwd`.
169
+ */
170
+ prebuiltFrom?: string;
171
+ /** Run one command; the default runs it through the shell with its output on stderr. */
172
+ run?: (command: string, o: {
173
+ cwd: string;
174
+ env: NodeJS.ProcessEnv;
175
+ }) => number | null;
176
+ }
177
+ /**
178
+ * Build every entry, in order, and return each file as the release's asset
179
+ * artifact. A command that fails, an output it did not write, a goreleaser
180
+ * version that is not the label, or two entries writing one path stops the
181
+ * cut.
182
+ */
183
+ export declare function buildReleaseArtifacts(i: BuildArtifactsInput): ReleaseArtifact[];
184
+ interface ArchiveEntry {
185
+ /** The path inside the archive. */
186
+ name: string;
187
+ abs: string;
188
+ }
189
+ /** 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. */
190
+ export declare function tarGzArchive(entries: readonly ArchiveEntry[], mtime: number): Buffer;
191
+ /** A zip of the entries in order, deflated, each dated `mtime` (UTC) with its Unix mode. */
192
+ export declare function zipArchive(entries: readonly ArchiveEntry[], mtime: number): Buffer;
193
+ /** The files the release records for `names`, the entries `release.artifacts` declares. */
194
+ export declare function releaseArtifactFiles(release: Pick<Release, "artifactDigests">, names: readonly string[]): ReleaseArtifact[];
195
+ /** Where a recorded file differs from the release in `cwd`: missing, or another digest. */
196
+ export declare function artifactFileProblems(cwd: string, files: readonly ReleaseArtifact[]): Array<{
197
+ path: string;
198
+ problem: "missing" | "digest";
199
+ digest?: string;
200
+ recorded: string;
201
+ }>;
202
+ /** Copy each file from `from` to the same path under `to`. A file missing from `from` is refused. */
203
+ export declare function copyArtifactFiles(files: readonly {
204
+ path: string;
205
+ }[], from: string, to: string, o?: {
206
+ missingOk?: boolean;
207
+ }): void;
208
+ /** Whether any entry is built by goreleaser, for the workflow's install step. */
209
+ export declare function usesGoreleaser(artifacts: readonly ReleaseArtifactDeclaration[]): boolean;
210
+ /** The `artifact:<name>` prefix a forge, homebrew or index target's `assets` names an entry's files with. */
211
+ export declare const ARTIFACT_REF = "artifact:";
212
+ export {};