We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0e439b commit b0aad3aCopy full SHA for b0aad3a
src/generator.ts
@@ -1,3 +1,4 @@
1
+import chalk from 'chalk';
2
import { cosmiconfig } from 'cosmiconfig';
3
import { CosmiconfigResult } from 'cosmiconfig/dist/types';
4
import fs from 'fs/promises';
@@ -34,8 +35,14 @@ export async function generateItem(oas: Oas, config: Config) {
34
35
36
export async function generate(config: Config) {
37
const { list } = config;
38
+ let step = 0;
39
+ const length = list.length;
40
+ const width = String(length).length;
41
42
for (const oas of list) {
43
+ step++;
44
+ const stepText = String(step).padStart(width, '0');
45
+ console.log(chalk.cyanBright(`[${stepText}/${length}]`), 'generating', chalk.yellow(oas.name));
46
await generateItem(oas, config);
47
}
48
0 commit comments