This commit is contained in:
 Илья Шалонин 2025-10-29 13:43:43 +05:00
commit 8538ab969a
434 changed files with 44051 additions and 0 deletions

View file

@ -0,0 +1,3 @@
{
"extends": ["../../biome.json"]
}

1
packages/utils/index.ts Normal file
View file

@ -0,0 +1 @@
export * from "./lib/base-url";

View file

@ -0,0 +1,9 @@
export function getBaseUrl() {
if (process.env.NEXT_PUBLIC_SITE_URL) {
return process.env.NEXT_PUBLIC_SITE_URL;
}
if (process.env.NEXT_PUBLIC_VERCEL_URL) {
return `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`;
}
return `http://localhost:${process.env.PORT ?? 3000}`;
}

View file

@ -0,0 +1,14 @@
{
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/node": "^22.15.30",
"@repo/tsconfig": "workspace:*"
},
"main": "./index.ts",
"name": "@repo/utils",
"scripts": {
"type-check": "tsc --noEmit"
},
"types": "./**/.tsx",
"version": "0.0.0"
}

View file

@ -0,0 +1,5 @@
{
"extends": "@repo/tsconfig/base.json",
"include": ["**/*.ts"],
"exclude": ["dist", "build", "node_modules"]
}