refactor console imports, added config update event

This commit is contained in:
dswbx
2025-07-02 14:02:50 +02:00
parent d41fd5541f
commit 70737c04cd
48 changed files with 100 additions and 63 deletions

View File

@@ -1,5 +1,6 @@
import { $console, config } from "core";
import { config } from "core";
import {
$console,
type Static,
StringEnum,
parse,

View File

@@ -1,4 +1,5 @@
import { $console, type DB as DefaultDB } from "core";
import type { DB as DefaultDB } from "core";
import { $console } from "core/utils";
import { EventManager } from "core/events";
import { sql } from "kysely";
import { Connection } from "../connection/Connection";

View File

@@ -1,4 +1,4 @@
import { $console } from "core/console";
import { $console } from "core/utils";
import type { Entity, EntityData } from "../Entity";
import type { EntityManager } from "../EntityManager";
import { Result, type ResultJSON, type ResultOptions } from "../Result";
@@ -32,6 +32,7 @@ export class MutatorResult<T = EntityData[]> extends Result<T> {
onError: (error) => {
if (!options?.silent) {
$console.error("[ERROR] Mutator:", error.message);
throw error;
}
},
...options,

View File

@@ -1,5 +1,5 @@
import type { DB as DefaultDB, PrimaryFieldType } from "core";
import { $console } from "core";
import { $console } from "core/utils";
import { type EmitsEvents, EventManager } from "core/events";
import { type SelectQueryBuilder, sql } from "kysely";
import { InvalidSearchParamsException } from "../../errors";

View File

@@ -1,9 +1,8 @@
import { $console } from "core/console";
import type { Entity, EntityData } from "../Entity";
import type { EntityManager } from "../EntityManager";
import { Result, type ResultJSON, type ResultOptions } from "../Result";
import type { Compilable, SelectQueryBuilder } from "kysely";
import { ensureInt } from "core/utils";
import { $console, ensureInt } from "core/utils";
export type RepositoryResultOptions = ResultOptions & {
silent?: boolean;