Openstatus www.openstatus.dev

Quick-fixes (#371)

* fix type errors

* remove

* add nextjs to dependencies

* update pnpm.lock file

* Remove `Image` component and replace it with a regular `img` tag

authored by

Kelvin Amoaba and committed by
GitHub
ecb14386 a01fd44d

+24 -15
+1 -1
apps/web/src/app/(content)/blog/[slug]/page.tsx
··· 11 11 import { Shell } from "@/components/dashboard/shell"; 12 12 import { BackButton } from "@/components/layout/back-button"; 13 13 14 - export const dynamic = "force-static"; 14 + // export const dynamic = "force-static"; 15 15 16 16 export async function generateStaticParams() { 17 17 return allPosts.map((post) => ({
+2 -1
apps/web/src/app/api/checker/cron/10m/route.ts
··· 1 + import type { NextRequest } from "next/server"; 1 2 import { NextResponse } from "next/server"; 2 3 3 4 import { cron, isAuthorizedDomain } from "../_cron"; ··· 6 7 export const preferredRegion = ["auto"]; 7 8 export const dynamic = "force-dynamic"; 8 9 9 - export async function GET(req: Request) { 10 + export async function GET(req: NextRequest) { 10 11 if (isAuthorizedDomain(req.url)) { 11 12 await cron({ periodicity: "10m", req }); 12 13 }
+2 -1
apps/web/src/app/api/checker/cron/1h/route.ts
··· 1 + import type { NextRequest } from "next/server"; 1 2 import { NextResponse } from "next/server"; 2 3 3 4 import { cron, isAuthorizedDomain } from "../_cron"; ··· 6 7 export const preferredRegion = ["auto"]; 7 8 export const dynamic = "force-dynamic"; 8 9 9 - export async function GET(req: Request) { 10 + export async function GET(req: NextRequest) { 10 11 if (isAuthorizedDomain(req.url)) { 11 12 await cron({ periodicity: "1h", req }); 12 13 }
+2 -1
apps/web/src/app/api/checker/cron/1m/route.ts
··· 1 + import type { NextRequest } from "next/server"; 1 2 import { NextResponse } from "next/server"; 2 3 3 4 import { cron, isAuthorizedDomain } from "../_cron"; ··· 6 7 export const preferredRegion = ["auto"]; 7 8 export const dynamic = "force-dynamic"; 8 9 9 - export async function GET(req: Request) { 10 + export async function GET(req: NextRequest) { 10 11 if (isAuthorizedDomain(req.url)) { 11 12 await cron({ periodicity: "1m", req }); 12 13 }
+2 -1
apps/web/src/app/api/checker/cron/30m/route.ts
··· 1 + import type { NextRequest } from "next/server"; 1 2 import { NextResponse } from "next/server"; 2 3 3 4 import { cron, isAuthorizedDomain } from "../_cron"; ··· 6 7 export const preferredRegion = ["auto"]; 7 8 export const dynamic = "force-dynamic"; 8 9 9 - export async function GET(req: Request) { 10 + export async function GET(req: NextRequest) { 10 11 if (isAuthorizedDomain(req.url)) { 11 12 await cron({ periodicity: "30m", req }); 12 13 }
+2 -1
apps/web/src/app/api/checker/cron/5m/route.ts
··· 1 + import type { NextRequest } from "next/server"; 1 2 import { NextResponse } from "next/server"; 2 3 3 4 import { cron, isAuthorizedDomain } from "../_cron"; ··· 6 7 export const preferredRegion = ["auto"]; 7 8 export const dynamic = "force-dynamic"; 8 9 9 - export async function GET(req: Request) { 10 + export async function GET(req: NextRequest) { 10 11 if (isAuthorizedDomain(req.url)) { 11 12 await cron({ periodicity: "5m", req }); 12 13 }
+2 -1
apps/web/src/app/api/checker/cron/_cron.ts
··· 1 + import type { NextRequest } from "next/server"; 1 2 import type { SignedInAuthObject } from "@clerk/nextjs/api"; 2 3 import { Client } from "@upstash/qstash"; 3 4 import type { z } from "zod"; ··· 26 27 export const cron = async ({ 27 28 periodicity, 28 29 req, 29 - }: z.infer<typeof periodicityAvailable> & { req: Request }) => { 30 + }: z.infer<typeof periodicityAvailable> & { req: NextRequest }) => { 30 31 const c = new Client({ 31 32 token: env.QSTASH_TOKEN, 32 33 });
+1 -1
apps/web/src/app/legal/[slug]/page.tsx
··· 5 5 import { Shell } from "@/components/dashboard/shell"; 6 6 import { BackButton } from "@/components/layout/back-button"; 7 7 8 - export const dynamic = "force-static"; 8 + // export const dynamic = "force-static"; 9 9 10 10 export async function generateStaticParams() { 11 11 return allLegalPosts.map((post) => ({
+5 -5
apps/web/src/components/content/article.tsx
··· 1 - import Image from "next/image"; 2 1 import Link from "next/link"; 3 2 import type { Post } from "contentlayer/generated"; 4 3 ··· 20 19 <div className="mx-auto grid w-full max-w-prose gap-3"> 21 20 <h1 className="font-cal mb-5 text-3xl">{post.title}</h1> 22 21 <div className="border-border relative h-64 w-full overflow-hidden rounded-lg border"> 23 - <Image 22 + {/* <Image 24 23 src={post.image} 25 24 fill={true} 26 25 alt={post.title} 27 26 className="object-cover" 28 - /> 27 + /> */} 29 28 {/* HOTFIX: plain `img` */} 30 - {/* <img 29 + {/* eslint-disable-next-line @next/next/no-img-element */} 30 + <img 31 31 src={post.image} 32 32 alt={post.title} 33 33 className="h-full w-full object-cover" 34 - /> */} 34 + /> 35 35 </div> 36 36 <div className="flex items-center gap-3"> 37 37 <Avatar>
+2 -1
packages/api/package.json
··· 18 18 "random-word-slugs": "0.1.7", 19 19 "stripe": "13.8.0", 20 20 "superjson": "1.13.3", 21 - "zod": "3.22.2" 21 + "zod": "3.22.2", 22 + "next": "13.5.3" 22 23 }, 23 24 "devDependencies": { 24 25 "@openstatus/tsconfig": "workspace:*",
-1
packages/api/src/trpc.ts
··· 1 - // @ts-expect-error - this is a valid import 2 1 import type { NextRequest } from "next/server"; 3 2 import type { 4 3 SignedInAuthObject,
+3
pnpm-lock.yaml
··· 381 381 '@trpc/server': 382 382 specifier: 10.38.5 383 383 version: 10.38.5 384 + next: 385 + specifier: 13.5.3 386 + version: 13.5.3(@babel/core@7.22.20)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) 384 387 random-word-slugs: 385 388 specifier: 0.1.7 386 389 version: 0.1.7