···11+import { createEnv } from "@t3-oss/env-core";
22+import * as v from "valibot";
33+44+export const env = createEnv({
55+ server: {
66+ TURSO_DATABASE_URL: v.pipe(v.string(), v.url(), v.minLength(1)),
77+ TURSO_AUTH_TOKEN: v.pipe(v.string(), v.minLength(1)),
88+ },
99+1010+ /**
1111+ * What object holds the environment variables at runtime. This is usually
1212+ * `process.env` or `import.meta.env`.
1313+ */
1414+ runtimeEnv: process.env,
1515+1616+ /**
1717+ * By default, this library will feed the environment variables directly to
1818+ * the Zod validator.
1919+ *
2020+ * This means that if you have an empty string for a value that is supposed
2121+ * to be a number (e.g. `PORT=` in a ".env" file), Zod will incorrectly flag
2222+ * it as a type mismatch violation. Additionally, if you have an empty string
2323+ * for a value that is supposed to be a string with a default value (e.g.
2424+ * `DOMAIN=` in an ".env" file), the default value will never be applied.
2525+ *
2626+ * In order to solve these issues, we recommend that all new projects
2727+ * explicitly specify this option as true.
2828+ */
2929+ emptyStringAsUndefined: true,
3030+});