diff --git a/client/src/components/features/mobile-layout.tsx b/client/src/components/features/mobile-layout.tsx index c8254edb..57610edc 100644 --- a/client/src/components/features/mobile-layout.tsx +++ b/client/src/components/features/mobile-layout.tsx @@ -6,7 +6,7 @@ import clsx from "clsx"; export type MobilePanel = "code" | "compile" | "serial" | "board" | null; -export interface MobileLayoutProps { +interface MobileLayoutProps { isMobile: boolean; mobilePanel: MobilePanel; setMobilePanel: React.Dispatch>; diff --git a/client/src/components/features/output-panel.tsx b/client/src/components/features/output-panel.tsx index d0f90dff..d190fbb9 100644 --- a/client/src/components/features/output-panel.tsx +++ b/client/src/components/features/output-panel.tsx @@ -9,9 +9,9 @@ import clsx from "clsx"; import type { ParserMessage, IOPinRecord } from "@shared/schema"; import type { DebugMessage } from "@/hooks/use-debug-console"; -export type OutputTab = "compiler" | "messages" | "registry" | "debug"; +type OutputTab = "compiler" | "messages" | "registry" | "debug"; -export interface OutputPanelProps { +interface OutputPanelProps { /* State */ activeOutputTab: OutputTab; showCompilationOutput: boolean; diff --git a/client/src/components/ui/button.tsx b/client/src/components/ui/button.tsx index 1b88629b..644d09ff 100644 --- a/client/src/components/ui/button.tsx +++ b/client/src/components/ui/button.tsx @@ -34,7 +34,7 @@ const buttonVariants = cva( }, ); -export interface ButtonProps +interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps { diff --git a/client/src/components/ui/input-group.tsx b/client/src/components/ui/input-group.tsx index f3777d23..70d29510 100644 --- a/client/src/components/ui/input-group.tsx +++ b/client/src/components/ui/input-group.tsx @@ -3,7 +3,7 @@ import { cn } from "@/lib/utils"; import { SendHorizontal } from "lucide-react"; import { Button } from "@/components/ui/button"; -export interface InputGroupProps extends React.InputHTMLAttributes { +interface InputGroupProps extends React.InputHTMLAttributes { onSubmit?: () => void; inputTestId?: string; buttonTestId?: string; diff --git a/client/src/hooks/use-compilation.ts b/client/src/hooks/use-compilation.ts index 65a4d6f4..6301d668 100644 --- a/client/src/hooks/use-compilation.ts +++ b/client/src/hooks/use-compilation.ts @@ -3,11 +3,8 @@ import { useRef, useEffect } from "react"; import type { MutableRefObject } from "react"; import type { SetState } from "./use-compile-and-run"; -// original alias kept for compatibility (rare external refs) -export type UseCompileAndRunParams = CompileAndRunParams; - // compilation-only parameters (simulation inputs are injected with no-ops) -export type UseCompilationParams = Omit< +type UseCompilationParams = Omit< CompileAndRunParams, | "serialEventQueueRef" diff --git a/client/src/hooks/use-compile-and-run.ts b/client/src/hooks/use-compile-and-run.ts index 7d0fe8c9..c81075d8 100644 --- a/client/src/hooks/use-compile-and-run.ts +++ b/client/src/hooks/use-compile-and-run.ts @@ -1,7 +1,7 @@ import { useCallback, useRef, useState } from "react"; // Local copy of the structured error type returned from backend -export interface CompilationError { +interface CompilationError { file: string; line: number; column: number; @@ -16,13 +16,13 @@ import type { IOPinRecord, ParserMessage } from "@shared/schema"; import { useSimulationLifecycle } from "./use-simulation-lifecycle"; // status types -export type CompilationStatus = "ready" | "compiling" | "success" | "error"; +type CompilationStatus = "ready" | "compiling" | "success" | "error"; const logger = new Logger("useCompileAndRun"); // reused helpers from previous hooks -export type SimulationStatus = "running" | "stopped" | "paused"; -export type CliStatus = "idle" | "compiling" | "success" | "error"; +type SimulationStatus = "running" | "stopped" | "paused"; +type CliStatus = "idle" | "compiling" | "success" | "error"; export type SetState = (value: T | ((prev: T) => T)) => void; @@ -69,7 +69,7 @@ export type CompileAndRunParams = { startSimulationRef?: MutableRefObject<(() => void) | null>; }; -export interface UseCompileAndRunResult { +interface UseCompileAndRunResult { /* compilation state & helpers */ compilationStatus: CompilationStatus; setCompilationStatus: SetState; diff --git a/client/src/hooks/use-editor-commands.ts b/client/src/hooks/use-editor-commands.ts index c7b0001e..fe19c891 100644 --- a/client/src/hooks/use-editor-commands.ts +++ b/client/src/hooks/use-editor-commands.ts @@ -2,14 +2,14 @@ import { useCallback } from "react"; import type { RefObject } from "react"; import type { ToastFn } from "@/hooks/use-toast"; -export interface EditorCommandsOptions { +interface EditorCommandsOptions { toast?: ToastFn; suppressAutoStopOnce?: () => void; code?: string; setCode?: React.Dispatch>; } -export interface EditorCommandsAPI { +interface EditorCommandsAPI { undo: () => void; redo: () => void; find: () => void; diff --git a/client/src/hooks/use-file-manager.ts b/client/src/hooks/use-file-manager.ts index 8f57bf5e..1e69978b 100644 --- a/client/src/hooks/use-file-manager.ts +++ b/client/src/hooks/use-file-manager.ts @@ -1,8 +1,8 @@ import { useRef, useCallback, useState } from "react"; -export type FileEntry = { name: string; content: string }; +type FileEntry = { name: string; content: string }; -export interface UseFileManagerOptions { +interface UseFileManagerOptions { tabs?: Array<{ name: string; content: string }>; onFilesLoaded?: (files: FileEntry[], replaceAll: boolean) => void; toast?: (params: { title: string; description?: string; variant?: string }) => void; diff --git a/client/src/hooks/use-pin-state.ts b/client/src/hooks/use-pin-state.ts index 0b1ae28e..0ecea07d 100644 --- a/client/src/hooks/use-pin-state.ts +++ b/client/src/hooks/use-pin-state.ts @@ -1,6 +1,6 @@ import { useState, useEffect, useCallback } from "react"; -export interface UsePinStateParams { +interface UsePinStateParams { resetPinStates: () => void; } diff --git a/client/src/hooks/use-simulation-lifecycle.ts b/client/src/hooks/use-simulation-lifecycle.ts index abad4cdd..533d9aba 100644 --- a/client/src/hooks/use-simulation-lifecycle.ts +++ b/client/src/hooks/use-simulation-lifecycle.ts @@ -1,6 +1,6 @@ import { useEffect, useRef, useCallback } from "react"; -export interface UseSimulationLifecycleOptions { +interface UseSimulationLifecycleOptions { code: string; simulationStatus: string; setSimulationStatus: (s: any) => void; diff --git a/client/src/hooks/use-simulation.ts b/client/src/hooks/use-simulation.ts index bcacb108..7d14c45b 100644 --- a/client/src/hooks/use-simulation.ts +++ b/client/src/hooks/use-simulation.ts @@ -2,18 +2,14 @@ import { useRef } from "react"; import { useSimulationControls, UseSimulationControlsParams, SimulationStatus } from "./use-simulation-controls"; import { useSimulationLifecycle } from "./use-simulation-lifecycle"; -// re-export types so callers (including tests) can reference them easily -export type { - SimulationStatus, - DebugMessageParams, -} from "./use-simulation-controls"; +// re-export types removed (unused exports per knip) // The hook accepts the same parameters as `useSimulationControls` plus a few // extras that are required by the lifecycle automation. A parent may also // provide an optional `startSimulationRef` so it can invoke the start action // before the hook itself is instantiated (used by the page when wiring up // the compilation hook). -export type UseSimulationParams = UseSimulationControlsParams & { +type UseSimulationParams = UseSimulationControlsParams & { startSimulationRef?: React.MutableRefObject<(() => void) | null>; // forwarded to lifecycle hook code: string; @@ -24,7 +20,7 @@ export type UseSimulationParams = UseSimulationControlsParams & { hasCompilationErrors?: boolean; }; -export interface UseSimulationResult { +interface UseSimulationResult { // state values (mirrors useSimulationControls) simulationStatus: SimulationStatus; setSimulationStatus: React.Dispatch>; diff --git a/client/src/hooks/use-sketch-analysis.ts b/client/src/hooks/use-sketch-analysis.ts index 8237f00f..346e4779 100644 --- a/client/src/hooks/use-sketch-analysis.ts +++ b/client/src/hooks/use-sketch-analysis.ts @@ -1,8 +1,8 @@ import { useMemo } from "react"; -export type PinMode = "INPUT" | "OUTPUT" | "INPUT_PULLUP"; +type PinMode = "INPUT" | "OUTPUT" | "INPUT_PULLUP"; -export interface SketchAnalysisResult { +interface SketchAnalysisResult { analogPins: number[]; // concrete Arduino pin numbers (A0 -> 14) varMap: Record; detectedPinModes: Record; diff --git a/client/src/hooks/use-sketch-tabs.ts b/client/src/hooks/use-sketch-tabs.ts index 8f9ab630..4e20ccfb 100644 --- a/client/src/hooks/use-sketch-tabs.ts +++ b/client/src/hooks/use-sketch-tabs.ts @@ -1,6 +1,6 @@ import { useState, useCallback } from "react"; -export interface SketchTab { +interface SketchTab { id: string; name: string; content: string; diff --git a/client/src/lib/compilation-error-state.ts b/client/src/lib/compilation-error-state.ts index a78c78dc..6ddb87cd 100644 --- a/client/src/lib/compilation-error-state.ts +++ b/client/src/lib/compilation-error-state.ts @@ -1,6 +1,4 @@ -export type OutputTab = "compiler" | "messages" | "registry" | "debug"; - -export interface GccCompilationErrorState { +interface GccCompilationErrorState { cliOutput: string; hasCompilationErrors: true; lastCompilationResult: "error"; diff --git a/client/src/lib/websocket-manager.ts b/client/src/lib/websocket-manager.ts index ff0e7f97..a1c2f94e 100644 --- a/client/src/lib/websocket-manager.ts +++ b/client/src/lib/websocket-manager.ts @@ -22,7 +22,7 @@ const logger = new Logger("WebSocketManager"); export type ConnectionState = "connecting" | "connected" | "disconnected" | "reconnecting"; // Event types emitted by the manager -export interface WSManagerEvents { +interface WSManagerEvents { stateChange: (state: ConnectionState) => void; message: (data: WSMessage) => void; error: (error: string) => void; diff --git a/knip.json b/knip.json index 64660b3e..0967ef42 100644 --- a/knip.json +++ b/knip.json @@ -1,6 +1 @@ -{ - "ignore": [ - "server/services/workers/compile-worker.ts", - "tests/MockFactory.ts" - ] -} \ No newline at end of file +{} diff --git a/package-lock.json b/package-lock.json index 400b4362..f19dd4d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,7 @@ "helmet": "^8.1.0", "lucide-react": "^0.453.0", "monaco-editor": "^0.53.0", + "nanoid": "^5.1.6", "react": "^18.3.1", "react-dom": "^18.3.1", "react-resizable-panels": "^2.1.7", @@ -41,7 +42,6 @@ "@commitlint/config-conventional": "^20.4.1", "@playwright/test": "^1.57.0", "@tailwindcss/typography": "^0.5.15", - "@tailwindcss/vite": "^4.1.3", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.9.1", "@testing-library/react": "^16.3.2", @@ -57,7 +57,6 @@ "@vitest/coverage-v8": "^4.1.0", "@vitest/ui": "^4.1.0", "autoprefixer": "^10.4.20", - "baseline-browser-mapping": "^2.9.19", "concurrently": "^9.2.1", "esbuild": "^0.25.0", "eslint": "^10.0.1", @@ -65,8 +64,6 @@ "jsdom": "^27.0.0", "knip": "^5.86.0", "lint-staged": "^16.2.7", - "pixelmatch": "^7.1.0", - "pngjs": "^7.0.0", "postcss": "^8.4.47", "prettier": "^3.8.1", "tailwindcss": "^3.4.17", @@ -3355,282 +3352,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@tailwindcss/node": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.2.1.tgz", - "integrity": "sha512-jlx6sLk4EOwO6hHe1oCGm1Q4AN/s0rSrTTPBGPM0/RQ6Uylwq17FuU8IeJJKEjtc6K6O07zsvP+gDO6MMWo7pg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/remapping": "^2.3.5", - "enhanced-resolve": "^5.19.0", - "jiti": "^2.6.1", - "lightningcss": "1.31.1", - "magic-string": "^0.30.21", - "source-map-js": "^1.2.1", - "tailwindcss": "4.2.1" - } - }, - "node_modules/@tailwindcss/node/node_modules/tailwindcss": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.2.1.tgz", - "integrity": "sha512-/tBrSQ36vCleJkAOsy9kbNTgaxvGbyOamC30PRePTQe/o1MFwEKHQk4Cn7BNGaPtjp+PuUrByJehM1hgxfq4sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tailwindcss/oxide": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.2.1.tgz", - "integrity": "sha512-yv9jeEFWnjKCI6/T3Oq50yQEOqmpmpfzG1hcZsAOaXFQPfzWprWrlHSdGPEF3WQTi8zu8ohC9Mh9J470nT5pUw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20" - }, - "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.2.1", - "@tailwindcss/oxide-darwin-arm64": "4.2.1", - "@tailwindcss/oxide-darwin-x64": "4.2.1", - "@tailwindcss/oxide-freebsd-x64": "4.2.1", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.2.1", - "@tailwindcss/oxide-linux-arm64-gnu": "4.2.1", - "@tailwindcss/oxide-linux-arm64-musl": "4.2.1", - "@tailwindcss/oxide-linux-x64-gnu": "4.2.1", - "@tailwindcss/oxide-linux-x64-musl": "4.2.1", - "@tailwindcss/oxide-wasm32-wasi": "4.2.1", - "@tailwindcss/oxide-win32-arm64-msvc": "4.2.1", - "@tailwindcss/oxide-win32-x64-msvc": "4.2.1" - } - }, - "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.2.1.tgz", - "integrity": "sha512-eZ7G1Zm5EC8OOKaesIKuw77jw++QJ2lL9N+dDpdQiAB/c/B2wDh0QPFHbkBVrXnwNugvrbJFk1gK2SsVjwWReg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.2.1.tgz", - "integrity": "sha512-q/LHkOstoJ7pI1J0q6djesLzRvQSIfEto148ppAd+BVQK0JYjQIFSK3JgYZJa+Yzi0DDa52ZsQx2rqytBnf8Hw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.2.1.tgz", - "integrity": "sha512-/f/ozlaXGY6QLbpvd/kFTro2l18f7dHKpB+ieXz+Cijl4Mt9AI2rTrpq7V+t04nK+j9XBQHnSMdeQRhbGyt6fw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.2.1.tgz", - "integrity": "sha512-5e/AkgYJT/cpbkys/OU2Ei2jdETCLlifwm7ogMC7/hksI2fC3iiq6OcXwjibcIjPung0kRtR3TxEITkqgn0TcA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.2.1.tgz", - "integrity": "sha512-Uny1EcVTTmerCKt/1ZuKTkb0x8ZaiuYucg2/kImO5A5Y/kBz41/+j0gxUZl+hTF3xkWpDmHX+TaWhOtba2Fyuw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.2.1.tgz", - "integrity": "sha512-CTrwomI+c7n6aSSQlsPL0roRiNMDQ/YzMD9EjcR+H4f0I1SQ8QqIuPnsVp7QgMkC1Qi8rtkekLkOFjo7OlEFRQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.2.1.tgz", - "integrity": "sha512-WZA0CHRL/SP1TRbA5mp9htsppSEkWuQ4KsSUumYQnyl8ZdT39ntwqmz4IUHGN6p4XdSlYfJwM4rRzZLShHsGAQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.2.1.tgz", - "integrity": "sha512-qMFzxI2YlBOLW5PhblzuSWlWfwLHaneBE0xHzLrBgNtqN6mWfs+qYbhryGSXQjFYB1Dzf5w+LN5qbUTPhW7Y5g==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.2.1.tgz", - "integrity": "sha512-5r1X2FKnCMUPlXTWRYpHdPYUY6a1Ar/t7P24OuiEdEOmms5lyqjDRvVY1yy9Rmioh+AunQ0rWiOTPE8F9A3v5g==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.2.1.tgz", - "integrity": "sha512-MGFB5cVPvshR85MTJkEvqDUnuNoysrsRxd6vnk1Lf2tbiqNlXpHYZqkqOQalydienEWOHHFyyuTSYRsLfxFJ2Q==", - "bundleDependencies": [ - "@napi-rs/wasm-runtime", - "@emnapi/core", - "@emnapi/runtime", - "@tybys/wasm-util", - "@emnapi/wasi-threads", - "tslib" - ], - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "^1.8.1", - "@emnapi/runtime": "^1.8.1", - "@emnapi/wasi-threads": "^1.1.0", - "@napi-rs/wasm-runtime": "^1.1.1", - "@tybys/wasm-util": "^0.10.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.2.1.tgz", - "integrity": "sha512-YlUEHRHBGnCMh4Nj4GnqQyBtsshUPdiNroZj8VPkvTZSoHsilRCwXcVKnG9kyi0ZFAS/3u+qKHBdDc81SADTRA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.2.1.tgz", - "integrity": "sha512-rbO34G5sMWWyrN/idLeVxAZgAKWrn5LiR3/I90Q9MkA67s6T1oB0xtTe+0heoBvHSpbU9Mk7i6uwJnpo4u21XQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 20" - } - }, "node_modules/@tailwindcss/typography": { "version": "0.5.19", "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.19.tgz", @@ -3644,28 +3365,6 @@ "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" } }, - "node_modules/@tailwindcss/vite": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.2.1.tgz", - "integrity": "sha512-TBf2sJjYeb28jD2U/OhwdW0bbOsxkWPwQ7SrqGf9sVcoYwZj7rkXljroBO9wKBut9XnmQLXanuDUeqQK0lGg/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tailwindcss/node": "4.2.1", - "@tailwindcss/oxide": "4.2.1", - "tailwindcss": "4.2.1" - }, - "peerDependencies": { - "vite": "^5.2.0 || ^6 || ^7" - } - }, - "node_modules/@tailwindcss/vite/node_modules/tailwindcss": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.2.1.tgz", - "integrity": "sha512-/tBrSQ36vCleJkAOsy9kbNTgaxvGbyOamC30PRePTQe/o1MFwEKHQk4Cn7BNGaPtjp+PuUrByJehM1hgxfq4sw==", - "dev": true, - "license": "MIT" - }, "node_modules/@tanstack/query-core": { "version": "5.90.20", "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.90.20.tgz", @@ -5701,16 +5400,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, "node_modules/detect-node-es": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", @@ -5802,20 +5491,6 @@ "node": ">= 0.8" } }, - "node_modules/enhanced-resolve": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.20.0.tgz", - "integrity": "sha512-/ce7+jQ1PQ6rVXwe+jKEg5hW5ciicHwIQUagZkp6IufBoY3YDgdTTY1azVs0qoRgVmvsNB+rbjLJxDAeHHtwsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.3.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/entities": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", @@ -6738,13 +6413,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -7364,279 +7032,6 @@ "node": ">= 0.8.0" } }, - "node_modules/lightningcss": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.31.1.tgz", - "integrity": "sha512-l51N2r93WmGUye3WuFoN5k10zyvrVs0qfKBhyC5ogUQ6Ew6JUSswh78mbSO+IU3nTWsyOArqPCcShdQSadghBQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.31.1", - "lightningcss-darwin-arm64": "1.31.1", - "lightningcss-darwin-x64": "1.31.1", - "lightningcss-freebsd-x64": "1.31.1", - "lightningcss-linux-arm-gnueabihf": "1.31.1", - "lightningcss-linux-arm64-gnu": "1.31.1", - "lightningcss-linux-arm64-musl": "1.31.1", - "lightningcss-linux-x64-gnu": "1.31.1", - "lightningcss-linux-x64-musl": "1.31.1", - "lightningcss-win32-arm64-msvc": "1.31.1", - "lightningcss-win32-x64-msvc": "1.31.1" - } - }, - "node_modules/lightningcss-android-arm64": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.31.1.tgz", - "integrity": "sha512-HXJF3x8w9nQ4jbXRiNppBCqeZPIAfUo8zE/kOEGbW5NZvGc/K7nMxbhIr+YlFlHW5mpbg/YFPdbnCh1wAXCKFg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.31.1.tgz", - "integrity": "sha512-02uTEqf3vIfNMq3h/z2cJfcOXnQ0GRwQrkmPafhueLb2h7mqEidiCzkE4gBMEH65abHRiQvhdcQ+aP0D0g67sg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.31.1.tgz", - "integrity": "sha512-1ObhyoCY+tGxtsz1lSx5NXCj3nirk0Y0kB/g8B8DT+sSx4G9djitg9ejFnjb3gJNWo7qXH4DIy2SUHvpoFwfTA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.31.1.tgz", - "integrity": "sha512-1RINmQKAItO6ISxYgPwszQE1BrsVU5aB45ho6O42mu96UiZBxEXsuQ7cJW4zs4CEodPUioj/QrXW1r9pLUM74A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.31.1.tgz", - "integrity": "sha512-OOCm2//MZJ87CdDK62rZIu+aw9gBv4azMJuA8/KB74wmfS3lnC4yoPHm0uXZ/dvNNHmnZnB8XLAZzObeG0nS1g==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.31.1.tgz", - "integrity": "sha512-WKyLWztD71rTnou4xAD5kQT+982wvca7E6QoLpoawZ1gP9JM0GJj4Tp5jMUh9B3AitHbRZ2/H3W5xQmdEOUlLg==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.31.1.tgz", - "integrity": "sha512-mVZ7Pg2zIbe3XlNbZJdjs86YViQFoJSpc41CbVmKBPiGmC4YrfeOyz65ms2qpAobVd7WQsbW4PdsSJEMymyIMg==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.31.1.tgz", - "integrity": "sha512-xGlFWRMl+0KvUhgySdIaReQdB4FNudfUTARn7q0hh/V67PVGCs3ADFjw+6++kG1RNd0zdGRlEKa+T13/tQjPMA==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.31.1.tgz", - "integrity": "sha512-eowF8PrKHw9LpoZii5tdZwnBcYDxRw2rRCyvAXLi34iyeYfqCQNA9rmUM0ce62NlPhCvof1+9ivRaTY6pSKDaA==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.31.1.tgz", - "integrity": "sha512-aJReEbSEQzx1uBlQizAOBSjcmr9dCdL3XuC/6HLXAxmtErsj2ICo5yYggg1qOODQMtnjNQv2UHb9NpOuFtYe4w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.31.1.tgz", - "integrity": "sha512-I9aiFrbd7oYHwlnQDqr1Roz+fTz61oDDJX7n9tYF9FJymH1cIN1DtKw3iYt6b8WZgEjoNwVSncwF4wx/ZedMhw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, "node_modules/lilconfig": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", @@ -8105,9 +7500,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.6.tgz", + "integrity": "sha512-c7+7RQ+dMB5dPwwCp4ee1/iV/q2P6aK1mTZcfr1BTuVlyW9hJYiMPybJCcnBlQtuSmTIWNeazm/zqNoZSSElBg==", "funding": [ { "type": "github", @@ -8116,10 +7511,10 @@ ], "license": "MIT", "bin": { - "nanoid": "bin/nanoid.cjs" + "nanoid": "bin/nanoid.js" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": "^18 || >=20" } }, "node_modules/natural-compare": { @@ -8446,19 +7841,6 @@ "node": ">= 6" } }, - "node_modules/pixelmatch": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-7.1.0.tgz", - "integrity": "sha512-1wrVzJ2STrpmONHKBy228LM1b84msXDUoAzVEl0R8Mz4Ce6EPr+IVtxm8+yvrqLYMHswREkjYFaMxnyGnaY3Ng==", - "dev": true, - "license": "ISC", - "dependencies": { - "pngjs": "^7.0.0" - }, - "bin": { - "pixelmatch": "bin/pixelmatch" - } - }, "node_modules/playwright": { "version": "1.58.2", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz", @@ -8491,16 +7873,6 @@ "node": ">=18" } }, - "node_modules/pngjs": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-7.0.0.tgz", - "integrity": "sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.19.0" - } - }, "node_modules/postcss": { "version": "8.5.8", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", @@ -8671,6 +8043,24 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "license": "MIT" }, + "node_modules/postcss/node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -9831,20 +9221,6 @@ "node": ">=4" } }, - "node_modules/tapable": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", - "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/terser": { "version": "5.46.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.46.0.tgz", diff --git a/package.json b/package.json index 821ea052..8101466c 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "helmet": "^8.1.0", "lucide-react": "^0.453.0", "monaco-editor": "^0.53.0", + "nanoid": "^5.1.6", "react": "^18.3.1", "react-dom": "^18.3.1", "react-resizable-panels": "^2.1.7", @@ -69,7 +70,6 @@ "@commitlint/config-conventional": "^20.4.1", "@playwright/test": "^1.57.0", "@tailwindcss/typography": "^0.5.15", - "@tailwindcss/vite": "^4.1.3", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.9.1", "@testing-library/react": "^16.3.2", @@ -85,7 +85,6 @@ "@vitest/coverage-v8": "^4.1.0", "@vitest/ui": "^4.1.0", "autoprefixer": "^10.4.20", - "baseline-browser-mapping": "^2.9.19", "concurrently": "^9.2.1", "esbuild": "^0.25.0", "eslint": "^10.0.1", @@ -93,8 +92,6 @@ "jsdom": "^27.0.0", "knip": "^5.86.0", "lint-staged": "^16.2.7", - "pixelmatch": "^7.1.0", - "pngjs": "^7.0.0", "postcss": "^8.4.47", "prettier": "^3.8.1", "tailwindcss": "^3.4.17", diff --git a/server/routes/compiler.routes.ts b/server/routes/compiler.routes.ts index 7555f0f5..26ac8027 100644 --- a/server/routes/compiler.routes.ts +++ b/server/routes/compiler.routes.ts @@ -3,7 +3,7 @@ import type { CompilationResult } from "../services/arduino-compiler"; import type { CompileRequestOptions } from "../services/arduino-compiler"; import type { Logger } from "@shared/logger"; -export type CompilerDeps = { +type CompilerDeps = { compiler: { compile: (code: string, headers?: any[], tempRoot?: string, options?: CompileRequestOptions) => Promise; }; diff --git a/server/routes/simulation.ws.ts b/server/routes/simulation.ws.ts index b3bc586c..1014a7e4 100644 --- a/server/routes/simulation.ws.ts +++ b/server/routes/simulation.ws.ts @@ -8,7 +8,7 @@ import path from "path"; import { constants as zlibConstants } from "zlib"; import { writeFile, access } from "fs/promises"; -export type SimulationDeps = { +type SimulationDeps = { SandboxRunner: typeof SandboxRunner; getSimulationRateLimiter: () => { checkLimit: (ws: WebSocket) => { allowed: boolean; retryAfter?: number }; removeClient: (ws: WebSocket) => void }; shouldSendSimulationEndMessage: (compileFailed: boolean) => boolean; diff --git a/server/services/arduino-output-parser.ts b/server/services/arduino-output-parser.ts index 9bb2a696..79ae0c96 100644 --- a/server/services/arduino-output-parser.ts +++ b/server/services/arduino-output-parser.ts @@ -9,7 +9,7 @@ const logger = new Logger("ArduinoOutputParser"); /** * Parsed stderr output types (discriminated union for type safety) */ -export type ParsedStderrOutput = +type ParsedStderrOutput = | { type: "serial_event"; timestamp: number; data: string } | { type: "registry_start" } | { type: "registry_end" } diff --git a/server/services/compilation-worker-pool.ts b/server/services/compilation-worker-pool.ts index f6266be7..a79f00cc 100644 --- a/server/services/compilation-worker-pool.ts +++ b/server/services/compilation-worker-pool.ts @@ -37,7 +37,7 @@ export type CompilationTask = CompileRequestPayload; /** * Statistic tracking for monitoring pool health */ -export interface PoolStats { +interface PoolStats { activeWorkers: number; totalTasks: number; completedTasks: number; diff --git a/server/services/docker-command-builder.ts b/server/services/docker-command-builder.ts index d4fbf29d..a5bc0d52 100644 --- a/server/services/docker-command-builder.ts +++ b/server/services/docker-command-builder.ts @@ -7,7 +7,7 @@ import { realpathSync } from "fs"; * security constraints and resource limits for Arduino sketch execution. */ -export interface DockerRunOptions { +interface DockerRunOptions { sketchDir: string; memoryMB: number; cpuLimit: string; diff --git a/server/services/pin-state-batcher.ts b/server/services/pin-state-batcher.ts index 8006a883..1839e360 100644 --- a/server/services/pin-state-batcher.ts +++ b/server/services/pin-state-batcher.ts @@ -23,7 +23,7 @@ export interface PinStateBatch { timestamp: number; } -export interface PinStateBatcherConfig { +interface PinStateBatcherConfig { /** Tick interval in milliseconds (default: 50ms = 20 batches/sec) */ tickIntervalMs?: number; /** Callback invoked with each batch */ diff --git a/server/services/registry-manager.ts b/server/services/registry-manager.ts index e6270dd0..d36259ba 100644 --- a/server/services/registry-manager.ts +++ b/server/services/registry-manager.ts @@ -8,11 +8,11 @@ import { Logger } from "@shared/logger"; import { createWriteStream, type WriteStream } from "fs"; import { join } from "path"; -export interface RegistryUpdateCallback { +interface RegistryUpdateCallback { (registry: IOPinRecord[], baudrate: number | undefined, reason?: string): void; } -export interface PerformanceMetrics { +interface PerformanceMetrics { timestamp: number; intendedPinChangesPerSecond: number; actualPinChangesPerSecond: number; @@ -26,11 +26,11 @@ export interface PerformanceMetrics { serialDroppedBytesPerSecond: number; } -export interface TelemetryUpdateCallback { +interface TelemetryUpdateCallback { (metrics: PerformanceMetrics): void; } -export interface RegistryManagerConfig { +interface RegistryManagerConfig { onUpdate?: RegistryUpdateCallback; onTelemetry?: TelemetryUpdateCallback; enableTelemetry?: boolean; diff --git a/server/services/run-sketch-types.ts b/server/services/run-sketch-types.ts index 28905b81..f42bf3e1 100644 --- a/server/services/run-sketch-types.ts +++ b/server/services/run-sketch-types.ts @@ -1,7 +1,7 @@ import type { IOPinRecord } from "@shared/schema"; import type { PinStateBatch } from "./pin-state-batcher"; -export interface RunSketchCallbacks { +interface RunSketchCallbacks { onOutput: (line: string, isComplete?: boolean) => void; onError: (line: string) => void; onExit: (code: number | null) => void; @@ -28,5 +28,3 @@ export interface RunSketchOptions extends RunSketchCallbacks { /** Optional tracing context for traceability */ context?: { sessionId?: string; label?: string }; } - -export type { IOPinRecord }; diff --git a/server/services/serial-output-batcher.ts b/server/services/serial-output-batcher.ts index 5f9b30d6..a0267870 100644 --- a/server/services/serial-output-batcher.ts +++ b/server/services/serial-output-batcher.ts @@ -16,7 +16,7 @@ import { RingBuffer } from "@shared/utils/ring-buffer"; -export interface SerialOutputBatcherConfig { +interface SerialOutputBatcherConfig { /** Baudrate in bits per second (e.g., 115200) */ baudrate: number; /** Tick interval in milliseconds (default: 50ms = 20 batches/sec) */ diff --git a/server/services/simulation-timeout-manager.ts b/server/services/simulation-timeout-manager.ts index 6692dc65..eff6785a 100644 --- a/server/services/simulation-timeout-manager.ts +++ b/server/services/simulation-timeout-manager.ts @@ -3,11 +3,11 @@ import { Logger } from "@shared/logger"; -export interface TimeoutCallback { +interface TimeoutCallback { (): void; } -export interface SimulationTimeoutManagerConfig { +interface SimulationTimeoutManagerConfig { onTimeout?: TimeoutCallback; } diff --git a/server/services/sketch-file-builder.ts b/server/services/sketch-file-builder.ts index 72ca1eb4..19602290 100644 --- a/server/services/sketch-file-builder.ts +++ b/server/services/sketch-file-builder.ts @@ -11,7 +11,7 @@ import { ARDUINO_MOCK_CODE } from "../mocks/arduino-mock"; import { Logger } from "@shared/logger"; import { detectSketchEntrypoints } from "@shared/utils/sketch-validation"; -export interface SketchBuildResult { +interface SketchBuildResult { sketchDir: string; sketchFile: string; exeFile: string; diff --git a/server/storage.ts b/server/storage.ts index de9bc867..58aa34d1 100644 --- a/server/storage.ts +++ b/server/storage.ts @@ -1,7 +1,7 @@ import { type Sketch, type InsertSketch } from "@shared/schema"; import { randomUUID } from "crypto"; -export interface IStorage { +interface IStorage { getSketch(id: string): Promise; getSketchByName(name: string): Promise; createSketch(sketch: InsertSketch): Promise; diff --git a/shared/logger.ts b/shared/logger.ts index 9aa532a8..82cf47ab 100644 --- a/shared/logger.ts +++ b/shared/logger.ts @@ -28,7 +28,7 @@ * - Flush erfolgt nur beim Fehler asynchron */ -export type LogLevel = "NONE" | "ERROR" | "WARN" | "INFO" | "DEBUG"; +type LogLevel = "NONE" | "ERROR" | "WARN" | "INFO" | "DEBUG"; interface LogEntry { timestamp: string; diff --git a/shared/worker-protocol.ts b/shared/worker-protocol.ts index fa75b874..c4a8d16f 100644 --- a/shared/worker-protocol.ts +++ b/shared/worker-protocol.ts @@ -15,7 +15,7 @@ import type { CompilationResult } from "../server/services/arduino-compiler"; /** * Commands that can be sent to worker threads */ -export enum WorkerCommand { +enum WorkerCommand { COMPILE = "compile", READY = "ready", SHUTDOWN = "shutdown", @@ -38,7 +38,7 @@ export interface CompileRequestPayload { /** * Compilation response payload sent from worker to main thread */ -export interface CompileResponsePayload { +interface CompileResponsePayload { result?: CompilationResult; error?: WorkerError; } @@ -46,7 +46,7 @@ export interface CompileResponsePayload { /** * Structured error object for worker errors */ -export interface WorkerError { +interface WorkerError { message: string; code?: string; stack?: string; @@ -56,7 +56,7 @@ export interface WorkerError { * Generic worker message envelope * T = payload type (CompileRequestPayload | CompileResponsePayload | void) */ -export interface WorkerMessage { +interface WorkerMessage { type: WorkerCommand; taskId?: string; payload?: T; diff --git a/tests/TestLogger.ts b/tests/TestLogger.ts index 17cf50c2..3e215559 100644 --- a/tests/TestLogger.ts +++ b/tests/TestLogger.ts @@ -1,7 +1,7 @@ // TestLogger.ts // Centralized logger for tests with log-level abstraction -export type LogLevel = 'DEBUG' | 'INFO' | 'ERROR'; +type LogLevel = 'DEBUG' | 'INFO' | 'ERROR'; const LOG_LEVEL: LogLevel = (process.env.LOG_LEVEL as LogLevel) || 'ERROR';