Enhance environment configuration and expand Prisma schema for bot management

- Added OWNER_USER_IDS to .env.example for specifying global bot owners.
- Introduced new models in the Prisma schema: CommandOverride, OwnerTeamMember, GlobalUserBlacklist, GuildBlacklist, FeatureFlag, BotPresenceConfig, ChangelogEntry, and OwnerAuditLog to support advanced bot management features.
- Updated env.ts to preprocess OWNER_USER_IDS for better handling of global bot owner IDs.
- Modified ModulePlaceholderPage to ensure proper routing for remaining dashboard modules.
This commit is contained in:
smueller
2026-07-22 14:51:56 +02:00
parent 946283dfba
commit 1de28fa494
54 changed files with 3564 additions and 3 deletions

View File

@@ -12,7 +12,25 @@ const EnvSchema = z.object({
WEBUI_URL: z.string().url().default('http://localhost:3000'),
SESSION_SECRET: z.string().min(32, 'SESSION_SECRET must be at least 32 characters long'),
SENTRY_DSN: z.string().optional(),
DEFAULT_LOCALE: z.enum(['de', 'en']).default('de')
DEFAULT_LOCALE: z.enum(['de', 'en']).default('de'),
/**
* Comma-separated Discord user IDs that are treated as global bot owners
* for the (future) owner panel. Optional for now.
*/
OWNER_USER_IDS: z.preprocess(
(value) => (typeof value === 'string' && value.trim() === '' ? undefined : value),
z
.string()
.optional()
.transform((value) =>
value
? value
.split(',')
.map((id) => id.trim())
.filter((id) => id.length > 0)
: []
)
)
});
export const env = EnvSchema.parse(process.env);