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

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 +46 -8
  2. package/bin/cli.js +1 -1
  3. package/lib/auth/device-flow.d.ts +10 -12
  4. package/lib/auth/device-flow.d.ts.map +1 -0
  5. package/lib/auth/device-flow.js +32 -25
  6. package/lib/auth/device-flow.js.map +1 -0
  7. package/lib/auth/oauth-client.d.ts +14 -10
  8. package/lib/auth/oauth-client.d.ts.map +1 -0
  9. package/lib/auth/oauth-client.js +83 -59
  10. package/lib/auth/oauth-client.js.map +1 -0
  11. package/lib/commands/auth.d.ts +7 -8
  12. package/lib/commands/auth.d.ts.map +1 -0
  13. package/lib/commands/auth.js +26 -43
  14. package/lib/commands/auth.js.map +1 -0
  15. package/lib/commands/build-docs/index.d.ts +4 -3
  16. package/lib/commands/build-docs/index.d.ts.map +1 -0
  17. package/lib/commands/build-docs/index.js +24 -25
  18. package/lib/commands/build-docs/index.js.map +1 -0
  19. package/lib/commands/build-docs/types.d.ts +2 -1
  20. package/lib/commands/build-docs/types.d.ts.map +1 -0
  21. package/lib/commands/build-docs/types.js +2 -2
  22. package/lib/commands/build-docs/types.js.map +1 -0
  23. package/lib/commands/build-docs/utils.d.ts +3 -2
  24. package/lib/commands/build-docs/utils.d.ts.map +1 -0
  25. package/lib/commands/build-docs/utils.js +35 -38
  26. package/lib/commands/build-docs/utils.js.map +1 -0
  27. package/lib/commands/bundle.d.ts +11 -6
  28. package/lib/commands/bundle.d.ts.map +1 -0
  29. package/lib/commands/bundle.js +41 -40
  30. package/lib/commands/bundle.js.map +1 -0
  31. package/lib/commands/eject.d.ts +5 -4
  32. package/lib/commands/eject.d.ts.map +1 -0
  33. package/lib/commands/eject.js +11 -13
  34. package/lib/commands/eject.js.map +1 -0
  35. package/lib/commands/generate-arazzo.d.ts +8 -0
  36. package/lib/commands/generate-arazzo.d.ts.map +1 -0
  37. package/lib/commands/generate-arazzo.js +25 -0
  38. package/lib/commands/generate-arazzo.js.map +1 -0
  39. package/lib/commands/join/index.d.ts +4 -0
  40. package/lib/commands/join/index.d.ts.map +1 -0
  41. package/lib/commands/join/index.js +141 -0
  42. package/lib/commands/join/index.js.map +1 -0
  43. package/lib/commands/join/types.d.ts +22 -0
  44. package/lib/commands/join/types.d.ts.map +1 -0
  45. package/lib/commands/join/types.js +2 -0
  46. package/lib/commands/join/types.js.map +1 -0
  47. package/lib/commands/join/utils/add-components-prefix.d.ts +2 -0
  48. package/lib/commands/join/utils/add-components-prefix.d.ts.map +1 -0
  49. package/lib/commands/join/utils/add-components-prefix.js +9 -0
  50. package/lib/commands/join/utils/add-components-prefix.js.map +1 -0
  51. package/lib/commands/join/utils/add-info-section.d.ts +2 -0
  52. package/lib/commands/join/utils/add-info-section.d.ts.map +1 -0
  53. package/lib/commands/join/utils/add-info-section.js +19 -0
  54. package/lib/commands/join/utils/add-info-section.js.map +1 -0
  55. package/lib/commands/join/utils/add-prefix.d.ts +2 -0
  56. package/lib/commands/join/utils/add-prefix.d.ts.map +1 -0
  57. package/lib/commands/join/utils/add-prefix.js +4 -0
  58. package/lib/commands/join/utils/add-prefix.js.map +1 -0
  59. package/lib/commands/join/utils/add-security-prefix.d.ts +2 -0
  60. package/lib/commands/join/utils/add-security-prefix.d.ts.map +1 -0
  61. package/lib/commands/join/utils/add-security-prefix.js +12 -0
  62. package/lib/commands/join/utils/add-security-prefix.js.map +1 -0
  63. package/lib/commands/join/utils/collect-components.d.ts +7 -0
  64. package/lib/commands/join/utils/collect-components.d.ts.map +1 -0
  65. package/lib/commands/join/utils/collect-components.js +26 -0
  66. package/lib/commands/join/utils/collect-components.js.map +1 -0
  67. package/lib/commands/join/utils/collect-external-docs.d.ts +7 -0
  68. package/lib/commands/join/utils/collect-external-docs.d.ts.map +1 -0
  69. package/lib/commands/join/utils/collect-external-docs.js +15 -0
  70. package/lib/commands/join/utils/collect-external-docs.js.map +1 -0
  71. package/lib/commands/join/utils/collect-paths.d.ts +9 -0
  72. package/lib/commands/join/utils/collect-paths.d.ts.map +1 -0
  73. package/lib/commands/join/utils/collect-paths.js +172 -0
  74. package/lib/commands/join/utils/collect-paths.js.map +1 -0
  75. package/lib/commands/join/utils/collect-webhooks.d.ts +8 -0
  76. package/lib/commands/join/utils/collect-webhooks.d.ts.map +1 -0
  77. package/lib/commands/join/utils/collect-webhooks.js +46 -0
  78. package/lib/commands/join/utils/collect-webhooks.js.map +1 -0
  79. package/lib/commands/join/utils/duplicate-tag-description-warning.d.ts +2 -0
  80. package/lib/commands/join/utils/duplicate-tag-description-warning.d.ts.map +1 -0
  81. package/lib/commands/join/utils/duplicate-tag-description-warning.js +8 -0
  82. package/lib/commands/join/utils/duplicate-tag-description-warning.js.map +1 -0
  83. package/lib/commands/join/utils/filter-conflicts.d.ts +2 -0
  84. package/lib/commands/join/utils/filter-conflicts.d.ts.map +1 -0
  85. package/lib/commands/join/utils/filter-conflicts.js +4 -0
  86. package/lib/commands/join/utils/filter-conflicts.js.map +1 -0
  87. package/lib/commands/join/utils/format-tags.d.ts +4 -0
  88. package/lib/commands/join/utils/format-tags.d.ts.map +1 -0
  89. package/lib/commands/join/utils/format-tags.js +4 -0
  90. package/lib/commands/join/utils/format-tags.js.map +1 -0
  91. package/lib/commands/join/utils/get-api-filename.d.ts +2 -0
  92. package/lib/commands/join/utils/get-api-filename.d.ts.map +1 -0
  93. package/lib/commands/join/utils/get-api-filename.js +5 -0
  94. package/lib/commands/join/utils/get-api-filename.js.map +1 -0
  95. package/lib/commands/join/utils/get-info-prefix.d.ts +2 -0
  96. package/lib/commands/join/utils/get-info-prefix.d.ts.map +1 -0
  97. package/lib/commands/join/utils/get-info-prefix.js +17 -0
  98. package/lib/commands/join/utils/get-info-prefix.js.map +1 -0
  99. package/lib/commands/join/utils/index.d.ts +19 -0
  100. package/lib/commands/join/utils/index.d.ts.map +1 -0
  101. package/lib/commands/join/utils/index.js +19 -0
  102. package/lib/commands/join/utils/index.js.map +1 -0
  103. package/lib/commands/join/utils/iterate-potential-conflicts.d.ts +5 -0
  104. package/lib/commands/join/utils/iterate-potential-conflicts.d.ts.map +1 -0
  105. package/lib/commands/join/utils/iterate-potential-conflicts.js +53 -0
  106. package/lib/commands/join/utils/iterate-potential-conflicts.js.map +1 -0
  107. package/lib/commands/join/utils/populate-tags.d.ts +7 -0
  108. package/lib/commands/join/utils/populate-tags.d.ts.map +1 -0
  109. package/lib/commands/join/utils/populate-tags.js +77 -0
  110. package/lib/commands/join/utils/populate-tags.js.map +1 -0
  111. package/lib/commands/join/utils/prefix-tag-suggestion.d.ts +2 -0
  112. package/lib/commands/join/utils/prefix-tag-suggestion.d.ts.map +1 -0
  113. package/lib/commands/join/utils/prefix-tag-suggestion.js +6 -0
  114. package/lib/commands/join/utils/prefix-tag-suggestion.js.map +1 -0
  115. package/lib/commands/join/utils/replace-$-refs.d.ts +2 -0
  116. package/lib/commands/join/utils/replace-$-refs.d.ts.map +1 -0
  117. package/lib/commands/join/utils/replace-$-refs.js +29 -0
  118. package/lib/commands/join/utils/replace-$-refs.js.map +1 -0
  119. package/lib/commands/join/utils/show-conflicts.d.ts +2 -0
  120. package/lib/commands/join/utils/show-conflicts.d.ts.map +1 -0
  121. package/lib/commands/join/utils/show-conflicts.js +8 -0
  122. package/lib/commands/join/utils/show-conflicts.js.map +1 -0
  123. package/lib/commands/lint.d.ts +10 -8
  124. package/lib/commands/lint.d.ts.map +1 -0
  125. package/lib/commands/lint.js +57 -64
  126. package/lib/commands/lint.js.map +1 -0
  127. package/lib/commands/preview-project/constants.d.ts +2 -1
  128. package/lib/commands/preview-project/constants.d.ts.map +1 -0
  129. package/lib/commands/preview-project/constants.js +4 -6
  130. package/lib/commands/preview-project/constants.js.map +1 -0
  131. package/lib/commands/preview-project/index.d.ts +4 -3
  132. package/lib/commands/preview-project/index.d.ts.map +1 -0
  133. package/lib/commands/preview-project/index.js +21 -23
  134. package/lib/commands/preview-project/index.js.map +1 -0
  135. package/lib/commands/preview-project/types.d.ts +5 -4
  136. package/lib/commands/preview-project/types.d.ts.map +1 -0
  137. package/lib/commands/preview-project/types.js +2 -2
  138. package/lib/commands/preview-project/types.js.map +1 -0
  139. package/lib/commands/respect/connection-client.d.ts +12 -0
  140. package/lib/commands/respect/connection-client.d.ts.map +1 -0
  141. package/lib/commands/respect/connection-client.js +73 -0
  142. package/lib/commands/respect/connection-client.js.map +1 -0
  143. package/lib/commands/respect/display-files-summary-table.d.ts +12 -0
  144. package/lib/commands/respect/display-files-summary-table.d.ts.map +1 -0
  145. package/lib/commands/respect/display-files-summary-table.js +65 -0
  146. package/lib/commands/respect/display-files-summary-table.js.map +1 -0
  147. package/lib/commands/respect/har-logs/har-logs.d.ts +6 -0
  148. package/lib/commands/respect/har-logs/har-logs.d.ts.map +1 -0
  149. package/lib/commands/respect/har-logs/har-logs.js +28 -0
  150. package/lib/commands/respect/har-logs/har-logs.js.map +1 -0
  151. package/lib/commands/respect/har-logs/helpers/add-headers.d.ts +2 -0
  152. package/lib/commands/respect/har-logs/helpers/add-headers.d.ts.map +1 -0
  153. package/lib/commands/respect/har-logs/helpers/add-headers.js +17 -0
  154. package/lib/commands/respect/har-logs/helpers/add-headers.js.map +1 -0
  155. package/lib/commands/respect/har-logs/helpers/build-headers.d.ts +10 -0
  156. package/lib/commands/respect/har-logs/helpers/build-headers.d.ts.map +1 -0
  157. package/lib/commands/respect/har-logs/helpers/build-headers.js +33 -0
  158. package/lib/commands/respect/har-logs/helpers/build-headers.js.map +1 -0
  159. package/lib/commands/respect/har-logs/helpers/build-request-cookies.d.ts +2 -0
  160. package/lib/commands/respect/har-logs/helpers/build-request-cookies.d.ts.map +1 -0
  161. package/lib/commands/respect/har-logs/helpers/build-request-cookies.js +18 -0
  162. package/lib/commands/respect/har-logs/helpers/build-request-cookies.js.map +1 -0
  163. package/lib/commands/respect/har-logs/helpers/build-response-cookies.d.ts +2 -0
  164. package/lib/commands/respect/har-logs/helpers/build-response-cookies.d.ts.map +1 -0
  165. package/lib/commands/respect/har-logs/helpers/build-response-cookies.js +40 -0
  166. package/lib/commands/respect/har-logs/helpers/build-response-cookies.js.map +1 -0
  167. package/lib/commands/respect/har-logs/helpers/get-duration.d.ts +2 -0
  168. package/lib/commands/respect/har-logs/helpers/get-duration.d.ts.map +1 -0
  169. package/lib/commands/respect/har-logs/helpers/get-duration.js +6 -0
  170. package/lib/commands/respect/har-logs/helpers/get-duration.js.map +1 -0
  171. package/lib/commands/respect/har-logs/index.d.ts +2 -0
  172. package/lib/commands/respect/har-logs/index.d.ts.map +1 -0
  173. package/lib/commands/respect/har-logs/index.js +2 -0
  174. package/lib/commands/respect/har-logs/index.js.map +1 -0
  175. package/lib/commands/respect/har-logs/with-har.d.ts +7 -0
  176. package/lib/commands/respect/har-logs/with-har.d.ts.map +1 -0
  177. package/lib/commands/respect/har-logs/with-har.js +188 -0
  178. package/lib/commands/respect/har-logs/with-har.js.map +1 -0
  179. package/lib/commands/respect/index.d.ts +27 -0
  180. package/lib/commands/respect/index.d.ts.map +1 -0
  181. package/lib/commands/respect/index.js +108 -0
  182. package/lib/commands/respect/index.js.map +1 -0
  183. package/lib/commands/respect/json-logs.d.ts +11 -0
  184. package/lib/commands/respect/json-logs.d.ts.map +1 -0
  185. package/lib/commands/respect/json-logs.js +85 -0
  186. package/lib/commands/respect/json-logs.js.map +1 -0
  187. package/lib/commands/respect/mtls/resolve-mtls-certificates.d.ts +9 -0
  188. package/lib/commands/respect/mtls/resolve-mtls-certificates.d.ts.map +1 -0
  189. package/lib/commands/respect/mtls/resolve-mtls-certificates.js +48 -0
  190. package/lib/commands/respect/mtls/resolve-mtls-certificates.js.map +1 -0
  191. package/lib/commands/respect/mtls/validate-mtls-command-option.d.ts +3 -0
  192. package/lib/commands/respect/mtls/validate-mtls-command-option.d.ts.map +1 -0
  193. package/lib/commands/respect/mtls/validate-mtls-command-option.js +55 -0
  194. package/lib/commands/respect/mtls/validate-mtls-command-option.js.map +1 -0
  195. package/lib/commands/score/collect-metrics.d.ts +17 -0
  196. package/lib/commands/score/collect-metrics.d.ts.map +1 -0
  197. package/lib/commands/score/collect-metrics.js +195 -0
  198. package/lib/commands/score/collect-metrics.js.map +1 -0
  199. package/lib/commands/score/collectors/dependency-graph.d.ts +9 -0
  200. package/lib/commands/score/collectors/dependency-graph.d.ts.map +1 -0
  201. package/lib/commands/score/collectors/dependency-graph.js +61 -0
  202. package/lib/commands/score/collectors/dependency-graph.js.map +1 -0
  203. package/lib/commands/score/collectors/document-metrics.d.ts +69 -0
  204. package/lib/commands/score/collectors/document-metrics.d.ts.map +1 -0
  205. package/lib/commands/score/collectors/document-metrics.js +343 -0
  206. package/lib/commands/score/collectors/document-metrics.js.map +1 -0
  207. package/lib/commands/score/constants.d.ts +4 -0
  208. package/lib/commands/score/constants.d.ts.map +1 -0
  209. package/lib/commands/score/constants.js +47 -0
  210. package/lib/commands/score/constants.js.map +1 -0
  211. package/lib/commands/score/formatters/json.d.ts +3 -0
  212. package/lib/commands/score/formatters/json.d.ts.map +1 -0
  213. package/lib/commands/score/formatters/json.js +20 -0
  214. package/lib/commands/score/formatters/json.js.map +1 -0
  215. package/lib/commands/score/formatters/stylish.d.ts +4 -0
  216. package/lib/commands/score/formatters/stylish.d.ts.map +1 -0
  217. package/lib/commands/score/formatters/stylish.js +235 -0
  218. package/lib/commands/score/formatters/stylish.js.map +1 -0
  219. package/lib/commands/score/hotspots.d.ts +3 -0
  220. package/lib/commands/score/hotspots.d.ts.map +1 -0
  221. package/lib/commands/score/hotspots.js +70 -0
  222. package/lib/commands/score/hotspots.js.map +1 -0
  223. package/lib/commands/score/index.d.ts +11 -0
  224. package/lib/commands/score/index.d.ts.map +1 -0
  225. package/lib/commands/score/index.js +69 -0
  226. package/lib/commands/score/index.js.map +1 -0
  227. package/lib/commands/score/scoring.d.ts +14 -0
  228. package/lib/commands/score/scoring.d.ts.map +1 -0
  229. package/lib/commands/score/scoring.js +136 -0
  230. package/lib/commands/score/scoring.js.map +1 -0
  231. package/lib/commands/score/types.d.ts +119 -0
  232. package/lib/commands/score/types.d.ts.map +1 -0
  233. package/lib/commands/score/types.js +2 -0
  234. package/lib/commands/score/types.js.map +1 -0
  235. package/lib/commands/score/utils.d.ts +2 -0
  236. package/lib/commands/score/utils.d.ts.map +1 -0
  237. package/lib/commands/score/utils.js +8 -0
  238. package/lib/commands/score/utils.js.map +1 -0
  239. package/lib/commands/scorecard-classic/auth/login-handler.d.ts +3 -0
  240. package/lib/commands/scorecard-classic/auth/login-handler.d.ts.map +1 -0
  241. package/lib/commands/scorecard-classic/auth/login-handler.js +31 -0
  242. package/lib/commands/scorecard-classic/auth/login-handler.js.map +1 -0
  243. package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.d.ts +3 -0
  244. package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.d.ts.map +1 -0
  245. package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.js +28 -0
  246. package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.js.map +1 -0
  247. package/lib/commands/scorecard-classic/formatters/json-formatter.d.ts +27 -0
  248. package/lib/commands/scorecard-classic/formatters/json-formatter.d.ts.map +1 -0
  249. package/lib/commands/scorecard-classic/formatters/json-formatter.js +67 -0
  250. package/lib/commands/scorecard-classic/formatters/json-formatter.js.map +1 -0
  251. package/lib/commands/scorecard-classic/formatters/junit-formatter.d.ts +3 -0
  252. package/lib/commands/scorecard-classic/formatters/junit-formatter.d.ts.map +1 -0
  253. package/lib/commands/scorecard-classic/formatters/junit-formatter.js +67 -0
  254. package/lib/commands/scorecard-classic/formatters/junit-formatter.js.map +1 -0
  255. package/lib/commands/scorecard-classic/formatters/stylish-formatter.d.ts +3 -0
  256. package/lib/commands/scorecard-classic/formatters/stylish-formatter.d.ts.map +1 -0
  257. package/lib/commands/scorecard-classic/formatters/stylish-formatter.js +57 -0
  258. package/lib/commands/scorecard-classic/formatters/stylish-formatter.js.map +1 -0
  259. package/lib/commands/scorecard-classic/index.d.ts +4 -0
  260. package/lib/commands/scorecard-classic/index.d.ts.map +1 -0
  261. package/lib/commands/scorecard-classic/index.js +123 -0
  262. package/lib/commands/scorecard-classic/index.js.map +1 -0
  263. package/lib/commands/scorecard-classic/remote/fetch-scorecard.d.ts +9 -0
  264. package/lib/commands/scorecard-classic/remote/fetch-scorecard.d.ts.map +1 -0
  265. package/lib/commands/scorecard-classic/remote/fetch-scorecard.js +126 -0
  266. package/lib/commands/scorecard-classic/remote/fetch-scorecard.js.map +1 -0
  267. package/lib/commands/scorecard-classic/targets-handler/targets-handler.d.ts +13 -0
  268. package/lib/commands/scorecard-classic/targets-handler/targets-handler.d.ts.map +1 -0
  269. package/lib/commands/scorecard-classic/targets-handler/targets-handler.js +55 -0
  270. package/lib/commands/scorecard-classic/targets-handler/targets-handler.js.map +1 -0
  271. package/lib/commands/scorecard-classic/types.d.ts +27 -0
  272. package/lib/commands/scorecard-classic/types.d.ts.map +1 -0
  273. package/lib/commands/scorecard-classic/types.js +2 -0
  274. package/lib/commands/scorecard-classic/types.js.map +1 -0
  275. package/lib/commands/scorecard-classic/validation/plugin-evaluator.d.ts +3 -0
  276. package/lib/commands/scorecard-classic/validation/plugin-evaluator.d.ts.map +1 -0
  277. package/lib/commands/scorecard-classic/validation/plugin-evaluator.js +45 -0
  278. package/lib/commands/scorecard-classic/validation/plugin-evaluator.js.map +1 -0
  279. package/lib/commands/scorecard-classic/validation/project-url.d.ts +2 -0
  280. package/lib/commands/scorecard-classic/validation/project-url.d.ts.map +1 -0
  281. package/lib/commands/scorecard-classic/validation/project-url.js +11 -0
  282. package/lib/commands/scorecard-classic/validation/project-url.js.map +1 -0
  283. package/lib/commands/scorecard-classic/validation/validate-scorecard.d.ts +21 -0
  284. package/lib/commands/scorecard-classic/validation/validate-scorecard.d.ts.map +1 -0
  285. package/lib/commands/scorecard-classic/validation/validate-scorecard.js +87 -0
  286. package/lib/commands/scorecard-classic/validation/validate-scorecard.js.map +1 -0
  287. package/lib/commands/split/asyncapi/constants.d.ts +6 -0
  288. package/lib/commands/split/asyncapi/constants.d.ts.map +1 -0
  289. package/lib/commands/split/asyncapi/constants.js +71 -0
  290. package/lib/commands/split/asyncapi/constants.js.map +1 -0
  291. package/lib/commands/split/asyncapi/find-asyncapi-component-types.d.ts +2 -0
  292. package/lib/commands/split/asyncapi/find-asyncapi-component-types.d.ts.map +1 -0
  293. package/lib/commands/split/asyncapi/find-asyncapi-component-types.js +8 -0
  294. package/lib/commands/split/asyncapi/find-asyncapi-component-types.js.map +1 -0
  295. package/lib/commands/split/asyncapi/gather-asyncapi-component-files.d.ts +9 -0
  296. package/lib/commands/split/asyncapi/gather-asyncapi-component-files.d.ts.map +1 -0
  297. package/lib/commands/split/asyncapi/gather-asyncapi-component-files.js +28 -0
  298. package/lib/commands/split/asyncapi/gather-asyncapi-component-files.js.map +1 -0
  299. package/lib/commands/split/asyncapi/iterate-asyncapi-channels.d.ts +10 -0
  300. package/lib/commands/split/asyncapi/iterate-asyncapi-channels.d.ts.map +1 -0
  301. package/lib/commands/split/asyncapi/iterate-asyncapi-channels.js +27 -0
  302. package/lib/commands/split/asyncapi/iterate-asyncapi-channels.js.map +1 -0
  303. package/lib/commands/split/asyncapi/iterate-asyncapi-components.d.ts +10 -0
  304. package/lib/commands/split/asyncapi/iterate-asyncapi-components.d.ts.map +1 -0
  305. package/lib/commands/split/asyncapi/iterate-asyncapi-components.js +41 -0
  306. package/lib/commands/split/asyncapi/iterate-asyncapi-components.js.map +1 -0
  307. package/lib/commands/split/asyncapi/iterate-asyncapi-operations.d.ts +11 -0
  308. package/lib/commands/split/asyncapi/iterate-asyncapi-operations.d.ts.map +1 -0
  309. package/lib/commands/split/asyncapi/iterate-asyncapi-operations.js +26 -0
  310. package/lib/commands/split/asyncapi/iterate-asyncapi-operations.js.map +1 -0
  311. package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.d.ts +3 -0
  312. package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.d.ts.map +1 -0
  313. package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.js +13 -0
  314. package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.js.map +1 -0
  315. package/lib/commands/split/asyncapi/split-asyncapi-definition.d.ts +9 -0
  316. package/lib/commands/split/asyncapi/split-asyncapi-definition.d.ts.map +1 -0
  317. package/lib/commands/split/asyncapi/split-asyncapi-definition.js +51 -0
  318. package/lib/commands/split/asyncapi/split-asyncapi-definition.js.map +1 -0
  319. package/lib/commands/split/constants.d.ts +7 -0
  320. package/lib/commands/split/constants.d.ts.map +1 -0
  321. package/lib/commands/split/constants.js +7 -0
  322. package/lib/commands/split/constants.js.map +1 -0
  323. package/lib/commands/split/index.d.ts +5 -12
  324. package/lib/commands/split/index.d.ts.map +1 -0
  325. package/lib/commands/split/index.js +45 -258
  326. package/lib/commands/split/index.js.map +1 -0
  327. package/lib/commands/split/oas/constants.d.ts +3 -0
  328. package/lib/commands/split/oas/constants.d.ts.map +1 -0
  329. package/lib/commands/split/oas/constants.js +23 -0
  330. package/lib/commands/split/oas/constants.js.map +1 -0
  331. package/lib/commands/split/oas/split-oas-definition.d.ts +3 -0
  332. package/lib/commands/split/oas/split-oas-definition.d.ts.map +1 -0
  333. package/lib/commands/split/oas/split-oas-definition.js +19 -0
  334. package/lib/commands/split/oas/split-oas-definition.js.map +1 -0
  335. package/lib/commands/split/types.d.ts +22 -30
  336. package/lib/commands/split/types.d.ts.map +1 -0
  337. package/lib/commands/split/types.js +2 -51
  338. package/lib/commands/split/types.js.map +1 -0
  339. package/lib/commands/split/utils/crawl.d.ts +2 -0
  340. package/lib/commands/split/utils/crawl.d.ts.map +1 -0
  341. package/lib/commands/split/utils/crawl.js +15 -0
  342. package/lib/commands/split/utils/crawl.js.map +1 -0
  343. package/lib/commands/split/utils/create-component-dir.d.ts +2 -0
  344. package/lib/commands/split/utils/create-component-dir.d.ts.map +1 -0
  345. package/lib/commands/split/utils/create-component-dir.js +8 -0
  346. package/lib/commands/split/utils/create-component-dir.js.map +1 -0
  347. package/lib/commands/split/utils/does-file-differ.d.ts +2 -0
  348. package/lib/commands/split/utils/does-file-differ.d.ts.map +1 -0
  349. package/lib/commands/split/utils/does-file-differ.js +7 -0
  350. package/lib/commands/split/utils/does-file-differ.js.map +1 -0
  351. package/lib/commands/split/utils/extract-filename-from-path.d.ts +2 -0
  352. package/lib/commands/split/utils/extract-filename-from-path.d.ts.map +1 -0
  353. package/lib/commands/split/utils/extract-filename-from-path.js +5 -0
  354. package/lib/commands/split/utils/extract-filename-from-path.js.map +1 -0
  355. package/lib/commands/split/utils/find-component-type.d.ts +3 -0
  356. package/lib/commands/split/utils/find-component-type.d.ts.map +1 -0
  357. package/lib/commands/split/utils/find-component-type.js +8 -0
  358. package/lib/commands/split/utils/find-component-type.js.map +1 -0
  359. package/lib/commands/split/utils/gather-components-files.d.ts +4 -0
  360. package/lib/commands/split/utils/gather-components-files.d.ts.map +1 -0
  361. package/lib/commands/split/utils/gather-components-files.js +12 -0
  362. package/lib/commands/split/utils/gather-components-files.js.map +1 -0
  363. package/lib/commands/split/utils/get-file-name-path.d.ts +2 -0
  364. package/lib/commands/split/utils/get-file-name-path.d.ts.map +1 -0
  365. package/lib/commands/split/utils/get-file-name-path.js +5 -0
  366. package/lib/commands/split/utils/get-file-name-path.js.map +1 -0
  367. package/lib/commands/split/utils/implicitly-reference-discriminator.d.ts +2 -0
  368. package/lib/commands/split/utils/implicitly-reference-discriminator.d.ts.map +1 -0
  369. package/lib/commands/split/utils/implicitly-reference-discriminator.js +31 -0
  370. package/lib/commands/split/utils/implicitly-reference-discriminator.js.map +1 -0
  371. package/lib/commands/split/utils/is-not-security-component-type.d.ts +2 -0
  372. package/lib/commands/split/utils/is-not-security-component-type.d.ts.map +1 -0
  373. package/lib/commands/split/utils/is-not-security-component-type.js +4 -0
  374. package/lib/commands/split/utils/is-not-security-component-type.js.map +1 -0
  375. package/lib/commands/split/utils/is-supported-extension.d.ts +2 -0
  376. package/lib/commands/split/utils/is-supported-extension.d.ts.map +1 -0
  377. package/lib/commands/split/utils/is-supported-extension.js +4 -0
  378. package/lib/commands/split/utils/is-supported-extension.js.map +1 -0
  379. package/lib/commands/split/utils/iterate-components.d.ts +3 -0
  380. package/lib/commands/split/utils/iterate-components.d.ts.map +1 -0
  381. package/lib/commands/split/utils/iterate-components.js +55 -0
  382. package/lib/commands/split/utils/iterate-components.js.map +1 -0
  383. package/lib/commands/split/utils/iterate-path-items.d.ts +3 -0
  384. package/lib/commands/split/utils/iterate-path-items.d.ts.map +1 -0
  385. package/lib/commands/split/utils/iterate-path-items.js +42 -0
  386. package/lib/commands/split/utils/iterate-path-items.js.map +1 -0
  387. package/lib/commands/split/utils/remove-empty-components.d.ts +4 -0
  388. package/lib/commands/split/utils/remove-empty-components.d.ts.map +1 -0
  389. package/lib/commands/split/utils/remove-empty-components.js +10 -0
  390. package/lib/commands/split/utils/remove-empty-components.js.map +1 -0
  391. package/lib/commands/split/utils/replace-$-refs.d.ts +3 -0
  392. package/lib/commands/split/utils/replace-$-refs.d.ts.map +1 -0
  393. package/lib/commands/split/utils/replace-$-refs.js +34 -0
  394. package/lib/commands/split/utils/replace-$-refs.js.map +1 -0
  395. package/lib/commands/split/utils/replace-channel-refs.d.ts +3 -0
  396. package/lib/commands/split/utils/replace-channel-refs.d.ts.map +1 -0
  397. package/lib/commands/split/utils/replace-channel-refs.js +30 -0
  398. package/lib/commands/split/utils/replace-channel-refs.js.map +1 -0
  399. package/lib/commands/split/utils/starts-with-components.d.ts +2 -0
  400. package/lib/commands/split/utils/starts-with-components.d.ts.map +1 -0
  401. package/lib/commands/split/utils/starts-with-components.js +5 -0
  402. package/lib/commands/split/utils/starts-with-components.js.map +1 -0
  403. package/lib/commands/split/utils/traverse-directory-deep.d.ts +3 -0
  404. package/lib/commands/split/utils/traverse-directory-deep.d.ts.map +1 -0
  405. package/lib/commands/split/utils/traverse-directory-deep.js +27 -0
  406. package/lib/commands/split/utils/traverse-directory-deep.js.map +1 -0
  407. package/lib/commands/stats/index.d.ts +9 -0
  408. package/lib/commands/stats/index.d.ts.map +1 -0
  409. package/lib/commands/stats/index.js +42 -0
  410. package/lib/commands/stats/index.js.map +1 -0
  411. package/lib/commands/stats/print-stats/index.d.ts +3 -0
  412. package/lib/commands/stats/print-stats/index.d.ts.map +1 -0
  413. package/lib/commands/stats/print-stats/index.js +22 -0
  414. package/lib/commands/stats/print-stats/index.js.map +1 -0
  415. package/lib/commands/stats/print-stats/json.d.ts +3 -0
  416. package/lib/commands/stats/print-stats/json.d.ts.map +1 -0
  417. package/lib/commands/stats/print-stats/json.js +13 -0
  418. package/lib/commands/stats/print-stats/json.js.map +1 -0
  419. package/lib/commands/stats/print-stats/markdown.d.ts +3 -0
  420. package/lib/commands/stats/print-stats/markdown.d.ts.map +1 -0
  421. package/lib/commands/stats/print-stats/markdown.js +10 -0
  422. package/lib/commands/stats/print-stats/markdown.js.map +1 -0
  423. package/lib/commands/stats/print-stats/stylish.d.ts +3 -0
  424. package/lib/commands/stats/print-stats/stylish.d.ts.map +1 -0
  425. package/lib/commands/stats/print-stats/stylish.js +11 -0
  426. package/lib/commands/stats/print-stats/stylish.js.map +1 -0
  427. package/lib/commands/stats/visitor-and-accumulator-resolver.d.ts +103 -0
  428. package/lib/commands/stats/visitor-and-accumulator-resolver.d.ts.map +1 -0
  429. package/lib/commands/stats/visitor-and-accumulator-resolver.js +46 -0
  430. package/lib/commands/stats/visitor-and-accumulator-resolver.js.map +1 -0
  431. package/lib/commands/translations.d.ts +5 -4
  432. package/lib/commands/translations.d.ts.map +1 -0
  433. package/lib/commands/translations.js +11 -13
  434. package/lib/commands/translations.js.map +1 -0
  435. package/lib/index.d.ts +2 -1
  436. package/lib/index.d.ts.map +1 -0
  437. package/lib/index.js +189 -260
  438. package/lib/index.js.map +1 -0
  439. package/lib/reunite/api/api-client.d.ts +6 -8
  440. package/lib/reunite/api/api-client.d.ts.map +1 -0
  441. package/lib/reunite/api/api-client.js +61 -78
  442. package/lib/reunite/api/api-client.js.map +1 -0
  443. package/lib/reunite/api/api-keys.d.ts +2 -1
  444. package/lib/reunite/api/api-keys.d.ts.map +1 -0
  445. package/lib/reunite/api/api-keys.js +4 -20
  446. package/lib/reunite/api/api-keys.js.map +1 -0
  447. package/lib/reunite/api/domains.d.ts +11 -3
  448. package/lib/reunite/api/domains.d.ts.map +1 -0
  449. package/lib/reunite/api/domains.js +46 -16
  450. package/lib/reunite/api/domains.js.map +1 -0
  451. package/lib/reunite/api/index.d.ts +4 -3
  452. package/lib/reunite/api/index.d.ts.map +1 -0
  453. package/lib/reunite/api/index.js +4 -19
  454. package/lib/reunite/api/index.js.map +1 -0
  455. package/lib/reunite/api/types.d.ts +1 -0
  456. package/lib/reunite/api/types.d.ts.map +1 -0
  457. package/lib/reunite/api/types.js +2 -2
  458. package/lib/reunite/api/types.js.map +1 -0
  459. package/lib/reunite/commands/push-status.d.ts +8 -7
  460. package/lib/reunite/commands/push-status.d.ts.map +1 -0
  461. package/lib/reunite/commands/push-status.js +30 -37
  462. package/lib/reunite/commands/push-status.js.map +1 -0
  463. package/lib/reunite/commands/push.d.ts +9 -9
  464. package/lib/reunite/commands/push.d.ts.map +1 -0
  465. package/lib/reunite/commands/push.js +34 -41
  466. package/lib/reunite/commands/push.js.map +1 -0
  467. package/lib/reunite/commands/utils.d.ts +4 -3
  468. package/lib/reunite/commands/utils.d.ts.map +1 -0
  469. package/lib/reunite/commands/utils.js +15 -12
  470. package/lib/reunite/commands/utils.js.map +1 -0
  471. package/lib/reunite/utils.d.ts +1 -0
  472. package/lib/reunite/utils.d.ts.map +1 -0
  473. package/lib/reunite/utils.js +2 -5
  474. package/lib/reunite/utils.js.map +1 -0
  475. package/lib/types.d.ts +19 -30
  476. package/lib/types.d.ts.map +1 -0
  477. package/lib/types.js +2 -5
  478. package/lib/types.js.map +1 -0
  479. package/lib/utils/assert-node-version.d.ts +1 -0
  480. package/lib/utils/assert-node-version.d.ts.map +1 -0
  481. package/lib/utils/assert-node-version.js +8 -10
  482. package/lib/utils/assert-node-version.js.map +1 -0
  483. package/lib/utils/constants.d.ts +5 -0
  484. package/lib/utils/constants.d.ts.map +1 -0
  485. package/lib/utils/constants.js +5 -0
  486. package/lib/utils/constants.js.map +1 -0
  487. package/lib/utils/error.d.ts +4 -0
  488. package/lib/utils/error.d.ts.map +1 -0
  489. package/lib/utils/error.js +8 -0
  490. package/lib/utils/error.js.map +1 -0
  491. package/lib/utils/fetch-with-timeout.d.ts +1 -1
  492. package/lib/utils/fetch-with-timeout.d.ts.map +1 -0
  493. package/lib/utils/fetch-with-timeout.js +17 -17
  494. package/lib/utils/fetch-with-timeout.js.map +1 -0
  495. package/lib/utils/{getCommandNameFromArgs.d.ts → get-command-name-from-args.d.ts} +1 -0
  496. package/lib/utils/get-command-name-from-args.d.ts.map +1 -0
  497. package/lib/utils/get-command-name-from-args.js +4 -0
  498. package/lib/utils/get-command-name-from-args.js.map +1 -0
  499. package/lib/utils/json-stringify-with-array-buffer.d.ts +2 -0
  500. package/lib/utils/json-stringify-with-array-buffer.d.ts.map +1 -0
  501. package/lib/utils/json-stringify-with-array-buffer.js +32 -0
  502. package/lib/utils/json-stringify-with-array-buffer.js.map +1 -0
  503. package/lib/utils/miscellaneous.d.ts +18 -56
  504. package/lib/utils/miscellaneous.d.ts.map +1 -0
  505. package/lib/utils/miscellaneous.js +200 -323
  506. package/lib/utils/miscellaneous.js.map +1 -0
  507. package/lib/utils/network-check.d.ts +2 -0
  508. package/lib/utils/network-check.d.ts.map +1 -0
  509. package/lib/utils/network-check.js +12 -0
  510. package/lib/utils/network-check.js.map +1 -0
  511. package/lib/utils/otel.d.ts +8 -0
  512. package/lib/utils/otel.d.ts.map +1 -0
  513. package/lib/utils/otel.js +40 -0
  514. package/lib/utils/otel.js.map +1 -0
  515. package/lib/utils/package.d.ts +2 -0
  516. package/lib/utils/package.d.ts.map +1 -0
  517. package/lib/utils/package.js +4 -0
  518. package/lib/utils/package.js.map +1 -0
  519. package/lib/utils/platform.d.ts +1 -0
  520. package/lib/utils/platform.d.ts.map +1 -0
  521. package/lib/utils/platform.js +5 -9
  522. package/lib/utils/platform.js.map +1 -0
  523. package/lib/utils/proxy-agent.d.ts +5 -0
  524. package/lib/utils/proxy-agent.d.ts.map +1 -0
  525. package/lib/utils/proxy-agent.js +41 -0
  526. package/lib/utils/proxy-agent.js.map +1 -0
  527. package/lib/utils/read-env-variables.d.ts +2 -0
  528. package/lib/utils/read-env-variables.d.ts.map +1 -0
  529. package/lib/utils/read-env-variables.js +18 -0
  530. package/lib/utils/read-env-variables.js.map +1 -0
  531. package/lib/utils/spinner.d.ts +1 -0
  532. package/lib/utils/spinner.d.ts.map +1 -0
  533. package/lib/utils/spinner.js +12 -10
  534. package/lib/utils/spinner.js.map +1 -0
  535. package/lib/utils/strip-ansi-codes.d.ts +2 -0
  536. package/lib/utils/strip-ansi-codes.d.ts.map +1 -0
  537. package/lib/utils/strip-ansi-codes.js +6 -0
  538. package/lib/utils/strip-ansi-codes.js.map +1 -0
  539. package/lib/utils/telemetry.d.ts +22 -0
  540. package/lib/utils/telemetry.d.ts.map +1 -0
  541. package/lib/utils/telemetry.js +236 -0
  542. package/lib/utils/telemetry.js.map +1 -0
  543. package/lib/utils/update-version-notifier.d.ts +1 -1
  544. package/lib/utils/update-version-notifier.d.ts.map +1 -0
  545. package/lib/utils/update-version-notifier.js +36 -38
  546. package/lib/utils/update-version-notifier.js.map +1 -0
  547. package/lib/utils/validate-mount-path.d.ts +2 -0
  548. package/lib/utils/validate-mount-path.d.ts.map +1 -0
  549. package/lib/utils/validate-mount-path.js +7 -0
  550. package/lib/utils/validate-mount-path.js.map +1 -0
  551. package/lib/utils/validate-positive-number.d.ts +2 -0
  552. package/lib/utils/validate-positive-number.d.ts.map +1 -0
  553. package/lib/utils/validate-positive-number.js +13 -0
  554. package/lib/utils/validate-positive-number.js.map +1 -0
  555. package/lib/wrapper.d.ts +5 -5
  556. package/lib/wrapper.d.ts.map +1 -0
  557. package/lib/wrapper.js +52 -27
  558. package/lib/wrapper.js.map +1 -0
  559. package/package.json +35 -31
  560. package/lib/__mocks__/@redocly/openapi-core.d.ts +0 -99
  561. package/lib/__mocks__/@redocly/openapi-core.js +0 -84
  562. package/lib/__mocks__/documents.d.ts +0 -150
  563. package/lib/__mocks__/documents.js +0 -123
  564. package/lib/__mocks__/fs.d.ts +0 -8
  565. package/lib/__mocks__/fs.js +0 -9
  566. package/lib/__mocks__/perf_hooks.d.ts +0 -3
  567. package/lib/__mocks__/perf_hooks.js +0 -6
  568. package/lib/__mocks__/redoc.d.ts +0 -6
  569. package/lib/__mocks__/redoc.js +0 -5
  570. package/lib/__tests__/commands/build-docs.test.d.ts +0 -1
  571. package/lib/__tests__/commands/build-docs.test.js +0 -54
  572. package/lib/__tests__/commands/bundle.test.d.ts +0 -1
  573. package/lib/__tests__/commands/bundle.test.js +0 -235
  574. package/lib/__tests__/commands/join.test.d.ts +0 -1
  575. package/lib/__tests__/commands/join.test.js +0 -274
  576. package/lib/__tests__/commands/lint.test.d.ts +0 -1
  577. package/lib/__tests__/commands/lint.test.js +0 -149
  578. package/lib/__tests__/commands/push-region.test.d.ts +0 -1
  579. package/lib/__tests__/commands/push-region.test.js +0 -90
  580. package/lib/__tests__/commands/push.test.d.ts +0 -1
  581. package/lib/__tests__/commands/push.test.js +0 -496
  582. package/lib/__tests__/fetch-with-timeout.test.d.ts +0 -1
  583. package/lib/__tests__/fetch-with-timeout.test.js +0 -64
  584. package/lib/__tests__/fixtures/config.d.ts +0 -21
  585. package/lib/__tests__/fixtures/config.js +0 -24
  586. package/lib/__tests__/spinner.test.d.ts +0 -1
  587. package/lib/__tests__/spinner.test.js +0 -43
  588. package/lib/__tests__/utils.test.d.ts +0 -1
  589. package/lib/__tests__/utils.test.js +0 -651
  590. package/lib/__tests__/wrapper.test.d.ts +0 -1
  591. package/lib/__tests__/wrapper.test.js +0 -76
  592. package/lib/auth/__tests__/device-flow.test.d.ts +0 -1
  593. package/lib/auth/__tests__/device-flow.test.js +0 -62
  594. package/lib/auth/__tests__/oauth-client.test.d.ts +0 -1
  595. package/lib/auth/__tests__/oauth-client.test.js +0 -93
  596. package/lib/commands/join.d.ts +0 -11
  597. package/lib/commands/join.js +0 -566
  598. package/lib/commands/preview-docs/index.d.ts +0 -12
  599. package/lib/commands/preview-docs/index.js +0 -127
  600. package/lib/commands/preview-docs/preview-server/default.hbs +0 -24
  601. package/lib/commands/preview-docs/preview-server/hot.js +0 -59
  602. package/lib/commands/preview-docs/preview-server/oauth2-redirect.html +0 -21
  603. package/lib/commands/preview-docs/preview-server/preview-server.d.ts +0 -5
  604. package/lib/commands/preview-docs/preview-server/preview-server.js +0 -113
  605. package/lib/commands/preview-docs/preview-server/server.d.ts +0 -22
  606. package/lib/commands/preview-docs/preview-server/server.js +0 -85
  607. package/lib/commands/push.d.ts +0 -44
  608. package/lib/commands/push.js +0 -301
  609. package/lib/commands/split/__tests__/index.test.d.ts +0 -1
  610. package/lib/commands/split/__tests__/index.test.js +0 -91
  611. package/lib/commands/stats.d.ts +0 -8
  612. package/lib/commands/stats.js +0 -96
  613. package/lib/otel.d.ts +0 -10
  614. package/lib/otel.js +0 -47
  615. package/lib/reunite/api/__tests__/api-keys.test.d.ts +0 -1
  616. package/lib/reunite/api/__tests__/api-keys.test.js +0 -26
  617. package/lib/reunite/api/__tests__/api.client.test.d.ts +0 -1
  618. package/lib/reunite/api/__tests__/api.client.test.js +0 -385
  619. package/lib/reunite/api/__tests__/domains.test.d.ts +0 -1
  620. package/lib/reunite/api/__tests__/domains.test.js +0 -32
  621. package/lib/reunite/commands/__tests__/push-status.test.d.ts +0 -1
  622. package/lib/reunite/commands/__tests__/push-status.test.js +0 -563
  623. package/lib/reunite/commands/__tests__/push.test.d.ts +0 -1
  624. package/lib/reunite/commands/__tests__/push.test.js +0 -315
  625. package/lib/reunite/commands/__tests__/utils.test.d.ts +0 -1
  626. package/lib/reunite/commands/__tests__/utils.test.js +0 -51
  627. package/lib/utils/__mocks__/miscellaneous.d.ts +0 -43
  628. package/lib/utils/__mocks__/miscellaneous.js +0 -24
  629. package/lib/utils/getCommandNameFromArgs.js +0 -6
  630. package/lib/utils/js-utils.d.ts +0 -5
  631. package/lib/utils/js-utils.js +0 -28
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.
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- require('../lib/index');
3
+ import '../lib/index.js';
@@ -1,26 +1,24 @@
1
- export type AuthToken = {
1
+ export type Credentials = {
2
2
  access_token: string;
3
- refresh_token?: string;
3
+ refresh_token: string;
4
+ expires_in: number;
5
+ residency?: string;
4
6
  token_type?: string;
5
- expires_in?: number;
6
7
  };
7
8
  export declare class RedoclyOAuthDeviceFlow {
8
9
  private baseUrl;
9
- private clientName;
10
- private version;
11
10
  private apiClient;
12
- constructor(baseUrl: string, clientName: string, version: string);
13
- run(): Promise<AuthToken>;
11
+ private clientName;
12
+ constructor(baseUrl: string);
13
+ run(): Promise<Credentials>;
14
14
  private openBrowser;
15
15
  verifyToken(accessToken: string): Promise<boolean>;
16
16
  verifyApiKey(apiKey: string): Promise<boolean>;
17
- refreshToken(refreshToken: string): Promise<{
18
- access_token: any;
19
- refresh_token: any;
20
- expires_in: any;
21
- }>;
17
+ refreshToken(refreshToken?: string): Promise<Credentials>;
22
18
  private pollingAccessToken;
23
19
  private getAccessToken;
24
20
  private getDeviceCode;
25
21
  private sendRequest;
22
+ private withResidency;
26
23
  }
24
+ //# sourceMappingURL=device-flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-flow.d.ts","sourceRoot":"","sources":["../../src/auth/device-flow.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,qBAAa,sBAAsB;IAIrB,OAAO,CAAC,OAAO;IAH3B,OAAO,CAAC,SAAS,CAAmB;IACpC,OAAO,CAAC,UAAU,CAAiB;gBAEf,OAAO,EAAE,MAAM;IAI7B,GAAG;IA0BT,OAAO,CAAC,WAAW;IAeb,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYlD,YAAY,CAAC,MAAM,EAAE,MAAM;IAW3B,YAAY,CAAC,YAAY,CAAC,EAAE,MAAM;YAkB1B,kBAAkB;YA4BlB,cAAc;YAQd,aAAa;YAsBb,WAAW;IAmBzB,OAAO,CAAC,aAAa;CAMtB"}
@@ -1,29 +1,29 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RedoclyOAuthDeviceFlow = void 0;
4
- const colorette_1 = require("colorette");
5
- const childProcess = require("child_process");
6
- const api_client_1 = require("../reunite/api/api-client");
7
- class RedoclyOAuthDeviceFlow {
8
- constructor(baseUrl, clientName, version) {
1
+ import { logger } from '@redocly/openapi-core';
2
+ import { blue, green } from 'colorette';
3
+ import * as childProcess from 'node:child_process';
4
+ import { ReuniteApiClient } from '../reunite/api/api-client.js';
5
+ import { DEFAULT_FETCH_TIMEOUT } from '../utils/constants.js';
6
+ export class RedoclyOAuthDeviceFlow {
7
+ baseUrl;
8
+ apiClient;
9
+ clientName = 'redocly-cli';
10
+ constructor(baseUrl) {
9
11
  this.baseUrl = baseUrl;
10
- this.clientName = clientName;
11
- this.version = version;
12
- this.apiClient = new api_client_1.ReuniteApiClient(this.version, 'login');
12
+ this.apiClient = new ReuniteApiClient('login');
13
13
  }
14
14
  async run() {
15
15
  const code = await this.getDeviceCode();
16
- process.stdout.write('Attempting to automatically open the SSO authorization page in your default browser.\n');
17
- process.stdout.write('If the browser does not open or you wish to use a different device to authorize this request, open the following URL:\n\n');
18
- process.stdout.write((0, colorette_1.blue)(code.verificationUri));
19
- process.stdout.write(`\n\n`);
20
- process.stdout.write(`Then enter the code:\n\n`);
21
- process.stdout.write((0, colorette_1.blue)(code.userCode));
22
- process.stdout.write(`\n\n`);
16
+ logger.output('Attempting to automatically open the SSO authorization page in your default browser.\n');
17
+ logger.output('If the browser does not open or you wish to use a different device to authorize this request, open the following URL:\n\n');
18
+ logger.output(blue(code.verificationUri));
19
+ logger.output(`\n\n`);
20
+ logger.output(`Then enter the code:\n\n`);
21
+ logger.output(blue(code.userCode));
22
+ logger.output(`\n\n`);
23
23
  this.openBrowser(code.verificationUriComplete);
24
24
  const accessToken = await this.pollingAccessToken(code.deviceCode, code.interval, code.expiresIn);
25
- process.stdout.write((0, colorette_1.green)('✅ Logged in\n\n'));
26
- return accessToken;
25
+ logger.output(green('✅ Logged in\n\n'));
26
+ return this.withResidency(accessToken);
27
27
  }
28
28
  openBrowser(url) {
29
29
  try {
@@ -69,11 +69,11 @@ class RedoclyOAuthDeviceFlow {
69
69
  if (!response.access_token) {
70
70
  throw new Error('Failed to refresh token');
71
71
  }
72
- return {
72
+ return this.withResidency({
73
73
  access_token: response.access_token,
74
74
  refresh_token: response.refresh_token,
75
75
  expires_in: response.expires_in,
76
- };
76
+ });
77
77
  }
78
78
  async pollingAccessToken(deviceCode, interval, expiresIn) {
79
79
  return new Promise((resolve, reject) => {
@@ -117,17 +117,24 @@ class RedoclyOAuthDeviceFlow {
117
117
  expiresIn,
118
118
  };
119
119
  }
120
- async sendRequest(url, method = 'GET', body = undefined, headers = {}) {
121
- url = `${this.baseUrl}${url}`;
120
+ async sendRequest(path, method = 'GET', body = undefined, headers = {}) {
121
+ const url = `${this.baseUrl}/api${path}`;
122
122
  const response = await this.apiClient.request(url, {
123
123
  body: body ? JSON.stringify(body) : body,
124
124
  method,
125
125
  headers: { 'Content-Type': 'application/json', ...headers },
126
+ timeout: DEFAULT_FETCH_TIMEOUT,
126
127
  });
127
128
  if (response.status === 204) {
128
129
  return { success: true };
129
130
  }
130
131
  return await response.json();
131
132
  }
133
+ withResidency(credentials) {
134
+ return {
135
+ ...credentials,
136
+ residency: this.baseUrl,
137
+ };
138
+ }
132
139
  }
133
- exports.RedoclyOAuthDeviceFlow = RedoclyOAuthDeviceFlow;
140
+ //# sourceMappingURL=device-flow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-flow.js","sourceRoot":"","sources":["../../src/auth/device-flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAU9D,MAAM,OAAO,sBAAsB;IAIb;IAHZ,SAAS,CAAmB;IAC5B,UAAU,GAAG,aAAa,CAAC;IAEnC,YAAoB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QACxC,MAAM,CAAC,MAAM,CACX,wFAAwF,CACzF,CAAC;QACF,MAAM,CAAC,MAAM,CACX,2HAA2H,CAC5H,CAAC;QACF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ACR,eAAe;YACf,uBAAuB;YACvB,QAAQ;YACR,SAAS;SACV,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,WAAW,CACvB,IAAY,EACZ,SAAiB,KAAK,EACtB,OAA4C,SAAS,EACrD,UAAkC,EAAE;QAEpC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,OAAO,IAAI,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE;YACjD,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;YACxC,MAAM;YACN,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE;YAC3D,OAAO,EAAE,qBAAqB;SAC/B,CAAC,CAAC;QACH,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC5B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QACD,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;IAEO,aAAa,CAAC,WAAwB;QAC5C,OAAO;YACL,GAAG,WAAW;YACd,SAAS,EAAE,IAAI,CAAC,OAAO;SACxB,CAAC;IACJ,CAAC;CACF"}
@@ -1,14 +1,18 @@
1
1
  export declare class RedoclyOAuthClient {
2
- private clientName;
3
- private version;
4
- private dir;
5
- private cipher;
6
- private decipher;
7
- constructor(clientName: string, version: string);
2
+ readonly credentialsFolderPath: string;
3
+ readonly credentialsFilePath: string;
4
+ readonly credentialsFileName: string;
5
+ private readonly key;
6
+ private readonly iv;
7
+ constructor();
8
8
  login(baseUrl: string): Promise<void>;
9
9
  logout(): Promise<void>;
10
- isAuthorized(baseUrl: string, apiKey?: string): Promise<boolean>;
11
- private saveToken;
12
- private readToken;
13
- private removeToken;
10
+ isAuthorized(reuniteUrl: string, apiKey?: string): Promise<boolean>;
11
+ getAccessToken: (reuniteUrl: string) => Promise<string | null>;
12
+ private saveCredentials;
13
+ private readCredentials;
14
+ private removeCredentials;
15
+ private encryptCredentials;
16
+ private decryptCredentials;
14
17
  }
18
+ //# sourceMappingURL=oauth-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client.d.ts","sourceRoot":"","sources":["../../src/auth/oauth-client.ts"],"names":[],"mappings":"AAaA,qBAAa,kBAAkB;IAC7B,SAAgB,qBAAqB,EAAE,MAAM,CAAC;IAC9C,SAAgB,mBAAmB,EAAE,MAAM,CAAC;IAC5C,SAAgB,mBAAmB,EAAE,MAAM,CAAC;IAE5C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAS;;IAkBf,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUrC,MAAM;IAQN,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWzE,cAAc,GAAU,YAAY,MAAM,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA0BxE;YAEY,eAAe;YASf,eAAe;YAaf,iBAAiB;IAM/B,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,kBAAkB;CAS3B"}
@@ -1,93 +1,117 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RedoclyOAuthClient = void 0;
4
- const node_os_1 = require("node:os");
5
- const path = require("node:path");
6
- const node_fs_1 = require("node:fs");
7
- const crypto = require("node:crypto");
8
- const node_buffer_1 = require("node:buffer");
9
- const device_flow_1 = require("./device-flow");
10
- const SALT = '4618dbc9-8aed-4e27-aaf0-225f4603e5a4';
1
+ import { logger } from '@redocly/openapi-core';
2
+ import { Buffer } from 'node:buffer';
3
+ import crypto from 'node:crypto';
4
+ import { mkdirSync, existsSync, writeFileSync, readFileSync, rmSync } from 'node:fs';
5
+ import { homedir } from 'node:os';
6
+ import path from 'node:path';
7
+ import { isValidReuniteUrl } from '../reunite/api/domains.js';
8
+ import { RedoclyOAuthDeviceFlow } from './device-flow.js';
9
+ const CREDENTIALS_SALT = '4618dbc9-8aed-4e27-aaf0-225f4603e5a4';
11
10
  const CRYPTO_ALGORITHM = 'aes-256-cbc';
12
- class RedoclyOAuthClient {
13
- constructor(clientName, version) {
14
- this.clientName = clientName;
15
- this.version = version;
16
- this.dir = path.join((0, node_os_1.homedir)(), '.redocly');
17
- if (!(0, node_fs_1.existsSync)(this.dir)) {
18
- (0, node_fs_1.mkdirSync)(this.dir);
19
- }
20
- const homeDirPath = process.env.HOME;
21
- const hash = crypto.createHash('sha256');
22
- hash.update(`${homeDirPath}${SALT}`);
23
- const hashHex = hash.digest('hex');
24
- const key = node_buffer_1.Buffer.alloc(32, node_buffer_1.Buffer.from(hashHex).toString('base64')).toString();
25
- const iv = node_buffer_1.Buffer.alloc(16, node_buffer_1.Buffer.from(process.env.HOME).toString('base64')).toString();
26
- this.cipher = crypto.createCipheriv(CRYPTO_ALGORITHM, key, iv);
27
- this.decipher = crypto.createDecipheriv(CRYPTO_ALGORITHM, key, iv);
11
+ export class RedoclyOAuthClient {
12
+ credentialsFolderPath;
13
+ credentialsFilePath;
14
+ credentialsFileName;
15
+ key;
16
+ iv;
17
+ constructor() {
18
+ const homeDirPath = homedir();
19
+ this.credentialsFolderPath = path.join(homeDirPath, '.redocly');
20
+ this.credentialsFileName = 'credentials';
21
+ this.credentialsFilePath = path.join(this.credentialsFolderPath, this.credentialsFileName);
22
+ this.key = crypto
23
+ .createHash('sha256')
24
+ .update(`${this.credentialsFolderPath}${CREDENTIALS_SALT}`)
25
+ .digest();
26
+ this.iv = crypto.createHash('md5').update(this.credentialsFolderPath).digest();
27
+ mkdirSync(this.credentialsFolderPath, { recursive: true });
28
28
  }
29
29
  async login(baseUrl) {
30
- const deviceFlow = new device_flow_1.RedoclyOAuthDeviceFlow(baseUrl, this.clientName, this.version);
31
- const token = await deviceFlow.run();
32
- if (!token) {
33
- throw new Error('Failed to login');
30
+ const deviceFlow = new RedoclyOAuthDeviceFlow(baseUrl);
31
+ const credentials = await deviceFlow.run();
32
+ if (!credentials) {
33
+ throw new Error('Failed to login. No credentials received.');
34
34
  }
35
- this.saveToken(token);
35
+ this.saveCredentials(credentials);
36
36
  }
37
37
  async logout() {
38
38
  try {
39
- this.removeToken();
39
+ this.removeCredentials();
40
40
  }
41
41
  catch (err) {
42
42
  // do nothing
43
43
  }
44
44
  }
45
- async isAuthorized(baseUrl, apiKey) {
46
- const deviceFlow = new device_flow_1.RedoclyOAuthDeviceFlow(baseUrl, this.clientName, this.version);
45
+ async isAuthorized(reuniteUrl, apiKey) {
47
46
  if (apiKey) {
48
- return await deviceFlow.verifyApiKey(apiKey);
47
+ const deviceFlow = new RedoclyOAuthDeviceFlow(reuniteUrl);
48
+ return deviceFlow.verifyApiKey(apiKey);
49
49
  }
50
- const token = await this.readToken();
51
- if (!token) {
52
- return false;
50
+ const accessToken = await this.getAccessToken(reuniteUrl);
51
+ return Boolean(accessToken);
52
+ }
53
+ getAccessToken = async (reuniteUrl) => {
54
+ const deviceFlow = new RedoclyOAuthDeviceFlow(reuniteUrl);
55
+ const credentials = await this.readCredentials();
56
+ if (!credentials ||
57
+ !isValidReuniteUrl(reuniteUrl) ||
58
+ (credentials.residency && credentials.residency !== reuniteUrl)) {
59
+ return null;
53
60
  }
54
- const isValidAccessToken = await deviceFlow.verifyToken(token.access_token);
55
- if (isValidAccessToken) {
56
- return true;
61
+ const isValid = await deviceFlow.verifyToken(credentials.access_token);
62
+ if (isValid) {
63
+ return credentials.access_token;
57
64
  }
58
65
  try {
59
- const newToken = await deviceFlow.refreshToken(token.refresh_token);
60
- await this.saveToken(newToken);
66
+ const newCredentials = await deviceFlow.refreshToken(credentials.refresh_token);
67
+ await this.saveCredentials(newCredentials);
68
+ return newCredentials.access_token;
61
69
  }
62
70
  catch {
63
- return false;
71
+ return null;
64
72
  }
65
- return true;
66
- }
67
- async saveToken(token) {
73
+ };
74
+ async saveCredentials(credentials) {
68
75
  try {
69
- const encrypted = this.cipher.update(JSON.stringify(token), 'utf8', 'hex') + this.cipher.final('hex');
70
- (0, node_fs_1.writeFileSync)(path.join(this.dir, 'auth.json'), encrypted);
76
+ const encryptedCredentials = this.encryptCredentials(credentials);
77
+ writeFileSync(this.credentialsFilePath, encryptedCredentials, 'utf8');
71
78
  }
72
79
  catch (error) {
73
- process.stderr.write('Error saving tokens:', error);
80
+ logger.error(`Failed to save credentials: ${error.message}`);
74
81
  }
75
82
  }
76
- async readToken() {
83
+ async readCredentials() {
84
+ if (!existsSync(this.credentialsFilePath)) {
85
+ return null;
86
+ }
77
87
  try {
78
- const token = (0, node_fs_1.readFileSync)(path.join(this.dir, 'auth.json'), 'utf8');
79
- const decrypted = this.decipher.update(token, 'hex', 'utf8') + this.decipher.final('utf8');
80
- return decrypted ? JSON.parse(decrypted) : null;
88
+ const encryptedCredentials = readFileSync(this.credentialsFilePath, 'utf8');
89
+ return this.decryptCredentials(encryptedCredentials);
81
90
  }
82
91
  catch {
83
92
  return null;
84
93
  }
85
94
  }
86
- async removeToken() {
87
- const tokenPath = path.join(this.dir, 'auth.json');
88
- if ((0, node_fs_1.existsSync)(tokenPath)) {
89
- (0, node_fs_1.rmSync)(tokenPath);
95
+ async removeCredentials() {
96
+ if (existsSync(this.credentialsFilePath)) {
97
+ rmSync(this.credentialsFilePath);
90
98
  }
91
99
  }
100
+ encryptCredentials(credentials) {
101
+ const cipher = crypto.createCipheriv(CRYPTO_ALGORITHM, this.key, this.iv);
102
+ const encrypted = Buffer.concat([
103
+ cipher.update(JSON.stringify(credentials), 'utf8'),
104
+ cipher.final(),
105
+ ]);
106
+ return encrypted.toString('hex');
107
+ }
108
+ decryptCredentials(encryptedCredentials) {
109
+ const decipher = crypto.createDecipheriv(CRYPTO_ALGORITHM, this.key, this.iv);
110
+ const decrypted = Buffer.concat([
111
+ decipher.update(Buffer.from(encryptedCredentials, 'hex')),
112
+ decipher.final(),
113
+ ]);
114
+ return JSON.parse(decrypted.toString('utf8'));
115
+ }
92
116
  }
93
- exports.RedoclyOAuthClient = RedoclyOAuthClient;
117
+ //# sourceMappingURL=oauth-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client.js","sourceRoot":"","sources":["../../src/auth/oauth-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAoB,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE5E,MAAM,gBAAgB,GAAG,sCAAsC,CAAC;AAChE,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAEvC,MAAM,OAAO,kBAAkB;IACb,qBAAqB,CAAS;IAC9B,mBAAmB,CAAS;IAC5B,mBAAmB,CAAS;IAE3B,GAAG,CAAS;IACZ,EAAE,CAAS;IAE5B;QACE,MAAM,WAAW,GAAG,OAAO,EAAE,CAAC;QAE9B,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAChE,IAAI,CAAC,mBAAmB,GAAG,aAAa,CAAC;QACzC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAE3F,IAAI,CA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-1,13 +1,12 @@
1
- import type { CommandArgs } from '../wrapper';
2
- export declare function promptClientToken(domain: string): Promise<string>;
3
- export type LoginOptions = {
4
- verbose?: boolean;
1
+ import type { CommandArgs } from '../wrapper.js';
2
+ export type LoginArgv = {
5
3
  residency?: string;
6
4
  config?: string;
7
- next?: boolean;
5
+ verbose?: boolean;
8
6
  };
9
- export declare function handleLogin({ argv, config, version }: CommandArgs<LoginOptions>): Promise<void>;
10
- export type LogoutOptions = {
7
+ export declare function handleLogin({ argv, config }: CommandArgs<LoginArgv>): Promise<void>;
8
+ export type LogoutArgv = {
11
9
  config?: string;
12
10
  };
13
- export declare function handleLogout({ version }: CommandArgs<LogoutOptions>): Promise<void>;
11
+ export declare function handleLogout(): Promise<void>;
12
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAsB,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,WAAW,CAAC,SAAS,CAAC,iBAwBzE;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAsB,YAAY,kBAKjC"}
@@ -1,51 +1,34 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.promptClientToken = promptClientToken;
4
- exports.handleLogin = handleLogin;
5
- exports.handleLogout = handleLogout;
6
- const colorette_1 = require("colorette");
7
- const openapi_core_1 = require("@redocly/openapi-core");
8
- const miscellaneous_1 = require("../utils/miscellaneous");
9
- const oauth_client_1 = require("../auth/oauth-client");
10
- const api_1 = require("../reunite/api");
11
- function promptClientToken(domain) {
12
- return (0, miscellaneous_1.promptUser)((0, colorette_1.green)(`\n 🔑 Copy your API key from ${(0, colorette_1.blue)(`https://app.${domain}/profile`)} and paste it below`) + (0, colorette_1.yellow)(' (if you want to log in with Reunite, please run `redocly login --next` instead)'), true);
13
- }
14
- async function handleLogin({ argv, config, version }) {
15
- if (argv.next) {
16
- try {
17
- const reuniteUrl = (0, api_1.getReuniteUrl)(argv.residency);
18
- const oauthClient = new oauth_client_1.RedoclyOAuthClient('redocly-cli', version);
19
- await oauthClient.login(reuniteUrl);
20
- }
21
- catch {
22
- if (argv.residency) {
23
- const reuniteUrl = (0, api_1.getReuniteUrl)(argv.residency);
24
- (0, miscellaneous_1.exitWithError)(`❌ Connection to ${reuniteUrl} failed.`);
25
- }
26
- else {
27
- (0, miscellaneous_1.exitWithError)(`❌ Login failed. Please check your credentials and try again.`);
28
- }
1
+ import { logger } from '@redocly/openapi-core';
2
+ import { RedoclyOAuthClient } from '../auth/oauth-client.js';
3
+ import { getReuniteUrl } from '../reunite/api/index.js';
4
+ import { exitWithError } from '../utils/error.js';
5
+ export async function handleLogin({ argv, config }) {
6
+ const reuniteUrl = getReuniteUrl(config, argv.residency);
7
+ try {
8
+ const oauthClient = new RedoclyOAuthClient();
9
+ if (argv.verbose) {
10
+ logger.info(`OAuth client initialized.\n`);
11
+ logger.info(`Local credentials file path: ${oauthClient.credentialsFilePath}\n`);
29
12
  }
13
+ await oauthClient.login(reuniteUrl);
30
14
  }
31
- else {
32
- try {
33
- const region = argv.residency || config.region;
34
- const client = new openapi_core_1.RedoclyClient(region);
35
- const clientToken = await promptClientToken(client.domain);
36
- process.stdout.write((0, colorette_1.gray)('\n Logging in...\n'));
37
- await client.login(clientToken, argv.verbose);
38
- process.stdout.write((0, colorette_1.green)(' Authorization confirmed. ✅\n\n'));
15
+ catch (error) {
16
+ if (argv.verbose) {
17
+ logger.error(`Residency: ${argv.residency}.\n`);
18
+ logger.error(`Login URL: ${reuniteUrl}.\n`);
19
+ logger.error(error.stack || error.message);
20
+ }
21
+ if (argv.residency) {
22
+ exitWithError(`❌ Connection to ${reuniteUrl} failed.`);
39
23
  }
40
- catch (err) {
41
- (0, miscellaneous_1.exitWithError)(' ' + err?.message);
24
+ else {
25
+ exitWithError(`❌ Login failed. Please check your credentials and try again.`);
42
26
  }
43
27
  }
44
28
  }
45
- async function handleLogout({ version }) {
46
- const client = new openapi_core_1.RedoclyClient();
47
- client.logout();
48
- const oauthClient = new oauth_client_1.RedoclyOAuthClient('redocly-cli', version);
29
+ export async function handleLogout() {
30
+ const oauthClient = new RedoclyOAuthClient();
49
31
  oauthClient.logout();
50
- process.stdout.write('Logged out from the Redocly account. ✋ \n');
32
+ logger.output('Logged out from the Redocly account. ✋ \n');
51
33
  }
34
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AASlD,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAA0B;IACxE,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACzD,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAE7C,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,gCAAgC,WAAW,CAAC,mBAAmB,IAAI,CAAC,CAAC;QACnF,CAAC;QAED,MAAM,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,CAAC,KAAK,CAAC,cAAc,IAAI,CAAC,SAAS,KAAK,CAAC,CAAC;YAChD,MAAM,CAAC,KAAK,CAAC,cAAc,UAAU,KAAK,CAAC,CAAC;YAC5C,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;QAED,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,aAAa,CAAC,mBAAmB,UAAU,UAAU,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACN,aAAa,CAAC,8DAA8D,CAAC,CAAC;QAChF,CAAC;IACH,CAAC;AACH,CAAC;AAMD,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,WAAW,GAAG,IAAI,kBAAkB,EAAE,CAAC;IAC7C,WAAW,CAAC,MAAM,EAAE,CAAC;IAErB,MAAM,CAAC,MAAM,CAAC,2CAA2C,CAAC,CAAC;AAC7D,CAAC"}
@@ -1,3 +1,4 @@
1
- import type { BuildDocsArgv } from './types';
2
- import type { CommandArgs } from '../../wrapper';
3
- export declare const handlerBuildCommand: ({ argv, config: configFromFile, collectSpecData, }: CommandArgs<BuildDocsArgv>) => Promise<void>;
1
+ import type { CommandArgs } from '../../wrapper.js';
2
+ import type { BuildDocsArgv } from './types.js';
3
+ export declare const handlerBuildCommand: ({ argv, config, collectSpecData, }: CommandArgs<BuildDocsArgv>) => Promise<void>;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/build-docs/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAKhD,eAAO,MAAM,mBAAmB,GAAU,oCAIvC,WAAW,CAAC,aAAa,CAAC,kBAuC5B,CAAC"}