@intentius/chant 0.124.101 → 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 (101) hide show
  1. package/dist/ci-evidence-claims.d.ts +12 -0
  2. package/dist/ci-evidence-claims.js +12 -0
  3. package/dist/cli/handlers/release-init.js +50 -18
  4. package/dist/cli/handlers/release.d.ts +1 -1
  5. package/dist/cli/handlers/release.js +12 -9
  6. package/dist/cli/release-commands/cut.js +4 -3
  7. package/dist/cli/release-commands/init.js +4 -1
  8. package/dist/cli/release-commands/workflow.js +4 -2
  9. package/dist/cloud-lister/index.d.ts +4 -1
  10. package/dist/cloud-lister/index.js +2 -1
  11. package/dist/cloud-lister/kubernetes-components.d.ts +56 -0
  12. package/dist/cloud-lister/kubernetes-components.js +642 -0
  13. package/dist/cloud-lister/kubernetes.d.ts +18 -0
  14. package/dist/cloud-lister/kubernetes.js +26 -1
  15. package/dist/cloud-lister/mask.d.ts +5 -1
  16. package/dist/cloud-lister/mask.js +14 -5
  17. package/dist/config-import.d.ts +1 -1
  18. package/dist/config-import.js +6 -2
  19. package/dist/config-sandbox.d.ts +1 -1
  20. package/dist/config-sandbox.js +3 -3
  21. package/dist/config.d.ts +75 -1
  22. package/dist/config.js +27 -2
  23. package/dist/deep-observation.js +9 -3
  24. package/dist/floor-table.data.js +12 -6
  25. package/dist/lexicon.d.ts +4 -2
  26. package/dist/lifecycle/__fixtures__/package-files.d.ts +32 -0
  27. package/dist/lifecycle/__fixtures__/package-files.js +72 -0
  28. package/dist/lifecycle/__fixtures__/publish-fakes.js +5 -0
  29. package/dist/lifecycle/publish-credentials.d.ts +1 -1
  30. package/dist/lifecycle/publish-credentials.js +5 -0
  31. package/dist/lifecycle/publish-declaration.d.ts +123 -0
  32. package/dist/lifecycle/publish-declaration.js +140 -0
  33. package/dist/lifecycle/publish-helm.d.ts +83 -0
  34. package/dist/lifecycle/publish-helm.js +452 -0
  35. package/dist/lifecycle/publish-maven.d.ts +79 -0
  36. package/dist/lifecycle/publish-maven.js +364 -0
  37. package/dist/lifecycle/publish-mcp-registry.js +1 -2
  38. package/dist/lifecycle/publish-npm.d.ts +27 -1
  39. package/dist/lifecycle/publish-npm.js +51 -1
  40. package/dist/lifecycle/publish-nuget.d.ts +93 -0
  41. package/dist/lifecycle/publish-nuget.js +377 -0
  42. package/dist/lifecycle/publish-oci.d.ts +57 -1
  43. package/dist/lifecycle/publish-oci.js +1 -1
  44. package/dist/lifecycle/publish-package-files.d.ts +16 -0
  45. package/dist/lifecycle/publish-package-files.js +39 -0
  46. package/dist/lifecycle/publish-pypi.d.ts +2 -0
  47. package/dist/lifecycle/publish-pypi.js +1 -1
  48. package/dist/lifecycle/publish-rubygems.d.ts +84 -0
  49. package/dist/lifecycle/publish-rubygems.js +366 -0
  50. package/dist/lifecycle/publish-targets.d.ts +10 -0
  51. package/dist/lifecycle/publish-targets.js +22 -0
  52. package/dist/lifecycle/publish-train-names.d.ts +4 -1
  53. package/dist/lifecycle/publish-train-names.js +5 -0
  54. package/dist/lifecycle/release-artifacts.d.ts +80 -2
  55. package/dist/lifecycle/release-artifacts.js +242 -5
  56. package/dist/lifecycle/release-cut.d.ts +6 -1
  57. package/dist/lifecycle/release-cut.js +15 -0
  58. package/dist/lifecycle/release-doctor.js +208 -6
  59. package/dist/lifecycle/release-init-registries.d.ts +48 -0
  60. package/dist/lifecycle/release-init-registries.js +97 -0
  61. package/dist/lifecycle/release-init.d.ts +22 -2
  62. package/dist/lifecycle/release-init.js +132 -7
  63. package/dist/lifecycle/release-next.js +1 -2
  64. package/dist/lifecycle/release-publish.d.ts +1 -1
  65. package/dist/lifecycle/release-publish.js +1 -1
  66. package/dist/lifecycle/release-tag.js +1 -2
  67. package/dist/op/local-executor.d.ts +1 -1
  68. package/dist/op/local-executor.js +2 -2
  69. package/dist/op/op-waves-evidence.js +9 -2
  70. package/dist/release-floors.d.ts +1 -1
  71. package/dist/release-floors.js +1 -1
  72. package/dist/sensitive-key.d.ts +12 -0
  73. package/dist/sensitive-key.js +52 -0
  74. package/dist/tool-pins.d.ts +2 -0
  75. package/dist/tool-pins.js +12 -0
  76. package/dist/ts-loader.d.ts +8 -0
  77. package/dist/ts-loader.js +19 -0
  78. package/dist/wave-runtime.mjs +325 -325
  79. package/dist/workspace/lexicon-outputs.d.ts +1 -1
  80. package/dist/workspace/lexicon-outputs.js +1 -1
  81. package/dist/workspace/release-steps/index.js +4 -0
  82. package/dist/workspace/release-steps/nfpm.d.ts +13 -0
  83. package/dist/workspace/release-steps/nfpm.js +29 -0
  84. package/dist/workspace/release-steps/nuget.d.ts +14 -0
  85. package/dist/workspace/release-steps/nuget.js +16 -0
  86. package/dist/workspace/release-steps/targets.d.ts +2 -2
  87. package/dist/workspace/release-steps/targets.js +3 -3
  88. package/dist/workspace/release-train-workflow.d.ts +7 -0
  89. package/dist/workspace/release-train-workflow.js +46 -10
  90. package/dist/workspace/release-workflow.d.ts +28 -3
  91. package/dist/workspace/release-workflow.js +38 -15
  92. package/dist/workspace/train-cut.d.ts +2 -2
  93. package/dist/workspace/train-cut.js +27 -5
  94. package/dist/workspace/train-prepare.d.ts +6 -3
  95. package/dist/workspace/train-prepare.js +54 -8
  96. package/dist/workspace/train-publish.js +2 -3
  97. package/dist/workspace/train-shell.d.ts +5 -0
  98. package/dist/workspace/train-shell.js +17 -0
  99. package/dist/workspace/trust/check-evidence-report.d.ts +3 -7
  100. package/dist/workspace/trust/check-evidence-report.js +3 -7
  101. 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
  * };
