@workerstack/clients 1.0.0-rc.29 → 1.0.0-rc.30

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 (291) hide show
  1. package/README.md +373 -14
  2. package/assets/installers/examples/github.config.ts +17 -19
  3. package/assets/installers/examples/goreleaser.config.ts +16 -18
  4. package/assets/installers/examples/raw.config.ts +13 -15
  5. package/bin/clients.js +87 -66
  6. package/bin/installgen.js +19 -10
  7. package/dist/cli.d.ts +4 -4
  8. package/dist/cli.js +18 -12
  9. package/dist/emit/cli/channels.d.ts +2 -2
  10. package/dist/emit/cli/channels.js +18 -13
  11. package/dist/emit/cli/commands.d.ts +1 -1
  12. package/dist/emit/cli/commands.js +14 -8
  13. package/dist/emit/cli/discovery.d.ts +0 -6
  14. package/dist/emit/cli/discovery.js +9 -7
  15. package/dist/emit/cli/flags.d.ts +1 -3
  16. package/dist/emit/cli/flags.js +11 -5
  17. package/dist/emit/cli/install.d.ts +0 -8
  18. package/dist/emit/cli/install.js +3 -3
  19. package/dist/emit/cli/layout.d.ts +1 -1
  20. package/dist/emit/cli/layout.js +13 -10
  21. package/dist/emit/cli/module.d.ts +6 -6
  22. package/dist/emit/cli/module.js +10 -10
  23. package/dist/emit/cli/release.d.ts +0 -11
  24. package/dist/emit/cli/release.js +4 -4
  25. package/dist/emit/cli/skills.js +3 -3
  26. package/dist/emit/csharp/errors.js +4 -4
  27. package/dist/emit/csharp/json.js +8 -8
  28. package/dist/emit/csharp/realtime.js +3 -3
  29. package/dist/emit/csharp/sdk-answer.js +4 -4
  30. package/dist/emit/csharp/sdk-body.js +8 -6
  31. package/dist/emit/csharp/sdk-client.d.ts +3 -3
  32. package/dist/emit/csharp/sdk-client.js +2 -2
  33. package/dist/emit/csharp/sdk-csproj.d.ts +7 -9
  34. package/dist/emit/csharp/sdk-csproj.js +10 -10
  35. package/dist/emit/csharp/sdk-doc.js +1 -1
  36. package/dist/emit/csharp/sdk-method.d.ts +0 -1
  37. package/dist/emit/csharp/sdk-method.js +10 -6
  38. package/dist/emit/csharp/sdk-plan.js +0 -1
  39. package/dist/emit/csharp/sdk.js +3 -3
  40. package/dist/emit/csharp/sse.d.ts +0 -2
  41. package/dist/emit/csharp/sse.js +7 -7
  42. package/dist/emit/csharp/transport.js +7 -7
  43. package/dist/emit/csharp/types-enum.js +3 -1
  44. package/dist/emit/csharp/types-messages.js +3 -3
  45. package/dist/emit/csharp/types-names.js +10 -12
  46. package/dist/emit/csharp/types-record.js +3 -3
  47. package/dist/emit/csharp/types-union.d.ts +1 -1
  48. package/dist/emit/csharp/types.d.ts +0 -1
  49. package/dist/emit/csharp/types.js +3 -3
  50. package/dist/emit/csharp/ws.js +2 -2
  51. package/dist/emit/go/errors.js +1 -1
  52. package/dist/emit/go/http.js +2 -2
  53. package/dist/emit/go/module-path.js +2 -2
  54. package/dist/emit/go/sdk-answer.js +1 -1
  55. package/dist/emit/go/sdk-body.js +11 -7
  56. package/dist/emit/go/sdk-client.js +1 -1
  57. package/dist/emit/go/sdk-method.js +2 -2
  58. package/dist/emit/go/sdk-mirror.js +2 -2
  59. package/dist/emit/go/sdk-opts.d.ts +0 -2
  60. package/dist/emit/go/sdk-opts.js +3 -3
  61. package/dist/emit/go/sdk.d.ts +1 -1
  62. package/dist/emit/go/sdk.js +9 -9
  63. package/dist/emit/go/sse.js +1 -1
  64. package/dist/emit/go/types-names.js +5 -0
  65. package/dist/emit/go/types-struct.d.ts +2 -1
  66. package/dist/emit/go/types-struct.js +1 -1
  67. package/dist/emit/go/types.js +9 -9
  68. package/dist/emit/go/ws.js +6 -6
  69. package/dist/emit/java/gradle.d.ts +7 -9
  70. package/dist/emit/java/gradle.js +8 -8
  71. package/dist/emit/java/json.js +1 -1
  72. package/dist/emit/java/layout-ast.js +1 -1
  73. package/dist/emit/java/layout-decl.js +5 -4
  74. package/dist/emit/java/layout-doc.js +13 -7
  75. package/dist/emit/java/layout-dot.js +1 -1
  76. package/dist/emit/java/layout-strings.js +4 -5
  77. package/dist/emit/java/layout-types.js +7 -5
  78. package/dist/emit/java/layout-visitor.js +4 -3
  79. package/dist/emit/java/layout.js +5 -4
  80. package/dist/emit/java/models-names.js +5 -4
  81. package/dist/emit/java/models-record.d.ts +0 -1
  82. package/dist/emit/java/models-record.js +3 -3
  83. package/dist/emit/java/models-union.d.ts +1 -1
  84. package/dist/emit/java/models-union.js +1 -1
  85. package/dist/emit/java/models.d.ts +1 -2
  86. package/dist/emit/java/models.js +25 -16
  87. package/dist/emit/java/realtime.d.ts +5 -17
  88. package/dist/emit/java/realtime.js +1 -1
  89. package/dist/emit/java/sdk-client.d.ts +6 -6
  90. package/dist/emit/java/sdk-client.js +1 -1
  91. package/dist/emit/java/sdk-decl.js +2 -2
  92. package/dist/emit/java/sdk-errors.js +1 -1
  93. package/dist/emit/java/sdk-headers.js +2 -2
  94. package/dist/emit/java/sdk-mirror.js +2 -2
  95. package/dist/emit/java/sdk-models.d.ts +1 -1
  96. package/dist/emit/java/sdk-models.js +7 -7
  97. package/dist/emit/java/sdk-op.d.ts +1 -10
  98. package/dist/emit/java/sdk-op.js +8 -8
  99. package/dist/emit/java/sdk-params.d.ts +5 -5
  100. package/dist/emit/java/sdk-params.js +3 -2
  101. package/dist/emit/java/sdk-plan.js +0 -1
  102. package/dist/emit/java/sdk.d.ts +1 -1
  103. package/dist/emit/java/sdk.js +14 -13
  104. package/dist/emit/java/sse.d.ts +2 -4
  105. package/dist/emit/java/sse.js +6 -6
  106. package/dist/emit/java/ws.d.ts +2 -2
  107. package/dist/emit/java/ws.js +3 -4
  108. package/dist/emit/mcp/annotations.js +8 -4
  109. package/dist/emit/mcp/files.js +9 -9
  110. package/dist/emit/mcp/mounted.js +2 -2
  111. package/dist/emit/mcp/output-schema.js +3 -3
  112. package/dist/emit/mcp/registry.d.ts +0 -2
  113. package/dist/emit/mcp/registry.js +5 -4
  114. package/dist/emit/mcp/runtime.js +2 -2
  115. package/dist/emit/mcp/schema.js +22 -11
  116. package/dist/emit/mcp/server.d.ts +7 -7
  117. package/dist/emit/mcp/server.js +7 -6
  118. package/dist/emit/mcp/tools.js +7 -6
  119. package/dist/emit/python/errors.js +3 -3
  120. package/dist/emit/python/realtime.js +2 -2
  121. package/dist/emit/python/sdk-answer.d.ts +3 -7
  122. package/dist/emit/python/sdk-answer.js +2 -2
  123. package/dist/emit/python/sdk-body.js +4 -5
  124. package/dist/emit/python/sdk-client.js +5 -5
  125. package/dist/emit/python/sdk-doc.js +2 -2
  126. package/dist/emit/python/sdk-method.js +5 -5
  127. package/dist/emit/python/sdk-plan.js +0 -1
  128. package/dist/emit/python/sdk-pyproject.d.ts +0 -2
  129. package/dist/emit/python/sdk-pyproject.js +8 -8
  130. package/dist/emit/python/sdk.d.ts +1 -1
  131. package/dist/emit/python/sdk.js +7 -7
  132. package/dist/emit/python/sse.d.ts +0 -2
  133. package/dist/emit/python/sse.js +2 -2
  134. package/dist/emit/python/transport.js +4 -4
  135. package/dist/emit/python/types-dict.d.ts +2 -2
  136. package/dist/emit/python/types-dict.js +1 -1
  137. package/dist/emit/python/types-names.js +2 -2
  138. package/dist/emit/python/types-union.js +1 -1
  139. package/dist/emit/python/types.js +3 -3
  140. package/dist/emit/python/ws.d.ts +2 -5
  141. package/dist/emit/python/ws.js +4 -4
  142. package/dist/emit/rust/errors.js +3 -3
  143. package/dist/emit/rust/http.js +4 -4
  144. package/dist/emit/rust/realtime.js +2 -2
  145. package/dist/emit/rust/sdk-body.js +8 -5
  146. package/dist/emit/rust/sdk-cargo.d.ts +16 -18
  147. package/dist/emit/rust/sdk-cargo.js +12 -12
  148. package/dist/emit/rust/sdk-client.d.ts +1 -1
  149. package/dist/emit/rust/sdk-client.js +3 -3
  150. package/dist/emit/rust/sdk-method.js +2 -2
  151. package/dist/emit/rust/sdk-opts.d.ts +2 -1
  152. package/dist/emit/rust/sdk-opts.js +2 -2
  153. package/dist/emit/rust/sdk-plan.js +0 -1
  154. package/dist/emit/rust/sdk.d.ts +1 -1
  155. package/dist/emit/rust/sdk.js +5 -5
  156. package/dist/emit/rust/sse.d.ts +0 -5
  157. package/dist/emit/rust/sse.js +2 -2
  158. package/dist/emit/rust/types-names.js +3 -3
  159. package/dist/emit/rust/types-struct.js +1 -1
  160. package/dist/emit/rust/types-union.d.ts +1 -1
  161. package/dist/emit/rust/types.js +7 -5
  162. package/dist/emit/rust/ws.d.ts +0 -11
  163. package/dist/emit/rust/ws.js +5 -5
  164. package/dist/emit/shared/escape.js +17 -17
  165. package/dist/emit/shared/format.js +1 -1
  166. package/dist/emit/shared/gofmt.js +1 -1
  167. package/dist/emit/shared/lang.js +10 -10
  168. package/dist/emit/shared/literals.d.ts +5 -0
  169. package/dist/emit/shared/literals.js +8 -0
  170. package/dist/emit/shared/metadata.d.ts +0 -6
  171. package/dist/emit/shared/metadata.js +8 -7
  172. package/dist/emit/shared/ruff.js +1 -1
  173. package/dist/emit/shared/rustfmt.js +1 -1
  174. package/dist/emit/shared/type-emitter.js +37 -20
  175. package/dist/emit/shared/unknown-type.constants.d.ts +2 -0
  176. package/dist/emit/shared/unknown-type.constants.js +2 -0
  177. package/dist/emit/ts/http.d.ts +0 -2
  178. package/dist/emit/ts/http.js +4 -4
  179. package/dist/emit/ts/package.d.ts +14 -12
  180. package/dist/emit/ts/package.js +9 -8
  181. package/dist/emit/ts/route-tree.js +2 -2
  182. package/dist/emit/ts/sdk-types-preamble.d.ts +1 -1
  183. package/dist/emit/ts/sdk-types-preamble.js +2 -2
  184. package/dist/emit/ts/sdk-types.js +11 -11
  185. package/dist/emit/ts/sdk.js +4 -4
  186. package/dist/emit/ts/service-map.d.ts +2 -1
  187. package/dist/emit/ts/tanstack-query.js +6 -6
  188. package/dist/emit/ts/type-gen.js +31 -18
  189. package/dist/emit/ts/webhooks.d.ts +0 -2
  190. package/dist/emit/ts/webhooks.js +3 -3
  191. package/dist/extract/chain.js +5 -4
  192. package/dist/extract/extract.js +5 -5
  193. package/dist/extract/serialize.d.ts +0 -2
  194. package/dist/extract/serialize.js +14 -15
  195. package/dist/extract/walk.js +15 -12
  196. package/dist/gen/args.js +9 -5
  197. package/dist/gen/formatters.js +5 -3
  198. package/dist/gen/shipped.js +2 -2
  199. package/dist/gen/targets.d.ts +2 -4
  200. package/dist/gen/targets.js +8 -4
  201. package/dist/gen/write.js +4 -2
  202. package/dist/index.js +2 -2
  203. package/dist/installers/cli.d.ts +4 -4
  204. package/dist/installers/cli.js +24 -24
  205. package/dist/installers/commands/build.d.ts +4 -4
  206. package/dist/installers/commands/build.js +2 -3
  207. package/dist/installers/commands/check.d.ts +2 -2
  208. package/dist/installers/commands/check.js +11 -10
  209. package/dist/installers/commands/init.d.ts +2 -2
  210. package/dist/installers/commands/init.js +1 -2
  211. package/dist/installers/config/define-config.d.ts +16 -16
  212. package/dist/installers/config/define-config.js +1 -1
  213. package/dist/installers/config/hooks/bun.d.ts +6 -6
  214. package/dist/installers/config/hooks/node.js +1 -1
  215. package/dist/installers/config/load.d.ts +6 -8
  216. package/dist/installers/config/load.js +7 -8
  217. package/dist/installers/config/resolve.d.ts +1 -2
  218. package/dist/installers/config/resolve.js +28 -33
  219. package/dist/installers/config/types.d.ts +6 -6
  220. package/dist/installers/config/types.js +0 -1
  221. package/dist/installers/render/quote.js +3 -5
  222. package/dist/installers/render/render.d.ts +6 -6
  223. package/dist/installers/render/render.js +26 -26
  224. package/dist/installers/ui.d.ts +4 -4
  225. package/dist/installers/ui.js +3 -3
  226. package/dist/ir/build.d.ts +3 -3
  227. package/dist/ir/build.js +8 -5
  228. package/dist/ir/load.js +9 -10
  229. package/dist/ir/model.d.ts +2 -1
  230. package/dist/ir/model.js +0 -1
  231. package/dist/ir/resolve-refs.js +2 -2
  232. package/dist/ir/resource-tree.js +2 -1
  233. package/dist/ir/route-tree-intern.js +1 -1
  234. package/dist/ir/schema.js +3 -3
  235. package/dist/ir/sdk-model.js +3 -3
  236. package/dist/ir/slots.js +13 -8
  237. package/dist/ir/streams.js +1 -1
  238. package/dist/release/bootstrap.d.ts +3 -3
  239. package/dist/release/bootstrap.js +7 -7
  240. package/dist/release/bump-args.js +4 -4
  241. package/dist/release/bump-command.d.ts +1 -1
  242. package/dist/release/bump-command.js +9 -10
  243. package/dist/release/bump.d.ts +5 -4
  244. package/dist/release/bump.js +2 -2
  245. package/dist/release/cli.d.ts +4 -4
  246. package/dist/release/cli.js +4 -4
  247. package/dist/release/codegen.js +1 -1
  248. package/dist/release/digest.js +5 -7
  249. package/dist/release/git.js +5 -8
  250. package/dist/release/load.js +3 -3
  251. package/dist/release/manifest.js +9 -10
  252. package/dist/release/oasdiff.d.ts +10 -15
  253. package/dist/release/oasdiff.js +5 -6
  254. package/dist/release/registries.d.ts +0 -11
  255. package/dist/release/registries.js +17 -17
  256. package/dist/release/release-state.d.ts +16 -13
  257. package/dist/release/release-workflow.js +5 -7
  258. package/dist/release/repo-settings.d.ts +2 -1
  259. package/dist/release/spec-gate.d.ts +0 -2
  260. package/dist/release/spec-gate.js +6 -10
  261. package/dist/release/sync-command.d.ts +2 -2
  262. package/dist/release/sync-command.js +1 -1
  263. package/dist/release/sync-tree.js +9 -13
  264. package/dist/release/sync.d.ts +6 -6
  265. package/dist/release/sync.js +12 -13
  266. package/dist/release/types.d.ts +22 -22
  267. package/dist/release/types.js +0 -1
  268. package/dist/release/version-files.d.ts +3 -4
  269. package/dist/release/version-files.js +4 -5
  270. package/dist/runtime/.oxfmtrc.jsonc +8 -0
  271. package/dist/runtime/mcp/files.ts +1 -1
  272. package/dist/runtime/mcp/http.ts +6 -2
  273. package/dist/runtime/mcp/listen.ts +1 -1
  274. package/dist/runtime/mcp/mount.ts +2 -2
  275. package/dist/runtime/mcp/protocol.ts +1 -1
  276. package/dist/runtime/ts-tanstack-query/query.ts +0 -2
  277. package/package.json +10 -7
  278. package/dist/emit/cli/index.d.ts +0 -1
  279. package/dist/emit/cli/index.js +0 -1
  280. package/dist/emit/csharp/index.d.ts +0 -1
  281. package/dist/emit/csharp/index.js +0 -1
  282. package/dist/emit/go/index.d.ts +0 -1
  283. package/dist/emit/go/index.js +0 -1
  284. package/dist/emit/java/index.d.ts +0 -2
  285. package/dist/emit/java/index.js +0 -2
  286. package/dist/emit/mcp/index.d.ts +0 -3
  287. package/dist/emit/mcp/index.js +0 -3
  288. package/dist/emit/python/index.d.ts +0 -1
  289. package/dist/emit/python/index.js +0 -1
  290. package/dist/emit/rust/index.d.ts +0 -1
  291. package/dist/emit/rust/index.js +0 -1
