Code snippet showing a configuration setup using TypeScript. It imports schema validation libraries (@standard-schema/spec, figue, zod, valibot), defines a custom password schema to ensure it's a string, and then uses defineConfig to configure environment variables for an application (environment, port, and database connection details like host, username, and password). The process.env is used as the environment source, and the final configuration is logged to the console.
I recently migrated my Figue library (full featured app config validation) to be able to use any Standard Schema compliant lib π
It now makes it easier to use any validation lib like @valibot.dev or zod, even mix them or use custom functions π