@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
@@ -1,20 +1,15 @@
1
- import * as z from "zod";
2
- /** The oasdiff module `go run` builds and caches: the breaking-change rules a bump's level comes from. */
3
- export declare const OASDIFF = "github.com/oasdiff/oasdiff@v1.35.0";
4
- /** One oasdiff changelog entry: level 1 INFO, 2 WARN, 3 ERR (breaking). */
5
- declare function apiChangeSchema(): z.ZodObject<{
6
- id: z.ZodString;
7
- level: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
8
- operation: z.ZodOptional<z.ZodString>;
9
- operationId: z.ZodOptional<z.ZodString>;
10
- path: z.ZodOptional<z.ZodString>;
11
- text: z.ZodString;
12
- }, z.core.$strip>;
13
- /** One change oasdiff reports between two specs. */
14
- export type ApiChange = z.infer<ReturnType<typeof apiChangeSchema>>;
1
+ import { OASDIFF_LEVEL } from "./constants.ts";
2
+ /** One change oasdiff reports between two specs: level 1 INFO, 2 WARN, 3 ERR (breaking). */
3
+ export type ApiChange = {
4
+ readonly id: string;
5
+ readonly level: (typeof OASDIFF_LEVEL)[keyof typeof OASDIFF_LEVEL];
6
+ readonly operation?: string | undefined;
7
+ readonly operationId?: string | undefined;
8
+ readonly path?: string | undefined;
9
+ readonly text: string;
10
+ };
15
11
  /**
16
12
  * Every change oasdiff finds from `baseFile` to `revisionFile`, run through `go run` in `env` (the Go on its PATH, its
17
13
  * GOTOOLCHAIN honored); throws with oasdiff's stderr when it fails, and says so when Go cannot start.
18
14
  */
19
15
  export declare function apiChanges(baseFile: string, revisionFile: string, env?: NodeJS.ProcessEnv): readonly ApiChange[];
20
- export {};
@@ -2,8 +2,8 @@ import { spawnSync } from "node:child_process";
2
2
  import * as z from "zod";
3
3
  import { MAX_OUTPUT_BYTES, OASDIFF_LEVEL } from "./constants.js";
4
4
  /** The oasdiff module `go run` builds and caches: the breaking-change rules a bump's level comes from. */
5
- export const OASDIFF = "github.com/oasdiff/oasdiff@v1.35.0";
6
- /** One oasdiff changelog entry: level 1 INFO, 2 WARN, 3 ERR (breaking). */
5
+ const OASDIFF = "github.com/oasdiff/oasdiff@v1.35.0";
6
+ /** One oasdiff changelog entry. */
7
7
  function apiChangeSchema() {
8
8
  return z.object({
9
9
  id: z.string(),
@@ -14,7 +14,7 @@ function apiChangeSchema() {
14
14
  text: z.string(),
15
15
  });
16
16
  }
17
- /* the Go on the caller's PATH, in its environment: a test hands in go-env's, whose GOTOOLCHAIN pins it */
17
+ // the Go on the caller's PATH, in its environment: a test hands in go-env's, whose GOTOOLCHAIN pins it
18
18
  const GO_BINARY = "go";
19
19
  /**
20
20
  * Every change oasdiff finds from `baseFile` to `revisionFile`, run through `go run` in `env` (the Go on its PATH, its
@@ -28,9 +28,8 @@ export function apiChanges(baseFile, revisionFile, env = process.env) {
28
28
  });
29
29
  if (result.error)
30
30
  throw new Error(`oasdiff could not start (it runs through Go on PATH): ${result.error.message}`);
31
- if (result.status !== 0) {
31
+ if (result.status !== 0)
32
32
  throw new Error(`oasdiff failed (${result.status}): ${result.stderr.trim()}`);
33
- }
34
- /* `[]` when the specs do not differ */
33
+ // `[]` when the specs do not differ
35
34
  return z.array(apiChangeSchema()).parse(JSON.parse(result.stdout));
36
35
  }
@@ -15,17 +15,6 @@ export declare const ACTIONS: {
15
15
  readonly setupNode: "actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0";
16
16
  readonly setupPython: "actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0";
17
17
  };
18
- export declare const TOOLS: {
19
- readonly build: "1.6.1";
20
- readonly dotnet: "10.0.403";
21
- readonly gradle: "9.8.2";
22
- readonly java: "21";
23
- readonly jsr: "0.14.3";
24
- readonly node: "24";
25
- readonly npm: "12.2.1";
26
- readonly python: "3.12";
27
- readonly rust: "1.99.0";
28
- };
29
18
  /** How one registry kind names the package, reads its version, publishes, and shows it is live. */
