@redocly/cli 1.34.4 → 2.0.0-next.0

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 (321) hide show
  1. package/README.md +34 -3
  2. package/bin/cli.js +1 -1
  3. package/lib/auth/device-flow.d.ts +1 -0
  4. package/lib/auth/device-flow.d.ts.map +1 -0
  5. package/lib/auth/device-flow.js +15 -17
  6. package/lib/auth/device-flow.js.map +1 -0
  7. package/lib/auth/oauth-client.d.ts +1 -0
  8. package/lib/auth/oauth-client.d.ts.map +1 -0
  9. package/lib/auth/oauth-client.js +21 -23
  10. package/lib/auth/oauth-client.js.map +1 -0
  11. package/lib/commands/auth.d.ts +3 -5
  12. package/lib/commands/auth.d.ts.map +1 -0
  13. package/lib/commands/auth.js +19 -44
  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 +23 -24
  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 -37
  26. package/lib/commands/build-docs/utils.js.map +1 -0
  27. package/lib/commands/bundle.d.ts +6 -3
  28. package/lib/commands/bundle.d.ts.map +1 -0
  29. package/lib/commands/bundle.js +34 -38
  30. package/lib/commands/bundle.js.map +1 -0
  31. package/lib/commands/eject.d.ts +3 -2
  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/join.d.ts +4 -3
  36. package/lib/commands/join.d.ts.map +1 -0
  37. package/lib/commands/join.js +79 -81
  38. package/lib/commands/join.js.map +1 -0
  39. package/lib/commands/lint.d.ts +8 -6
  40. package/lib/commands/lint.d.ts.map +1 -0
  41. package/lib/commands/lint.js +53 -62
  42. package/lib/commands/lint.js.map +1 -0
  43. package/lib/commands/preview-project/constants.d.ts +2 -1
  44. package/lib/commands/preview-project/constants.d.ts.map +1 -0
  45. package/lib/commands/preview-project/constants.js +4 -6
  46. package/lib/commands/preview-project/constants.js.map +1 -0
  47. package/lib/commands/preview-project/index.d.ts +3 -2
  48. package/lib/commands/preview-project/index.d.ts.map +1 -0
  49. package/lib/commands/preview-project/index.js +21 -23
  50. package/lib/commands/preview-project/index.js.map +1 -0
  51. package/lib/commands/preview-project/types.d.ts +3 -2
  52. package/lib/commands/preview-project/types.d.ts.map +1 -0
  53. package/lib/commands/preview-project/types.js +2 -2
  54. package/lib/commands/preview-project/types.js.map +1 -0
  55. package/lib/commands/split/index.d.ts +4 -3
  56. package/lib/commands/split/index.d.ts.map +1 -0
  57. package/lib/commands/split/index.js +53 -57
  58. package/lib/commands/split/index.js.map +1 -0
  59. package/lib/commands/split/types.d.ts +2 -2
  60. package/lib/commands/split/types.d.ts.map +1 -0
  61. package/lib/commands/split/types.js +11 -13
  62. package/lib/commands/split/types.js.map +1 -0
  63. package/lib/commands/stats.d.ts +3 -2
  64. package/lib/commands/stats.d.ts.map +1 -0
  65. package/lib/commands/stats.js +21 -24
  66. package/lib/commands/stats.js.map +1 -0
  67. package/lib/commands/translations.d.ts +3 -2
  68. package/lib/commands/translations.d.ts.map +1 -0
  69. package/lib/commands/translations.js +11 -13
  70. package/lib/commands/translations.js.map +1 -0
  71. package/lib/index.d.ts +2 -1
  72. package/lib/index.d.ts.map +1 -0
  73. package/lib/index.js +109 -239
  74. package/lib/index.js.map +1 -0
  75. package/lib/otel.d.ts +2 -1
  76. package/lib/otel.d.ts.map +1 -0
  77. package/lib/otel.js +22 -23
  78. package/lib/otel.js.map +1 -0
  79. package/lib/reunite/api/api-client.d.ts +4 -3
  80. package/lib/reunite/api/api-client.d.ts.map +1 -0
  81. package/lib/reunite/api/api-client.js +14 -20
  82. package/lib/reunite/api/api-client.js.map +1 -0
  83. package/lib/reunite/api/api-keys.d.ts +2 -1
  84. package/lib/reunite/api/api-keys.d.ts.map +1 -0
  85. package/lib/reunite/api/api-keys.js +4 -20
  86. package/lib/reunite/api/api-keys.js.map +1 -0
  87. package/lib/reunite/api/domains.d.ts +5 -2
  88. package/lib/reunite/api/domains.d.ts.map +1 -0
  89. package/lib/reunite/api/domains.js +6 -15
  90. package/lib/reunite/api/domains.js.map +1 -0
  91. package/lib/reunite/api/index.d.ts +4 -3
  92. package/lib/reunite/api/index.d.ts.map +1 -0
  93. package/lib/reunite/api/index.js +4 -19
  94. package/lib/reunite/api/index.js.map +1 -0
  95. package/lib/reunite/api/types.d.ts +1 -0
  96. package/lib/reunite/api/types.d.ts.map +1 -0
  97. package/lib/reunite/api/types.js +2 -2
  98. package/lib/reunite/api/types.js.map +1 -0
  99. package/lib/reunite/commands/push-status.d.ts +6 -5
  100. package/lib/reunite/commands/push-status.d.ts.map +1 -0
  101. package/lib/reunite/commands/push-status.js +31 -37
  102. package/lib/reunite/commands/push-status.js.map +1 -0
  103. package/lib/reunite/commands/push.d.ts +6 -6
  104. package/lib/reunite/commands/push.d.ts.map +1 -0
  105. package/lib/reunite/commands/push.js +31 -40
  106. package/lib/reunite/commands/push.js.map +1 -0
  107. package/lib/reunite/commands/utils.d.ts +4 -3
  108. package/lib/reunite/commands/utils.d.ts.map +1 -0
  109. package/lib/reunite/commands/utils.js +9 -12
  110. package/lib/reunite/commands/utils.js.map +1 -0
  111. package/lib/reunite/utils.d.ts +1 -0
  112. package/lib/reunite/utils.d.ts.map +1 -0
  113. package/lib/reunite/utils.js +2 -5
  114. package/lib/reunite/utils.js.map +1 -0
  115. package/lib/types.d.ts +15 -27
  116. package/lib/types.d.ts.map +1 -0
  117. package/lib/types.js +2 -5
  118. package/lib/types.js.map +1 -0
  119. package/lib/utils/assert-node-version.d.ts +1 -0
  120. package/lib/utils/assert-node-version.d.ts.map +1 -0
  121. package/lib/utils/assert-node-version.js +8 -10
  122. package/lib/utils/assert-node-version.js.map +1 -0
  123. package/lib/utils/error.d.ts +4 -0
  124. package/lib/utils/error.d.ts.map +1 -0
  125. package/lib/utils/error.js +8 -0
  126. package/lib/utils/error.js.map +1 -0
  127. package/lib/utils/fetch-with-timeout.d.ts +1 -0
  128. package/lib/utils/fetch-with-timeout.d.ts.map +1 -0
  129. package/lib/utils/fetch-with-timeout.js +6 -8
  130. package/lib/utils/fetch-with-timeout.js.map +1 -0
  131. package/lib/utils/{getCommandNameFromArgs.d.ts → get-command-name-from-args.d.ts} +1 -0
  132. package/lib/utils/get-command-name-from-args.d.ts.map +1 -0
  133. package/lib/utils/get-command-name-from-args.js +4 -0
  134. package/lib/utils/get-command-name-from-args.js.map +1 -0
  135. package/lib/utils/js-utils.d.ts +1 -0
  136. package/lib/utils/js-utils.d.ts.map +1 -0
  137. package/lib/utils/js-utils.js +8 -12
  138. package/lib/utils/js-utils.js.map +1 -0
  139. package/lib/utils/miscellaneous.d.ts +9 -48
  140. package/lib/utils/miscellaneous.d.ts.map +1 -0
  141. package/lib/utils/miscellaneous.js +131 -269
  142. package/lib/utils/miscellaneous.js.map +1 -0
  143. package/lib/utils/package.d.ts +2 -0
  144. package/lib/utils/package.d.ts.map +1 -0
  145. package/lib/utils/package.js +4 -0
  146. package/lib/utils/package.js.map +1 -0
  147. package/lib/utils/platform.d.ts +1 -0
  148. package/lib/utils/platform.d.ts.map +1 -0
  149. package/lib/utils/platform.js +5 -9
  150. package/lib/utils/platform.js.map +1 -0
  151. package/lib/utils/proxy-agent.d.ts +3 -0
  152. package/lib/utils/proxy-agent.d.ts.map +1 -0
  153. package/lib/utils/proxy-agent.js +6 -0
  154. package/lib/utils/proxy-agent.js.map +1 -0
  155. package/lib/utils/spinner.d.ts +1 -0
  156. package/lib/utils/spinner.d.ts.map +1 -0
  157. package/lib/utils/spinner.js +8 -10
  158. package/lib/utils/spinner.js.map +1 -0
  159. package/lib/utils/telemetry.d.ts +40 -0
  160. package/lib/utils/telemetry.d.ts.map +1 -0
  161. package/lib/utils/telemetry.js +138 -0
  162. package/lib/utils/telemetry.js.map +1 -0
  163. package/lib/utils/update-version-notifier.d.ts +1 -1
  164. package/lib/utils/update-version-notifier.d.ts.map +1 -0
  165. package/lib/utils/update-version-notifier.js +35 -38
  166. package/lib/utils/update-version-notifier.js.map +1 -0
  167. package/lib/utils/validate-positive-number.d.ts +2 -0
  168. package/lib/utils/validate-positive-number.d.ts.map +1 -0
  169. package/lib/utils/validate-positive-number.js +13 -0
  170. package/lib/utils/validate-positive-number.js.map +1 -0
  171. package/lib/wrapper.d.ts +3 -3
  172. package/lib/wrapper.d.ts.map +1 -0
  173. package/lib/wrapper.js +39 -26
  174. package/lib/wrapper.js.map +1 -0
  175. package/package.json +16 -17
  176. package/CHANGELOG.md +0 -777
  177. package/lib/__mocks__/@redocly/openapi-core.d.ts +0 -99
  178. package/lib/__mocks__/@redocly/openapi-core.js +0 -84
  179. package/lib/__mocks__/documents.d.ts +0 -150
  180. package/lib/__mocks__/documents.js +0 -123
  181. package/lib/__mocks__/fs.d.ts +0 -8
  182. package/lib/__mocks__/fs.js +0 -9
  183. package/lib/__mocks__/perf_hooks.d.ts +0 -3
  184. package/lib/__mocks__/perf_hooks.js +0 -6
  185. package/lib/__mocks__/redoc.d.ts +0 -6
  186. package/lib/__mocks__/redoc.js +0 -5
  187. package/lib/__tests__/commands/build-docs.test.d.ts +0 -1
  188. package/lib/__tests__/commands/build-docs.test.js +0 -54
  189. package/lib/__tests__/commands/bundle.test.d.ts +0 -1
  190. package/lib/__tests__/commands/bundle.test.js +0 -235
  191. package/lib/__tests__/commands/join.test.d.ts +0 -1
  192. package/lib/__tests__/commands/join.test.js +0 -274
  193. package/lib/__tests__/commands/lint.test.d.ts +0 -1
  194. package/lib/__tests__/commands/lint.test.js +0 -149
  195. package/lib/__tests__/commands/push-region.test.d.ts +0 -1
  196. package/lib/__tests__/commands/push-region.test.js +0 -90
  197. package/lib/__tests__/commands/push.test.d.ts +0 -1
  198. package/lib/__tests__/commands/push.test.js +0 -496
  199. package/lib/__tests__/fetch-with-timeout.test.d.ts +0 -1
  200. package/lib/__tests__/fetch-with-timeout.test.js +0 -64
  201. package/lib/__tests__/fixtures/config.d.ts +0 -21
  202. package/lib/__tests__/fixtures/config.js +0 -24
  203. package/lib/__tests__/spinner.test.d.ts +0 -1
  204. package/lib/__tests__/spinner.test.js +0 -43
  205. package/lib/__tests__/utils.test.d.ts +0 -1
  206. package/lib/__tests__/utils.test.js +0 -651
  207. package/lib/__tests__/wrapper.test.d.ts +0 -1
  208. package/lib/__tests__/wrapper.test.js +0 -76
  209. package/lib/auth/__tests__/device-flow.test.d.ts +0 -1
  210. package/lib/auth/__tests__/device-flow.test.js +0 -62
  211. package/lib/auth/__tests__/oauth-client.test.d.ts +0 -1
  212. package/lib/auth/__tests__/oauth-client.test.js +0 -93
  213. package/lib/commands/preview-docs/index.d.ts +0 -12
  214. package/lib/commands/preview-docs/index.js +0 -127
  215. package/lib/commands/preview-docs/preview-server/default.hbs +0 -24
  216. package/lib/commands/preview-docs/preview-server/hot.js +0 -59
  217. package/lib/commands/preview-docs/preview-server/oauth2-redirect.html +0 -21
  218. package/lib/commands/preview-docs/preview-server/preview-server.d.ts +0 -5
  219. package/lib/commands/preview-docs/preview-server/preview-server.js +0 -113
  220. package/lib/commands/preview-docs/preview-server/server.d.ts +0 -22
  221. package/lib/commands/preview-docs/preview-server/server.js +0 -85
  222. package/lib/commands/push.d.ts +0 -44
  223. package/lib/commands/push.js +0 -301
  224. package/lib/commands/split/__tests__/index.test.d.ts +0 -1
  225. package/lib/commands/split/__tests__/index.test.js +0 -91
  226. package/lib/reunite/api/__tests__/api-keys.test.d.ts +0 -1
  227. package/lib/reunite/api/__tests__/api-keys.test.js +0 -26
  228. package/lib/reunite/api/__tests__/api.client.test.d.ts +0 -1
  229. package/lib/reunite/api/__tests__/api.client.test.js +0 -337
  230. package/lib/reunite/api/__tests__/domains.test.d.ts +0 -1
  231. package/lib/reunite/api/__tests__/domains.test.js +0 -32
  232. package/lib/reunite/commands/__tests__/push-status.test.d.ts +0 -1
  233. package/lib/reunite/commands/__tests__/push-status.test.js +0 -563
  234. package/lib/reunite/commands/__tests__/push.test.d.ts +0 -1
  235. package/lib/reunite/commands/__tests__/push.test.js +0 -315
  236. package/lib/reunite/commands/__tests__/utils.test.d.ts +0 -1
  237. package/lib/reunite/commands/__tests__/utils.test.js +0 -51
  238. package/lib/utils/__mocks__/miscellaneous.d.ts +0 -43
  239. package/lib/utils/__mocks__/miscellaneous.js +0 -24
  240. package/lib/utils/getCommandNameFromArgs.js +0 -6
  241. package/src/__mocks__/@redocly/openapi-core.ts +0 -88
  242. package/src/__mocks__/documents.ts +0 -124
  243. package/src/__mocks__/fs.ts +0 -6
  244. package/src/__mocks__/perf_hooks.ts +0 -3
  245. package/src/__mocks__/redoc.ts +0 -2
  246. package/src/__tests__/commands/build-docs.test.ts +0 -59
  247. package/src/__tests__/commands/bundle.test.ts +0 -285
  248. package/src/__tests__/commands/join.test.ts +0 -334
  249. package/src/__tests__/commands/lint.test.ts +0 -190
  250. package/src/__tests__/commands/push-region.test.ts +0 -104
  251. package/src/__tests__/commands/push.test.ts +0 -553
  252. package/src/__tests__/fetch-with-timeout.test.ts +0 -81
  253. package/src/__tests__/fixtures/config.ts +0 -21
  254. package/src/__tests__/fixtures/openapi.json +0 -0
  255. package/src/__tests__/fixtures/openapi.yaml +0 -0
  256. package/src/__tests__/fixtures/redocly.yaml +0 -0
  257. package/src/__tests__/spinner.test.ts +0 -51
  258. package/src/__tests__/utils.test.ts +0 -781
  259. package/src/__tests__/wrapper.test.ts +0 -91
  260. package/src/auth/__tests__/device-flow.test.ts +0 -73
  261. package/src/auth/__tests__/oauth-client.test.ts +0 -117
  262. package/src/auth/device-flow.ts +0 -175
  263. package/src/auth/oauth-client.ts +0 -111
  264. package/src/commands/auth.ts +0 -66
  265. package/src/commands/build-docs/index.ts +0 -55
  266. package/src/commands/build-docs/template.hbs +0 -23
  267. package/src/commands/build-docs/types.ts +0 -25
  268. package/src/commands/build-docs/utils.ts +0 -110
  269. package/src/commands/bundle.ts +0 -154
  270. package/src/commands/eject.ts +0 -42
  271. package/src/commands/join.ts +0 -794
  272. package/src/commands/lint.ts +0 -169
  273. package/src/commands/preview-docs/index.ts +0 -183
  274. package/src/commands/preview-docs/preview-server/default.hbs +0 -24
  275. package/src/commands/preview-docs/preview-server/hot.js +0 -59
  276. package/src/commands/preview-docs/preview-server/oauth2-redirect.html +0 -21
  277. package/src/commands/preview-docs/preview-server/preview-server.ts +0 -159
  278. package/src/commands/preview-docs/preview-server/server.ts +0 -92
  279. package/src/commands/preview-project/constants.ts +0 -23
  280. package/src/commands/preview-project/index.ts +0 -71
  281. package/src/commands/preview-project/types.ts +0 -12
  282. package/src/commands/push.ts +0 -470
  283. package/src/commands/split/__tests__/fixtures/samples.json +0 -61
  284. package/src/commands/split/__tests__/fixtures/spec.json +0 -70
  285. package/src/commands/split/__tests__/fixtures/webhooks.json +0 -85
  286. package/src/commands/split/__tests__/index.test.ts +0 -156
  287. package/src/commands/split/index.ts +0 -397
  288. package/src/commands/split/types.ts +0 -60
  289. package/src/commands/stats.ts +0 -140
  290. package/src/commands/translations.ts +0 -32
  291. package/src/custom.d.ts +0 -1
  292. package/src/index.ts +0 -970
  293. package/src/otel.ts +0 -59
  294. package/src/reunite/api/__tests__/api-keys.test.ts +0 -37
  295. package/src/reunite/api/__tests__/api.client.test.ts +0 -452
  296. package/src/reunite/api/__tests__/domains.test.ts +0 -41
  297. package/src/reunite/api/api-client.ts +0 -381
  298. package/src/reunite/api/api-keys.ts +0 -26
  299. package/src/reunite/api/domains.ts +0 -23
  300. package/src/reunite/api/index.ts +0 -3
  301. package/src/reunite/api/types.ts +0 -108
  302. package/src/reunite/commands/__tests__/push-status.test.ts +0 -653
  303. package/src/reunite/commands/__tests__/push.test.ts +0 -385
  304. package/src/reunite/commands/__tests__/utils.test.ts +0 -62
  305. package/src/reunite/commands/push-status.ts +0 -325
  306. package/src/reunite/commands/push.ts +0 -235
  307. package/src/reunite/commands/utils.ts +0 -66
  308. package/src/reunite/utils.ts +0 -1
  309. package/src/types.ts +0 -64
  310. package/src/utils/__mocks__/miscellaneous.ts +0 -24
  311. package/src/utils/assert-node-version.ts +0 -19
  312. package/src/utils/fetch-with-timeout.ts +0 -30
  313. package/src/utils/getCommandNameFromArgs.ts +0 -5
  314. package/src/utils/js-utils.ts +0 -24
  315. package/src/utils/miscellaneous.ts +0 -729
  316. package/src/utils/platform.ts +0 -31
  317. package/src/utils/spinner.ts +0 -50
  318. package/src/utils/update-version-notifier.ts +0 -115
  319. package/src/wrapper.ts +0 -77
  320. package/tsconfig.json +0 -9
  321. package/tsconfig.tsbuildinfo +0 -1
