Openstatus www.openstatus.dev

refactor: replace process env by t3-oss (#1018)

* refactor: replace process env by t3-oss

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

authored by

Maximilian Kaske
autofix-ci[bot]
and committed by
GitHub
5f6d2625 a5fef715

+16 -16
+1
apps/server/src/env.ts
··· 15 15 JITSU_HOST: z.string().optional(), 16 16 SCREENSHOT_SERVICE_URL: z.string(), 17 17 QSTASH_TOKEN: z.string(), 18 + NODE_ENV: z.string().default("development"), 18 19 }, 19 20 20 21 /**
+2 -1
apps/server/src/v1/middleware.ts
··· 5 5 import { selectWorkspaceSchema, workspace } from "@openstatus/db/src/schema"; 6 6 import { getPlanConfig } from "@openstatus/db/src/schema/plan/utils"; 7 7 import { HTTPException } from "hono/http-exception"; 8 + import { env } from "../env"; 8 9 import type { Variables } from "./index"; 9 10 10 11 export async function middleware( ··· 15 16 if (!key) throw new HTTPException(401, { message: "Unauthorized" }); 16 17 17 18 const { error, result } = 18 - process.env.NODE_ENV === "production" 19 + env.NODE_ENV === "production" 19 20 ? await verifyKey(key) 20 21 : { result: { valid: true, ownerId: "1" }, error: null }; 21 22
+1 -1
apps/web/src/app/api/og/_components/basic-layout.tsx
··· 28 28 <div 29 29 tw={cn( 30 30 "flex flex-col justify-center shadow-2xl mt-1 bg-white rounded-t-lg border-t-2 border-r-2 border-l-2 border-slate-200 px-12", 31 - tw 31 + tw, 32 32 )} 33 33 > 34 34 {children}
+12 -14
apps/web/src/app/api/og/post/route.tsx
··· 15 15 16 16 export async function GET(req: Request) { 17 17 const [interRegularData, interLightData, calSemiBoldData] = await Promise.all( 18 - [interRegular, interLight, calSemiBold] 18 + [interRegular, interLight, calSemiBold], 19 19 ); 20 20 21 21 const { searchParams } = new URL(req.url); ··· 30 30 : undefined; 31 31 32 32 return new ImageResponse( 33 - ( 34 - <BasicLayout title={title} description={description}> 35 - {image ? ( 36 - <img 37 - alt="" 38 - style={{ objectFit: "cover", height: 350 }} // h-80 = 320px 39 - tw="flex w-full" 40 - src={new URL(image, DEFAULT_URL).toString()} 41 - /> 42 - ) : null} 43 - </BasicLayout> 44 - ), 33 + <BasicLayout title={title} description={description}> 34 + {image ? ( 35 + <img 36 + alt="" 37 + style={{ objectFit: "cover", height: 350 }} // h-80 = 320px 38 + tw="flex w-full" 39 + src={new URL(image, DEFAULT_URL).toString()} 40 + /> 41 + ) : null} 42 + </BasicLayout>, 45 43 { 46 44 ...SIZE, 47 45 fonts: [ ··· 64 62 weight: 600, 65 63 }, 66 64 ], 67 - } 65 + }, 68 66 ); 69 67 }