mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 07:07:31 +00:00
refactor(server): take the storage roots from DataPathsService
The data-directory change said Nest classes inject DataPathsService, but only AdminService did. StorageRegistryService still read the built-in uploads and backups roots and the scratch dir from module constants frozen at import, and StorageJobsService read the scratch dir the same way. The registry now takes DataPathsService through its constructor (a hand-built one resolves the same layout), and the jobs service asks the registry for its temp dir. The plain helper modules keep calling resolveDataPaths() because they run without a container or are shared with code that does: config.ts, the database path, index.ts, the logger, the backup functions and the plugin trees, which the out-of-process supervisor reads too. The app-config README now lists both sides, and the nest README, server/CLAUDE.md and the provider's own comment say the same.
This commit is contained in:
@@ -378,7 +378,10 @@ sharing).
|
||||
or read runtime-toggled values live through `RuntimeEnvService` / `readEnv()`
|
||||
from `src/app-config`. Every variable has exactly one owner, a token or
|
||||
`readEnv()`, and `config-ownership.test.ts` fails on a variable read through
|
||||
both. Data paths come from `DataPathsService`. The classification and
|
||||
both. A provider that reads a data path takes `DataPathsService`
|
||||
(`AdminService`, `StorageRegistryService`, and through it the storage
|
||||
jobs); plain helper modules call `resolveDataPaths()` (see
|
||||
`src/app-config/README.md` for which and why). The classification and
|
||||
invariants live in `src/app-config/README.md`.
|
||||
|
||||
## Parity gotchas worth remembering
|
||||
|
||||
Reference in New Issue
Block a user