initial commit

This commit is contained in:
2026-02-10 19:40:51 +01:00
commit 759e336956
62 changed files with 9682 additions and 0 deletions

20
packages/env/package.json vendored Normal file
View File

@@ -0,0 +1,20 @@
{
"name": "@zendegi/env",
"version": "0.0.0",
"private": true,
"type": "module",
"exports": {
"./server": "./src/server.ts",
"./web": "./src/web.ts"
},
"dependencies": {
"@t3-oss/env-core": "^0.13.1",
"dotenv": "catalog:",
"zod": "catalog:"
},
"devDependencies": {
"@types/node": "catalog:",
"@zendegi/config": "workspace:*",
"typescript": "catalog:"
}
}

15
packages/env/src/server.ts vendored Normal file
View File

@@ -0,0 +1,15 @@
import "dotenv/config";
import { createEnv } from "@t3-oss/env-core";
import { z } from "zod";
export const env = createEnv({
server: {
DATABASE_URL: z.string().min(1),
BETTER_AUTH_SECRET: z.string().min(32),
BETTER_AUTH_URL: z.url(),
CORS_ORIGIN: z.url(),
NODE_ENV: z.enum(["development", "production", "test"]).default("development"),
},
runtimeEnv: process.env,
emptyStringAsUndefined: true,
});

9
packages/env/src/web.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
import { createEnv } from "@t3-oss/env-core";
import { z } from "zod";
export const env = createEnv({
clientPrefix: "VITE_",
client: {},
runtimeEnv: (import.meta as any).env,
emptyStringAsUndefined: true,
});

6
packages/env/tsconfig.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"extends": "@zendegi/config/tsconfig.base.json",
"compilerOptions": {
"strictNullChecks": true
}
}