Files
lobehub__lobehub/packages/env/src/debug.ts
Innei 1a4005c7b9 ♻️ refactor: extract server into apps/server + root namespaces into packages (#14949)
* ♻️ refactor(server-deps): extract envs/trpc/config/locales/business-server into packages

* ♻️ refactor: relocate src/server backend modules to apps/server package

Rebuilt on current canary: git mv the 8 server subtrees (services, routers,
modules, globalConfig, utils, runtimeConfig, workflows, featureFlags) into
@lobechat/server, with @/server/* dual-path alias, database vitest aliases,
and instrumentation import fixup.

* 📝 docs(skills): update src/server path refs to apps/server/src after relocation
2026-06-09 18:09:26 +08:00

23 lines
671 B
TypeScript

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace NodeJS {
interface ProcessEnv {
NEXT_PUBLIC_DEVELOPER_DEBUG: string;
NEXT_PUBLIC_I18N_DEBUG: string;
NEXT_PUBLIC_I18N_DEBUG_BROWSER: string;
NEXT_PUBLIC_I18N_DEBUG_SERVER: string;
}
}
}
export const getDebugConfig = () => ({
// developer debug mode
DEBUG_MODE: process.env.NEXT_PUBLIC_DEVELOPER_DEBUG === '1',
// i18n debug mode
I18N_DEBUG: process.env.NEXT_PUBLIC_I18N_DEBUG === '1',
I18N_DEBUG_BROWSER: process.env.NEXT_PUBLIC_I18N_DEBUG_BROWSER === '1',
I18N_DEBUG_SERVER: process.env.NEXT_PUBLIC_I18N_DEBUG_SERVER === '1',
});