Merge krystie-improvements into main
Resolves 24 conflicts between Hermes (DC-008/009/010 + response-helper
envelope standardization) and Krystie (DC-005 src/ refactor path fixes,
DC-006 TOTP integration, DC-007 new test suites, cloud backup
destinations).
Conflict resolutions:
- src/utils/logging.js: took ours (consumers depend on logError/
safeErrorMessage/createLogger exports)
- src/config/site.js: merged (her factored validateAndLogConfig +
applyConfigFields helpers)
- src/context/dns.js: took hers (admin/readonly role iteration for
write operations)
- src/utilities/backup-
manager.js: took hers (Dropbox/WebDAV/SFTP cloud feature)
- status/dist/*, status/
sw.js: took hers (minified bundles + newer SW cache)
Additional fix (post-merge regression):
- src/monitoring/health-checker.js: fixed DC-005 path miss —
'require(./platform-paths)' → 'require(../../platform-paths)'
Test status: 921/922 passing. One known failure in logging.test.js
(async file-handle timing) tracked as follow-up.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const express = require('express');
|
||||
const { success } = require('../response-helpers');
|
||||
const { success } = require('../src/utils/responses');
|
||||
|
||||
/**
|
||||
* Monitoring routes factory
|
||||
@@ -38,7 +38,7 @@ module.exports = function({ resourceMonitor, docker, asyncHandler, log, notifica
|
||||
router.get('/monitoring/stats/:containerId', asyncHandler(async (req, res) => {
|
||||
const stats = resourceMonitor.getCurrentStats(req.params.containerId);
|
||||
if (!stats) {
|
||||
const { NotFoundError } = require('../errors');
|
||||
const { NotFoundError } = require('../src/utilities/errors');
|
||||
throw new NotFoundError('Container');
|
||||
}
|
||||
success(res, { stats });
|
||||
@@ -54,7 +54,7 @@ module.exports = function({ resourceMonitor, docker, asyncHandler, log, notifica
|
||||
const startTime = parseInt(req.query.startTime, 10);
|
||||
const endTime = parseInt(req.query.endTime, 10);
|
||||
if (Number.isNaN(startTime) || Number.isNaN(endTime) || startTime >= endTime) {
|
||||
const { ValidationError } = require('../errors');
|
||||
const { ValidationError } = require('../src/utilities/errors');
|
||||
throw new ValidationError('Invalid startTime/endTime');
|
||||
}
|
||||
const result = resourceMonitor.getHistoryByRange(containerId, startTime, endTime);
|
||||
@@ -73,7 +73,7 @@ module.exports = function({ resourceMonitor, docker, asyncHandler, log, notifica
|
||||
const hours = parseInt(req.query.hours) || 24;
|
||||
const aggregated = resourceMonitor.getAggregatedStats(req.params.containerId, hours);
|
||||
if (!aggregated) {
|
||||
const { NotFoundError } = require('../errors');
|
||||
const { NotFoundError } = require('../src/utilities/errors');
|
||||
throw new NotFoundError('Monitoring data');
|
||||
}
|
||||
success(res, { aggregated, hours });
|
||||
@@ -91,7 +91,7 @@ module.exports = function({ resourceMonitor, docker, asyncHandler, log, notifica
|
||||
router.post('/monitoring/alerts/config', asyncHandler(async (req, res) => {
|
||||
const { configs } = req.body;
|
||||
if (!configs || typeof configs !== 'object') {
|
||||
const { ValidationError } = require('../errors');
|
||||
const { ValidationError } = require('../src/utilities/errors');
|
||||
throw new ValidationError('configs object required');
|
||||
}
|
||||
for (const [containerId, config] of Object.entries(configs)) {
|
||||
|
||||
Reference in New Issue
Block a user