@redocly/cli 0.0.0-snapshot.1785253841 → 0.0.0-snapshot.1785304226

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 (41) hide show
  1. package/README.md +15 -0
  2. package/THIRD_PARTY_NOTICES +2 -1
  3. package/lib/chunks/{A6JSOHCP.js → 33L3PA3A.js} +7 -3
  4. package/lib/chunks/{LZNQHR3A.js → 3SKVIVPW.js} +7 -3
  5. package/lib/chunks/{UV3RHVRI.js → 5DD4XTOT.js} +10 -6
  6. package/lib/chunks/{JR2DXWZO.js → 6URT6EGY.js} +66 -62
  7. package/lib/chunks/{Y6DTFCLS.js → 7COZBK76.js} +4 -0
  8. package/lib/chunks/{TS33ZDKX.js → 7J52NJGJ.js} +6 -2
  9. package/lib/chunks/{64PJUTGH.js → AIYO6QGC.js} +5 -1
  10. package/lib/chunks/{AIT3U3JT.js → AVTQDJLQ.js} +5 -1
  11. package/lib/chunks/{UQJWXLNC.js → CTPOMB2H.js} +6 -2
  12. package/lib/chunks/{Z3EJWJEX.js → D4JLEQK6.js} +51 -4
  13. package/lib/chunks/{Q7LC24EZ.js → DSLPFZ2N.js} +11 -7
  14. package/lib/chunks/{CUWLBJXP.js → EMHVJQ36.js} +5 -1
  15. package/lib/chunks/{J67FIRON.js → EV7YWJKJ.js} +14 -10
  16. package/lib/chunks/{Z2I5YXYN.js → HRYOF224.js} +5 -1
  17. package/lib/chunks/{VXIQEZPR.js → HXIHIVQ5.js} +1111 -465
  18. package/lib/chunks/{4FB5ZIPP.js → JPNXFCZJ.js} +6 -2
  19. package/lib/chunks/{6PU5ORE4.js → L7BMXL4V.js} +13 -9
  20. package/lib/chunks/{PU67EGEM.js → LGB7AEPO.js} +5 -1
  21. package/lib/chunks/{XHPY6UJF.js → LJH34AHG.js} +5 -1
  22. package/lib/chunks/MSELHCOR.js +892 -0
  23. package/lib/chunks/{VUDTNFRL.js → OD6H2RSI.js} +7 -3
  24. package/lib/chunks/{FO6BDVGE.js → OY3F7DFL.js} +6 -2
  25. package/lib/chunks/P3732N4Y.js +20 -0
  26. package/lib/chunks/{XB6C62FW.js → QRC5ADSZ.js} +5 -1
  27. package/lib/chunks/{ICPYP2LP.js → QVWJKMKN.js} +5 -1
  28. package/lib/chunks/{OFNDHNJR.js → QYZOJXYB.js} +11 -7
  29. package/lib/chunks/R5XDCRI3.js +18 -0
  30. package/lib/chunks/{GHOFKLVA.js → T4JAHCKT.js} +8 -3
  31. package/lib/chunks/{ZK3QRKL5.js → TWBSRL2M.js} +6 -2
  32. package/lib/chunks/U7JC473Z.js +215787 -0
  33. package/lib/chunks/{HFIKZEXG.js → VOUOVGRQ.js} +11 -7
  34. package/lib/chunks/{W7G5WVPB.js → X5N4DTSB.js} +7 -3
  35. package/lib/chunks/{UUU33DK3.js → XDVFCBV7.js} +5 -1
  36. package/lib/chunks/{5ILQMFXK.js → YDPUXTSG.js} +4 -0
  37. package/lib/chunks/{X3ZGEOOY.js → YMKZXUYO.js} +10 -6
  38. package/lib/chunks/{Y7LKQTQ4.js → ZF6HFWXK.js} +6 -2
  39. package/lib/index.js +258 -29
  40. package/package.json +1 -1
  41. package/lib/chunks/EN4G7YV7.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 `--generator`.
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.
@@ -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:
@@ -690,7 +691,7 @@ Packages:
690
691
  mobx@6.12.3 — Copyright (c) 2015 Michel Weststrate
691
692
  ms@2.1.3
692
693
  object-assign@4.1.1
693
- openapi-sampler@1.7.1 — Copyright (c) 2017 Roman Hotsiy <gotsijroman@gmail.com>
694
+ openapi-sampler@1.7.4 — Copyright (c) 2017 Roman Hotsiy <gotsijroman@gmail.com>
694
695
  outdent@0.8.0 — Copyright (c) 2016 Andrew Bradley
695
696
  perfect-scrollbar@1.5.6 — Copyright (c) 2012-2019 Hyunje Jun, MDBootstrap.com and other contributors
696
697
  picomatch@4.0.4 — Copyright (c) 2017-present, Jon Schlinkert.
@@ -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 "./AIT3U3JT.js";
9
+ } from "./AVTQDJLQ.js";
6
10
  import {
7
11
  esm_exports,
8
12
  init_esm
9
- } from "./XHPY6UJF.js";
13
+ } from "./LJH34AHG.js";
10
14
  import {
11
15
  __commonJS,
12
16
  __toCommonJS
13
- } from "./5ILQMFXK.js";
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({
@@ -1,5 +1,9 @@
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
  compileOpenApiPath,
5
9
  getPathWithoutTrailingSlash,
@@ -13,7 +17,7 @@ import {
13
17
  resolvePathForServer,
14
18
  shouldIgnoreHeaderAsUndocumented,
15
19
  splitSetCookieHeader
16
- } from "./PU67EGEM.js";
20
+ } from "./LGB7AEPO.js";
17
21
  import {
18
22
  BaseResolver,
19
23
  blue,
@@ -35,10 +39,10 @@ import {
35
39
  require_dist,
36
40
  walkDocument,
37
41
  yellow
38
- } from "./Z3EJWJEX.js";
42
+ } from "./D4JLEQK6.js";
39
43
  import {
40
44
  __toESM
41
- } from "./5ILQMFXK.js";
45
+ } from "./YDPUXTSG.js";
42
46
 
43
47
  // src/commands/drift/engine/reporter.ts
44
48
  import path from "node:path";
@@ -1,5 +1,9 @@
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
  RESET_ESCAPE_CODE,
5
9
  calculateTotals,
@@ -8,12 +12,12 @@ import {
8
12
  maskSecrets,
9
13
  parseRuntimeExpression,
10
14
  run
11
- } from "./JR2DXWZO.js";
12
- import "./VXIQEZPR.js";
13
- import "./UUU33DK3.js";
14
- import "./Z3EJWJEX.js";
15
- import "./Z2I5YXYN.js";
16
- import "./5ILQMFXK.js";
15
+ } from "./6URT6EGY.js";
16
+ import "./HXIHIVQ5.js";
17
+ import "./XDVFCBV7.js";
18
+ import "./D4JLEQK6.js";
19
+ import "./HRYOF224.js";
20
+ import "./YDPUXTSG.js";
17
21
  export {
18
22
  RESET_ESCAPE_CODE,
19
23
  calculateTotals,