diff --git a/README.md b/README.md index 046d385..4139845 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Build Status](https://github.com/mathtechstudio/local-storage-cache/actions/workflows/code-integration.yml/badge.svg)](https://github.com/mathtechstudio/local-storage-cache/actions/workflows/code-integration.yml) [![Code Coverage](https://codecov.io/gh/mathtechstudio/local-storage-cache/graph/badge.svg)](https://codecov.io/gh/mathtechstudio/local-storage-cache) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) -![Platforms](https://img.shields.io/badge/platforms-Android%20%7C%20iOS%20%7C%20macOS%20%7C%20Windows-informational) +![Platforms](https://img.shields.io/badge/platforms-Android%20%7C%20iOS%20%7C%20macOS%20%7C%20Windows%20%7C%20Linux%20%7C%20Web-informational) A comprehensive Flutter package for local storage and caching with advanced features including encryption, multi-space architecture, automatic schema migration, and high-performance query capabilities. Supports Android, iOS, macOS, Windows, Linux, and Web. diff --git a/packages/local_storage_cache/analysis_options.yaml b/packages/local_storage_cache/analysis_options.yaml index 2a894da..7c93a86 100644 --- a/packages/local_storage_cache/analysis_options.yaml +++ b/packages/local_storage_cache/analysis_options.yaml @@ -36,6 +36,8 @@ analyzer: await_only_futures: info unawaited_futures: info use_of_void_result: ignore + # Ignore path dependency warning for monorepo development + invalid_dependency: ignore exclude: - '**/*.g.dart' diff --git a/packages/local_storage_cache/pubspec.yaml b/packages/local_storage_cache/pubspec.yaml index d29693e..82369d1 100644 --- a/packages/local_storage_cache/pubspec.yaml +++ b/packages/local_storage_cache/pubspec.yaml @@ -1,7 +1,6 @@ name: local_storage_cache description: A comprehensive Flutter package for managing local storage and caching with advanced features like encryption, TTL, multi-space architecture, and more. version: 2.0.0 -publish_to: none homepage: https://github.com/mathtechstudio/local-storage-cache repository: https://github.com/mathtechstudio/local-storage-cache diff --git a/packages/local_storage_cache_android/README.md b/packages/local_storage_cache_android/README.md index 00d260a..344a9e0 100644 --- a/packages/local_storage_cache_android/README.md +++ b/packages/local_storage_cache_android/README.md @@ -48,4 +48,4 @@ This implementation uses Android Keystore for secure key storage, providing hard ## License -MIT License - see LICENSE file for details. +MIT License - see [LICENSE](LICENSE) file for details. diff --git a/packages/local_storage_cache_android/analysis_options.yaml b/packages/local_storage_cache_android/analysis_options.yaml index bd65ec6..5c13fe4 100644 --- a/packages/local_storage_cache_android/analysis_options.yaml +++ b/packages/local_storage_cache_android/analysis_options.yaml @@ -2,5 +2,9 @@ include: package:very_good_analysis/analysis_options.yaml linter: rules: - public_member_api_docs: true lines_longer_than_80_chars: false + +analyzer: + errors: + # Ignore path dependency warning for monorepo development + invalid_dependency: ignore diff --git a/packages/local_storage_cache_android/pubspec.yaml b/packages/local_storage_cache_android/pubspec.yaml index 95265f8..e80a5ea 100644 --- a/packages/local_storage_cache_android/pubspec.yaml +++ b/packages/local_storage_cache_android/pubspec.yaml @@ -1,7 +1,6 @@ name: local_storage_cache_android description: Android implementation of the local_storage_cache plugin. version: 2.0.0 -publish_to: none homepage: https://github.com/mathtechstudio/local-storage-cache resolution: workspace diff --git a/packages/local_storage_cache_ios/README.md b/packages/local_storage_cache_ios/README.md index bc82660..2006015 100644 --- a/packages/local_storage_cache_ios/README.md +++ b/packages/local_storage_cache_ios/README.md @@ -49,4 +49,4 @@ This implementation uses iOS Keychain for secure key storage, providing hardware ## License -MIT License - see LICENSE file for details. +MIT License - see [LICENSE](LICENSE) file for details. diff --git a/packages/local_storage_cache_ios/analysis_options.yaml b/packages/local_storage_cache_ios/analysis_options.yaml index bd65ec6..5c13fe4 100644 --- a/packages/local_storage_cache_ios/analysis_options.yaml +++ b/packages/local_storage_cache_ios/analysis_options.yaml @@ -2,5 +2,9 @@ include: package:very_good_analysis/analysis_options.yaml linter: rules: - public_member_api_docs: true lines_longer_than_80_chars: false + +analyzer: + errors: + # Ignore path dependency warning for monorepo development + invalid_dependency: ignore diff --git a/packages/local_storage_cache_ios/pubspec.yaml b/packages/local_storage_cache_ios/pubspec.yaml index a91d6be..34ceb72 100644 --- a/packages/local_storage_cache_ios/pubspec.yaml +++ b/packages/local_storage_cache_ios/pubspec.yaml @@ -1,7 +1,6 @@ name: local_storage_cache_ios description: iOS implementation of the local_storage_cache plugin. version: 2.0.0 -publish_to: none homepage: https://github.com/mathtechstudio/local-storage-cache resolution: workspace diff --git a/packages/local_storage_cache_linux/README.md b/packages/local_storage_cache_linux/README.md index 2035a35..e20ff2c 100644 --- a/packages/local_storage_cache_linux/README.md +++ b/packages/local_storage_cache_linux/README.md @@ -52,4 +52,4 @@ Biometric authentication is not currently supported on Linux. This feature may b ## License -MIT License - see LICENSE file for details. +MIT License - see [LICENSE](LICENSE) file for details. diff --git a/packages/local_storage_cache_linux/analysis_options.yaml b/packages/local_storage_cache_linux/analysis_options.yaml index bd65ec6..5c13fe4 100644 --- a/packages/local_storage_cache_linux/analysis_options.yaml +++ b/packages/local_storage_cache_linux/analysis_options.yaml @@ -2,5 +2,9 @@ include: package:very_good_analysis/analysis_options.yaml linter: rules: - public_member_api_docs: true lines_longer_than_80_chars: false + +analyzer: + errors: + # Ignore path dependency warning for monorepo development + invalid_dependency: ignore diff --git a/packages/local_storage_cache_linux/pubspec.yaml b/packages/local_storage_cache_linux/pubspec.yaml index 0361bab..7587973 100644 --- a/packages/local_storage_cache_linux/pubspec.yaml +++ b/packages/local_storage_cache_linux/pubspec.yaml @@ -1,7 +1,6 @@ name: local_storage_cache_linux description: Linux implementation of the local_storage_cache plugin. version: 2.0.0 -publish_to: none homepage: https://github.com/mathtechstudio/local-storage-cache resolution: workspace diff --git a/packages/local_storage_cache_macos/README.md b/packages/local_storage_cache_macos/README.md index 7336a17..282db71 100644 --- a/packages/local_storage_cache_macos/README.md +++ b/packages/local_storage_cache_macos/README.md @@ -44,4 +44,4 @@ This implementation uses macOS Keychain for secure key storage, providing system ## License -MIT License - see LICENSE file for details. +MIT License - see [LICENSE](LICENSE) file for details. diff --git a/packages/local_storage_cache_macos/analysis_options.yaml b/packages/local_storage_cache_macos/analysis_options.yaml index bd65ec6..5c13fe4 100644 --- a/packages/local_storage_cache_macos/analysis_options.yaml +++ b/packages/local_storage_cache_macos/analysis_options.yaml @@ -2,5 +2,9 @@ include: package:very_good_analysis/analysis_options.yaml linter: rules: - public_member_api_docs: true lines_longer_than_80_chars: false + +analyzer: + errors: + # Ignore path dependency warning for monorepo development + invalid_dependency: ignore diff --git a/packages/local_storage_cache_macos/pubspec.yaml b/packages/local_storage_cache_macos/pubspec.yaml index bea0843..4182951 100644 --- a/packages/local_storage_cache_macos/pubspec.yaml +++ b/packages/local_storage_cache_macos/pubspec.yaml @@ -1,7 +1,6 @@ name: local_storage_cache_macos description: macOS implementation of the local_storage_cache plugin. version: 2.0.0 -publish_to: none homepage: https://github.com/mathtechstudio/local-storage-cache resolution: workspace diff --git a/packages/local_storage_cache_platform_interface/README.md b/packages/local_storage_cache_platform_interface/README.md index c260c0e..ce175eb 100644 --- a/packages/local_storage_cache_platform_interface/README.md +++ b/packages/local_storage_cache_platform_interface/README.md @@ -68,4 +68,4 @@ The platform interface defines methods for: ## License -MIT License - see LICENSE file for details. +MIT License - see [LICENSE](LICENSE) file for details. diff --git a/packages/local_storage_cache_platform_interface/analysis_options.yaml b/packages/local_storage_cache_platform_interface/analysis_options.yaml index bd65ec6..5c13fe4 100644 --- a/packages/local_storage_cache_platform_interface/analysis_options.yaml +++ b/packages/local_storage_cache_platform_interface/analysis_options.yaml @@ -2,5 +2,9 @@ include: package:very_good_analysis/analysis_options.yaml linter: rules: - public_member_api_docs: true lines_longer_than_80_chars: false + +analyzer: + errors: + # Ignore path dependency warning for monorepo development + invalid_dependency: ignore diff --git a/packages/local_storage_cache_web/README.md b/packages/local_storage_cache_web/README.md index 3849eb3..4e29ff6 100644 --- a/packages/local_storage_cache_web/README.md +++ b/packages/local_storage_cache_web/README.md @@ -61,4 +61,4 @@ The implementation uses `package:web` with `dart:js_interop`, following Flutter' ## License -MIT License - see LICENSE file for details. +MIT License - see [LICENSE](LICENSE) file for details. diff --git a/packages/local_storage_cache_web/analysis_options.yaml b/packages/local_storage_cache_web/analysis_options.yaml index bd65ec6..5c13fe4 100644 --- a/packages/local_storage_cache_web/analysis_options.yaml +++ b/packages/local_storage_cache_web/analysis_options.yaml @@ -2,5 +2,9 @@ include: package:very_good_analysis/analysis_options.yaml linter: rules: - public_member_api_docs: true lines_longer_than_80_chars: false + +analyzer: + errors: + # Ignore path dependency warning for monorepo development + invalid_dependency: ignore diff --git a/packages/local_storage_cache_web/pubspec.yaml b/packages/local_storage_cache_web/pubspec.yaml index bbd0847..7008986 100644 --- a/packages/local_storage_cache_web/pubspec.yaml +++ b/packages/local_storage_cache_web/pubspec.yaml @@ -1,7 +1,6 @@ name: local_storage_cache_web description: Web implementation of the local_storage_cache plugin. version: 2.0.0 -publish_to: none homepage: https://github.com/mathtechstudio/local-storage-cache resolution: workspace diff --git a/packages/local_storage_cache_windows/README.md b/packages/local_storage_cache_windows/README.md index 9f584d4..dedecaa 100644 --- a/packages/local_storage_cache_windows/README.md +++ b/packages/local_storage_cache_windows/README.md @@ -46,4 +46,4 @@ Biometric authentication is not currently supported on Windows. This feature may ## License -MIT License - see LICENSE file for details. +MIT License - see [LICENSE](LICENSE) file for details. diff --git a/packages/local_storage_cache_windows/analysis_options.yaml b/packages/local_storage_cache_windows/analysis_options.yaml index bd65ec6..5c13fe4 100644 --- a/packages/local_storage_cache_windows/analysis_options.yaml +++ b/packages/local_storage_cache_windows/analysis_options.yaml @@ -2,5 +2,9 @@ include: package:very_good_analysis/analysis_options.yaml linter: rules: - public_member_api_docs: true lines_longer_than_80_chars: false + +analyzer: + errors: + # Ignore path dependency warning for monorepo development + invalid_dependency: ignore diff --git a/packages/local_storage_cache_windows/pubspec.yaml b/packages/local_storage_cache_windows/pubspec.yaml index 389b137..8609828 100644 --- a/packages/local_storage_cache_windows/pubspec.yaml +++ b/packages/local_storage_cache_windows/pubspec.yaml @@ -1,7 +1,6 @@ name: local_storage_cache_windows description: Windows implementation of the local_storage_cache plugin. version: 2.0.0 -publish_to: none homepage: https://github.com/mathtechstudio/local-storage-cache resolution: workspace diff --git a/scripts/prepare_publish.sh b/scripts/prepare_publish.sh new file mode 100755 index 0000000..ac21e25 --- /dev/null +++ b/scripts/prepare_publish.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# Script to prepare packages for publishing to pub.dev +# This converts workspace dependencies to hosted dependencies + +set -e + +echo "🔄 Preparing packages for publishing..." + +# Function to update pubspec.yaml for publishing +update_pubspec() { + local package=$1 + local pubspec="packages/$package/pubspec.yaml" + + echo " 📦 Updating $package..." + + # Remove 'resolution: workspace' line + sed -i.bak '/^resolution: workspace$/d' "$pubspec" + + # Remove 'publish_to: none' line if exists + sed -i.bak '/^publish_to: none$/d' "$pubspec" + + # Replace path dependency with hosted + sed -i.bak 's|local_storage_cache_platform_interface:$|local_storage_cache_platform_interface: ^2.0.0|' "$pubspec" + sed -i.bak '/path: \.\.\/local_storage_cache_platform_interface/d' "$pubspec" + + # Remove backup file + rm -f "$pubspec.bak" +} + +# Update all platform packages +update_pubspec "local_storage_cache_android" +update_pubspec "local_storage_cache_ios" +update_pubspec "local_storage_cache_macos" +update_pubspec "local_storage_cache_windows" +update_pubspec "local_storage_cache_linux" +update_pubspec "local_storage_cache_web" + +# Update main package +echo " 📦 Updating local_storage_cache..." +sed -i.bak '/^resolution: workspace$/d' "packages/local_storage_cache/pubspec.yaml" +sed -i.bak '/^publish_to: none$/d' "packages/local_storage_cache/pubspec.yaml" +sed -i.bak 's|local_storage_cache_platform_interface:$|local_storage_cache_platform_interface: ^2.0.0|' "packages/local_storage_cache/pubspec.yaml" +sed -i.bak '/path: \.\.\/local_storage_cache_platform_interface/d' "packages/local_storage_cache/pubspec.yaml" +rm -f "packages/local_storage_cache/pubspec.yaml.bak" + +# Update platform interface +echo " 📦 Updating local_storage_cache_platform_interface..." +sed -i.bak '/^resolution: workspace$/d' "packages/local_storage_cache_platform_interface/pubspec.yaml" +sed -i.bak '/^publish_to: none$/d' "packages/local_storage_cache_platform_interface/pubspec.yaml" +rm -f "packages/local_storage_cache_platform_interface/pubspec.yaml.bak" + +echo "✅ All packages prepared for publishing!" +echo "" +echo "📋 Next steps:" +echo " 1. Review changes: git diff" +echo " 2. Publish platform_interface first" +echo " 3. Publish platform implementations" +echo " 4. Publish main package last" +echo "" +echo "⚠️ Remember to restore workspace mode after publishing!" +echo " Run: git checkout packages/*/pubspec.yaml"