chore: tighten validation and runtime logging

* chore: tighten validation and runtime logging

* fix(i18n): localize new settings labels
This commit is contained in:
4gray authored and GitHub committed 2026-05-15 17:43:42 +02:00
1 parent d24c77a143
commit 2d5c4fa4f9
52 files changed
+767 -214

No files matched your search

@@ -0,0 +1,22 @@
export type DevLogFn = (...args: unknown[]) => void;
function isDevLoggingEnabled(): boolean {
const global = globalThis as typeof globalThis & {
ngDevMode?: boolean;
process?: { env?: { NODE_ENV?: string } };
};
return (
global.ngDevMode !== false && global.process?.env?.NODE_ENV !== 'test'
);
}
export function createDevLogger(scope: string): DevLogFn {
const prefix = `[${scope}]`;
return (...args: unknown[]) => {
if (isDevLoggingEnabled()) {
console.debug(prefix, ...args);
}
};
}