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
+3 -4
View File
@@ -1,5 +1,5 @@
import type { PrimaryFieldType } from "core";
import { type Entity, EntityIndex, type EntityManager } from "data";
import { $console, type PrimaryFieldType } from "core";
import { type Entity, type EntityManager } from "data";
import { type FileUploadedEventData, Storage, type StorageAdapter } from "media";
import { Module } from "modules/Module";
import {
@@ -145,11 +145,10 @@ export class AppMedia extends Module<typeof mediaConfigSchema> {
// simple file deletion sync
const { data } = await em.repo(media).findOne({ path: e.params.name });
if (data) {
console.log("item.data", data);
await em.mutator(media).deleteOne(data.id);
}
console.log("App:storage:file deleted", e);
$console.log("App:storage:file deleted", e.params);
},
{ mode: "sync", id: "delete-data-media" },
);