Files
poli0981andClaude Opus 5 1910d61d08 feat(web)!: Cloudflare Worker platform, read-only app (v4 Phase 2)
BREAKING: the public web app has no sign-in anymore and uses real paths
(BrowserRouter); /add and /workflows are gone (admin comes in Phase 4).

Platform
- wrangler.jsonc: Worker (worker/index.ts) + static assets with SPA
  fallback; only /img/* and /api/* run the Worker. R2 binding THUMBS,
  `staging` env for the v4 pre-release Worker. worker-configuration.d.ts
  from `wrangler types` (checked in CI with --check).
- vite-plugins/catalog-data.ts bundles data_game + deleted log into
  dist/data (build fails on bad JSON / index mismatch), emits urls.json
  (thumbnail allow-list) and a real-path sitemap; version.json carries
  the build stamp so data-only rebuilds keep identical JS.
- Data is read same-origin from /data (Tauri: https://freeitchgames.win/data,
  CORS *); chunks load with allSettled.
- worker/img.ts: /img/<160|640>/<itch path> serves a WebP rendered once
  per image+width by Image Transformations and stored in R2 (edge cache
  → R2 → transform); catalog allow-list, fixed upstream host, hotlink
  block, streamed original on transform failure, 403/404 upstream → 404.
  15 vitest cases.
- Enforced CSP (same-origin + Web Analytics/Turnstile), cache headers for
  /assets, /data, og/icons; security.txt; robots disallows /api, /admin.

App
- Remove PAT/GPG sign-in, bulk edit/delete, undo, workflow dispatch,
  Octokit and OpenPGP (and ~220 write-path i18n keys); Settings keeps
  language/theme/density/notifications only.
- react-router 8 (unified package), React 19.3, TanStack/Recharts/etc.
  minors, Vite 8 rolldown codeSplitting groups; legacy #/ links are
  rewritten to paths; old PAT/GPG localStorage keys are cleared; reload
  once on vite:preloadError after a deploy.
- GameThumb uses the /img proxy (referrerPolicy no-referrer, N/A-safe).

Tauri
- Real CSP, drop the unused http plugin + capability, read-only
  descriptions, rust-version 1.88, drop the time pin, commit Cargo.lock.

Also: remove the GitHub Pages redirect workflow/stub (deployed by v4
Phase 0); add scripts/i18n-edit.mjs (TS-parser based key maintenance for
en.ts/vi.ts).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 17:54:49 +07:00

36 lines
1.1 KiB
JavaScript

import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
globalIgnores(['dist', '.wrangler', 'worker-configuration.d.ts']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
globals: globals.browser,
},
rules: {
// TanStack Table's useReactTable returns functions that can't be
// memoized — the React Compiler warning is not actionable here.
'react-hooks/incompatible-library': 'off',
},
},
{
// shadcn/ui primitives intentionally mix component and variant/
// constant exports; the rule can't be satisfied without forking them.
files: ['src/components/ui/**'],
rules: {
'react-refresh/only-export-components': 'off',
},
},
])