refactor: convert to bun workspaces monorepo

- Move web app into apps/web/
- Create packages/shared/ with shared types
- Create plugins/decky-vault/ scaffold
- Root package.json manages workspaces only
This commit is contained in:
2026-06-28 05:20:28 +08:00
parent c4bede20d4
commit cd72b7a948
345 changed files with 488 additions and 126 deletions
+19
View File
@@ -0,0 +1,19 @@
import { permanentRedirect } from "next/navigation"
import type { Metadata } from "next"
interface Props {
params: Promise<{ steamid: string }>
}
export default async function AppRedirectPage({ params }: Props) {
const { steamid } = await params
permanentRedirect(`/game/${steamid}`)
}
export const dynamic = "force-dynamic"
export function generateMetadata({ params }: Props): Metadata {
return {
robots: { index: false, follow: false },
}
}
@@ -0,0 +1,14 @@
import { describe, it, expect } from "vitest"
describe("app/[steamid] redirect route", () => {
it("exports force-dynamic", async () => {
const mod = await import("../[steamid]/page")
expect(mod).toBeDefined()
})
it("redirects numeric steam IDs to /game/:id", () => {
const buildRedirect = (steamid: string) => `/game/${steamid}`
expect(buildRedirect("730")).toBe("/game/730")
expect(buildRedirect("12345")).toBe("/game/12345")
})
})