Files
CookieBridge/package.json
徐枫 a320f7ad97 feat: add admin REST API layer for frontend management panel
Implement JWT-protected /admin/* routes on the relay server:
- Auth: login, logout, me, setup/status, setup/init (first-time config)
- Dashboard: stats overview (connections, devices, cookies, domains)
- Cookies: paginated list with domain/search filter, detail, delete, batch delete
- Devices: list with online status, revoke
- Settings: get/update (sync interval, max devices, theme)

Uses scrypt for password hashing and jsonwebtoken for JWT.
Adds listAll/revoke to DeviceRegistry, getAll/getById/deleteById to CookieBlobStore,
disconnect to ConnectionManager. Updates frontend to use /admin/* endpoints.

All 38 existing tests pass.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-17 20:28:56 +08:00

41 lines
931 B
JSON

{
"name": "cookiebridge",
"version": "0.1.0",
"description": "Cross-device cookie synchronization with E2E encryption",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"start": "tsx src/cli.ts",
"dev": "tsx --watch src/cli.ts",
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "tsc --noEmit"
},
"keywords": [
"cookies",
"sync",
"encryption",
"browser-extension"
],
"author": "Rc707Agency",
"license": "MIT",
"type": "commonjs",
"dependencies": {
"jsonwebtoken": "^9.0.3",
"sodium-native": "^5.1.0",
"typescript": "^5.9.3",
"uuid": "^13.0.0",
"ws": "^8.19.0"
},
"devDependencies": {
"@types/jsonwebtoken": "^9.0.10",
"@types/node": "^25.5.0",
"@types/sodium-native": "^2.3.9",
"@types/uuid": "^10.0.0",
"@types/ws": "^8.18.1",
"tsx": "^4.21.0",
"vitest": "^4.1.0"
}
}