cleanup: replace console.log/warn with $console, remove commented-out code

Removed various commented-out code and replaced direct `console.log` and `console.warn` usage across the codebase with `$console` from "core" for standardized logging. Also adjusted linting rules in biome.json to enable warnings for `console.log` usage.
This commit is contained in:
dswbx
2025-04-10 14:18:48 +02:00
parent ad7926db4c
commit 4e718a063d
79 changed files with 180 additions and 565 deletions
+2 -5
View File
@@ -1,4 +1,4 @@
import { Exception, isDebug } from "core";
import { $console, Exception, isDebug } from "core";
import { type Static, StringEnum, Type } from "core/utils";
import { cors } from "hono/cors";
import { Module } from "modules/Module";
@@ -29,8 +29,6 @@ export const serverConfigSchema = Type.Object(
export type AppServerConfig = Static<typeof serverConfigSchema>;
export class AppServer extends Module<typeof serverConfigSchema> {
//private admin_html?: string;
override getRestrictedPaths() {
return [];
}
@@ -70,14 +68,13 @@ export class AppServer extends Module<typeof serverConfigSchema> {
this.client.onError((err, c) => {
//throw err;
console.error(err);
$console.error(err);
if (err instanceof Response) {
return err;
}
if (err instanceof Exception) {
console.log("---is exception", err.code);
return c.json(err.toJSON(), err.code as any);
}