import validator from 'validator';
import { z } from 'zod';

export const Config = z.object({
  CI: z.string().refine(validator.isBoolean).transform(validator.toBoolean),
  NODE_ENV: z.enum(['development', 'test', 'production']),
  PORT: z.string().refine(validator.isPort).transform(validator.toInt),
});

export type Config = Readonly<z.infer<typeof Config>>;

{'avg_line_length': 32.90909090909091, 'max_line_length': 76, 'alphanum_fraction': 0.7209944751381215, 'licenses': ['MIT'], 'repository_name': 'shian15810/surl-api', 'path': 'src/config/config.interface.ts', 'size': 362, 'lang': 'TypeScript'}