mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-08-28 17:21:05 +00:00
fix: restore verboseLog/parseCssColor after main merge and bump glob
CI merge with main dropped verboseInfo/parseCssColor exports and broke the Vite build. Restore the PR logger and colour helpers, reinstate the Jest color mock map, and update glob to v13 with overrides. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+35
-2
@@ -1,5 +1,38 @@
|
||||
import { settingsState } from "@/seqta/utils/listeners/SettingsState";
|
||||
|
||||
export function verboseLog(...args: unknown[]): void {
|
||||
if (settingsState.devMode) console.log(...args);
|
||||
const VERBOSE_LOG_ATTR = "data-bsplus-verbose-log";
|
||||
|
||||
export function isVerboseLoggingEnabled(): boolean {
|
||||
return Boolean(settingsState.devMode && settingsState.verboseLogging);
|
||||
}
|
||||
|
||||
export function syncVerboseLogDomFlag(): void {
|
||||
if (typeof document === "undefined") return;
|
||||
document.documentElement.toggleAttribute(
|
||||
VERBOSE_LOG_ATTR,
|
||||
isVerboseLoggingEnabled(),
|
||||
);
|
||||
}
|
||||
|
||||
let initialized = false;
|
||||
|
||||
/** Register DOM flag sync when dev / verbose toggles change. Call after settings load. */
|
||||
export function initVerboseLogging(): void {
|
||||
if (initialized) return;
|
||||
initialized = true;
|
||||
syncVerboseLogDomFlag();
|
||||
settingsState.register("devMode", () => syncVerboseLogDomFlag());
|
||||
settingsState.register("verboseLogging", () => syncVerboseLogDomFlag());
|
||||
}
|
||||
|
||||
export function verboseDebug(...args: unknown[]): void {
|
||||
if (isVerboseLoggingEnabled()) console.debug(...args);
|
||||
}
|
||||
|
||||
export function verboseInfo(...args: unknown[]): void {
|
||||
if (isVerboseLoggingEnabled()) console.info(...args);
|
||||
}
|
||||
|
||||
export function verboseLog(...args: unknown[]): void {
|
||||
if (isVerboseLoggingEnabled()) console.log(...args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user