30
19
  export type Kind = {
31
20
  /** The package's own file the registry publishes the version of. */
@@ -1,4 +1,4 @@
1
- /* Actions the workflow runs, pinned to a commit. */
1
+ // Actions the workflow runs, pinned to a commit.
2
2
  export const ACTIONS = {
3
3
  checkout: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1",
4
4
  cratesAuth: "rust-lang/crates-io-auth-action@3268eb413133e2960fa4ae0e963ca76380c54cd9 # v1.0.6",
@@ -11,8 +11,8 @@ export const ACTIONS = {
11
11
  setupNode: "actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0",
12
12
  setupPython: "actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0",
13
13
  };
14
- /* npm publishes over OIDC from 11.5.1 on. */
15
- export const TOOLS = {
14
+ // npm publishes over OIDC from 11.5.1 on.
15
+ const TOOLS = {
16
16
  build: "1.6.1",
17
17
  dotnet: "10.0.403",
18
18
  gradle: "9.8.2",
@@ -23,15 +23,15 @@ export const TOOLS = {
23
23
  python: "3.12",
24
24
  rust: "1.99.0",
25
25
  };
26
- /* The record clients keeps in every package it generates: the package's name and version on each registry. */
26
+ // The record clients keeps in every package it generates: the package's name and version on each registry.
27
27
  const IDENTITY = ".clients-generated.json";
28
- /* `field` of the package clients recorded for `registry`, or a failed step when it recorded none. */
28
+ // `field` of the package clients recorded for `registry`, or a failed step when it recorded none.
29
29
  const identity = (registry, field) => `jq -er '.packages[] | select(.registry == "${registry}") | .${field}' ${IDENTITY}`;
30
- /* A `key = '…'` line of a Gradle build script. */
30
+ // A `key = '…'` line of a Gradle build script.
31
31
  const gradleField = (key, file) => `sed -n "s/^${key} = '\\(.*\\)'$/\\1/p" ${file}`;
32
- /* Maven Central's Portal, which takes a signed bundle and reports the deployment's state. */
32
+ // Maven Central's Portal, which takes a signed bundle and reports the deployment's state.
33
33
  const CENTRAL_PORTAL = "https://central.sonatype.com";
34
- /* repo1 serves a deployment up to 30 minutes after the Portal reports it PUBLISHED. */
34
+ // repo1 serves a deployment up to 30 minutes after the Portal reports it PUBLISHED.
35
35
  const MAVEN_LIVE_TRIES = 180;
36
36
  const PORTAL_AUTH = `TOKEN="$(printf '%s:%s' "$MAVEN_CENTRAL_USERNAME" "$MAVEN_CENTRAL_PASSWORD" | base64 -w0)"`;
37
37
  const PORTAL_SECRETS = ` MAVEN_CENTRAL_USERNAME: \${{ secrets.MAVEN_CENTRAL_USERNAME }}
@@ -106,8 +106,8 @@ function crates() {
106
106
  version: identity("crates.io", "version"),
107
107
  };
108
108
  }
109
- /* NuGet's trusted publishing trades the job's OIDC token for a short-lived key; the policy belongs to a
110
- * nuget.org user, which the repository variable NUGET_USER names */
109
+ // NuGet's trusted publishing trades the job's OIDC token for a short-lived key; the policy belongs to a
110
+ // nuget.org user, which the repository variable NUGET_USER names
111
111
  function nuget() {
112
112
  return {
113
113
  file: IDENTITY,
@@ -136,7 +136,7 @@ function nuget() {
136
136
  version: identity("nuget", "version"),
137
137
  };
138
138
  }
139
- /* the signed bundle: the Maven layout of every file with its GPG signature, md5 and sha1 */
139
+ // the signed bundle: the Maven layout of every file with its GPG signature, md5 and sha1
140
140
  function mavenBundle() {
141
141
  return ` - uses: ${ACTIONS.setupJava}
142
142
  with:
@@ -168,7 +168,7 @@ function mavenBundle() {
168
168
  zip -qr "$RUNNER_TEMP/bundle.zip" "$REL"
169
169
  `;
170
170
  }
171
- /* the bundle uploaded to the Portal, then waited on until the Portal publishes it */
171
+ // the bundle uploaded to the Portal, then waited on until the Portal publishes it
172
172
  function mavenPortal() {
173
173
  return ` - name: Maven Central upload
174
174
  env:
@@ -196,8 +196,8 @@ ${PORTAL_SECRETS} run: |
196
196
  exit 1
197
197
  `;
198
198
  }
199
- /* Maven Central takes no OIDC: a Portal token uploads a bundle, the Maven layout of every file with its
200
- * GPG signature, md5 and sha1, and the Portal validates and publishes it */
199
+ // Maven Central takes no OIDC: a Portal token uploads a bundle, the Maven layout of every file with its
200
+ // GPG signature, md5 and sha1, and the Portal validates and publishes it
201
201
  function maven() {
202
202
  return {
203
203
  file: IDENTITY,
@@ -209,7 +209,7 @@ function maven() {
209
209
  version: identity("maven-central", "version"),
210
210
  };
211
211
  }
212
- /* the proxy fetches a module version the first time it is asked for it, so the live check publishes it */
212
+ // the proxy fetches a module version the first time it is asked for it, so the live check publishes it
213
213
  function goProxy() {
214
214
  return {
215
215
  file: IDENTITY,
@@ -220,7 +220,7 @@ function goProxy() {
220
220
  version: identity("go", "version"),
221
221
  };
222
222
  }
223
- /* gh in Actions runs only with a token in GH_TOKEN */
223
+ // gh in Actions runs only with a token in GH_TOKEN
224
224
  const GH_TOKEN_ENV = ` env:
225
225
  GH_TOKEN: \${{ github.token }}
226
226
  `;
@@ -238,7 +238,7 @@ ${GH_TOKEN_ENV} run: gh release create "$TAG" ${assets} --verify-tag --ti
238
238
  version: "jq -r .version .release-state.json",
239
239
  };
240
240
  }
241
- /* every kind but a GitHub release, which reads its assets from the registry entry */
241
+ // every kind but a GitHub release, which reads its assets from the registry entry
242
242
  const KINDS = { crates, go: goProxy, jsr, maven, npm, nuget, pypi };
243
243
  /** The steps the release workflow runs for `registry`. */
244
244
  export function kind(registry) {
@@ -1,15 +1,18 @@
1
1
  import * as z from "zod";
2
- /** The schema of `.release-state.json`: what a package's last release was cut from. */
3
- export declare function releaseStateSchema(): z.ZodObject<{
4
- hand: z.ZodString;
5
- output: z.ZodString;
6
- publishedAt: z.ZodString;
7
- spec: z.ZodObject<{
8
- commit: z.ZodString;
9
- path: z.ZodString;
10
- sha: z.ZodString;
11
- }, z.core.$strip>;
12
- version: z.ZodString;
13
- }, z.core.$strip>;
14
2
  /** Parsed and validated release state. */
15
- export type ReleaseState = z.infer<ReturnType<typeof releaseStateSchema>>;
3
+ export type ReleaseState = {
4
+ /** sha256 over the package's tracked hand files at release, version lines normalized (`digest.ts`) */
5
+ readonly hand: string;
6
+ /** sha256 over the package's generated output at release, or its product's spec sha for a hand-kept package */
7
+ readonly output: string;
8
+ readonly publishedAt: string;
9
+ /** the committed spec the release was generated from, readable again with `git show {commit}:{path}` */
10
+ readonly spec: {
11
+ readonly commit: string;
12
+ readonly path: string;
13
+ readonly sha: string;
14
+ };
15
+ readonly version: string;
16
+ };
17
+ /** The schema of `.release-state.json`: what a package's last release was cut from. */
18
+ export declare function releaseStateSchema(): z.ZodType<ReleaseState>;
@@ -1,13 +1,11 @@
1
1
  import { ACTIONS, kind } from "./registries.js";
2
- /*
3
- * The `release.yml` a public repo publishes itself with, rendered from its package's `registries`. Sync writes
4
- * it into the public tree and pushes `v<version>` beside it; the workflow then publishes that tag to every
5
- * registry through OIDC (no token secret), fails on any rejection, and waits until each registry serves it.
6
- */
2
+ // The `release.yml` a public repo publishes itself with, rendered from its package's `registries`. Sync writes
3
+ // it into the public tree and pushes `v<version>` beside it; the workflow then publishes that tag to every
4
+ // registry through OIDC (no token secret), fails on any rejection, and waits until each registry serves it.
7
5
  /** Where the rendered workflow sits in a public repo. */
8
6
  export const RELEASE_WORKFLOW = ".github/workflows/release.yml";
9
- /* Every registry is retried 10 s apart, 60 times unless its kind says more; LIVE_CHECK_TRIES lets a local run of
10
- * the step give up sooner. */
7
+ // Every registry is retried 10 s apart, 60 times unless its kind says more; LIVE_CHECK_TRIES lets a local run of
8
+ // the step give up sooner.
11
9
  const DEFAULT_LIVE_TRIES = 60;
12
10
  const liveStep = (registry, k) => ` - name: ${registry.kind} serves the version
13
11
  ${k.liveEnv ?? ""} run: |
@@ -1,5 +1,5 @@
1
1
  import type { PublicPackage } from "./types.ts";
2
- export type RepoSetting = "description" | "homepage" | "topics";
2
+ type RepoSetting = "description" | "homepage" | "topics";
3
3
  export type RepoSettingsResult = {
4
4
  changed: RepoSetting[];
5
5
  status: "checked";
@@ -20,3 +20,4 @@ export declare function repoSettingsSyncer(io: {
20
20
  fetch: Fetch;
21
21
  token: string;
22
22
  }): RepoSettingsSync;
23
+ export {};
@@ -12,8 +12,6 @@ export type SpecGate = {
12
12
  readonly status: "match";
13
13
  readonly sha: string;
14
14
  } | SpecDrift;
15
- /** The value with every object's keys sorted, so equal specs serialize equally. */
16
- export declare function canonicalize(value: unknown): unknown;
17
15
  /** sha256 of the spec's canonical JSON. */
18
16
  export declare function canonicalSha(spec: unknown): string;
19
17
  /** Fetches the deployed spec and compares it with the committed one; throws naming the URL when prod does not answer. */
@@ -2,22 +2,19 @@ import { createHash } from "node:crypto";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { join } from "node:path";
4
4
  import { MANIFEST } from "../gen/write.js";
5
- /*
6
- * Generated code must only describe operations prod serves. Sync, bump and release compare the deployed public
7
- * spec with the committed one before they let changed generated output out.
8
- */
5
+ // Generated code must only describe operations prod serves. Sync, bump and release compare the deployed public
6
+ // spec with the committed one before they let changed generated output out.
9
7
  const METHODS = ["get", "put", "post", "delete", "options", "head", "patch", "trace"];
10
8
  const FETCH_TIMEOUT_MS = 30_000;
11
9
  /** The value with every object's keys sorted, so equal specs serialize equally. */
12
- export function canonicalize(value) {
10
+ function canonicalize(value) {
13
11
  if (value === null || typeof value !== "object")
14
12
  return value;
15
13
  if (Array.isArray(value))
16
14
  return value.map(canonicalize);
17
15
  const sorted = {};
18
- for (const key of Object.keys(value).sort()) {
16
+ for (const key of Object.keys(value).sort())
19
17
  sorted[key] = canonicalize(value[key]);
20
- }
21
18
  return sorted;
22
19
  }
23
20
  /** sha256 of the spec's canonical JSON. */
@@ -29,11 +26,10 @@ export function canonicalSha(spec) {
29
26
  function operations(spec) {
30
27
  const paths = spec.paths ?? {};
31
28
  const out = new Set();
32
- for (const [path, item] of Object.entries(paths)) {
29
+ for (const [path, item] of Object.entries(paths))
33
30
  for (const method of METHODS)
34
31
  if (item[method] !== undefined)
35
32
  out.add(`${method.toUpperCase()} ${path}`);
36
- }
37
33
  return out;
38
34
  }
39
35
  const minus = (a, b) => [...a].filter((x) => !b.has(x)).sort();
@@ -65,7 +61,7 @@ export async function checkDeployedSpec(source, fetchImpl = fetch) {
65
61
  status: "drift",
66
62
  };
67
63
  }
68
- /* each operation on a line of its own, or a line saying there is none */
64
+ // each operation on a line of its own, or a line saying there is none
69
65
  const list = (ops) => (ops.length === 0 ? " (none)" : ops.map((o) => ` ${o}`).join("\n"));
70
66
  /** Why `packageName` was refused, and what unblocks it. */
71
67
  export function describeDrift(packageName, gate) {
@@ -3,7 +3,7 @@ import { type PackageResult } from "./sync.ts";
3
3
  /** What `release sync --help` prints. */
4
4
  export declare const HELP = "Usage: clients release sync --config <path> [options]\n\nOptions:\n --config <path> The release config (required)\n --only <names> Comma-separated package filter. Accepts short \"name\" (if unique) or \"project/name\"\n --dry-run Log push commands without executing them\n --validate-only Validate the release config and exit 0/1\n --help Show this message\n\nEnv:\n GH_TOKEN GitHub token (required unless --validate-only or --dry-run)\n";
5
5
  /** What `release sync` was asked for. */
6
- export interface CliOptions {
6
+ export type CliOptions = {
7
7
  /** The release config's path; required unless `--help`. */
8
8
  config: string | undefined;
9
9
  /** Report what would be pushed and push nothing. */
@@ -14,7 +14,7 @@ export interface CliOptions {
14
14
  only: string[] | undefined;
15
15
  /** Only load and check the release config. */
16
16
  validateOnly: boolean;
17
- }
17
+ };
18
18
  /** A parse that succeeded with `options`, or failed with an `error` to show the caller. */
19
19
  export type ParsedArgs = {
20
20
  error: string;
@@ -18,7 +18,7 @@ Options:
18
18
  Env:
19
19
  GH_TOKEN GitHub token (required unless --validate-only or --dry-run)
20
20
  `;
21
- /* Unknown arguments are ignored. */
21
+ // Unknown arguments are ignored.
22
22
  const SWITCHES = {
23
23
  "--dry-run": "dryRun",
24
24
  "--help": "help",
@@ -17,26 +17,23 @@ export async function prepareWorktree(worktree, httpsUrl, { branch, committer },
17
17
  await gitRun(["-C", worktree, "fetch", "--depth=1", "origin", branch], worktree);
18
18
  await gitRun(["-C", worktree, "reset", "--hard", "FETCH_HEAD"], worktree);
19
19
  const tracked = await gitOutput(["-C", worktree, "ls-files"], worktree);
20
- if (tracked) {
20
+ if (tracked)
21
21
  await gitRun(["-C", worktree, "rm", "-rf", "--quiet", "."], worktree);
22
- }
23
22
  }
24
23
  }
25
24
  export async function replaceTreeWithSource(args) {
26
25
  const sourceFull = join(args.repoRoot, args.sourcePath);
27
26
  await runRsync(`${sourceFull}/`, `${args.worktree}/`, args.excludes);
28
- /* the sidecar message file is the source's note to sync; it never lands in the public repo */
27
+ // the sidecar message file is the source's note to sync; it never lands in the public repo
29
28
  const sidecarPath = join(args.worktree, SIDECAR_FILE);
30
- if (existsSync(sidecarPath)) {
29
+ if (existsSync(sidecarPath))
31
30
  unlinkSync(sidecarPath);
32
- }
33
31
  }
34
32
  async function runRsync(src, dst, excludes) {
35
- /* clients' manifest is the source repo's record of what it generated, not part of the package */
33
+ // clients' manifest is the source repo's record of what it generated, not part of the package
36
34
  const args = ["-a", "--delete", "--exclude=.git", `--exclude=${MANIFEST}`];
37
- for (const glob of excludes) {
35
+ for (const glob of excludes)
38
36
  args.push(`--exclude=${glob}`);
39
- }
40
37
  args.push(src, dst);
41
38
  await new Promise((resolve, reject) => {
42
39
  const child = spawn("rsync", args, { stdio: ["ignore", "ignore", "pipe"] });
@@ -71,14 +68,14 @@ export async function pendingTag(entry, repoRoot, worktree, httpsUrl) {
71
68
  const existing = await gitOutput(["ls-remote", "--tags", httpsUrl, `refs/tags/${tag}`], worktree);
72
69
  return existing === "" ? tag : undefined;
73
70
  }
74
- /* No force: a tag someone pushed in between makes this fail rather than move theirs. */
71
+ // No force: a tag someone pushed in between makes this fail rather than move theirs.
75
72
  export async function pushTag(worktree, httpsUrl, tag) {
76
73
  await gitRun(["-C", worktree, "tag", tag, "HEAD"], worktree);
77
74
  await gitRun(["-C", worktree, "push", httpsUrl, `refs/tags/${tag}`], worktree);
78
75
  }
79
76
  export async function isTreeUnchanged(worktree) {
80
- /* -Af forces past the package's own .gitignore: a generated SDK may ship one that keeps its generated source out
81
- of the source repo's git, and that filter must not apply here, where those files are what is published */
77
+ // -Af forces past the package's own .gitignore: a generated SDK may ship one that keeps its generated source out
78
+ // of the source repo's git, and that filter must not apply here, where those files are what is published
82
79
  await gitRun(["-C", worktree, "add", "-Af"], worktree);
83
80
  const diffCode = await gitExitCode(["-C", worktree, "diff", "--cached", "--quiet"], worktree);
84
81
  return diffCode === 0;
@@ -92,9 +89,8 @@ export function readSidecar(repoRoot, sourcePath) {
92
89
  }
93
90
  export function buildCommitMessage(args) {
94
91
  const stamp = formatUtcStamp(new Date());
95
- if (args.sidecarMessage) {
92
+ if (args.sidecarMessage)
96
93
  return `${args.sidecarMessage} [${stamp}]`;
97
- }
98
94
  if (args.isInitial) {
99
95
  const initial = args.initialMessage ?? "chore: initial release";
100
96
  return `${initial} [${stamp}]`;
@@ -1,8 +1,8 @@
1
- import type { PublicPackage, SpecSource } from "./types.ts";
2
1
  import type { RepoSettingsSync } from "./repo-settings.ts";
3
2
  import { type SpecGate } from "./spec-gate.ts";
3
+ import type { PublicPackage, SpecSource } from "./types.ts";
4
4
  /** How one sync run behaves: the repo it reads, what it may push, and the steps it is handed. */
5
- export interface SyncOptions {
5
+ export type SyncOptions = {
6
6
  /** When true, use entry.bootstrapExclude globs as rsync excludes. Caller opts-in per run. */
7
7
  applyBootstrapExclude?: boolean;
8
8
  /** Report what would be pushed and push nothing. */
@@ -10,7 +10,7 @@ export interface SyncOptions {
10
10
  /** The message of the first commit to an empty public repo; `chore: initial release` by default. */
11
11
  initialMessage?: string;
12
12
  /** Package names (`name` or `project/name`) to sync; every package when absent or empty. */
13
- only?: string[];
13
+ only?: string[] | undefined;
14
14
  /** Push over a tip the sync bot did not commit. Bootstrap only: it has already judged the repo. */
15
15
  overwriteForeignTip?: boolean;
16
16
  /** The git toplevel every package path is relative to. */
@@ -21,9 +21,9 @@ export interface SyncOptions {
21
21
  specGate: (spec: SpecSource) => Promise<SpecGate>;
22
22
  /** The GitHub token every push and API call authenticates with. */
23
23
  token: string;
24
- }
24
+ };
25
25
  /** What syncing one package did: pushed, skipped as unchanged, or failed, and why. */
26
- export interface PackageResult {
26
+ export type PackageResult = {
27
27
  mirrorSha?: string;
28
28
  name: string;
29
29
  reason?: string;
@@ -33,7 +33,7 @@ export interface PackageResult {
33
33
  status: "failed" | "skipped" | "synced";
34
34
  /** The release tag pushed (or, on a dry run, that would be) at the public commit equal to the source. */
35
35
  tag?: string;
36
- }
36
+ };
37
37
  /**
38
38
  * Mirrors one package into its public repo: a snapshot commit when its tree changed (generated output only when prod
39
39
  * serves the committed spec), the release tag its state records, and its repo settings. Refuses a public tip another
@@ -17,8 +17,8 @@ function describeSettings(result, dryRun) {
17
17
  return "settings in step";
18
18
  return `settings ${dryRun ? "would change" : "changed"}: ${result.changed.join(", ")}`;
19
19
  }
20
- /* Applies the repo settings after the tree step, whatever it did: a failure there fails the package but keeps
21
- * what already landed (the pushed commit and tag) in the result. */
20
+ // Applies the repo settings after the tree step, whatever it did: a failure there fails the package but keeps
21
+ // what already landed (the pushed commit and tag) in the result.
22
22
  async function withSettings(entry, options, result) {
23
23
  try {
24
24
  return {
@@ -36,8 +36,8 @@ async function withSettings(entry, options, result) {
36
36
  }
37
37
  }
38
38
  const tagged = (tag) => (tag === undefined ? {} : { tag });
39
- /* Only the bot commits to a public repo. Any other committer is a hand edit there that a snapshot would silently
40
- erase: its reason, or undefined when the tip is the bot's, there is none, or bootstrap judged it already. */
39
+ // Only the bot commits to a public repo. Any other committer is a hand edit there that a snapshot would silently
40
+ // erase: its reason, or undefined when the tip is the bot's, there is none, or bootstrap judged it already.
41
41
  async function foreignTip({ entry, options, remoteTip, worktree }) {
42
42
  if (!remoteTip || options.overwriteForeignTip)
43
43
  return undefined;
@@ -46,8 +46,8 @@ async function foreignTip({ entry, options, remoteTip, worktree }) {
46
46
  return undefined;
47
47
  return `external push detected on mirror; reconcile manually (tip=${remoteTip}, committer=${committer})`;
48
48
  }
49
- /* The source's tree over the public tip, with the release workflow its registries render (a package that ships its
50
- own lists none): why it cannot be, or undefined. */
49
+ // The source's tree over the public tip, with the release workflow its registries render (a package that ships its
50
+ // own lists none): why it cannot be, or undefined.
51
51
  async function stageTree({ entry, options, worktree }) {
52
52
  await replaceTreeWithSource({
53
53
  excludes: options.applyBootstrapExclude && entry.bootstrapExclude ? [...entry.bootstrapExclude] : [],
@@ -58,14 +58,13 @@ async function stageTree({ entry, options, worktree }) {
58
58
  if (entry.registries.length === 0)
59
59
  return undefined;
60
60
  const workflow = join(worktree, RELEASE_WORKFLOW);
61
- if (existsSync(workflow)) {
61
+ if (existsSync(workflow))
62
62
  return `${join(entry.path, RELEASE_WORKFLOW)} exists and the package lists registries: drop one, the other writes it`;
63
- }
64
63
  mkdirSync(dirname(workflow), { recursive: true });
65
64
  writeFileSync(workflow, releaseWorkflow(entry.registries));
66
65
  return undefined;
67
66
  }
68
- /* Generated output prod does not serve must not ship; hand files go out regardless: the refusal, or undefined. */
67
+ // Generated output prod does not serve must not ship; hand files go out regardless: the refusal, or undefined.
69
68
  async function drift({ entry, key, options, worktree }) {
70
69
  const generated = generatedPaths(join(options.repoRoot, entry.path));
71
70
  const changed = (await gitOutput(["-C", worktree, "diff", "--cached", "--name-only"], worktree)).split("\n");
@@ -74,7 +73,7 @@ async function drift({ entry, key, options, worktree }) {
74
73
  const gate = await options.specGate(entry.spec);
75
74
  return gate.status === "drift" ? describeDrift(key, gate) : undefined;
76
75
  }
77
- /* the tip is the bot's and equals the source, so a tag a stopped run never pushed goes on it */
76
+ // the tip is the bot's and equals the source, so a tag a stopped run never pushed goes on it
78
77
  async function skipUnchanged(run) {
79
78
  const { entry, httpsUrl, key, options, worktree } = run;
80
79
  const tag = await pendingTag(entry, options.repoRoot, worktree, httpsUrl);
@@ -87,7 +86,7 @@ async function skipUnchanged(run) {
87
86
  ...tagged(tag),
88
87
  });
89
88
  }
90
- /* the snapshot committed and pushed, then its tag; on a dry run, what would be */
89
+ // the snapshot committed and pushed, then its tag; on a dry run, what would be
91
90
  async function push(run) {
92
91
  const { entry, headSha, httpsUrl, key, message, options, remoteTip, worktree } = run;
93
92
  const tag = await pendingTag(entry, options.repoRoot, worktree, httpsUrl);
@@ -106,7 +105,7 @@ async function push(run) {
106
105
  await pushTag(worktree, httpsUrl, tag);
107
106
  return withSettings(entry, options, { mirrorSha, name: key, sourceSha: headSha, status: "synced", ...tagged(tag) });
108
107
  }
109
- /* each step in turn; the first that refuses fails the package */
108
+ // each step in turn; the first that refuses fails the package
110
109
  async function syncIn(run) {
111
110
  await prepareWorktree(run.worktree, run.httpsUrl, run.entry, run.remoteTip);
112
111
  const foreign = await foreignTip(run);
@@ -138,7 +137,7 @@ export async function syncPackage(entry, options) {
138
137
  sidecarMessage: readSidecar(options.repoRoot, entry.path),
139
138
  templateMessage: entry.commitMessage,
140
139
  });
141
- const worktree = mkdtempSync(join(tmpdir(), `public-sync-${key.replace(/\//g, "-")}-`));
140
+ const worktree = mkdtempSync(join(tmpdir(), `public-sync-${key.replaceAll("/", "-")}-`));
142
141
  try {
143
142
  return await syncIn({ entry, headSha, httpsUrl, key, message, options, remoteTip, worktree });
144
143
  }
@@ -6,34 +6,34 @@ import type { Target } from "../gen/targets.ts";
6
6
  /** The package metadata clients writes into each generated package's manifest; every field is optional. */
7
7
  export type PackageMetadata = {
8
8
  /** Authors, as `Name <email>`. */
9
- readonly authors?: readonly string[];
9
+ readonly authors?: readonly string[] | undefined;
10
10
  /** The changelog's URL. */
11
- readonly changelog?: string;
11
+ readonly changelog?: string | undefined;
12
12
  /** The copyright line. */
13
- readonly copyright?: string;
13
+ readonly copyright?: string | undefined;
14
14
  /** A one-line description. */
15
- readonly description?: string;
15
+ readonly description?: string | undefined;
16
16
  /** The documentation's URL. */
17
- readonly documentation?: string;
17
+ readonly documentation?: string | undefined;
18
18
  /** The project's site. */
19
- readonly homepage?: string;
19
+ readonly homepage?: string | undefined;
20
20
  /** The package icon's path, relative to the repo root. */
21
- readonly icon?: string;
21
+ readonly icon?: string | undefined;
22
22
  /** Registry search keywords. */
23
- readonly keywords?: readonly string[];
23
+ readonly keywords?: readonly string[] | undefined;
24
24
  /** The SPDX license expression. */
25
- readonly license?: string;
25
+ readonly license?: string | undefined;
26
26
  /** The license file's path, relative to the repo root. */
27
- readonly licenseFile?: string;
27
+ readonly licenseFile?: string | undefined;
28
28
  /** The README's path, relative to the repo root. */
29
- readonly readme?: string;
29
+ readonly readme?: string | undefined;
30
30
  /** The source repository's URL. */
31
- readonly repository?: string;
31
+ readonly repository?: string | undefined;
32
32
  };
33
33
  /** How clients generates a package: its target, and that target's options by name. */
34
34
  export type ReleaseRun = {
35
35
  /** The target's options, as `--<target>-<option>` takes them; none by default. */
36
- readonly options?: Readonly<Record<string, string>>;
36
+ readonly options?: Readonly<Record<string, string>> | undefined;
37
37
  /** The clients target the package is generated with. */
38
38
  readonly target: Target;
39
39
  };
@@ -50,21 +50,21 @@ export type Registry = {
50
50
  /** One public package a config lists. */
51
51
  export type ManifestPackageInput = {
52
52
  /** Globs bootstrap leaves out of the first push, so the next sync adds them as their own commit. */
53
- readonly bootstrapExclude?: readonly string[];
53
+ readonly bootstrapExclude?: readonly string[] | undefined;
54
54
  /** The public repo's branch sync pushes to; `main` by default. */
55
- readonly branch?: string;
55
+ readonly branch?: string | undefined;
56
56
  /** The message of each snapshot commit, unless the package's `.publicsync-message` names one. */
57
57
  readonly commitMessage: string;
58
58
  /** The package's one description: its public repo's, every registry's, and its first CHANGELOG entry. */
59
59
  readonly description: string;
60
60
  /** How clients generates it; absent for a package backend does not generate (the spec itself). */
61
- readonly clients?: ReleaseRun;
61
+ readonly clients?: ReleaseRun | undefined;
62
62
  /** This package's metadata over the product's; its keywords add to the product's. */
63
- readonly metadata?: PackageMetadata;
63
+ readonly metadata?: PackageMetadata | undefined;
64
64
  /** The package's slug: its dir beside the config, and the key bump's `RELEASE_VERSIONS` uses. */
65
65
  readonly name: string;
66
66
  /** The registries its release workflow publishes to; none for a package that ships its own workflow. */
67
- readonly registries?: readonly Registry[];
67
+ readonly registries?: readonly Registry[] | undefined;
68
68
  /** The public repo, `owner/name` on github.com. */
69
69
  readonly repo: string;
70
70
  /** The public repo's GitHub topics, 1 to 20 lowercase slugs. */
@@ -89,11 +89,11 @@ export type ReleaseManifestInput = {
89
89
  /** The command that regenerates every package of the product, run from the repo root; it honors `RELEASE_VERSIONS`. */
90
90
  readonly codegen: readonly string[];
91
91
  /** The identity sync commits as; `public-sync[bot]` by default, so another org's GitHub App can sync. */
92
- readonly committer?: Committer;
92
+ readonly committer?: Committer | undefined;
93
93
  /** The product's site: every public repo's website and every registry's homepage. */
94
94
  readonly homepage: string;
95
95
  /** The metadata every generated package of the product carries. */
96
- readonly metadata?: PackageMetadata;
96
+ readonly metadata?: PackageMetadata | undefined;
97
97
  /** The product's public packages, at least one; each name and repo once. */
98
98
  readonly packages: readonly ManifestPackageInput[];
99
99
  /** The product's slug: the `<project>/<name>` key of each package, and what its codegen filters on. */
@@ -104,14 +104,14 @@ export type ReleaseManifestInput = {
104
104
  * The tools codegen needs, each a dep name in the repo root's `system.config.ts`; the release workflows install
105
105
  * them in this order before codegen runs. None by default.
106
106
  */
107
- readonly toolchains?: readonly string[];
107
+ readonly toolchains?: readonly string[] | undefined;
108
108
  };
109
109
  /** A listed package with its defaults applied. */
110
110
  export type ManifestPackage = ManifestPackageInput & {
111
111
  /** The public repo's branch. */
112
112
  readonly branch: string;
113
113
  /** The package's metadata: the product's, then its own over it. */
114
- readonly metadata?: PackageMetadata;
114
+ readonly metadata?: PackageMetadata | undefined;
115
115
  /** The registries its release workflow publishes to, possibly none. */
116
116
  readonly registries: readonly Registry[];
117
117
  };
@@ -1 +0,0 @@
1
- export {};