@deepbrainspace/nx-surrealdb
Version:
NX plugin for SurrealDB migrations with modular architecture
65 lines (64 loc) âĸ 1.95 kB
TypeScript
/**
* Centralized debug utility for nx-surrealdb-migrations
* Provides consistent debug logging across all generators and executors
*/
export declare class Debug {
private static isEnabled;
/**
* Enable debug mode
*/
static enable(): void;
/**
* Disable debug mode
*/
static disable(): void;
/**
* Check if debug mode is enabled
*/
static get enabled(): boolean;
/**
* Set debug mode based on boolean value
*/
static setEnabled(enabled: boolean): void;
/**
* Log debug message with đ prefix
*/
static log(message: string, ...args: unknown[]): void;
/**
* Log debug error with â prefix
*/
static error(message: string, error?: unknown): void;
/**
* Log debug warning with â ī¸ prefix
*/
static warn(message: string, ...args: unknown[]): void;
/**
* Log debug info with âšī¸ prefix
*/
static info(message: string, ...args: unknown[]): void;
/**
* Log debug object/data with proper formatting
*/
static data(label: string, data: unknown): void;
/**
* Log debug table for array data
*/
static table(label: string, data: unknown[]): void;
/**
* Time a function execution
*/
static time<T>(label: string, fn: () => T): T;
static time<T>(label: string, fn: () => Promise<T>): Promise<T>;
/**
* Create a scoped debug instance for a specific module
*/
static scope(moduleName: string): {
log: (message: string, ...args: unknown[]) => void;
error: (message: string, error?: unknown) => void;
warn: (message: string, ...args: unknown[]) => void;
info: (message: string, ...args: unknown[]) => void;
data: (label: string, data: unknown) => void;
table: (label: string, data: unknown[]) => void;
time: <T>(label: string, fn: () => T | Promise<T>) => T | Promise<T>;
};
}