package/README.md CHANGED
@@ -1,26 +1,17 @@
1
+ <!-- @generated by @workerstack/repo -->
2
+
1
3
  # @workerstack/clients
2
4
 
3
- Generates SDKs (TypeScript, Go, Rust, Python, C#, Java), a Go command-line client and a Model Context Protocol
4
- server from an OpenAPI 3.x document, or straight from a
5
- [`@workerstack/backend`](https://www.npmjs.com/package/@workerstack/backend) app.
5
+ Generates SDKs (TypeScript, Go, Rust, Python, C#, Java), a CLI and an MCP server from any OpenAPI 3.x document.
6
6
 
7
- Every target reads one intermediate representation and vendors its own small runtime, so a generated SDK has no
8
- dependency on backend, and a spec from another framework generates just as well. The output is formatted and
9
- deterministic: regenerating an unchanged spec changes nothing on disk.
10
-
11
- This page is the whole generator — every target, every flag, and what each client looks like to call.
7
+ ## Contents
12
8
 
9
+ - [What it generates](#what-it-generates)
13
10
  - [Install](#install)
14
11
  - [Start](#start)
15
12
  - [clients generate](#clients-generate)
16
13
  - [Every flag](#every-flag)
17
14
  - [The six SDKs](#the-six-sdks)
18
- - [The TypeScript SDK](#the-typescript-sdk)
19
- - [The Go SDK](#the-go-sdk)
20
- - [The Rust SDK](#the-rust-sdk)
21
- - [The Python SDK](#the-python-sdk)
22
- - [The C# SDK](#the-c-sdk)
23
- - [The Java SDK](#the-java-sdk)
24
15
  - [Errors and the safe mirror](#errors-and-the-safe-mirror)
25
16
  - [The command-line client](#the-command-line-client)
26
17
  - [Install scripts](#install-scripts)
@@ -29,8 +20,21 @@ This page is the whole generator — every target, every flag, and what each cli
29
20
  - [Configuring generation](#configuring-generation)
30
21
  - [What a run writes](#what-a-run-writes)
31
22
  - [Documentation](#documentation)
23
+ - [Releasing a product's public packages](#releasing-a-products-public-packages)
24
+ - [Gates](#gates)
25
+ - [Red, fix, green](#red-fix-green)
32
26
  - [License](#license)
33
27
 
28
+ ## What it generates
29
+
30
+ Generates SDKs (TypeScript, Go, Rust, Python, C#, Java), a Go command-line client and a Model Context Protocol
31
+ server from an OpenAPI 3.x document, or straight from a
32
+ [`@workerstack/backend`](https://www.npmjs.com/package/@workerstack/backend) app.
33
+
34
+ Every target reads one intermediate representation and vendors its own small runtime, so a generated SDK has no
35
+ dependency on backend, and a spec from another framework generates just as well. The output is formatted and
36
+ deterministic: regenerating an unchanged spec changes nothing on disk.
37
+
34
38
  ## Install
35
39
 
36
40
  backend moved to the workerstack org in 1.0.0-rc.23, and [the migration note](https://github.com/workerstack/backend/blob/main/docs/migrating-from-honey.md)
@@ -694,6 +698,361 @@ This package also exports the app-side generators the backend CLI and Vite plugi
694
698
  - [SDK conformance](https://github.com/workerstack/clients/blob/main/docs/conformance.md) and
695
699
  [the framework itself](https://github.com/workerstack/backend#readme).
696
700
 
701
+ ## Releasing a product's public packages
702
+
703
+ `@workerstack/clients` releases a product's public packages from the private repo that generates them. One
704
+ `release.config.ts` lists the packages. `clients release bump` cuts each package's next version from what
705
+ changed. `clients release sync` mirrors each package into its own public repo and pushes the `v<version>` tag.
706
+ Each public repo's `release.yml` then publishes on that tag through OIDC, with no registry token stored anywhere.
707
+ Three reusable workflows in `workerstack/clients` run these steps in CI, so a consumer repo only writes short callers.
708
+
709
+ ### Contents
710
+
711
+ - [Consumer prerequisites](#consumer-prerequisites)
712
+ - [release.config.ts](#releaseconfigts)
713
+ - [New product checklist](#new-product-checklist)
714
+ - [The reusable workflows](#the-reusable-workflows)
715
+ - [CLI](#cli)
716
+ - [Versioning](#versioning)
717
+ - [Tags](#tags)
718
+ - [Deployed spec gate](#deployed-spec-gate)
719
+ - [Channels](#channels)
720
+ - [Secrets](#secrets)
721
+
722
+ ### Consumer prerequisites
723
+
724
+ - `@workerstack/clients` in the repo's dependencies. The `workflows-v1` workflows need 1.0.0-rc.25 or later, the first
725
+ version with `release codegen` and `release toolchains`. The workflows run the consumer's own installed copy and pin
726
+ none.
727
+ - `@workerstack/system` in the repo's dependencies, and a `system.config.ts` at the repo root that declares every name
728
+ the release config lists in `toolchains`, each at the version codegen needs:
729
+
730
+ ```ts
731
+ import { defineConfig } from "@workerstack/system"
732
+
733
+ export default defineConfig({ deps: { go: "1.27.2", rust: "1.99.1", uv: "0.13.1", ruff: "0.17.1" } })
734
+ ```
735
+
736
+ - `packageManager: "bun@<version>"` in the root `package.json` (the workflows read Bun's version from it) and a
737
+ committed `bun.lock` (they run `bun install --frozen-lockfile`, with the repo's scripts on).
738
+
739
+ ### release.config.ts
740
+
741
+ A product's config sits in its own directory. Each package's source dir is a sibling named after the package, and
742
+ every other non-hidden directory there is an error. A package's public repo is `github.com/<repo>`.
743
+
744
+ ```ts
745
+ import { defineRelease } from "@workerstack/clients/release"
746
+
747
+ export default defineRelease({
748
+ project: "<product>",
749
+ /* regenerates every package from the repo root; bump runs it, and it must honor RELEASE_VERSIONS */
750
+ codegen: ["bun", "scripts/codegen.ts"],
751
+ /* the system.config.ts deps codegen needs, installed in this order before it runs */
752
+ toolchains: ["go", "rust", "uv", "ruff"],
753
+ homepage: "https://<domain>",
754
+ metadata: { license: "MIT", authors: ["<Name> <oss@<domain>>"] },
755
+ packages: [
756
+ {
757
+ name: "cli",
758
+ repo: "<org>/cli",
759
+ description: "<one line: the repo's, every registry's, and the first CHANGELOG entry>",
760
+ topics: ["<product>", "cli"],
761
+ commitMessage: "chore: generate from openapi spec",
762
+ clients: {
763
+ target: "cli",
764
+ options: { binaryName: "<bin>", modulePath: "github.com/<org>/cli", repo: "<org>/cli" },
765
+ },
766
+ },
767
+ {
768
+ name: "sdk-typescript",
769
+ repo: "<org>/sdk-typescript",
770
+ description: "<one line>",
771
+ topics: ["<product>", "sdk"],
772
+ commitMessage: "chore: generate from openapi spec",
773
+ clients: { target: "ts" },
774
+ registries: [{ kind: "npm" }, { kind: "jsr" }],
775
+ },
776
+ ],
777
+ spec: {
778
+ committedPath: "api/openapi.public.json",
779
+ deployedUrl: "https://api.<domain>/openapi.json",
780
+ },
781
+ })
782
+ ```
783
+
784
+ | Field | Meaning |
785
+ | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
786
+ | `project` | The product's slug: each package's `<project>/<name>` key, and what codegen filters on |
787
+ | `codegen` | The argv that regenerates every package, run from the repo root. Bump runs it again with `RELEASE_VERSIONS` (JSON, package name to version) set |
788
+ | `toolchains` | Optional, none by default. The `system.config.ts` dep names codegen needs; the workflows install them in this order |
789
+ | `committer` | Optional. The identity sync commits as (`public-sync[bot]` by default); a GitHub App's bot address works |
790
+ | `homepage` | https. Every public repo's website and every registry's homepage |
791
+ | `metadata` | Optional. Package metadata every generated package carries (authors, license, keywords and the rest); a package's own `metadata` wins over it |
792
+ | `packages[].clients` | How clients generates the package: its target and that target's options. Absent for a hand-kept package (one that publishes the spec itself) |
793
+ | `packages[].registries` | Where the public repo's rendered `release.yml` publishes: `npm`, `jsr`, `pypi`, `crates`, `go`, `nuget`, `maven`, or `github` with `assets` |
794
+ | `packages[].branch` | The public repo's branch sync pushes to, `main` by default |
795
+ | `packages[].bootstrapExclude` | Globs the first push leaves out, so the next sync adds them as their own commit |
796
+ | `spec` | The committed spec codegen builds from (repo-relative), and the URL prod serves it at (the deployed spec gate) |
797
+
798
+ ### New product checklist
799
+
800
+ 1. Create or pick the GitHub org for the public repos, and an empty public repo `<org>/<package>` for each package.
801
+ Sync pushes their content; nobody commits there by hand.
802
+ 2. Register the account-backed channels the packages need. Every registry that supports it publishes through a
803
+ trusted publisher for repo `<org>/<package>`, workflow `release.yml`:
804
+ - JSR: create `@<scope>` and link the package to its repo.
805
+ - npm: npm adds a trusted publisher only to a package that exists, so publish it once by hand with a short-lived
806
+ granular token, add the trusted publisher, then revoke the token.
807
+ - PyPI: add a pending trusted publisher (it works before the first upload).
808
+ - crates.io: publish once with `cargo publish` and a short-lived token, then add the trusted publisher.
809
+ - NuGet: add a trusted-publishing policy for the repo and workflow, and set the repo variable `NUGET_USER` to the
810
+ nuget.org user that owns it.
811
+ - Maven Central has no OIDC: verify the namespace, generate a Portal user token, create a GPG key whose public half
812
+ is on `keys.openpgp.org`, and add the four `MAVEN_*` secrets to the SDK's repo (see [Secrets](#secrets)).
813
+ - Go: nothing to register; the workflow's `proxy.golang.org` fetch indexes the tag.
814
+ - A CLI's channels are clients `cli` options, each optional: a Homebrew tap repo, a Scoop bucket repo, a
815
+ `microsoft/winget-pkgs` fork, an AUR account with an SSH key. Each one's token goes in the CLI's repo.
816
+ 3. Create a GitHub App with `contents: write`, `workflows: write` (sync pushes each repo's `release.yml`) and
817
+ `administration: write` (sync sets each repo's description, homepage and topics), install it on the org's public repos, and store its ID and private key as two Actions secrets in the private repo.
818
+ 4. Write `release.config.ts` with a dir per package, add the prerequisites above, and check the config:
819
+ `clients release sync --config <path> --validate-only`. A CLI also needs a hand `README.md` and `LICENSE`;
820
+ clients writes its `.goreleaser.yaml` and `.github/workflows/release.yml`.
821
+ 5. Publishing needs no workflow edits: every public tree carries a `release.yml` (the CLI's from clients, the rest
822
+ rendered from `registries`). Before the first real tag, run a repo's `release.yml` by hand with `workflow_dispatch`
823
+ to see each registry accept it. A repo whose version is already live must get that tag pushed by hand before its
824
+ first `release.yml` lands, or sync tags and republishes it.
825
+ 6. First release: commit the spec (bump records the commit a release is cut from), run the bump caller (or
826
+ `clients release bump --config <path>` locally), and merge the release PR. Each package releases 1.0.0 with
827
+ its `description` as the entry. The next sync tags each package.
828
+ 7. Verify: each public repo's `release` run is green (`gh run list -R <org>/<package> -w release`), its GitHub release
829
+ has its assets, each registry serves the new version, and a CLI's tap, bucket, winget PR and AUR package show it.
830
+
831
+ ### The reusable workflows
832
+
833
+ A consumer calls each one from its own workflow, pinned to the `workflows-v1` tag. The caller owns the triggers,
834
+ the `concurrency` group and the permissions it grants. A reusable workflow's job never gets more than its caller
835
+ grants, and secrets pass only through the declared `secrets:`, never `secrets: inherit` across owners. Every job runs
836
+ the same set-up: checkout, Node 24 (the release config loads as TypeScript), Bun from `packageManager`,
837
+ `bun install --frozen-lockfile`, each `toolchains` name through `system install <name> --upgrade` at its
838
+ `system.config.ts` pin with those tools first on PATH, then `release codegen`.
839
+
840
+ Each workflow also takes `cli`, the command that runs clients, split on spaces. It defaults to
841
+ `bun x --no-install clients`, the bin a consumer's `@workerstack/clients` install links. A consumer leaves it
842
+ unset. This repo's own release fixture passes `node bin/clients.js`, because bun never links a root package's
843
+ own bin.
844
+
845
+ ```yaml
846
+ # .github/workflows/release-sync.yml
847
+ on:
848
+ push:
849
+ branches: [main]
850
+ paths: ["<product>-release/**", "api/**"]
851
+ schedule: [{ cron: "0 3 * * *" }]
852
+ workflow_dispatch:
853
+ inputs:
854
+ dry-run: { type: boolean, default: false }
855
+ only: { type: string, required: false }
856
+ concurrency: { group: release-sync, cancel-in-progress: false }
857
+ permissions: { contents: read }
858
+ jobs:
859
+ sync:
860
+ uses: workerstack/clients/.github/workflows/release-sync.yml@workflows-v1
861
+ with:
862
+ config: <product>-release/release.config.ts
863
+ app-owner: <org>
864
+ dry-run: ${{ inputs.dry-run == true }}
865
+ only: ${{ inputs.only }}
866
+ secrets:
867
+ app-id: ${{ secrets.RELEASE_APP_ID }}
868
+ app-private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
869
+ ```
870
+
871
+ | `release-sync.yml` | Meaning |
872
+ | --------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
873
+ | `config` | Required. The release config, repo-relative |
874
+ | `app-owner` | The App installation's owner (the public repos' org); blank means the caller repo's owner |
875
+ | `dry-run` | Stage each tree and report what would be pushed and tagged, pushing nothing |
876
+ | `only` | Comma-separated package names (`name` or `project/name`); blank means every package |
877
+ | `app-id`, `app-private-key` | Secrets, optional. Without both, the token step is skipped and only a dry run works (sync says `GH_TOKEN env is required`) |
878
+
879
+ ```yaml
880
+ # .github/workflows/release-bump.yml
881
+ on:
882
+ workflow_dispatch:
883
+ inputs:
884
+ major: { type: boolean, default: false }
885
+ permissions: { contents: write, pull-requests: write }
886
+ jobs:
887
+ bump:
888
+ uses: workerstack/clients/.github/workflows/release-bump.yml@workflows-v1
889
+ with:
890
+ config: <product>-release/release.config.ts
891
+ major: ${{ inputs.major == true }}
892
+ ```
893
+
894
+ `release-bump.yml` takes `config` (required) and `major` (release every changed package as a major). It also installs
895
+ `go` when `toolchains` does not list it, because bump runs oasdiff through `go run`. When a package changed, it opens
896
+ or updates the release PR on branch `auto/release-bump` with exactly the paths bump printed as `wrote:`. That PR is
897
+ opened with the caller's `GITHUB_TOKEN`, so it starts no workflows of its own: run the validate caller by hand, or
898
+ review the PR's diff.
899
+
900
+ ```yaml
901
+ # .github/workflows/release-validate.yml
902
+ on:
903
+ pull_request:
904
+ paths: ["<product>-release/**"]
905
+ permissions: { contents: read }
906
+ jobs:
907
+ validate:
908
+ uses: workerstack/clients/.github/workflows/release-validate.yml@workflows-v1
909
+ with:
910
+ config: <product>-release/release.config.ts
911
+ ```
912
+
913
+ `release-validate.yml` takes `config` and runs the set-up, codegen, then `release sync --validate-only`.
914
+
915
+ A dry run proves the whole path short of the push: the toolchains install, codegen runs, every package's tree is
916
+ staged against its public repo's current tip, its `release.yml` is rendered, and the report says which packages would
917
+ be pushed and which `v<version>` tags would be created. It leaves out the push, the tag and the repo settings step.
918
+
919
+ ### CLI
920
+
921
+ ```
922
+ clients release bump --config <path> [--major]
923
+ clients release sync --config <path> [--only <names>] [--dry-run] [--validate-only]
924
+ clients release bootstrap --config <path> (--all | --only <names>) [--force-bootstrap]
925
+ clients release codegen --config <path>
926
+ clients release toolchains --config <path>
927
+ ```
928
+
929
+ - `bump` regenerates, decides each package's release, gates generated output on prod, writes versions, regenerates at
930
+ them, and records the release. It prints one `bumped: <name> <version> <kind>` line per release and one
931
+ `wrote: <path>` line per file it touched.
932
+ - `sync` mirrors each package and pushes its tag. It needs `GH_TOKEN` unless `--dry-run` or `--validate-only` is set.
933
+ - `bootstrap` makes the first push to an empty public repo, or over the stub a new repo starts with.
934
+ - `codegen` runs the config's codegen from the repo root, as bump runs it.
935
+ - `toolchains` prints the config's `toolchains`, one per line.
936
+
937
+ ### Versioning
938
+
939
+ `bump` runs the product's codegen, then compares each package with what its `.release-state.json` recorded at the last
940
+ release. It compares the generated output (backend's `.clients-generated.json` map, or the spec itself for a hand-kept
941
+ package) and the tracked hand files (version lines normalized, the CHANGELOG and the state file left out). Nothing
942
+ moved means no release, even when the spec moved.
943
+
944
+ When the output changed on a moved spec, oasdiff compares the spec with the one the last release was cut from (read
945
+ back with `git show <commit>:<path>`). Any API change, breaking or not, is a minor. Output that changed with no API change,
946
+ and any hand-file change, is a patch. A package stays on its major line: a major comes only from `--major`, which makes each
947
+ package that releases a major.
948
+
949
+ A release writes the new version into every version file the package has (`package.json`, `jsr.json`,
950
+ `pyproject.toml`). It reruns codegen with `RELEASE_VERSIONS`, so version-baked output is regenerated at that version.
951
+ Only then does it record the digests, the spec's commit and the version in `.release-state.json`, so the merged release
952
+ PR finds nothing left to release. The spec must be committed first, because the state records HEAD. A refusal writes
953
+ nothing, so a rerun decides the same. Each public repo's `release.yml` checks the tag against its version files, so a
954
+ tag whose files disagree fails before anything publishes.
955
+
956
+ ### Tags
957
+
958
+ Sync tags; the private repo never does. After sync pushes a package, or finds the bot's tip already equal to the
959
+ source, it pushes `v<version>` from the package's `.release-state.json` unless that tag exists. It never moves a tag,
960
+ so a rerun, or a run after one that stopped between its commit and its tag, converges. A merged release PR therefore
961
+ releases every bumped package on the next sync. Never delete or move a pushed tag.
962
+
963
+ ### Deployed spec gate
964
+
965
+ Generated code may only describe operations prod serves. The gate fetches `spec.deployedUrl` and compares it with the
966
+ committed spec by canonical sha. Sync refuses a package whose changed paths include a file clients generated. Bump
967
+ refuses the whole run, hand-kept packages included, when a generated package whose output changed would release. On
968
+ drift both print both shas and the operations on either side. Deploy, then rerun the bump caller; sync reruns on its
969
+ schedule.
970
+
971
+ ### Channels
972
+
973
+ | Package kind | Channel | Published by |
974
+ | -------------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------- |
975
+ | CLI | GitHub Release: archives, `checksums.txt` signed by cosign, build attestations, `version.txt` | backend's `release.yml` in the CLI's repo |
976
+ | CLI | Homebrew cask, Scoop manifest, winget PR, AUR `<bin>-bin`, deb/rpm/apk assets (each optional) | the same, with its channel's secret |
977
+ | TypeScript SDK, MCP server | npm (provenance), JSR | the rendered `release.yml` |
978
+ | Go SDK | the Go proxy (`proxy.golang.org` fetch of the tag) | the rendered `release.yml` |
979
+ | Python SDK | PyPI (attestations) | the rendered `release.yml` |
980
+ | Rust SDK | crates.io | the rendered `release.yml` |
981
+ | C# SDK | NuGet | the rendered `release.yml` |
982
+ | Java SDK | Maven Central (GPG-signed bundle through the Central Portal) | the rendered `release.yml` |
983
+ | OpenAPI spec | GitHub Release with `openapi.json` | the rendered `release.yml` |
984
+
985
+ A rendered `release.yml` checks the tag against the version each registry publishes from, publishes, and retries until
986
+ the registry serves the version. A rejected or repeated upload fails the run; a rerun is `workflow_dispatch` with the
987
+ tag. Go modules at 2.0.0 and up carry `/v<major>` in their path, which codegen adds for the go and cli targets.
988
+
989
+ ### Secrets
990
+
991
+ | Secret | Where | Read by |
992
+ | -------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------- |
993
+ | the App's ID and private key | the private repo | the sync caller, passed as `app-id` and `app-private-key` |
994
+ | `HOMEBREW_TAP_TOKEN` | `<org>/cli` | goreleaser's cask push to the tap |
995
+ | `SCOOP_BUCKET_TOKEN` | `<org>/cli` | goreleaser's manifest push to the bucket |
996
+ | `WINGET_TOKEN` | `<org>/cli` | goreleaser's push to the winget-pkgs fork and its PR to `microsoft/winget-pkgs` |
997
+ | `AUR_SSH_KEY` | `<org>/cli` | goreleaser's push to `aur.archlinux.org/<bin>-bin.git` |
998
+ | none for npm, JSR, PyPI, crates.io, NuGet | | trusted publishers; NuGet's login also reads the repo variable `NUGET_USER` |
999
+ | `MAVEN_CENTRAL_USERNAME`, `MAVEN_CENTRAL_PASSWORD` | `<org>/sdk-java` | the Central Portal user token: uploads the bundle and polls until it is published |
1000
+ | `MAVEN_GPG_PRIVATE_KEY`, `MAVEN_GPG_PASSPHRASE` | `<org>/sdk-java` | signs every bundle file; the public key must be on a keyserver Central reads |
1001
+
1002
+ ## Gates
1003
+
1004
+ ### Script contract
1005
+
1006
+ This repo has these `package.json` scripts. Hooks and CI call only these names, so a tool change is one line in `package.json`.
1007
+
1008
+ | script | runs |
1009
+ | ---------------------------- | ----------------------------------------------------------------------------------------- |
1010
+ | `fmt` / `fmt:check` | `repo fmt`: oxfmt with the standards pack's generated `.oxfmtrc.jsonc` |
1011
+ | `lint` / `lint:fix` | `repo lint`: oxlint with the generated `.oxlintrc.jsonc`, the repo's own plugin in `lint/` |
1012
+ | `typecheck` | `tsc -p tsconfig.json`: src, tests and scripts |
1013
+ | `typecheck:src` | `tsc -p tsconfig.src.json`: the source under the strict preset |
1014
+ | `test` | the repo's suite |
1015
+
1016
+ The lint and format configs, `knip.jsonc` and the git hooks are written by `bun repo sync` from `repo.config.ts`. The
1017
+ repo's own lint rules are `lint.plugins` and `lint.rules` there; a rule that does not fit a file is a `lint.skip` entry
1018
+ with its reason, and a use knip cannot see is a `knip.ignore` entry with its reason.
1019
+
1020
+ ### Where each gate runs
1021
+
1022
+ | when | what | blocks |
1023
+ | ---------- | ---------------------------------------------------------------------------------------------------------------------------- | --------------------- |
1024
+ | pre-commit | `repo precommit`: fmt and `lint --fix` on the staged files (restaged), lint held to the baseline, typecheck, sync, the related tests, `repo check` | the commit |
1025
+ | commit-msg | `repo commit-msg`: Conventional Commits and the change-size rule | the commit |
1026
+ | pre-push | `repo link --pre-push`, then `repo commit-msg --pre-push` on each pushed commit | the push |
1027
+ | CI | on every push to `main`: the `commits` job (`repo commit-msg --range`), `fmt:check`, `repo check`, `typecheck`, `typecheck:src`, `test`, `test:harness` | new work, until fixed |
1028
+
1029
+ `bun repo sync` points `core.hooksPath` at `.githooks/`, so the hooks come with `bun install`.
1030
+
1031
+ ### Push and CI
1032
+
1033
+ No full suite runs locally. Each commit runs the tests its change reaches: the touched test files and the tests of the code it changed. Then push, and run `bun repo ci wait` in the background. It waits for CI's run on the pushed commit and names any failed job and its log. A push cancels the run before it, so batch the commits and push once.
1034
+
1035
+ ### Release
1036
+
1037
+ The version bump rides in the final push. Only a commit CI passed on `main` gets the `v*` tag. The release workflow runs no tests: it waits for that commit's `ci.yml` push run and publishes on its success, so a bump made after the green push is a new commit and costs another CI run. The tag's notes are the `## [Unreleased]` entry of `CHANGELOG.md` for a prerelease and the dated `## [x.y.z] - YYYY-MM-DD` entry for a final release; `scripts/changelog.ts` refuses a tag without them.
1038
+
1039
+ ### Browsers
1040
+
1041
+ - Chrome: `offscreen --hypr` adds a hidden virtual monitor to the running Hyprland; tests drive Chrome on it over CDP. It never takes focus. `exec` and `run` are refused in that mode.
1042
+ - Safari: the MacBook Air M3 over Tailscale (`ssh mac`, `safaridriver -p 4799`), one run at a time.
1043
+
1044
+ ## Red, fix, green
1045
+
1046
+ 1. Red: write the test that shows the bug or the missing behavior. Run it. It must fail, for the reason the test names. Record the failing output (BUGS.md for a bug, where the repo has one).
1047
+ 2. Fix: the smallest change that makes it pass.
1048
+ 3. Green: run it again and record the passing output. Then run the tests the change reaches, and leave the full gates to CI on the push.
1049
+
1050
+ A test that cannot fail proves nothing. Check it: revert or break the fix, and the test must go red.
1051
+
1052
+ Commits: the test and the fix may share a commit or come as `test(...)` then `fix(...)`. A `fix` or `feat` commit always contains a test change.
1053
+
1054
+ Lint rules follow the same loop. A mistake that a rule could catch mechanically ships with a rule: a RuleTester case that fails first, then the rule, in the repo's `lint/` plugin.
1055
+
697
1056
  ## License
698
1057
 
699
1058
  MIT
@@ -1,21 +1,19 @@
1
- import { defineConfig } from "@workerstack/clients/installers"
1
+ import { defineConfig } from "@workerstack/clients/installers";
2
2
 
3
- /*
4
- * GitHub Releases. Assets live at releases/download/<tag>/; each release also uploads:
5
- *
6
- * version.txt "v1.2.3", read through the releases/latest/download/ redirect
7
- * install.sh served from releases/latest/download/ too
8
- * install.ps1
9
- */
3
+ // GitHub Releases. Assets live at releases/download/<tag>/; each release also uploads:
4
+ //
5
+ // version.txt "v1.2.3", read through the releases/latest/download/ redirect
6
+ // install.sh served from releases/latest/download/ too
7
+ // install.ps1
10
8
  export default defineConfig({
11
- name: "my-cli",
12
- baseUrl: "https://github.com/acme/my-cli/releases",
13
- assetPath: ({ tag, version, os, arch }) =>
14
- `download/${tag}/my-cli_${version}_${os}_${arch}${os === "windows" ? ".zip" : ".tar.gz"}`,
15
- checksumsPath: ({ tag, version }) => `download/${tag}/my-cli_${version}_checksums.txt`,
16
- latestPath: "latest/download/version.txt",
17
- scriptUrls: {
18
- sh: "https://github.com/acme/my-cli/releases/latest/download/install.sh",
19
- ps1: "https://github.com/acme/my-cli/releases/latest/download/install.ps1",
20
- },
21
- })
9
+ assetPath: ({ tag, version, os, arch }) =>
10
+ `download/${tag}/my-cli_${version}_${os}_${arch}${os === "windows" ? ".zip" : ".tar.gz"}`,
11
+ baseUrl: "https://github.com/acme/my-cli/releases",
12
+ checksumsPath: ({ tag, version }) => `download/${tag}/my-cli_${version}_checksums.txt`,
13
+ latestPath: "latest/download/version.txt",
14
+ name: "my-cli",
15
+ scriptUrls: {
16
+ ps1: "https://github.com/acme/my-cli/releases/latest/download/install.ps1",
17
+ sh: "https://github.com/acme/my-cli/releases/latest/download/install.sh",
18
+ },
19
+ });
@@ -1,21 +1,19 @@
1
- import { defineConfig, type Arch, type Os } from "@workerstack/clients/installers"
1
+ import { defineConfig, type Arch, type Os } from "@workerstack/clients/installers";
2
2
 
3
- /*
4
- * GoReleaser's `goreleaser init` archive names, uploaded to your own host under the tag:
5
- *
6
- * v1.2.3/my-cli_Linux_x86_64.tar.gz
7
- * v1.2.3/my-cli_Windows_arm64.zip
8
- * v1.2.3/my-cli_1.2.3_checksums.txt
9
- * latest "v1.2.3"
10
- */
11
- const osName: Record<Os, string> = { linux: "Linux", darwin: "Darwin", windows: "Windows" }
12
- const archName: Record<Arch, string> = { amd64: "x86_64", arm64: "arm64" }
3
+ // GoReleaser's `goreleaser init` archive names, uploaded to your own host under the tag:
4
+ //
5
+ // v1.2.3/my-cli_Linux_x86_64.tar.gz
6
+ // v1.2.3/my-cli_Windows_arm64.zip
7
+ // v1.2.3/my-cli_1.2.3_checksums.txt
8
+ // latest "v1.2.3"
9
+ const osName: Record<Os, string> = { darwin: "Darwin", linux: "Linux", windows: "Windows" };
10
+ const archName: Record<Arch, string> = { amd64: "x86_64", arm64: "arm64" };
13
11
 
14
12
  export default defineConfig({
15
- name: "my-cli",
16
- baseUrl: "https://dl.example.com/my-cli",
17
- assetPath: ({ tag, os, arch }) =>
18
- `${tag}/my-cli_${osName[os]}_${archName[arch]}${os === "windows" ? ".zip" : ".tar.gz"}`,
19
- checksumsPath: ({ tag, version }) => `${tag}/my-cli_${version}_checksums.txt`,
20
- message: "Run `my-cli --help` to get started.",
21
- })
13
+ assetPath: ({ tag, os, arch }) =>
14
+ `${tag}/my-cli_${osName[os]}_${archName[arch]}${os === "windows" ? ".zip" : ".tar.gz"}`,
15
+ baseUrl: "https://dl.example.com/my-cli",
16
+ checksumsPath: ({ tag, version }) => `${tag}/my-cli_${version}_checksums.txt`,
17
+ message: "Run `my-cli --help` to get started.",
18
+ name: "my-cli",
19
+ });
@@ -1,17 +1,15 @@
1
- import { defineConfig } from "@workerstack/clients/installers"
1
+ import { defineConfig } from "@workerstack/clients/installers";
2
2
 
3
- /*
4
- * Raw binaries on your own host:
5
- *
6
- * 1.2.3/my-cli-linux-amd64
7
- * 1.2.3/my-cli-windows-amd64.exe
8
- * 1.2.3/checksums.txt sha256sum output for every binary
9
- * latest "1.2.3"
10
- */
3
+ // Raw binaries on your own host:
4
+ //
5
+ // 1.2.3/my-cli-linux-amd64
6
+ // 1.2.3/my-cli-windows-amd64.exe
7
+ // 1.2.3/checksums.txt sha256sum output for every binary
8
+ // latest "1.2.3"
11
9
  export default defineConfig({
12
- name: "my-cli",
13
- baseUrl: "https://dl.example.com/my-cli",
14
- assetPath: ({ version, os, arch }) => `${version}/my-cli-${os}-${arch}${os === "windows" ? ".exe" : ""}`,
15
- checksumsPath: ({ version }) => `${version}/checksums.txt`,
16
- tagPrefix: "",
17
- })
10
+ assetPath: ({ version, os, arch }) => `${version}/my-cli-${os}-${arch}${os === "windows" ? ".exe" : ""}`,
11
+ baseUrl: "https://dl.example.com/my-cli",
12
+ checksumsPath: ({ version }) => `${version}/checksums.txt`,
13
+ name: "my-cli",
14
+ tagPrefix: "",
15
+ });