Fix DC-005 depth-2 route path bugs: 67 broken requires across 21 files
CI / Test & Lint (push) Has been cancelled
CI / Security audit (push) Has been cancelled

The DC-005 src/ refactor left depth-2 route files (routes/auth/*,
routes/recipes/*, routes/apps/*, routes/arr/*, routes/config/*) with
broken require() paths. A filesystem-resolving scanner found 67 broken
requires across 21 files — three distinct bug classes:

  A) '../../../src/...' (3 levels up, above package root) — Bug 7, ~49 occurrences
  B) '../src/utils/...' (1 level up, resolves to nonexistent routes/src/) — ~15 occurrences
  C) routes/apps/restore.js:5 used utilities/responses (wrong dir) — should be utils/responses

All fixed to '../../src/...' (or '../../src/utils/responses' for class C).
routes/auth/totp.js was already fixed in the DC-006 commit.

Post-fix: 922/922 tests pass, zero new ESLint warnings. No logic changes —
purely mechanical require() path corrections.
This commit is contained in:
Hermes
2026-06-25 16:55:06 -07:00
parent 57a6a22f89
commit c39c80b3ad
22 changed files with 68 additions and 68 deletions
+4 -4
View File
@@ -1,11 +1,11 @@
const express = require('express');
const fsp = require('fs').promises;
const path = require('path');
const { LIMITS } = require('../../../src/utilities/constants');
const { exists } = require('../../../src/utilities/fs-helpers');
const { ValidationError } = require('../../../src/utilities/errors');
const { LIMITS } = require('../../src/utilities/constants');
const { exists } = require('../../src/utilities/fs-helpers');
const { ValidationError } = require('../../src/utilities/errors');
const platformPaths = require('../../platform-paths');
const { ok, successMessage } = require('../src/utils/responses');
const { ok, successMessage } = require('../../src/utils/responses');
/**
* Config assets routes factory
* @param {Object} deps - Explicit dependencies