Refactor: extract BackupDirectory utility class #43

Merged
jmiller merged 2 commits from dev into main 2026-06-07 14:44:09 +00:00
Owner

Summary

  • Extract shared BackupDirectory utility class to eliminate ~180 lines of duplicated code
  • Centralizes path resolution, directory protection, placeholder checking, and list parsing
  • No functional changes — pure refactor

Review

Code-reviewed in prior session. This is a clean extraction with no logic changes.

## Summary - Extract shared `BackupDirectory` utility class to eliminate ~180 lines of duplicated code - Centralizes path resolution, directory protection, placeholder checking, and list parsing - No functional changes — pure refactor ## Review Code-reviewed in prior session. This is a clean extraction with no logic changes.
jmiller added 2 commits 2026-06-07 14:42:38 +00:00
refactor: extract BackupDirectory utility to eliminate code duplication
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Report Issues (push) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 1s
Universal: Auto Version Bump / Version Bump (push) Successful in 8s
814d1b147c
- Create BackupDirectory utility class with centralized:
  - DEFAULT_RELATIVE constant and PLACEHOLDER constant
  - resolve() — path resolution with [DEFAULT_DIR] and relative path handling
  - hasPlaceholders() — check for unresolved placeholder tokens
  - isWebAccessible() — web-root boundary check
  - protect() — .htaccess and index.html creation with error logging
  - ensureReady() — mkdir + protect in one call
  - parseNewlineList() — newline-separated text parsing
  - logPathFromArchive() — derive .log path from archive path
- Remove duplicated methods from BackupEngine, SteppedBackupEngine,
  ProfileTable, AjaxController, and DashboardModel
- All consumers now use BackupDirectory static methods
- Net reduction: ~180 lines of duplicated code eliminated
chore(version): pre-release bump to 01.06.01-dev [skip ci]
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 18s
139423cbe9
jmiller merged commit bbf3dcd449 into main 2026-06-07 14:44:09 +00:00
Sign in to join this conversation.
No Reviewers
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomBackup#43