Skip to content

Commit 272024e

Browse files
authored
fix(logger): use default export (#439)
1 parent 4c6ffae commit 272024e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bin/commands/interactive.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from '@clack/prompts';
1414

1515
import commands from './index.mjs';
16-
import { Logger } from '../../src/logger/index.mjs';
16+
import logger from '../../src/logger/index.mjs';
1717

1818
/**
1919
* Validates that a string is not empty.
@@ -166,7 +166,7 @@ export default async function interactive() {
166166

167167
const finalCommand = cmdParts.join(' ');
168168

169-
Logger.getInstance().info(`\nGenerated command:\n${finalCommand}\n`);
169+
logger.info(`\nGenerated command:\n${finalCommand}\n`);
170170

171171
// Step 5: Confirm and execute the generated command
172172
if (await confirm({ message: 'Run now?', initialValue: true })) {

bin/utils.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import createMarkdownLoader from '../src/loaders/markdown.mjs';
2-
import { Logger } from '../src/logger/index.mjs';
2+
import logger from '../src/logger/index.mjs';
33
import createMarkdownParser from '../src/parsers/markdown.mjs';
44

55
/**
@@ -43,7 +43,7 @@ export const errorWrap =
4343
try {
4444
return await fn(...args);
4545
} catch (err) {
46-
Logger.getInstance().error(err);
46+
logger.error(err);
4747
process.exit(1);
4848
}
4949
};

0 commit comments

Comments
 (0)