@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.
Files changed (166) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +46 -8
  3. package/THIRD_PARTY_NOTICES +768 -0
  4. package/bin/cli.js +1 -1
  5. package/lib/chunks/5ILQMFXK.js +59 -0
  6. package/lib/chunks/6TSWXV6K.js +3619 -0
  7. package/lib/chunks/76SYIULE.js +92521 -0
  8. package/lib/chunks/A6JSOHCP.js +41 -0
  9. package/lib/chunks/AIT3U3JT.js +22 -0
  10. package/lib/chunks/BRJTJNID.js +92 -0
  11. package/lib/chunks/EOUEGR5D.js +1133 -0
  12. package/lib/chunks/FO6BDVGE.js +25 -0
  13. package/lib/chunks/GX6BFPR3.js +13 -0
  14. package/lib/chunks/ICAVAH7N.js +387 -0
  15. package/lib/chunks/J2A7KQMF.js +37917 -0
  16. package/lib/chunks/TS33ZDKX.js +35 -0
  17. package/lib/chunks/VNOK7MXC.js +17781 -0
  18. package/lib/chunks/VUDTNFRL.js +42 -0
  19. package/lib/chunks/VXIQEZPR.js +2564 -0
  20. package/lib/chunks/W7G5WVPB.js +44 -0
  21. package/lib/chunks/XBUQB53C.js +13374 -0
  22. package/lib/chunks/XHPY6UJF.js +1638 -0
  23. package/lib/chunks/XLXDKMB3.js +23 -0
  24. package/lib/chunks/Y6DTFCLS.js +15 -0
  25. package/lib/chunks/YKWOWQR4.js +19168 -0
  26. package/lib/index.js +13696 -710
  27. package/package.json +13 -50
  28. package/lib/__mocks__/@redocly/openapi-core.d.ts +0 -99
  29. package/lib/__mocks__/@redocly/openapi-core.js +0 -84
  30. package/lib/__mocks__/documents.d.ts +0 -150
  31. package/lib/__mocks__/documents.js +0 -123
  32. package/lib/__mocks__/fs.d.ts +0 -8
  33. package/lib/__mocks__/fs.js +0 -9
  34. package/lib/__mocks__/perf_hooks.d.ts +0 -3
  35. package/lib/__mocks__/perf_hooks.js +0 -6
  36. package/lib/__mocks__/redoc.d.ts +0 -6
  37. package/lib/__mocks__/redoc.js +0 -5
  38. package/lib/__tests__/commands/build-docs.test.d.ts +0 -1
  39. package/lib/__tests__/commands/build-docs.test.js +0 -54
  40. package/lib/__tests__/commands/bundle.test.d.ts +0 -1
  41. package/lib/__tests__/commands/bundle.test.js +0 -235
  42. package/lib/__tests__/commands/join.test.d.ts +0 -1
  43. package/lib/__tests__/commands/join.test.js +0 -274
  44. package/lib/__tests__/commands/lint.test.d.ts +0 -1
  45. package/lib/__tests__/commands/lint.test.js +0 -149
  46. package/lib/__tests__/commands/push-region.test.d.ts +0 -1
  47. package/lib/__tests__/commands/push-region.test.js +0 -90
  48. package/lib/__tests__/commands/push.test.d.ts +0 -1
  49. package/lib/__tests__/commands/push.test.js +0 -496
  50. package/lib/__tests__/fetch-with-timeout.test.d.ts +0 -1
  51. package/lib/__tests__/fetch-with-timeout.test.js +0 -64
  52. package/lib/__tests__/fixtures/config.d.ts +0 -21
  53. package/lib/__tests__/fixtures/config.js +0 -24
  54. package/lib/__tests__/spinner.test.d.ts +0 -1
  55. package/lib/__tests__/spinner.test.js +0 -43
  56. package/lib/__tests__/utils.test.d.ts +0 -1
  57. package/lib/__tests__/utils.test.js +0 -651
  58. package/lib/__tests__/wrapper.test.d.ts +0 -1
  59. package/lib/__tests__/wrapper.test.js +0 -76
  60. package/lib/auth/__tests__/device-flow.test.d.ts +0 -1
  61. package/lib/auth/__tests__/device-flow.test.js +0 -62
  62. package/lib/auth/__tests__/oauth-client.test.d.ts +0 -1
  63. package/lib/auth/__tests__/oauth-client.test.js +0 -93
  64. package/lib/auth/device-flow.d.ts +0 -26
  65. package/lib/auth/device-flow.js +0 -133
  66. package/lib/auth/oauth-client.d.ts +0 -14
  67. package/lib/auth/oauth-client.js +0 -93
  68. package/lib/commands/auth.d.ts +0 -13
  69. package/lib/commands/auth.js +0 -51
  70. package/lib/commands/build-docs/index.d.ts +0 -3
  71. package/lib/commands/build-docs/index.js +0 -39
  72. package/lib/commands/build-docs/template.hbs +0 -23
  73. package/lib/commands/build-docs/types.d.ts +0 -23
  74. package/lib/commands/build-docs/types.js +0 -2
  75. package/lib/commands/build-docs/utils.d.ts +0 -7
  76. package/lib/commands/build-docs/utils.js +0 -87
  77. package/lib/commands/bundle.d.ts +0 -14
  78. package/lib/commands/bundle.js +0 -91
  79. package/lib/commands/eject.d.ts +0 -9
  80. package/lib/commands/eject.js +0 -28
  81. package/lib/commands/join.d.ts +0 -11
  82. package/lib/commands/join.js +0 -566
  83. package/lib/commands/lint.d.ts +0 -13
  84. package/lib/commands/lint.js +0 -108
  85. package/lib/commands/preview-docs/index.d.ts +0 -12
  86. package/lib/commands/preview-docs/index.js +0 -127
  87. package/lib/commands/preview-docs/preview-server/default.hbs +0 -24
  88. package/lib/commands/preview-docs/preview-server/hot.js +0 -59
  89. package/lib/commands/preview-docs/preview-server/oauth2-redirect.html +0 -21
  90. package/lib/commands/preview-docs/preview-server/preview-server.d.ts +0 -5
  91. package/lib/commands/preview-docs/preview-server/preview-server.js +0 -113
  92. package/lib/commands/preview-docs/preview-server/server.d.ts +0 -22
  93. package/lib/commands/preview-docs/preview-server/server.js +0 -85
  94. package/lib/commands/preview-project/constants.d.ts +0 -14
  95. package/lib/commands/preview-project/constants.js +0 -22
  96. package/lib/commands/preview-project/index.d.ts +0 -3
  97. package/lib/commands/preview-project/index.js +0 -56
  98. package/lib/commands/preview-project/types.d.ts +0 -10
  99. package/lib/commands/preview-project/types.js +0 -2
  100. package/lib/commands/push.d.ts +0 -44
  101. package/lib/commands/push.js +0 -301
  102. package/lib/commands/split/__tests__/index.test.d.ts +0 -1
  103. package/lib/commands/split/__tests__/index.test.js +0 -118
  104. package/lib/commands/split/index.d.ts +0 -13
  105. package/lib/commands/split/index.js +0 -269
  106. package/lib/commands/split/types.d.ts +0 -36
  107. package/lib/commands/split/types.js +0 -51
  108. package/lib/commands/stats.d.ts +0 -8
  109. package/lib/commands/stats.js +0 -96
  110. package/lib/commands/translations.d.ts +0 -7
  111. package/lib/commands/translations.js +0 -20
  112. package/lib/index.d.ts +0 -2
  113. package/lib/otel.d.ts +0 -10
  114. package/lib/otel.js +0 -47
  115. package/lib/reunite/api/__tests__/api-keys.test.d.ts +0 -1
  116. package/lib/reunite/api/__tests__/api-keys.test.js +0 -26
  117. package/lib/reunite/api/__tests__/api.client.test.d.ts +0 -1
  118. package/lib/reunite/api/__tests__/api.client.test.js +0 -363
  119. package/lib/reunite/api/__tests__/domains.test.d.ts +0 -1
  120. package/lib/reunite/api/__tests__/domains.test.js +0 -32
  121. package/lib/reunite/api/api-client.d.ts +0 -85
  122. package/lib/reunite/api/api-client.js +0 -236
  123. package/lib/reunite/api/api-keys.d.ts +0 -1
  124. package/lib/reunite/api/api-keys.js +0 -23
  125. package/lib/reunite/api/domains.d.ts +0 -4
  126. package/lib/reunite/api/domains.js +0 -22
  127. package/lib/reunite/api/index.d.ts +0 -3
  128. package/lib/reunite/api/index.js +0 -19
  129. package/lib/reunite/api/types.d.ts +0 -102
  130. package/lib/reunite/api/types.js +0 -2
  131. package/lib/reunite/commands/__tests__/push-status.test.d.ts +0 -1
  132. package/lib/reunite/commands/__tests__/push-status.test.js +0 -563
  133. package/lib/reunite/commands/__tests__/push.test.d.ts +0 -1
  134. package/lib/reunite/commands/__tests__/push.test.js +0 -315
  135. package/lib/reunite/commands/__tests__/utils.test.d.ts +0 -1
  136. package/lib/reunite/commands/__tests__/utils.test.js +0 -51
  137. package/lib/reunite/commands/push-status.d.ts +0 -23
  138. package/lib/reunite/commands/push-status.js +0 -206
  139. package/lib/reunite/commands/push.d.ts +0 -28
  140. package/lib/reunite/commands/push.js +0 -142
  141. package/lib/reunite/commands/utils.d.ts +0 -25
  142. package/lib/reunite/commands/utils.js +0 -46
  143. package/lib/reunite/utils.d.ts +0 -2
  144. package/lib/reunite/utils.js +0 -6
  145. package/lib/types.d.ts +0 -44
  146. package/lib/types.js +0 -5
  147. package/lib/utils/__mocks__/miscellaneous.d.ts +0 -43
  148. package/lib/utils/__mocks__/miscellaneous.js +0 -24
  149. package/lib/utils/assert-node-version.d.ts +0 -1
  150. package/lib/utils/assert-node-version.js +0 -16
  151. package/lib/utils/fetch-with-timeout.d.ts +0 -6
  152. package/lib/utils/fetch-with-timeout.js +0 -24
  153. package/lib/utils/getCommandNameFromArgs.d.ts +0 -2
  154. package/lib/utils/getCommandNameFromArgs.js +0 -6
  155. package/lib/utils/js-utils.d.ts +0 -5
  156. package/lib/utils/js-utils.js +0 -28
  157. package/lib/utils/miscellaneous.d.ts +0 -84
  158. package/lib/utils/miscellaneous.js +0 -563
  159. package/lib/utils/platform.d.ts +0 -16
  160. package/lib/utils/platform.js +0 -34
  161. package/lib/utils/spinner.d.ts +0 -10
  162. package/lib/utils/spinner.js +0 -42
  163. package/lib/utils/update-version-notifier.d.ts +0 -3
  164. package/lib/utils/update-version-notifier.js +0 -102
  165. package/lib/wrapper.d.ts +0 -11
  166. 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 OpenAPI utility.
4
- It builds, manages, improves, and quality-checks your OpenAPI descriptions, all of which comes in handy for various phases of the API Lifecycle.
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
  ![build and test](https://github.com/redocly/redocly-cli/actions/workflows/tests.yaml/badge.svg)
9
9
  ![npm (scoped)](https://img.shields.io/npm/v/@redocly/cli)
@@ -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
  ![OpenAPI CLI toolset](./media/redocly-cli.gif)
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@v1-archive lint path-to-root-file.yaml
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@v1-archive -g
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 18.17.0 and 10.8.2 respectively.
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 OpenAPI structure.
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.