mirror of
https://github.com/screentinker/screentinker.git
synced 2026-06-15 02:33:15 -06:00
Adds server/test/admin-users.test.js and a `npm test` (node --test) script. No DB_PATH override: the suite mounts the real routers against an isolated in-memory better-sqlite3 instance injected into the require cache, seeded by the test itself. Node v20 built-ins only (node:test, node:assert, fetch). Covers: Add User success (response omits password/hash, hash stored not plaintext, membership written, hosted lifecycle sentinels stamped, audit row without the password), duplicate-email 409 (no overwrite), non-admin 403, platform_operator denied (403), org_admin scoped to their own org only, input validation, and the must_change_password lifecycle (set on create, surfaced on login, cleared on PUT /api/auth/me). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30 lines
792 B
JSON
30 lines
792 B
JSON
{
|
|
"name": "remote-display-server",
|
|
"version": "1.0.0",
|
|
"description": "ScreenTinker - Digital Signage Management Server",
|
|
"main": "server.js",
|
|
"scripts": {
|
|
"start": "node --env-file-if-exists=.env server.js",
|
|
"dev": "node --watch --env-file-if-exists=.env server.js",
|
|
"test": "node --test"
|
|
},
|
|
"dependencies": {
|
|
"@azure/msal-node": "^5.2.1",
|
|
"archiver": "^7.0.1",
|
|
"bcryptjs": "^3.0.3",
|
|
"better-sqlite3": "^9.4.3",
|
|
"cors": "^2.8.5",
|
|
"express": "^4.18.2",
|
|
"express-rate-limit": "^8.3.1",
|
|
"google-auth-library": "^10.6.2",
|
|
"helmet": "^8.1.0",
|
|
"jsonwebtoken": "^9.0.3",
|
|
"multer": "^1.4.5-lts.1",
|
|
"sharp": "^0.33.2",
|
|
"socket.io": "^4.7.2",
|
|
"stripe": "^20.4.1",
|
|
"unzipper": "^0.12.3",
|
|
"uuid": "^14.0.0"
|
|
}
|
|
}
|