@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
@@ -2,13 +2,12 @@ type VersionFile = {
2
2
  read(text: string): string;
3
3
  write(text: string, version: string): string;
4
4
  };
5
+ /** The name of a version file bump keeps in step. */
6
+ export type VersionFileName = "jsr.json" | "package.json" | "pyproject.toml";
5
7
  /** The version files bump keeps in step with `.release-state.json`, by file name. */
6
8
  export declare const VERSION_FILES: {
7
- readonly "jsr.json": VersionFile;
8
- readonly "package.json": VersionFile;
9
- readonly "pyproject.toml": VersionFile;
9
+ readonly [N in VersionFileName]: VersionFile;
10
10
  };
11
- export type VersionFileName = keyof typeof VERSION_FILES;
12
11
  /** Each version file present in `dir` with the version it holds; throws naming the file whose version line is missing or doubled. */
13
12
  export declare function readVersions(dir: string): Partial<Record<VersionFileName, string>>;
14
13
  /** Writes `version` into every version file present in `dir`; returns the paths written. */
@@ -3,21 +3,20 @@ import { join } from "node:path";
3
3
  /** The one match of `pattern` (whose group 1 always participates) in `text`, or a throw naming `what`. */
4
4
  function only(text, pattern, what) {
5
5
  const matches = [...text.matchAll(new RegExp(pattern.source, `${pattern.flags.replace("g", "")}g`))];
6
- if (matches.length !== 1) {
6
+ if (matches.length !== 1)
7
7
  throw new Error(`expected one ${what}, found ${matches.length}`);
8
- }
9
8
  return matches[0];
10
9
  }
11
10
  function replaceAt(text, match, replacement) {
12
11
  return text.slice(0, match.index) + replacement + text.slice(match.index + match[0].length);
13
12
  }
14
- /* The top-level `"version"` of a tab-indented JSON manifest. */
13
+ // The top-level `"version"` of a tab-indented JSON manifest.
15
14
  const JSON_VERSION = /^\t"version": "([^"]+)"/m;
16
15
  const json = {
17
16
  read: (text) => only(text, JSON_VERSION, 'top-level "version"')[1],
18
17
  write: (text, version) => replaceAt(text, only(text, JSON_VERSION, 'top-level "version"'), `\t"version": "${version}"`),
19
18
  };
20
- /* The `version = "…"` line of the `[project]` table, which ends at the next table header. */
19
+ // The `version = "…"` line of the `[project]` table, which ends at the next table header.
21
20
  const PROJECT_TABLE = /^\[project\]\n((?:(?!\[).*\n?)*)/m;
22
21
  const TOML_VERSION = /^version = "([^"]+)"$/m;