package/lib/otel.js CHANGED
@@ -1,33 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.otelTelemetry = exports.OtelServerTelemetry = void 0;
4
- const api_1 = require("@opentelemetry/api");
5
- const resources_1 = require("@opentelemetry/resources");
6
- const sdk_trace_node_1 = require("@opentelemetry/sdk-trace-node");
7
- const exporter_trace_otlp_http_1 = require("@opentelemetry/exporter-trace-otlp-http");
8
- const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
9
- const update_version_notifier_1 = require("./utils/update-version-notifier");
10
- const fetch_with_timeout_1 = require("./utils/fetch-with-timeout");
1
+ import { trace } from '@opentelemetry/api';
2
+ import { resourceFromAttributes } from '@opentelemetry/resources';
3
+ import { NodeTracerProvider, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-node';
4
+ import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
5
+ import { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION } from '@opentelemetry/semantic-conventions';
6
+ import { version } from './utils/package.js';
7
+ import { DEFAULT_FETCH_TIMEOUT } from './utils/fetch-with-timeout.js';
11
8
  const OTEL_TRACES_URL = process.env.OTEL_TRACES_URL || 'https://otel.cloud.redocly.com/v1/traces';
12
- class OtelServerTelemetry {
9
+ export class OtelServerTelemetry {
13
10
  init() {
14
- const nodeTracerProvider = new sdk_trace_node_1.NodeTracerProvider({
15
- resource: new resources_1.Resource({
16
- [semantic_conventions_1.ATTR_SERVICE_NAME]: `redocly-cli`,
17
- [semantic_conventions_1.ATTR_SERVICE_VERSION]: `@redocly/cli@${update_version_notifier_1.version}`,
11
+ const nodeTracerProvider = new NodeTracerProvider({
12
+ resource: resourceFromAttributes({
13
+ [ATTR_SERVICE_NAME]: `redocly-cli`,
14
+ [ATTR_SERVICE_VERSION]: `@redocly/cli@${version}`,
18
15
  }),
16
+ spanProcessors: [
17
+ new SimpleSpanProcessor(new OTLPTraceExporter({
18
+ url: OTEL_TRACES_URL,
19
+ headers: {},
20
+ timeoutMillis: DEFAULT_FETCH_TIMEOUT,
21
+ })),
22
+ ],
19
23
  });
20
- nodeTracerProvider.addSpanProcessor(new sdk_trace_node_1.SimpleSpanProcessor(new exporter_trace_otlp_http_1.OTLPTraceExporter({
21
- url: OTEL_TRACES_URL,
22
- headers: {},
23
- timeoutMillis: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT,
24
- })));
25
24
  nodeTracerProvider.register();
26
25
  }
27
26
  send(event, data) {
28
27
  const time = new Date();
29
28
  const eventId = crypto.randomUUID();
30
- const span = api_1.trace.getTracer('CliTelemetry').startSpan(`event.${event}`, {
29
+ const span = trace.getTracer('CliTelemetry').startSpan(`event.${event}`, {
31
30
  attributes: {
32
31
  'cloudevents.event_client.id': eventId,
33
32
  'cloudevents.event_client.type': event,
@@ -43,5 +42,5 @@ class OtelServerTelemetry {
43
42
  span.end(time);
44
43
  }
45
44
  }
46
- exports.OtelServerTelemetry = OtelServerTelemetry;
47
- exports.otelTelemetry = new OtelServerTelemetry();
45
+ export const otelTelemetry = new OtelServerTelemetry();
46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,CAAC,CAAC,SAAS,CAAC,SAAS,KAAK,EAAE,EAAE;YACvE,UAAU,EAAE;gBACV,6BAA6B,EAAE,OAAO;gBACtC,+BAA+B,EAAE,KAAK;aACvC;YACD,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;QACH,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAChD,MAAM,YAAY,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;YAClE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,IAAI,CAAC,YAAY,CAAC,0BAA0B,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;CACF;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,mBAAmB,EAAE,CAAC"}
@@ -1,7 +1,7 @@
1
- import { type FetchWithTimeoutOptions } from '../../utils/fetch-with-timeout';
2
- import type { ReadStream } from 'fs';
1
+ import { type FetchWithTimeoutOptions } from '../../utils/fetch-with-timeout.js';
2
+ import type { ReadStream } from 'node:fs';
3
3
  import type { Readable } from 'node:stream';
4
- import type { ListRemotesResponse, PushResponse, UpsertRemoteResponse } from './types';
4
+ import type { ListRemotesResponse, PushResponse, UpsertRemoteResponse } from './types.js';
5
5
  interface BaseApiClient {
6
6
  request(url: string, options: FetchWithTimeoutOptions): Promise<Response>;
7
7
  }
@@ -83,3 +83,4 @@ export type PushPayload = {
83
83
  };
84
84
  export declare function streamToBuffer(stream: ReadStream | Readable): Promise<Buffer>;
85
85
  export {};
86
+ //# sourceMappingURL=api-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../../src/reunite/api/api-client.ts"],"names":[],"mappings":"AACA,OAAyB,E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E,MAAM,CAAC;IACjB,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE;YACN,IAAI,EAAE,MAAM,CAAC;YACb,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;KACH,CAAC;IACF,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,wBAAsB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAMnF"}
@@ -1,17 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReuniteApi = exports.ReuniteApiClient = exports.ReuniteApiError = void 0;
4
- exports.streamToBuffer = streamToBuffer;
5
- const colorette_1 = require("colorette");
6
- const fetch_with_timeout_1 = require("../../utils/fetch-with-timeout");
7
- class ReuniteApiError extends Error {
1
+ import { logger } from '@redocly/openapi-core';
2
+ import fetchWithTimeout, { DEFAULT_FETCH_TIMEOUT, } from '../../utils/fetch-with-timeout.js';
3
+ export class ReuniteApiError extends Error {
8
4
  constructor(message, status) {
9
5
  super(message);
10
6
  this.status = status;
11
7
  }
12
8
  }
13
- exports.ReuniteApiError = ReuniteApiError;
14
- class ReuniteApiClient {
9
+ export class ReuniteApiClient {
15
10
  constructor(version, command) {
16
11
  this.version = version;
17
12
  this.command = command;
@@ -22,7 +17,7 @@ class ReuniteApiClient {
22
17
  ...options.headers,
23
18
  'user-agent': `redocly-cli/${this.version.trim()} ${this.command}`,
24
19
  };
25
- const response = await (0, fetch_with_timeout_1.default)(url, {
20
+ const response = await fetchWithTimeout(url, {
26
21
  ...options,
27
22
  headers,
28
23
  });
@@ -59,7 +54,6 @@ class ReuniteApiClient {
59
54
  return Date.parse(sunsetDate);
60
55
  }
61
56
  }
62
- exports.ReuniteApiClient = ReuniteApiClient;
63
57
  class RemotesApi {
64
58
  constructor(client, domain, apiKey) {
65
59
  this.client = client;
@@ -76,7 +70,7 @@ class RemotesApi {
76
70
  async getDefaultBranch(organizationId, projectId) {
77
71
  try {
78
72
  const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/source`, {
79
- timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT,
73
+ timeout: DEFAULT_FETCH_TIMEOUT,
80
74
  method: 'GET',
81
75
  headers: {
82
76
  'Content-Type': 'application/json',
@@ -97,7 +91,7 @@ class RemotesApi {
97
91
  async upsert(organizationId, projectId, remote) {
98
92
  try {
99
93
  const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/remotes`, {
100
- timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT,
94
+ timeout: DEFAULT_FETCH_TIMEOUT,
101
95
  method: 'POST',
102
96
  headers: {
103
97
  'Content-Type': 'application/json',
@@ -160,7 +154,7 @@ class RemotesApi {
160
154
  async getRemotesList({ organizationId, projectId, mountPath, }) {
161
155
  try {
162
156
  const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/remotes?filter=mountPath:/${mountPath}/`, {
163
- timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT,
157
+ timeout: DEFAULT_FETCH_TIMEOUT,
164
158
  method: 'GET',
165
159
  headers: {
166
160
  'Content-Type': 'application/json',
@@ -180,7 +174,7 @@ class RemotesApi {
180
174
  async getPush({ organizationId, projectId, pushId, }) {
181
175
  try {
182
176
  const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/pushes/${pushId}`, {
183
- timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT,
177
+ timeout: DEFAULT_FETCH_TIMEOUT,
184
178
  method: 'GET',
185
179
  headers: {
186
180
  'Content-Type': 'application/json',
@@ -198,7 +192,7 @@ class RemotesApi {
198
192
  }
199
193
  }
200
194
  }
201
- class ReuniteApi {
195
+ export class ReuniteApi {
202
196
  constructor({ domain, apiKey, version, command, }) {
203
197
  this.command = command;
204
198
  this.version = version;
@@ -218,19 +212,19 @@ class ReuniteApi {
218
212
  });
219
213
  const updateVersionMessage = `Update to the latest version by running "npm install @redocly/cli@latest".`;
220
214
  if (isSunsetExpired) {
221
- process.stdout.write((0, colorette_1.red)(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${updateVersionMessage}\n\n`));
215
+ logger.error(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${updateVersionMessage}\n\n`);
222
216
  }
223
217
  else {
224
- process.stdout.write((0, colorette_1.yellow)(`The "${this.command}" command will be incompatible with your version of Redocly CLI after ${sunsetDate.toLocaleString()}. ${updateVersionMessage}\n\n`));
218
+ logger.warn(`The "${this.command}" command will be incompatible with your version of Redocly CLI after ${sunsetDate.toLocaleString()}. ${updateVersionMessage}\n\n`);
225
219
  }
226
220
  }
227
221
  }
228
222
  }
229
- exports.ReuniteApi = ReuniteApi;
230
- async function streamToBuffer(stream) {
223
+ export async function streamToBuffer(stream) {
231
224
  const chunks = [];
232
225
  for await (const chunk of stream) {
233
226
  chunks.push(chunk);
234
227
  }
235
228
  return Buffer.concat(chunks);
236
229
  }
230
+ //# sourceMappingURL=api-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-client.js","sourceRoot":"","sources":["../../../src/reunite/api/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,gBAAgB,EAAE,EAEvB,qBAAqB,GACtB,MAAM,mCAAmC,CAAC;AAkB3C,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAe,EAAS,MAAc;QAChD,KAAK,CAAC,OAAO,CAA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,CAAC;gBACpB,MAAM,CAAC,KAAK,CACV,QAAQ,IAAI,CAAC,OAAO,iEAAiE,oBAAoB,MAAM,CAChH,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CACT,QACE,IAAI,CAAC,OACP,yEAAyE,UAAU,CAAC,cAAc,EAAE,KAAK,oBAAoB,MAAM,CACpI,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAqBD,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAA6B;IAChE,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QACjC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
@@ -1 +1,2 @@
1
- export declare function getApiKeys(domain: string): any;
1
+ export declare function getApiKeys(): string;
2
+ //# sourceMappingURL=api-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../../src/reunite/api/api-keys.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,WAMzB"}
@@ -1,23 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getApiKeys = getApiKeys;
4
- const path_1 = require("path");
5
- const os_1 = require("os");
6
- const fs_1 = require("fs");
7
- const utils_1 = require("@redocly/openapi-core/lib/utils");
8
- const redocly_1 = require("@redocly/openapi-core/lib/redocly");
9
- function readCredentialsFile(credentialsPath) {
10
- return (0, fs_1.existsSync)(credentialsPath) ? JSON.parse((0, fs_1.readFileSync)(credentialsPath, 'utf-8')) : {};
11
- }
12
- function getApiKeys(domain) {
13
- const apiKey = process.env.REDOCLY_AUTHORIZATION;
14
- if (apiKey) {
15
- return apiKey;
16
- }
17
- const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), redocly_1.TOKEN_FILENAME);
18
- const credentials = readCredentialsFile(credentialsPath);
19
- if ((0, utils_1.isNotEmptyObject)(credentials) && credentials[domain]) {
20
- return credentials[domain];
1
+ export function getApiKeys() {
2
+ if (process.env.REDOCLY_AUTHORIZATION) {
3
+ return process.env.REDOCLY_AUTHORIZATION;
21
4
  }
22
5
  throw new Error('No api key provided, please use environment variable REDOCLY_AUTHORIZATION.');
23
6
  }
7
+ //# sourceMappingURL=api-keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-keys.js","sourceRoot":"","sources":["../../../src/reunite/api/api-keys.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU;IACxB,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC;QACtC,OAAO,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;IAC3C,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAC;AACjG,CAAC"}
@@ -1,4 +1,7 @@
1
- import type { Region } from '@redocly/openapi-core';
2
- export declare const REUNITE_URLS: Record<Region, string>;
1
+ export declare const REUNITE_URLS: {
2
+ readonly us: "https://app.cloud.redocly.com";
3
+ readonly eu: "https://app.cloud.eu.redocly.com";
4
+ };
3
5
  export declare function getDomain(): string;
4
6
  export declare function getReuniteUrl(residency?: string): string;
7
+ //# sourceMappingURL=domains.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../../../src/reunite/api/domains.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,aAAa,CAAC,SAAS,GAAE,MAAa,UAIrD"}
@@ -1,22 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.REUNITE_URLS = void 0;
4
- exports.getDomain = getDomain;
5
- exports.getReuniteUrl = getReuniteUrl;
6
- exports.REUNITE_URLS = {
1
+ export const REUNITE_URLS = {
7
2
  us: 'https://app.cloud.redocly.com',
8
3
  eu: 'https://app.cloud.eu.redocly.com',
9
4
  };
10
- function getDomain() {
11
- return process.env.REDOCLY_DOMAIN || exports.REUNITE_URLS.us;
5
+ export function getDomain() {
6
+ return process.env.REDOCLY_DOMAIN || REUNITE_URLS.us;
12
7
  }
13
- function getReuniteUrl(residency) {
14
- if (!residency)
15
- residency = 'us';
16
- let reuniteUrl = exports.REUNITE_URLS[residency];
17
- if (!reuniteUrl) {
18
- reuniteUrl = residency;
19
- }
8
+ export function getReuniteUrl(residency = 'us') {
9
+ const reuniteUrl = REUNITE_URLS[residency] || residency;
20
10
  const url = new URL('/api', reuniteUrl).toString();
21
11
  return url;
22
12
  }
13
+ //# sourceMappingURL=domains.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domains.js","sourceRoot":"","sources":["../../../src/reunite/api/domains.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,EAAE,EAAE,+BAA+B;IACnC,EAAE,EAAE,kCAAkC;CAC9B,CAAC;AAEX,MAAM,UAAU,SAAS;IACvB,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,YAAY,CAAC,EAAE,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,YAAoB,IAAI;IACpD,MAAM,UAAU,GAAW,YAAY,CAAC,SAAsC,CAAC,IAAI,SAAS,CAAC;IAC7F,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC;IACnD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,3 +1,4 @@
1
- export * from './api-client';
2
- export * from './domains';
3
- export * from './api-keys';
1
+ export * from './api-client.js';
2
+ export * from './domains.js';
3
+ export * from './api-keys.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/reunite/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
@@ -1,19 +1,4 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./api-client"), exports);
18
- __exportStar(require("./domains"), exports);
19
- __exportStar(require("./api-keys"), exports);
1
+ export * from './api-client.js';
2
+ export * from './domains.js';
3
+ export * from './api-keys.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/reunite/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
@@ -100,3 +100,4 @@ export type ScorecardItem = {
100
100
  };
101
101
  export type PushStatusBase = 'pending' | 'success' | 'running' | 'failed';
102
102
  export type DeploymentStatus = 'skipped' | PushStatusBase;
103
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/reunite/api/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,MAAM,CA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AE,aAAa,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,wBAAwB,CAAC;IAClC,UAAU,EAAE,wBAAwB,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE1E,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,cAAc,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/reunite/api/types.ts"],"names":[],"mappings":""}
@@ -1,12 +1,12 @@
1
1
  import type { OutputFormat } from '@redocly/openapi-core';
2
- import type { CommandArgs } from '../../wrapper';
3
- import type { DeploymentStatusResponse, PushResponse } from '../api/types';
2
+ import type { CommandArgs } from '../../wrapper.js';
3
+ import type { DeploymentStatusResponse, PushResponse } from '../api/types.js';
4
+ import type { VerifyConfigOptions } from '../../types.js';
4
5
  export type PushStatusOptions = {
5
6
  organization: string;
6
7
  project: string;
7
8
  pushId: string;
8
9
  domain?: string;
9
- config?: string;
10
10
  format?: Extract<OutputFormat, 'stylish'>;
11
11
  wait?: boolean;
12
12
  'max-execution-time'?: number;
@@ -14,10 +14,11 @@ export type PushStatusOptions = {
14
14
  'start-time'?: number;
15
15
  'continue-on-deploy-failures'?: boolean;
16
16
  onRetry?: (lasSummary: PushStatusSummary) => void;
17
- };
17
+ } & VerifyConfigOptions;
18
18
  export interface PushStatusSummary {
19
19
  preview: DeploymentStatusResponse;
20
20
  production: DeploymentStatusResponse | null;
21
21
  commit: PushResponse['commit'];
22
22
  }
23
- export declare function handlePushStatus({ argv, config, version, }: CommandArgs<PushStatusOptions>): Promise<PushStatusSummary | void>;
23
+ export declare function handlePushStatus({ argv, version, }: CommandArgs<PushStatusOptions>): Promise<PushStatusSummary | void>;
24
+ //# sourceMappingURL=push-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push-status.d.ts","sourceRoot":"","sources":["../../../src/reunite/commands/push-status.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAEV,wBAAwB,EACxB,YAAY,EAEb,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAI1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACnD,GAAG,mBAAmB,CAAC;AAExB,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,wBAAwB,CAAC;IAClC,UAAU,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC5C,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;CAChC;AAED,wBAAsB,gBAAgB,CAAC,EACrC,IAAI,EACJ,OAAO,GACR,EAAE,WAAW,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAsIpE"}
@@ -1,24 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handlePushStatus = handlePushStatus;
4
- const colors = require("colorette");
5
- const miscellaneous_1 = require("../../utils/miscellaneous");
6
- const spinner_1 = require("../../utils/spinner");
7
- const utils_1 = require("../utils");
8
- const api_1 = require("../api");
9
- const js_utils_1 = require("../../utils/js-utils");
10
- const utils_2 = require("./utils");
1
+ import * as colors from 'colorette';
2
+ import { logger } from '@redocly/openapi-core';
3
+ import { printExecutionTime } from '../../utils/miscellaneous.js';
4
+ import { Spinner } from '../../utils/spinner.js';
5
+ import { DeploymentError } from '../utils.js';
6
+ import { ReuniteApi, getApiKeys, getDomain } from '../api/index.js';
7
+ import { capitalize } from '../../utils/js-utils.js';
8
+ import { handleReuniteError, retryUntilConditionMet } from './utils.js';
11
9
  const RETRY_INTERVAL_MS = 5000; // 5 sec
12
- async function handlePushStatus({ argv, config, version, }) {
10
+ export async function handlePushStatus({ argv, version, }) {
13
11
  const startedAt = performance.now();
14
- const spinner = new spinner_1.Spinner();
12
+ const spinner = new Spinner();
15
13
  const { organization, project: projectId, pushId, wait } = argv;
16
- const orgId = organization || config.organization;
17
- if (!orgId) {
18
- (0, miscellaneous_1.exitWithError)(`No organization provided, please use --organization option or specify the 'organization' field in the config file.`);
19
- return;
20
- }
21
- const domain = argv.domain || (0, api_1.getDomain)();
14
+ const domain = argv.domain || getDomain();
22
15
  const maxExecutionTime = argv['max-execution-time'] || 1200; // 20 min
23
16
  const retryIntervalMs = argv['retry-interval']
24
17
  ? argv['retry-interval'] * 1000
@@ -27,12 +20,12 @@ async function handlePushStatus({ argv, config, version, }) {
27
20
  const retryTimeoutMs = maxExecutionTime * 1000;
28
21
  const continueOnDeployFailures = argv['continue-on-deploy-failures'] || false;
29
22
  try {
30
- const apiKey = (0, api_1.getApiKeys)(domain);
31
- const client = new api_1.ReuniteApi({ domain, apiKey, version, command: 'push-status' });
23
+ const apiKey = getApiKeys();
24
+ const client = new ReuniteApi({ domain, apiKey, version, command: 'push-status' });
32
25
  let pushResponse;
33
- pushResponse = await (0, utils_2.retryUntilConditionMet)({
26
+ pushResponse = await retryUntilConditionMet({
34
27
  operation: () => client.remotes.getPush({
35
- organizationId: orgId,
28
+ organizationId: organization,
36
29
  projectId,
37
30
  pushId,
38
31
  }),
@@ -74,9 +67,9 @@ async function handlePushStatus({ argv, config, version, }) {
74
67
  const shouldWaitForProdDeployment = pushResponse.isMainBranch &&
75
68
  (wait ? pushResponse.status.preview.deploy.status === 'success' : true);
76
69
  if (shouldWaitForProdDeployment) {
77
- pushResponse = await (0, utils_2.retryUntilConditionMet)({
70
+ pushResponse = await retryUntilConditionMet({
78
71
  operation: () => client.remotes.getPush({
79
- organizationId: orgId,
72
+ organizationId: organization,
80
73
  projectId,
81
74
  pushId,
82
75
  }),
@@ -118,7 +111,7 @@ async function handlePushStatus({ argv, config, version, }) {
118
111
  });
119
112
  printScorecard(pushResponse.status.production.scorecard);
120
113
  }
121
- printPushStatusInfo({ orgId, projectId, pushId, startedAt });
114
+ printPushStatusInfo({ organization, projectId, pushId, startedAt });
122
115
  client.reportSunsetWarnings();
123
116
  const summary = {
124
117
  preview: pushResponse.status.preview,
@@ -129,22 +122,22 @@ async function handlePushStatus({ argv, config, version, }) {
129
122
  }
130
123
  catch (err) {
131
124
  spinner.stop(); // Spinner can block process exit, so we need to stop it explicitly.
132
- (0, utils_2.handleReuniteError)('✗ Failed to get push status.', err);
125
+ handleReuniteError('✗ Failed to get push status.', err);
133
126
  }
134
127
  finally {
135
128
  spinner.stop(); // Spinner can block process exit, so we need to stop it explicitly.
136
129
  }
137
130
  }
138
- function printPushStatusInfo({ orgId, projectId, pushId, startedAt, }) {
139
- process.stderr.write(`\nProcessed push-status for ${colors.yellow(orgId)}, ${colors.yellow(projectId)} and pushID ${colors.yellow(pushId)}.\n`);
140
- (0, miscellaneous_1.printExecutionTime)('push-status', startedAt, 'Finished');
131
+ function printPushStatusInfo({ organization, projectId, pushId, startedAt, }) {
132
+ logger.info(`\nProcessed push-status for ${colors.yellow(organization)}, ${colors.yellow(projectId)} and pushID ${colors.yellow(pushId)}.\n`);
133
+ printExecutionTime('push-status', startedAt, 'Finished');
141
134
  }
142
135
  function printPushStatus({ buildType, spinner, push, continueOnDeployFailures, }) {
143
136
  if (!push) {
144
137
  return;
145
138
  }
146
139
  if (push.isOutdated || !push.hasChanges) {
147
- process.stderr.write(colors.yellow(`Files not added to your project. Reason: ${push.isOutdated ? 'outdated' : 'no changes'}.\n`));
140
+ logger.warn(`Files not added to your project. Reason: ${push.isOutdated ? 'outdated' : 'no changes'}.\n`);
148
141
  }
149
142
  else {
150
143
  displayDeploymentAndBuildStatus({
@@ -160,27 +153,27 @@ function printScorecard(scorecard) {
160
153
  if (!scorecard || scorecard.length === 0) {
161
154
  return;
162
155
  }
163
- process.stdout.write(`\n${colors.magenta('Scorecard')}:`);
156
+ logger.output(`\n${colors.magenta('Scorecard')}:`);
164
157
  for (const scorecardItem of scorecard) {
165
- process.stdout.write(`
158
+ logger.output(`
166
159
  ${colors.magenta('Name')}: ${scorecardItem.name}
167
160
  ${colors.magenta('Status')}: ${scorecardItem.status}
168
161
  ${colors.magenta('URL')}: ${colors.cyan(scorecardItem.url)}
169
162
  ${colors.magenta('Description')}: ${scorecardItem.description}\n`);
170
163
  }
171
- process.stdout.write(`\n`);
164
+ logger.output(`\n`);
172
165
  }
173
166
  function displayDeploymentAndBuildStatus({ status, url, spinner, buildType, continueOnDeployFailures, wait, }) {
174
167
  const message = getMessage({ status, url, buildType, wait });
175
168
  if (status === 'failed' && !continueOnDeployFailures) {
176
169
  spinner.stop();
177
- throw new utils_1.DeploymentError(message);
170
+ throw new DeploymentError(message);
178
171
  }
179
172
  if (wait && (status === 'pending' || status === 'running')) {
180
173
  return spinner.start(message);
181
174
  }
182
175
  spinner.stop();
183
- return process.stdout.write(message);
176
+ return logger.output(message);
184
177
  }
185
178
  function getMessage({ status, url, buildType, wait, }) {
186
179
  switch (status) {
@@ -195,12 +188,13 @@ function getMessage({ status, url, buildType, wait, }) {
195
188
  return wait ? message : `Status: ${message}\n`;
196
189
  }
197
190
  case 'success':
198
- return `${colors.green(`🚀 ${(0, js_utils_1.capitalize)(buildType)} deploy success.`)}\n${colors.magenta(`${(0, js_utils_1.capitalize)(buildType)} URL`)}: ${colors.cyan(url || 'No URL yet.')}\n`;
191
+ return `${colors.green(`🚀 ${capitalize(buildType)} deploy success.`)}\n${colors.magenta(`${capitalize(buildType)} URL`)}: ${colors.cyan(url || 'No URL yet.')}\n`;
199
192
  case 'failed':
200
- return `${colors.red(`❌ ${(0, js_utils_1.capitalize)(buildType)} deploy fail.`)}\n${colors.magenta(`${(0, js_utils_1.capitalize)(buildType)} URL`)}: ${colors.cyan(url || 'No URL yet.')}`;
193
+ return `${colors.red(`❌ ${capitalize(buildType)} deploy fail.`)}\n${colors.magenta(`${capitalize(buildType)} URL`)}: ${colors.cyan(url || 'No URL yet.')}`;
201
194
  default: {
202
195
  const message = `${colors.yellow(`No status yet for ${buildType} deploy`)}`;
203
196
  return wait ? message : `Status: ${message}\n`;
204
197
  }
205
198
  }
206
199
  }
200
+ //# sourceMappingURL=push-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push-status.js","sourceRoot":"","sources":["../../../src/reunite/commands/push-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,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AAC,CAAC,CAAC,WAAW,OAAO,IAAI,CAAC;QACjD,CAAC;QACD,KAAK,SAAS,CAAC,CAAC,CAAC;YACf,MAAM,OAAO,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,SAAS,EAAE,CAAC,EAAE,CAAC;YAC3D,OAAO,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,OAAO,IAAI,CAAC;QACjD,CAAC;QACD,KAAK,SAAS;YACZ,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,UAAU,CAAC,SAAS,CAAC,kBAAkB,CAAC,KAAK,MAAM,CAAC,OAAO,CACtF,GAAG,UAAU,CAAC,SAAS,CAAC,MAAM,CAC/B,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC;QAE9C,KAAK,QAAQ;YACX,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,MAAM,CAAC,OAAO,CAChF,GAAG,UAAU,CAAC,SAAS,CAAC,MAAM,CAC/B,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,aAAa,CAAC,EAAE,CAAC;QAE5C,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,OAAO,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,SAAS,SAAS,CAAC,EAAE,CAAC;YAE5E,OAAO,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,OAAO,IAAI,CAAC;QACjD,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import type { OutputFormat } from '@redocly/openapi-core';
2
- import type { CommandArgs } from '../../wrapper';
3
- import type { VerifyConfigOptions } from '../../types';
2
+ import type { CommandArgs } from '../../wrapper.js';
3
+ import type { VerifyConfigOptions } from '../../types.js';
4
4
  export type PushOptions = {
5
- apis?: string[];
6
- organization?: string;
5
+ files: string[];
6
+ organization: string;
7
7
  project: string;
8
8
  'mount-path': string;
9
9
  branch: string;
@@ -14,11 +14,10 @@ export type PushOptions = {
14
14
  namespace?: string;
15
15
  repository?: string;
16
16
  'created-at'?: string;
17
- files: string[];
18
17
  'default-branch': string;
19
18
  domain?: string;
20
19
  'wait-for-deployment'?: boolean;
21
- 'max-execution-time': number;
20
+ 'max-execution-time'?: number;
22
21
  'continue-on-deploy-failures'?: boolean;
23
22
  verbose?: boolean;
24
23
  format?: Extract<OutputFormat, 'stylish'>;
@@ -26,3 +25,4 @@ export type PushOptions = {
26
25
  export declare function handlePush({ argv, config, version, }: CommandArgs<PushOptions>): Promise<{
27
26
  pushId: string;
28
27
  } | void>;
28
+ //# sourceMappingURL=push.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../src/reunite/commands/push.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;CAC3C,GAAG,mBAAmB,CAAC;AAIxB,wBAAsB,UAAU,CAAC,EAC/B,IAAI,EACJ,MAAM,EACN,OAAO,GACR,EAAE,WAAW,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CA4G/D"}