Phase 1 step 7 of VNCprodbuild. integration/tests/11-electron-notification.spec.ts launches the actual Electron shell, logs in as alice against this repo's existing docker-compose Stalwart fixture, injects a message over real SMTP (same helpers/smtp.ts sendMail() 02-mail-sync.spec.ts uses), and asserts a native notification fires via electron/main.ts's __notificationCallCount test hook - proving the full real pipeline, not just the synthetic IPC call step 3's smoke test exercises: SMTP -> Stalwart -> JMAP push (lib/jmap/client.ts) -> stores/email-store.ts's handleStateChange -> handleNewEmailNotification -> the page effect -> lib/electron-bridge.ts -> the contextBridge/IPC bridge -> electron/main.ts's Notification call. Runs against a `next dev` server (electron/main.ts's new ELECTRON_LOAD_URL escape hatch), not the standalone build, because this fixture's Stalwart is deliberately plain HTTP and production's CSP correctly refuses non-TLS connections - the identical trade-off integration/webmail.Dockerfile already makes for the browser-based suite. New playwright.integration-electron.config.ts + global-setup-electron.ts (brings up only the `stalwart` compose service, not `webmail`, which this suite never touches and which may not even be startable on a given host - see its own header comment) keep this fully separate from the main dockerized integration run, which has no Electron binary compatible with that container's platform; playwright.integration.config.ts gets a matching testIgnore so a plain `npm run test:integration` never tries to sweep this file in. Wired as `npm run test:integration:electron`. On "the real WebSocket path": confirmed against this fixture's actual `stalwartlabs/stalwart:v0.16` (same as the sandbox server) that its /jmap/ws requires the same Authorization header as every other JMAP endpoint on the handshake itself, which the browser WebSocket API cannot attach - so the WS attempt reaches the network correctly (see the CSP fix in the previous commit) but always fails auth here, and the circuit breaker falls back to SSE within about a second. That fallback is what delivers the push this test observes - documented in detail in the spec's header comment, including why asserting the WS handshake itself succeeds here would be asserting something that cannot be true from a browser against this specific server. Known flakiness, root-caused not eliminated (see playwright.integration-electron.config.ts's retries: 2 and its comment): `next dev`'s on-demand route compilation + Fast Refresh occasionally races the SSE stream during the login -> inbox transition and drops that one push event with no error anywhere - reproduced by running the identical test repeatedly against an already-warm stack (IT_NO_DOCKER=1): identical request sequence logged every time, but the outcome wasn't always the same. This is specific to the dev-server workaround this test needs for the plaintext-Stalwart fixture, not a bug in the feature it's verifying - the WS circuit breaker and SSE fallback fire exactly as designed in every run's own logs, pass or fail. Verified: passed cleanly standalone multiple times; with retries: 2 in place, passed within the retry budget on every attempt made.
123 lines
3.9 KiB
JSON
123 lines
3.9 KiB
JSON
{
|
|
"name": "bulwark-webmail",
|
|
"version": "1.7.8",
|
|
"main": "dist-electron/main.js",
|
|
"description": "Bulwark Webmail - a modern webmail client built for Stalwart Mail Server",
|
|
"author": "Bulwark Webmail <bulwark@rbm.systems>",
|
|
"license": "AGPL-3.0-only",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/bulwarkmail/webmail.git"
|
|
},
|
|
"homepage": "https://github.com/bulwarkmail/webmail",
|
|
"bugs": {
|
|
"url": "https://github.com/bulwarkmail/webmail/issues"
|
|
},
|
|
"keywords": [
|
|
"jmap",
|
|
"webmail",
|
|
"stalwart",
|
|
"email",
|
|
"nextjs",
|
|
"react",
|
|
"typescript"
|
|
],
|
|
"scripts": {
|
|
"dev": "next dev --turbopack",
|
|
"build": "next build --turbopack",
|
|
"start": "next start",
|
|
"lint": "eslint .",
|
|
"lint:fix": "eslint . --fix",
|
|
"test:translations": "vitest run --no-isolate lib/__tests__/translations.test.ts",
|
|
"test:integration": "bash integration/run-tests.sh",
|
|
"prepare": "husky",
|
|
"typecheck": "tsc --noEmit",
|
|
"build:standalone": "next build --webpack && node scripts/assemble-standalone.mjs",
|
|
"build:electron": "node scripts/build-electron.mjs",
|
|
"electron:dev": "npm run build:standalone && npm run build:electron && electron .",
|
|
"test:electron": "playwright test -c playwright.electron.config.ts",
|
|
"test:integration:electron": "npm run build:standalone && npm run build:electron && playwright test -c playwright.integration-electron.config.ts"
|
|
},
|
|
"dependencies": {
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@tanstack/react-virtual": "^3.13.24",
|
|
"@tiptap/extension-color": "^3.22.4",
|
|
"@tiptap/extension-image": "^3.22.4",
|
|
"@tiptap/extension-link": "^3.22.4",
|
|
"@tiptap/extension-placeholder": "^3.22.4",
|
|
"@tiptap/extension-table": "^3.22.4",
|
|
"@tiptap/extension-table-cell": "^3.22.4",
|
|
"@tiptap/extension-table-header": "^3.22.4",
|
|
"@tiptap/extension-table-row": "^3.22.4",
|
|
"@tiptap/extension-text-align": "^3.22.4",
|
|
"@tiptap/extension-text-style": "^3.22.4",
|
|
"@tiptap/extension-underline": "^3.22.4",
|
|
"@tiptap/pm": "^3.22.4",
|
|
"@tiptap/react": "^3.22.4",
|
|
"@tiptap/starter-kit": "^3.22.4",
|
|
"asn1js": "^3.0.10",
|
|
"clsx": "^2.1.1",
|
|
"date-fns": "^4.1.0",
|
|
"dompurify": "^3.4.12",
|
|
"electron-updater": "^6.8.9",
|
|
"jalaali-js": "^2.0.0",
|
|
"jszip": "^3.10.1",
|
|
"lucide-react": "^1.8.0",
|
|
"next": "^16.2.6",
|
|
"next-intl": "^4.13.3",
|
|
"otpauth": "^9.5.0",
|
|
"pdfjs-dist": "^6.0.227",
|
|
"pkijs": "^3.4.0",
|
|
"postal-mime": "^2.7.4",
|
|
"pvtsutils": "^1.3.6",
|
|
"qrcode": "^1.5.4",
|
|
"react": "^19.2.5",
|
|
"react-dom": "^19.2.5",
|
|
"sonner": "^2.0.7",
|
|
"tailwind-merge": "^3.4.0",
|
|
"webcrypto-liner": "^1.4.3",
|
|
"zustand": "^5.0.12"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.39.4",
|
|
"@playwright/test": "^1.59.1",
|
|
"@tailwindcss/postcss": "^4.2.4",
|
|
"@testing-library/dom": "^10.4.1",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.1",
|
|
"@types/node": "^25.6.0",
|
|
"@types/qrcode": "^1.5.6",
|
|
"@types/react": "^19.2.7",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@typescript-eslint/eslint-plugin": "^8.59.0",
|
|
"@typescript-eslint/parser": "^8.59.0",
|
|
"@vitejs/plugin-react": "^6.0.1",
|
|
"@vitest/ui": "^4.1.5",
|
|
"electron": "^43.2.0",
|
|
"electron-builder": "^26.15.3",
|
|
"esbuild": "^0.28.0",
|
|
"eslint": "^9.39.4",
|
|
"eslint-plugin-react": "^7.37.5",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"fake-indexeddb": "^6.2.5",
|
|
"globals": "^17.5.0",
|
|
"husky": "^9.1.7",
|
|
"jsdom": "^28.1.0",
|
|
"tailwindcss": "^4.2.4",
|
|
"tw-animate-css": "^1.4.0",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^4.1.5"
|
|
},
|
|
"overrides": {
|
|
"elliptic": {
|
|
".": "^6.6.1",
|
|
"webcrypto-liner": "$elliptic"
|
|
},
|
|
"flatted": "^3.4.2",
|
|
"picomatch": "^4.0.4",
|
|
"undici": "^7.24.0"
|
|
}
|
|
}
|