@redocly/cli 0.0.0-snapshot.1777550486 → 0.0.0-snapshot.1777557756

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 (631) hide show
  1. package/README.md +8 -46
  2. package/bin/cli.js +1 -1
  3. package/lib/__mocks__/@redocly/openapi-core.d.ts +99 -0
  4. package/lib/__mocks__/@redocly/openapi-core.js +84 -0
  5. package/lib/__mocks__/documents.d.ts +150 -0
  6. package/lib/__mocks__/documents.js +123 -0
  7. package/lib/__mocks__/fs.d.ts +8 -0
  8. package/lib/__mocks__/fs.js +9 -0
  9. package/lib/__mocks__/perf_hooks.d.ts +3 -0
  10. package/lib/__mocks__/perf_hooks.js +6 -0
  11. package/lib/__mocks__/redoc.d.ts +6 -0
  12. package/lib/__mocks__/redoc.js +5 -0
  13. package/lib/__tests__/commands/build-docs.test.d.ts +1 -0
  14. package/lib/__tests__/commands/build-docs.test.js +54 -0
  15. package/lib/__tests__/commands/bundle.test.d.ts +1 -0
  16. package/lib/__tests__/commands/bundle.test.js +235 -0
  17. package/lib/__tests__/commands/join.test.d.ts +1 -0
  18. package/lib/__tests__/commands/join.test.js +274 -0
  19. package/lib/__tests__/commands/lint.test.d.ts +1 -0
  20. package/lib/__tests__/commands/lint.test.js +149 -0
  21. package/lib/__tests__/commands/push-region.test.d.ts +1 -0
  22. package/lib/__tests__/commands/push-region.test.js +90 -0
  23. package/lib/__tests__/commands/push.test.d.ts +1 -0
  24. package/lib/__tests__/commands/push.test.js +496 -0
  25. package/lib/__tests__/fetch-with-timeout.test.d.ts +1 -0
  26. package/lib/__tests__/fetch-with-timeout.test.js +64 -0
  27. package/lib/__tests__/fixtures/config.d.ts +21 -0
  28. package/lib/__tests__/fixtures/config.js +24 -0
  29. package/lib/__tests__/spinner.test.d.ts +1 -0
  30. package/lib/__tests__/spinner.test.js +43 -0
  31. package/lib/__tests__/utils.test.d.ts +1 -0
  32. package/lib/__tests__/utils.test.js +651 -0
  33. package/lib/__tests__/wrapper.test.d.ts +1 -0
  34. package/lib/__tests__/wrapper.test.js +76 -0
  35. package/lib/auth/__tests__/device-flow.test.d.ts +1 -0
  36. package/lib/auth/__tests__/device-flow.test.js +62 -0
  37. package/lib/auth/__tests__/oauth-client.test.d.ts +1 -0
  38. package/lib/auth/__tests__/oauth-client.test.js +93 -0
  39. package/lib/auth/device-flow.d.ts +12 -10
  40. package/lib/auth/device-flow.js +25 -32
  41. package/lib/auth/oauth-client.d.ts +10 -14
  42. package/lib/auth/oauth-client.js +59 -83
  43. package/lib/commands/auth.d.ts +8 -7
  44. package/lib/commands/auth.js +43 -26
  45. package/lib/commands/build-docs/index.d.ts +3 -4
  46. package/lib/commands/build-docs/index.js +25 -24
  47. package/lib/commands/build-docs/types.d.ts +1 -2
  48. package/lib/commands/build-docs/types.js +2 -2
  49. package/lib/commands/build-docs/utils.d.ts +2 -3
  50. package/lib/commands/build-docs/utils.js +38 -35
  51. package/lib/commands/bundle.d.ts +6 -11
  52. package/lib/commands/bundle.js +40 -41
  53. package/lib/commands/eject.d.ts +4 -5
  54. package/lib/commands/eject.js +13 -11
  55. package/lib/commands/join.d.ts +11 -0
  56. package/lib/commands/join.js +566 -0
  57. package/lib/commands/lint.d.ts +8 -10
  58. package/lib/commands/lint.js +64 -57
  59. package/lib/commands/preview-docs/index.d.ts +12 -0
  60. package/lib/commands/preview-docs/index.js +127 -0
  61. package/lib/commands/preview-docs/preview-server/default.hbs +24 -0
  62. package/lib/commands/preview-docs/preview-server/hot.js +59 -0
  63. package/lib/commands/preview-docs/preview-server/oauth2-redirect.html +21 -0
  64. package/lib/commands/preview-docs/preview-server/preview-server.d.ts +5 -0
  65. package/lib/commands/preview-docs/preview-server/preview-server.js +113 -0
  66. package/lib/commands/preview-docs/preview-server/server.d.ts +22 -0
  67. package/lib/commands/preview-docs/preview-server/server.js +85 -0
  68. package/lib/commands/preview-project/constants.d.ts +1 -2
  69. package/lib/commands/preview-project/constants.js +6 -4
  70. package/lib/commands/preview-project/index.d.ts +3 -4
  71. package/lib/commands/preview-project/index.js +23 -21
  72. package/lib/commands/preview-project/types.d.ts +4 -5
  73. package/lib/commands/preview-project/types.js +2 -2
  74. package/lib/commands/push.d.ts +44 -0
  75. package/lib/commands/push.js +301 -0
  76. package/lib/commands/split/__tests__/index.test.d.ts +1 -0
  77. package/lib/commands/split/__tests__/index.test.js +91 -0
  78. package/lib/commands/split/index.d.ts +12 -5
  79. package/lib/commands/split/index.js +258 -45
  80. package/lib/commands/split/types.d.ts +30 -22
  81. package/lib/commands/split/types.js +51 -2
  82. package/lib/commands/stats.d.ts +8 -0
  83. package/lib/commands/stats.js +96 -0
  84. package/lib/commands/translations.d.ts +4 -5
  85. package/lib/commands/translations.js +13 -11
  86. package/lib/index.d.ts +1 -2
  87. package/lib/index.js +260 -189
  88. package/lib/otel.d.ts +10 -0
  89. package/lib/otel.js +47 -0
  90. package/lib/reunite/api/__tests__/api-keys.test.d.ts +1 -0
  91. package/lib/reunite/api/__tests__/api-keys.test.js +26 -0
  92. package/lib/reunite/api/__tests__/api.client.test.d.ts +1 -0
  93. package/lib/reunite/api/__tests__/api.client.test.js +385 -0
  94. package/lib/reunite/api/__tests__/domains.test.d.ts +1 -0
  95. package/lib/reunite/api/__tests__/domains.test.js +32 -0
  96. package/lib/reunite/api/api-client.d.ts +8 -6
  97. package/lib/reunite/api/api-client.js +42 -56
  98. package/lib/reunite/api/api-keys.d.ts +1 -2
  99. package/lib/reunite/api/api-keys.js +20 -4
  100. package/lib/reunite/api/domains.d.ts +3 -11
  101. package/lib/reunite/api/domains.js +16 -46
  102. package/lib/reunite/api/index.d.ts +3 -4
  103. package/lib/reunite/api/index.js +19 -4
  104. package/lib/reunite/api/types.d.ts +0 -1
  105. package/lib/reunite/api/types.js +2 -2
  106. package/lib/reunite/commands/__tests__/push-status.test.d.ts +1 -0
  107. package/lib/reunite/commands/__tests__/push-status.test.js +563 -0
  108. package/lib/reunite/commands/__tests__/push.test.d.ts +1 -0
  109. package/lib/reunite/commands/__tests__/push.test.js +315 -0
  110. package/lib/reunite/commands/__tests__/utils.test.d.ts +1 -0
  111. package/lib/reunite/commands/__tests__/utils.test.js +51 -0
  112. package/lib/reunite/commands/push-status.d.ts +7 -8
  113. package/lib/reunite/commands/push-status.js +37 -30
  114. package/lib/reunite/commands/push.d.ts +9 -9
  115. package/lib/reunite/commands/push.js +41 -34
  116. package/lib/reunite/commands/utils.d.ts +3 -4
  117. package/lib/reunite/commands/utils.js +12 -15
  118. package/lib/reunite/utils.d.ts +0 -1
  119. package/lib/reunite/utils.js +5 -2
  120. package/lib/types.d.ts +30 -19
  121. package/lib/types.js +5 -2
  122. package/lib/utils/__mocks__/miscellaneous.d.ts +43 -0
  123. package/lib/utils/__mocks__/miscellaneous.js +24 -0
  124. package/lib/utils/assert-node-version.d.ts +0 -1
  125. package/lib/utils/assert-node-version.js +10 -8
  126. package/lib/utils/fetch-with-timeout.d.ts +1 -1
  127. package/lib/utils/fetch-with-timeout.js +17 -17
  128. package/lib/utils/{get-command-name-from-args.d.ts → getCommandNameFromArgs.d.ts} +0 -1
  129. package/lib/utils/getCommandNameFromArgs.js +6 -0
  130. package/lib/utils/js-utils.d.ts +5 -0
  131. package/lib/utils/js-utils.js +28 -0
  132. package/lib/utils/miscellaneous.d.ts +56 -18
  133. package/lib/utils/miscellaneous.js +323 -200
  134. package/lib/utils/platform.d.ts +0 -1
  135. package/lib/utils/platform.js +9 -5
  136. package/lib/utils/spinner.d.ts +0 -1
  137. package/lib/utils/spinner.js +10 -12
  138. package/lib/utils/update-version-notifier.d.ts +1 -1
  139. package/lib/utils/update-version-notifier.js +38 -36
  140. package/lib/wrapper.d.ts +5 -5
  141. package/lib/wrapper.js +27 -52
  142. package/package.json +31 -35
  143. package/lib/auth/device-flow.d.ts.map +0 -1
  144. package/lib/auth/device-flow.js.map +0 -1
  145. package/lib/auth/oauth-client.d.ts.map +0 -1
  146. package/lib/auth/oauth-client.js.map +0 -1
  147. package/lib/commands/auth.d.ts.map +0 -1
  148. package/lib/commands/auth.js.map +0 -1
  149. package/lib/commands/build-docs/index.d.ts.map +0 -1
  150. package/lib/commands/build-docs/index.js.map +0 -1
  151. package/lib/commands/build-docs/types.d.ts.map +0 -1
  152. package/lib/commands/build-docs/types.js.map +0 -1
  153. package/lib/commands/build-docs/utils.d.ts.map +0 -1
  154. package/lib/commands/build-docs/utils.js.map +0 -1
  155. package/lib/commands/bundle.d.ts.map +0 -1
  156. package/lib/commands/bundle.js.map +0 -1
  157. package/lib/commands/eject.d.ts.map +0 -1
  158. package/lib/commands/eject.js.map +0 -1
  159. package/lib/commands/generate-arazzo.d.ts +0 -8
  160. package/lib/commands/generate-arazzo.d.ts.map +0 -1
  161. package/lib/commands/generate-arazzo.js +0 -25
  162. package/lib/commands/generate-arazzo.js.map +0 -1
  163. package/lib/commands/join/index.d.ts +0 -4
  164. package/lib/commands/join/index.d.ts.map +0 -1
  165. package/lib/commands/join/index.js +0 -141
  166. package/lib/commands/join/index.js.map +0 -1
  167. package/lib/commands/join/types.d.ts +0 -22
  168. package/lib/commands/join/types.d.ts.map +0 -1
  169. package/lib/commands/join/types.js +0 -2
  170. package/lib/commands/join/types.js.map +0 -1
  171. package/lib/commands/join/utils/add-components-prefix.d.ts +0 -2
  172. package/lib/commands/join/utils/add-components-prefix.d.ts.map +0 -1
  173. package/lib/commands/join/utils/add-components-prefix.js +0 -9
  174. package/lib/commands/join/utils/add-components-prefix.js.map +0 -1
  175. package/lib/commands/join/utils/add-info-section.d.ts +0 -2
  176. package/lib/commands/join/utils/add-info-section.d.ts.map +0 -1
  177. package/lib/commands/join/utils/add-info-section.js +0 -19
  178. package/lib/commands/join/utils/add-info-section.js.map +0 -1
  179. package/lib/commands/join/utils/add-prefix.d.ts +0 -2
  180. package/lib/commands/join/utils/add-prefix.d.ts.map +0 -1
  181. package/lib/commands/join/utils/add-prefix.js +0 -4
  182. package/lib/commands/join/utils/add-prefix.js.map +0 -1
  183. package/lib/commands/join/utils/add-security-prefix.d.ts +0 -2
  184. package/lib/commands/join/utils/add-security-prefix.d.ts.map +0 -1
  185. package/lib/commands/join/utils/add-security-prefix.js +0 -12
  186. package/lib/commands/join/utils/add-security-prefix.js.map +0 -1
  187. package/lib/commands/join/utils/collect-components.d.ts +0 -7
  188. package/lib/commands/join/utils/collect-components.d.ts.map +0 -1
  189. package/lib/commands/join/utils/collect-components.js +0 -26
  190. package/lib/commands/join/utils/collect-components.js.map +0 -1
  191. package/lib/commands/join/utils/collect-external-docs.d.ts +0 -7
  192. package/lib/commands/join/utils/collect-external-docs.d.ts.map +0 -1
  193. package/lib/commands/join/utils/collect-external-docs.js +0 -15
  194. package/lib/commands/join/utils/collect-external-docs.js.map +0 -1
  195. package/lib/commands/join/utils/collect-paths.d.ts +0 -9
  196. package/lib/commands/join/utils/collect-paths.d.ts.map +0 -1
  197. package/lib/commands/join/utils/collect-paths.js +0 -172
  198. package/lib/commands/join/utils/collect-paths.js.map +0 -1
  199. package/lib/commands/join/utils/collect-webhooks.d.ts +0 -8
  200. package/lib/commands/join/utils/collect-webhooks.d.ts.map +0 -1
  201. package/lib/commands/join/utils/collect-webhooks.js +0 -46
  202. package/lib/commands/join/utils/collect-webhooks.js.map +0 -1
  203. package/lib/commands/join/utils/duplicate-tag-description-warning.d.ts +0 -2
  204. package/lib/commands/join/utils/duplicate-tag-description-warning.d.ts.map +0 -1
  205. package/lib/commands/join/utils/duplicate-tag-description-warning.js +0 -8
  206. package/lib/commands/join/utils/duplicate-tag-description-warning.js.map +0 -1
  207. package/lib/commands/join/utils/filter-conflicts.d.ts +0 -2
  208. package/lib/commands/join/utils/filter-conflicts.d.ts.map +0 -1
  209. package/lib/commands/join/utils/filter-conflicts.js +0 -4
  210. package/lib/commands/join/utils/filter-conflicts.js.map +0 -1
  211. package/lib/commands/join/utils/format-tags.d.ts +0 -4
  212. package/lib/commands/join/utils/format-tags.d.ts.map +0 -1
  213. package/lib/commands/join/utils/format-tags.js +0 -4
  214. package/lib/commands/join/utils/format-tags.js.map +0 -1
  215. package/lib/commands/join/utils/get-api-filename.d.ts +0 -2
  216. package/lib/commands/join/utils/get-api-filename.d.ts.map +0 -1
  217. package/lib/commands/join/utils/get-api-filename.js +0 -5
  218. package/lib/commands/join/utils/get-api-filename.js.map +0 -1
  219. package/lib/commands/join/utils/get-info-prefix.d.ts +0 -2
  220. package/lib/commands/join/utils/get-info-prefix.d.ts.map +0 -1
  221. package/lib/commands/join/utils/get-info-prefix.js +0 -17
  222. package/lib/commands/join/utils/get-info-prefix.js.map +0 -1
  223. package/lib/commands/join/utils/index.d.ts +0 -19
  224. package/lib/commands/join/utils/index.d.ts.map +0 -1
  225. package/lib/commands/join/utils/index.js +0 -19
  226. package/lib/commands/join/utils/index.js.map +0 -1
  227. package/lib/commands/join/utils/iterate-potential-conflicts.d.ts +0 -5
  228. package/lib/commands/join/utils/iterate-potential-conflicts.d.ts.map +0 -1
  229. package/lib/commands/join/utils/iterate-potential-conflicts.js +0 -53
  230. package/lib/commands/join/utils/iterate-potential-conflicts.js.map +0 -1
  231. package/lib/commands/join/utils/populate-tags.d.ts +0 -7
  232. package/lib/commands/join/utils/populate-tags.d.ts.map +0 -1
  233. package/lib/commands/join/utils/populate-tags.js +0 -77
  234. package/lib/commands/join/utils/populate-tags.js.map +0 -1
  235. package/lib/commands/join/utils/prefix-tag-suggestion.d.ts +0 -2
  236. package/lib/commands/join/utils/prefix-tag-suggestion.d.ts.map +0 -1
  237. package/lib/commands/join/utils/prefix-tag-suggestion.js +0 -6
  238. package/lib/commands/join/utils/prefix-tag-suggestion.js.map +0 -1
  239. package/lib/commands/join/utils/replace-$-refs.d.ts +0 -2
  240. package/lib/commands/join/utils/replace-$-refs.d.ts.map +0 -1
  241. package/lib/commands/join/utils/replace-$-refs.js +0 -29
  242. package/lib/commands/join/utils/replace-$-refs.js.map +0 -1
  243. package/lib/commands/join/utils/show-conflicts.d.ts +0 -2
  244. package/lib/commands/join/utils/show-conflicts.d.ts.map +0 -1
  245. package/lib/commands/join/utils/show-conflicts.js +0 -8
  246. package/lib/commands/join/utils/show-conflicts.js.map +0 -1
  247. package/lib/commands/lint.d.ts.map +0 -1
  248. package/lib/commands/lint.js.map +0 -1
  249. package/lib/commands/preview-project/constants.d.ts.map +0 -1
  250. package/lib/commands/preview-project/constants.js.map +0 -1
  251. package/lib/commands/preview-project/index.d.ts.map +0 -1
  252. package/lib/commands/preview-project/index.js.map +0 -1
  253. package/lib/commands/preview-project/types.d.ts.map +0 -1
  254. package/lib/commands/preview-project/types.js.map +0 -1
  255. package/lib/commands/respect/connection-client.d.ts +0 -12
  256. package/lib/commands/respect/connection-client.d.ts.map +0 -1
  257. package/lib/commands/respect/connection-client.js +0 -73
  258. package/lib/commands/respect/connection-client.js.map +0 -1
  259. package/lib/commands/respect/display-files-summary-table.d.ts +0 -12
  260. package/lib/commands/respect/display-files-summary-table.d.ts.map +0 -1
  261. package/lib/commands/respect/display-files-summary-table.js +0 -65
  262. package/lib/commands/respect/display-files-summary-table.js.map +0 -1
  263. package/lib/commands/respect/har-logs/har-logs.d.ts +0 -6
  264. package/lib/commands/respect/har-logs/har-logs.d.ts.map +0 -1
  265. package/lib/commands/respect/har-logs/har-logs.js +0 -28
  266. package/lib/commands/respect/har-logs/har-logs.js.map +0 -1
  267. package/lib/commands/respect/har-logs/helpers/add-headers.d.ts +0 -2
  268. package/lib/commands/respect/har-logs/helpers/add-headers.d.ts.map +0 -1
  269. package/lib/commands/respect/har-logs/helpers/add-headers.js +0 -17
  270. package/lib/commands/respect/har-logs/helpers/add-headers.js.map +0 -1
  271. package/lib/commands/respect/har-logs/helpers/build-headers.d.ts +0 -10
  272. package/lib/commands/respect/har-logs/helpers/build-headers.d.ts.map +0 -1
  273. package/lib/commands/respect/har-logs/helpers/build-headers.js +0 -33
  274. package/lib/commands/respect/har-logs/helpers/build-headers.js.map +0 -1
  275. package/lib/commands/respect/har-logs/helpers/build-request-cookies.d.ts +0 -2
  276. package/lib/commands/respect/har-logs/helpers/build-request-cookies.d.ts.map +0 -1
  277. package/lib/commands/respect/har-logs/helpers/build-request-cookies.js +0 -18
  278. package/lib/commands/respect/har-logs/helpers/build-request-cookies.js.map +0 -1
  279. package/lib/commands/respect/har-logs/helpers/build-response-cookies.d.ts +0 -2
  280. package/lib/commands/respect/har-logs/helpers/build-response-cookies.d.ts.map +0 -1
  281. package/lib/commands/respect/har-logs/helpers/build-response-cookies.js +0 -40
  282. package/lib/commands/respect/har-logs/helpers/build-response-cookies.js.map +0 -1
  283. package/lib/commands/respect/har-logs/helpers/get-duration.d.ts +0 -2
  284. package/lib/commands/respect/har-logs/helpers/get-duration.d.ts.map +0 -1
  285. package/lib/commands/respect/har-logs/helpers/get-duration.js +0 -6
  286. package/lib/commands/respect/har-logs/helpers/get-duration.js.map +0 -1
  287. package/lib/commands/respect/har-logs/index.d.ts +0 -2
  288. package/lib/commands/respect/har-logs/index.d.ts.map +0 -1
  289. package/lib/commands/respect/har-logs/index.js +0 -2
  290. package/lib/commands/respect/har-logs/index.js.map +0 -1
  291. package/lib/commands/respect/har-logs/with-har.d.ts +0 -7
  292. package/lib/commands/respect/har-logs/with-har.d.ts.map +0 -1
  293. package/lib/commands/respect/har-logs/with-har.js +0 -188
  294. package/lib/commands/respect/har-logs/with-har.js.map +0 -1
  295. package/lib/commands/respect/index.d.ts +0 -27
  296. package/lib/commands/respect/index.d.ts.map +0 -1
  297. package/lib/commands/respect/index.js +0 -108
  298. package/lib/commands/respect/index.js.map +0 -1
  299. package/lib/commands/respect/json-logs.d.ts +0 -11
  300. package/lib/commands/respect/json-logs.d.ts.map +0 -1
  301. package/lib/commands/respect/json-logs.js +0 -85
  302. package/lib/commands/respect/json-logs.js.map +0 -1
  303. package/lib/commands/respect/mtls/resolve-mtls-certificates.d.ts +0 -9
  304. package/lib/commands/respect/mtls/resolve-mtls-certificates.d.ts.map +0 -1
  305. package/lib/commands/respect/mtls/resolve-mtls-certificates.js +0 -48
  306. package/lib/commands/respect/mtls/resolve-mtls-certificates.js.map +0 -1
  307. package/lib/commands/respect/mtls/validate-mtls-command-option.d.ts +0 -3
  308. package/lib/commands/respect/mtls/validate-mtls-command-option.d.ts.map +0 -1
  309. package/lib/commands/respect/mtls/validate-mtls-command-option.js +0 -55
  310. package/lib/commands/respect/mtls/validate-mtls-command-option.js.map +0 -1
  311. package/lib/commands/score/collect-metrics.d.ts +0 -17
  312. package/lib/commands/score/collect-metrics.d.ts.map +0 -1
  313. package/lib/commands/score/collect-metrics.js +0 -195
  314. package/lib/commands/score/collect-metrics.js.map +0 -1
  315. package/lib/commands/score/collectors/dependency-graph.d.ts +0 -9
  316. package/lib/commands/score/collectors/dependency-graph.d.ts.map +0 -1
  317. package/lib/commands/score/collectors/dependency-graph.js +0 -61
  318. package/lib/commands/score/collectors/dependency-graph.js.map +0 -1
  319. package/lib/commands/score/collectors/document-metrics.d.ts +0 -69
  320. package/lib/commands/score/collectors/document-metrics.d.ts.map +0 -1
  321. package/lib/commands/score/collectors/document-metrics.js +0 -343
  322. package/lib/commands/score/collectors/document-metrics.js.map +0 -1
  323. package/lib/commands/score/constants.d.ts +0 -4
  324. package/lib/commands/score/constants.d.ts.map +0 -1
  325. package/lib/commands/score/constants.js +0 -47
  326. package/lib/commands/score/constants.js.map +0 -1
  327. package/lib/commands/score/formatters/json.d.ts +0 -3
  328. package/lib/commands/score/formatters/json.d.ts.map +0 -1
  329. package/lib/commands/score/formatters/json.js +0 -20
  330. package/lib/commands/score/formatters/json.js.map +0 -1
  331. package/lib/commands/score/formatters/stylish.d.ts +0 -4
  332. package/lib/commands/score/formatters/stylish.d.ts.map +0 -1
  333. package/lib/commands/score/formatters/stylish.js +0 -235
  334. package/lib/commands/score/formatters/stylish.js.map +0 -1
  335. package/lib/commands/score/hotspots.d.ts +0 -3
  336. package/lib/commands/score/hotspots.d.ts.map +0 -1
  337. package/lib/commands/score/hotspots.js +0 -70
  338. package/lib/commands/score/hotspots.js.map +0 -1
  339. package/lib/commands/score/index.d.ts +0 -11
  340. package/lib/commands/score/index.d.ts.map +0 -1
  341. package/lib/commands/score/index.js +0 -69
  342. package/lib/commands/score/index.js.map +0 -1
  343. package/lib/commands/score/scoring.d.ts +0 -14
  344. package/lib/commands/score/scoring.d.ts.map +0 -1
  345. package/lib/commands/score/scoring.js +0 -136
  346. package/lib/commands/score/scoring.js.map +0 -1
  347. package/lib/commands/score/types.d.ts +0 -119
  348. package/lib/commands/score/types.d.ts.map +0 -1
  349. package/lib/commands/score/types.js +0 -2
  350. package/lib/commands/score/types.js.map +0 -1
  351. package/lib/commands/score/utils.d.ts +0 -2
  352. package/lib/commands/score/utils.d.ts.map +0 -1
  353. package/lib/commands/score/utils.js +0 -8
  354. package/lib/commands/score/utils.js.map +0 -1
  355. package/lib/commands/scorecard-classic/auth/login-handler.d.ts +0 -3
  356. package/lib/commands/scorecard-classic/auth/login-handler.d.ts.map +0 -1
  357. package/lib/commands/scorecard-classic/auth/login-handler.js +0 -31
  358. package/lib/commands/scorecard-classic/auth/login-handler.js.map +0 -1
  359. package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.d.ts +0 -3
  360. package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.d.ts.map +0 -1
  361. package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.js +0 -28
  362. package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.js.map +0 -1
  363. package/lib/commands/scorecard-classic/formatters/json-formatter.d.ts +0 -27
  364. package/lib/commands/scorecard-classic/formatters/json-formatter.d.ts.map +0 -1
  365. package/lib/commands/scorecard-classic/formatters/json-formatter.js +0 -67
  366. package/lib/commands/scorecard-classic/formatters/json-formatter.js.map +0 -1
  367. package/lib/commands/scorecard-classic/formatters/junit-formatter.d.ts +0 -3
  368. package/lib/commands/scorecard-classic/formatters/junit-formatter.d.ts.map +0 -1
  369. package/lib/commands/scorecard-classic/formatters/junit-formatter.js +0 -67
  370. package/lib/commands/scorecard-classic/formatters/junit-formatter.js.map +0 -1
  371. package/lib/commands/scorecard-classic/formatters/stylish-formatter.d.ts +0 -3
  372. package/lib/commands/scorecard-classic/formatters/stylish-formatter.d.ts.map +0 -1
  373. package/lib/commands/scorecard-classic/formatters/stylish-formatter.js +0 -57
  374. package/lib/commands/scorecard-classic/formatters/stylish-formatter.js.map +0 -1
  375. package/lib/commands/scorecard-classic/index.d.ts +0 -4
  376. package/lib/commands/scorecard-classic/index.d.ts.map +0 -1
  377. package/lib/commands/scorecard-classic/index.js +0 -123
  378. package/lib/commands/scorecard-classic/index.js.map +0 -1
  379. package/lib/commands/scorecard-classic/remote/fetch-scorecard.d.ts +0 -9
  380. package/lib/commands/scorecard-classic/remote/fetch-scorecard.d.ts.map +0 -1
  381. package/lib/commands/scorecard-classic/remote/fetch-scorecard.js +0 -126
  382. package/lib/commands/scorecard-classic/remote/fetch-scorecard.js.map +0 -1
  383. package/lib/commands/scorecard-classic/targets-handler/targets-handler.d.ts +0 -13
  384. package/lib/commands/scorecard-classic/targets-handler/targets-handler.d.ts.map +0 -1
  385. package/lib/commands/scorecard-classic/targets-handler/targets-handler.js +0 -55
  386. package/lib/commands/scorecard-classic/targets-handler/targets-handler.js.map +0 -1
  387. package/lib/commands/scorecard-classic/types.d.ts +0 -27
  388. package/lib/commands/scorecard-classic/types.d.ts.map +0 -1
  389. package/lib/commands/scorecard-classic/types.js +0 -2
  390. package/lib/commands/scorecard-classic/types.js.map +0 -1
  391. package/lib/commands/scorecard-classic/validation/plugin-evaluator.d.ts +0 -3
  392. package/lib/commands/scorecard-classic/validation/plugin-evaluator.d.ts.map +0 -1
  393. package/lib/commands/scorecard-classic/validation/plugin-evaluator.js +0 -45
  394. package/lib/commands/scorecard-classic/validation/plugin-evaluator.js.map +0 -1
  395. package/lib/commands/scorecard-classic/validation/project-url.d.ts +0 -2
  396. package/lib/commands/scorecard-classic/validation/project-url.d.ts.map +0 -1
  397. package/lib/commands/scorecard-classic/validation/project-url.js +0 -11
  398. package/lib/commands/scorecard-classic/validation/project-url.js.map +0 -1
  399. package/lib/commands/scorecard-classic/validation/validate-scorecard.d.ts +0 -21
  400. package/lib/commands/scorecard-classic/validation/validate-scorecard.d.ts.map +0 -1
  401. package/lib/commands/scorecard-classic/validation/validate-scorecard.js +0 -87
  402. package/lib/commands/scorecard-classic/validation/validate-scorecard.js.map +0 -1
  403. package/lib/commands/split/asyncapi/constants.d.ts +0 -6
  404. package/lib/commands/split/asyncapi/constants.d.ts.map +0 -1
  405. package/lib/commands/split/asyncapi/constants.js +0 -71
  406. package/lib/commands/split/asyncapi/constants.js.map +0 -1
  407. package/lib/commands/split/asyncapi/find-asyncapi-component-types.d.ts +0 -2
  408. package/lib/commands/split/asyncapi/find-asyncapi-component-types.d.ts.map +0 -1
  409. package/lib/commands/split/asyncapi/find-asyncapi-component-types.js +0 -8
  410. package/lib/commands/split/asyncapi/find-asyncapi-component-types.js.map +0 -1
  411. package/lib/commands/split/asyncapi/gather-asyncapi-component-files.d.ts +0 -9
  412. package/lib/commands/split/asyncapi/gather-asyncapi-component-files.d.ts.map +0 -1
  413. package/lib/commands/split/asyncapi/gather-asyncapi-component-files.js +0 -28
  414. package/lib/commands/split/asyncapi/gather-asyncapi-component-files.js.map +0 -1
  415. package/lib/commands/split/asyncapi/iterate-asyncapi-channels.d.ts +0 -10
  416. package/lib/commands/split/asyncapi/iterate-asyncapi-channels.d.ts.map +0 -1
  417. package/lib/commands/split/asyncapi/iterate-asyncapi-channels.js +0 -27
  418. package/lib/commands/split/asyncapi/iterate-asyncapi-channels.js.map +0 -1
  419. package/lib/commands/split/asyncapi/iterate-asyncapi-components.d.ts +0 -10
  420. package/lib/commands/split/asyncapi/iterate-asyncapi-components.d.ts.map +0 -1
  421. package/lib/commands/split/asyncapi/iterate-asyncapi-components.js +0 -41
  422. package/lib/commands/split/asyncapi/iterate-asyncapi-components.js.map +0 -1
  423. package/lib/commands/split/asyncapi/iterate-asyncapi-operations.d.ts +0 -11
  424. package/lib/commands/split/asyncapi/iterate-asyncapi-operations.d.ts.map +0 -1
  425. package/lib/commands/split/asyncapi/iterate-asyncapi-operations.js +0 -26
  426. package/lib/commands/split/asyncapi/iterate-asyncapi-operations.js.map +0 -1
  427. package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.d.ts +0 -3
  428. package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.d.ts.map +0 -1
  429. package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.js +0 -13
  430. package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.js.map +0 -1
  431. package/lib/commands/split/asyncapi/split-asyncapi-definition.d.ts +0 -9
  432. package/lib/commands/split/asyncapi/split-asyncapi-definition.d.ts.map +0 -1
  433. package/lib/commands/split/asyncapi/split-asyncapi-definition.js +0 -51
  434. package/lib/commands/split/asyncapi/split-asyncapi-definition.js.map +0 -1
  435. package/lib/commands/split/constants.d.ts +0 -7
  436. package/lib/commands/split/constants.d.ts.map +0 -1
  437. package/lib/commands/split/constants.js +0 -7
  438. package/lib/commands/split/constants.js.map +0 -1
  439. package/lib/commands/split/index.d.ts.map +0 -1
  440. package/lib/commands/split/index.js.map +0 -1
  441. package/lib/commands/split/oas/constants.d.ts +0 -3
  442. package/lib/commands/split/oas/constants.d.ts.map +0 -1
  443. package/lib/commands/split/oas/constants.js +0 -23
  444. package/lib/commands/split/oas/constants.js.map +0 -1
  445. package/lib/commands/split/oas/split-oas-definition.d.ts +0 -3
  446. package/lib/commands/split/oas/split-oas-definition.d.ts.map +0 -1
  447. package/lib/commands/split/oas/split-oas-definition.js +0 -19
  448. package/lib/commands/split/oas/split-oas-definition.js.map +0 -1
  449. package/lib/commands/split/types.d.ts.map +0 -1
  450. package/lib/commands/split/types.js.map +0 -1
  451. package/lib/commands/split/utils/crawl.d.ts +0 -2
  452. package/lib/commands/split/utils/crawl.d.ts.map +0 -1
  453. package/lib/commands/split/utils/crawl.js +0 -15
  454. package/lib/commands/split/utils/crawl.js.map +0 -1
  455. package/lib/commands/split/utils/create-component-dir.d.ts +0 -2
  456. package/lib/commands/split/utils/create-component-dir.d.ts.map +0 -1
  457. package/lib/commands/split/utils/create-component-dir.js +0 -8
  458. package/lib/commands/split/utils/create-component-dir.js.map +0 -1
  459. package/lib/commands/split/utils/does-file-differ.d.ts +0 -2
  460. package/lib/commands/split/utils/does-file-differ.d.ts.map +0 -1
  461. package/lib/commands/split/utils/does-file-differ.js +0 -7
  462. package/lib/commands/split/utils/does-file-differ.js.map +0 -1
  463. package/lib/commands/split/utils/extract-filename-from-path.d.ts +0 -2
  464. package/lib/commands/split/utils/extract-filename-from-path.d.ts.map +0 -1
  465. package/lib/commands/split/utils/extract-filename-from-path.js +0 -5
  466. package/lib/commands/split/utils/extract-filename-from-path.js.map +0 -1
  467. package/lib/commands/split/utils/find-component-type.d.ts +0 -3
  468. package/lib/commands/split/utils/find-component-type.d.ts.map +0 -1
  469. package/lib/commands/split/utils/find-component-type.js +0 -8
  470. package/lib/commands/split/utils/find-component-type.js.map +0 -1
  471. package/lib/commands/split/utils/gather-components-files.d.ts +0 -4
  472. package/lib/commands/split/utils/gather-components-files.d.ts.map +0 -1
  473. package/lib/commands/split/utils/gather-components-files.js +0 -12
  474. package/lib/commands/split/utils/gather-components-files.js.map +0 -1
  475. package/lib/commands/split/utils/get-file-name-path.d.ts +0 -2
  476. package/lib/commands/split/utils/get-file-name-path.d.ts.map +0 -1
  477. package/lib/commands/split/utils/get-file-name-path.js +0 -5
  478. package/lib/commands/split/utils/get-file-name-path.js.map +0 -1
  479. package/lib/commands/split/utils/implicitly-reference-discriminator.d.ts +0 -2
  480. package/lib/commands/split/utils/implicitly-reference-discriminator.d.ts.map +0 -1
  481. package/lib/commands/split/utils/implicitly-reference-discriminator.js +0 -31
  482. package/lib/commands/split/utils/implicitly-reference-discriminator.js.map +0 -1
  483. package/lib/commands/split/utils/is-not-security-component-type.d.ts +0 -2
  484. package/lib/commands/split/utils/is-not-security-component-type.d.ts.map +0 -1
  485. package/lib/commands/split/utils/is-not-security-component-type.js +0 -4
  486. package/lib/commands/split/utils/is-not-security-component-type.js.map +0 -1
  487. package/lib/commands/split/utils/is-supported-extension.d.ts +0 -2
  488. package/lib/commands/split/utils/is-supported-extension.d.ts.map +0 -1
  489. package/lib/commands/split/utils/is-supported-extension.js +0 -4
  490. package/lib/commands/split/utils/is-supported-extension.js.map +0 -1
  491. package/lib/commands/split/utils/iterate-components.d.ts +0 -3
  492. package/lib/commands/split/utils/iterate-components.d.ts.map +0 -1
  493. package/lib/commands/split/utils/iterate-components.js +0 -55
  494. package/lib/commands/split/utils/iterate-components.js.map +0 -1
  495. package/lib/commands/split/utils/iterate-path-items.d.ts +0 -3
  496. package/lib/commands/split/utils/iterate-path-items.d.ts.map +0 -1
  497. package/lib/commands/split/utils/iterate-path-items.js +0 -42
  498. package/lib/commands/split/utils/iterate-path-items.js.map +0 -1
  499. package/lib/commands/split/utils/remove-empty-components.d.ts +0 -4
  500. package/lib/commands/split/utils/remove-empty-components.d.ts.map +0 -1
  501. package/lib/commands/split/utils/remove-empty-components.js +0 -10
  502. package/lib/commands/split/utils/remove-empty-components.js.map +0 -1
  503. package/lib/commands/split/utils/replace-$-refs.d.ts +0 -3
  504. package/lib/commands/split/utils/replace-$-refs.d.ts.map +0 -1
  505. package/lib/commands/split/utils/replace-$-refs.js +0 -34
  506. package/lib/commands/split/utils/replace-$-refs.js.map +0 -1
  507. package/lib/commands/split/utils/replace-channel-refs.d.ts +0 -3
  508. package/lib/commands/split/utils/replace-channel-refs.d.ts.map +0 -1
  509. package/lib/commands/split/utils/replace-channel-refs.js +0 -30
  510. package/lib/commands/split/utils/replace-channel-refs.js.map +0 -1
  511. package/lib/commands/split/utils/starts-with-components.d.ts +0 -2
  512. package/lib/commands/split/utils/starts-with-components.d.ts.map +0 -1
  513. package/lib/commands/split/utils/starts-with-components.js +0 -5
  514. package/lib/commands/split/utils/starts-with-components.js.map +0 -1
  515. package/lib/commands/split/utils/traverse-directory-deep.d.ts +0 -3
  516. package/lib/commands/split/utils/traverse-directory-deep.d.ts.map +0 -1
  517. package/lib/commands/split/utils/traverse-directory-deep.js +0 -27
  518. package/lib/commands/split/utils/traverse-directory-deep.js.map +0 -1
  519. package/lib/commands/stats/index.d.ts +0 -9
  520. package/lib/commands/stats/index.d.ts.map +0 -1
  521. package/lib/commands/stats/index.js +0 -42
  522. package/lib/commands/stats/index.js.map +0 -1
  523. package/lib/commands/stats/print-stats/index.d.ts +0 -3
  524. package/lib/commands/stats/print-stats/index.d.ts.map +0 -1
  525. package/lib/commands/stats/print-stats/index.js +0 -22
  526. package/lib/commands/stats/print-stats/index.js.map +0 -1
  527. package/lib/commands/stats/print-stats/json.d.ts +0 -3
  528. package/lib/commands/stats/print-stats/json.d.ts.map +0 -1
  529. package/lib/commands/stats/print-stats/json.js +0 -13
  530. package/lib/commands/stats/print-stats/json.js.map +0 -1
  531. package/lib/commands/stats/print-stats/markdown.d.ts +0 -3
  532. package/lib/commands/stats/print-stats/markdown.d.ts.map +0 -1
  533. package/lib/commands/stats/print-stats/markdown.js +0 -10
  534. package/lib/commands/stats/print-stats/markdown.js.map +0 -1
  535. package/lib/commands/stats/print-stats/stylish.d.ts +0 -3
  536. package/lib/commands/stats/print-stats/stylish.d.ts.map +0 -1
  537. package/lib/commands/stats/print-stats/stylish.js +0 -11
  538. package/lib/commands/stats/print-stats/stylish.js.map +0 -1
  539. package/lib/commands/stats/visitor-and-accumulator-resolver.d.ts +0 -103
  540. package/lib/commands/stats/visitor-and-accumulator-resolver.d.ts.map +0 -1
  541. package/lib/commands/stats/visitor-and-accumulator-resolver.js +0 -46
  542. package/lib/commands/stats/visitor-and-accumulator-resolver.js.map +0 -1
  543. package/lib/commands/translations.d.ts.map +0 -1
  544. package/lib/commands/translations.js.map +0 -1
  545. package/lib/index.d.ts.map +0 -1
  546. package/lib/index.js.map +0 -1
  547. package/lib/reunite/api/api-client.d.ts.map +0 -1
  548. package/lib/reunite/api/api-client.js.map +0 -1
  549. package/lib/reunite/api/api-keys.d.ts.map +0 -1
  550. package/lib/reunite/api/api-keys.js.map +0 -1
  551. package/lib/reunite/api/domains.d.ts.map +0 -1
  552. package/lib/reunite/api/domains.js.map +0 -1
  553. package/lib/reunite/api/index.d.ts.map +0 -1
  554. package/lib/reunite/api/index.js.map +0 -1
  555. package/lib/reunite/api/types.d.ts.map +0 -1
  556. package/lib/reunite/api/types.js.map +0 -1
  557. package/lib/reunite/commands/push-status.d.ts.map +0 -1
  558. package/lib/reunite/commands/push-status.js.map +0 -1
  559. package/lib/reunite/commands/push.d.ts.map +0 -1
  560. package/lib/reunite/commands/push.js.map +0 -1
  561. package/lib/reunite/commands/utils.d.ts.map +0 -1
  562. package/lib/reunite/commands/utils.js.map +0 -1
  563. package/lib/reunite/utils.d.ts.map +0 -1
  564. package/lib/reunite/utils.js.map +0 -1
  565. package/lib/types.d.ts.map +0 -1
  566. package/lib/types.js.map +0 -1
  567. package/lib/utils/assert-node-version.d.ts.map +0 -1
  568. package/lib/utils/assert-node-version.js.map +0 -1
  569. package/lib/utils/constants.d.ts +0 -5
  570. package/lib/utils/constants.d.ts.map +0 -1
  571. package/lib/utils/constants.js +0 -5
  572. package/lib/utils/constants.js.map +0 -1
  573. package/lib/utils/error.d.ts +0 -4
  574. package/lib/utils/error.d.ts.map +0 -1
  575. package/lib/utils/error.js +0 -8
  576. package/lib/utils/error.js.map +0 -1
  577. package/lib/utils/fetch-with-timeout.d.ts.map +0 -1
  578. package/lib/utils/fetch-with-timeout.js.map +0 -1
  579. package/lib/utils/get-command-name-from-args.d.ts.map +0 -1
  580. package/lib/utils/get-command-name-from-args.js +0 -4
  581. package/lib/utils/get-command-name-from-args.js.map +0 -1
  582. package/lib/utils/json-stringify-with-array-buffer.d.ts +0 -2
  583. package/lib/utils/json-stringify-with-array-buffer.d.ts.map +0 -1
  584. package/lib/utils/json-stringify-with-array-buffer.js +0 -32
  585. package/lib/utils/json-stringify-with-array-buffer.js.map +0 -1
  586. package/lib/utils/miscellaneous.d.ts.map +0 -1
  587. package/lib/utils/miscellaneous.js.map +0 -1
  588. package/lib/utils/network-check.d.ts +0 -2
  589. package/lib/utils/network-check.d.ts.map +0 -1
  590. package/lib/utils/network-check.js +0 -12
  591. package/lib/utils/network-check.js.map +0 -1
  592. package/lib/utils/otel.d.ts +0 -8
  593. package/lib/utils/otel.d.ts.map +0 -1
  594. package/lib/utils/otel.js +0 -40
  595. package/lib/utils/otel.js.map +0 -1
  596. package/lib/utils/package.d.ts +0 -2
  597. package/lib/utils/package.d.ts.map +0 -1
  598. package/lib/utils/package.js +0 -4
  599. package/lib/utils/package.js.map +0 -1
  600. package/lib/utils/platform.d.ts.map +0 -1
  601. package/lib/utils/platform.js.map +0 -1
  602. package/lib/utils/proxy-agent.d.ts +0 -5
  603. package/lib/utils/proxy-agent.d.ts.map +0 -1
  604. package/lib/utils/proxy-agent.js +0 -41
  605. package/lib/utils/proxy-agent.js.map +0 -1
  606. package/lib/utils/read-env-variables.d.ts +0 -2
  607. package/lib/utils/read-env-variables.d.ts.map +0 -1
  608. package/lib/utils/read-env-variables.js +0 -18
  609. package/lib/utils/read-env-variables.js.map +0 -1
  610. package/lib/utils/spinner.d.ts.map +0 -1
  611. package/lib/utils/spinner.js.map +0 -1
  612. package/lib/utils/strip-ansi-codes.d.ts +0 -2
  613. package/lib/utils/strip-ansi-codes.d.ts.map +0 -1
  614. package/lib/utils/strip-ansi-codes.js +0 -6
  615. package/lib/utils/strip-ansi-codes.js.map +0 -1
  616. package/lib/utils/telemetry.d.ts +0 -22
  617. package/lib/utils/telemetry.d.ts.map +0 -1
  618. package/lib/utils/telemetry.js +0 -236
  619. package/lib/utils/telemetry.js.map +0 -1
  620. package/lib/utils/update-version-notifier.d.ts.map +0 -1
  621. package/lib/utils/update-version-notifier.js.map +0 -1
  622. package/lib/utils/validate-mount-path.d.ts +0 -2
  623. package/lib/utils/validate-mount-path.d.ts.map +0 -1
  624. package/lib/utils/validate-mount-path.js +0 -7
  625. package/lib/utils/validate-mount-path.js.map +0 -1
  626. package/lib/utils/validate-positive-number.d.ts +0 -2
  627. package/lib/utils/validate-positive-number.d.ts.map +0 -1
  628. package/lib/utils/validate-positive-number.js +0 -13
  629. package/lib/utils/validate-positive-number.js.map +0 -1
  630. package/lib/wrapper.d.ts.map +0 -1
  631. package/lib/wrapper.js.map +0 -1
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 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.
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.
5
5
  Create your own rulesets to make API governance easy, publish beautiful API reference documentation, and more.
