7 Commits
Author SHA1 Message Date
remco ee31d8f9c5 chore(deps): update All dependencies
CI / check (pull_request) Failing after 12s
CI / release (pull_request) Skipped
CI / deploy (pull_request) Skipped
2026-08-07 18:00:29 +00:00
openhands 6a67fb6e83 refactor: remove additional dead exports and unused actions
CI / check (push) Successful in 26s
CI / release (push) Skipped
CI / deploy (push) Successful in 59s
Remove buildFontUrl, measureText, uncached, invalidateCache, fetchJsonWithFlareSolver, upsertPermission, deletePermission, bulkImportPermissions, clearAllPermissions, bulkDeletePermissions, bulkDeletePhotos, userReplyTicket, closeTicketByUser. Update staff-smoke-contract test for bulkDeletePhotos removal.
2026-08-07 19:19:05 +02:00
openhands 24bf8eabb9 refactor: remove dead code and unused exports
CI / check (push) Successful in 29s
CI / release (push) Skipped
CI / deploy (push) Successful in 59s
Delete proxy-auth.ts, types/index.ts, staff-user.ts+test, local-imports.ts+test (only used by their own tests). Remove unused foundation exports: sanitizeFilename, canonicalizeFormValue, canonicalizeFormData, ConflictError, getRequestStore, getClientIp, elapsed. Remove stale TODO comments from rank-authority.ts and notice.ts. Fix biome lint warnings in catalog-repair.ts.
2026-08-07 18:55:02 +02:00
openhands 510d070dc5 chore: add jobs:worker script and knip dead-code check to CI
Add 'knip' and 'jobs:worker' scripts to package.json. Wire knip into CI check job after tests. Remove redundant jobs-worker entry from knip.json (auto-detected).
2026-08-07 18:54:51 +02:00
openhands 82e8448f26 test: add unit tests for pure logic modules
Add 22 test files covering imager, soundtracks, browser-headers, source-keys (figure/pet/effect), effect-source, plus catalog-translations, catalog-layouts, client-translation-files, translations-utils, and various admin/services/helpers modules. Total test count increases by 120+.
2026-08-07 18:53:59 +02:00
openhands 11e8b06bf8 feat: add missing translations across all locales
Add 692 translation keys across 21 locale files, covering admin actions, moderation, radio, catalog, and public UI strings.
2026-08-07 18:53:39 +02:00
openhands 51ef7602ca perf: migrate pages to Cache Components via root layout opt-out
Remove the per-route 'export const instant = false' opt-outs now that the root layout carries the single Cache Components opt-out. Child pages inherit the opt-out, so admin/mod/radio leaf pages that only access cached or DB data stay instant while runtime-dependent pages remain dynamic. Update the staff-smoke contract test to assert the root-layout contract.
2026-08-07 18:51:45 +02:00
274 changed files with 2201 additions and 1726 deletions

No files matched your search

