@redocly/cli 1.34.3 → 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 +15 -16
  176. package/CHANGELOG.md +0 -770
  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
@@ -1,235 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const openapi_core_1 = require("@redocly/openapi-core");
4
- const bundle_1 = require("../../commands/bundle");
5
- const miscellaneous_1 = require("../../utils/miscellaneous");
6
- const wrapper_1 = require("../../wrapper");
7
- jest.mock('@redocly/openapi-core');
8
- jest.mock('../../utils/miscellaneous');
9
- // @ts-ignore
10
- miscellaneous_1.getOutputFileName = jest.requireActual('../../utils/miscellaneous').getOutputFileName;
11
- openapi_core_1.getMergedConfig.mockImplementation((config) => config);
12
- describe('bundle', () => {
13
- let processExitMock;
14
- let exitCb;
15
- let stderrWriteMock;
16
- let stdoutWriteMock;
17
- beforeEach(() => {
18
- processExitMock = jest.spyOn(process, 'exit').mockImplementation();
19
- jest.spyOn(process, 'once').mockImplementation((_e, cb) => {
20
- exitCb = cb;
21
- return process.on(_e, cb);
22
- });
23
- stderrWriteMock = jest.spyOn(process.stderr, 'write').mockImplementation(jest.fn());
24
- stdoutWriteMock = jest.spyOn(process.stdout, 'write').mockImplementation(jest.fn());
25
- });
26
- afterEach(() => {
27
- openapi_core_1.bundle.mockClear();
28
- openapi_core_1.getTotals.mockReset();
29
- stderrWriteMock.mockRestore();
30
- stdoutWriteMock.mockRestore();
31
- });
32
- it('bundles definitions', async () => {
33
- const apis = ['foo.yaml', 'bar.yaml'];
34
- await (0, wrapper_1.commandWrapper)(bundle_1.handleBundle)({
35
- apis,
36
- ext: 'yaml',
37
- });
38
- expect(openapi_core_1.bundle).toBeCalledTimes(apis.length);
39
- });
40
- it('exits with code 0 when bundles definitions', async () => {
41
- const apis = ['foo.yaml', 'bar.yaml', 'foobar.yaml'];
42
- await (0, wrapper_1.commandWrapper)(bundle_1.handleBundle)({
43
- apis,
44
- ext: 'yaml',
45
- });
46
- await exitCb?.();
47
- expect(processExitMock).toHaveBeenCalledWith(0);
48
- });
49
- it('exits with code 0 when bundles definitions w/o errors', async () => {
50
- const apis = ['foo.yaml', 'bar.yaml', 'foobar.yaml'];
51
- await (0, wrapper_1.commandWrapper)(bundle_1.handleBundle)({
52
- apis,
53
- ext: 'yaml',
54
- });
55
- await exitCb?.();
56
- expect(processExitMock).toHaveBeenCalledWith(0);
57
- });
58
- it('exits with code 1 when bundles definitions w/errors', async () => {
59
- const apis = ['foo.yaml'];
60
- openapi_core_1.getTotals.mockReturnValue({
61
- errors: 1,
62
- warnings: 0,
63
- ignored: 0,
64
- });
65
- await (0, wrapper_1.commandWrapper)(bundle_1.handleBundle)({
66
- apis,
67
- ext: 'yaml',
68
- });
69
- await exitCb?.();
70
- expect(processExitMock).toHaveBeenCalledWith(1);
71
- });
72
- it('handleError is called when bundles an invalid definition', async () => {
73
- const apis = ['invalid.json'];
74
- openapi_core_1.bundle.mockImplementationOnce(() => {
75
- throw new Error('Invalid definition');
76
- });
77
- await (0, wrapper_1.commandWrapper)(bundle_1.handleBundle)({
78
- apis,
79
- ext: 'json',
80
- });
81
- expect(miscellaneous_1.handleError).toHaveBeenCalledTimes(1);
82
- expect(miscellaneous_1.handleError).toHaveBeenCalledWith(new Error('Invalid definition'), 'invalid.json');
83
- });
84
- it("handleError isn't called when bundles a valid definition", async () => {
85
- const apis = ['foo.yaml'];
86
- openapi_core_1.getTotals.mockReturnValue({
87
- errors: 0,
88
- warnings: 0,
89
- ignored: 0,
90
- });
91
- await (0, wrapper_1.commandWrapper)(bundle_1.handleBundle)({
92
- apis,
93
- ext: 'yaml',
94
- });
95
- expect(miscellaneous_1.handleError).toHaveBeenCalledTimes(0);
96
- });
97
- describe('per api output', () => {
98
- it('should store bundled API descriptions in the output files described in the apis section of config IF no positional apis provided AND output is specified for both apis', async () => {
99
- const apis = {
100
- foo: {
101
- root: 'foo.yaml',
102
- output: 'output/foo.yaml',
103
- },
104
- bar: {
105
- root: 'bar.yaml',
106
- output: 'output/bar.json',
107
- },
108
- };
109
- const config = {
110
- apis,
111
- styleguide: {
112
- skipPreprocessors: jest.fn(),
113
- skipDecorators: jest.fn(),
114
- },
115
- };
116
- // @ts-ignore
117
- miscellaneous_1.getFallbackApisOrExit = jest
118
- .fn()
119
- .mockResolvedValueOnce(Object.entries(apis).map(([alias, { root, ...api }]) => ({ ...api, path: root, alias })));
120
- openapi_core_1.getTotals.mockReturnValue({
121
- errors: 0,
122
- warnings: 0,
123
- ignored: 0,
124
- });
125
- await (0, bundle_1.handleBundle)({
126
- argv: { apis: [] }, // positional
127
- version: 'test',
128
- config,
129
- });
130
- expect(miscellaneous_1.saveBundle).toBeCalledTimes(2);
131
- expect(miscellaneous_1.saveBundle).toHaveBeenNthCalledWith(1, 'output/foo.yaml', expect.any(String));
132
- expect(miscellaneous_1.saveBundle).toHaveBeenNthCalledWith(2, 'output/bar.json', expect.any(String));
133
- });
134
- it('should store bundled API descriptions in the output files described in the apis section of config AND print the bundled api without the output specified to the terminal IF no positional apis provided AND output is specified for one api', async () => {
135
- const apis = {
136
- foo: {
137
- root: 'foo.yaml',
138
- output: 'output/foo.yaml',
139
- },
140
- bar: {
141
- root: 'bar.yaml',
142
- },
143
- };
144
- const config = {
145
- apis,
146
- styleguide: {
147
- skipPreprocessors: jest.fn(),
148
- skipDecorators: jest.fn(),
149
- },
150
- };
151
- // @ts-ignore
152
- miscellaneous_1.getFallbackApisOrExit = jest
153
- .fn()
154
- .mockResolvedValueOnce(Object.entries(apis).map(([alias, { root, ...api }]) => ({ ...api, path: root, alias })));
155
- openapi_core_1.getTotals.mockReturnValue({
156
- errors: 0,
157
- warnings: 0,
158
- ignored: 0,
159
- });
160
- await (0, bundle_1.handleBundle)({
161
- argv: { apis: [] }, // positional
162
- version: 'test',
163
- config,
164
- });
165
- expect(miscellaneous_1.saveBundle).toBeCalledTimes(1);
166
- expect(miscellaneous_1.saveBundle).toHaveBeenCalledWith('output/foo.yaml', expect.any(String));
167
- expect(process.stdout.write).toHaveBeenCalledTimes(1);
168
- });
169
- it('should NOT store bundled API descriptions in the output files described in the apis section of config IF there is a positional api provided', async () => {
170
- const apis = {
171
- foo: {
172
- root: 'foo.yaml',
173
- output: 'output/foo.yaml',
174
- },
175
- };
176
- const config = {
177
- apis,
178
- styleguide: {
179
- skipPreprocessors: jest.fn(),
180
- skipDecorators: jest.fn(),
181
- },
182
- };
183
- // @ts-ignore
184
- miscellaneous_1.getFallbackApisOrExit = jest.fn().mockResolvedValueOnce([{ path: 'openapi.yaml' }]);
185
- openapi_core_1.getTotals.mockReturnValue({
186
- errors: 0,
187
- warnings: 0,
188
- ignored: 0,
189
- });
190
- await (0, bundle_1.handleBundle)({
191
- argv: { apis: ['openapi.yaml'] }, // positional
192
- version: 'test',
193
- config,
194
- });
195
- expect(miscellaneous_1.saveBundle).toBeCalledTimes(0);
196
- expect(process.stdout.write).toHaveBeenCalledTimes(1);
197
- });
198
- it('should store bundled API descriptions in the directory specified in argv IF multiple positional apis provided AND --output specified', async () => {
199
- const apis = {
200
- foo: {
201
- root: 'foo.yaml',
202
- output: 'output/foo.yaml',
203
- },
204
- bar: {
205
- root: 'bar.yaml',
206
- output: 'output/bar.json',
207
- },
208
- };
209
- const config = {
210
- apis,
211
- styleguide: {
212
- skipPreprocessors: jest.fn(),
213
- skipDecorators: jest.fn(),
214
- },
215
- };
216
- // @ts-ignore
217
- miscellaneous_1.getFallbackApisOrExit = jest
218
- .fn()
219
- .mockResolvedValueOnce(Object.entries(apis).map(([alias, { root, ...api }]) => ({ ...api, path: root, alias })));
220
- openapi_core_1.getTotals.mockReturnValue({
221
- errors: 0,
222
- warnings: 0,
223
- ignored: 0,
224
- });
225
- await (0, bundle_1.handleBundle)({
226
- argv: { apis: ['foo.yaml', 'bar.yaml'], output: 'dist' }, // cli options
227
- version: 'test',
228
- config,
229
- });
230
- expect(miscellaneous_1.saveBundle).toBeCalledTimes(2);
231
- expect(miscellaneous_1.saveBundle).toHaveBeenNthCalledWith(1, 'dist/foo.yaml', expect.any(String));
232
- expect(miscellaneous_1.saveBundle).toHaveBeenNthCalledWith(2, 'dist/bar.yaml', expect.any(String));
233
- });
234
- });
235
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,274 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const colorette_1 = require("colorette");
4
- const openapi_core_1 = require("@redocly/openapi-core");
5
- const join_1 = require("../../commands/join");
6
- const miscellaneous_1 = require("../../utils/miscellaneous");
7
- const openapi_core_2 = require("../../__mocks__/@redocly/openapi-core");
8
- const config_1 = require("../fixtures/config");
9
- jest.mock('../../utils/miscellaneous');
10
- jest.mock('colorette');
11
- describe('handleJoin', () => {
12
- const colloreteYellowMock = colorette_1.yellow;
13
- colloreteYellowMock.mockImplementation((string) => string);
14
- it('should call exitWithError because only one entrypoint', async () => {
15
- await (0, join_1.handleJoin)({ argv: { apis: ['first.yaml'] }, config: {}, version: 'cli-version' });
16
- expect(miscellaneous_1.exitWithError).toHaveBeenCalledWith(`At least 2 APIs should be provided.`);
17
- });
18
- it('should call exitWithError if glob expands to less than 2 APIs', async () => {
19
- miscellaneous_1.getFallbackApisOrExit.mockResolvedValueOnce([{ path: 'first.yaml' }]);
20
- await (0, join_1.handleJoin)({
21
- argv: { apis: ['*.yaml'] },
22
- config: {},
23
- version: 'cli-version',
24
- });
25
- expect(miscellaneous_1.exitWithError).toHaveBeenCalledWith(`At least 2 APIs should be provided.`);
26
- });
27
- it('should proceed if glob expands to 2 or more APIs', async () => {
28
- openapi_core_1.detectSpec.mockReturnValue('oas3_1');
29
- miscellaneous_1.getFallbackApisOrExit.mockResolvedValueOnce([
30
- { path: 'first.yaml' },
31
- { path: 'second.yaml' },
32
- ]);
33
- await (0, join_1.handleJoin)({
34
- argv: { apis: ['*.yaml'] },
35
- config: config_1.ConfigFixture,
36
- version: 'cli-version',
37
- });
38
- expect(miscellaneous_1.exitWithError).not.toHaveBeenCalled();
39
- });
40
- it('should call exitWithError because passed all 3 options for tags', async () => {
41
- await (0, join_1.handleJoin)({
42
- argv: {
43
- apis: ['first.yaml', 'second.yaml'],
44
- 'prefix-tags-with-info-prop': 'something',
45
- 'without-x-tag-groups': true,
46
- 'prefix-tags-with-filename': true,
47
- },
48
- config: {},
49
- version: 'cli-version',
50
- });
51
- expect(miscellaneous_1.exitWithError).toHaveBeenCalledWith(`You use prefix-tags-with-filename, prefix-tags-with-info-prop, without-x-tag-groups together.\nPlease choose only one!`);
52
- });
53
- it('should call exitWithError because passed all 2 options for tags', async () => {
54
- await (0, join_1.handleJoin)({
55
- argv: {
56
- apis: ['first.yaml', 'second.yaml'],
57
- 'without-x-tag-groups': true,
58
- 'prefix-tags-with-filename': true,
59
- },
60
- config: {},
61
- version: 'cli-version',
62
- });
63
- expect(miscellaneous_1.exitWithError).toHaveBeenCalledWith(`You use prefix-tags-with-filename, without-x-tag-groups together.\nPlease choose only one!`);
64
- });
65
- it('should call exitWithError because Only OpenAPI 3.0 and OpenAPI 3.1 are supported', async () => {
66
- openapi_core_1.detectSpec.mockReturnValueOnce('oas2_0');
67
- await (0, join_1.handleJoin)({
68
- argv: {
69
- apis: ['first.yaml', 'second.yaml'],
70
- },
71
- config: config_1.ConfigFixture,
72
- version: 'cli-version',
73
- });
74
- expect(miscellaneous_1.exitWithError).toHaveBeenCalledWith('Only OpenAPI 3.0 and OpenAPI 3.1 are supported: undefined.');
75
- });
76
- it('should call exitWithError if mixing OpenAPI 3.0 and 3.1', async () => {
77
- openapi_core_1.detectSpec
78
- .mockImplementationOnce(() => 'oas3_0')
79
- .mockImplementationOnce(() => 'oas3_1');
80
- await (0, join_1.handleJoin)({
81
- argv: {
82
- apis: ['first.yaml', 'second.yaml'],
83
- },
84
- config: config_1.ConfigFixture,
85
- version: 'cli-version',
86
- });
87
- expect(miscellaneous_1.exitWithError).toHaveBeenCalledWith('All APIs must use the same OpenAPI version: undefined.');
88
- });
89
- it('should call writeToFileByExtension function', async () => {
90
- openapi_core_1.detectSpec.mockReturnValue('oas3_0');
91
- await (0, join_1.handleJoin)({
92
- argv: {
93
- apis: ['first.yaml', 'second.yaml'],
94
- },
95
- config: config_1.ConfigFixture,
96
- version: 'cli-version',
97
- });
98
- expect(miscellaneous_1.writeToFileByExtension).toHaveBeenCalledWith(expect.any(Object), 'openapi.yaml', expect.any(Boolean));
99
- });
100
- it('should call writeToFileByExtension function for OpenAPI 3.1', async () => {
101
- openapi_core_1.detectSpec.mockReturnValue('oas3_1');
102
- await (0, join_1.handleJoin)({
103
- argv: {
104
- apis: ['first.yaml', 'second.yaml'],
105
- },
106
- config: config_1.ConfigFixture,
107
- version: 'cli-version',
108
- });
109
- expect(miscellaneous_1.writeToFileByExtension).toHaveBeenCalledWith(expect.any(Object), 'openapi.yaml', expect.any(Boolean));
110
- });
111
- it('should call writeToFileByExtension function with custom output file', async () => {
112
- openapi_core_1.detectSpec.mockReturnValue('oas3_0');
113
- await (0, join_1.handleJoin)({
114
- argv: {
115
- apis: ['first.yaml', 'second.yaml'],
116
- output: 'output.yml',
117
- },
118
- config: config_1.ConfigFixture,
119
- version: 'cli-version',
120
- });
121
- expect(miscellaneous_1.writeToFileByExtension).toHaveBeenCalledWith(expect.any(Object), 'output.yml', expect.any(Boolean));
122
- });
123
- it('should call writeToFileByExtension function with json file extension', async () => {
124
- openapi_core_1.detectSpec.mockReturnValue('oas3_0');
125
- await (0, join_1.handleJoin)({
126
- argv: {
127
- apis: ['first.json', 'second.yaml'],
128
- },
129
- config: config_1.ConfigFixture,
130
- version: 'cli-version',
131
- });
132
- expect(miscellaneous_1.writeToFileByExtension).toHaveBeenCalledWith(expect.any(Object), 'openapi.json', expect.any(Boolean));
133
- });
134
- it('should call skipDecorators and skipPreprocessors', async () => {
135
- openapi_core_1.detectSpec.mockReturnValue('oas3_0');
136
- await (0, join_1.handleJoin)({
137
- argv: {
138
- apis: ['first.yaml', 'second.yaml'],
139
- },
140
- config: config_1.ConfigFixture,
141
- version: 'cli-version',
142
- });
143
- const config = (0, openapi_core_2.loadConfig)();
144
- expect(config.styleguide.skipDecorators).toHaveBeenCalled();
145
- expect(config.styleguide.skipPreprocessors).toHaveBeenCalled();
146
- });
147
- it('should handle join with prefix-components-with-info-prop and null values', async () => {
148
- openapi_core_1.detectSpec.mockReturnValue('oas3_0');
149
- await (0, join_1.handleJoin)({
150
- argv: {
151
- apis: ['first.yaml', 'second.yaml', 'third.yaml'],
152
- 'prefix-components-with-info-prop': 'title',
153
- output: 'join-result.yaml',
154
- },
155
- config: config_1.ConfigFixture,
156
- version: 'cli-version',
157
- });
158
- expect(miscellaneous_1.writeToFileByExtension).toHaveBeenCalledWith({
159
- openapi: '3.0.0',
160
- info: {
161
- description: 'example test',
162
- version: '1.0.0',
163
- title: 'First API',
164
- termsOfService: 'http://swagger.io/terms/',
165
- license: {
166
- name: 'Apache 2.0',
167
- url: 'http://www.apache.org/licenses/LICENSE-2.0.html',
168
- },
169
- },
170
- servers: [
171
- {
172
- url: 'http://localhost:8080',
173
- },
174
- {
175
- url: 'https://api.server.test/v1',
176
- },
177
- ],
178
- tags: [
179
- {
180
- name: 'pet',
181
- 'x-displayName': 'pet',
182
- },
183
- ],
184
- paths: {
185
- '/GETUser/{userId}': {
186
- summary: 'get user by id',
187
- description: 'user info',
188
- servers: [
189
- {
190
- url: '/user',
191
- },
192
- {
193
- url: '/pet',
194
- description: 'pet server',
195
- },
196
- ],
197
- get: {
198
- tags: ['pet'],
199
- summary: 'Find pet by ID',
200
- description: 'Returns a single pet',
201
- operationId: 'getPetById',
202
- servers: [
203
- {
204
- url: '/pet',
205
- },
206
- ],
207
- },
208
- parameters: [
209
- {
210
- name: 'param1',
211
- in: 'header',
212
- schema: {
213
- description: 'string',
214
- },
215
- },
216
- ],
217
- },
218
- },
219
- components: {
220
- schemas: {
221
- Third_API_SchemaWithNull: {
222
- type: 'string',
223
- default: null,
224
- nullable: true,
225
- },
226
- Third_API_SchemaWithRef: {
227
- type: 'object',
228
- properties: {
229
- schemaType: {
230
- type: 'string',
231
- enum: ['foo'],
232
- },
233
- foo: {
234
- $ref: '#/components/schemas/Third_API_SchemaWithNull',
235
- },
236
- },
237
- },
238
- Third_API_SchemaWithDiscriminator: {
239
- discriminator: {
240
- propertyName: 'schemaType',
241
- mapping: {
242
- foo: '#/components/schemas/Third_API_SchemaWithRef',
243
- bar: '#/components/schemas/Third_API_SchemaWithNull',
244
- },
245
- },
246
- oneOf: [
247
- {
248
- $ref: '#/components/schemas/Third_API_SchemaWithRef',
249
- },
250
- {
251
- type: 'object',
252
- properties: {
253
- schemaType: {
254
- type: 'string',
255
- enum: ['bar'],
256
- },
257
- bar: {
258
- type: 'string',
259
- },
260
- },
261
- },
262
- ],
263
- },
264
- },
265
- },
266
- 'x-tagGroups': [
267
- {
268
- name: 'First API',
269
- tags: ['pet'],
270
- },
271
- ],
272
- }, 'join-result.yaml', true);
273
- });
274
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,149 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const lint_1 = require("../../commands/lint");
4
- const openapi_core_1 = require("@redocly/openapi-core");
5
- const miscellaneous_1 = require("../../utils/miscellaneous");
6
- const config_1 = require("../fixtures/config");
7
- const perf_hooks_1 = require("perf_hooks");
8
- const wrapper_1 = require("../../wrapper");
9
- const colorette_1 = require("colorette");
10
- jest.mock('@redocly/openapi-core');
11
- jest.mock('../../utils/miscellaneous');
12
- jest.mock('perf_hooks');
13
- jest.mock('../../utils/update-version-notifier', () => ({
14
- version: '1.0.0',
15
- }));
16
- const argvMock = {
17
- apis: ['openapi.yaml'],
18
- 'lint-config': 'off',
19
- format: 'codeframe',
20
- };
21
- describe('handleLint', () => {
22
- let processExitMock;
23
- let exitCb;
24
- const getMergedConfigMock = openapi_core_1.getMergedConfig;
25
- beforeEach(() => {
26
- jest.spyOn(process.stderr, 'write').mockImplementation(() => true);
27
- perf_hooks_1.performance.now.mockImplementation(() => 42);
28
- processExitMock = jest.spyOn(process, 'exit').mockImplementation();
29
- jest.spyOn(process, 'once').mockImplementation((_e, cb) => {
30
- exitCb = cb;
31
- return process.on(_e, cb);
32
- });
33
- getMergedConfigMock.mockReturnValue(config_1.ConfigFixture);
34
- openapi_core_1.doesYamlFileExist.mockImplementation((path) => path === 'redocly.yaml');
35
- });
36
- afterEach(() => {
37
- getMergedConfigMock.mockReset();
38
- });
39
- describe('loadConfig and getEntrypoints stage', () => {
40
- it('should fail if config file does not exist', async () => {
41
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)({ ...argvMock, config: 'config.yaml' });
42
- expect(miscellaneous_1.exitWithError).toHaveBeenCalledWith('Please provide a valid path to the configuration file.');
43
- });
44
- it('should call loadConfigAndHandleErrors and getFallbackApisOrExit', async () => {
45
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)(argvMock);
46
- expect(miscellaneous_1.loadConfigAndHandleErrors).toHaveBeenCalledWith({
47
- configPath: undefined,
48
- customExtends: undefined,
49
- processRawConfig: undefined,
50
- });
51
- expect(miscellaneous_1.getFallbackApisOrExit).toHaveBeenCalled();
52
- });
53
- it('should call loadConfig with args if such exist', async () => {
54
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)({
55
- ...argvMock,
56
- config: 'redocly.yaml',
57
- extends: ['some/path'],
58
- });
59
- expect(miscellaneous_1.loadConfigAndHandleErrors).toHaveBeenCalledWith({
60
- configPath: 'redocly.yaml',
61
- customExtends: ['some/path'],
62
- processRawConfig: undefined,
63
- });
64
- });
65
- it('should call mergedConfig with clear ignore if `generate-ignore-file` argv', async () => {
66
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)({ ...argvMock, 'generate-ignore-file': true });
67
- expect(getMergedConfigMock).toHaveBeenCalled();
68
- });
69
- it('should check if ruleset exist', async () => {
70
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)(argvMock);
71
- expect(miscellaneous_1.checkIfRulesetExist).toHaveBeenCalledTimes(1);
72
- });
73
- it('should fail if apis not provided', async () => {
74
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)({ ...argvMock, apis: [] });
75
- expect(miscellaneous_1.getFallbackApisOrExit).toHaveBeenCalledTimes(1);
76
- expect(miscellaneous_1.exitWithError).toHaveBeenCalledWith('No APIs were provided.');
77
- });
78
- });
79
- describe('loop through entrypoints and lint stage', () => {
80
- it('should call getMergedConfig and lint ', async () => {
81
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)(argvMock);
82
- expect(perf_hooks_1.performance.now).toHaveBeenCalled();
83
- expect(getMergedConfigMock).toHaveBeenCalled();
84
- expect(openapi_core_1.lint).toHaveBeenCalled();
85
- });
86
- it('should call skipRules,skipPreprocessors and addIgnore with argv', async () => {
87
- openapi_core_1.lint.mockResolvedValueOnce(['problem']);
88
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)({
89
- ...argvMock,
90
- 'skip-preprocessor': ['preprocessor'],
91
- 'skip-rule': ['rule'],
92
- 'generate-ignore-file': true,
93
- });
94
- expect(config_1.ConfigFixture.styleguide.skipRules).toHaveBeenCalledWith(['rule']);
95
- expect(config_1.ConfigFixture.styleguide.skipPreprocessors).toHaveBeenCalledWith(['preprocessor']);
96
- });
97
- it('should call formatProblems and getExecutionTime with argv', async () => {
98
- openapi_core_1.lint.mockResolvedValueOnce(['problem']);
99
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)({ ...argvMock, 'max-problems': 2, format: 'stylish' });
100
- expect(openapi_core_1.getTotals).toHaveBeenCalledWith(['problem']);
101
- expect(openapi_core_1.formatProblems).toHaveBeenCalledWith(['problem'], {
102
- format: 'stylish',
103
- maxProblems: 2,
104
- totals: { errors: 0 },
105
- version: '1.0.0',
106
- });
107
- expect(miscellaneous_1.getExecutionTime).toHaveBeenCalledWith(42);
108
- });
109
- it('should catch error in handleError if something fails', async () => {
110
- openapi_core_1.lint.mockRejectedValueOnce('error');
111
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)(argvMock);
112
- expect(miscellaneous_1.handleError).toHaveBeenCalledWith('error', 'openapi.yaml');
113
- });
114
- });
115
- describe('erros and warning handle after lint stage', () => {
116
- it('should call printLintTotals and printLintTotals', async () => {
117
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)(argvMock);
118
- expect(miscellaneous_1.printUnusedWarnings).toHaveBeenCalled();
119
- });
120
- it('should call exit with 0 if no errors', async () => {
121
- miscellaneous_1.loadConfigAndHandleErrors.mockImplementation(() => {
122
- return { ...config_1.ConfigFixture };
123
- });
124
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)(argvMock);
125
- await exitCb?.();
126
- expect(processExitMock).toHaveBeenCalledWith(0);
127
- });
128
- it('should exit with 1 if total errors > 0', async () => {
129
- openapi_core_1.getTotals.mockReturnValueOnce({ errors: 1 });
130
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)(argvMock);
131
- await exitCb?.();
132
- expect(processExitMock).toHaveBeenCalledWith(1);
133
- });
134
- it('should use recommended fallback if no config', async () => {
135
- openapi_core_1.getMergedConfig.mockImplementation(() => {
136
- return {
137
- styleguide: {
138
- recommendedFallback: true,
139
- rules: {},
140
- skipRules: jest.fn(),
141
- skipPreprocessors: jest.fn(),
142
- },
143
- };
144
- });
145
- await (0, wrapper_1.commandWrapper)(lint_1.handleLint)(argvMock);
146
- expect(process.stderr.write).toHaveBeenCalledWith(`No configurations were provided -- using built in ${(0, colorette_1.blue)('recommended')} configuration by default.\n\n`);
147
- });
148
- });
149
- });
@@ -1 +0,0 @@
1
- export {};