@redocly/cli 0.0.0-snapshot.1784280563 → 0.0.0-snapshot.1784553518
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 +3 -4
- package/lib/chunks/{A6JSOHCP.js → 33L3PA3A.js} +7 -3
- package/lib/chunks/{YBQMDKQZ.js → 3EBYCRGH.js} +14 -10
- package/lib/chunks/{IKJFCDSF.js → 7COJB2Y6.js} +5 -1
- package/lib/chunks/{Y6DTFCLS.js → 7COZBK76.js} +4 -0
- package/lib/chunks/{TS33ZDKX.js → 7J52NJGJ.js} +6 -2
- package/lib/chunks/{AIT3U3JT.js → AVTQDJLQ.js} +5 -1
- package/lib/chunks/{F3KLNLJE.js → CQW6BTG6.js} +10 -6
- package/lib/chunks/{C7ULSAWA.js → EX5AKFM3.js} +154 -150
- package/lib/chunks/{CGU7XZIB.js → FHJTD6E2.js} +13 -9
- package/lib/chunks/{MQK4YYBQ.js → FLRQX75P.js} +6 -2
- package/lib/chunks/{OR35UHGS.js → HRYOF224.js} +7 -3
- package/lib/chunks/{VXIQEZPR.js → HXIHIVQ5.js} +1111 -465
- package/lib/chunks/{4FB5ZIPP.js → JPNXFCZJ.js} +6 -2
- package/lib/chunks/{2KWNG6WF.js → KD24SG2E.js} +336 -269
- package/lib/chunks/LGUVWMQ6.js +215961 -0
- package/lib/chunks/{XHPY6UJF.js → LJH34AHG.js} +5 -1
- package/lib/chunks/{FPDTUBRU.js → N6FJ5HYR.js} +6 -2
- package/lib/chunks/NQVRVV7B.js +20 -0
- package/lib/chunks/{VUDTNFRL.js → OD6H2RSI.js} +7 -3
- package/lib/chunks/{FO6BDVGE.js → OY3F7DFL.js} +6 -2
- package/lib/chunks/{XB6C62FW.js → QRC5ADSZ.js} +5 -1
- package/lib/chunks/{4GOXJYSF.js → QTDXIUVI.js} +10 -6
- package/lib/chunks/{ICPYP2LP.js → QVWJKMKN.js} +5 -1
- package/lib/chunks/{XQ5TNOKQ.js → T2PUTL2H.js} +9 -5
- package/lib/chunks/{CVULHLVL.js → TWBSRL2M.js} +9 -5
- package/lib/chunks/{SZQELUV3.js → URE42RCZ.js} +10 -6
- package/lib/chunks/{W7G5WVPB.js → X5N4DTSB.js} +7 -3
- package/lib/chunks/{UUU33DK3.js → XDVFCBV7.js} +5 -1
- package/lib/chunks/{5ILQMFXK.js → YDPUXTSG.js} +4 -0
- package/lib/chunks/{ZBLVUJKR.js → ZOFYCGPJ.js} +6 -1
- package/lib/index.js +257 -26
- package/package.json +1 -1
- package/lib/chunks/X4GDFB3D.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.51.0 — Copyright 2024 Redocly Inc.
|
|
652
653
|
@redocly/openapi-core@1.34.16
|
|
653
|
-
@redocly/openapi-core@2.39.0
|
|
654
|
-
@redocly/respect-core@2.39.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
|
|
@@ -691,10 +690,10 @@ Packages:
|
|
|
691
690
|
mobx@6.12.3 — Copyright (c) 2015 Michel Weststrate
|
|
692
691
|
ms@2.1.3
|
|
693
692
|
object-assign@4.1.1
|
|
694
|
-
openapi-sampler@1.7.
|
|
693
|
+
openapi-sampler@1.7.4 — Copyright (c) 2017 Roman Hotsiy <gotsijroman@gmail.com>
|
|
695
694
|
outdent@0.8.0 — Copyright (c) 2016 Andrew Bradley
|
|
696
695
|
perfect-scrollbar@1.5.6 — Copyright (c) 2012-2019 Hyunje Jun, MDBootstrap.com and other contributors
|
|
697
|
-
picomatch@4.0.
|
|
696
|
+
picomatch@4.0.4 — Copyright (c) 2017-present, Jon Schlinkert.
|
|
698
697
|
pluralize@8.0.0 — Copyright (c) 2013 Blake Embrey (hello@blakeembrey.com)
|
|
699
698
|
polished@4.3.1 — Copyright (c) 2016-Present Brian Hough and Maximilian Stoiber
|
|
700
699
|
prismjs@1.30.0 — Copyright (c) 2012 Lea Verou
|
|
@@ -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({
|
|
@@ -1,21 +1,25 @@
|
|
|
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
|
F,
|
|
5
9
|
ulid
|
|
6
|
-
} from "./
|
|
10
|
+
} from "./QVWJKMKN.js";
|
|
7
11
|
import {
|
|
8
12
|
DEFAULT_FETCH_TIMEOUT,
|
|
9
13
|
OTEL_TRACES_URL
|
|
10
|
-
} from "./
|
|
14
|
+
} from "./7COZBK76.js";
|
|
11
15
|
import {
|
|
12
16
|
version
|
|
13
|
-
} from "./
|
|
17
|
+
} from "./ZOFYCGPJ.js";
|
|
14
18
|
import {
|
|
15
19
|
diag,
|
|
16
20
|
esm_exports,
|
|
17
21
|
init_esm
|
|
18
|
-
} from "./
|
|
22
|
+
} from "./LJH34AHG.js";
|
|
19
23
|
import {
|
|
20
24
|
__commonJS,
|
|
21
25
|
__esm,
|
|
@@ -23,7 +27,7 @@ import {
|
|
|
23
27
|
__require,
|
|
24
28
|
__toCommonJS,
|
|
25
29
|
__toESM
|
|
26
|
-
} from "./
|
|
30
|
+
} from "./YDPUXTSG.js";
|
|
27
31
|
|
|
28
32
|
// ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/OTLPExporterBase.js
|
|
29
33
|
var OTLPExporterBase;
|
|
@@ -7386,19 +7390,19 @@ var require_getMachineId = __commonJS({
|
|
|
7386
7390
|
if (!getMachineIdImpl) {
|
|
7387
7391
|
switch (process2.platform) {
|
|
7388
7392
|
case "darwin":
|
|
7389
|
-
getMachineIdImpl = (await import("./
|
|
7393
|
+
getMachineIdImpl = (await import("./33L3PA3A.js")).getMachineId;
|
|
7390
7394
|
break;
|
|
7391
7395
|
case "linux":
|
|
7392
|
-
getMachineIdImpl = (await import("./
|
|
7396
|
+
getMachineIdImpl = (await import("./7J52NJGJ.js")).getMachineId;
|
|
7393
7397
|
break;
|
|
7394
7398
|
case "freebsd":
|
|
7395
|
-
getMachineIdImpl = (await import("./
|
|
7399
|
+
getMachineIdImpl = (await import("./OD6H2RSI.js")).getMachineId;
|
|
7396
7400
|
break;
|
|
7397
7401
|
case "win32":
|
|
7398
|
-
getMachineIdImpl = (await import("./
|
|
7402
|
+
getMachineIdImpl = (await import("./X5N4DTSB.js")).getMachineId;
|
|
7399
7403
|
break;
|
|
7400
7404
|
default:
|
|
7401
|
-
getMachineIdImpl = (await import("./
|
|
7405
|
+
getMachineIdImpl = (await import("./OY3F7DFL.js")).getMachineId;
|
|
7402
7406
|
break;
|
|
7403
7407
|
}
|
|
7404
7408
|
}
|
|
@@ -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
|
HandledError
|
|
5
|
-
} from "./
|
|
9
|
+
} from "./KD24SG2E.js";
|
|
6
10
|
|
|
7
11
|
// src/utils/error.ts
|
|
8
12
|
var AbortFlowError = class extends Error {
|
|
@@ -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
|
|
|
4
8
|
// src/utils/constants.ts
|
|
5
9
|
var OTEL_URL = "https://otel.cloud.redocly.com";
|
|
@@ -1,14 +1,18 @@
|
|
|
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
|
esm_exports,
|
|
5
9
|
init_esm
|
|
6
|
-
} from "./
|
|
10
|
+
} from "./LJH34AHG.js";
|
|
7
11
|
import {
|
|
8
12
|
__commonJS,
|
|
9
13
|
__require,
|
|
10
14
|
__toCommonJS
|
|
11
|
-
} from "./
|
|
15
|
+
} from "./YDPUXTSG.js";
|
|
12
16
|
|
|
13
17
|
// ../../node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js
|
|
14
18
|
var require_getMachineId_linux = __commonJS({
|
|
@@ -1,9 +1,13 @@
|
|
|
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
|
__commonJS,
|
|
5
9
|
__require
|
|
6
|
-
} from "./
|
|
10
|
+
} from "./YDPUXTSG.js";
|
|
7
11
|
|
|
8
12
|
// ../../node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js
|
|
9
13
|
var require_execAsync = __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
|
ValidationSession,
|
|
5
9
|
createNormalizedExchange,
|
|
@@ -8,22 +12,22 @@ import {
|
|
|
8
12
|
normalizeFsPath,
|
|
9
13
|
parseCsv,
|
|
10
14
|
renderReport
|
|
11
|
-
} from "./
|
|
15
|
+
} from "./N6FJ5HYR.js";
|
|
12
16
|
import {
|
|
13
17
|
AbortFlowError,
|
|
14
18
|
exitWithError
|
|
15
|
-
} from "./
|
|
19
|
+
} from "./7COJB2Y6.js";
|
|
16
20
|
import {
|
|
17
21
|
require_undici
|
|
18
|
-
} from "./
|
|
22
|
+
} from "./QRC5ADSZ.js";
|
|
19
23
|
import {
|
|
20
24
|
isPlainObject,
|
|
21
25
|
logger
|
|
22
|
-
} from "./
|
|
23
|
-
import "./
|
|
26
|
+
} from "./KD24SG2E.js";
|
|
27
|
+
import "./HRYOF224.js";
|
|
24
28
|
import {
|
|
25
29
|
__toESM
|
|
26
|
-
} from "./
|
|
30
|
+
} from "./YDPUXTSG.js";
|
|
27
31
|
|
|
28
32
|
// src/commands/proxy/har-writer.ts
|
|
29
33
|
import { createReadStream, createWriteStream, existsSync } from "node:fs";
|