@redocly/cli 0.0.0-snapshot.1782825774 → 0.0.0-snapshot.1783058823
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/LICENSE +7 -0
- package/README.md +46 -8
- package/THIRD_PARTY_NOTICES +768 -0
- package/bin/cli.js +1 -1
- package/lib/chunks/5ILQMFXK.js +59 -0
- package/lib/chunks/6TSWXV6K.js +3619 -0
- package/lib/chunks/76SYIULE.js +92521 -0
- package/lib/chunks/A6JSOHCP.js +41 -0
- package/lib/chunks/AIT3U3JT.js +22 -0
- package/lib/chunks/BRJTJNID.js +92 -0
- package/lib/chunks/EOUEGR5D.js +1133 -0
- package/lib/chunks/FO6BDVGE.js +25 -0
- package/lib/chunks/GX6BFPR3.js +13 -0
- package/lib/chunks/ICAVAH7N.js +387 -0
- package/lib/chunks/J2A7KQMF.js +37917 -0
- package/lib/chunks/TS33ZDKX.js +35 -0
- package/lib/chunks/VNOK7MXC.js +17781 -0
- package/lib/chunks/VUDTNFRL.js +42 -0
- package/lib/chunks/VXIQEZPR.js +2564 -0
- package/lib/chunks/W7G5WVPB.js +44 -0
- package/lib/chunks/XBUQB53C.js +13374 -0
- package/lib/chunks/XHPY6UJF.js +1638 -0
- package/lib/chunks/XLXDKMB3.js +23 -0
- package/lib/chunks/Y6DTFCLS.js +15 -0
- package/lib/chunks/YKWOWQR4.js +19168 -0
- package/lib/index.js +13696 -710
- package/package.json +13 -50
- package/lib/__mocks__/@redocly/openapi-core.d.ts +0 -99
- package/lib/__mocks__/@redocly/openapi-core.js +0 -84
- package/lib/__mocks__/documents.d.ts +0 -150
- package/lib/__mocks__/documents.js +0 -123
- package/lib/__mocks__/fs.d.ts +0 -8
- package/lib/__mocks__/fs.js +0 -9
- package/lib/__mocks__/perf_hooks.d.ts +0 -3
- package/lib/__mocks__/perf_hooks.js +0 -6
- package/lib/__mocks__/redoc.d.ts +0 -6
- package/lib/__mocks__/redoc.js +0 -5
- package/lib/__tests__/commands/build-docs.test.d.ts +0 -1
- package/lib/__tests__/commands/build-docs.test.js +0 -54
- package/lib/__tests__/commands/bundle.test.d.ts +0 -1
- package/lib/__tests__/commands/bundle.test.js +0 -235
- package/lib/__tests__/commands/join.test.d.ts +0 -1
- package/lib/__tests__/commands/join.test.js +0 -274
- package/lib/__tests__/commands/lint.test.d.ts +0 -1
- package/lib/__tests__/commands/lint.test.js +0 -149
- package/lib/__tests__/commands/push-region.test.d.ts +0 -1
- package/lib/__tests__/commands/push-region.test.js +0 -90
- package/lib/__tests__/commands/push.test.d.ts +0 -1
- package/lib/__tests__/commands/push.test.js +0 -496
- package/lib/__tests__/fetch-with-timeout.test.d.ts +0 -1
- package/lib/__tests__/fetch-with-timeout.test.js +0 -64
- package/lib/__tests__/fixtures/config.d.ts +0 -21
- package/lib/__tests__/fixtures/config.js +0 -24
- package/lib/__tests__/spinner.test.d.ts +0 -1
- package/lib/__tests__/spinner.test.js +0 -43
- package/lib/__tests__/utils.test.d.ts +0 -1
- package/lib/__tests__/utils.test.js +0 -651
- package/lib/__tests__/wrapper.test.d.ts +0 -1
- package/lib/__tests__/wrapper.test.js +0 -76
- package/lib/auth/__tests__/device-flow.test.d.ts +0 -1
- package/lib/auth/__tests__/device-flow.test.js +0 -62
- package/lib/auth/__tests__/oauth-client.test.d.ts +0 -1
- package/lib/auth/__tests__/oauth-client.test.js +0 -93
- package/lib/auth/device-flow.d.ts +0 -26
- package/lib/auth/device-flow.js +0 -133
- package/lib/auth/oauth-client.d.ts +0 -14
- package/lib/auth/oauth-client.js +0 -93
- package/lib/commands/auth.d.ts +0 -13
- package/lib/commands/auth.js +0 -51
- package/lib/commands/build-docs/index.d.ts +0 -3
- package/lib/commands/build-docs/index.js +0 -39
- package/lib/commands/build-docs/template.hbs +0 -23
- package/lib/commands/build-docs/types.d.ts +0 -23
- package/lib/commands/build-docs/types.js +0 -2
- package/lib/commands/build-docs/utils.d.ts +0 -7
- package/lib/commands/build-docs/utils.js +0 -87
- package/lib/commands/bundle.d.ts +0 -14
- package/lib/commands/bundle.js +0 -91
- package/lib/commands/eject.d.ts +0 -9
- package/lib/commands/eject.js +0 -28
- package/lib/commands/join.d.ts +0 -11
- package/lib/commands/join.js +0 -566
- package/lib/commands/lint.d.ts +0 -13
- package/lib/commands/lint.js +0 -108
- package/lib/commands/preview-docs/index.d.ts +0 -12
- package/lib/commands/preview-docs/index.js +0 -127
- package/lib/commands/preview-docs/preview-server/default.hbs +0 -24
- package/lib/commands/preview-docs/preview-server/hot.js +0 -59
- package/lib/commands/preview-docs/preview-server/oauth2-redirect.html +0 -21
- package/lib/commands/preview-docs/preview-server/preview-server.d.ts +0 -5
- package/lib/commands/preview-docs/preview-server/preview-server.js +0 -113
- package/lib/commands/preview-docs/preview-server/server.d.ts +0 -22
- package/lib/commands/preview-docs/preview-server/server.js +0 -85
- package/lib/commands/preview-project/constants.d.ts +0 -14
- package/lib/commands/preview-project/constants.js +0 -22
- package/lib/commands/preview-project/index.d.ts +0 -3
- package/lib/commands/preview-project/index.js +0 -56
- package/lib/commands/preview-project/types.d.ts +0 -10
- package/lib/commands/preview-project/types.js +0 -2
- package/lib/commands/push.d.ts +0 -44
- package/lib/commands/push.js +0 -301
- package/lib/commands/split/__tests__/index.test.d.ts +0 -1
- package/lib/commands/split/__tests__/index.test.js +0 -118
- package/lib/commands/split/index.d.ts +0 -13
- package/lib/commands/split/index.js +0 -269
- package/lib/commands/split/types.d.ts +0 -36
- package/lib/commands/split/types.js +0 -51
- package/lib/commands/stats.d.ts +0 -8
- package/lib/commands/stats.js +0 -96
- package/lib/commands/translations.d.ts +0 -7
- package/lib/commands/translations.js +0 -20
- package/lib/index.d.ts +0 -2
- package/lib/otel.d.ts +0 -10
- package/lib/otel.js +0 -47
- package/lib/reunite/api/__tests__/api-keys.test.d.ts +0 -1
- package/lib/reunite/api/__tests__/api-keys.test.js +0 -26
- package/lib/reunite/api/__tests__/api.client.test.d.ts +0 -1
- package/lib/reunite/api/__tests__/api.client.test.js +0 -363
- package/lib/reunite/api/__tests__/domains.test.d.ts +0 -1
- package/lib/reunite/api/__tests__/domains.test.js +0 -32
- package/lib/reunite/api/api-client.d.ts +0 -85
- package/lib/reunite/api/api-client.js +0 -236
- package/lib/reunite/api/api-keys.d.ts +0 -1
- package/lib/reunite/api/api-keys.js +0 -23
- package/lib/reunite/api/domains.d.ts +0 -4
- package/lib/reunite/api/domains.js +0 -22
- package/lib/reunite/api/index.d.ts +0 -3
- package/lib/reunite/api/index.js +0 -19
- package/lib/reunite/api/types.d.ts +0 -102
- package/lib/reunite/api/types.js +0 -2
- package/lib/reunite/commands/__tests__/push-status.test.d.ts +0 -1
- package/lib/reunite/commands/__tests__/push-status.test.js +0 -563
- package/lib/reunite/commands/__tests__/push.test.d.ts +0 -1
- package/lib/reunite/commands/__tests__/push.test.js +0 -315
- package/lib/reunite/commands/__tests__/utils.test.d.ts +0 -1
- package/lib/reunite/commands/__tests__/utils.test.js +0 -51
- package/lib/reunite/commands/push-status.d.ts +0 -23
- package/lib/reunite/commands/push-status.js +0 -206
- package/lib/reunite/commands/push.d.ts +0 -28
- package/lib/reunite/commands/push.js +0 -142
- package/lib/reunite/commands/utils.d.ts +0 -25
- package/lib/reunite/commands/utils.js +0 -46
- package/lib/reunite/utils.d.ts +0 -2
- package/lib/reunite/utils.js +0 -6
- package/lib/types.d.ts +0 -44
- package/lib/types.js +0 -5
- package/lib/utils/__mocks__/miscellaneous.d.ts +0 -43
- package/lib/utils/__mocks__/miscellaneous.js +0 -24
- package/lib/utils/assert-node-version.d.ts +0 -1
- package/lib/utils/assert-node-version.js +0 -16
- package/lib/utils/fetch-with-timeout.d.ts +0 -6
- package/lib/utils/fetch-with-timeout.js +0 -24
- package/lib/utils/getCommandNameFromArgs.d.ts +0 -2
- package/lib/utils/getCommandNameFromArgs.js +0 -6
- package/lib/utils/js-utils.d.ts +0 -5
- package/lib/utils/js-utils.js +0 -28
- package/lib/utils/miscellaneous.d.ts +0 -84
- package/lib/utils/miscellaneous.js +0 -563
- package/lib/utils/platform.d.ts +0 -16
- package/lib/utils/platform.js +0 -34
- package/lib/utils/spinner.d.ts +0 -10
- package/lib/utils/spinner.js +0 -42
- package/lib/utils/update-version-notifier.d.ts +0 -3
- package/lib/utils/update-version-notifier.js +0 -102
- package/lib/wrapper.d.ts +0 -11
- package/lib/wrapper.js +0 -67
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2019 Redocly Inc.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Redocly CLI
|
|
2
2
|
|
|
3
|
-
[@Redocly](https://redocly.com) CLI is your all-in-one
|
|
4
|
-
It builds, manages, improves, and quality-checks your
|
|
3
|
+
[@Redocly](https://redocly.com) CLI is your all-in-one API documentation utility.
|
|
4
|
+
It builds, manages, improves, and quality-checks your API descriptions, all of which comes in handy for various phases of the API Lifecycle.
|
|
5
5
|
Create your own rulesets to make API governance easy, publish beautiful API reference documentation, and more.
|
|
6
|
-
Supports OpenAPI 3.1, 3.0 and OpenAPI 2.0 (legacy Swagger), AsyncAPI 3.0 and 2.6, Arazzo 1.0.
|
|
6
|
+
Supports OpenAPI 3.2, 3.1, 3.0 and OpenAPI 2.0 (legacy Swagger), AsyncAPI 3.0 and 2.6, Arazzo 1.0.
|
|
7
7
|
|
|
8
8
|

|
|
9
9
|

|
|
@@ -11,18 +11,23 @@ Supports OpenAPI 3.1, 3.0 and OpenAPI 2.0 (legacy Swagger), AsyncAPI 3.0 and 2.6
|
|
|
11
11
|
|
|
12
12
|

|
|
13
13
|
|
|
14
|
+
## Migration
|
|
15
|
+
|
|
16
|
+
Migrating from Redocly CLI v1 to v2?
|
|
17
|
+
Here's the [guide](https://redocly.com/docs/cli/guides/migrate-to-v2) to make the transition smoother.
|
|
18
|
+
|
|
14
19
|
## Usage
|
|
15
20
|
|
|
16
21
|
### Node
|
|
17
22
|
|
|
18
23
|
```sh
|
|
19
|
-
npx @redocly/cli@
|
|
24
|
+
npx @redocly/cli@latest lint path-to-root-file.yaml
|
|
20
25
|
```
|
|
21
26
|
|
|
22
27
|
Alternatively, install it globally with `npm`:
|
|
23
28
|
|
|
24
29
|
```sh
|
|
25
|
-
npm install @redocly/cli
|
|
30
|
+
npm install @redocly/cli -g
|
|
26
31
|
```
|
|
27
32
|
|
|
28
33
|
Then you can use it as `redocly [command] [options]`, for example:
|
|
@@ -31,7 +36,7 @@ Then you can use it as `redocly [command] [options]`, for example:
|
|
|
31
36
|
redocly lint path-to-root-file.yaml
|
|
32
37
|
```
|
|
33
38
|
|
|
34
|
-
The minimum required versions of Node.js and NPM are
|
|
39
|
+
The minimum required versions of Node.js and NPM are 22.12.0 and 10.9.2 respectively.
|
|
35
40
|
|
|
36
41
|
### Docker
|
|
37
42
|
|
|
@@ -91,8 +96,8 @@ redocly lint openapi.yaml
|
|
|
91
96
|
```
|
|
92
97
|
|
|
93
98
|
**Configure the rules** as you wish.
|
|
94
|
-
Other API Linters use complicated identifiers like JSONPath, but Redocly makes life easy with simple expressions that understand the
|
|
95
|
-
You can either use the [built-in rules](https://redocly.com/docs/cli/rules) to mix-and-match your ideal API guidelines, or break out the tools to build your own.
|
|
99
|
+
Other API Linters use complicated identifiers like JSONPath, but Redocly makes life easy with simple expressions that understand the API specification structure.
|
|
100
|
+
You can either use the [built-in rules](https://redocly.com/docs/cli/rules) to mix-and-match your ideal API guidelines, or break out the tools to [build your own](https://redocly.com/docs/cli/rules#rule-ideas).
|
|
96
101
|
|
|
97
102
|
**Format the output** in whatever way you need.
|
|
98
103
|
The `stylish` output is as good as it sounds, but if you need JSON, Markdown, Checkstyle and other outputs to integrate with other tools, the `lint` command can output those too.
|
|
@@ -101,6 +106,39 @@ The `stylish` output is as good as it sounds, but if you need JSON, Markdown, Ch
|
|
|
101
106
|
|
|
102
107
|
[Learn more about API standards and configuring Redocly rules](https://redocly.com/docs/cli/api-standards).
|
|
103
108
|
|
|
109
|
+
Looking for more examples? Check out our [Cookbook](https://github.com/Redocly/redocly-cli-cookbook).
|
|
110
|
+
|
|
111
|
+
### API contract testing with Respect
|
|
112
|
+
|
|
113
|
+
Ensure your APIs match their OpenAPI descriptions with **Respect**, Redocly's API contract testing system. Respect sends real HTTP requests to your API server and validates that responses match the expectations defined in your OpenAPI description and Arazzo workflows.
|
|
114
|
+
|
|
115
|
+
- Verify API responses match your OpenAPI schema
|
|
116
|
+
- Test complex API sequences using OpenAPI Arazzo format
|
|
117
|
+
- Catch API drift early in development and CI/CD
|
|
118
|
+
- Ensure external APIs you depend on behave as expected
|
|
119
|
+
- Track response times and detect anomalies
|
|
120
|
+
|
|
121
|
+
#### Quick start
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
# Generate test workflows from your OpenAPI spec
|
|
125
|
+
redocly generate-arazzo openapi.yaml
|
|
126
|
+
|
|
127
|
+
# Run contract tests against your API
|
|
128
|
+
redocly respect auto-generated.arazzo.yaml --verbose
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
#### Respect vs. Respect Monitoring
|
|
132
|
+
|
|
133
|
+
Respect is Redocly's community-edition product. Looking for something more? We also offer continuous API monitoring with additional features including:
|
|
134
|
+
|
|
135
|
+
- Real-time insights
|
|
136
|
+
- Automated alerts via email or Slack
|
|
137
|
+
- Automated API checks
|
|
138
|
+
- Proactive API quality assurance
|
|
139
|
+
|
|
140
|
+
Learn more about [Respect](https://redocly.com/respect) and [get started with API contract testing](https://redocly.com/docs/respect/get-started).
|
|
141
|
+
|
|
104
142
|
### Transform an OpenAPI description
|
|
105
143
|
|
|
106
144
|
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.
|