6
- Supports OpenAPI 3.2, 3.1, 3.0 and OpenAPI 2.0 (legacy Swagger), AsyncAPI 3.0 and 2.6, Arazzo 1.0.
6
+ Supports OpenAPI 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,23 +11,18 @@ Supports OpenAPI 3.2, 3.1, 3.0 and OpenAPI 2.0 (legacy Swagger), AsyncAPI 3.0 an
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
-
19
14
  ## Usage
20
15
 
21
16
  ### Node
22
17
 
23
18
  ```sh
24
- npx @redocly/cli@latest lint path-to-root-file.yaml
19
+ npx @redocly/cli@v1-archive lint path-to-root-file.yaml
25
20
  ```
26
21
 
27
22
  Alternatively, install it globally with `npm`:
28
23
 
29
24
  ```sh
30
- npm install @redocly/cli -g
25
+ npm install @redocly/cli@v1-archive -g
31
26
  ```
32
27
 
33
28
  Then you can use it as `redocly [command] [options]`, for example:
@@ -36,7 +31,7 @@ Then you can use it as `redocly [command] [options]`, for example:
36
31
  redocly lint path-to-root-file.yaml
37
32
  ```
38
33
 
39
- The minimum required versions of Node.js and NPM are 22.12.0 and 10.9.2 respectively.
34
+ The minimum required versions of Node.js and NPM are 18.17.0 and 10.8.2 respectively.
40
35
 
41
36
  ### Docker
42
37
 
@@ -96,8 +91,8 @@ redocly lint openapi.yaml
96
91
  ```
