Skip to content

Commit 9c3e7d1

Browse files
jesseouecursoragent
andcommitted
fix: restore vendor routes and patch postcss
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6a33603 commit 9c3e7d1

10 files changed

Lines changed: 96 additions & 4 deletions

File tree

  • registry/modules
    • arcjet-security/files/apps/web/src/app/api/vendor/arcjet/protected
    • axiom-logging/files/apps/web/src/app/api/vendor/axiom/log
    • resend-email/files/apps/web/src/app/api/vendor/resend/send-welcome
    • unkey-api-keys/files/apps/web/src/app/api/vendor/unkey/verify
    • unkey-rate-limits/files/apps/web/src/app/api/vendor/unkey/ratelimit
    • upstash-redis/files/apps/web/src/app/api/vendor/upstash/health
    • vercel-blob/files/apps/web/src/app/api/vendor/vercel/blob
    • vercel-edge-config/files/apps/web/src/app/api/vendor/vercel/edge-config

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
"react": "latest",
5959
"react-dom": "latest"
6060
},
61+
"pnpm": {
62+
"overrides": {
63+
"postcss": ">=8.5.10"
64+
}
65+
},
6166
"keywords": [
6267
"nextjs",
6368
"typescript",

pnpm-lock.yaml

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NextResponse } from "next/server";
2+
3+
import { aj } from "@/lib/arcjet";
4+
5+
export async function GET(request: Request) {
6+
const decision = await aj.protect(request);
7+
if (decision.isDenied()) return NextResponse.json({ error: "Denied" }, { status: 429 });
8+
9+
return NextResponse.json({ ok: true });
10+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { NextResponse } from "next/server";
2+
3+
import { logAxiomEvent } from "@/lib/axiom/logger";
4+
5+
export async function POST() {
6+
await logAxiomEvent({ event: "stackfoundry.smoke", source: "registry" });
7+
return NextResponse.json({ ok: true });
8+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { randomUUID } from "node:crypto";
2+
import { NextResponse } from "next/server";
3+
4+
import { WelcomeEmail } from "@/emails/welcome-email";
5+
import { resend } from "@/lib/resend/client";
6+
7+
export async function POST(request: Request) {
8+
const { email, name = "there" } = await request.json();
9+
if (!email) return NextResponse.json({ error: "email is required" }, { status: 400 });
10+
11+
const result = await resend.emails.send({
12+
from: process.env.RESEND_FROM_EMAIL ?? "StackFoundry <onboarding@resend.dev>",
13+
to: [email],
14+
subject: "Welcome",
15+
react: WelcomeEmail({ name, actionUrl: "/" }),
16+
headers: { "X-Entity-Ref-ID": randomUUID() },
17+
});
18+
19+
return NextResponse.json(result);
20+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { NextResponse } from "next/server";
2+
3+
import { verifyUnkeyApiKey } from "@/lib/unkey/api-keys";
4+
5+
export async function POST(request: Request) {
6+
const { key } = await request.json();
7+
const result = await verifyUnkeyApiKey(key);
8+
return NextResponse.json(result);
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { NextResponse } from "next/server";
2+
3+
import { unkeyRatelimit } from "@/lib/unkey/ratelimit";
4+
5+
export async function POST(request: Request) {
6+
const { identifier = "anonymous" } = await request.json();
7+
const result = await unkeyRatelimit.limit(identifier);
8+
return NextResponse.json(result);
9+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { NextResponse } from "next/server";
2+
3+
import { pingRedis } from "@/lib/upstash/redis";
4+
5+
export async function GET() {
6+
const pong = await pingRedis();
7+
return NextResponse.json({ ok: pong === "PONG" });
8+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { NextResponse } from "next/server";
2+
3+
import { uploadBlob } from "@/lib/vercel/blob";
4+
5+
export async function POST(request: Request) {
6+
const formData = await request.formData();
7+
const file = formData.get("file");
8+
if (!(file instanceof Blob)) return NextResponse.json({ error: "file is required" }, { status: 400 });
9+
10+
const blob = await uploadBlob("uploads/" + crypto.randomUUID(), file);
11+
return NextResponse.json(blob);
12+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { NextResponse } from "next/server";
2+
3+
import { getEdgeConfigValue } from "@/lib/vercel/edge-config";
4+
5+
export async function GET() {
6+
const maintenance = await getEdgeConfigValue("maintenance", false);
7+
return NextResponse.json({ maintenance });
8+
}

0 commit comments

Comments
 (0)