@intentius/chant 0.124.101 → 0.124.103
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/ci-evidence-claims.d.ts +12 -0
- package/dist/ci-evidence-claims.js +12 -0
- package/dist/cli/commands/onboard.js +8 -8
- package/dist/cli/handlers/release-init.js +53 -19
- package/dist/cli/handlers/release.d.ts +1 -1
- package/dist/cli/handlers/release.js +12 -9
- package/dist/cli/main.js +13 -2
- package/dist/cli/parse-args.js +5 -0
- package/dist/cli/registry.d.ts +2 -0
- package/dist/cli/release-commands/cut.js +4 -3
- package/dist/cli/release-commands/init.js +4 -1
- package/dist/cli/release-commands/workflow.js +4 -2
- 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 +641 -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/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 +75 -1
- package/dist/config.js +27 -2
- package/dist/deep-observation.js +9 -3
- package/dist/floor-table.data.js +13 -6
- package/dist/lexicon.d.ts +4 -2
- 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.js +5 -0
- package/dist/lifecycle/publish-credentials.d.ts +1 -1
- package/dist/lifecycle/publish-credentials.js +5 -0
- package/dist/lifecycle/publish-declaration.d.ts +123 -0
- package/dist/lifecycle/publish-declaration.js +141 -2
- package/dist/lifecycle/publish-helm.d.ts +83 -0
- package/dist/lifecycle/publish-helm.js +451 -0
- package/dist/lifecycle/publish-maven.d.ts +79 -0
- package/dist/lifecycle/publish-maven.js +363 -0
- package/dist/lifecycle/publish-mcp-registry.js +1 -2
- package/dist/lifecycle/publish-npm.d.ts +27 -1
- package/dist/lifecycle/publish-npm.js +52 -2
- package/dist/lifecycle/publish-nuget.d.ts +93 -0
- package/dist/lifecycle/publish-nuget.js +376 -0
- package/dist/lifecycle/publish-oci.d.ts +57 -1
- package/dist/lifecycle/publish-oci.js +1 -1
- 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 +2 -0
- package/dist/lifecycle/publish-pypi.js +1 -1
- package/dist/lifecycle/publish-rubygems.d.ts +84 -0
- package/dist/lifecycle/publish-rubygems.js +365 -0
- package/dist/lifecycle/publish-targets.d.ts +10 -0
- package/dist/lifecycle/publish-targets.js +22 -0
- package/dist/lifecycle/publish-train-names.d.ts +4 -1
- package/dist/lifecycle/publish-train-names.js +5 -0
- package/dist/lifecycle/release-artifacts.d.ts +80 -2
- package/dist/lifecycle/release-artifacts.js +241 -5
- package/dist/lifecycle/release-cut.d.ts +6 -1
- package/dist/lifecycle/release-cut.js +15 -0
- package/dist/lifecycle/release-doctor.js +208 -6
- 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 +22 -2
- package/dist/lifecycle/release-init.js +139 -13
- package/dist/lifecycle/release-next.js +1 -2
- package/dist/lifecycle/release-publish.d.ts +1 -1
- package/dist/lifecycle/release-publish.js +1 -1
- package/dist/lifecycle/release-tag.js +1 -2
- 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/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/sensitive-key.d.ts +12 -0
- package/dist/sensitive-key.js +52 -0
- package/dist/tool-pins.d.ts +2 -0
- package/dist/tool-pins.js +12 -0
- package/dist/ts-loader.d.ts +8 -0
- package/dist/ts-loader.js +19 -0
- package/dist/wave-runtime.mjs +325 -325
- package/dist/workspace/lexicon-outputs.d.ts +1 -1
- package/dist/workspace/lexicon-outputs.js +1 -1
- package/dist/workspace/release-steps/index.js +4 -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/targets.d.ts +2 -2
- package/dist/workspace/release-steps/targets.js +3 -3
- package/dist/workspace/release-train-workflow.d.ts +27 -2
- package/dist/workspace/release-train-workflow.js +171 -14
- package/dist/workspace/release-train.js +5 -1
- package/dist/workspace/release-workflow.d.ts +39 -3
- package/dist/workspace/release-workflow.js +80 -24
- package/dist/workspace/train-artifacts.d.ts +107 -0
- package/dist/workspace/train-artifacts.js +239 -0
- package/dist/workspace/train-cut.d.ts +14 -2
- package/dist/workspace/train-cut.js +49 -7
- package/dist/workspace/train-prepare.d.ts +6 -3
- package/dist/workspace/train-prepare.js +54 -8
- package/dist/workspace/train-publish.d.ts +9 -0
- package/dist/workspace/train-publish.js +29 -4
- 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/package.json +1 -1
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
* { type: "homebrew", tap: "acme/homebrew-tap", formula: "Formula/api.rb", template: "packaging/api.rb", assets: ["dist/api-linux-amd64.tar.gz"], url: "https://github.com/acme/api/releases/download/{tag}/{name}" },
|
|
17
17
|
* { type: "pypi", files: ["dist"] },
|
|
18
18
|
* { type: "cargo", crates: ["acme-core", "acme-cli"] },
|
|
19
|
+
* { type: "maven", bundle: "artifact:maven" },
|
|
20
|
+
* { type: "nuget", packages: ["artifact:nuget"] },
|
|
21
|
+
* { type: "rubygems", gems: ["artifact:gem"] },
|
|
19
22
|
* { type: "index", preset: "krew", name: "api", template: "packaging/krew.yaml", assets: ["artifact:api"], url: "https://github.com/acme/api/releases/download/{tag}/{name}" },
|
|
23
|
+
* { type: "helm", charts: ["artifact:chart"], oci: { repository: "ghcr.io/acme/charts" }, index: { repo: "acme/charts" } },
|
|
20
24
|
* ],
|
|
21
25
|
* },
|
|
22
26
|
* };
|
|
@@ -184,6 +188,52 @@ export declare const CargoPublishSchema: z.ZodObject<{
|
|
|
184
188
|
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
185
189
|
sbom: z.ZodOptional<z.ZodLiteral<false>>;
|
|
186
190
|
}, z.core.$strict>;
|
|
191
|
+
/**
|
|
192
|
+
* Maven components on Maven Central (#5232): a bundle uploaded to the
|
|
193
|
+
* Central Portal at the stage, validated there, and published at the reveal
|
|
194
|
+
* (./publish-maven.ts).
|
|
195
|
+
*/
|
|
196
|
+
export declare const MavenPublishSchema: z.ZodObject<{
|
|
197
|
+
type: z.ZodLiteral<"maven">;
|
|
198
|
+
bundle: z.ZodString;
|
|
199
|
+
api: z.ZodOptional<z.ZodString>;
|
|
200
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
201
|
+
usernameEnv: z.ZodOptional<z.ZodString>;
|
|
202
|
+
passwordEnv: z.ZodOptional<z.ZodString>;
|
|
203
|
+
sbom: z.ZodOptional<z.ZodLiteral<false>>;
|
|
204
|
+
}, z.core.$strict>;
|
|
205
|
+
/**
|
|
206
|
+
* NuGet packages on nuget.org or another feed that takes NuGet's push API
|
|
207
|
+
* (#5232), pushed at the reveal (./publish-nuget.ts).
|
|
208
|
+
*/
|
|
209
|
+
export declare const NugetPublishSchema: z.ZodObject<{
|
|
210
|
+
type: z.ZodLiteral<"nuget">;
|
|
211
|
+
packages: z.ZodArray<z.ZodString>;
|
|
212
|
+
pushUrl: z.ZodOptional<z.ZodString>;
|
|
213
|
+
flatContainerUrl: z.ZodOptional<z.ZodString>;
|
|
214
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
215
|
+
token: "token";
|
|
216
|
+
"trusted-publishing": "trusted-publishing";
|
|
217
|
+
}>>;
|
|
218
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
219
|
+
userEnv: z.ZodOptional<z.ZodString>;
|
|
220
|
+
sbom: z.ZodOptional<z.ZodLiteral<false>>;
|
|
221
|
+
}, z.core.$strict>;
|
|
222
|
+
/**
|
|
223
|
+
* Ruby gems on RubyGems.org or another host that takes its API (#5232),
|
|
224
|
+
* pushed at the reveal (./publish-rubygems.ts).
|
|
225
|
+
*/
|
|
226
|
+
export declare const RubygemsPublishSchema: z.ZodObject<{
|
|
227
|
+
type: z.ZodLiteral<"rubygems">;
|
|
228
|
+
gems: z.ZodArray<z.ZodString>;
|
|
229
|
+
host: z.ZodOptional<z.ZodString>;
|
|
230
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
231
|
+
token: "token";
|
|
232
|
+
"trusted-publishing": "trusted-publishing";
|
|
233
|
+
}>>;
|
|
234
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
235
|
+
sbom: z.ZodOptional<z.ZodLiteral<false>>;
|
|
236
|
+
}, z.core.$strict>;
|
|
187
237
|
/**
|
|
188
238
|
* A `server.json` on the official MCP Registry (#5162), published after the
|
|
189
239
|
* npm packages or images it names have been revealed
|
|
@@ -245,6 +295,29 @@ export declare const IndexPublishSchema: z.ZodObject<{
|
|
|
245
295
|
warn: "warn";
|
|
246
296
|
}>>;
|
|
247
297
|
}, z.core.$strict>;
|
|
298
|
+
/**
|
|
299
|
+
* Helm charts (#5233): each chart archive pushed to an OCI registry, where
|
|
300
|
+
* `helm install oci://...` reads it, and listed in a classic chart
|
|
301
|
+
* repository's `index.yaml` on a branch of a GitHub repository, such as the
|
|
302
|
+
* `gh-pages` branch GitHub Pages serves (./publish-helm.ts).
|
|
303
|
+
*/
|
|
304
|
+
export declare const HelmPublishSchema: z.ZodObject<{
|
|
305
|
+
type: z.ZodLiteral<"helm">;
|
|
306
|
+
charts: z.ZodArray<z.ZodString>;
|
|
307
|
+
oci: z.ZodOptional<z.ZodObject<{
|
|
308
|
+
repository: z.ZodString;
|
|
309
|
+
usernameEnv: z.ZodOptional<z.ZodString>;
|
|
310
|
+
passwordEnv: z.ZodOptional<z.ZodString>;
|
|
311
|
+
}, z.core.$strict>>;
|
|
312
|
+
index: z.ZodOptional<z.ZodObject<{
|
|
313
|
+
repo: z.ZodString;
|
|
314
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
315
|
+
path: z.ZodOptional<z.ZodString>;
|
|
316
|
+
url: z.ZodOptional<z.ZodString>;
|
|
317
|
+
api: z.ZodOptional<z.ZodString>;
|
|
318
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
319
|
+
}, z.core.$strict>>;
|
|
320
|
+
}, z.core.$strict>;
|
|
248
321
|
export declare const PublishDeclarationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
249
322
|
type: z.ZodLiteral<"npm">;
|
|
250
323
|
packages: z.ZodArray<z.ZodString>;
|
|
@@ -406,6 +479,52 @@ export declare const PublishDeclarationSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
406
479
|
fail: "fail";
|
|
407
480
|
warn: "warn";
|
|
408
481
|
}>>;
|
|
482
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
483
|
+
type: z.ZodLiteral<"helm">;
|
|
484
|
+
charts: z.ZodArray<z.ZodString>;
|
|
485
|
+
oci: z.ZodOptional<z.ZodObject<{
|
|
486
|
+
repository: z.ZodString;
|
|
487
|
+
usernameEnv: z.ZodOptional<z.ZodString>;
|
|
488
|
+
passwordEnv: z.ZodOptional<z.ZodString>;
|
|
489
|
+
}, z.core.$strict>>;
|
|
490
|
+
index: z.ZodOptional<z.ZodObject<{
|
|
491
|
+
repo: z.ZodString;
|
|
492
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
493
|
+
path: z.ZodOptional<z.ZodString>;
|
|
494
|
+
url: z.ZodOptional<z.ZodString>;
|
|
495
|
+
api: z.ZodOptional<z.ZodString>;
|
|
496
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
497
|
+
}, z.core.$strict>>;
|
|
498
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
499
|
+
type: z.ZodLiteral<"maven">;
|
|
500
|
+
bundle: z.ZodString;
|
|
501
|
+
api: z.ZodOptional<z.ZodString>;
|
|
502
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
503
|
+
usernameEnv: z.ZodOptional<z.ZodString>;
|
|
504
|
+
passwordEnv: z.ZodOptional<z.ZodString>;
|
|
505
|
+
sbom: z.ZodOptional<z.ZodLiteral<false>>;
|
|
506
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
507
|
+
type: z.ZodLiteral<"nuget">;
|
|
508
|
+
packages: z.ZodArray<z.ZodString>;
|
|
509
|
+
pushUrl: z.ZodOptional<z.ZodString>;
|
|
510
|
+
flatContainerUrl: z.ZodOptional<z.ZodString>;
|
|
511
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
512
|
+
token: "token";
|
|
513
|
+
"trusted-publishing": "trusted-publishing";
|
|
514
|
+
}>>;
|
|
515
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
516
|
+
userEnv: z.ZodOptional<z.ZodString>;
|
|
517
|
+
sbom: z.ZodOptional<z.ZodLiteral<false>>;
|
|
518
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
519
|
+
type: z.ZodLiteral<"rubygems">;
|
|
520
|
+
gems: z.ZodArray<z.ZodString>;
|
|
521
|
+
host: z.ZodOptional<z.ZodString>;
|
|
522
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
523
|
+
token: "token";
|
|
524
|
+
"trusted-publishing": "trusted-publishing";
|
|
525
|
+
}>>;
|
|
526
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
527
|
+
sbom: z.ZodOptional<z.ZodLiteral<false>>;
|
|
409
528
|
}, z.core.$strict>], "type">;
|
|
410
529
|
export type NpmPublishDeclaration = z.infer<typeof NpmPublishSchema>;
|
|
411
530
|
export type OciPublishDeclaration = z.infer<typeof OciPublishSchema>;
|
|
@@ -417,4 +536,8 @@ export type PypiPublishDeclaration = z.infer<typeof PypiPublishSchema>;
|
|
|
417
536
|
export type CargoPublishDeclaration = z.infer<typeof CargoPublishSchema>;
|
|
418
537
|
export type McpRegistryPublishDeclaration = z.infer<typeof McpRegistryPublishSchema>;
|
|
419
538
|
export type IndexPublishDeclaration = z.infer<typeof IndexPublishSchema>;
|
|
539
|
+
export type HelmPublishDeclaration = z.infer<typeof HelmPublishSchema>;
|
|
540
|
+
export type MavenPublishDeclaration = z.infer<typeof MavenPublishSchema>;
|
|
541
|
+
export type NugetPublishDeclaration = z.infer<typeof NugetPublishSchema>;
|
|
542
|
+
export type RubygemsPublishDeclaration = z.infer<typeof RubygemsPublishSchema>;
|
|
420
543
|
export type PublishDeclaration = z.infer<typeof PublishDeclarationSchema>;
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
* { type: "homebrew", tap: "acme/homebrew-tap", formula: "Formula/api.rb", template: "packaging/api.rb", assets: ["dist/api-linux-amd64.tar.gz"], url: "https://github.com/acme/api/releases/download/{tag}/{name}" },
|
|
17
17
|
* { type: "pypi", files: ["dist"] },
|
|
18
18
|
* { type: "cargo", crates: ["acme-core", "acme-cli"] },
|
|
19
|
+
* { type: "maven", bundle: "artifact:maven" },
|
|
20
|
+
* { type: "nuget", packages: ["artifact:nuget"] },
|
|
21
|
+
* { type: "rubygems", gems: ["artifact:gem"] },
|
|
19
22
|
* { type: "index", preset: "krew", name: "api", template: "packaging/krew.yaml", assets: ["artifact:api"], url: "https://github.com/acme/api/releases/download/{tag}/{name}" },
|
|
23
|
+
* { type: "helm", charts: ["artifact:chart"], oci: { repository: "ghcr.io/acme/charts" }, index: { repo: "acme/charts" } },
|
|
20
24
|
* ],
|
|
21
25
|
* },
|
|
22
26
|
* };
|
|
@@ -58,8 +62,7 @@ export const NpmPublishSchema = z
|
|
|
58
62
|
stage: z.boolean().optional(),
|
|
59
63
|
/**
|
|
60
64
|
* A variable holding an npm token to retry with when a package's publish
|
|
61
|
-
* fails to authenticate (#4040)
|
|
62
|
-
* a package whose trusted-publisher record is broken publishes with the
|
|
65
|
+
* fails to authenticate (#4040): a package whose trusted-publisher record is broken publishes with the
|
|
63
66
|
* token rather than failing the release. Unset or empty, there is no retry.
|
|
64
67
|
*/
|
|
65
68
|
tokenEnv: envName.optional(),
|
|
@@ -345,6 +348,90 @@ export const CargoPublishSchema = z
|
|
|
345
348
|
.refine((d) => d.registry === undefined || d.index !== undefined, { message: "a registry other than crates.io needs its sparse index", path: ["index"] })
|
|
346
349
|
.refine((d) => d.registry === undefined || d.auth !== "trusted-publishing", { message: "trusted publishing is crates.io's; another registry takes a token", path: ["auth"] })
|
|
347
350
|
.refine((d) => d.auth !== "trusted-publishing" || d.tokenEnv === undefined, { message: "auth: trusted-publishing reads no token", path: ["tokenEnv"] });
|
|
351
|
+
/**
|
|
352
|
+
* Maven components on Maven Central (#5232): a bundle uploaded to the
|
|
353
|
+
* Central Portal at the stage, validated there, and published at the reveal
|
|
354
|
+
* (./publish-maven.ts).
|
|
355
|
+
*/
|
|
356
|
+
export const MavenPublishSchema = z
|
|
357
|
+
.object({
|
|
358
|
+
type: z.literal("maven"),
|
|
359
|
+
/**
|
|
360
|
+
* The bundle, relative to the member: a `.zip` in Maven repository
|
|
361
|
+
* layout, a directory in that layout (chant zips it, adding each missing
|
|
362
|
+
* `.md5` and `.sha1`), or `artifact:<name>` for the one `.zip` the release
|
|
363
|
+
* records for that `release.artifacts` entry.
|
|
364
|
+
*/
|
|
365
|
+
bundle: z.string().min(1),
|
|
366
|
+
/** The Central Portal's root. Default `https://central.sonatype.com`. */
|
|
367
|
+
api: z.string().url().optional(),
|
|
368
|
+
/** The repository the stage reads for components already published. Default `https://repo1.maven.org/maven2/`. */
|
|
369
|
+
repository: z.string().url().optional(),
|
|
370
|
+
/** The variable holding the user token's name. Default `MAVEN_CENTRAL_USERNAME`. */
|
|
371
|
+
usernameEnv: envName.optional(),
|
|
372
|
+
/** The variable holding the user token's password. Default `MAVEN_CENTRAL_PASSWORD`. */
|
|
373
|
+
passwordEnv: envName.optional(),
|
|
374
|
+
/** `false` publishes under the `supply-chain` group components that carry no `-cyclonedx` or `-spdx` file. */
|
|
375
|
+
sbom: z.literal(false).optional(),
|
|
376
|
+
})
|
|
377
|
+
.strict();
|
|
378
|
+
/**
|
|
379
|
+
* NuGet packages on nuget.org or another feed that takes NuGet's push API
|
|
380
|
+
* (#5232), pushed at the reveal (./publish-nuget.ts).
|
|
381
|
+
*/
|
|
382
|
+
export const NugetPublishSchema = z
|
|
383
|
+
.object({
|
|
384
|
+
type: z.literal("nuget"),
|
|
385
|
+
/** The `.nupkg` files, relative to the member: a file, a directory (every `.nupkg` in it), or `artifact:<name>`. */
|
|
386
|
+
packages: z.array(z.string().min(1)).min(1),
|
|
387
|
+
/** Another feed's push URL, such as `https://nuget.acme.dev/api/v2/package`. Needs `flatContainerUrl`. Default nuget.org's. */
|
|
388
|
+
pushUrl: z.string().url().optional(),
|
|
389
|
+
/** That feed's package base address (flat container), which the stage and reveal read. */
|
|
390
|
+
flatContainerUrl: z.string().url().optional(),
|
|
391
|
+
/**
|
|
392
|
+
* `token` reads an API key from `tokenEnv`. `trusted-publishing`
|
|
393
|
+
* exchanges the run's OIDC ID token for a key that lasts an hour, on
|
|
394
|
+
* nuget.org only. Unset: a token when `tokenEnv`'s variable is set, else
|
|
395
|
+
* trusted publishing when the run has an OIDC ID token.
|
|
396
|
+
*/
|
|
397
|
+
auth: z.enum(["token", "trusted-publishing"]).optional(),
|
|
398
|
+
/** The variable holding the API key. Default `NUGET_API_KEY`. */
|
|
399
|
+
tokenEnv: envName.optional(),
|
|
400
|
+
/** The variable holding the nuget.org user (profile name, not email) whose trusted publishing policy names this workflow. Default `NUGET_USER`. */
|
|
401
|
+
userEnv: envName.optional(),
|
|
402
|
+
/** `false` publishes under the `supply-chain` group packages that carry no SBOM. */
|
|
403
|
+
sbom: z.literal(false).optional(),
|
|
404
|
+
})
|
|
405
|
+
.strict()
|
|
406
|
+
.refine((d) => (d.pushUrl === undefined) === (d.flatContainerUrl === undefined), { message: "pushUrl and flatContainerUrl go together", path: ["flatContainerUrl"] })
|
|
407
|
+
.refine((d) => d.pushUrl === undefined || d.auth !== "trusted-publishing", { message: "trusted publishing is nuget.org's; another feed takes a token", path: ["auth"] })
|
|
408
|
+
.refine((d) => d.auth !== "trusted-publishing" || d.tokenEnv === undefined, { message: "auth: trusted-publishing reads no token", path: ["tokenEnv"] });
|
|
409
|
+
/**
|
|
410
|
+
* Ruby gems on RubyGems.org or another host that takes its API (#5232),
|
|
411
|
+
* pushed at the reveal (./publish-rubygems.ts).
|
|
412
|
+
*/
|
|
413
|
+
export const RubygemsPublishSchema = z
|
|
414
|
+
.object({
|
|
415
|
+
type: z.literal("rubygems"),
|
|
416
|
+
/** The `.gem` files, relative to the member: a file, a directory (every `.gem` in it), or `artifact:<name>`. */
|
|
417
|
+
gems: z.array(z.string().min(1)).min(1),
|
|
418
|
+
/** The gem host. Default `https://rubygems.org`. */
|
|
419
|
+
host: z.string().url().optional(),
|
|
420
|
+
/**
|
|
421
|
+
* `token` reads an API key from `tokenEnv`. `trusted-publishing`
|
|
422
|
+
* exchanges the run's OIDC ID token for a short-lived key, on
|
|
423
|
+
* RubyGems.org only. Unset: a token when `tokenEnv`'s variable is set,
|
|
424
|
+
* else trusted publishing when the run has an OIDC ID token.
|
|
425
|
+
*/
|
|
426
|
+
auth: z.enum(["token", "trusted-publishing"]).optional(),
|
|
427
|
+
/** The variable holding the API key. Default `GEM_HOST_API_KEY`, the one `gem push` reads. */
|
|
428
|
+
tokenEnv: envName.optional(),
|
|
429
|
+
/** `false` publishes under the `supply-chain` group, which otherwise refuses this target: a gem host keeps no SBOM beside a gem. */
|
|
430
|
+
sbom: z.literal(false).optional(),
|
|
431
|
+
})
|
|
432
|
+
.strict()
|
|
433
|
+
.refine((d) => d.host === undefined || d.auth !== "trusted-publishing", { message: "trusted publishing is RubyGems.org's; another host takes a token", path: ["auth"] })
|
|
434
|
+
.refine((d) => d.auth !== "trusted-publishing" || d.tokenEnv === undefined, { message: "auth: trusted-publishing reads no token", path: ["tokenEnv"] });
|
|
348
435
|
/**
|
|
349
436
|
* A `server.json` on the official MCP Registry (#5162), published after the
|
|
350
437
|
* npm packages or images it names have been revealed
|
|
@@ -423,6 +510,54 @@ export const IndexPublishSchema = z
|
|
|
423
510
|
.refine((d) => d.sshKeyEnv === undefined || d.tokenEnv === undefined, { message: "keep one of tokenEnv and sshKeyEnv", path: ["sshKeyEnv"] })
|
|
424
511
|
.refine((d) => d.path === undefined || d.template !== undefined, { message: "path is where template goes; name a template", path: ["path"] })
|
|
425
512
|
.refine((d) => (d.assets?.length ?? 0) === 0 || d.url !== undefined, { message: "assets need url, the pattern each is downloaded from", path: ["url"] });
|
|
513
|
+
/**
|
|
514
|
+
* Helm charts (#5233): each chart archive pushed to an OCI registry, where
|
|
515
|
+
* `helm install oci://...` reads it, and listed in a classic chart
|
|
516
|
+
* repository's `index.yaml` on a branch of a GitHub repository, such as the
|
|
517
|
+
* `gh-pages` branch GitHub Pages serves (./publish-helm.ts).
|
|
518
|
+
*/
|
|
519
|
+
export const HelmPublishSchema = z
|
|
520
|
+
.object({
|
|
521
|
+
type: z.literal("helm"),
|
|
522
|
+
/** The chart archives, relative to the member: a `.tgz` file, or `artifact:<name>` for the files the release records for that `release.artifacts` entry. */
|
|
523
|
+
charts: z.array(z.string().min(1)).min(1),
|
|
524
|
+
/** Push each chart to `<repository>/<chart name>`, tagged with its version, as `helm push` does. */
|
|
525
|
+
oci: z
|
|
526
|
+
.object({
|
|
527
|
+
/** `<registry host>/<path>`, such as `ghcr.io/acme/charts`; a chart goes under it by its name. */
|
|
528
|
+
repository: z.string().min(1),
|
|
529
|
+
/** The variable holding the registry user name. Default `OCI_USERNAME`. */
|
|
530
|
+
usernameEnv: envName.optional(),
|
|
531
|
+
/** The variable holding the registry password or token. Default `OCI_PASSWORD`. */
|
|
532
|
+
passwordEnv: envName.optional(),
|
|
533
|
+
})
|
|
534
|
+
.strict()
|
|
535
|
+
.optional(),
|
|
536
|
+
/** List each chart in an `index.yaml` committed to a branch of a GitHub repository. */
|
|
537
|
+
index: z
|
|
538
|
+
.object({
|
|
539
|
+
/** The repository, `owner/name`. */
|
|
540
|
+
repo: z.string().regex(/^[^/\s]+\/[^/\s]+$/, "owner/name"),
|
|
541
|
+
/** The branch the chart repository is served from. Default `gh-pages`. */
|
|
542
|
+
branch: z.string().min(1).optional(),
|
|
543
|
+
/** The index's path on the branch. Default `index.yaml`. */
|
|
544
|
+
path: z.string().min(1).optional(),
|
|
545
|
+
/**
|
|
546
|
+
* Where each chart is downloaded from: `{tag}`, `{label}`, `{version}` and `{name}` (the archive's file name) are
|
|
547
|
+
* filled in, such as a forge release's asset URL. Unset, each archive is committed beside the index, and the
|
|
548
|
+
* index names it by its file name, which helm reads from the repository's URL.
|
|
549
|
+
*/
|
|
550
|
+
url: z.string().min(1).optional(),
|
|
551
|
+
/** The GitHub API root. Default `$GITHUB_API_URL`, else `https://api.github.com`. */
|
|
552
|
+
api: z.string().url().optional(),
|
|
553
|
+
/** The variable holding a token that may push to the branch. Default `GITHUB_TOKEN`. */
|
|
554
|
+
tokenEnv: envName.optional(),
|
|
555
|
+
})
|
|
556
|
+
.strict()
|
|
557
|
+
.optional(),
|
|
558
|
+
})
|
|
559
|
+
.strict()
|
|
560
|
+
.refine((d) => d.oci !== undefined || d.index !== undefined, { message: "a helm target pushes to oci, lists the charts in an index, or both", path: ["oci"] });
|
|
426
561
|
export const PublishDeclarationSchema = z.discriminatedUnion("type", [
|
|
427
562
|
NpmPublishSchema,
|
|
428
563
|
OciPublishSchema,
|
|
@@ -434,4 +569,8 @@ export const PublishDeclarationSchema = z.discriminatedUnion("type", [
|
|
|
434
569
|
CargoPublishSchema,
|
|
435
570
|
McpRegistryPublishSchema,
|
|
436
571
|
IndexPublishSchema,
|
|
572
|
+
HelmPublishSchema,
|
|
573
|
+
MavenPublishSchema,
|
|
574
|
+
NugetPublishSchema,
|
|
575
|
+
RubygemsPublishSchema,
|
|
437
576
|
]);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Helm target (#5233): chart archives pushed to an OCI registry, and
|
|
3
|
+
* listed in a classic chart repository's `index.yaml`.
|
|
4
|
+
*
|
|
5
|
+
* Each chart is a `.tgz` as `helm package` writes it, or as a `helm` entry of
|
|
6
|
+
* `release.artifacts` packs it (./release-artifacts.ts). Its name, version
|
|
7
|
+
* and the rest of its `Chart.yaml` are read from the archive, and a chart
|
|
8
|
+
* whose version is not the release's label from its first digit is refused
|
|
9
|
+
* (`publish-helm-version-mismatch`).
|
|
10
|
+
*
|
|
11
|
+
* `oci`: the chart goes to `<repository>/<chart name>` as `helm push` puts
|
|
12
|
+
* it: an image manifest whose config is the chart's metadata as JSON
|
|
13
|
+
* (`application/vnd.cncf.helm.config.v1+json`) and whose one layer is the
|
|
14
|
+
* archive (`application/vnd.cncf.helm.chart.content.v1.tar+gzip`). The
|
|
15
|
+
* registry is spoken to as the `oci` target speaks to it (./publish-oci.ts),
|
|
16
|
+
* with the same credentials. The stage pushes by digest; the reveal tags
|
|
17
|
+
* the digest with the chart's version (`+` written `_`, as helm does), which
|
|
18
|
+
* is what `helm install oci://<repository>/<name> --version <version>` reads.
|
|
19
|
+
*
|
|
20
|
+
* `index`: a chart repository served from a branch of a GitHub repository,
|
|
21
|
+
* such as `gh-pages`. The index's entry for each chart is its `Chart.yaml`
|
|
22
|
+
* with `urls`, `created` and `digest`, as `helm repo index` writes it. With
|
|
23
|
+
* `url`, each chart is downloaded from there, such as the forge release a
|
|
24
|
+
* `forge` target attaches it to; without it, the archive is committed
|
|
25
|
+
* beside the index and named by its file name. The stage commits to
|
|
26
|
+
* `chant-publish/helm-<version>` at the branch's head, and the reveal
|
|
27
|
+
* fast-forwards the branch, or commits onto it when it moved. The index is
|
|
28
|
+
* read and added to, never rewritten: a version it lists with the same
|
|
29
|
+
* digest is left, and one it lists with another is refused
|
|
30
|
+
* (`publish-helm-version-taken`), since a chart version is never replaced.
|
|
31
|
+
* With `index`, the target reveals after every other target, since the
|
|
32
|
+
* index points at files they make downloadable.
|
|
33
|
+
*/
|
|
34
|
+
import type { HelmPublishDeclaration } from "./publish-declaration.js";
|
|
35
|
+
import { type PublishDeps, type PublishTarget } from "./release-publish.js";
|
|
36
|
+
/** The first chant that publishes a `helm` target (#5233). */
|
|
37
|
+
export declare const PUBLISH_HELM_FLOOR = "0.124.102";
|
|
38
|
+
/** The media type of a chart's config blob: its metadata as JSON. */
|
|
39
|
+
export declare const HELM_CONFIG_MEDIA_TYPE = "application/vnd.cncf.helm.config.v1+json";
|
|
40
|
+
/** The media type of a chart's archive layer. */
|
|
41
|
+
export declare const HELM_CHART_MEDIA_TYPE = "application/vnd.cncf.helm.chart.content.v1.tar+gzip";
|
|
42
|
+
/** The variable the index's token is read from when the declaration names none. */
|
|
43
|
+
export declare const HELM_INDEX_TOKEN_ENV = "GITHUB_TOKEN";
|
|
44
|
+
/** What a chart archive holds, as the target reads it. */
|
|
45
|
+
export interface ChartArchive {
|
|
46
|
+
/** The path the target names, relative to the member. */
|
|
47
|
+
path: string;
|
|
48
|
+
/** The archive's file name. */
|
|
49
|
+
file: string;
|
|
50
|
+
bytes: Uint8Array;
|
|
51
|
+
/** `sha256:<hex>` of the archive. */
|
|
52
|
+
digest: string;
|
|
53
|
+
name: string;
|
|
54
|
+
version: string;
|
|
55
|
+
/** The chart's `Chart.yaml`, as read. */
|
|
56
|
+
metadata: Record<string, unknown>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The `Chart.yaml` of a chart archive: the one file `<dir>/Chart.yaml` at the
|
|
60
|
+
* top of its gzipped tar. Reads ustar names, with a GNU long name or a PAX
|
|
61
|
+
* `path` in place of a short one. Null when the archive has none.
|
|
62
|
+
*/
|
|
63
|
+
export declare function chartYamlOf(gz: Uint8Array): string | null;
|
|
64
|
+
/** Read a chart archive's metadata, refused (`publish-helm-not-a-chart`) when it holds no readable `Chart.yaml` with a name and a version. */
|
|
65
|
+
export declare function readChartArchive(path: string, bytes: Uint8Array): ChartArchive;
|
|
66
|
+
/** The OCI tag of a chart version: helm writes `+` as `_`, which a tag can't hold. */
|
|
67
|
+
export declare function helmOciTag(version: string): string;
|
|
68
|
+
/** The config blob and the manifest `helm push` would make for a chart, with no time in them, so the same chart is the same digest. */
|
|
69
|
+
export declare function helmOciManifest(chart: ChartArchive): {
|
|
70
|
+
config: Uint8Array;
|
|
71
|
+
manifest: Uint8Array;
|
|
72
|
+
digest: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* The index with each chart's entry added, or null when it lists every chart
|
|
76
|
+
* already with the same digest. A version it lists with another digest is
|
|
77
|
+
* refused.
|
|
78
|
+
*/
|
|
79
|
+
export declare function addToHelmIndex(existing: string | null, charts: ReadonlyArray<{
|
|
80
|
+
chart: ChartArchive;
|
|
81
|
+
url: string;
|
|
82
|
+
}>, created: string, where: string): string | null;
|
|
83
|
+
export declare function helmTarget(decl: HelmPublishDeclaration, deps: PublishDeps): PublishTarget;
|