23
22
  const pyproject = {
@@ -51,7 +50,7 @@ export function readVersions(dir) {
51
50
  versions[name] = VERSION_FILES[name].read(readFileSync(file, "utf8"));
52
51
  }
53
52
  catch (error) {
54
- /* each read throws only `only`'s Error */
53
+ // each read throws only `only`'s Error
55
54
  throw new Error(`${file}: ${error.message}`, {
56
55
  cause: error,
57
56
  });
@@ -0,0 +1,8 @@
1
+ // The runtime is read as text and vendored into every generated TS and MCP SDK, so it keeps the style the
2
+ // emitters format SDKs in (EMIT_STYLE in src/emit/shared/format.ts), not the repo's: tabs, no semicolons, imports
3
+ // as written. Its byte locks in scripts/sdk-budget*.test.ts measure the shipped text.
4
+ {
5
+ "printWidth": 120,
6
+ "semi": false,
7
+ "useTabs": true,
8
+ }
@@ -41,7 +41,7 @@ export type Files = {
41
41
  readonly uploads?: Uploads
42
42
  readonly credential?: string
43
43
  readonly asked?: Record<string, unknown>
44
- readonly client?: { readonly extensions?: Record<string, unknown> }
44
+ readonly client?: { readonly extensions?: Record<string, unknown> } | undefined
45
45
  }
46
46
 
47
47
  /* canonical base64: whole quads, the last padded, its unused bits zero */
@@ -9,7 +9,11 @@ import { ErrorCode, failure, isId, type Reply } from "./jsonrpc.ts"
9
9
  import { BATCHED, claimed, isObject, MODERN, type Protocol, PROTOCOL_VERSIONS, unserved, VERSION } from "./protocol.ts"
10
10
 
11
11
  /** What the transport serves beside its own origin, its body cap in bytes, and its calls' files (a mount's). */
12
- export type HttpOptions = { readonly origins?: readonly string[]; readonly max?: number; readonly files?: Files }
12
+ export type HttpOptions = {
13
+ readonly origins?: readonly string[] | undefined
14
+ readonly max?: number | undefined
15
+ readonly files?: Files | undefined
16
+ }
13
17
 
14
18
  const SSE = { "cache-control": "no-cache", "content-type": "text/event-stream", "x-accel-buffering": "no" }
15
19
 
@@ -103,7 +107,7 @@ function streamed(
103
107
  protocol: Protocol,
104
108
  body: unknown,
105
109
  version: string,
106
- { closed, files }: { closed?: AbortSignal; files?: Files },
110
+ { closed, files }: { closed?: AbortSignal | undefined; files?: Files | undefined },
107
111
  ) {
108
112
  const call = new AbortController()
109
113
  const signal = closed ? AbortSignal.any([closed, call.signal]) : call.signal
@@ -25,7 +25,7 @@ export const bearer = (authorization: string | null, token: string): boolean =>
25
25
  /** `incoming` as a Request to `url`, every header kept as sent (a repeated one joined), `closed` its signal. */
26
26
  function requestOf(incoming: IncomingMessage, headers: Headers, url: string, closed: AbortSignal) {
27
27
  const post = incoming.method === "POST"
28
- const body = post ? (Readable.toWeb(incoming) as ReadableStream) : null
28
+ const body = post ? Readable.toWeb(incoming) : null
29
29
  return new Request(url, { body, duplex: "half", headers, method: incoming.method, signal: closed } as RequestInit)
30
30
  }
31
31
 
@@ -28,8 +28,8 @@ export type MountConfig = {
28
28
  */
29
29
  export type Mount = {
30
30
  readonly dispatch: (request: Request) => Promise<Response>
31
- readonly origins?: readonly string[]
32
- readonly max?: number
31
+ readonly origins?: readonly string[] | undefined
32
+ readonly max?: number | undefined
33
33
  readonly uploads?: Uploads | undefined
34
34
  readonly fetchFile?: FetchFile | undefined
35
35
  }
@@ -60,7 +60,7 @@ export type Context = {
60
60
  readonly signal: AbortSignal
61
61
  readonly notify: (message: object) => void
62
62
  readonly connection: Connection
63
- readonly files?: Files
63
+ readonly files?: Files | undefined
64
64
  }
65
65
 
66
66
  /** Each message's reply, a batch's, or none; a promise only for a call, never rejected. */
@@ -46,7 +46,6 @@ export type QueryHelperOptions = {
46
46
  }
47
47
 
48
48
  /* an SDK method, whatever its shape: `unknown` collapses call signatures, which is what this must not do */
49
- // oxlint-disable-next-line typescript/no-explicit-any
50
49
  type AnyMethod = (...args: any[]) => any
51
50
 
52
51
  type Req<M> = M extends (req: infer R, ...rest: never[]) => unknown ? R : never
@@ -110,7 +109,6 @@ export type KeyFactory<M> = (req?: Req<M>) => QueryKey
110
109
  * disappears behind them; a consumer never sees it.
111
110
  */
112
111
  export interface Surface {
113
- // oxlint-disable-next-line typescript/no-explicit-any
114
112
  (...args: any[]): any
115
113
  readonly [key: string]: Surface
116
114
  }
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@workerstack/clients",
3
- "version": "1.0.0-rc.29",
3
+ "version": "1.0.0-rc.30",
4
+ "private": false,
4
5
  "description": "Generates SDKs (TypeScript, Go, Rust, Python, C#, Java), a CLI and an MCP server from any OpenAPI 3.x document.",
5
6
  "keywords": [
6
7
  "codegen",
@@ -29,6 +30,7 @@
29
30
  "dist"
30
31
  ],
31
32
  "type": "module",
33
+ "sideEffects": false,
32
34
  "exports": {
33
35
  ".": {
34
36
  "types": "./dist/index.d.ts",
@@ -53,16 +55,17 @@
53
55
  "provenance": true
54
56
  },
55
57
  "scripts": {
56
- "fmt": "oxfmt",
57
- "fmt:check": "oxfmt --check",
58
- "lint": "oxlint",
59
- "lint:fix": "oxlint --fix",
58
+ "build:types": "tsc -p tsconfig.build.json",
59
+ "fmt": "repo fmt",
60
+ "fmt:check": "repo fmt --check",
61
+ "lint": "repo lint",
62
+ "lint:fix": "repo lint --fix",
60
63
  "postinstall": "repo sync --postinstall",
61
64
  "prepack": "bun scripts/build.ts",
62
- "prepare": "lefthook install --reset-hooks-path",
63
65
  "test": "vitest run --coverage",
64
66
  "test:harness": "vitest run --mode harness",
65
- "typecheck": "tsc --noEmit -p tsconfig.json"
67
+ "typecheck": "tsc -p tsconfig.json",
68
+ "typecheck:src": "tsc -p tsconfig.src.json"
66
69
  },
67
70
  "dependencies": {
68
71
  "jiti": "2.7.0",
@@ -1 +0,0 @@
1
- export { type GeneratedGoCli, generateGoCli, type GoCliOptions } from "./module.ts";
@@ -1 +0,0 @@
1
- export { generateGoCli } from "./module.js";
@@ -1 +0,0 @@
1
- export { csharpCallPlans, type CSharpSdkOptions, generateCSharpSdk, type GeneratedCSharpSdk } from "./sdk.ts";
@@ -1 +0,0 @@
1
- export { csharpCallPlans, generateCSharpSdk } from "./sdk.js";
@@ -1 +0,0 @@
1
- export { type GeneratedGoSdk, generateGoSdk, type GoSdkOptions } from "./sdk.ts";
@@ -1 +0,0 @@
1
- export { generateGoSdk } from "./sdk.js";
@@ -1,2 +0,0 @@
1
- /** The Java SDK emitter (bit 16). */
2
- export { type GeneratedJavaSdk, generateJavaSdk, type JavaSdkOptions } from "./sdk.ts";
@@ -1,2 +0,0 @@
1
- /** The Java SDK emitter (bit 16). */
2
- export { generateJavaSdk } from "./sdk.js";
@@ -1,3 +0,0 @@
1
- /** The MCP server emitter's entry (bit 18): its generator and the shapes it takes and returns. */
2
- export { type GeneratedMcpServer, generateMcpServer, type McpServerOptions } from "./server.ts";
3
- export { type GeneratedMcpHandler, generateMcpHandler, type McpHandlerOptions } from "./mounted.ts";
@@ -1,3 +0,0 @@
1
- /** The MCP server emitter's entry (bit 18): its generator and the shapes it takes and returns. */
2
- export { generateMcpServer } from "./server.js";
3
- export { generateMcpHandler } from "./mounted.js";
@@ -1 +0,0 @@
1
- export { type GeneratedPythonSdk, generatePythonSdk, type PythonSdkOptions, pythonCallPlans } from "./sdk.ts";
@@ -1 +0,0 @@
1
- export { generatePythonSdk, pythonCallPlans } from "./sdk.js";
@@ -1 +0,0 @@
1
- export { type GeneratedRustSdk, generateRustSdk, type RustSdkOptions, rustCallPlans } from "./sdk.ts";
@@ -1 +0,0 @@
1
- export { generateRustSdk, rustCallPlans } from "./sdk.js";