@redocly/cli 0.0.0-snapshot.1784280563 → 0.0.0-snapshot.1784539614
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 -1
- package/lib/chunks/{A6JSOHCP.js → 33L3PA3A.js} +7 -3
- package/lib/chunks/{Y6DTFCLS.js → 7COZBK76.js} +4 -0
- package/lib/chunks/{TS33ZDKX.js → 7J52NJGJ.js} +6 -2
- package/lib/chunks/{OR35UHGS.js → 7KURJ5BG.js} +5 -37
- package/lib/chunks/{MQK4YYBQ.js → 7ZX5BRYM.js} +12 -6
- package/lib/chunks/{AIT3U3JT.js → AVTQDJLQ.js} +5 -1
- package/lib/chunks/{YBQMDKQZ.js → COXGJME3.js} +14 -10
- package/lib/chunks/DK5BKBUM.js +233555 -0
- package/lib/chunks/{F3KLNLJE.js → ET6HQMJ4.js} +12 -6
- package/lib/chunks/GTF4ZEYE.js +31 -0
- package/lib/chunks/{VXIQEZPR.js → HXIHIVQ5.js} +1111 -465
- package/lib/chunks/{2KWNG6WF.js → HZGLH6IL.js} +4379 -22953
- package/lib/chunks/{4GOXJYSF.js → ILONDAA7.js} +14 -8
- package/lib/chunks/{4FB5ZIPP.js → JPNXFCZJ.js} +6 -2
- package/lib/chunks/{CGU7XZIB.js → KLO7CDY7.js} +17 -10
- package/lib/chunks/LB7P2Z4P.js +18618 -0
- package/lib/chunks/{XHPY6UJF.js → LJH34AHG.js} +5 -1
- package/lib/chunks/{XQ5TNOKQ.js → M2OBQBSG.js} +11 -5
- package/lib/chunks/{IKJFCDSF.js → O6AZ7DJE.js} +5 -1
- 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/{ICPYP2LP.js → QVWJKMKN.js} +5 -1
- package/lib/chunks/{FPDTUBRU.js → QYC3LBLD.js} +15 -9
- package/lib/chunks/R6OW7D52.js +22 -0
- package/lib/chunks/U67JD6LZ.js +135 -0
- package/lib/chunks/{C7ULSAWA.js → UGBGVHU4.js} +69 -63
- package/lib/chunks/{ZBLVUJKR.js → V2CN5DDQ.js} +6 -1
- package/lib/chunks/{CVULHLVL.js → VUIDNMZP.js} +9 -3
- 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/YN7LN332.js +45 -0
- package/lib/chunks/ZON7IBIS.js +45 -0
- package/lib/index.js +269 -35
- package/package.json +1 -1
- package/lib/chunks/SZQELUV3.js +0 -25
- 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:
|
|
@@ -651,6 +652,7 @@ Packages:
|
|
|
651
652
|
@redocly/config@0.51.0 — Copyright 2024 Redocly Inc.
|
|
652
653
|
@redocly/openapi-core@1.34.16
|
|
653
654
|
@redocly/openapi-core@2.39.0
|
|
655
|
+
@redocly/openapi-core@2.39.0
|
|
654
656
|
@redocly/respect-core@2.39.0
|
|
655
657
|
agent-base@7.1.4 — Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
|
656
658
|
ajv-formats@3.0.1 — Copyright (c) 2020 Evgeny Poberezkin
|
|
@@ -691,10 +693,11 @@ Packages:
|
|
|
691
693
|
mobx@6.12.3 — Copyright (c) 2015 Michel Weststrate
|
|
692
694
|
ms@2.1.3
|
|
693
695
|
object-assign@4.1.1
|
|
694
|
-
openapi-sampler@1.7.
|
|
696
|
+
openapi-sampler@1.7.4 — Copyright (c) 2017 Roman Hotsiy <gotsijroman@gmail.com>
|
|
695
697
|
outdent@0.8.0 — Copyright (c) 2016 Andrew Bradley
|
|
696
698
|
perfect-scrollbar@1.5.6 — Copyright (c) 2012-2019 Hyunje Jun, MDBootstrap.com and other contributors
|
|
697
699
|
picomatch@4.0.5 — Copyright (c) 2017-present, Jon Schlinkert.
|
|
700
|
+
picomatch@4.0.5 — Copyright (c) 2017-present, Jon Schlinkert.
|
|
698
701
|
pluralize@8.0.0 — Copyright (c) 2013 Blake Embrey (hello@blakeembrey.com)
|
|
699
702
|
polished@4.3.1 — Copyright (c) 2016-Present Brian Hough and Maximilian Stoiber
|
|
700
703
|
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,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,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
|
__commonJS
|
|
5
|
-
} from "./
|
|
9
|
+
} from "./YDPUXTSG.js";
|
|
6
10
|
|
|
7
11
|
// ../../node_modules/graphql/version.js
|
|
8
12
|
var require_version = __commonJS({
|
|
@@ -20231,42 +20235,6 @@ var require_graphql2 = __commonJS({
|
|
|
20231
20235
|
}
|
|
20232
20236
|
});
|
|
20233
20237
|
|
|
20234
|
-
// node_modules/@redocly/openapi-core/lib/utils/is-defined.js
|
|
20235
|
-
function isDefined(x) {
|
|
20236
|
-
return x !== void 0;
|
|
20237
|
-
}
|
|
20238
|
-
|
|
20239
|
-
// node_modules/@redocly/openapi-core/lib/config/rules.js
|
|
20240
|
-
function initRules(rules, config, type, specVersion) {
|
|
20241
|
-
return rules.flatMap((ruleset) => Object.keys(ruleset).map((ruleId) => {
|
|
20242
|
-
const rule = ruleset[ruleId];
|
|
20243
|
-
const ruleSettings = type === "rules" ? config.getRuleSettings(ruleId, specVersion) : type === "preprocessors" ? config.getPreprocessorSettings(ruleId, specVersion) : config.getDecoratorSettings(ruleId, specVersion);
|
|
20244
|
-
if (ruleSettings.severity === "off") {
|
|
20245
|
-
return void 0;
|
|
20246
|
-
}
|
|
20247
|
-
const severity = ruleSettings.severity;
|
|
20248
|
-
const message = ruleSettings.message;
|
|
20249
|
-
const visitors = rule(ruleSettings);
|
|
20250
|
-
if (Array.isArray(visitors)) {
|
|
20251
|
-
return visitors.map((visitor) => ({
|
|
20252
|
-
severity,
|
|
20253
|
-
ruleId,
|
|
20254
|
-
message,
|
|
20255
|
-
visitor
|
|
20256
|
-
}));
|
|
20257
|
-
}
|
|
20258
|
-
return {
|
|
20259
|
-
severity,
|
|
20260
|
-
message,
|
|
20261
|
-
ruleId,
|
|
20262
|
-
visitor: visitors
|
|
20263
|
-
// note: actually it is only one visitor object
|
|
20264
|
-
};
|
|
20265
|
-
})).flatMap((visitor) => visitor).filter(isDefined);
|
|
20266
|
-
}
|
|
20267
|
-
|
|
20268
20238
|
export {
|
|
20269
|
-
isDefined,
|
|
20270
|
-
initRules,
|
|
20271
20239
|
require_graphql2 as require_graphql
|
|
20272
20240
|
};
|
|
@@ -1,19 +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
|
AbortFlowError,
|
|
5
9
|
exitWithError
|
|
6
|
-
} from "./
|
|
10
|
+
} from "./O6AZ7DJE.js";
|
|
7
11
|
import {
|
|
8
12
|
ConfigValidationError,
|
|
9
13
|
HandledError,
|
|
10
14
|
ResolveError,
|
|
11
15
|
YamlParseError,
|
|
12
|
-
blue,
|
|
13
16
|
formatProblems,
|
|
14
17
|
getTotals,
|
|
15
|
-
gray,
|
|
16
|
-
green,
|
|
17
18
|
isAbsoluteUrl,
|
|
18
19
|
isEmptyObject,
|
|
19
20
|
isNotEmptyArray,
|
|
@@ -24,10 +25,15 @@ import {
|
|
|
24
25
|
logger,
|
|
25
26
|
parseYaml,
|
|
26
27
|
pluralize,
|
|
28
|
+
stringifyYaml
|
|
29
|
+
} from "./LB7P2Z4P.js";
|
|
30
|
+
import {
|
|
31
|
+
blue,
|
|
32
|
+
gray,
|
|
33
|
+
green,
|
|
27
34
|
red,
|
|
28
|
-
stringifyYaml,
|
|
29
35
|
yellow
|
|
30
|
-
} from "./
|
|
36
|
+
} from "./HZGLH6IL.js";
|
|
31
37
|
|
|
32
38
|
// src/commands/lint.ts
|
|
33
39
|
import { performance as performance3 } from "perf_hooks";
|
|
@@ -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,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 "./V2CN5DDQ.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
|
}
|