mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 20:37:21 +00:00
refactor console imports, added config update event
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { $console, config } from "core";
|
||||
import { config } from "core";
|
||||
import {
|
||||
$console,
|
||||
type Static,
|
||||
StringEnum,
|
||||
parse,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user