import { createMintelDirectusClient, ensureDirectusAuthenticated, } from "@mintel/next-utils"; import { updateSettings } from "@directus/sdk"; const client = createMintelDirectusClient(); async function setupBranding() { const prjName = process.env.PROJECT_NAME || "Mintel Project"; const prjColor = process.env.PROJECT_COLOR || "#82ed20"; console.log(`🎨 Setup Directus Branding for ${prjName}...`); await ensureDirectusAuthenticated(client); const cssInjection = `

MINTEL INFRASTRUCTURE ENGINE

${prjName.toUpperCase()} RELIABILITY.

`; try { await client.request( updateSettings({ project_name: prjName, project_color: prjColor, public_note: cssInjection, theme_light_overrides: { primary: prjColor, borderRadius: "16px", navigationBackground: "#000c24", navigationForeground: "#ffffff", }, } as any), ); console.log("✨ Branding applied!"); } catch (error) { console.error("❌ Error setting up branding:", error); } } setupBranding();