Skip to content

Commit 5419fa9

Browse files
committed
chore: resolve copilot review comments
1 parent d5d641b commit 5419fa9

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

adminforth/commands/callTsProxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function callTsProxy(tsCode, silent=false) {
4343
const parsed = JSON.parse(stdout);
4444
if (!silent) {
4545
parsed.capturedLogs.forEach((log) => {
46-
afLogger.log(...log);
46+
afLogger.info(...log);
4747
});
4848
}
4949

adminforth/commands/createApp/templates/adminuser.ts.hbs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import AdminForth, { AdminForthDataTypes } from 'adminforth';
2-
import type { AdminForthResourceInput, AdminForthResource, AdminUser, logger } from 'adminforth';
2+
import type { AdminForthResourceInput, AdminForthResource, AdminUser } from 'adminforth';
3+
import { logger } from 'adminforth';
34
import { randomUUID } from 'crypto';
45

56
async function allowedForSuperAdmin({ adminUser }: { adminUser: AdminUser }): Promise<boolean> {

adminforth/commands/createCustomComponent/fileGenerator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export async function generateLoginOrGlobalComponentFile(componentFileName, inje
125125

126126
try {
127127
await fs.mkdir(customDirPath, { recursive: true });
128-
afLogger.warn(chalk.dim(`Ensured custom directory exists: ${customDirPath}`));
128+
afLogger.info(chalk.dim(`Ensured custom directory exists: ${customDirPath}`));
129129

130130
const __filename = fileURLToPath(import.meta.url);
131131
const __dirname = path.dirname(__filename);

adminforth/commands/postinstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ if (fs.existsSync(spaPath)){
1313
afLogger.info('Installed spa dependencies');
1414
} else {
1515
afLogger.warn('SPA dependencies not found');
16-
afLogger.info('current directory', import.meta.dirname);
16+
afLogger.warn(`current directory: ${import.meta.dirname}`);
1717
}

adminforth/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ class AdminForth implements IAdminForth {
550550

551551
// execute hook if needed
552552
for (const hook of listify(resource.hooks?.create?.beforeSave)) {
553-
console.debug('🪲 Hook beforeSave', hook);
553+
afLogger.debug(`🪲 Hook beforeSave ${hook}`);
554554
const resp = await hook({
555555
resource,
556556
record,

adminforth/modules/logger.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pino from 'pino';
2-
import { PinoPretty } from "pino-pretty";
32

43
const baseLogger = pino({
54
transport: {

0 commit comments

Comments
 (0)