Files
dashcaddy/dashcaddy-api/.gitignore
T
Hermes 29f2c7999f
CI / Test & Lint (push) Has been cancelled
CI / Security audit (push) Has been cancelled
DC-020: restore license-keygen.js + fix broken require paths (container crash-loop)
The refactor(desloppify) commit a2e6566 deleted license-keygen.js and added it
to .gitignore, believing it was stale dev-root noise. It is actually a required
production module: src/managers/license-manager.js does require('./license-keygen')
and imports verifyCode/parseCode/VALID_DURATIONS. The deletion put the production
dashcaddy-api container in a crash-restart loop (MODULE_NOT_FOUND from
/app/src/app.js -> /app/server.js). The 1036-test suite passed because no test
ever executed require() on the real app module.

Fixes:
- Restore license-keygen.js from git history (a2e6566^) to src/managers/, the
  path the post-DC-005 require resolves to. CLI main() is require.main-guarded,
  so only the library exports are used at runtime.
- Remove the license-keygen.js line from .gitignore so the restored module is
  tracked (otherwise the fix would not survive a container rebuild).
- Fix a second masked broken require: src/docker/self-updater.js required
  './platform-paths' (resolves to src/docker/, doesn't exist) -> corrected to
  '../../platform-paths' (repo root, where all 9 other callers point).
- Add .encryption-key to .gitignore (runtime AES secret that the require graph
  regenerates; was untracked + un-ignored -> latent leak on git add -A).
- Add __tests__/app-startup-smoke.test.js: executes require() on the real app
  module and asserts the full require graph resolves. This regression guard
  would have caught both broken requires.

Verified: app module now loads clean; 1038/1038 tests pass (+2 new); the smoke
test fails if either required module is missing.
2026-06-29 07:22:33 -07:00

42 lines
614 B
Plaintext

# Backups
.backup/
server-old.js
*.bak
*.bak2
*.bak3
*.bak4
# Logs
error.log
*.log
# Test artifacts
coverage/
audit-routes.js
comprehensive-test.js
test-security-fixes.js
# Runtime-generated data files (written by the running server, not source)
alert-config.json
audit-log.json
audit-log.json.lock
backup-config.json
backup-history.json
container-stats.json
credentials.json
health-config.json
health-history.json
update-config.json
update-history.json
# Runtime secrets (never commit)
.encryption-key
*.encryption-key
.encryption-key.bak
# Runtime certificate/key directories
generated-certs/
pki/
assets/