@@ -345,6 +349,90 @@ export const CargoPublishSchema = z
345
349
  .refine((d) => d.registry === undefined || d.index !== undefined, { message: "a registry other than crates.io needs its sparse index", path: ["index"] })
346
350
  .refine((d) => d.registry === undefined || d.auth !== "trusted-publishing", { message: "trusted publishing is crates.io's; another registry takes a token", path: ["auth"] })
347
351
  .refine((d) => d.auth !== "trusted-publishing" || d.tokenEnv === undefined, { message: "auth: trusted-publishing reads no token", path: ["tokenEnv"] });
352
+ /**
353
+ * Maven components on Maven Central (#5232): a bundle uploaded to the
354
+ * Central Portal at the stage, validated there, and published at the reveal
355
+ * (./publish-maven.ts).
356
+ */
357
+ export const MavenPublishSchema = z
358
+ .object({
359
+ type: z.literal("maven"),
360
+ /**
361
+ * The bundle, relative to the member: a `.zip` in Maven repository
362
+ * layout, a directory in that layout (chant zips it, adding each missing
363
+ * `.md5` and `.sha1`), or `artifact:<name>` for the one `.zip` the release
364
+ * records for that `release.artifacts` entry.
365
+ */
366
+ bundle: z.string().min(1),
367
+ /** The Central Portal's root. Default `https://central.sonatype.com`. */
368
+ api: z.string().url().optional(),
369
+ /** The repository the stage reads for components already published. Default `https://repo1.maven.org/maven2/`. */
370
+ repository: z.string().url().optional(),
371
+ /** The variable holding the user token's name. Default `MAVEN_CENTRAL_USERNAME`. */
372
+ usernameEnv: envName.optional(),
373
+ /** The variable holding the user token's password. Default `MAVEN_CENTRAL_PASSWORD`. */
374
+ passwordEnv: envName.optional(),
375
+ /** `false` publishes under the `supply-chain` group components that carry no `-cyclonedx` or `-spdx` file. */
376
+ sbom: z.literal(false).optional(),
377
+ })
378
+ .strict();
379
+ /**
380
+ * NuGet packages on nuget.org or another feed that takes NuGet's push API
381
+ * (#5232), pushed at the reveal (./publish-nuget.ts).
382
+ */
383
+ export const NugetPublishSchema = z
384
+ .object({
385
+ type: z.literal("nuget"),
386
+ /** The `.nupkg` files, relative to the member: a file, a directory (every `.nupkg` in it), or `artifact:<name>`. */
387
+ packages: z.array(z.string().min(1)).min(1),
388
+ /** Another feed's push URL, such as `https://nuget.acme.dev/api/v2/package`. Needs `flatContainerUrl`. Default nuget.org's. */
389
+ pushUrl: z.string().url().optional(),
390
+ /** That feed's package base address (flat container), which the stage and reveal read. */
391
+ flatContainerUrl: z.string().url().optional(),
392
+ /**
393
+ * `token` reads an API key from `tokenEnv`. `trusted-publishing`
394
+ * exchanges the run's OIDC ID token for a key that lasts an hour, on
395
+ * nuget.org only. Unset: a token when `tokenEnv`'s variable is set, else
396
+ * trusted publishing when the run has an OIDC ID token.
397
+ */
398
+ auth: z.enum(["token", "trusted-publishing"]).optional(),
399
+ /** The variable holding the API key. Default `NUGET_API_KEY`. */
400
+ tokenEnv: envName.optional(),
401
+ /** The variable holding the nuget.org user (profile name, not email) whose trusted publishing policy names this workflow. Default `NUGET_USER`. */
402
+ userEnv: envName.optional(),
403
+ /** `false` publishes under the `supply-chain` group packages that carry no SBOM. */
404
+ sbom: z.literal(false).optional(),
405
+ })
406
+ .strict()
407
+ .refine((d) => (d.pushUrl === undefined) === (d.flatContainerUrl === undefined), { message: "pushUrl and flatContainerUrl go together", path: ["flatContainerUrl"] })
408
+ .refine((d) => d.pushUrl === undefined || d.auth !== "trusted-publishing", { message: "trusted publishing is nuget.org's; another feed takes a token", path: ["auth"] })
409
+ .refine((d) => d.auth !== "trusted-publishing" || d.tokenEnv === undefined, { message: "auth: trusted-publishing reads no token", path: ["tokenEnv"] });
410
+ /**
411
+ * Ruby gems on RubyGems.org or another host that takes its API (#5232),
412
+ * pushed at the reveal (./publish-rubygems.ts).
413
+ */
414
+ export const RubygemsPublishSchema = z
415
+ .object({
416
+ type: z.literal("rubygems"),
417
+ /** The `.gem` files, relative to the member: a file, a directory (every `.gem` in it), or `artifact:<name>`. */
418
+ gems: z.array(z.string().min(1)).min(1),
419
+ /** The gem host. Default `https://rubygems.org`. */
420
+ host: z.string().url().optional(),
421
+ /**
422
+ * `token` reads an API key from `tokenEnv`. `trusted-publishing`
423
+ * exchanges the run's OIDC ID token for a short-lived key, on
424
+ * RubyGems.org only. Unset: a token when `tokenEnv`'s variable is set,
425
+ * else trusted publishing when the run has an OIDC ID token.
426
+ */
427
+ auth: z.enum(["token", "trusted-publishing"]).optional(),
428
+ /** The variable holding the API key. Default `GEM_HOST_API_KEY`, the one `gem push` reads. */
429
+ tokenEnv: envName.optional(),
430
+ /** `false` publishes under the `supply-chain` group, which otherwise refuses this target: a gem host keeps no SBOM beside a gem. */
431
+ sbom: z.literal(false).optional(),
432
+ })
433
+ .strict()
434
+ .refine((d) => d.host === undefined || d.auth !== "trusted-publishing", { message: "trusted publishing is RubyGems.org's; another host takes a token", path: ["auth"] })
435
+ .refine((d) => d.auth !== "trusted-publishing" || d.tokenEnv === undefined, { message: "auth: trusted-publishing reads no token", path: ["tokenEnv"] });
348
436
  /**
349
437
  * A `server.json` on the official MCP Registry (#5162), published after the
350
438
  * npm packages or images it names have been revealed
@@ -423,6 +511,54 @@ export const IndexPublishSchema = z
423
511
  .refine((d) => d.sshKeyEnv === undefined || d.tokenEnv === undefined, { message: "keep one of tokenEnv and sshKeyEnv", path: ["sshKeyEnv"] })
424
512
  .refine((d) => d.path === undefined || d.template !== undefined, { message: "path is where template goes; name a template", path: ["path"] })
425
513
  .refine((d) => (d.assets?.length ?? 0) === 0 || d.url !== undefined, { message: "assets need url, the pattern each is downloaded from", path: ["url"] });
514
+ /**
515
+ * Helm charts (#5233): each chart archive pushed to an OCI registry, where
516
+ * `helm install oci://...` reads it, and listed in a classic chart
517
+ * repository's `index.yaml` on a branch of a GitHub repository, such as the
518
+ * `gh-pages` branch GitHub Pages serves (./publish-helm.ts).
519
+ */
520
+ export const HelmPublishSchema = z
521
+ .object({
522
+ type: z.literal("helm"),
523
+ /** The chart archives, relative to the member: a `.tgz` file, or `artifact:<name>` for the files the release records for that `release.artifacts` entry. */
524
+ charts: z.array(z.string().min(1)).min(1),
525
+ /** Push each chart to `<repository>/<chart name>`, tagged with its version, as `helm push` does. */
526
+ oci: z
527
+ .object({
528
+ /** `<registry host>/<path>`, such as `ghcr.io/acme/charts`; a chart goes under it by its name. */
529
+ repository: z.string().min(1),
530
+ /** The variable holding the registry user name. Default `OCI_USERNAME`. */
531
+ usernameEnv: envName.optional(),
532
+ /** The variable holding the registry password or token. Default `OCI_PASSWORD`. */
533
+ passwordEnv: envName.optional(),
534
+ })
535
+ .strict()
536
+ .optional(),
537
+ /** List each chart in an `index.yaml` committed to a branch of a GitHub repository. */
538
+ index: z
539
+ .object({
540
+ /** The repository, `owner/name`. */
541
+ repo: z.string().regex(/^[^/\s]+\/[^/\s]+$/, "owner/name"),
542
+ /** The branch the chart repository is served from. Default `gh-pages`. */
543
+ branch: z.string().min(1).optional(),
544
+ /** The index's path on the branch. Default `index.yaml`. */
545
+ path: z.string().min(1).optional(),
546
+ /**
547
+ * Where each chart is downloaded from: `{tag}`, `{label}`, `{version}` and `{name}` (the archive's file name) are
548
+ * filled in, such as a forge release's asset URL. Unset, each archive is committed beside the index, and the
549
+ * index names it by its file name, which helm reads from the repository's URL.
550
+ */
551
+ url: z.string().min(1).optional(),
552
+ /** The GitHub API root. Default `$GITHUB_API_URL`, else `https://api.github.com`. */
553
+ api: z.string().url().optional(),
554
+ /** The variable holding a token that may push to the branch. Default `GITHUB_TOKEN`. */
555
+ tokenEnv: envName.optional(),
556
+ })
557
+ .strict()
558
+ .optional(),
559
+ })
560
+ .strict()
561
+ .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
562
  export const PublishDeclarationSchema = z.discriminatedUnion("type", [
427
563
  NpmPublishSchema,
428
564
  OciPublishSchema,
@@ -434,4 +570,8 @@ export const PublishDeclarationSchema = z.discriminatedUnion("type", [
434
570
  CargoPublishSchema,
435
571
  McpRegistryPublishSchema,
436
572
  IndexPublishSchema,
573
+ HelmPublishSchema,
574
+ MavenPublishSchema,
575
+ NugetPublishSchema,
576
+ RubygemsPublishSchema,
437
577
  ]);
@@ -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;