Remove unused readFile import and dead backend-status.json initializer
REC-120:
- Removed the unused `readFile` import (`readFile(` had zero call
sites in the file).
- Removed the never-read `backend-status.json` initializer block; the
`backendStatus` in-memory object it snapshotted is still very much
alive (read at lines 287, 378, 489, 504, 509, 515, 768) and untouched
here.
- Also removed the `existsSync` import, which the initializer block
was its only caller for; left in place it would have become a second
dead import introduced by this same cut.
Kill attempts that failed: none.
- `rg -n "readFile\(" scripts/vili-daemon.mjs` -> no matches (repeated
the census command against current HEAD).
- `rg -n -F --glob '!scripts/vili-daemon.mjs' 'backend-status.json' .`
-> no matches in this repo; cross-repo `rg -n 'backend-status\.json'`
over F:/Projects only turns up Odin's
docs/transport-shortcut-inventory.md, which documents the shortcut
rather than reading the file.
Checks run: `node --check scripts/vili-daemon.mjs` -> syntax OK. No
package.json/test suite exists in this repo to run beyond that.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
8627297a6e
commit
8773c153c8
1 changed files with 1 additions and 5 deletions
|
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env node
|
||||
import http from "node:http";
|
||||
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
||||
import { existsSync } from "node:fs";
|
||||
import { mkdir, writeFile } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { createRequire } from "node:module";
|
||||
|
|
@ -795,9 +794,6 @@ if (args.health) {
|
|||
} else {
|
||||
await mkdir(path.join(args.stateRoot, "jobs"), { recursive: true });
|
||||
await persistSurfaces();
|
||||
if (!existsSync(path.join(args.stateRoot, "backend-status.json"))) {
|
||||
await writeFile(path.join(args.stateRoot, "backend-status.json"), JSON.stringify(backendStatus, null, 2));
|
||||
}
|
||||
|
||||
const server = http.createServer((request, response) => {
|
||||
handleRequest(request, response).catch((error) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue