mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
- Fix "Cannot access 'a' before initialization" TDZ error after login caused by manualChunks splitting react-vendor + lucide icons into circular ES-module chunks. Removed manualChunks entirely. - Replace `import * as icons from "lucide-react"` (pulls all ~1000 icons) with a targeted icon-map of ~50 icons actually used by tool definitions. Reduces shared icons chunk from 745KB to 62KB (132KB→16KB gzip). - Exclude static files from @fastify/rate-limit via allowList so rapid page navigations don't 429 on JS/CSS chunk requests. - Move Docker auth defaults (AUTH_ENABLED, DEFAULT_USERNAME, DEFAULT_PASSWORD) from Dockerfile ENV to entrypoint.sh runtime exports to avoid SecretsUsedInArgOrEnv warnings. - Fix Docker CMD to use pnpm --filter for workspace-scoped tsx binary. - Set COREPACK_HOME system-wide so non-root user can access pnpm cache. - Lazy-load all pages in App.tsx and all controls in pipeline-step-settings.tsx to keep main bundle under 300KB.
107 lines
1.4 KiB
TypeScript
107 lines
1.4 KiB
TypeScript
import type { LucideIcon } from "lucide-react";
|
|
import {
|
|
CheckCircle2,
|
|
Code,
|
|
Columns,
|
|
Columns2,
|
|
Copy,
|
|
Crop,
|
|
Eraser,
|
|
Eye,
|
|
EyeOff,
|
|
FileEdit,
|
|
FileImage,
|
|
FileOutput,
|
|
FileText,
|
|
FileType,
|
|
Film,
|
|
Focus,
|
|
FolderInput,
|
|
Frame,
|
|
Globe,
|
|
Grid3x3,
|
|
Image,
|
|
Info,
|
|
Layers,
|
|
LayoutGrid,
|
|
Maximize2,
|
|
Minimize2,
|
|
Palette,
|
|
PenLine,
|
|
PenTool,
|
|
Pipette,
|
|
QrCode,
|
|
RotateCw,
|
|
ScanFace,
|
|
ScanLine,
|
|
ScanText,
|
|
ShieldOff,
|
|
SlidersHorizontal,
|
|
Sparkles,
|
|
Stamp,
|
|
Star,
|
|
TextCursorInput,
|
|
Type,
|
|
Undo2,
|
|
UserCheck,
|
|
Wand2,
|
|
Workflow,
|
|
Wrench,
|
|
Zap,
|
|
ZoomIn,
|
|
} from "lucide-react";
|
|
|
|
// Only the icons actually used by tool definitions in @ashim/shared constants.
|
|
// Avoids `import * as icons from "lucide-react"` which pulls the entire 1000+ icon library.
|
|
export const ICON_MAP: Record<string, LucideIcon> = {
|
|
CheckCircle2,
|
|
Code,
|
|
Columns,
|
|
Columns2,
|
|
Copy,
|
|
Crop,
|
|
Eraser,
|
|
Eye,
|
|
EyeOff,
|
|
FileEdit,
|
|
FileImage,
|
|
FileOutput,
|
|
FileText,
|
|
FileType,
|
|
Film,
|
|
Focus,
|
|
FolderInput,
|
|
Frame,
|
|
Globe,
|
|
Grid3x3,
|
|
Image,
|
|
Info,
|
|
LayoutGrid,
|
|
Layers,
|
|
Maximize2,
|
|
Minimize2,
|
|
Palette,
|
|
PenLine,
|
|
PenTool,
|
|
Pipette,
|
|
QrCode,
|
|
RotateCw,
|
|
ScanFace,
|
|
ScanLine,
|
|
ScanText,
|
|
ShieldOff,
|
|
SlidersHorizontal,
|
|
Sparkles,
|
|
Stamp,
|
|
Star,
|
|
TextCursorInput,
|
|
Type,
|
|
Undo2,
|
|
UserCheck,
|
|
Wand2,
|
|
Workflow,
|
|
Wrench,
|
|
Zap,
|
|
ZoomIn,
|
|
};
|