@visulima/vis 1.0.0-alpha.36 → 1.0.0-alpha.38

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 (177) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE.md +1 -503
  3. package/dist/bin.js +1 -1
  4. package/dist/binx.js +1 -1
  5. package/dist/config/index.d.ts +7 -0
  6. package/dist/packem_chunks/DEFAULT_CLEAN_KEEP.js +1 -0
  7. package/dist/packem_chunks/bin.js +302 -515
  8. package/dist/packem_chunks/bloom-sync.js +1 -1
  9. package/dist/packem_chunks/catalog-detector.js +1 -0
  10. package/dist/packem_chunks/detect.js +3 -0
  11. package/dist/packem_chunks/detect2.js +8 -0
  12. package/dist/packem_chunks/discord.js +4 -0
  13. package/dist/packem_chunks/dynamic-import.js +1 -0
  14. package/dist/packem_chunks/extra-files.js +3 -0
  15. package/dist/packem_chunks/fix.js +1 -1
  16. package/dist/packem_chunks/git.js +3 -0
  17. package/dist/packem_chunks/handler10.js +1 -1
  18. package/dist/packem_chunks/handler12.js +1 -1
  19. package/dist/packem_chunks/handler13.js +1 -1
  20. package/dist/packem_chunks/handler14.js +1 -1
  21. package/dist/packem_chunks/handler15.js +1 -1
  22. package/dist/packem_chunks/handler16.js +1 -1
  23. package/dist/packem_chunks/handler17.js +1 -1
  24. package/dist/packem_chunks/handler18.js +1 -1
  25. package/dist/packem_chunks/handler19.js +1 -1
  26. package/dist/packem_chunks/handler21.js +1 -1
  27. package/dist/packem_chunks/handler27.js +1 -1
  28. package/dist/packem_chunks/handler28.js +1 -1
  29. package/dist/packem_chunks/handler29.js +1 -1
  30. package/dist/packem_chunks/handler3.js +4 -4
  31. package/dist/packem_chunks/handler30.js +2 -7
  32. package/dist/packem_chunks/handler31.js +2 -33
  33. package/dist/packem_chunks/handler32.js +2 -3
  34. package/dist/packem_chunks/handler33.js +3 -8
  35. package/dist/packem_chunks/handler34.js +6 -4
  36. package/dist/packem_chunks/handler35.js +1 -1
  37. package/dist/packem_chunks/handler36.js +42 -5
  38. package/dist/packem_chunks/handler37.js +8 -11
  39. package/dist/packem_chunks/handler38.js +9 -3
  40. package/dist/packem_chunks/handler39.js +74 -21
  41. package/dist/packem_chunks/handler4.js +1 -1
  42. package/dist/packem_chunks/handler40.js +5 -61
  43. package/dist/packem_chunks/handler41.js +4 -3
  44. package/dist/packem_chunks/handler42.js +3 -6
  45. package/dist/packem_chunks/handler43.js +2 -24
  46. package/dist/packem_chunks/handler44.js +1 -25
  47. package/dist/packem_chunks/handler45.js +1 -153
  48. package/dist/packem_chunks/handler46.js +1 -10
  49. package/dist/packem_chunks/handler47.js +3 -24
  50. package/dist/packem_chunks/handler48.js +1 -322
  51. package/dist/packem_chunks/handler49.js +7 -708
  52. package/dist/packem_chunks/handler5.js +6 -6
  53. package/dist/packem_chunks/handler50.js +33 -48
  54. package/dist/packem_chunks/handler51.js +3 -27
  55. package/dist/packem_chunks/handler52.js +8 -3
  56. package/dist/packem_chunks/handler53.js +4 -200
  57. package/dist/packem_chunks/handler54.js +1 -38
  58. package/dist/packem_chunks/handler55.js +12 -0
  59. package/dist/packem_chunks/handler56.js +7 -0
  60. package/dist/packem_chunks/handler57.js +5 -0
  61. package/dist/packem_chunks/handler58.js +11 -0
  62. package/dist/packem_chunks/handler59.js +3 -0
  63. package/dist/packem_chunks/handler60.js +22 -0
  64. package/dist/packem_chunks/handler61.js +61 -0
  65. package/dist/packem_chunks/handler62.js +3 -0
  66. package/dist/packem_chunks/handler63.js +6 -0
  67. package/dist/packem_chunks/handler64.js +708 -0
  68. package/dist/packem_chunks/handler65.js +24 -0
  69. package/dist/packem_chunks/handler66.js +25 -0
  70. package/dist/packem_chunks/handler67.js +153 -0
  71. package/dist/packem_chunks/handler68.js +10 -0
  72. package/dist/packem_chunks/handler69.js +24 -0
  73. package/dist/packem_chunks/handler7.js +1 -1
  74. package/dist/packem_chunks/handler70.js +322 -0
  75. package/dist/packem_chunks/handler71.js +48 -0
  76. package/dist/packem_chunks/handler72.js +27 -0
  77. package/dist/packem_chunks/handler73.js +3 -0
  78. package/dist/packem_chunks/handler74.js +190 -0
  79. package/dist/packem_chunks/handler75.js +38 -0
  80. package/dist/packem_chunks/handler8.js +1 -1
  81. package/dist/packem_chunks/handler9.js +1 -1
  82. package/dist/packem_chunks/heal-accept.js +1 -1
  83. package/dist/packem_chunks/heal.js +1 -1
  84. package/dist/packem_chunks/help-command.js +1 -1
  85. package/dist/packem_chunks/index.js +1 -7
  86. package/dist/packem_chunks/index2.js +7 -0
  87. package/dist/packem_chunks/interface.js +2 -0
  88. package/dist/packem_chunks/keys-refresh.js +1 -1
  89. package/dist/packem_chunks/list.js +1 -1
  90. package/dist/packem_chunks/loader.js +1 -1
  91. package/dist/packem_chunks/orchestrator.js +39 -0
  92. package/dist/packem_chunks/pre-mode.js +2 -0
  93. package/dist/packem_chunks/print-config.js +2 -0
  94. package/dist/packem_chunks/prompts.js +7 -0
  95. package/dist/packem_chunks/publish-guards.js +1 -0
  96. package/dist/packem_chunks/registry.js +48 -0
  97. package/dist/packem_chunks/resolveFormatter.js +9 -0
  98. package/dist/packem_chunks/security.js +1 -0
  99. package/dist/packem_chunks/shell-runner.js +1 -0
  100. package/dist/packem_chunks/slack.js +2 -0
  101. package/dist/packem_chunks/snapshot.js +2 -0
  102. package/dist/packem_chunks/stage-publisher.js +1 -0
  103. package/dist/packem_chunks/staged-registry.js +2 -0
  104. package/dist/packem_chunks/state.js +3 -0
  105. package/dist/packem_chunks/success-walk.js +8 -0
  106. package/dist/packem_chunks/sync.js +1 -1
  107. package/dist/packem_chunks/sync2.js +1 -1
  108. package/dist/packem_chunks/tripwire.js +1 -1
  109. package/dist/packem_chunks/verify-lockfile.js +2 -2
  110. package/dist/packem_chunks/version-resolver.js +2 -0
  111. package/dist/packem_chunks/webhook.js +1 -0
  112. package/dist/packem_chunks/workflow-templates.js +167 -0
  113. package/dist/packem_chunks/workspace.js +2 -0
  114. package/dist/packem_shared/AfterAllProjectsVersioned-CAKI2nWf.js +1 -0
  115. package/dist/packem_shared/ReleaseClient-YHzBIxYS.js +1 -0
  116. package/dist/packem_shared/VisReleaseError-DMGRBTNO.js +1 -0
  117. package/dist/packem_shared/{ai-analysis-DT3bU-_M.js → ai-analysis-K-DKU3ZA.js} +1 -1
  118. package/dist/packem_shared/{ai-fix-BkNqd5nP.js → ai-fix-BPrYoCk8.js} +1 -1
  119. package/dist/packem_shared/api.d-BPftyU9r.d.ts +27 -0
  120. package/dist/packem_shared/createAdapter-bU4DIP3F.js +1 -0
  121. package/dist/packem_shared/createVersionActions-BK43SNDH.js +1 -0
  122. package/dist/packem_shared/{cyclonedx-86-DbHtf.js → cyclonedx-kYozDyxp.js} +3 -3
  123. package/dist/packem_shared/defineFormatter-D5dCp6Kv.js +1 -0
  124. package/dist/packem_shared/dependency-scan-anTuZB1t.js +1 -0
  125. package/dist/packem_shared/{docker-tNrDU3oK.js → docker-BMLrNtWm.js} +1 -1
  126. package/dist/packem_shared/{failure-log-Dwqt6_Ga.js → failure-log-CEWP3bP0.js} +1 -1
  127. package/dist/packem_shared/index-BJbpNthk.js +1 -0
  128. package/dist/packem_shared/index-CgcF6_wo.js +1 -0
  129. package/dist/packem_shared/{index-C0Vj3XF8.js → index-D1_fbGbj.js} +1 -1
  130. package/dist/packem_shared/interface.d-B7VK2rcH.d.ts +148 -0
  131. package/dist/packem_shared/interface.d-Cezzifoh.d.ts +106 -0
  132. package/dist/packem_shared/{missing-package-json-41VUWFBY.js → missing-package-json-BfWUxTGv.js} +1 -1
  133. package/dist/packem_shared/{native-config-sync-BKAZ0NIs.js → native-config-sync-BEkJW7g3.js} +8 -8
  134. package/dist/packem_shared/pm-runner-OGResYrA.js +1 -0
  135. package/dist/packem_shared/provenance-_CJjMKwu.js +1 -0
  136. package/dist/packem_shared/public-api-WqUCiyIe.js +131 -0
  137. package/dist/packem_shared/{registry-keys-Bf2zzlcZ.js → registry-keys-BfFto6vI.js} +1 -1
  138. package/dist/packem_shared/{resolve-explicit-jH0RKyMJ.js → resolve-explicit-CMDl55Nz.js} +2 -2
  139. package/dist/packem_shared/s1ngularity-Dhr3bPk0.js +1 -0
  140. package/dist/packem_shared/{scan-progress-JBbd9QeT.js → scan-progress-DG7_JmTV.js} +1 -1
  141. package/dist/packem_shared/{signatures-D1H6h6GH.js → signatures-C730vkyK.js} +2 -2
  142. package/dist/packem_shared/slug-DoueYuLo.js +1 -0
  143. package/dist/packem_shared/spinner-CV3WVJLv.js +1 -0
  144. package/dist/packem_shared/sticky-comment-D6_7-w8T.js +1 -0
  145. package/dist/packem_shared/{tabs-BqUepRaD.js → tabs-BuTy5gPV.js} +1 -1
  146. package/dist/packem_shared/{typosquats-C8qg1neE.js → typosquats-DN78xx1x.js} +1 -1
  147. package/dist/packem_shared/use-measured-height-_eVGWtWt.js +1 -0
  148. package/dist/packem_shared/verify-6WCmFmy8.js +1 -0
  149. package/dist/packem_shared/{vis-update-app-CTwRkNgj.js → vis-update-app-k3fDxech.js} +1 -1
  150. package/dist/release/core/changelog/index.d.ts +5 -0
  151. package/dist/release/core/changelog/index.js +1 -0
  152. package/dist/release/core/package-managers/index.d.ts +6 -0
  153. package/dist/release/core/package-managers/index.js +1 -0
  154. package/dist/release/core/version-actions/index.d.ts +14 -0
  155. package/dist/release/core/version-actions/index.js +1 -0
  156. package/dist/release/index.d.ts +196 -0
  157. package/dist/release/index.js +1 -0
  158. package/dist/release/plugin-sdk.d.ts +127 -0
  159. package/dist/release/plugin-sdk.js +1 -0
  160. package/dist/release/presets.d.ts +225 -0
  161. package/dist/release/presets.js +1 -0
  162. package/dist/release/types.d.ts +1377 -0
  163. package/dist/release/types.js +1 -0
  164. package/index.d.ts +201 -201
  165. package/index.js +578 -752
  166. package/package.json +53 -11
  167. package/schemas/vis-config.schema.json +1394 -6
  168. package/schemas/vis-release-config.schema.json +1390 -0
  169. package/dist/packem_shared/dependency-scan-BDTH898x.js +0 -1
  170. package/dist/packem_shared/index-CB4p298r.js +0 -1
  171. package/dist/packem_shared/index-DMefdF51.js +0 -1
  172. package/dist/packem_shared/pm-runner-pVihAfxV.js +0 -1
  173. package/dist/packem_shared/provenance-DMuEftgc.js +0 -1
  174. package/dist/packem_shared/s1ngularity-BkfgC6NO.js +0 -1
  175. package/dist/packem_shared/spinner-BXSl864p.js +0 -1
  176. package/dist/packem_shared/use-measured-height-BBJ9intr.js +0 -1
  177. package/dist/packem_shared/verify-Du7xZ2BJ.js +0 -1
