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.
2 parents 9436410 + b0aad3a commit 561c63aCopy full SHA for 561c63a
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