97
92
 
98
93
  **Configure the rules** as you wish.
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).
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.
101
96
 
102
97
  **Format the output** in whatever way you need.
103
98
  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.
@@ -106,39 +101,6 @@ The `stylish` output is as good as it sounds, but if you need JSON, Markdown, Ch
106
101
 
107
102
  [Learn more about API standards and configuring Redocly rules](https://redocly.com/docs/cli/api-standards).
108
103
 
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
-
142
104
  ### Transform an OpenAPI description
143
105
 
144
106
  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/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import '../lib/index.js';
3
+ require('../lib/index');
@@ -0,0 +1,99 @@
1
+ import type { Document } from '@redocly/openapi-core';
2
+ export declare const __redoclyClient: {
3
+ isAuthorizedWithRedocly: jest.Mock<any, any>;
4
+ isAuthorizedWithRedoclyByRegion: jest.Mock<any, any>;
5
+ login: jest.Mock<any, any>;
6
+ registryApi: {
7
+ setAccessTokens: jest.Mock<any, any>;
8
+ authStatus: jest.Mock<any, any>;
9
+ prepareFileUpload: jest.Mock<any, any>;
10
+ pushApi: jest.Mock<any, any>;
11
+ };
12
+ };
13
+ export declare const RedoclyClient: jest.Mock<{
14
+ isAuthorizedWithRedocly: jest.Mock<any, any>;
15
+ isAuthorizedWithRedoclyByRegion: jest.Mock<any, any>;
16
+ login: jest.Mock<any, any>;
17
+ registryApi: {
18
+ setAccessTokens: jest.Mock<any, any>;
19
+ authStatus: jest.Mock<any, any>;
20
+ prepareFileUpload: jest.Mock<any, any>;
21
+ pushApi: jest.Mock<any, any>;
22
+ };
23
+ }, []>;
24
+ export declare const loadConfig: jest.Mock<{
25
+ configFile: null;
26
+ styleguide: {
27
+ addIgnore: jest.Mock<any, any>;
28
+ skipRules: jest.Mock<any, any>;
29
+ skipPreprocessors: jest.Mock<any, any>;
30
+ saveIgnore: jest.Mock<any, any>;
31
+ skipDecorators: jest.Mock<any, any>;
32
+ ignore: null;
33
+ decorators: {
34
+ oas2: {};
35
+ oas3_0: {};
36
+ oas3_1: {};
37
+ };
38
+ preprocessors: {
39
+ oas2: {};
40
+ oas3_0: {};
41
+ oas3_1: {};
42
+ };
43
+ };
44
+ }, []>;
45
+ export declare const getMergedConfig: jest.Mock<any, any>;
46
+ export declare const getProxyAgent: jest.Mock<any, any>;
47
+ export declare const lint: jest.Mock<any, any>;
48
+ export declare const bundle: jest.Mock<{
49
+ bundle: {
50
+ parsed: null;
51
+ };
52
+ problems: null;
53
+ }, []>;
54
+ export declare const getTotals: jest.Mock<{
55
+ errors: number;
56
+ }, []>;
57
+ export declare const formatProblems: jest.Mock<any, any>;
58
+ export declare const slash: jest.Mock<any, any>;
59
+ export declare const findConfig: jest.Mock<any, any>;
60
+ export declare const doesYamlFileExist: jest.Mock<any, any>;
61
+ export declare const bundleDocument: jest.Mock<Promise<{
62
+ problems: {};
63
+ }>, []>;
64
+ export declare const detectSpec: jest.Mock<any, any>;
65
+ export declare const isAbsoluteUrl: jest.Mock<any, any>;
66
+ export declare const stringifyYaml: jest.Mock<any, [data: any]>;
67
+ export declare class BaseResolver {
68
+ cache: Map<string, Promise<Document | ResolveError>>;
69
+ getFiles: jest.Mock<any, any>;
70
+ resolveExternalRef: jest.Mock<any, any>;
71
+ loadExternalRef: typeof jest.fn;
72
+ parseDocument: jest.Mock<any, any>;
73
+ resolveDocument: jest.Mock<any, any>;
74
+ }
75
+ export declare class ResolveError extends Error {
76
+ originalError: Error;
77
+ constructor(originalError: Error);
78
+ }
79
+ export declare class YamlParseError extends Error {
80
+ originalError: Error;
81
+ constructor(originalError: Error);
82
+ }
83
+ export declare enum SpecVersion {
84
+ OAS2 = "oas2",
85
+ OAS3_0 = "oas3_0",
86
+ OAS3_1 = "oas3_1",
87
+ Async2 = "async2",
88
+ Async3 = "async3"
89
+ }
90
+ export declare enum Oas3Operations {
91
+ get = "get",
92
+ put = "put",
93
+ post = "post",
94
+ delete = "delete",
95
+ options = "options",
96
+ head = "head",
97
+ patch = "patch",
98
+ trace = "trace"
99
+ }
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Oas3Operations = exports.SpecVersion = exports.YamlParseError = exports.ResolveError = exports.BaseResolver = exports.stringifyYaml = exports.isAbsoluteUrl = exports.detectSpec = exports.bundleDocument = exports.doesYamlFileExist = exports.findConfig = exports.slash = exports.formatProblems = exports.getTotals = exports.bundle = exports.lint = exports.getProxyAgent = exports.getMergedConfig = exports.loadConfig = exports.RedoclyClient = exports.__redoclyClient = void 0;
4
+ const config_1 = require("./../../__tests__/fixtures/config");
5
+ const documents_1 = require("../documents");
6
+ exports.__redoclyClient = {
7
+ isAuthorizedWithRedocly: jest.fn().mockResolvedValue(true),
8
+ isAuthorizedWithRedoclyByRegion: jest.fn().mockResolvedValue(true),
9
+ login: jest.fn(),
10
+ registryApi: {
11
+ setAccessTokens: jest.fn(),
12
+ authStatus: jest.fn(),
13
+ prepareFileUpload: jest.fn().mockResolvedValue({
14
+ signedUploadUrl: 'signedUploadUrl',
15
+ filePath: 'filePath',
16
+ }),
17
+ pushApi: jest.fn(),
18
+ },
19
+ };
20
+ exports.RedoclyClient = jest.fn(() => exports.__redoclyClient);
21
+ exports.loadConfig = jest.fn(() => config_1.ConfigFixture);
22
+ exports.getMergedConfig = jest.fn();
23
+ exports.getProxyAgent = jest.fn();
24
+ exports.lint = jest.fn();
25
+ exports.bundle = jest.fn(() => ({ bundle: { parsed: null }, problems: null }));
26
+ exports.getTotals = jest.fn(() => ({ errors: 0 }));
27
+ exports.formatProblems = jest.fn();
28
+ exports.slash = jest.fn();
29
+ exports.findConfig = jest.fn();
30
+ exports.doesYamlFileExist = jest.fn();
31
+ exports.bundleDocument = jest.fn(() => Promise.resolve({ problems: {} }));
32
+ exports.detectSpec = jest.fn();
33
+ exports.isAbsoluteUrl = jest.fn();
34
+ exports.stringifyYaml = jest.fn((data) => data);
35
+ class BaseResolver {
36
+ constructor() {
37
+ this.cache = new Map();
38
+ this.getFiles = jest.fn();
39
+ this.resolveExternalRef = jest.fn();
40
+ this.loadExternalRef = jest.fn;
41
+ this.parseDocument = jest.fn();
42
+ this.resolveDocument = jest
43
+ .fn()
44
+ .mockImplementationOnce(() => Promise.resolve({ source: { absoluteRef: 'ref' }, parsed: documents_1.firstDocument }))
45
+ .mockImplementationOnce(() => Promise.resolve({ source: { absoluteRef: 'ref' }, parsed: documents_1.secondDocument }))
46
+ .mockImplementationOnce(() => Promise.resolve({ source: { absoluteRef: 'ref' }, parsed: documents_1.thirdDocument }));
47
+ }
48
+ }
49
+ exports.BaseResolver = BaseResolver;
50
+ class ResolveError extends Error {
51
+ constructor(originalError) {
52
+ super(originalError.message);
53
+ this.originalError = originalError;
54
+ Object.setPrototypeOf(this, ResolveError.prototype);
55
+ }
56
+ }
57
+ exports.ResolveError = ResolveError;
58
+ class YamlParseError extends Error {
59
+ constructor(originalError) {
60
+ super(originalError.message);
61
+ this.originalError = originalError;
62
+ Object.setPrototypeOf(this, YamlParseError.prototype);
63
+ }
64
+ }
65
+ exports.YamlParseError = YamlParseError;
66
+ var SpecVersion;
67
+ (function (SpecVersion) {
68
+ SpecVersion["OAS2"] = "oas2";
69
+ SpecVersion["OAS3_0"] = "oas3_0";
70
+ SpecVersion["OAS3_1"] = "oas3_1";
71
+ SpecVersion["Async2"] = "async2";
72
+ SpecVersion["Async3"] = "async3";
73
+ })(SpecVersion || (exports.SpecVersion = SpecVersion = {}));
74
+ var Oas3Operations;
75
+ (function (Oas3Operations) {
76
+ Oas3Operations["get"] = "get";
77
+ Oas3Operations["put"] = "put";
78
+ Oas3Operations["post"] = "post";
79
+ Oas3Operations["delete"] = "delete";
80
+ Oas3Operations["options"] = "options";
81
+ Oas3Operations["head"] = "head";
82
+ Oas3Operations["patch"] = "patch";
83
+ Oas3Operations["trace"] = "trace";
84
+ })(Oas3Operations || (exports.Oas3Operations = Oas3Operations = {}));
@@ -0,0 +1,150 @@
1
+ export declare const firstDocument: {
2
+ openapi: string;
3
+ servers: {
4
+ url: string;
5
+ }[];
6
+ info: {
7
+ description: string;
8
+ version: string;
9
+ title: string;
10
+ termsOfService: string;
11
+ license: {
12
+ name: string;
13
+ url: string;
14
+ };
15
+ };
16
+ paths: {
17
+ '/GETUser/{userId}': {
18
+ summary: string;
19
+ description: string;
20
+ servers: ({
21
+ url: string;
22
+ description?: undefined;
23
+ } | {
24
+ url: string;
25
+ description: string;
26
+ })[];
27
+ get: {
28
+ tags: string[];
29
+ summary: string;
30
+ description: string;
31
+ operationId: string;
32
+ servers: {
33
+ url: string;
34
+ }[];
35
+ };
36
+ parameters: {
37
+ name: string;
38
+ in: string;
39
+ schema: {
40
+ description: string;
41
+ };
42
+ }[];
43
+ };
44
+ };
45
+ components: {};
46
+ };
47
+ export declare const secondDocument: {
48
+ openapi: string;
49
+ servers: {
50
+ url: string;
51
+ }[];
52
+ info: {
53
+ description: string;
54
+ version: string;
55
+ title: string;
56
+ termsOfService: string;
57
+ license: {
58
+ name: string;
59
+ url: string;
60
+ };
61
+ };
62
+ post: {
63
+ '/GETUser/{userId}': {
64
+ summary: string;
65
+ description: string;
66
+ servers: ({
67
+ url: string;
68
+ description?: undefined;
69
+ } | {
70
+ url: string;
71
+ description: string;
72
+ })[];
73
+ get: {
74
+ tags: string[];
75
+ summary: string;
76
+ description: string;
77
+ operationId: string;
78
+ servers: {
79
+ url: string;
80
+ }[];
81
+ };
82
+ parameters: {
83
+ name: string;
84
+ in: string;
85
+ schema: {
86
+ description: string;
87
+ };
88
+ }[];
89
+ };
90
+ };
91
+ components: {};
92
+ };
93
+ export declare const thirdDocument: {
94
+ openapi: string;
95
+ info: {
96
+ title: string;
97
+ version: string;
98
+ };
99
+ servers: {
100
+ url: string;
101
+ }[];
102
+ paths: {};
103
+ components: {
104
+ schemas: {
105
+ SchemaWithNull: {
106
+ type: string;
107
+ default: null;
108
+ nullable: boolean;
109
+ };
110
+ SchemaWithRef: {
111
+ type: string;
112
+ properties: {
113
+ schemaType: {
114
+ type: string;
115
+ enum: string[];
116
+ };
117
+ foo: {
118
+ $ref: string;
119
+ };
120
+ };
121
+ };
122
+ SchemaWithDiscriminator: {
123
+ discriminator: {
124
+ propertyName: string;
125
+ mapping: {
126
+ foo: string;
127
+ bar: string;
128
+ };
129
+ };
130
+ oneOf: ({
131
+ $ref: string;
132
+ type?: undefined;
133
+ properties?: undefined;
134
+ } | {
135
+ type: string;
136
+ properties: {
137
+ schemaType: {
138
+ type: string;
139
+ enum: string[];
140
+ };
141
+ bar: {
142
+ type: string;
143
+ };
144
+ };
145
+ $ref?: undefined;
146
+ })[];
147
+ };
148
+ };
149
+ };
150
+ };
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.thirdDocument = exports.secondDocument = exports.firstDocument = void 0;
4
+ exports.firstDocument = {
5
+ openapi: '3.0.0',
6
+ servers: [{ url: 'http://localhost:8080' }],
7
+ info: {
8
+ description: 'example test',
9
+ version: '1.0.0',
10
+ title: 'First API',
11
+ termsOfService: 'http://swagger.io/terms/',
12
+ license: {
13
+ name: 'Apache 2.0',
14
+ url: 'http://www.apache.org/licenses/LICENSE-2.0.html',
15
+ },
16
+ },
17
+ paths: {
18
+ '/GETUser/{userId}': {
19
+ summary: 'get user by id',
20
+ description: 'user info',
21
+ servers: [{ url: '/user' }, { url: '/pet', description: 'pet server' }],
22
+ get: {
23
+ tags: ['pet'],
24
+ summary: 'Find pet by ID',
25
+ description: 'Returns a single pet',
26
+ operationId: 'getPetById',
27
+ servers: [{ url: '/pet' }],
28
+ },
29
+ parameters: [{ name: 'param1', in: 'header', schema: { description: 'string' } }],
30
+ },
31
+ },
32
+ components: {},
33
+ };
34
+ exports.secondDocument = {
35
+ openapi: '3.0.0',
36
+ servers: [{ url: 'http://localhost:8080' }],
37
+ info: {
38
+ description: 'example test',
39
+ version: '1.0.0',
40
+ title: 'Second API',
41
+ termsOfService: 'http://swagger.io/terms/',
42
+ license: {
43
+ name: 'Apache 2.0',
44
+ url: 'http://www.apache.org/licenses/LICENSE-2.0.html',
45
+ },
46
+ },
47
+ post: {
48
+ '/GETUser/{userId}': {
49
+ summary: 'get user',
50
+ description: 'user information',
51
+ servers: [{ url: '/user' }, { url: '/pet', description: '' }],
52
+ get: {
53
+ tags: ['pet'],
54
+ summary: 'Find pet by ID',
55
+ description: 'Returns a single pet',
56
+ operationId: 'getPetById',
57
+ servers: [{ url: '/pet' }],
58
+ },
59
+ parameters: [{ name: 'param1', in: 'header', schema: { description: 'string' } }],
60
+ },
61
+ },
62
+ components: {},
63
+ };
64
+ exports.thirdDocument = {
65
+ openapi: '3.0.0',
66
+ info: {
67
+ title: 'Third API',
68
+ version: '1.0',
69
+ },
70
+ servers: [
71
+ {
72
+ url: 'https://api.server.test/v1',
73
+ },
74
+ ],
75
+ paths: {},
76
+ components: {
77
+ schemas: {
78
+ SchemaWithNull: {
79
+ type: 'string',
80
+ default: null,
81
+ nullable: true,
82
+ },
83
+ SchemaWithRef: {
84
+ type: 'object',
85
+ properties: {
86
+ schemaType: {
87
+ type: 'string',
88
+ enum: ['foo'],
89
+ },
90
+ foo: {
91
+ $ref: '#/components/schemas/SchemaWithNull',
92
+ },
93
+ },
94
+ },
95
+ SchemaWithDiscriminator: {
96
+ discriminator: {
97
+ propertyName: 'schemaType',
98
+ mapping: {
99
+ foo: '#/components/schemas/SchemaWithRef',
100
+ bar: '#/components/schemas/SchemaWithNull',
101
+ },
102
+ },
103
+ oneOf: [
104
+ {
105
+ $ref: '#/components/schemas/SchemaWithRef',
106
+ },
107
+ {
108
+ type: 'object',
109
+ properties: {
110
+ schemaType: {
111
+ type: 'string',
112
+ enum: ['bar'],
113
+ },
114
+ bar: {
115
+ type: 'string',
116
+ },
117
+ },
118
+ },
119
+ ],
120
+ },
121
+ },
122
+ },
123
+ };
@@ -0,0 +1,8 @@
1
+ export declare const existsSync: jest.Mock<any, any>;
2
+ export declare const readFileSync: jest.Mock<string, []>;
3
+ export declare const statSync: jest.Mock<{
4
+ size: number;
5
+ }, []>;
6
+ export declare const createReadStream: jest.Mock<any, any>;
7
+ export declare const writeFileSync: jest.Mock<any, any>;
8
+ export declare const mkdirSync: jest.Mock<any, any>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mkdirSync = exports.writeFileSync = exports.createReadStream = exports.statSync = exports.readFileSync = exports.existsSync = void 0;
4
+ exports.existsSync = jest.fn();
5
+ exports.readFileSync = jest.fn(() => '');
6
+ exports.statSync = jest.fn(() => ({ size: 0 }));
7
+ exports.createReadStream = jest.fn();
8
+ exports.writeFileSync = jest.fn();
9
+ exports.mkdirSync = jest.fn();
@@ -0,0 +1,3 @@
1
+ export declare const performance: {
2
+ now: jest.Mock<any, any>;
3
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.performance = void 0;
4
+ exports.performance = {
5
+ now: jest.fn(),
6
+ };
@@ -0,0 +1,6 @@
1
+ export declare const loadAndBundleSpec: jest.Mock<Promise<{
2
+ openapi: string;
3
+ }>, []>;
4
+ export declare const createStore: jest.Mock<Promise<{
5
+ toJS: jest.Mock<string, []>;
6
+ }>, []>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createStore = exports.loadAndBundleSpec = void 0;
4
+ exports.loadAndBundleSpec = jest.fn(() => Promise.resolve({ openapi: '3.0.0' }));
5
+ exports.createStore = jest.fn(() => Promise.resolve({ toJS: jest.fn(() => '{}') }));
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const redoc_1 = require("redoc");
4
+ const server_1 = require("react-dom/server");
5
+ const build_docs_1 = require("../../commands/build-docs");
6
+ const utils_1 = require("../../commands/build-docs/utils");
7
+ const miscellaneous_1 = require("../../utils/miscellaneous");
8
+ jest.mock('redoc');
9
+ jest.mock('fs');
10
+ jest.mock('../../utils/miscellaneous');
11
+ const config = {
12
+ output: '',
13
+ title: 'Test',
14
+ disableGoogleFont: false,
15
+ templateFileName: '',
16
+ templateOptions: {},
17
+ redocOptions: {},
18
+ };
19
+ jest.mock('react-dom/server', () => ({
20
+ renderToString: jest.fn(),
21
+ }));
22
+ jest.mock('handlebars', () => ({
23
+ compile: jest.fn(() => jest.fn(() => '<html></html>')),
24
+ }));
25
+ describe('build-docs', () => {
26
+ it('should return correct html and call function for ssr', async () => {
27
+ const result = await (0, utils_1.getPageHTML)({}, '../some-path/openapi.yaml', {
28
+ ...config,
29
+ redocCurrentVersion: '2.0.0',
30
+ });
31
+ expect(server_1.renderToString).toBeCalledTimes(1);
32
+ expect(redoc_1.createStore).toBeCalledTimes(1);
33
+ expect(result).toBe('<html></html>');
34
+ });
35
+ it('should work correctly when calling handlerBuildCommand', async () => {
36
+ const processExitMock = jest.spyOn(process, 'exit').mockImplementation();
37
+ await (0, build_docs_1.handlerBuildCommand)({
38
+ argv: {
39
+ o: '',
40
+ title: 'test',
41
+ disableGoogleFont: false,
42
+ template: '',
43
+ templateOptions: {},
44
+ theme: { openapi: {} },
45
+ api: '../some-path/openapi.yaml',
46
+ },
47
+ config: {},
48
+ version: 'cli-version',
49
+ });
50
+ expect(redoc_1.loadAndBundleSpec).toBeCalledTimes(1);
51
+ expect(miscellaneous_1.getFallbackApisOrExit).toBeCalledTimes(1);
52
+ expect(processExitMock).toBeCalledTimes(0);
53
+ });
54
+ });
@@ -0,0 +1 @@
1
+ export {};