@@ -0,0 +1,127 @@
1
+ import { C as ChangelogFormatter } from "../packem_shared/api.d-BPftyU9r.js";
2
+ export type { b as ChangelogContext, c as ChangelogFormatterModule, d as ChangelogTarget } from "../packem_shared/api.d-BPftyU9r.js";
3
+ import { V as VersionActions } from "../packem_shared/interface.d-Cezzifoh.js";
4
+ export { A as AfterAllProjectsVersioned, type a as AfterAllVersionedContext, type b as AfterAllVersionedResult, type P as PublishContext } from "../packem_shared/interface.d-Cezzifoh.js";
5
+ export type { e as PublishResult } from "../packem_shared/interface.d-B7VK2rcH.js";
6
+ import "./types.js";
7
+ interface NotificationPackage {
8
+ /** Package name. */
9
+ name: string;
10
+ /** dist-tag / channel name (`latest`, `alpha`, …). */
11
+ tag?: string;
12
+ /**
13
+ * URL of the published artifact (npm package page, GH release URL,
14
+ * etc.). Populated by `publishContext` after `createRemoteReleases`.
15
+ * May be absent when the registry has no canonical URL (e.g. a
16
+ * shell-publish target with no `checkPublished` lookup).
17
+ */
18
+ url?: string;
19
+ /** Resolved version. */
20
+ version: string;
21
+ }
22
+ interface NotificationContext {
23
+ /** Active channel name (`main`, `alpha`, …). Absent when no channel matched. */
24
+ channel?: string;
25
+ /** ISO-8601 wave-completion timestamp. */
26
+ completedAt: string;
27
+ /** Workspace name pulled from root `package.json#name`, when present. */
28
+ monorepoName?: string;
29
+ /** Packages that successfully published in this wave. */
30
+ published: ReadonlyArray<NotificationPackage>;
31
+ /** Repo slug (`owner/name`) for URL composition. */
32
+ repo?: string;
33
+ /**
34
+ * Packages skipped at the publish gate (stage-rejected / stage-timeout /
35
+ * already-published / etc.). Channel implementations decide whether to
36
+ * surface them.
37
+ */
38
+ skipped: ReadonlyArray<{
39
+ name: string;
40
+ reason: string;
41
+ }>;
42
+ }
43
+ /**
44
+ * The contract a notification channel implements. Built-in channels
45
+ * (slack, discord, webhook) implement this; custom plugins do too.
46
+ *
47
+ * Implementations MUST be idempotent — `dispatchNotifications` may be
48
+ * retried after a partial failure, and posting the same release twice
49
+ * is annoying.
50
+ */
51
+ interface NotificationChannel {
52
+ /** Stable id used in log messages: `"slack"`, `"discord"`, `"webhook"`, …. */
53
+ readonly id: string;
54
+ /**
55
+ * Send the notification. Throw on hard failure (HTTP non-2xx,
56
+ * network error). The dispatcher catches and logs as a warn-level
57
+ * message; it does NOT propagate.
58
+ */
59
+ send: (context: NotificationContext) => Promise<void>;
60
+ }
61
+ /**
62
+ * Re-export of {@link NotificationChannel} so plugin authors get the
63
+ * full type from a single import path.
64
+ */
65
+ /**
66
+ * Identity wrapper that constrains its argument to a
67
+ * {@link NotificationChannel}. Use as the default export of a custom
68
+ * channel module so the type-system catches missing fields (e.g. no
69
+ * `id` / no `send`) at the import site.
70
+ *
71
+ * ```ts
72
+ * export default defineNotificationChannel({
73
+ * id: "teams",
74
+ * async send(context) {
75
+ * await fetch(WEBHOOK, { body: JSON.stringify(context) });
76
+ * },
77
+ * });
78
+ * ```
79
+ */
80
+ declare const defineNotificationChannel: (channel: NotificationChannel) => NotificationChannel;
81
+ /**
82
+ * Re-export the shapes a `VersionActions` implementation interacts
83
+ * with. `PublishContext` carries everything you need at publish time
84
+ * (the package, the resolved version, workspace + per-package config);
85
+ * `PublishResult` is the typed return shape.
86
+ */
87
+ /**
88
+ * Identity wrapper that constrains its argument to a concrete
89
+ * {@link VersionActions} subclass instance.
90
+ *
91
+ * Most authors will subclass `VersionActions` directly because it's an
92
+ * abstract class with two abstract methods. `defineVersionActions` is
93
+ * still useful as a type-narrowed default-export wrapper that surfaces
94
+ * a clearer compile error when the subclass forgets `id` /
95
+ * `readPublishedVersion` / `publish`:
96
+ *
97
+ * ```ts
98
+ * class TeamsActions extends VersionActions {
99
+ * readonly id = "teams";
100
+ * async readPublishedVersion() { return undefined; }
101
+ * async publish(context: PublishContext): Promise&lt;PublishResult> { ... }
102
+ * }
103
+ *
104
+ * export default defineVersionActions(new TeamsActions());
105
+ * ```
106
+ */
107
+ declare const defineVersionActions: (actions: VersionActions) => VersionActions;
108
+ /**
109
+ * Re-export of the changelog formatter contract — same shape as
110
+ * `@visulima/vis/release/types` exposes, surfaced here so plugin authors
111
+ * never need a second import path.
112
+ */
113
+ /**
114
+ * Identity wrapper around a {@link ChangelogFormatter}.
115
+ *
116
+ * ```ts
117
+ * export default defineChangelogFormatter(async (context) => {
118
+ * return `### ${context.release.name} ${context.release.newVersion}\n…`;
119
+ * });
120
+ * ```
121
+ *
122
+ * Aliased to the historical `defineFormatter` export from
123
+ * `core/changelog/api` so existing user code continues to type-check;
124
+ * future plugin authors should prefer the SDK name for clarity.
125
+ */
126
+ declare const defineChangelogFormatter: (formatter: ChangelogFormatter) => ChangelogFormatter;
127
+ export { type ChangelogFormatter, type NotificationChannel, type NotificationContext, type NotificationPackage, VersionActions, defineChangelogFormatter, defineNotificationChannel, defineVersionActions };
@@ -0,0 +1 @@
1
+ import{AfterAllProjectsVersioned as s,VersionActions as f}from"../packem_shared/AfterAllProjectsVersioned-CAKI2nWf.js";const o=e=>e,n=e=>e,i=e=>e;export{s as AfterAllProjectsVersioned,f as VersionActions,i as defineChangelogFormatter,o as defineNotificationChannel,n as defineVersionActions};
@@ -0,0 +1,225 @@
1
+ import { ExtraFileRule, PerPackageReleaseConfig } from "./types.js";
2
+ interface CargoPresetOptions {
3
+ /** Crate directory (containing Cargo.toml). Default: package root. */
4
+ crateDir?: string;
5
+ /** Additional extra-files rules merged with the Cargo.toml bump. */
6
+ extraFiles?: ExtraFileRule[];
7
+ }
8
+ /**
9
+ * Bump `version = "..."` in the `[package]` section of Cargo.toml AND
10
+ * default `versionActions: "cargo"` so vis drives `cargo publish`
11
+ * natively (TOML parse + crates.io API + OIDC trusted publishing).
12
+ *
13
+ * The `[dependencies]`, `[workspace.dependencies]` sections, etc.,
14
+ * are deliberately not touched by the extra-files rule — those
15
+ * reference SemVer ranges of other crates and need explicit operator
16
+ * opt-in to mutate.
17
+ *
18
+ * Operators who want to override the publish behaviour (e.g. push to a
19
+ * private registry via a wrapper script) can set
20
+ * `versionActions: "shell"` and supply their own `publishCommand`
21
+ * downstream — the preset is a default, not a hard wire.
22
+ */
23
+ declare const cargo: (options?: CargoPresetOptions) => PerPackageReleaseConfig;
24
+ interface PyprojectPresetOptions {
25
+ /** Optional dynamic-version source line we should NOT touch (e.g. `__init__.py`). */
26
+ extraFiles?: ExtraFileRule[];
27
+ /** Project root (containing pyproject.toml). Default: package root. */
28
+ projectDir?: string;
29
+ /**
30
+ * Relative path (from the package directory) to `uv.lock`. Recorded
31
+ * on the per-package config so doctor can warn when the lockfile
32
+ * is missing despite the operator configuring uv-aware tooling.
33
+ *
34
+ * vis does NOT mutate `uv.lock` itself — uv regenerates it on
35
+ * `uv sync` / `uv build`. Operators who want the lockfile in the
36
+ * release commit should run `uv lock` between `vis release version`
37
+ * and the commit step (typically via `postVersionCommand`).
38
+ *
39
+ * release-please parity: #2561.
40
+ */
41
+ uvLockPath?: string;
42
+ /**
43
+ * Mark this package as a uv workspace member. `root` is the
44
+ * relative path (from the package directory) to the workspace root
45
+ * containing the `[tool.uv.workspace]` pyproject.toml — typically
46
+ * `".."` or higher. When set, doctor verifies the root's
47
+ * `[tool.uv.workspace] members` lists this package.
48
+ *
49
+ * release-please parity: #2560.
50
+ */
51
+ uvWorkspace?: {
52
+ root: string;
53
+ };
54
+ }
55
+ /**
56
+ * Bump `version = "..."` under `[project]` (PEP 621) AND default
57
+ * `versionActions: "python"` so vis drives the publish step natively
58
+ * (PyPI version detection via JSON API + `python -m build` / `uv build`
59
+ * + `twine upload` / `uv publish` + OIDC trusted-publishing support).
60
+ *
61
+ * Modern packaging (poetry / hatch / pdm / setuptools-with-pyproject)
62
+ * all read this field. Legacy `setup.py` projects can pair this with
63
+ * an explicit `extra-files` rule against `setup.py`.
64
+ *
65
+ * Operators on a dynamic-version path (setuptools-scm / hatch-vcs /
66
+ * poetry-dynamic-versioning) should override `versionActions: "shell"`
67
+ * — `PythonVersionActions` refuses dynamic versioning to avoid running
68
+ * arbitrary build-backend code just to read a literal version.
69
+ */
70
+ declare const pyproject: (options?: PyprojectPresetOptions) => PerPackageReleaseConfig;
71
+ interface GradlePropertiesPresetOptions {
72
+ extraFiles?: ExtraFileRule[];
73
+ /** Path to gradle.properties. Default: package root. */
74
+ projectDir?: string;
75
+ /** Property name to bump. Default `"version"`. */
76
+ property?: string;
77
+ }
78
+ /**
79
+ * Bump a `version=...` line in `gradle.properties`. The default
80
+ * property name matches the Gradle convention for the root project
81
+ * version. Submodule versions typically live in `build.gradle` /
82
+ * `build.gradle.kts` — use a custom extra-files rule for those.
83
+ */
84
+ declare const gradleProperties: (options?: GradlePropertiesPresetOptions) => PerPackageReleaseConfig;
85
+ interface PomXmlPresetOptions {
86
+ extraFiles?: ExtraFileRule[];
87
+ /** Path to the pom.xml. Default: package root. */
88
+ pomDir?: string;
89
+ }
90
+ /**
91
+ * Bump `&lt;version>...&lt;/version>` directly under `&lt;project>` in a Maven
92
+ * `pom.xml`. ⚠ XML doesn't lend itself to surgical regex — this
93
+ * preset matches the FIRST `&lt;version>...&lt;/version>` tag in the file,
94
+ * which is the convention for the project version. If your pom has
95
+ * `&lt;parent>&lt;version>` ahead of the project version, write an explicit
96
+ * rule instead.
97
+ *
98
+ * Defaults `versionActions: "maven"` so vis can read the currently-
99
+ * published version from Maven Central. Native publishing is not yet
100
+ * implemented — Stage 3 ships the skeleton (read + already-published
101
+ * detection); see `docs/guides/release-maven.mdx` for the shell-path
102
+ * workaround (`mvn deploy`) until the Sonatype Central Portal client
103
+ * lands.
104
+ */
105
+ declare const pomXml: (options?: PomXmlPresetOptions) => PerPackageReleaseConfig;
106
+ interface ContainerPresetOptions {
107
+ /**
108
+ * Extra `--build-arg KEY=VALUE` pairs forwarded to buildx. Useful
109
+ * for stamping the version literal into the image at build time.
110
+ */
111
+ buildArgs?: Record<string, string>;
112
+ /**
113
+ * Build context passed to `docker buildx build` (the final positional
114
+ * argument). Defaults to the package directory.
115
+ */
116
+ buildContext?: string;
117
+ extraFiles?: ExtraFileRule[];
118
+ /** Fully-qualified image reference, e.g. `"ghcr.io/scope/foo"`. */
119
+ image: string;
120
+ /**
121
+ * Target platforms for the multi-arch build. Defaults to
122
+ * `["linux/amd64", "linux/arm64"]`.
123
+ */
124
+ platforms?: ReadonlyArray<string>;
125
+ /**
126
+ * Signing scheme to apply after a successful push. `"cosign"` runs
127
+ * `cosign sign --yes &lt;image>:&lt;version>` post-push. Default: no signing.
128
+ */
129
+ signing?: "cosign";
130
+ /**
131
+ * Skip the conventional `:latest` tag. Useful for pre-release /
132
+ * channel-specific images that shouldn't float `latest`.
133
+ */
134
+ skipLatest?: boolean;
135
+ }
136
+ /**
137
+ * OCI container preset — wires the `container` versionActions plus a
138
+ * package-specific `containerImage` declaration.
139
+ *
140
+ * Example:
141
+ *
142
+ * release.packages["@scope/app-image"] = container({
143
+ * image: "ghcr.io/scope/app",
144
+ * platforms: ["linux/amd64", "linux/arm64"],
145
+ * signing: "cosign",
146
+ * });
147
+ *
148
+ * Pair with `releaseTagPattern: "{name}@{version}"` (the default) for
149
+ * a parallel git tag, plus `docker login &lt;registry>` before running
150
+ * `vis release publish`. The published image gets both `:&lt;version>`
151
+ * (immutable pointer) and `:latest` (mutable, disable via
152
+ * `skipLatest: true`).
153
+ */
154
+ declare const container: (options: ContainerPresetOptions) => PerPackageReleaseConfig;
155
+ interface JsrPresetOptions {
156
+ /**
157
+ * Convenience for adding `--allow-slow-types` to `jsr publish`. JSR
158
+ * rejects packages whose exported API has types it can't statically infer
159
+ * unless this flag is set. Default `false`.
160
+ */
161
+ allowSlowTypes?: boolean;
162
+ /**
163
+ * When `true`, also write the version literal into `deno.json` (in
164
+ * addition to `jsr.json`). Useful for Deno-flavoured packages that
165
+ * keep their full Deno config in `deno.json` and use `jsr.json` only
166
+ * for the JSR manifest itself. Default `false`.
167
+ *
168
+ * When the package uses `deno.json` as its sole JSR manifest, pass
169
+ * `manifestPath: "deno.json"` instead — that points the
170
+ * versionActions reader and the extra-files rule at the same file.
171
+ */
172
+ deno?: boolean;
173
+ extraFiles?: ExtraFileRule[];
174
+ /**
175
+ * Relative path to the JSR manifest. Default `"jsr.json"`. Pass
176
+ * `"deno.json"` for Deno-flavoured packages that use it as the
177
+ * primary JSR manifest.
178
+ */
179
+ manifestPath?: string;
180
+ /**
181
+ * Extra arguments forwarded verbatim to `jsr publish` (e.g.
182
+ * `["--allow-slow-types"]`). `--allow-dirty` is always passed by vis and
183
+ * need not be listed. Merged after the `allowSlowTypes` shorthand.
184
+ */
185
+ publishArgs?: string[];
186
+ }
187
+ /**
188
+ * Bump `"version": "..."` in a JSR manifest (`jsr.json` or `deno.json`)
189
+ * AND default `versionActions: "jsr"` so vis drives `npx jsr publish`
190
+ * natively (jsr.io metadata lookup + OIDC trusted publishing + JSR's
191
+ * scoped-name validation).
192
+ *
193
+ * JSR is Deno's package registry (jsr.io). Operators publish via
194
+ * `npx jsr publish` after authoring `jsr.json` (or `deno.json` for
195
+ * Deno-flavoured packages); the manifest uses PEP 621-style fields
196
+ * (`name`, `version`, `exports`).
197
+ *
198
+ * The default rule matches the FIRST `"version": "..."` line in the
199
+ * JSON file, which is the convention for the project version under
200
+ * `name`. If your manifest has nested objects with their own
201
+ * `"version"` keys, write a more specific rule.
202
+ *
203
+ * Operators who need to bump BOTH `jsr.json` AND `deno.json` (because
204
+ * the package keeps a separate Deno config) can pass `deno: true` —
205
+ * the preset emits an extra rule against `deno.json` alongside the
206
+ * primary `jsr.json` bump.
207
+ */
208
+ declare const jsr: (options?: JsrPresetOptions) => PerPackageReleaseConfig;
209
+ interface GoModPresetOptions {
210
+ extraFiles?: ExtraFileRule[];
211
+ /** Path to go.mod. Default: package root. */
212
+ modDir?: string;
213
+ }
214
+ /**
215
+ * Go doesn't carry a version in `go.mod` — versions are SemVer git
216
+ * tags exclusively (`v1.2.3`). This preset is a no-op for the
217
+ * manifest; pair it with `releaseTagPattern: "v{version}"` for proper
218
+ * Go module compatibility. The helper still exists so the config
219
+ * shape is symmetric with the other ecosystems.
220
+ *
221
+ * If you need to update a `pkg.Version` constant in `version.go`,
222
+ * pass it via `extraFiles`.
223
+ */
224
+ declare const goMod: (options?: GoModPresetOptions) => PerPackageReleaseConfig;
225
+ export { CargoPresetOptions, ContainerPresetOptions, GoModPresetOptions, GradlePropertiesPresetOptions, JsrPresetOptions, PomXmlPresetOptions, PyprojectPresetOptions, cargo, container, goMod, gradleProperties, jsr, pomXml, pyproject };
@@ -0,0 +1 @@
1
+ const a=(r={})=>{const s=r.crateDir?`${r.crateDir}/Cargo.toml`:"Cargo.toml";return{cargoTomlPath:s,extraFiles:[{flags:"m",path:s,replace:"$1{version}$3",search:String.raw`^(version\s*=\s*")([^"]+)(")`},...r.extraFiles??[]],versionActions:"cargo"}},i=(r={})=>({extraFiles:[{flags:"m",path:r.projectDir?`${r.projectDir}/pyproject.toml`:"pyproject.toml",replace:"$1{version}$3",search:String.raw`^(version\s*=\s*")([^"]+)(")`},...r.extraFiles??[]],...r.projectDir?{pythonProjectDir:r.projectDir}:{},...r.uvLockPath?{uvLockPath:r.uvLockPath}:{},...r.uvWorkspace?{uvWorkspace:r.uvWorkspace}:{},versionActions:"python"}),n=(r={})=>{const s=r.projectDir?`${r.projectDir}/gradle.properties`:"gradle.properties",o=r.property??"version";return{extraFiles:[{flags:"m",path:s,replace:`${o}={version}`,search:String.raw`^${o}\s*=.*$`},...r.extraFiles??[]]}},l=(r={})=>({extraFiles:[{flags:"",path:r.pomDir?`${r.pomDir}/pom.xml`:"pom.xml",replace:"$1{version}$3",search:"(<version>)([^<]+)(</version>)"},...r.extraFiles??[]],versionActions:"maven"}),c=r=>({buildContext:r.buildContext,containerBuildArgs:r.buildArgs,containerImage:r.image,containerPlatforms:r.platforms,containerSigning:r.signing,containerSkipLatest:r.skipLatest,extraFiles:r.extraFiles??[],versionActions:"container"}),p=(r={})=>{const s=r.manifestPath??"jsr.json",o={flags:"m",path:s,replace:"$1{version}$3",search:String.raw`^(\s*"version"\s*:\s*")([^"]+)(")`},e=r.deno&&s!=="deno.json"?{flags:"m",path:"deno.json",replace:"$1{version}$3",search:String.raw`^(\s*"version"\s*:\s*")([^"]+)(")`}:void 0,t=[...r.allowSlowTypes?["--allow-slow-types"]:[],...r.publishArgs??[]];return{extraFiles:[o,...e?[e]:[],...r.extraFiles??[]],jsrConfigPath:s,...t.length>0?{jsrPublishArgs:t}:{},versionActions:"jsr"}},g=(r={})=>({extraFiles:r.extraFiles??[]});export{a as cargo,c as container,g as goMod,n as gradleProperties,p as jsr,l as pomXml,i as pyproject};