refactor: finalize type-safe env and config using @mintel/next-utils 1.7.8

This commit is contained in:
2026-02-11 00:39:59 +01:00
parent c5c7f2e38d
commit b2bff6109d
2 changed files with 5 additions and 7 deletions

View File

@@ -10,9 +10,7 @@ import { validateMintelEnv, mintelEnvSchema } from '@mintel/next-utils';
* - Logging
* - Analytics
*/
export const envSchema = z.object({
...mintelEnvSchema,
const envExtension = {
// Project specific overrides or additions
AUTH_COOKIE_NAME: z.string().default('klz_gatekeeper_session'),
@@ -29,12 +27,12 @@ export const envSchema = z.object({
INFRA_DIRECTUS_URL: z.string().url().optional(),
INFRA_DIRECTUS_TOKEN: z.string().optional(),
});
};
/**
* Validated environment object.
*/
export const env = validateMintelEnv(envSchema.shape);
export const env = validateMintelEnv(envExtension);
/**
* For legacy compatibility with existing code.