+1
View File
@@ -47,6 +47,7 @@ jobs:
pnpm biome:lint
pnpm typecheck
pnpm test
pnpm knip
echo "--- CI checks passed ---"
deploy:
+7 -3
View File
@@ -4,15 +4,19 @@
"src/app/**/page.{ts,tsx}",
"src/app/**/layout.{ts,tsx}",
"src/app/**/route.{ts,tsx}",
"src/app/**/{error,not-found,loading,template,default,global-error}.{ts,tsx}"
"src/app/**/{error,not-found,loading,template,default,global-error}.{ts,tsx}",
"scripts/migrate-aes-cbc-to-gcm.ts"
],
"project": ["src/**/*.{ts,tsx}"],
"project": ["src/**/*.{ts,tsx}", "scripts/**/*.{ts,js}"],
"ignoreDependencies": [
"tailwindcss-animate",
"@tailwindcss/forms",
"@tailwindcss/typography",
"pino-pretty",
"tailwindcss"
"tailwindcss",
"husky",
"@sentry/nextjs"
],
"ignore": ["src/actions/import-badges.ts"],
"ignoreBinaries": ["sendmail"]
}
+1 -1
View File
@@ -49,7 +49,7 @@ const nextConfig: NextConfig = {
// Voorkom dat type-warnings (zoals ongebruikte imports) de productiebuild blokkeren
typescript: {
ignoreBuildErrors: true,
ignoreBuildErrors: false,
},
// Enable React Compiler for automatic memoization
+9 -7
View File
@@ -13,6 +13,8 @@
"lint": "biome check .",
"biome:lint": "biome check .",
"format": "biome format --write .",
"knip": "knip --include files,dependencies,devDependencies,unlisted,binaries",
"jobs:worker": "tsx scripts/jobs-worker.ts",
"test": "vitest",
"typecheck": "tsc --noEmit",
"db:generate": "drizzle-kit generate",
@@ -41,8 +43,8 @@
"jpeg-js": "0.4.4",
"json5": "2.2.3",
"jszip": "3.10.1",
"lenis": "1.3.25",
"lucide-react": "1.28.0",
"lenis": "1.3.26",
"lucide-react": "1.30.0",
"lzma": "2.3.2",
"motion": "12.43.0",
"music-metadata": "11.14.0",
@@ -69,7 +71,7 @@
"@tailwindcss/forms": "^0.5.11",
"@tailwindcss/postcss": "^4.3.3",
"@tailwindcss/typography": "^0.5.20",
"@types/node": "^26.1.2",
"@types/node": "^26.2.0",
"@types/react": "19.2.18",
"@types/react-dom": "19.2.4",
"@vitest/coverage-v8": "4.1.10",
@@ -77,14 +79,14 @@
"dotenv": "^17.4.2",
"drizzle-kit": "^0.31.10",
"husky": "^9.1.7",
"knip": "6.31.0",
"knip": "6.32.0",
"lint-staged": "^17.3.0",
"pino-pretty": "^13.1.3",
"postcss": "^8.5.25",
"postcss": "^8.5.26",
"tailwindcss": "^4.3.3",
"tsx": "^4.23.5",
"tsx": "^4.23.11",
"typescript": "^7.0.2",
"vite": "8.2.0",
"vite": "8.2.1",
"vitest": "4.1.10"
}
}
+71 -67
View File
@@ -57,7 +57,7 @@ importers:
version: 3.4.13
drizzle-orm:
specifier: 0.45.2
version: 0.45.2([email protected](@types/node@26.1.2))
version: 0.45.2([email protected](@types/node@26.2.0))
hash-wasm:
specifier: 4.12.0
version: 4.12.0
@@ -74,11 +74,11 @@ importers:
specifier: 3.10.1
version: 3.10.1
lenis:
specifier: 1.3.25
version: 1.3.25([email protected])
specifier: 1.3.26
version: 1.3.26([email protected])
lucide-react:
specifier: 1.28.0
version: 1.28.0([email protected])
specifier: 1.30.0
version: 1.30.0([email protected])
lzma:
specifier: 2.3.2
version: 2.3.2
@@ -90,16 +90,16 @@ importers:
version: 11.14.0([email protected])
mysql2:
specifier: 3.23.2
version: 3.23.2(@types/node@26.1.2)
version: 3.23.2(@types/node@26.2.0)
next:
specifier: 16.3.0
version: 16.3.0(@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected])
version: 16.3.0(@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected])
next-auth:
specifier: 5.0.0-beta.32
version: 5.0.0-beta.32([email protected](@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected]))([email protected])
version: 5.0.0-beta.32([email protected](@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected]))([email protected])
next-intl:
specifier: 4.13.5
version: 4.13.5([email protected](@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])
version: 4.13.5([email protected](@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])
otplib:
specifier: 13.4.1
version: 13.4.1
@@ -123,7 +123,7 @@ importers:
version: 0.0.1
sharp:
specifier: ^0.35.3
version: 0.35.3(@types/node@26.1.2)
version: 0.35.3(@types/node@26.2.0)
sonner:
specifier: 2.0.7
version: 2.0.7([email protected]([email protected]))([email protected])
@@ -153,8 +153,8 @@ importers:
specifier: ^0.5.20
version: 0.5.20([email protected])
'@types/node':
specifier: ^26.1.2
version: 26.1.2
specifier: ^26.2.0
version: 26.2.0
'@types/react':
specifier: 19.2.18
version: 19.2.18
@@ -177,8 +177,8 @@ importers:
specifier: ^9.1.7
version: 9.1.7
knip:
specifier: 6.31.0
version: 6.31.0
specifier: 6.32.0
version: 6.32.0
lint-staged:
specifier: ^17.3.0
version: 17.3.0
@@ -192,17 +192,17 @@ importers:
specifier: ^4.3.3
version: 4.3.3
tsx:
specifier: ^4.23.5
version: 4.23.5
specifier: ^4.23.11
version: 4.23.11
typescript:
specifier: ^7.0.2
version: 7.0.2
vite:
specifier: 8.2.0
version: 8.2.0(@types/node@26.1.2)([email protected])([email protected])([email protected].5)([email protected])
specifier: 8.2.1
version: 8.2.1(@types/node@26.2.0)([email protected])([email protected])([email protected].11)([email protected])
vitest:
specifier: 4.1.10
version: 4.1.10(@types/node@26.1.2)(@vitest/[email protected])([email protected].0(@types/node@26.1.2)([email protected])([email protected])([email protected].5)([email protected]))
version: 4.1.10(@types/node@26.2.0)(@vitest/[email protected])([email protected].1(@types/node@26.2.0)([email protected])([email protected])([email protected].11)([email protected]))
packages:
@@ -1734,8 +1734,8 @@ packages:
'@types/[email protected]':
resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
'@types/node@26.1.2':
resolution: {integrity: sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg==}
'@types/node@26.2.0':
resolution: {integrity: sha512-5IviulTZeRNp2vAJ514cc/HUlY5nZ9fCbq9DMyC52BrhFZACo3nI0R7qBxhQmo/d27NFe96ur/b7Wwxklda+kg==}
'@types/[email protected]':
resolution: {integrity: sha512-Bsc+QHgp+P/F02XDzNCY9jnZNCUuLki36KT7VKrTXXLdHf+vHMNZnW1rVu5DNW/rCK+fya3DATySbLM4yhtKUw==}
@@ -2215,9 +2215,6 @@ packages:
resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==}
engines: {node: '>=6'}
[email protected]:
resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==}
[email protected]:
resolution: {integrity: sha512-Dz/6HxkrxgNehhxLVeyv8sad9UzF2xBVeaKBQNDfJ5XiSXmp2gTR0eO0RWiT2NCKS5aGP9jjkOMggTN90qU50A==}
@@ -2324,13 +2321,13 @@ packages:
[email protected]:
resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==}
[email protected]1.0:
resolution: {integrity: sha512-NbeIEmUS2VUMjAkbiSNOKPJeV9wpCsr0660sUyKyMQbk4Iom0++nTLInVp4MJ+LfR4kORnw67bDi5tvO7YLnzA==}
[email protected]2.0:
resolution: {integrity: sha512-KDX9OmmOFmlvmxTkrx6Z0GHISMut+pXMSKR8eg84bovaxJKx2NdQD4JYCXveSbvieRe107W6vCD2xCpmz0qBYA==}
engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
[email protected]5:
resolution: {integrity: sha512-mOKxayErlaONK8fm4LN3XNd99Qu4plTpn9h9qf8wxzjGrJDzuD84FYzZ81HCd6ZsWp++VWVwOzL286Pf2s2u4A==}
[email protected]6:
resolution: {integrity: sha512-s/xTCZCxTFvHbAN1OzuhNaN5YPJH2ail0XAkctKW1b+RUAG4nUL5UHLXwNko1h8aEeT2jspBXegMgPJd8zcuag==}
peerDependencies:
'@nuxt/kit': '>=3.0.0'
react: '>=17.0.0'
@@ -2506,8 +2503,8 @@ packages:
resolution: {integrity: sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA==}
engines: {bun: '>=1.0.0', deno: '>=1.30.0', node: '>=8.0.0'}
lucide-react@1.28.0:
resolution: {integrity: sha512-fARAFJULsGuDDydjp6+6blekG/sBIM29TerzLjc9bQUKAcEfrSc4ZQKb25KRz4OMKd87cZTb5dgq0w/T6KufVg==}
lucide-react@1.30.0:
resolution: {integrity: sha512-tUIr2jXLbWpCkdtH8XP7P7YppM9ueWgTky99lpWDY6z5REs6B+O6ZQ3U5tHkUUY59ANyOv/PBcs8E4Fe3KO3eA==}
peerDependencies:
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
@@ -2971,8 +2968,13 @@ packages:
[email protected]:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
[email protected].5:
resolution: {integrity: sha512-rw55FUaqOoI7RvlQwLbhO4nSDApnQ4/CykPuiQ/EPvtrX3WA9Ig55jIt9VvbBJbzJuj12ueRu4PMZ2SxPVbihg==}
[email protected].11:
resolution: {integrity: sha512-Ry2oTEUnhBdeEdWIztY8kf3/nBGnPnjMLVGL0YfdRXMORuPER5NlKmayqxtxRxwB1xBN+RivRaJfe7PM1rtiyw==}
engines: {node: '>=18.0.0'}
hasBin: true
[email protected]:
resolution: {integrity: sha512-6q8uTORRGauQVjqMQnKUucLFoeXZAfw6zKvG35GLbdKWbLdeOtZ3H4mhyA5mxuUd2o2cRTskhj59nLLQseUvUw==}
engines: {node: '>=18.0.0'}
hasBin: true
@@ -3025,8 +3027,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
[email protected].0:
resolution: {integrity: sha512-pn+CFpM0lwDeKwmOq1ZaBK/9sjorZcgqxki6MbY/jPEVd9vichIlmlD4HmQ5wdP5EgqQCFRaACBxMC7uEGc6lQ==}
[email protected].1:
resolution: {integrity: sha512-EU/eS7BH3XROHh2YnBefjM6DBKA6ZeMZEYQbj7NLWg5wHYlhB8B/Mayd5XsgWq+NFYccDOTemRpdETWR6Ka/lw==}
engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
peerDependencies:
@@ -4163,7 +4165,7 @@ snapshots:
'@types/[email protected]': {}
'@types/node@26.1.2':
'@types/node@26.2.0':
dependencies:
undici-types: 8.3.0
@@ -4250,7 +4252,7 @@ snapshots:
obug: 2.1.4
std-env: 4.2.0
tinyrainbow: 3.1.1
vitest: 4.1.10(@types/node@26.1.2)(@vitest/[email protected])([email protected].0(@types/node@26.1.2)([email protected])([email protected])([email protected].5)([email protected]))
vitest: 4.1.10(@types/node@26.2.0)(@vitest/[email protected])([email protected].1(@types/node@26.2.0)([email protected])([email protected])([email protected].11)([email protected]))
'@vitest/[email protected]':
dependencies:
@@ -4261,13 +4263,13 @@ snapshots:
chai: 6.2.2
tinyrainbow: 3.1.1
'@vitest/[email protected]([email protected].0(@types/node@26.1.2)([email protected])([email protected])([email protected].5)([email protected]))':
'@vitest/[email protected]([email protected].1(@types/node@26.2.0)([email protected])([email protected])([email protected].11)([email protected]))':
dependencies:
'@vitest/spy': 4.1.10
estree-walker: 3.0.3
magic-string: 0.30.21
optionalDependencies:
vite: 8.2.0(@types/node@26.1.2)([email protected])([email protected])([email protected].5)([email protected])
vite: 8.2.1(@types/node@26.2.0)([email protected])([email protected])([email protected].11)([email protected])
'@vitest/[email protected]':
dependencies:
@@ -4392,11 +4394,11 @@ snapshots:
'@drizzle-team/brocli': 0.10.2
'@esbuild-kit/esm-loader': 2.6.5
esbuild: 0.25.12
tsx: 4.23.5
tsx: 4.23.9
[email protected]([email protected](@types/node@26.1.2)):
[email protected]([email protected](@types/node@26.2.0)):
optionalDependencies:
mysql2: 3.23.2(@types/node@26.1.2)
mysql2: 3.23.2(@types/node@26.2.0)
[email protected]: {}
@@ -4493,10 +4495,6 @@ snapshots:
[email protected]: {}
[email protected]:
dependencies:
resolve-pkg-maps: 1.0.0
[email protected]:
dependencies:
resolve-pkg-maps: 1.0.0
@@ -4591,11 +4589,11 @@ snapshots:
readable-stream: 2.3.8
setimmediate: 1.0.5
[email protected]1.0:
[email protected]2.0:
dependencies:
fdir: 6.5.0([email protected])
formatly: 0.3.0
get-tsconfig: 4.14.0
get-tsconfig: 4.14.1
jiti: 2.7.0
oxc-parser: 0.142.0
oxc-resolver: 11.24.2
@@ -4607,7 +4605,7 @@ snapshots:
yaml: 2.9.0
zod: 4.4.3
[email protected]5([email protected]):
[email protected]6([email protected]):
optionalDependencies:
react: 19.2.8
@@ -4725,7 +4723,7 @@ snapshots:
[email protected]: {}
lucide-react@1.28.0([email protected]):
lucide-react@1.30.0([email protected]):
dependencies:
react: 19.2.8
@@ -4784,9 +4782,9 @@ snapshots:
transitivePeerDependencies:
- supports-color
[email protected](@types/node@26.1.2):
[email protected](@types/node@26.2.0):
dependencies:
'@types/node': 26.1.2
'@types/node': 26.2.0
aws-ssl-profiles: 1.1.2
denque: 2.1.0
generate-function: 2.3.1
@@ -4804,22 +4802,22 @@ snapshots:
[email protected]: {}
[email protected]([email protected](@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected]))([email protected]):
[email protected]([email protected](@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected]))([email protected]):
dependencies:
'@auth/core': 0.41.3
next: 16.3.0(@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected])
next: 16.3.0(@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected])
react: 19.2.8
[email protected]: {}
[email protected]([email protected](@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]):
[email protected]([email protected](@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]):
dependencies:
'@formatjs/intl-localematcher': 0.8.13
'@parcel/watcher': 2.6.0
'@swc/core': 1.15.47
icu-minify: 4.13.5
negotiator: 1.0.0
next: 16.3.0(@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected])
next: 16.3.0(@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected])
next-intl-swc-plugin-extractor: 4.13.5
po-parser: 2.1.1
react: 19.2.8
@@ -4829,7 +4827,7 @@ snapshots:
transitivePeerDependencies:
- '@swc/helpers'
[email protected](@types/node@26.1.2)([email protected])([email protected]([email protected]))([email protected]):
[email protected](@types/node@26.2.0)([email protected])([email protected]([email protected]))([email protected]):
dependencies:
'@next/env': 16.3.0
'@swc/helpers': 0.5.15
@@ -4849,7 +4847,7 @@ snapshots:
'@next/swc-win32-arm64-msvc': 16.3.0
'@next/swc-win32-x64-msvc': 16.3.0
babel-plugin-react-compiler: 1.0.0
sharp: 0.35.3(@types/node@26.1.2)
sharp: 0.35.3(@types/node@26.2.0)
transitivePeerDependencies:
- '@babel/core'
- '@types/node'
@@ -5100,7 +5098,7 @@ snapshots:
[email protected]: {}
[email protected](@types/node@26.1.2):
[email protected](@types/node@26.2.0):
dependencies:
'@img/colour': 1.1.0
detect-libc: 2.1.2
@@ -5131,7 +5129,7 @@ snapshots:
'@img/sharp-win32-arm64': 0.35.3
'@img/sharp-win32-ia32': 0.35.3
'@img/sharp-win32-x64': 0.35.3
'@types/node': 26.1.2
'@types/node': 26.2.0
[email protected]: {}
@@ -5232,7 +5230,13 @@ snapshots:
[email protected]: {}
[email protected].5:
[email protected].11:
dependencies:
esbuild: 0.25.12
optionalDependencies:
fsevents: 2.3.3
[email protected]:
dependencies:
esbuild: 0.25.12
optionalDependencies:
@@ -5296,7 +5300,7 @@ snapshots:
[email protected]: {}
[email protected].0(@types/node@26.1.2)([email protected])([email protected])([email protected].5)([email protected]):
[email protected].1(@types/node@26.2.0)([email protected])([email protected])([email protected].11)([email protected]):
dependencies:
lightningcss: 1.33.0
picomatch: 4.0.5
@@ -5304,17 +5308,17 @@ snapshots:
rolldown: 1.2.2
tinyglobby: 0.2.17
optionalDependencies:
'@types/node': 26.1.2
'@types/node': 26.2.0
esbuild: 0.25.12
fsevents: 2.3.3
jiti: 2.7.0
tsx: 4.23.5
tsx: 4.23.11
yaml: 2.9.0
[email protected](@types/node@26.1.2)(@vitest/[email protected])([email protected].0(@types/node@26.1.2)([email protected])([email protected])([email protected].5)([email protected])):
[email protected](@types/node@26.2.0)(@vitest/[email protected])([email protected].1(@types/node@26.2.0)([email protected])([email protected])([email protected].11)([email protected])):
dependencies:
'@vitest/expect': 4.1.10
'@vitest/mocker': 4.1.10([email protected].0(@types/node@26.1.2)([email protected])([email protected])([email protected].5)([email protected]))
'@vitest/mocker': 4.1.10([email protected].1(@types/node@26.2.0)([email protected])([email protected])([email protected].11)([email protected]))
'@vitest/pretty-format': 4.1.10
'@vitest/runner': 4.1.10
'@vitest/snapshot': 4.1.10
@@ -5331,10 +5335,10 @@ snapshots:
tinyexec: 1.3.0
tinyglobby: 0.2.17
tinyrainbow: 3.1.1
vite: 8.2.0(@types/node@26.1.2)([email protected])([email protected])([email protected].5)([email protected])
vite: 8.2.1(@types/node@26.2.0)([email protected])([email protected])([email protected].11)([email protected])
why-is-node-running: 2.3.0
optionalDependencies:
'@types/node': 26.1.2
'@types/node': 26.2.0
'@vitest/coverage-v8': 4.1.10([email protected])
transitivePeerDependencies:
- msw
-24
View File
@@ -18,20 +18,6 @@ async function rejectLegacyHousekeepingWrite(): Promise<never> {
);
}
export async function upsertPermission(_formData: FormData): Promise<void> {
return rejectLegacyHousekeepingWrite();
}
export async function deletePermission(_formData: FormData): Promise<void> {
return rejectLegacyHousekeepingWrite();
}
export async function bulkImportPermissions(
_formData: FormData,
): Promise<{ count: number; errors: string[] }> {
return rejectLegacyHousekeepingWrite();
}
export async function exportPermissions(): Promise<string> {
await requirePermission(PERMS.SETTINGS_VIEW);
@@ -55,13 +41,3 @@ export async function exportPermissions(): Promise<string> {
export async function applyPreset(_formData: FormData): Promise<void> {
return rejectLegacyHousekeepingWrite();
}
export async function clearAllPermissions(): Promise<void> {
return rejectLegacyHousekeepingWrite();
}
export async function bulkDeletePermissions(
_ids: bigint[],
): Promise<{ count: number }> {
return rejectLegacyHousekeepingWrite();
}
+1 -35
View File
@@ -1,6 +1,6 @@
"use server";
import { eq, inArray } from "drizzle-orm";
import { eq } from "drizzle-orm";
import { revalidatePath } from "next/cache";
import { requirePermission } from "@/lib/admin/guard";
import { tryRemoveLocalPhotoFile } from "@/lib/admin/photo-files";
@@ -34,37 +34,3 @@ export async function deletePhoto(formData: FormData): Promise<void> {
revalidatePath("/admin/photos");
revalidatePath("/photos");
}
export async function bulkDeletePhotos(formData: FormData): Promise<void> {
const staff = await requirePermission(PERMS.PAGES_EDIT);
const raw = String(formData.get("ids") ?? "");
const ids = raw
.split(",")
.map((s) => Number(s.trim()))
.filter((n) => Number.isFinite(n) && n > 0);
if (ids.length === 0) return;
const rows = await db
.select({ id: CameraWeb.id, url: CameraWeb.url })
.from(CameraWeb)
.where(inArray(CameraWeb.id, ids));
if (rows.length > 0) {
await db.delete(CameraWeb).where(
inArray(
CameraWeb.id,
rows.map((r) => r.id),
),
);
await Promise.all(rows.map((r) => tryRemoveLocalPhotoFile(r.url)));
await logStaffActivity({
staffId: staff.id,
action: "photo_bulk_delete",
description: `Deleted ${rows.length} camera photo(s)`,
targetType: "camera_web",
});
}
revalidatePath("/admin/photos");
revalidatePath("/photos");
}
-69
View File
@@ -53,75 +53,6 @@ export const createTicket = authAction(
},
);
export const userReplyTicket = authAction(
{
schema: replyTicketSchema,
rateLimitKey: "ticket-reply",
rateLimitMax: 10,
rateLimitWindowMs: 60_000,
},
async (ctx) => {
const [ticket] = await db
.select()
.from(WebsiteTicket)
.where(eq(WebsiteTicket.id, ctx.data.ticketId))
.limit(1);
if (!ticket) throw new ActionError("Ticket not found");
if (ticket.creatorId !== ctx.session.user.id)
throw new ActionError("Unauthorized");
if (ticket.status === "closed") throw new ActionError("Ticket is closed");
await db.insert(WebsiteTicketMessage).values({
ticketId: ctx.data.ticketId,
userId: ctx.session.user.id,
message: ctx.data.message,
isStaff: 0,
});
// If ticket was in "waiting" (waiting for user), move back to open
if (ticket.status === "waiting") {
await db
.update(WebsiteTicket)
.set({ status: "open", updatedAt: new Date() })
.where(eq(WebsiteTicket.id, ctx.data.ticketId));
}
return actionOk();
},
);
export const closeTicketByUser = authAction(
{
schema: replyTicketSchema.pick({ ticketId: true }),
rateLimitKey: "ticket-close",
rateLimitMax: 10,
rateLimitWindowMs: 60_000,
},
async (ctx) => {
const [ticket] = await db
.select()
.from(WebsiteTicket)
.where(eq(WebsiteTicket.id, ctx.data.ticketId))
.limit(1);
if (!ticket) throw new ActionError("Ticket not found");
if (ticket.creatorId !== ctx.session.user.id)
throw new ActionError("Unauthorized");
if (ticket.status === "closed")
throw new ActionError("Ticket is already closed");
await db
.update(WebsiteTicket)
.set({ status: "closed", closedAt: new Date(), updatedAt: new Date() })
.where(eq(WebsiteTicket.id, ctx.data.ticketId));
return actionOk();
},
);
// ── Admin actions ────────────────────────────────────────────────────
export const adminReplyTicket = adminAction(
{
permission: [PERMS.TICKETS_EDIT, PERMS.MOD_TICKETS_EDIT],
-4
View File
@@ -14,10 +14,6 @@ import {
import { formatDate } from "@/lib/format-date";
import { resolveHotelName } from "@/lib/hotel-name";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
// Canonical Habbo badge image CDN (same base used by the profile page).
const BADGE_IMG_BASE = "https://images.habbo.com/c_images/album1584";
-4
View File
@@ -8,10 +8,6 @@ import { auth } from "@/lib/auth";
import { db, WebsiteStaffApplications, WebsiteTeams } from "@/lib/db";
import { resolveHotelName } from "@/lib/hotel-name";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
// Canonical Habbo badge image CDN (same base used by the profile page).
const BADGE_IMG_BASE = "https://images.habbo.com/c_images/album1584";
-4
View File
@@ -3,10 +3,6 @@ import { getTranslations } from "next-intl/server";
import { ContentCard, EmptyState } from "@/components/public/ui";
import { db, WebsiteBadges } from "@/lib/db";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Badges" };
// Canonical Habbo badge image CDN. A badge_key (e.g. "ADM") maps to a .gif here.
-4
View File
@@ -5,10 +5,6 @@ import { auth } from "@/lib/auth";
import { unixNow } from "@/lib/bans";
import { Ban, db } from "@/lib/db";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
const FAR_FUTURE = Math.floor(Date.now() / 1000) + 50 * 365 * 24 * 3600;
export default async function BannedPage() {
-4
View File
@@ -2,10 +2,6 @@ import Link from "next/link";
import { useTranslations } from "next-intl";
import { ContentCard } from "@/components/public/ui";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Community" };
const LINKS = [
-4
View File
@@ -1,9 +1,5 @@
import { ContentCard } from "@/components/public/ui";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
// Public API documentation. Static, hand-maintained from the routes that
// actually exist under src/app/api — keep this in sync when endpoints change.
-4
View File
@@ -6,10 +6,6 @@ import { auth } from "@/lib/auth";
import { db, User, WebsiteDrawbadges } from "@/lib/db";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
// Reads the live users + website_drawbadges tables and writes credits/badges on
// purchase — must never be statically rendered.
@@ -17,10 +17,6 @@ import {
import { formatDate } from "@/lib/format-date";
import { EventRegisterButton } from "./event-register-button";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
function parseEventId(slugOrId: string): number | null {
if (/^\d+$/.test(slugOrId)) return Number.parseInt(slugOrId, 10);
const match = slugOrId.match(/-(\d+)$/);
-4
View File
@@ -12,10 +12,6 @@ import {
import { excerpt, slugify } from "@/lib/format";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Events" };
export default async function EventsPage() {
-4
View File
@@ -6,10 +6,6 @@ import { CaptchaWidget } from "@/components/auth/captcha-widget";
import { ContentCard } from "@/components/public/ui";
import { captchaConfig } from "@/lib/services/captcha";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function ForgotPage({
searchParams,
}: {
-4
View File
@@ -10,10 +10,6 @@ import { db, MessengerFriendships, User } from "@/lib/db";
import { avatarImageUrl } from "@/lib/format";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Friends" };
type SearchParams = Promise<{ removed?: string; error?: string }>;
@@ -15,10 +15,6 @@ import {
} from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type SearchParams = Promise<{ replied?: string; error?: string }>;
function feedbackStyle(tone: "success" | "error"): CSSProperties {
@@ -8,10 +8,6 @@ import { ContentCard } from "@/components/public/ui";
import { auth } from "@/lib/auth";
import { db, Guilds } from "@/lib/db";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type SearchParams = Promise<{ error?: string }>;
function feedbackStyle(tone: "success" | "error"): CSSProperties {
@@ -7,10 +7,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
import { db, Guilds, GuildsForumsThreads, User } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type SearchParams = Promise<{ posted?: string }>;
function feedbackStyle(tone: "success" | "error"): CSSProperties {
-4
View File
@@ -8,10 +8,6 @@ import { avatarImageUrl } from "@/lib/format";
import { formatDate } from "@/lib/format-date";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type GuildView = {
id: number;
name: string;
-4
View File
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
import { db, Guilds } from "@/lib/db";
import { excerpt } from "@/lib/format";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Guilds" };
type GuildCard = {
-4
View File
@@ -8,10 +8,6 @@ import { db, WebsiteHelpCenterCategories } from "@/lib/db";
import { resolveHotelName } from "@/lib/hotel-name";
import { sanitize } from "@/lib/sanitize";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
// Asset path matches AtomCMS's Blade view: asset('/assets/images/help-center/<image_url>').
const HELP_IMAGE_BASE = "/assets/images/help-center";
-4
View File
@@ -9,10 +9,6 @@ import {
WebsiteRules,
} from "@/lib/db";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type HelpCategory = {
id: bigint;
name: string;
@@ -15,10 +15,6 @@ import {
} from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type SearchParams = Promise<{
replied?: string;
closed?: string;
-4
View File
@@ -9,10 +9,6 @@ import { auth } from "@/lib/auth";
import { db, WebsiteHelpCenterTickets } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type SearchParams = Promise<{ created?: string; error?: string }>;
function feedbackStyle(tone: "success" | "error"): CSSProperties {
-4
View File
@@ -7,10 +7,6 @@ import { SiteHeader } from "@/components/site-header";
import { TopHeader } from "@/components/top-header";
import { auth } from "@/lib/auth";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
/**
* Public site chrome. Route group `(site)` keeps this off `/admin` and `/client`,
* so housekeeping is never constrained by the public max-w-7xl grid.
-4
View File
@@ -6,10 +6,6 @@ import { db, User, UsersCurrency, UsersSettings } from "@/lib/db";
import { avatarImageUrl } from "@/lib/format";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Leaderboard" };
// Currency type ids (see UsersCurrency in src/db/schema.ts):
-4
View File
@@ -15,10 +15,6 @@ import { resolveHotelName } from "@/lib/hotel-name";
import { captchaConfig } from "@/lib/services/captcha";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function LoginPage() {
const t = await getTranslations("pages.login");
const th = await getTranslations("header");
-4
View File
@@ -2,10 +2,6 @@ import LogoGenerator from "@/components/public/logo-generator";
import { ContentCard } from "@/components/public/ui";
import { resolveHotelName } from "@/lib/hotel-name";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Logo generator" };
/**
-4
View File
@@ -3,10 +3,6 @@ import { ContentCard } from "@/components/public/ui";
import { resolveHotelName } from "@/lib/hotel-name";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function MaintenancePage() {
const t = await getTranslations("pages.maintenance");
const [hotel, message] = await Promise.all([
-4
View File
@@ -4,10 +4,6 @@ import { ContentCard, EmptyState, StatBlock } from "@/components/public/ui";
import { db, MarketplaceItems, User } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Marketplace" };
// state == 1 → an active, unsold offer in the Arcturus marketplace.
-4
View File
@@ -24,10 +24,6 @@ import { resolveHotelName } from "@/lib/hotel-name";
import { siteSettings } from "@/lib/services/site-settings";
import CopyReferralButton from "./CopyReferralButton";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "My dashboard" };
type SearchParams = Promise<{ claimed?: string; error?: string }>;
-4
View File
@@ -21,10 +21,6 @@ import { avatarImageUrl } from "@/lib/format";
import { formatDate } from "@/lib/format-date";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type SearchParams = Promise<{
accepted?: string;
declined?: string;
-4
View File
@@ -21,10 +21,6 @@ import { excerpt } from "@/lib/format";
import { formatDate } from "@/lib/format-date";
import { sanitize } from "@/lib/sanitize";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type SearchParams = Promise<{
comment?: string;
reaction?: string;
-4
View File
@@ -7,10 +7,6 @@ import { db, WebsiteArticles } from "@/lib/db";
import { excerpt } from "@/lib/format";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "News" };
export default async function NewsPage() {
-4
View File
@@ -21,10 +21,6 @@ import { resolveHotelName } from "@/lib/hotel-name";
import { captchaConfig } from "@/lib/services/captcha";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
async function getHotelData() {
const [hotelName, imagerRaw, logo] = await Promise.all([
resolveHotelName(),
-4
View File
@@ -8,10 +8,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
import { CameraWeb, db } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Photos" };
type Photo = {
-4
View File
@@ -13,10 +13,6 @@ import {
import { formatDate } from "@/lib/format-date";
import { PollVoteForm } from "./poll-vote-form";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function PollDetailPage({
params,
}: {
-4
View File
@@ -6,10 +6,6 @@ import { db, WebsitePoll, WebsitePollQuestion } from "@/lib/db";
import { excerpt } from "@/lib/format";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Polls" };
export default async function PollsPage() {
-4
View File
@@ -8,10 +8,6 @@ import { auth } from "@/lib/auth";
import { db, RadioApplications } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
function feedbackStyle(tone: "success" | "error"): CSSProperties {
const accent =
tone === "error" ? "var(--color-danger)" : "var(--color-primary)";
@@ -6,10 +6,6 @@ import { ContentCard } from "@/components/public/ui";
import { db, RadioContests } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function RadioContestDetailPage({
params,
}: {
-4
View File
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
import { db, RadioContests } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function RadioContestsPage() {
const t = await getTranslations("pages.radioContests");
@@ -6,10 +6,6 @@ import { ContentCard } from "@/components/public/ui";
import { db, RadioGiveaways } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function RadioGiveawayDetailPage({
params,
}: {
-4
View File
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
import { db, RadioGiveaways } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function RadioGiveawaysPage() {
const t = await getTranslations("pages.radioGiveaways");
-4
View File
@@ -2,10 +2,6 @@ import Link from "next/link";
import { getTranslations } from "next-intl/server";
import type { ReactNode } from "react";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
const RADIO_SIDEBAR_LINKS = [
{ key: "schedule", href: "/radio/schedule", icon: "🗓️" },
{ key: "shouts", href: "/radio/shouts", icon: "📣" },
@@ -6,10 +6,6 @@ import { db } from "@/lib/db";
import { avatarImageUrl } from "@/lib/format";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type LeaderRow = {
username: string;
look: string;
-4
View File
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState, OnlineBadge } from "@/components/public/ui";
import { db, RadioSchedules, User } from "@/lib/db";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
// Radio config + today's schedule are read live from the DB / settings table.
// Canonical weekday order so today's slots come out chronologically and we can
-4
View File
@@ -7,10 +7,6 @@ import { auth } from "@/lib/auth";
import { db, RadioSongRequests, User } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type SearchParams = Promise<{ posted?: string; error?: string }>;
function feedbackStyle(tone: "success" | "error"): CSSProperties {
-4
View File
@@ -3,10 +3,6 @@ import { getTranslations } from "next-intl/server";
import { ContentCard, EmptyState } from "@/components/public/ui";
import { db, RadioSchedules, User } from "@/lib/db";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
// Weekly order so the table reads Monday → Sunday regardless of insert order.
// The `day` column stores a free-form string; we key case-insensitively.
const DAYS = [
-4
View File
@@ -9,10 +9,6 @@ import { avatarImageUrl } from "@/lib/format";
import { formatDate } from "@/lib/format-date";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type SearchParams = Promise<{ posted?: string; error?: string }>;
function feedbackStyle(tone: "success" | "error"): CSSProperties {
-4
View File
@@ -12,10 +12,6 @@ import { db, User } from "@/lib/db";
import { avatarImageUrl } from "@/lib/format";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Rankings" };
type TopUser = {
-4
View File
@@ -6,10 +6,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
import { db, WebsiteRareValueCategories, WebsiteRareValues } from "@/lib/db";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type RareRow = {
id: bigint;
name: string;
-4
View File
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
import { db, WebsiteRareValueCategories, WebsiteRareValues } from "@/lib/db";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Rare values" };
type CategoryRow = {
-4
View File
@@ -6,10 +6,6 @@ import { auth } from "@/lib/auth";
import { db, User } from "@/lib/db";
import RedeemForm from "./RedeemForm";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function RedeemPage() {
const session = await auth();
if (!session?.user?.id) redirect("/login");
-4
View File
@@ -15,10 +15,6 @@ import { resolveHotelName } from "@/lib/hotel-name";
import { captchaConfig } from "@/lib/services/captcha";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function RegisterPage() {
const th = await getTranslations("header");
const tpr = await getTranslations("pages.register");
-4
View File
@@ -3,10 +3,6 @@ import { getTranslations } from "next-intl/server";
import { resetPassword } from "@/actions/password-reset";
import { ContentCard } from "@/components/public/ui";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function ResetPage({
searchParams,
}: {
-4
View File
@@ -5,10 +5,6 @@ import { notFound } from "next/navigation";
import { ContentCard, EmptyState, StatBlock } from "@/components/public/ui";
import { db, Rooms, User } from "@/lib/db";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
// Arcturus stores room access as a short string on rooms.state. Map each known
// value to a friendly label + lock icon; unknown values fall back to the raw
// string so we never hide a real (future) state from the visitor.
-4
View File
@@ -6,10 +6,6 @@ import { db, Rooms, User } from "@/lib/db";
import { avatarImageUrl } from "@/lib/format";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata: Metadata = { title: "Search" };
type SearchParams = Promise<{ q?: string }>;
-4
View File
@@ -15,10 +15,6 @@ import { totpKeyUri } from "@/lib/auth/totp";
import { db, User } from "@/lib/db";
import { resolveHotelName } from "@/lib/hotel-name";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function TwoFactorPage({
searchParams,
}: {
-4
View File
@@ -10,10 +10,6 @@ import { db, User } from "@/lib/db";
import { avatarImageUrl } from "@/lib/format";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function SettingsPage() {
const t = await getTranslations("pages.settings");
const session = await auth();
@@ -7,10 +7,6 @@ import { auth } from "@/lib/auth";
import { db, WebsiteLoginLogs } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type SearchParams = Promise<{ signedOutAll?: string }>;
/** Tiny user-agent → "Browser on OS" summary (no dependency). */
-4
View File
@@ -9,10 +9,6 @@ import { db, WebsiteShopArticles, WebsiteShopCategories } from "@/lib/db";
import { excerpt } from "@/lib/format";
import { creditsPerUnit } from "@/lib/services/paypal";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Shop" };
function feedbackStyle(tone: "success" | "error"): CSSProperties {
-4
View File
@@ -11,10 +11,6 @@ import {
} from "@/lib/services/paypal";
import TopUpForm from "./TopUpForm";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function TopUpPage({
searchParams,
}: {
-4
View File
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
import { db, User, WebsiteTeams } from "@/lib/db";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Staff" };
type StaffMember = {
-4
View File
@@ -28,10 +28,6 @@ import { avatarImageUrl } from "@/lib/format";
import { formatDate } from "@/lib/format-date";
import { siteSettings } from "@/lib/services/site-settings";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type SearchParams = Promise<{
friend?: string;
guestbook?: string;
-4
View File
@@ -5,10 +5,6 @@ import { getTranslations } from "next-intl/server";
import { isValidVerificationToken } from "@/actions/email-verify";
import { db, User } from "@/lib/db";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type Status = "verified" | "already" | "invalid" | "unavailable";
function StatusCard({
-4
View File
@@ -5,10 +5,6 @@ import { StatusCard } from "@/components/admin/dashboard";
import { Achievements, db } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type Achievement = {
name: string;
category: string;
-4
View File
@@ -9,10 +9,6 @@ import { db, WebsiteAds } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { EditAdDeleteButton } from "../edit-ad-delete-button";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function EditAd({
params,
}: {
-4
View File
@@ -5,10 +5,6 @@ import { createAd } from "@/actions/admin-ads";
import { Button } from "@/components/ui/button";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function NewAd() {
const { session, permissions } = await getAdminContext();
if (!canAccess(permissions, PERMS.PAGES_EDIT, session.user.rank)) {
-4
View File
@@ -9,10 +9,6 @@ import { formatDate } from "@/lib/format-date";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { AdsTable } from "./ads-table";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function AdminAds() {
const { session, permissions } = await getAdminContext();
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
-4
View File
@@ -8,10 +8,6 @@ import { AlertLogs, db } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
const CRITICAL = new Set(["critical", "error", "danger"]);
const WARNING = new Set(["warning", "warn"]);
@@ -8,10 +8,6 @@ import { Ban, db, User } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { redisCache } from "@/lib/redis-cache";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type DayRow = {
label: string;
chats: number;
-4
View File
@@ -16,10 +16,6 @@ import {
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { redisCache } from "@/lib/redis-cache";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type EconomyData = {
totalCredits: number;
totalPixels: number;
-4
View File
@@ -17,10 +17,6 @@ import { Ban, db, Rooms, RoomTradeLog, User } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { redisCache } from "@/lib/redis-cache";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type AnalyticsData = {
totalUsers: number;
onlineUsers: number;
-4
View File
@@ -9,10 +9,6 @@ import { db, User, WebsiteStaffApplications } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type ApplicationRow = {
id: bigint;
userId: number;
-4
View File
@@ -9,10 +9,6 @@ import { Button } from "@/components/ui/button";
import { db, WebsiteArticles } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function EditArticle({
params,
searchParams,
-4
View File
@@ -6,10 +6,6 @@ import { createArticle } from "@/actions/admin-articles";
import { ArticleForm } from "@/components/admin/article-form";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function NewArticle({
searchParams,
}: {
-4
View File
@@ -11,10 +11,6 @@ import { db, User, WebsiteArticles } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function AdminArticles({
searchParams,
}: {
-4
View File
@@ -7,10 +7,6 @@ import { Button } from "@/components/ui/button";
import { db, WebsiteBadges } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export const metadata = { title: "Badges" };
export default async function AdminBadges({
-4
View File
@@ -4,10 +4,6 @@ import { db, WebsiteBanner } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { BannersManager } from "./banners-manager";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function BannersPage() {
const { session, permissions } = await getAdminContext();
if (!canAccess(permissions, PERMS.BANNERS_VIEW, session.user.rank)) {
-4
View File
@@ -11,10 +11,6 @@ import { Ban, db } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function AdminBans() {
const { session, permissions } = await getAdminContext();
if (!canAccess(permissions, PERMS.BANS_VIEW, session.user.rank)) {
-4
View File
@@ -6,10 +6,6 @@ import { CalendarCampaigns, CalendarRewards, db } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type Campaign = {
id: number;
name: string;
-4
View File
@@ -7,10 +7,6 @@ import { CalendarCampaigns, CalendarRewards, db } from "@/lib/db";
import { formatDate } from "@/lib/format-date";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
type Campaign = {
id: number;
name: string;
-4
View File
@@ -9,10 +9,6 @@ import { loadCatalogItemsData } from "@/lib/services/catalog-items-loader";
import { getAncestors } from "@/lib/services/catalog-tree";
import { CatalogDetailTabs } from "./catalog-detail-tabs";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function CatalogEditPage({
params,
}: {
@@ -4,10 +4,6 @@ import { CatalogItemsBc, CatalogPagesBc, db } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { BcPageDetail } from "../bc-manager";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function BcPageDetailPage({
params: paramsPromise,
}: {
@@ -1,9 +1,5 @@
import { redirect } from "next/navigation";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default function BuilderClubPage() {
redirect("/admin/catalog?catalog=bc");
}
-4
View File
@@ -31,10 +31,6 @@ import { CatalogManagerDialog } from "./catalog-manager-dialog-wrapper";
import { CatalogTable } from "./catalog-table";
import { CatalogViewToggle } from "./catalog-view-toggle";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
async function rawRows<T>(query: ReturnType<typeof sql>): Promise<T[]> {
const [rows] = (await db.execute(query)) as unknown as [T[], unknown];
return rows ?? [];
-4
View File
@@ -18,10 +18,6 @@ import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { siteSettings } from "@/lib/services/site-settings";
import { CommandocentrumControls } from "./commandocentrum-controls";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
function decodeStacktrace(raw: unknown): string {
if (raw == null) return "";
try {
-4
View File
@@ -5,10 +5,6 @@ import { Card, CardContent } from "@/components/ui/card";
import { db, EmulatorErrors } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function EmulatorErrorsPage({
searchParams,
}: {
-4
View File
@@ -10,10 +10,6 @@ import { db, EmulatorErrors, EmulatorSettings } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { HealthCheckClient } from "./health-check-client";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
async function getDevOpsData() {
const now = Math.floor(Date.now() / 1000);
const dayAgo = now - 86400;
-4
View File
@@ -10,10 +10,6 @@ import { Button } from "@/components/ui/button";
import { db, EmailTemplates } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function AdminEmailTemplates() {
const { session, permissions } = await getAdminContext();
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
-4
View File
@@ -10,10 +10,6 @@ import { Button } from "@/components/ui/button";
import { db, EmulatorSettings, EmulatorTexts } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
const TEXTS_LIMIT = 300;
export default async function AdminEmulator() {
-4
View File
@@ -12,10 +12,6 @@ import { EventPrizesManager } from "./event-prizes";
import { EventRegistrations } from "./event-registrations";
import { EventWinnersManager } from "./event-winners";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function EventDetailPage({
params,
}: {
-4
View File
@@ -5,10 +5,6 @@ import { db, WebsiteEventType } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { EventForm } from "../event-form";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function CreateEventPage() {
const { session, permissions } = await getAdminContext();
if (!canAccess(permissions, PERMS.EVENTS_EDIT, session.user.rank)) {
-4
View File
@@ -7,10 +7,6 @@ import { db, WebsiteEvent, WebsiteEventType } from "@/lib/db";
import { PERMS } from "@/lib/permissions";
import { EventsTable } from "./events-table";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function EventsPage({
params: paramsPromise,
searchParams,
-4
View File
@@ -4,10 +4,6 @@ import { db, WebsiteEventType } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { EventTypesManager } from "./event-types-manager";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function EventTypesPage() {
const { session, permissions } = await getAdminContext();
if (!canAccess(permissions, PERMS.EVENTS_EDIT, session.user.rank)) {
-4
View File
@@ -4,10 +4,6 @@ import { db, WebsiteSetting } from "@/lib/db";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { FaviconForm } from "./favicon-form";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function AdminFaviconPage() {
const { session, permissions } = await getAdminContext();
if (!canAccess(permissions, PERMS.SETTINGS_VIEW, session.user.rank)) {
Loaded 100 of 274 files, more files were not shown because too many files have changed in this diff. Show more