mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
refactor console imports, added config update event
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { $console, isDebug } from "core";
|
||||
import {
|
||||
DataPermissions,
|
||||
type EntityData,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { $console, type PrimaryFieldType } from "core";
|
||||
import type { PrimaryFieldType } from "core";
|
||||
import { $console } from "core/utils";
|
||||
import { Event, InvalidEventReturn } from "core/events";
|
||||
import type { Entity, EntityData } from "../entities";
|
||||
import type { RepoQuery } from "data/server/query";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { type Static, StringEnum, dayjs } from "core/utils";
|
||||
import { $console, type Static, StringEnum, dayjs } from "core/utils";
|
||||
import type { EntityManager } from "../entities";
|
||||
import { Field, type TActionContext, type TRenderContext, baseFieldConfigSchema } from "./Field";
|
||||
import { $console } from "core";
|
||||
import * as tbbox from "@sinclair/typebox";
|
||||
import type { TFieldTSType } from "data/entities/EntityTypescript";
|
||||
const { Type } = tbbox;
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { CompiledQuery, TableMetadata } from "kysely";
|
||||
import type { IndexMetadata, SchemaResponse } from "../connection/Connection";
|
||||
import type { Entity, EntityManager } from "../entities";
|
||||
import { PrimaryField } from "../fields";
|
||||
import { $console } from "core";
|
||||
import { $console } from "core/utils";
|
||||
|
||||
type IntrospectedTable = TableMetadata & {
|
||||
indices: IndexMetadata[];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { s } from "core/object/schema";
|
||||
import { WhereBuilder, type WhereQuery } from "data/entities/query/WhereBuilder";
|
||||
import { $console } from "core";
|
||||
import { isObject } from "core/utils";
|
||||
import { isObject, $console } from "core/utils";
|
||||
import type { CoercionOptions, TAnyOf } from "jsonv-ts";
|
||||
|
||||
// -------
|
||||
|
||||
Reference in New Issue
Block a user