Two cleanups in one pass for the v1.14.0 'works on any platform' theme: 1. Response helpers — merged src/utils/responses.js and the root-level response-helpers.js into a single module at src/utils/responses.js. The old module had a richer set (created, noContent, validationError, unauthorized, forbidden, notFound, conflict) and is now re-exported from the new location. Updated 15 routes to import from src/utils/responses and deleted the root response-helpers.js. 2. Error logger — error-handler.js now uses the unified src/utils/logging.js#logError (same one src/app.js uses), so all errors go to one log file with one rotation policy. Removed the dead asyncHandler export (the real one is in src/utils/async-handler.js and is used everywhere). Deleted the legacy error-logger.js. Both are invisible to users — same HTTP response shapes, same log file path, same error format. Internal-only refactor.
50 lines
1.6 KiB
JSON
50 lines
1.6 KiB
JSON
{
|
|
"name": "dashcaddy-api",
|
|
"version": "1.13.2",
|
|
"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"
|
|
}
|
|
}
|