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:
Hermes
2026-06-25 16:43:10 -07:00
171 changed files with 11759 additions and 1006 deletions
+8 -9
View File
@@ -2,9 +2,10 @@ const express = require('express');
const fs = require('fs');
const fsp = require('fs').promises;
const path = require('path');
const { exists, isAccessible } = require('../fs-helpers');
const { paginate, parsePaginationParams } = require('../pagination');
const { ValidationError, ForbiddenError } = require('../errors');
const { exists, isAccessible } = require('../src/utilities/fs-helpers');
const { paginate, parsePaginationParams } = require('../src/utilities/pagination');
const { ValidationError, ForbiddenError } = require('../src/utilities/errors');
const { ok } = require('../src/utils/responses');
/**
* Browse route factory
@@ -44,7 +45,7 @@ module.exports = function({ asyncHandler, ok, validateSecurePath, auditLogger, d
}
}
ok(res, { roots });
return ok(res, { roots });
}, 'browse-roots'));
// Browse directory contents
@@ -98,7 +99,7 @@ module.exports = function({ asyncHandler, ok, validateSecurePath, auditLogger, d
}
if (!await exists(resolvedPath)) {
const { NotFoundError } = require('../errors');
const { NotFoundError } = require('../src/utilities/errors');
throw new NotFoundError('Path');
}
@@ -124,8 +125,7 @@ module.exports = function({ asyncHandler, ok, validateSecurePath, auditLogger, d
const paginationParams = parsePaginationParams(req.query);
const result = paginate(folders, paginationParams);
res.json({
success: true,
ok(res, {
path: requestedPath,
parent: path.dirname(requestedPath).replace(/\\/g, '/') || null,
items: result.data,
@@ -190,8 +190,7 @@ module.exports = function({ asyncHandler, ok, validateSecurePath, auditLogger, d
}
}
res.json({
success: true,
ok(res, {
mounts: detectedMounts,
message: detectedMounts.length > 0
? `Found ${detectedMounts.length} media mount(s) from existing containers`