19 lines
495 B
TypeScript
19 lines
495 B
TypeScript
export function isCloudDebugEnabled(): boolean {
|
|
return (
|
|
(typeof __DEV__ !== "undefined" && __DEV__) ||
|
|
(typeof globalThis !== "undefined" &&
|
|
(globalThis as { __T3_CLOUD_DEBUG__?: boolean }).__T3_CLOUD_DEBUG__ === true)
|
|
);
|
|
}
|
|
|
|
export function cloudDebugLog(event: string, data?: Record<string, unknown>): void {
|
|
if (!isCloudDebugEnabled()) {
|
|
return;
|
|
}
|
|
if (data) {
|
|
console.log(`[t3-cloud] ${event}`, data);
|
|
} else {
|
|
console.log(`[t3-cloud] ${event}`);
|
|
}
|
|
}
|