- Add security.ts: helmet, CORS allowlist, timing-safe API key auth, prototype pollution guard, Mermaid input limits, rate limiting (general/destructive/burst) - WS auth challenge-response with 5 s timeout and close code 4001 - Fix sync crash: array check before logger access (500 → 400) - Fix sync/v2: validate element type before write (invalid → 400) - Upgrade zod 3.22.4 → 3.25.5 (fixes ERR_PACKAGE_PATH_NOT_EXPORTED on startup) - Extract ElementSharedFieldsSchema; move VALID_ELEMENT_TYPES to module level - Docker: resource limits, .dockerignore hardening - Add .project-hooks/pre-commit; expand test coverage (369 tests) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37 lines
964 B
TypeScript
37 lines
964 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './tests/e2e',
|
|
timeout: 30000,
|
|
expect: { timeout: 5000 },
|
|
fullyParallel: false,
|
|
retries: 0,
|
|
workers: 1,
|
|
reporter: 'list',
|
|
use: {
|
|
baseURL: 'http://127.0.0.1:3100',
|
|
trace: 'on-first-retry',
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
webServer: {
|
|
command: 'node tests/e2e/start-server.js',
|
|
port: 3100,
|
|
timeout: 15000,
|
|
reuseExistingServer: !process.env.CI,
|
|
env: {
|
|
CANVAS_PORT: '3100',
|
|
HOST: '127.0.0.1',
|
|
EXCALIDRAW_DB_PATH: '/tmp/excalidraw-e2e-test.db',
|
|
ALLOWED_ORIGINS: 'http://127.0.0.1:3100,http://localhost:3100,http://localhost:3000,http://127.0.0.1:3000',
|
|
EXCALIDRAW_RATE_LIMIT_GENERAL_MAX: '10000',
|
|
EXCALIDRAW_RATE_LIMIT_DESTRUCTIVE_MAX: '10000',
|
|
EXCALIDRAW_RATE_LIMIT_WRITE_BURST_MAX: '10000',
|
|
},
|
|
},
|
|
});
|