@redocly/cli 0.0.0-snapshot.1784905704 → 0.0.0-snapshot.1785152186
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 +15 -0
- package/THIRD_PARTY_NOTICES +4 -5
- package/lib/chunks/{LAG4WFR6.js → 2RSMENOK.js} +5 -1
- package/lib/chunks/{A6JSOHCP.js → 33L3PA3A.js} +7 -3
- package/lib/chunks/5TSXTKCH.js +215628 -0
- package/lib/chunks/{54WNV2ZZ.js → 67FKMJUU.js} +5 -1
- package/lib/chunks/{UXHNCYHV.js → 773ES4PM.js} +11 -7
- package/lib/chunks/{Y6DTFCLS.js → 7COZBK76.js} +4 -0
- package/lib/chunks/{TS33ZDKX.js → 7J52NJGJ.js} +6 -2
- package/lib/chunks/{WQFP2DDY.js → AIPHGTXR.js} +13 -9
- package/lib/chunks/{AIT3U3JT.js → AVTQDJLQ.js} +5 -1
- package/lib/chunks/{I2KWFTMS.js → GGJRVGVF.js} +10 -6
- package/lib/chunks/{FW7DJDDD.js → GYUO7XYI.js} +6 -2
- package/lib/chunks/{UVMFKYDJ.js → HBX4LE4N.js} +14 -10
- package/lib/chunks/{OR35UHGS.js → HRYOF224.js} +7 -3
- package/lib/chunks/{VXIQEZPR.js → HXIHIVQ5.js} +1111 -465
- package/lib/chunks/{JLOVJTAF.js → IECTWZWP.js} +8 -3
- package/lib/chunks/JEUYEZZE.js +20 -0
- package/lib/chunks/{4FB5ZIPP.js → JPNXFCZJ.js} +6 -2
- package/lib/chunks/{3JBSVMZ3.js → JSFKZAMB.js} +170 -150
- package/lib/chunks/{3AB5VCFO.js → KO5RGRSI.js} +489 -283
- package/lib/chunks/{XHPY6UJF.js → LJH34AHG.js} +5 -1
- package/lib/chunks/{VUDTNFRL.js → OD6H2RSI.js} +7 -3
- package/lib/chunks/{DQDD43DF.js → OMNIDDWX.js} +5 -1
- package/lib/chunks/{GPYHPW6A.js → OO32BH34.js} +6 -2
- package/lib/chunks/{FO6BDVGE.js → OY3F7DFL.js} +6 -2
- package/lib/chunks/{VZ45XXBM.js → PZNJE4FC.js} +7 -3
- package/lib/chunks/{XB6C62FW.js → QRC5ADSZ.js} +5 -1
- package/lib/chunks/{ICPYP2LP.js → QVWJKMKN.js} +5 -1
- package/lib/chunks/R5XDCRI3.js +18 -0
- package/lib/chunks/{UOC4DXC3.js → RLVQYRXP.js} +10 -6
- package/lib/chunks/{BW6V36EJ.js → TRDET63B.js} +11 -7
- package/lib/chunks/{CVULHLVL.js → TWBSRL2M.js} +9 -5
- package/lib/chunks/{W7G5WVPB.js → X5N4DTSB.js} +7 -3
- package/lib/chunks/{UUU33DK3.js → XDVFCBV7.js} +5 -1
- package/lib/chunks/XU2CNSJJ.js +813 -0
- package/lib/chunks/{5ILQMFXK.js → YDPUXTSG.js} +4 -0
- package/lib/chunks/{C6ECJWFL.js → Z4X3QMVJ.js} +11 -7
- package/lib/index.js +258 -28
- package/package.json +1 -1
- package/lib/chunks/3H5DOMMY.js +0 -16
package/README.md
CHANGED
|
@@ -139,6 +139,21 @@ Respect is Redocly's community-edition product. Looking for something more? We a
|
|
|
139
139
|
|
|
140
140
|
Learn more about [Respect](https://redocly.com/respect) and [get started with API contract testing](https://redocly.com/docs/respect/get-started).
|
|
141
141
|
|
|
142
|
+
### Generate a TypeScript client
|
|
143
|
+
|
|
144
|
+
> ⚠️ **Experimental** — flags, output, and configuration may change in any minor release until declared stable.
|
|
145
|
+
|
|
146
|
+
Turn an OpenAPI description (3.0/3.1/3.2 or Swagger 2.0) into a typed TypeScript client with the `generate-client` command.
|
|
147
|
+
The emitted client has zero runtime dependencies and runs in browsers, Node, Bun, Deno, and edge runtimes.
|
|
148
|
+
|
|
149
|
+
```sh
|
|
150
|
+
redocly generate-client openapi.yaml --output src/client.ts
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Inline types plus a typed client instance and one async function per operation, with auth, opt-in abort-aware retries, middleware, and typed Server-Sent Events.
|
|
154
|
+
The same command can also emit Zod schemas, TanStack Query / SWR hooks, MSW mocks, and more via `--generators`.
|
|
155
|
+
For detailed information, read the [ `generate-client` docs](./docs/@v2/commands/generate-client.md).
|
|
156
|
+
|
|
142
157
|
### Transform an OpenAPI description
|
|
143
158
|
|
|
144
159
|
If your OpenAPI description isn't everything you hoped it would be, enhance it with the Redocly [decorators](https://redocly.com/docs/cli/decorators) feature.
|
package/THIRD_PARTY_NOTICES
CHANGED
|
@@ -229,6 +229,7 @@ Packages:
|
|
|
229
229
|
@opentelemetry/semantic-conventions@1.41.1 — copyright owner or entity authorized by
|
|
230
230
|
better-ajv-errors@2.0.3 — Copyright 2018 Atlassian Pty Ltd
|
|
231
231
|
jsonpath-rfc9535@1.3.0 — copyright owner or entity authorized by
|
|
232
|
+
typescript@6.0.2 — copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
232
233
|
yaml-ast-parser@0.0.43
|
|
233
234
|
|
|
234
235
|
License text:
|
|
@@ -650,8 +651,6 @@ Packages:
|
|
|
650
651
|
@redocly/config@0.22.0 — Copyright 2024 Redocly Inc.
|
|
651
652
|
@redocly/config@0.52.0 — Copyright 2024 Redocly Inc.
|
|
652
653
|
@redocly/openapi-core@1.34.17
|
|
653
|
-
@redocly/openapi-core@2.40.0
|
|
654
|
-
@redocly/respect-core@2.40.0
|
|
655
654
|
agent-base@7.1.4 — Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
|
656
655
|
ajv-formats@3.0.1 — Copyright (c) 2020 Evgeny Poberezkin
|
|
657
656
|
ajv@8.20.0 — Copyright (c) 2015-2021 Evgeny Poberezkin
|
|
@@ -680,7 +679,7 @@ Packages:
|
|
|
680
679
|
js-levenshtein@1.1.6 — Copyright (c) 2017 Gustaf Andersson
|
|
681
680
|
js-tokens@4.0.0 — Copyright (c) 2014, 2015, 2016, 2017, 2018 Simon Lydell
|
|
682
681
|
js-yaml@4.2.0 — Copyright (C) 2011-2015 by Vitaly Puzrin
|
|
683
|
-
js-yaml@5.2.
|
|
682
|
+
js-yaml@5.2.1 — Copyright (C) 2011-2015 by Vitaly Puzrin
|
|
684
683
|
json-pointer@0.6.2 — Copyright (c) 2016 Manuel Stofer
|
|
685
684
|
json-schema-traverse@1.0.0 — Copyright (c) 2017 Evgeny Poberezkin
|
|
686
685
|
jsonpointer@5.0.1 — Copyright (c) 2011-2015 Jan Lehnardt <jan@apache.org> & Marc Bachmann <https://github.com/marcbachmann>
|
|
@@ -692,10 +691,10 @@ Packages:
|
|
|
692
691
|
mobx@6.12.3 — Copyright (c) 2015 Michel Weststrate
|
|
693
692
|
ms@2.1.3
|
|
694
693
|
object-assign@4.1.1
|
|
695
|
-
openapi-sampler@1.7.
|
|
694
|
+
openapi-sampler@1.7.4 — Copyright (c) 2017 Roman Hotsiy <gotsijroman@gmail.com>
|
|
696
695
|
outdent@0.8.0 — Copyright (c) 2016 Andrew Bradley
|
|
697
696
|
perfect-scrollbar@1.5.6 — Copyright (c) 2012-2019 Hyunje Jun, MDBootstrap.com and other contributors
|
|
698
|
-
picomatch@4.0.
|
|
697
|
+
picomatch@4.0.4 — Copyright (c) 2017-present, Jon Schlinkert.
|
|
699
698
|
pluralize@8.0.0 — Copyright (c) 2013 Blake Embrey (hello@blakeembrey.com)
|
|
700
699
|
polished@4.3.1 — Copyright (c) 2016-Present Brian Hough and Maximilian Stoiber
|
|
701
700
|
prismjs@1.30.0 — Copyright (c) 2012 Lea Verou
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
2
4
|
const require = __createRequire(import.meta.url);
|
|
5
|
+
var __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __pathDirname(__filename);
|
|
3
7
|
import {
|
|
4
8
|
isPlainObject
|
|
5
|
-
} from "./
|
|
9
|
+
} from "./KO5RGRSI.js";
|
|
6
10
|
|
|
7
11
|
// src/commands/drift/utils/files.ts
|
|
8
12
|
import { open, readdir, stat } from "node:fs/promises";
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
2
4
|
const require = __createRequire(import.meta.url);
|
|
5
|
+
var __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __pathDirname(__filename);
|
|
3
7
|
import {
|
|
4
8
|
require_execAsync
|
|
5
|
-
} from "./
|
|
9
|
+
} from "./AVTQDJLQ.js";
|
|
6
10
|
import {
|
|
7
11
|
esm_exports,
|
|
8
12
|
init_esm
|
|
9
|
-
} from "./
|
|
13
|
+
} from "./LJH34AHG.js";
|
|
10
14
|
import {
|
|
11
15
|
__commonJS,
|
|
12
16
|
__toCommonJS
|
|
13
|
-
} from "./
|
|
17
|
+
} from "./YDPUXTSG.js";
|
|
14
18
|
|
|
15
19
|
// ../../node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js
|
|
16
20
|
var require_getMachineId_darwin = __commonJS({
|