keeptrack.space
keeptrack.space copied to clipboard
refactor: rewrite PersistenceManager with centralized data management
- Add new EventBusEvent types: buildDataUpdate, buildPreferencesUpdate, debouncedSync
- Implement centralized preferences and userData objects
- Add EventBus listeners for automatic data/preferences updates
- Implement debounced sync with 3-second delay
- Add isUseLocalStorage and isUseRemoteStorage flags
- Sync loop runs when either storage flag is enabled
- Save to localStorage only when isUseLocalStorage is true
- Emit debouncedSync event for external sync (e.g., Supabase)
- All data is properly serialized to JSON
- Load from localStorage on initialization
Breaking Changes:
- Removed old getItem(), saveItem(), checkIfEnabled() methods
- Code using old API will need to be updated to use new preferences/userData objects
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Quality Gate passed
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code