universal_storage_sync 0.1.0-dev.9
universal_storage_sync: ^0.1.0-dev.9 copied to clipboard
A cross-platform Dart package providing unified API for file storage operations with support for local filesystem and Git-based control.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0-dev.9 - 2025-10-27 #
- refactor: StorageService from
universal_storage_syncpackage touniversal_storage_interfacepackage
0.1.0-dev.8 - 2025-10-25 #
- feat: add
StorageProviderRegistry.disposemethod - chore: update interface dependency to 0.1.0-dev.8
0.1.0-dev.7 - 2025-10-25 #
- fixed todo_file_app example to latest changes
- chore: update interface dependency to 0.1.0-dev.7
0.1.0-dev.6 - 2025-10-18 #
- chore: from_json_to_json ^0.3.0
0.1.0-dev.5 - 2025-08-09 #
Changed #
- moved
macos_bookmark.dartandfile_path_config.darttouniversal_storage_interface
0.1.0-dev.4 - 2025-08-09 #
Changed #
- Stabilized APIs for initial public release
- Promoted previous
-devchanges to stable - Updated documentation and links for publication
0.1.0-dev.3 - 2025-06-27 #
- feat: Add
FilePathConfigandFilePathmodels for storing file path and macOS bookmark. - feat: moved
MacOSBookmarkfromutilspackage.
0.1.0-dev.2 - 2025-06-22 #
- perf: Readme update
0.1.0-dev.1 - 2025-06-21 #
Added #
MacOSBookmarkclass for macOS security-scoped bookmarksMacOSBookmarkManagerclass for managing macOS security-scoped bookmarksMacOSBookmark.fromBase64constructorMacOSBookmark.fromDirectoryconstructor
0.0.0 - 2025-06-21 #
Added #
- Stage 1 Complete: Core abstractions and FileSystem provider
StorageProviderabstract class defining the contract for all storage providersStorageServicemain service class providing unified APIFileSystemStorageProviderfor local file system operations- Comprehensive exception hierarchy:
StorageException(base)AuthenticationExceptionFileNotFoundExceptionNetworkExceptionGitConflictExceptionSyncConflictExceptionUnsupportedOperationException
- Structured configuration classes:
StorageConfig(base)FileSystemConfigOfflineGitConfig(for future use)GitHubApiConfig(for future use)
OfflineGitStorageProviderplaceholder (Stage 2 implementation)- Comprehensive test suite for FileSystem provider
- Basic usage examples
- Cross-platform support (Desktop, Mobile, Web with IndexedDB)
Features #
- Create, read, update, delete files
- List directory contents
- Nested directory creation
- Type-safe configuration system
- Graceful handling of unsupported operations
- Comprehensive error handling
Dependencies #
git: ^2.3.1(for future Git operations)github: ^9.25.0(for future GitHub API integration)http: ^1.1.0path: ^1.8.3meta: ^1.9.1
Development Dependencies #
test: ^1.24.0mockito: ^5.4.2build_runner: ^2.4.7lints: ^3.0.0
[0.0.0] - 2025-06-21 #
Added #
- Stage 2 Complete: OfflineGitStorageProvider with local Git operations
- Full
OfflineGitStorageProviderimplementation with local Git repository support - Automatic Git repository initialization and configuration
- Git-based file operations with automatic commits:
createFile()withgit addandgit commitupdateFile()withgit addandgit commitdeleteFile()withgit rmandgit commitgetFile()from working directorylistFiles()with Git-aware filtering (excludes .git directory)
- Version control features:
restore()method for file restoration to previous versions- Support for restoring to specific commit hashes or HEAD
- Automatic commit hash generation and return
- Git repository management:
- Automatic repository initialization if not exists
- Branch creation and switching
- Git user configuration (name and email)
- Initial commit creation for empty repositories
- Enhanced error handling for Git operations
- Comprehensive test suite with 36 passing tests covering:
- Repository initialization scenarios
- File operations with Git integration
- Version control features
- Error scenarios and edge cases
- Integration with StorageService
example/git_usage.dartdemonstrating Git-specific features- Updated documentation with Git usage examples
Features #
- All Stage 1 features plus:
- Local Git version control
- Automatic commit generation with meaningful default messages
- File restoration to previous versions
- Git-aware directory listing
- Support for nested directory creation with Git tracking
- Commit hash returns for tracking changes
[0.0.0] - 2025-06-21 #
Added #
- Stage 3 Complete: Remote Git synchronization for OfflineGitStorageProvider
- Comprehensive remote Git synchronization with
sync()method - Enhanced
OfflineGitConfigwith remote configuration options:remoteUrl,remoteName,remoteType,remoteApiSettingsdefaultPullStrategy,defaultPushStrategyconflictResolutionstrategy configurationsshKeyPath,httpsTokenfor authentication
- Four conflict resolution strategies:
clientAlwaysRight(default) - Local changes take precedenceserverAlwaysRight- Remote changes take precedencemanualResolution- Throws exception for manual interventionlastWriteWins- Timestamp-based resolution
- Pull strategies:
merge,rebase,ff-only - Push strategies:
rebase-local,force-with-lease,fail-on-conflict - New remote operation exceptions:
RemoteNotFoundExceptionAuthenticationFailedExceptionMergeConflictExceptionNetworkTimeoutExceptionRemoteAccessDeniedException
- Smart sync support detection based on remote URL configuration
- Retry mechanisms with exponential backoff for network operations
- Remote repository validation and access checking
- Comprehensive test suite with 56 passing tests covering:
- Remote setup and configuration
- Conflict resolution strategies
- Sync strategies and error handling
- Authentication configuration
- Integration with StorageService
- Configuration validation
Features #
- All Stage 1 & 2 features plus:
- Remote Git repository synchronization
- "Client is always right" conflict resolution philosophy
- Configurable pull and push strategies
- Robust network error handling with retries
- SSH and HTTPS authentication support
- Graceful handling of providers without remote URLs
- Dynamic sync support detection
Dependencies #
- Added
retry: ^3.1.2for robust network operations
[Unreleased] #
Planned for Stage 4 #
- GitHub API integration for repository management
- Remote repository creation and validation
- Enhanced error reporting for Git operations
Planned for Stage 5 #
- Lightweight API-only providers
- Direct GitHub API provider
- Additional cloud storage providers