@workerstack/clients 1.0.0-rc.23 → 1.0.0-rc.24
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.
package/README.md
CHANGED
|
@@ -211,7 +211,7 @@ Every SDK takes the same configuration — a base URL, the auth the spec's secur
|
|
|
211
211
|
hooks around each HTTP call, and per-call overrides — and every one answers the same way: the normal call returns
|
|
212
212
|
your value and throws a typed error by status, while `client.safe` answers a result instead. What follows is each
|
|
213
213
|
language's client in a slice of a compiled example; the
|
|
214
|
-
[SDK recipes](https://github.com/workerstack/
|
|
214
|
+
[SDK recipes](https://github.com/workerstack/clients/blob/main/docs/sdk-recipes.md) page has the whole programs.
|
|
215
215
|
|
|
216
216
|
### The TypeScript SDK
|
|
217
217
|
|
|
@@ -458,7 +458,7 @@ A name of yours that collides with the mirror, or with a runtime type, is rename
|
|
|
458
458
|
silently. An operation or root resource named `safe` becomes `safe_`, and a component named like one of the runtime
|
|
459
459
|
types becomes `<Name>Model`.
|
|
460
460
|
|
|
461
|
-
Full reference: [generated clients](https://github.com/workerstack/
|
|
461
|
+
Full reference: [generated clients](https://github.com/workerstack/clients/blob/main/docs/client.md).
|
|
462
462
|
|
|
463
463
|
## The command-line client
|
|
464
464
|
|
|
@@ -486,8 +486,8 @@ shop orders list --status open --output json
|
|
|
486
486
|
Its configuration has one precedence, everywhere: **flag, then environment, then config file.** The environment
|
|
487
487
|
variables are the `--cli-env-prefix` (or the API's name) upper-cased.
|
|
488
488
|
|
|
489
|
-
Full reference: [the generated CLI](https://github.com/workerstack/
|
|
490
|
-
[releasing it](https://github.com/workerstack/
|
|
489
|
+
Full reference: [the generated CLI](https://github.com/workerstack/clients/blob/main/docs/cli.md) and
|
|
490
|
+
[releasing it](https://github.com/workerstack/clients/blob/main/docs/cli-release.md).
|
|
491
491
|
|
|
492
492
|
## The MCP server
|
|
493
493
|
|
|
@@ -606,14 +606,14 @@ This package also exports the app-side generators the honey CLI and Vite plugin
|
|
|
606
606
|
|
|
607
607
|
## Documentation
|
|
608
608
|
|
|
609
|
-
- [Code generation](https://github.com/workerstack/
|
|
610
|
-
- [Generated clients](https://github.com/workerstack/
|
|
611
|
-
[per-language recipes](https://github.com/workerstack/
|
|
612
|
-
- [The generated CLI](https://github.com/workerstack/
|
|
613
|
-
[releasing it](https://github.com/workerstack/
|
|
609
|
+
- [Code generation](https://github.com/workerstack/clients/blob/main/docs/codegen.md): every target and its options.
|
|
610
|
+
- [Generated clients](https://github.com/workerstack/clients/blob/main/docs/client.md) and their
|
|
611
|
+
[per-language recipes](https://github.com/workerstack/clients/blob/main/docs/sdk-recipes.md).
|
|
612
|
+
- [The generated CLI](https://github.com/workerstack/clients/blob/main/docs/cli.md),
|
|
613
|
+
[releasing it](https://github.com/workerstack/clients/blob/main/docs/cli-release.md), and
|
|
614
614
|
[the MCP server](https://github.com/workerstack/backend/blob/main/docs/mcp.md).
|
|
615
|
-
- [SDK conformance](https://github.com/workerstack/
|
|
616
|
-
[the framework itself](https://github.com/workerstack/backend
|
|
615
|
+
- [SDK conformance](https://github.com/workerstack/clients/blob/main/docs/conformance.md) and
|
|
616
|
+
[the framework itself](https://github.com/workerstack/backend#readme).
|
|
617
617
|
|
|
618
618
|
## License
|
|
619
619
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* HTTP status code → honey's status key (`201` → `created`), as
|
|
3
|
-
* them (gen never imports
|
|
2
|
+
* HTTP status code → honey's status key (`201` → `created`), as backend's response vocabulary names
|
|
3
|
+
* them (gen never imports backend, H2). tests/integration/codegen-tables.test.ts answers each key through a real app, so the two cannot drift.
|
|
4
4
|
*/
|
|
5
5
|
export declare const STATUS_KEYS: Readonly<Record<number, string>>;
|
|
6
6
|
/** The status key of `code`; undefined for a code outside the vocabulary (1xx, a range like `4XX`). */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* HTTP status code → honey's status key (`201` → `created`), as
|
|
3
|
-
* them (gen never imports
|
|
2
|
+
* HTTP status code → honey's status key (`201` → `created`), as backend's response vocabulary names
|
|
3
|
+
* them (gen never imports backend, H2). tests/integration/codegen-tables.test.ts answers each key through a real app, so the two cannot drift.
|
|
4
4
|
*/
|
|
5
5
|
export const STATUS_KEYS = {
|
|
6
6
|
200: "ok",
|
package/dist/gen/formatters.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare const FORMATTERS: Partial<Record<Target, FormatPass>>;
|
|
|
43
43
|
/**
|
|
44
44
|
* The formatter for `target`, or none when its binary is not there. Each factory is named here rather than
|
|
45
45
|
* held in the table's rows: `honey/spawn-timeout` proves which exports reach a spawn by walking named calls
|
|
46
|
-
* (`
|
|
46
|
+
* (the repo lint plugin's `spawners.js`), and a closure in a table is opaque to that walk — which would leave a
|
|
47
47
|
* test calling `generated()` free of the bound it needs, since the spawn is real either way.
|
|
48
48
|
*/
|
|
49
49
|
export declare function formatterFor(target: Target, where: {
|
package/dist/gen/formatters.js
CHANGED
|
@@ -102,7 +102,7 @@ export const FORMATTERS = {
|
|
|
102
102
|
/**
|
|
103
103
|
* The formatter for `target`, or none when its binary is not there. Each factory is named here rather than
|
|
104
104
|
* held in the table's rows: `honey/spawn-timeout` proves which exports reach a spawn by walking named calls
|
|
105
|
-
* (`
|
|
105
|
+
* (the repo lint plugin's `spawners.js`), and a closure in a table is opaque to that walk — which would leave a
|
|
106
106
|
* test calling `generated()` free of the bound it needs, since the spawn is real either way.
|
|
107
107
|
*/
|
|
108
108
|
export async function formatterFor(target, where) {
|
package/dist/gen/targets.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const TARGET_OPTIONS: {
|
|
|
29
29
|
/**
|
|
30
30
|
* The target options that take no value, since their name already says what they turn on
|
|
31
31
|
* (`--ts-tanstack-query`, not `--ts-query tanstack`). They stay listed in `TARGET_OPTIONS` above, which is what
|
|
32
|
-
* `
|
|
32
|
+
* the repo's README test (`tests/docs/readmes.test.ts`) reads to hold every flag to its README row; this table only
|
|
33
33
|
* says how one is read. Bare is `true` and an inline `true`/`false` is read, exactly as `--watch` is.
|
|
34
34
|
*/
|
|
35
35
|
declare const BOOLEAN_OPTIONS: {
|
package/dist/gen/targets.js
CHANGED
|
@@ -78,7 +78,7 @@ export const TARGET_OPTIONS = {
|
|
|
78
78
|
/**
|
|
79
79
|
* The target options that take no value, since their name already says what they turn on
|
|
80
80
|
* (`--ts-tanstack-query`, not `--ts-query tanstack`). They stay listed in `TARGET_OPTIONS` above, which is what
|
|
81
|
-
* `
|
|
81
|
+
* the repo's README test (`tests/docs/readmes.test.ts`) reads to hold every flag to its README row; this table only
|
|
82
82
|
* says how one is read. Bare is `true` and an inline `true`/`false` is read, exactly as `--watch` is.
|
|
83
83
|
*/
|
|
84
84
|
const BOOLEAN_OPTIONS = { cli: ["aur"], ts: ["tanstackQuery"] };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workerstack/clients",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.24",
|
|
4
4
|
"description": "Generates SDKs (TypeScript, Go, Rust, Python, C#, Java), a CLI and an MCP server from any OpenAPI 3.x document.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codegen",
|
|
@@ -9,16 +9,15 @@
|
|
|
9
9
|
"sdk",
|
|
10
10
|
"workerstack"
|
|
11
11
|
],
|
|
12
|
-
"homepage": "https://github.com/workerstack/
|
|
12
|
+
"homepage": "https://github.com/workerstack/clients#readme",
|
|
13
13
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/workerstack/
|
|
14
|
+
"url": "https://github.com/workerstack/clients/issues"
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"author": "lovrozagar",
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/workerstack/
|
|
21
|
-
"directory": "packages/gen"
|
|
20
|
+
"url": "git+https://github.com/workerstack/clients.git"
|
|
22
21
|
},
|
|
23
22
|
"bin": {
|
|
24
23
|
"honey-clients": "bin/honey-clients.js"
|
|
@@ -44,10 +43,34 @@
|
|
|
44
43
|
"provenance": true
|
|
45
44
|
},
|
|
46
45
|
"scripts": {
|
|
46
|
+
"fmt": "oxfmt",
|
|
47
|
+
"fmt:check": "oxfmt --check",
|
|
48
|
+
"grunt:antigravity": "antigravity --dangerously-skip-permissions",
|
|
49
|
+
"grunt:claude": "claude --dangerously-skip-permissions",
|
|
50
|
+
"grunt:clean": "node ./.rulesync/scripts/clean.mjs",
|
|
51
|
+
"grunt:codex": "codex --dangerously-bypass-approvals-and-sandbox",
|
|
52
|
+
"grunt:doctor": "node ./.rulesync/scripts/doctor.mjs",
|
|
53
|
+
"grunt:gemini": "gemini --yolo",
|
|
54
|
+
"grunt:grok": "grok --yolo",
|
|
55
|
+
"grunt:hooks:check": "node .rulesync/scripts/hooks-union.mjs --check",
|
|
56
|
+
"grunt:hooks:union": "node .rulesync/scripts/hooks-union.mjs",
|
|
57
|
+
"grunt:purge:global-mcps": "node .rulesync/scripts/purge-global-mcps.mjs",
|
|
58
|
+
"grunt:purge:global-mcps:apply": "node .rulesync/scripts/purge-global-mcps.mjs --apply",
|
|
59
|
+
"grunt:rulesync:check": "node ./.rulesync/scripts/guarded-roots.mjs check",
|
|
60
|
+
"grunt:rulesync:doctor": "rulesync doctor",
|
|
61
|
+
"grunt:rulesync:generate": "node ./.rulesync/scripts/guarded-roots.mjs generate",
|
|
62
|
+
"grunt:rulesync:watch": "node ./.rulesync/scripts/guarded-roots.mjs watch",
|
|
63
|
+
"grunt:setup": "node ./.rulesync/scripts/setup.mjs",
|
|
64
|
+
"grunt:sync:globals": "node .rulesync/scripts/sync-global-settings.mjs",
|
|
65
|
+
"grunt:sync:globals:apply": "node .rulesync/scripts/sync-global-settings.mjs --apply",
|
|
66
|
+
"grunt:sync:globals:check": "node .rulesync/scripts/check-globals.mjs",
|
|
67
|
+
"lint": "oxlint",
|
|
68
|
+
"lint:fix": "oxlint --fix",
|
|
47
69
|
"prepack": "bun scripts/build.ts",
|
|
70
|
+
"prepare": "lefthook install --reset-hooks-path",
|
|
48
71
|
"test": "vitest run --coverage",
|
|
49
72
|
"test:harness": "vitest run --mode harness",
|
|
50
|
-
"
|
|
73
|
+
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
51
74
|
},
|
|
52
75
|
"dependencies": {
|
|
53
76
|
"@lovrozagar/installgen": "0.3.0",
|
|
@@ -55,17 +78,31 @@
|
|
|
55
78
|
"oxc-transform": "0.155.0"
|
|
56
79
|
},
|
|
57
80
|
"devDependencies": {
|
|
81
|
+
"@clack/prompts": "^0.11.0",
|
|
82
|
+
"@commitlint/cli": "21.2.4",
|
|
83
|
+
"@commitlint/config-conventional": "21.2.4",
|
|
84
|
+
"@lovrozagar/grunt": "0.16.1",
|
|
58
85
|
"@tanstack/query-core": "5.104.5",
|
|
59
86
|
"@total-typescript/ts-reset": "0.6.1",
|
|
60
87
|
"@types/node": "26.1.1",
|
|
61
88
|
"@vitest/coverage-v8": "4.1.10",
|
|
89
|
+
"@workerstack/backend": "1.0.0-rc.24",
|
|
62
90
|
"ajv": "8.20.0",
|
|
63
91
|
"ajv-formats": "3.0.1",
|
|
64
|
-
"
|
|
92
|
+
"js-yaml": "4.3.1",
|
|
93
|
+
"lefthook": "2.2.2",
|
|
94
|
+
"oxc-parser": "0.152.0",
|
|
95
|
+
"oxfmt": "0.77.0",
|
|
96
|
+
"oxlint": "1.92.0",
|
|
97
|
+
"rulesync": "16.17.0",
|
|
98
|
+
"smol-toml": "^1.8.0",
|
|
65
99
|
"standardwebhooks": "1.1.1",
|
|
66
100
|
"ts-morph": "28.0.0",
|
|
67
101
|
"typescript": "7.0.2",
|
|
68
|
-
"
|
|
102
|
+
"vite": "8.1.4",
|
|
103
|
+
"vitest": "4.1.10",
|
|
104
|
+
"ws": "8.21.0",
|
|
105
|
+
"zod": "4.3.6"
|
|
69
106
|
},
|
|
70
107
|
"peerDependencies": {
|
|
71
108
|
"oxfmt": ">=0.63.0",
|
|
@@ -81,5 +118,19 @@
|
|
|
81
118
|
},
|
|
82
119
|
"engines": {
|
|
83
120
|
"node": ">=22.12.0"
|
|
121
|
+
},
|
|
122
|
+
"packageManager": "bun@1.4.4",
|
|
123
|
+
"standards": {
|
|
124
|
+
"repo": "clients",
|
|
125
|
+
"gates": [
|
|
126
|
+
"test:harness"
|
|
127
|
+
],
|
|
128
|
+
"ci": [
|
|
129
|
+
"fmt:check",
|
|
130
|
+
"lint",
|
|
131
|
+
"typecheck",
|
|
132
|
+
"test",
|
|
133
|
+
"test:harness"
|
|
134
|
+
]
|
|
84
135
|
}
|
|
85
136
|
}
|