Add progress bars to sync #10
Loading…
Reference in a new issue
No description provided.
Delete branch "4-progress-bars"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #4
Wraps sync's four phases (scanning, deleting, copying, writing playlists) in lib/sync.ts with cli-progress bars. Scanning uses a live-incrementing counter bar (unknown total up front, via a new optional onFileFound callback on walkExisting); deleting/copying/writing use determinate bars, each skipped in favor of a short Nothing to ... log line when the phase has zero items. Adds types/cli-progress.d.ts (ambient module declaration) since cli-progress ships no types, matching the types/m3u.d.ts pattern from #1.
Purely additive/visual: no change to syncToTarget's diff logic, guards, or the stale-playlist confirmation gate. Re-verified with a throwaway scratch script (not committed): guards (missing target, empty metadata), first sync, idempotent second sync (Nothing to delete/copy lines), stale-playlist confirmation gate accept/decline, and sanitized-filename collision handling all still behave as before.
Targets 3-sync-command (PR #9) per the stacked-PR rule in CONTRIBUTING.md, since #7/#8/#9 are all still open.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.