Files
dashcaddy/dashcaddy-api/package.json
T
Hermes 2d394d882d
CI / Test & Lint (push) Has been cancelled
CI / Security audit (push) Has been cancelled
Standardize response shapes and fix dead fetchT timeout keys
Three small cleanups for v1.14.0:

1. /caddy/cas now uses standard success envelope
   Was: { status: 'success', data: { cas: caList } }
   Now: { success: true, cas: caList }
   Updated frontend service-infrastructure.js to match.

2. /api/health/ca now uses standard envelope + meaningful HTTP codes
   Was: { status, message, daysUntilExpiration } with 200 on every error
   Now: { success, caStatus, message|error, daysUntilExpiration }
        with 200 / 404 / 500 as appropriate
   caStatus field preserves the original 'healthy'/'warning'/'critical'/'error'
   semantic so any future consumer of the CA-health state still has it.
   Tests updated to match.

3. Dead timeout: keys in fetchT opts are now a warning, not a silent strip
   src/utils/http.js:41 used to do  without telling
   anyone. Callers that wrote fetchT(url, { timeout: 5000 }) got the default
   5s timeout with no indication that their explicit value was ignored.
   Now it logs a warning naming the call site, then strips the key.
   Fixed 4 call sites that had stale timeout: keys:
   - src/context/caddy.js
   - src/context/dns.js
   - src/context/provider-dns.js
   - routes/dns.js (2 places)
2026-06-10 21:52:33 -07:00

50 lines
1.6 KiB
JSON

{
"name": "dashcaddy-api",
"version": "1.13.3",
"description": "DashCaddy API server - Dashboard backend for Docker, Caddy & DNS management",
"main": "server.js",
"scripts": {
"start": "node server.js",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"test:ci": "jest --ci --coverage --maxWorkers=2 --forceExit",
"test:unit": "jest --testPathPattern=__tests__/(?!routes|integration) --no-coverage",
"test:routes": "jest --testPathPattern=__tests__/routes --no-coverage",
"test:security": "jest --testPathPattern=(crypto-utils|credential-manager|csrf-protection|auth-manager|input-validator|backup-manager) --no-coverage",
"test:changed": "jest --onlyChanged --no-coverage",
"test:debug": "node --inspect-brk node_modules/jest/bin/jest.js --runInBand --no-coverage",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format": "prettier --write '**/*.{js,json,md}'"
},
"dependencies": {
"compression": "^1.8.1",
"cors": "^2.8.6",
"dockerode": "^4.0.9",
"dropbox": "^10.34.0",
"express": "^4.22.1",
"express-rate-limit": "^7.5.1",
"helmet": "^8.1.0",
"js-yaml": "^4.1.1",
"jsonwebtoken": "^9.0.2",
"lru-cache": "^10.4.3",
"nodemailer": "^8.0.4",
"otplib": "^12.0.1",
"png-to-ico": "^2.1.8",
"proper-lockfile": "^4.1.2",
"qrcode": "^1.5.3",
"sharp": "^0.33.5",
"ssh2-sftp-client": "^11.0.0",
"validator": "^13.11.0",
"webdav": "^5.7.1",
"ws": "^8.20.0"
},
"devDependencies": {
"eslint": "^8.57.1",
"jest": "^29.7.0",
"prettier": "^3.8.1",
"supertest": "^6.3.4"
}
}