@_nazmiforreal/flutter-ota 0.1.25 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/flutter-ota-linux-x64 +0 -0
- package/bin/flutter-ota.js +12 -11
- package/dart-src/packages/cli-tools/lib/flutter_ota_kit_cli.dart +46 -13
- package/dart-src/packages/cli-tools/lib/src/backend.dart +6 -6
- package/dart-src/packages/cli-tools/lib/src/commands/build.dart +2 -0
- package/dart-src/packages/cli-tools/lib/src/commands/bundle.dart +7 -7
- package/dart-src/packages/cli-tools/lib/src/commands/deploy.dart +4 -1
- package/dart-src/packages/cli-tools/lib/src/commands/pocketbase.dart +1 -1
- package/dart-src/packages/cli-tools/lib/src/commands/rollback.dart +1 -1
- package/dart-src/packages/cli-tools/lib/src/config.dart +5 -5
- package/dart-src/packages/cli-tools/lib/src/operations.dart +2 -2
- package/dart-src/packages/cli-tools/pubspec.yaml +8 -21
- package/dart-src/packages/cli-tools/test/backends_test.dart +3 -3
- package/dart-src/packages/cli-tools/test/cli_test.dart +1 -1
- package/dart-src/packages/cli-tools/test/mocks/mock_aws_s3_client.dart +2 -2
- package/dart-src/packages/cli-tools/test/mocks/mock_d1_client.dart +2 -2
- package/dart-src/packages/cli-tools/test/mocks/mock_pocketbase_client.dart +4 -1
- package/dart-src/packages/cli-tools/test/mocks/mock_postgres_client.dart +2 -2
- package/dart-src/packages/cli-tools/test/pocketbase_smoke_test.dart +1 -1
- package/dart-src/root/README.md +394 -0
- package/dart-src/root/analysis_options.yaml +21 -0
- package/dart-src/root/android/build.gradle +116 -0
- package/dart-src/root/android/consumer-rules.pro +23 -0
- package/dart-src/root/android/settings.gradle +1 -0
- package/dart-src/root/android/src/main/AndroidManifest.xml +21 -0
- package/dart-src/root/android/src/main/kotlin/com/flutter_patcher/flutter_patcher/ApplyResult.kt +52 -0
- package/dart-src/root/android/src/main/kotlin/com/flutter_patcher/flutter_patcher/BlacklistStore.kt +154 -0
- package/dart-src/root/android/src/main/kotlin/com/flutter_patcher/flutter_patcher/BootDiagnosticStore.kt +150 -0
- package/dart-src/root/android/src/main/kotlin/com/flutter_patcher/flutter_patcher/CrashGuard.kt +271 -0
- package/dart-src/root/android/src/main/kotlin/com/flutter_patcher/flutter_patcher/FlutterPatcherApplication.kt +201 -0
- package/dart-src/root/android/src/main/kotlin/com/flutter_patcher/flutter_patcher/FlutterPatcherAutoInitProvider.kt +93 -0
- package/dart-src/root/android/src/main/kotlin/com/flutter_patcher/flutter_patcher/FlutterPatcherPlugin.kt +245 -0
- package/dart-src/root/android/src/main/kotlin/com/flutter_patcher/flutter_patcher/LoaderHook.kt +298 -0
- package/dart-src/root/android/src/main/kotlin/com/flutter_patcher/flutter_patcher/PatchManager.kt +1579 -0
- package/dart-src/root/android/src/main/kotlin/com/flutter_patcher/flutter_patcher/PatcherConfig.kt +173 -0
- package/dart-src/root/android/src/main/kotlin/com/flutter_patcher/flutter_patcher/SignatureVerifier.kt +177 -0
- package/dart-src/root/android/src/test/kotlin/com/flutter_patcher/flutter_patcher/CrashGuardTest.kt +61 -0
- package/dart-src/root/android/src/test/kotlin/com/flutter_patcher/flutter_patcher/LoaderHookTest.kt +25 -0
- package/dart-src/root/android/src/test/kotlin/com/flutter_patcher/flutter_patcher/PatchManagerTest.kt +401 -0
- package/dart-src/root/android/src/test/kotlin/com/flutter_patcher/flutter_patcher/PatcherConfigTest.kt +30 -0
- package/dart-src/root/bin/pack.dart +182 -0
- package/dart-src/root/lib/flutter_ota_kit.dart +1170 -0
- package/dart-src/root/lib/src/app_version_resolver.dart +36 -0
- package/dart-src/root/lib/src/aws_update_source.dart +97 -0
- package/dart-src/root/lib/src/blacklist.dart +54 -0
- package/dart-src/root/lib/src/boot_diagnostic.dart +138 -0
- package/dart-src/root/lib/src/cloudflare_update_source.dart +97 -0
- package/dart-src/root/lib/src/flutter_ota_app.dart +69 -0
- package/dart-src/root/lib/src/io.dart +48 -0
- package/dart-src/root/lib/src/io_stub.dart +19 -0
- package/dart-src/root/lib/src/ota_progress_overlay.dart +987 -0
- package/dart-src/root/lib/src/pack/pack.dart +434 -0
- package/dart-src/root/lib/src/patch_info.dart +12 -0
- package/dart-src/root/lib/src/patcher_channel.dart +160 -0
- package/dart-src/{plugins/aws/lib → root/lib/src/pkg/aws}/src/aws_database.dart +1 -1
- package/dart-src/{plugins/aws/lib → root/lib/src/pkg/aws}/src/aws_s3_client.dart +1 -1
- package/dart-src/{plugins/aws/lib → root/lib/src/pkg/aws}/src/aws_storage.dart +1 -1
- package/dart-src/{plugins/aws/lib → root/lib/src/pkg/aws}/src/aws_storage_profile.dart +1 -1
- package/dart-src/{plugins/aws/lib → root/lib/src/pkg/aws}/src/with_cloudfront_signed_url.dart +1 -1
- package/dart-src/root/lib/src/pkg/client/flutter_ota_kit_client.dart +1 -0
- package/dart-src/root/lib/src/pkg/client/src/server_update_source.dart +46 -0
- package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/src/cloudflare_worker_database.dart +1 -1
- package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/src/d1_build_where.dart +1 -1
- package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/src/d1_bundle_mapper.dart +3 -3
- package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/src/d1_database.dart +1 -1
- package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/src/d1_database_plugin.dart +2 -2
- package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/src/r2_s3_client.dart +1 -1
- package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/src/r2_storage.dart +1 -1
- package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/src/r2_storage_profile.dart +1 -1
- package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/status.dart +1 -1
- package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/flutter_ota_kit_plugin_core.dart +1 -1
- package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/create_blob_database_plugin.dart +1 -1
- package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/filter_compatible_app_versions.dart +1 -1
- package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/get_update_info.dart +1 -1
- package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/request_update_bundle_state.dart +1 -1
- package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/resolve_update_info_from_bundles.dart +1 -1
- package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/types.dart +2 -2
- package/dart-src/{plugins/pocketbase/lib → root/lib/src/pkg/pocketbase}/src/pocketbase_bundle_mapper.dart +2 -2
- package/dart-src/{plugins/pocketbase/lib → root/lib/src/pkg/pocketbase}/src/pocketbase_database.dart +26 -15
- package/dart-src/{plugins/pocketbase/lib → root/lib/src/pkg/pocketbase}/src/pocketbase_storage.dart +1 -1
- package/dart-src/{plugins/postgres/lib → root/lib/src/pkg/postgres}/src/postgres_bundle_mapper.dart +2 -2
- package/dart-src/{plugins/postgres/lib → root/lib/src/pkg/postgres}/src/postgres_database.dart +2 -2
- package/dart-src/{plugins/postgres/lib → root/lib/src/pkg/postgres}/src/postgres_get_update_info.dart +2 -2
- package/dart-src/{plugins/postgres/lib → root/lib/src/pkg/postgres}/src/postgres_storage.dart +1 -1
- package/dart-src/{plugins/postgres/lib → root/lib/src/pkg/postgres}/src/postgres_types.dart +1 -1
- package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/src/supabase_bundle_mapper.dart +2 -2
- package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/src/supabase_database.dart +2 -2
- package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/src/supabase_edge_function_database.dart +1 -1
- package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/src/supabase_edge_function_storage.dart +1 -1
- package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/src/supabase_storage.dart +1 -1
- package/dart-src/root/lib/src/pocketbase_update_source.dart +107 -0
- package/dart-src/root/lib/src/postgres_update_source.dart +95 -0
- package/dart-src/root/lib/src/shared_update_check.dart +131 -0
- package/dart-src/root/lib/src/supabase_update_source.dart +93 -0
- package/dart-src/root/pubspec.yaml +54 -0
- package/package.json +2 -1
- package/scripts/postinstall.js +17 -13
- package/scripts/vendor.sh +22 -7
- package/dart-src/packages/core/CHANGELOG.md +0 -21
- package/dart-src/packages/core/README.md +0 -23
- package/dart-src/packages/core/example/lib/main.dart +0 -69
- package/dart-src/packages/core/pubspec.yaml +0 -13
- package/dart-src/packages/core/test/rollout_test.dart +0 -135
- package/dart-src/packages/core/test/semver_test.dart +0 -55
- package/dart-src/packages/core/test/semver_vectors.json +0 -1
- package/dart-src/packages/core/test/types_test.dart +0 -131
- package/dart-src/packages/core/test/uuid_test.dart +0 -40
- package/dart-src/packages/core/tool/dbg.dart +0 -7
- package/dart-src/plugins/aws/.gitkeep +0 -0
- package/dart-src/plugins/aws/CHANGELOG.md +0 -23
- package/dart-src/plugins/aws/LICENSE +0 -21
- package/dart-src/plugins/aws/README.md +0 -28
- package/dart-src/plugins/aws/example/lib/main.dart +0 -60
- package/dart-src/plugins/aws/pubspec.yaml +0 -30
- package/dart-src/plugins/aws/test/aws_database_test.dart +0 -161
- package/dart-src/plugins/aws/test/aws_storage_test.dart +0 -73
- package/dart-src/plugins/aws/test/mock_aws_s3_client.dart +0 -78
- package/dart-src/plugins/cloudflare/.gitkeep +0 -0
- package/dart-src/plugins/cloudflare/CHANGELOG.md +0 -23
- package/dart-src/plugins/cloudflare/LICENSE +0 -21
- package/dart-src/plugins/cloudflare/README.md +0 -25
- package/dart-src/plugins/cloudflare/example/lib/main.dart +0 -62
- package/dart-src/plugins/cloudflare/migrations/0001_hot-updater_init.sql +0 -16
- package/dart-src/plugins/cloudflare/migrations/0002_hot-updater_0.13.0.sql +0 -8
- package/dart-src/plugins/cloudflare/migrations/0003_hot-updater_0.18.0.sql +0 -38
- package/dart-src/plugins/cloudflare/migrations/0004_hot-updater_0.29.0.sql +0 -11
- package/dart-src/plugins/cloudflare/migrations/0005_hot-updater_0.31.0.sql +0 -24
- package/dart-src/plugins/cloudflare/pubspec.yaml +0 -28
- package/dart-src/plugins/cloudflare/sql/bundles.sql +0 -42
- package/dart-src/plugins/cloudflare/test/cloudflare_worker_database_test.dart +0 -126
- package/dart-src/plugins/cloudflare/test/d1_bundle_mapper_test.dart +0 -106
- package/dart-src/plugins/cloudflare/test/d1_database_test.dart +0 -200
- package/dart-src/plugins/cloudflare/test/mock_d1_client.dart +0 -261
- package/dart-src/plugins/cloudflare/test/mock_r2_client.dart +0 -78
- package/dart-src/plugins/cloudflare/test/r2_storage_test.dart +0 -74
- package/dart-src/plugins/plugin-core/CHANGELOG.md +0 -20
- package/dart-src/plugins/plugin-core/LICENSE +0 -21
- package/dart-src/plugins/plugin-core/README.md +0 -21
- package/dart-src/plugins/plugin-core/example/lib/main.dart +0 -61
- package/dart-src/plugins/plugin-core/pubspec.yaml +0 -23
- package/dart-src/plugins/plugin-core/test/asset_storage_layout_test.dart +0 -170
- package/dart-src/plugins/plugin-core/test/bundle_unit_of_work_store_test.dart +0 -74
- package/dart-src/plugins/plugin-core/test/bundle_unit_of_work_test.dart +0 -345
- package/dart-src/plugins/plugin-core/test/create_blob_database_plugin_test.dart +0 -843
- package/dart-src/plugins/plugin-core/test/create_database_plugin_test.dart +0 -298
- package/dart-src/plugins/plugin-core/test/create_storage_plugin_test.dart +0 -195
- package/dart-src/plugins/plugin-core/test/generate_min_bundle_id_test.dart +0 -56
- package/dart-src/plugins/plugin-core/test/get_update_info_test.dart +0 -1589
- package/dart-src/plugins/plugin-core/test/helpers_test.dart +0 -283
- package/dart-src/plugins/plugin-core/test/query_bundles_test.dart +0 -202
- package/dart-src/plugins/plugin-core/test/request_update_bundle_state_test.dart +0 -86
- package/dart-src/plugins/plugin-core/test/uuidv7_test.dart +0 -88
- package/dart-src/plugins/pocketbase/CHANGELOG.md +0 -23
- package/dart-src/plugins/pocketbase/LICENSE +0 -21
- package/dart-src/plugins/pocketbase/README.md +0 -54
- package/dart-src/plugins/pocketbase/example/lib/main.dart +0 -62
- package/dart-src/plugins/pocketbase/pubspec.yaml +0 -26
- package/dart-src/plugins/pocketbase/test/pb_uri_test.dart +0 -12
- package/dart-src/plugins/postgres/.gitkeep +0 -0
- package/dart-src/plugins/postgres/CHANGELOG.md +0 -23
- package/dart-src/plugins/postgres/LICENSE +0 -21
- package/dart-src/plugins/postgres/README.md +0 -29
- package/dart-src/plugins/postgres/example/lib/main.dart +0 -67
- package/dart-src/plugins/postgres/pubspec.yaml +0 -26
- package/dart-src/plugins/postgres/sql/bundles.sql +0 -45
- package/dart-src/plugins/postgres/sql/get_target_app_version_list.sql +0 -21
- package/dart-src/plugins/postgres/sql/get_update_info.spec.ts +0 -171
- package/dart-src/plugins/postgres/sql/get_update_info_by_app_version.sql +0 -126
- package/dart-src/plugins/postgres/sql/get_update_info_by_fingerprint_hash.sql +0 -125
- package/dart-src/plugins/postgres/sql/hash_user_id.sql +0 -30
- package/dart-src/plugins/postgres/sql/is_device_eligible.sql +0 -237
- package/dart-src/plugins/postgres/sql/prepareSql.ts +0 -11
- package/dart-src/plugins/postgres/test/mock_postgres_client.dart +0 -320
- package/dart-src/plugins/postgres/test/postgres_bundle_mapper_test.dart +0 -139
- package/dart-src/plugins/postgres/test/postgres_database_test.dart +0 -210
- package/dart-src/plugins/postgres/test/postgres_storage_runtime_test.dart +0 -60
- package/dart-src/plugins/supabase/CHANGELOG.md +0 -24
- package/dart-src/plugins/supabase/LICENSE +0 -21
- package/dart-src/plugins/supabase/README.md +0 -53
- package/dart-src/plugins/supabase/example/lib/main.dart +0 -63
- package/dart-src/plugins/supabase/pubspec.yaml +0 -27
- package/dart-src/plugins/supabase/supabase/edge-functions/index.ts +0 -44
- package/dart-src/plugins/supabase/supabase/edge-functions/runtime.docker.integration.spec.ts +0 -968
- package/dart-src/plugins/supabase/supabase/migrations/20250103114225_init.sql +0 -232
- package/dart-src/plugins/supabase/supabase/migrations/20250314000000_hot-updater_0.13.0.sql +0 -137
- package/dart-src/plugins/supabase/supabase/migrations/20250516000000_hot-updater_0.18.0.sql +0 -206
- package/dart-src/plugins/supabase/supabase/migrations/20251014000000_hot-updater_0.21.0.sql +0 -186
- package/dart-src/plugins/supabase/supabase/migrations/20260401000000_hot-updater_0.29.0.sql +0 -505
- package/dart-src/plugins/supabase/supabase/migrations/20260414000000_hot-updater_0.30.0.sql +0 -50
- package/dart-src/plugins/supabase/supabase/migrations/20260422000000_hot-updater_0.31.0.sql +0 -20
- package/dart-src/plugins/supabase/supabase/migrations/20260520014100_hot-updater_rls.sql +0 -75
- package/dart-src/plugins/supabase/test/mock_supabase_client.dart +0 -654
- package/dart-src/plugins/supabase/test/supabase_bundle_mapper_test.dart +0 -115
- package/dart-src/plugins/supabase/test/supabase_database_test.dart +0 -198
- package/dart-src/plugins/supabase/test/supabase_storage_test.dart +0 -168
- /package/dart-src/{packages/core → root}/LICENSE +0 -0
- /package/dart-src/{plugins/aws/lib → root/lib/src/pkg/aws}/flutter_ota_kit_aws.dart +0 -0
- /package/dart-src/{plugins/aws/lib → root/lib/src/pkg/aws}/src/aws_cloudfront_client.dart +0 -0
- /package/dart-src/{plugins/aws/lib → root/lib/src/pkg/aws}/src/aws_cloudfront_signer.dart +0 -0
- /package/dart-src/{plugins/aws/lib → root/lib/src/pkg/aws}/src/aws_config.dart +0 -0
- /package/dart-src/{plugins/aws/lib → root/lib/src/pkg/aws}/src/aws_ssm_client.dart +0 -0
- /package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/flutter_ota_kit_cloudflare.dart +0 -0
- /package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/src/d1_client.dart +0 -0
- /package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/src/d1_config.dart +0 -0
- /package/dart-src/{plugins/cloudflare/lib → root/lib/src/pkg/cloudflare}/src/r2_config.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/flutter_ota_kit_core.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/app_update_info.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/bundle.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/bundle_artifacts.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/bundle_patch_artifact.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/changed_asset.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/get_bundles_args.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/metadata.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/patch_info.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/platform.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/rollout.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/semver.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/semver_range.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/semver_version.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/strategy.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/update_bundle_params.dart +0 -0
- /package/dart-src/{packages/core/lib → root/lib/src/pkg/core}/src/uuid.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/asset_storage_layout.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/bundle_helpers.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/bundle_storage_layout.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/bundle_unit_of_work.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/bundle_unit_of_work_store.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/calculate_pagination.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/compression_format.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/content_addressed_assets.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/create_database_plugin.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/create_storage_key_builder.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/create_storage_plugin.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/generate_min_bundle_id.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/is_object.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/legacy_asset_storage_layout.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/paginate_bundles.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/parse_storage_uri.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/query_bundles.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/storage_helpers.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/storage_profile.dart +0 -0
- /package/dart-src/{plugins/plugin-core/lib → root/lib/src/pkg/plugin_core}/src/uuidv7.dart +0 -0
- /package/dart-src/{plugins/pocketbase/lib → root/lib/src/pkg/pocketbase}/flutter_ota_kit_pocketbase.dart +0 -0
- /package/dart-src/{plugins/pocketbase/lib → root/lib/src/pkg/pocketbase}/src/pocketbase_client.dart +0 -0
- /package/dart-src/{plugins/pocketbase/lib → root/lib/src/pkg/pocketbase}/src/pocketbase_config.dart +0 -0
- /package/dart-src/{plugins/postgres/lib → root/lib/src/pkg/postgres}/flutter_ota_kit_postgres.dart +0 -0
- /package/dart-src/{plugins/postgres/lib → root/lib/src/pkg/postgres}/src/postgres_client.dart +0 -0
- /package/dart-src/{plugins/postgres/lib → root/lib/src/pkg/postgres}/src/postgres_config.dart +0 -0
- /package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/edge.dart +0 -0
- /package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/flutter_ota_kit_supabase.dart +0 -0
- /package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/src/error_message.dart +0 -0
- /package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/src/supabase_client_adapter.dart +0 -0
- /package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/src/supabase_client_http.dart +0 -0
- /package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/src/supabase_config.dart +0 -0
- /package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/src/supabase_signed_url_batcher.dart +0 -0
- /package/dart-src/{plugins/supabase/lib → root/lib/src/pkg/supabase}/src/types.dart +0 -0
|
Binary file
|
package/bin/flutter-ota.js
CHANGED
|
@@ -55,31 +55,32 @@ if (fs.existsSync(binPath)) {
|
|
|
55
55
|
chmodIfNeeded(binPath);
|
|
56
56
|
run(binPath, process.argv.slice(2));
|
|
57
57
|
} else if (
|
|
58
|
-
spawnSync('
|
|
58
|
+
spawnSync('flutter', ['--version'], { stdio: 'ignore' }).status === 0 &&
|
|
59
59
|
fs.existsSync(sourceEntry)
|
|
60
60
|
) {
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
61
|
+
// Fallback for platforms/arches without a shipped prebuilt binary.
|
|
62
|
+
// Since v0.2.0 the CLI depends on the `flutter_ota_kit` Flutter package, so
|
|
63
|
+
// dependency resolution needs `flutter pub get` (not `dart pub get`). The CLI
|
|
64
|
+
// entrypoint itself only touches pure-Dart backend code, so `dart run` of the
|
|
65
|
+
// resolved package still works.
|
|
64
66
|
const configPath = path.join(cliDir, '.dart_tool', 'package_config.json');
|
|
65
67
|
if (!fs.existsSync(configPath)) {
|
|
66
|
-
const getRes = spawnSync('
|
|
68
|
+
const getRes = spawnSync('flutter', ['pub', 'get'], { stdio: 'inherit', cwd: cliDir });
|
|
67
69
|
if (getRes.status !== 0) {
|
|
68
70
|
console.error(
|
|
69
|
-
'flutter-ota: `
|
|
70
|
-
`a prebuilt manually:\n cd ${cliDir} &&
|
|
71
|
-
`bin/flutter_ota_kit.dart -o ${binPath}`,
|
|
71
|
+
'flutter-ota: `flutter pub get` failed. Install the Flutter SDK or ' +
|
|
72
|
+
`build a prebuilt manually:\n cd ${cliDir} && flutter pub get && ` +
|
|
73
|
+
`dart compile exe bin/flutter_ota_kit.dart -o ${binPath}`,
|
|
72
74
|
);
|
|
73
75
|
process.exit(1);
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
|
-
chmodIfNeeded(binPath);
|
|
77
78
|
run('dart', [sourceEntry, ...process.argv.slice(2)]);
|
|
78
79
|
} else {
|
|
79
80
|
console.error(
|
|
80
81
|
`flutter-ota: no prebuilt binary for ${platformName}-${archName} and ` +
|
|
81
|
-
'the
|
|
82
|
-
'platform/arch with a shipped prebuilt binary.',
|
|
82
|
+
'the Flutter SDK was not found. Install Flutter (https://flutter.dev) or ' +
|
|
83
|
+
'use a platform/arch with a shipped prebuilt binary.',
|
|
83
84
|
);
|
|
84
85
|
process.exit(1);
|
|
85
86
|
}
|
|
@@ -22,7 +22,7 @@ export 'src/util.dart';
|
|
|
22
22
|
|
|
23
23
|
// Re-export the PocketBase client so CLI commands can probe PB health
|
|
24
24
|
// without pulling the plugin in separately.
|
|
25
|
-
export 'package:
|
|
25
|
+
export 'package:flutter_ota_kit/src/pkg/pocketbase/flutter_ota_kit_pocketbase.dart'
|
|
26
26
|
show PocketBaseClient;
|
|
27
27
|
|
|
28
28
|
export 'src/commands/init.dart';
|
|
@@ -85,13 +85,15 @@ Future<int> run(List<String> args) async {
|
|
|
85
85
|
final msg = e.message;
|
|
86
86
|
|
|
87
87
|
// Missing subcommand → show the command's own help + suggestions.
|
|
88
|
+
// Handles nested paths too (e.g. "flutter-ota pocketbase records"), not
|
|
89
|
+
// just single-word commands.
|
|
88
90
|
if (msg.startsWith('Missing subcommand')) {
|
|
89
|
-
final match = RegExp(r'"flutter-ota (
|
|
91
|
+
final match = RegExp(r'"flutter-ota ([^"]+)"').firstMatch(msg);
|
|
90
92
|
if (match != null) {
|
|
91
|
-
final cmd = runner
|
|
93
|
+
final cmd = _resolveCommandPath(runner, match.group(1)!.split(' '));
|
|
92
94
|
if (cmd != null) {
|
|
93
95
|
_printMissingSubcommand(cmd);
|
|
94
|
-
return
|
|
96
|
+
return 64;
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
99
|
}
|
|
@@ -103,7 +105,7 @@ Future<int> run(List<String> args) async {
|
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
// Unknown command → fuzzy-match and suggest.
|
|
106
|
-
final unknownMatch = RegExp(r'Could not find a command named "?(\w+)"?')
|
|
108
|
+
final unknownMatch = RegExp(r'Could not find a command named "?([\w-]+)"?')
|
|
107
109
|
.firstMatch(msg);
|
|
108
110
|
if (unknownMatch != null) {
|
|
109
111
|
final typed = unknownMatch.group(1)!;
|
|
@@ -111,14 +113,15 @@ Future<int> run(List<String> args) async {
|
|
|
111
113
|
return 64;
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
// Unknown subcommand → suggest closest subcommand.
|
|
116
|
+
// Unknown subcommand → suggest closest subcommand. Handles nested parents
|
|
117
|
+
// (e.g. "... named "nope" for "flutter-ota pocketbase records"").
|
|
115
118
|
final subMatch = RegExp(
|
|
116
|
-
r'Could not find a subcommand named "?(\w+)"? for "?flutter-ota (
|
|
119
|
+
r'Could not find a subcommand named "?([\w-]+)"? for "?flutter-ota ([^"]+)"?',
|
|
117
120
|
).firstMatch(msg);
|
|
118
121
|
if (subMatch != null) {
|
|
119
122
|
final subTyped = subMatch.group(1)!;
|
|
120
|
-
final
|
|
121
|
-
final parentCmd = runner
|
|
123
|
+
final parentPath = subMatch.group(2)!.trim().split(' ');
|
|
124
|
+
final parentCmd = _resolveCommandPath(runner, parentPath);
|
|
122
125
|
if (parentCmd != null) {
|
|
123
126
|
_printUnknownSubcommand(parentCmd, subTyped);
|
|
124
127
|
return 64;
|
|
@@ -133,6 +136,22 @@ Future<int> run(List<String> args) async {
|
|
|
133
136
|
}
|
|
134
137
|
}
|
|
135
138
|
|
|
139
|
+
/// Walk a space-separated command path (e.g. `["pocketbase", "records"]`)
|
|
140
|
+
/// from the runner down through nested subcommands. Returns the resolved
|
|
141
|
+
/// [Command], or null if any segment is unknown.
|
|
142
|
+
Command<int>? _resolveCommandPath(
|
|
143
|
+
FlutterPatcherRunner runner,
|
|
144
|
+
List<String> path,
|
|
145
|
+
) {
|
|
146
|
+
if (path.isEmpty) return null;
|
|
147
|
+
Command<int>? cmd = runner.commands[path.first];
|
|
148
|
+
for (final segment in path.skip(1)) {
|
|
149
|
+
if (cmd == null) return null;
|
|
150
|
+
cmd = cmd.subcommands[segment];
|
|
151
|
+
}
|
|
152
|
+
return cmd;
|
|
153
|
+
}
|
|
154
|
+
|
|
136
155
|
/// Show a helpful "unknown command" message with fuzzy-match suggestions.
|
|
137
156
|
void _printUnknownCommand(FlutterPatcherRunner runner, String typed) {
|
|
138
157
|
final commands = runner.commands.keys.toList();
|
|
@@ -213,6 +232,7 @@ void _printUnknownCommand(FlutterPatcherRunner runner, String typed) {
|
|
|
213
232
|
/// Show a helpful "unknown subcommand" message with suggestions.
|
|
214
233
|
void _printUnknownSubcommand(Command<int> parent, String typed) {
|
|
215
234
|
final subNames = parent.subcommands.keys.toList();
|
|
235
|
+
final parentPath = _commandPath(parent);
|
|
216
236
|
|
|
217
237
|
// Find closest subcommands.
|
|
218
238
|
final suggestions = subNames
|
|
@@ -221,14 +241,14 @@ void _printUnknownSubcommand(Command<int> parent, String typed) {
|
|
|
221
241
|
|
|
222
242
|
stderr.writeln('');
|
|
223
243
|
stderr.writeln(
|
|
224
|
-
' ${_red('✗')} Unknown subcommand: ${_red(typed)} for ${_cyan('flutter-ota $
|
|
244
|
+
' ${_red('✗')} Unknown subcommand: ${_red(typed)} for ${_cyan('flutter-ota $parentPath')}',
|
|
225
245
|
);
|
|
226
246
|
stderr.writeln('');
|
|
227
247
|
|
|
228
248
|
if (suggestions.isNotEmpty) {
|
|
229
249
|
stderr.writeln(' ${_cyan('Did you mean?')}');
|
|
230
250
|
for (final s in suggestions.take(3)) {
|
|
231
|
-
stderr.writeln(' ${_green(s)}');
|
|
251
|
+
stderr.writeln(' ${_green('$parentPath $s')}');
|
|
232
252
|
}
|
|
233
253
|
stderr.writeln('');
|
|
234
254
|
}
|
|
@@ -239,17 +259,18 @@ void _printUnknownSubcommand(Command<int> parent, String typed) {
|
|
|
239
259
|
/// Show a helpful "missing subcommand" message with all subcommand suggestions.
|
|
240
260
|
void _printMissingSubcommand(Command<int> parent) {
|
|
241
261
|
final subNames = parent.subcommands.keys.toList()..sort();
|
|
262
|
+
final parentPath = _commandPath(parent);
|
|
242
263
|
|
|
243
264
|
stderr.writeln('');
|
|
244
265
|
stderr.writeln(
|
|
245
|
-
' ${_red('✗')} Missing subcommand for ${_cyan('flutter-ota $
|
|
266
|
+
' ${_red('✗')} Missing subcommand for ${_cyan('flutter-ota $parentPath')}',
|
|
246
267
|
);
|
|
247
268
|
stderr.writeln('');
|
|
248
269
|
|
|
249
270
|
if (subNames.isNotEmpty) {
|
|
250
271
|
stderr.writeln(' ${_cyan('Available subcommands:')}');
|
|
251
272
|
for (final s in subNames) {
|
|
252
|
-
stderr.writeln(' ${_green('$
|
|
273
|
+
stderr.writeln(' ${_green('$parentPath $s')}');
|
|
253
274
|
}
|
|
254
275
|
stderr.writeln('');
|
|
255
276
|
}
|
|
@@ -257,6 +278,18 @@ void _printMissingSubcommand(Command<int> parent) {
|
|
|
257
278
|
parent.printUsage();
|
|
258
279
|
}
|
|
259
280
|
|
|
281
|
+
/// Full space-separated path of a command (e.g. `pocketbase records`),
|
|
282
|
+
/// walking up the `parent` chain. The runner itself has no name in the chain.
|
|
283
|
+
String _commandPath(Command<int> command) {
|
|
284
|
+
final parts = <String>[command.name];
|
|
285
|
+
var p = command.parent;
|
|
286
|
+
while (p != null) {
|
|
287
|
+
parts.insert(0, p.name);
|
|
288
|
+
p = p.parent;
|
|
289
|
+
}
|
|
290
|
+
return parts.join(' ');
|
|
291
|
+
}
|
|
292
|
+
|
|
260
293
|
// ── Minimal Levenshtein distance ──────────────────────────────────────────────
|
|
261
294
|
|
|
262
295
|
int _levenshtein(String a, String b) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import 'package:
|
|
2
|
-
import 'package:
|
|
3
|
-
import 'package:
|
|
4
|
-
import 'package:
|
|
5
|
-
import 'package:
|
|
6
|
-
import 'package:
|
|
1
|
+
import 'package:flutter_ota_kit/src/pkg/aws/flutter_ota_kit_aws.dart';
|
|
2
|
+
import 'package:flutter_ota_kit/src/pkg/cloudflare/flutter_ota_kit_cloudflare.dart';
|
|
3
|
+
import 'package:flutter_ota_kit/src/pkg/plugin_core/flutter_ota_kit_plugin_core.dart';
|
|
4
|
+
import 'package:flutter_ota_kit/src/pkg/pocketbase/flutter_ota_kit_pocketbase.dart';
|
|
5
|
+
import 'package:flutter_ota_kit/src/pkg/postgres/flutter_ota_kit_postgres.dart';
|
|
6
|
+
import 'package:flutter_ota_kit/src/pkg/supabase/flutter_ota_kit_supabase.dart';
|
|
7
7
|
|
|
8
8
|
import 'config.dart';
|
|
9
9
|
|
|
@@ -17,10 +17,12 @@ class BuildCommand extends FlutterPatcherCommand {
|
|
|
17
17
|
)
|
|
18
18
|
..addMultiOption(
|
|
19
19
|
'assets',
|
|
20
|
+
abbr: 'A',
|
|
20
21
|
help: 'Asset keys to include as overlay updates (repeatable).',
|
|
21
22
|
)
|
|
22
23
|
..addOption(
|
|
23
24
|
'version',
|
|
25
|
+
abbr: 'V',
|
|
24
26
|
help: 'Patch version string (stored in manifest.version).',
|
|
25
27
|
)
|
|
26
28
|
..addOption(
|
|
@@ -151,7 +151,7 @@ class BundleShowCommand extends FlutterPatcherCommand {
|
|
|
151
151
|
? 'Backend provider [detected: $detected].'
|
|
152
152
|
: 'Backend provider.',
|
|
153
153
|
);
|
|
154
|
-
argParser.addOption('id', help: 'Bundle id.');
|
|
154
|
+
argParser.addOption('id', abbr: 'i', help: 'Bundle id.');
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
final FlutterPatcherConfig? config;
|
|
@@ -201,7 +201,7 @@ class BundleDeleteCommand extends FlutterPatcherCommand {
|
|
|
201
201
|
? 'Backend provider [detected: $detected].'
|
|
202
202
|
: 'Backend provider.',
|
|
203
203
|
);
|
|
204
|
-
argParser.addOption('id', help: 'Bundle id.');
|
|
204
|
+
argParser.addOption('id', abbr: 'i', help: 'Bundle id.');
|
|
205
205
|
argParser.addFlag(
|
|
206
206
|
'keep-storage',
|
|
207
207
|
help: 'Do not delete the storage object.',
|
|
@@ -252,7 +252,7 @@ class BundleDisableCommand extends FlutterPatcherCommand {
|
|
|
252
252
|
? 'Backend provider [detected: $detected].'
|
|
253
253
|
: 'Backend provider.',
|
|
254
254
|
);
|
|
255
|
-
argParser.addOption('id', help: 'Bundle id.');
|
|
255
|
+
argParser.addOption('id', abbr: 'i', help: 'Bundle id.');
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
final FlutterPatcherConfig? config;
|
|
@@ -290,7 +290,7 @@ class BundleEnableCommand extends FlutterPatcherCommand {
|
|
|
290
290
|
? 'Backend provider [detected: $detected].'
|
|
291
291
|
: 'Backend provider.',
|
|
292
292
|
);
|
|
293
|
-
argParser.addOption('id', help: 'Bundle id.');
|
|
293
|
+
argParser.addOption('id', abbr: 'i', help: 'Bundle id.');
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
final FlutterPatcherConfig? config;
|
|
@@ -328,7 +328,7 @@ class BundleForceCommand extends FlutterPatcherCommand {
|
|
|
328
328
|
? 'Backend provider [detected: $detected].'
|
|
329
329
|
: 'Backend provider.',
|
|
330
330
|
);
|
|
331
|
-
argParser.addOption('id', help: 'Bundle id.');
|
|
331
|
+
argParser.addOption('id', abbr: 'i', help: 'Bundle id.');
|
|
332
332
|
argParser.addFlag(
|
|
333
333
|
'off',
|
|
334
334
|
help: 'Clear the force-update flag instead of setting it.',
|
|
@@ -377,7 +377,7 @@ class BundlePromoteCommand extends FlutterPatcherCommand {
|
|
|
377
377
|
? 'Backend provider [detected: $detected].'
|
|
378
378
|
: 'Backend provider.',
|
|
379
379
|
);
|
|
380
|
-
argParser.addOption('id', help: 'Bundle id.');
|
|
380
|
+
argParser.addOption('id', abbr: 'i', help: 'Bundle id.');
|
|
381
381
|
argParser.addOption('channel', abbr: 'c', help: 'Target channel.');
|
|
382
382
|
}
|
|
383
383
|
|
|
@@ -426,7 +426,7 @@ class BundleUpdateCommand extends FlutterPatcherCommand {
|
|
|
426
426
|
? 'Backend provider [detected: $detected].'
|
|
427
427
|
: 'Backend provider.',
|
|
428
428
|
);
|
|
429
|
-
argParser.addOption('id', help: 'Bundle id.');
|
|
429
|
+
argParser.addOption('id', abbr: 'i', help: 'Bundle id.');
|
|
430
430
|
argParser.addOption('message', abbr: 'm', help: 'New release message.');
|
|
431
431
|
argParser.addOption(
|
|
432
432
|
'target-version',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'dart:io';
|
|
2
2
|
|
|
3
|
-
import 'package:
|
|
3
|
+
import 'package:flutter_ota_kit/src/pkg/core/flutter_ota_kit_core.dart';
|
|
4
4
|
|
|
5
5
|
import '../backend.dart';
|
|
6
6
|
import '../cli_base.dart';
|
|
@@ -37,10 +37,12 @@ class DeployCommand extends FlutterPatcherCommand {
|
|
|
37
37
|
argParser.addFlag('force', abbr: 'f', help: 'Force the update on clients.');
|
|
38
38
|
argParser.addOption(
|
|
39
39
|
'target-app-version',
|
|
40
|
+
abbr: 't',
|
|
40
41
|
help: 'Semver range target (XOR with fingerprint-hash).',
|
|
41
42
|
);
|
|
42
43
|
argParser.addOption(
|
|
43
44
|
'fingerprint-hash',
|
|
45
|
+
abbr: 'F',
|
|
44
46
|
help: 'Fingerprint hash target (XOR with target-app-version).',
|
|
45
47
|
);
|
|
46
48
|
argParser.addOption(
|
|
@@ -50,6 +52,7 @@ class DeployCommand extends FlutterPatcherCommand {
|
|
|
50
52
|
);
|
|
51
53
|
argParser.addOption(
|
|
52
54
|
'git-commit-hash',
|
|
55
|
+
abbr: 'g',
|
|
53
56
|
help: 'Git commit hash (auto-detected).',
|
|
54
57
|
);
|
|
55
58
|
argParser.addOption(
|
|
@@ -6,7 +6,7 @@ import 'dart:convert';
|
|
|
6
6
|
import 'dart:io';
|
|
7
7
|
|
|
8
8
|
import 'package:args/args.dart';
|
|
9
|
-
import 'package:
|
|
9
|
+
import 'package:flutter_ota_kit/src/pkg/pocketbase/flutter_ota_kit_pocketbase.dart';
|
|
10
10
|
import 'package:path/path.dart' as p;
|
|
11
11
|
|
|
12
12
|
import '../cli_base.dart';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import 'dart:convert';
|
|
2
2
|
import 'dart:io';
|
|
3
3
|
|
|
4
|
-
import 'package:
|
|
4
|
+
import 'package:flutter_ota_kit/src/pkg/aws/flutter_ota_kit_aws.dart';
|
|
5
5
|
import 'package:postgres/postgres.dart';
|
|
6
|
-
import 'package:
|
|
7
|
-
import 'package:
|
|
8
|
-
import 'package:
|
|
6
|
+
import 'package:flutter_ota_kit/src/pkg/cloudflare/flutter_ota_kit_cloudflare.dart';
|
|
7
|
+
import 'package:flutter_ota_kit/src/pkg/pocketbase/flutter_ota_kit_pocketbase.dart';
|
|
8
|
+
import 'package:flutter_ota_kit/src/pkg/postgres/flutter_ota_kit_postgres.dart';
|
|
9
9
|
|
|
10
|
-
import 'package:
|
|
10
|
+
import 'package:flutter_ota_kit/src/pkg/supabase/flutter_ota_kit_supabase.dart';
|
|
11
11
|
import 'package:path/path.dart' as p;
|
|
12
12
|
|
|
13
13
|
/// Resolved configuration for the flutter_ota_kit CLI.
|
|
@@ -2,8 +2,8 @@ import 'dart:convert';
|
|
|
2
2
|
import 'dart:io';
|
|
3
3
|
|
|
4
4
|
import 'package:crypto/crypto.dart';
|
|
5
|
-
import 'package:
|
|
6
|
-
import 'package:
|
|
5
|
+
import 'package:flutter_ota_kit/src/pkg/core/flutter_ota_kit_core.dart';
|
|
6
|
+
import 'package:flutter_ota_kit/src/pkg/plugin_core/flutter_ota_kit_plugin_core.dart';
|
|
7
7
|
|
|
8
8
|
import 'backend.dart';
|
|
9
9
|
import 'sign.dart';
|
|
@@ -8,6 +8,7 @@ publish_to: none
|
|
|
8
8
|
|
|
9
9
|
environment:
|
|
10
10
|
sdk: '>=3.13.2 <4.0.0'
|
|
11
|
+
flutter: '>=3.47.2'
|
|
11
12
|
|
|
12
13
|
dependencies:
|
|
13
14
|
args: '>=2.4.0 <3.0.0'
|
|
@@ -17,13 +18,11 @@ dependencies:
|
|
|
17
18
|
collection: ^1.18.0
|
|
18
19
|
cryptography: ^2.7.0
|
|
19
20
|
postgres: ^3.4.0
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
flutter_ota_kit_aws: ^0.1.7
|
|
26
|
-
flutter_ota_kit_pocketbase: ^0.1.4
|
|
21
|
+
# All former sub-packages (core, plugin-core, backends) now live inside the
|
|
22
|
+
# merged `flutter_ota_kit` package under lib/src/pkg/. The CLI depends on the
|
|
23
|
+
# single package instead of eight. NOTE: `flutter_ota_kit` is a Flutter plugin,
|
|
24
|
+
# so building the CLI now requires the Flutter SDK (not just the Dart SDK).
|
|
25
|
+
flutter_ota_kit: ^0.2.0
|
|
27
26
|
http: ^1.2.0
|
|
28
27
|
shelf: ^1.4.0
|
|
29
28
|
|
|
@@ -31,17 +30,5 @@ dev_dependencies:
|
|
|
31
30
|
test: ^1.25.0
|
|
32
31
|
|
|
33
32
|
dependency_overrides:
|
|
34
|
-
|
|
35
|
-
path:
|
|
36
|
-
flutter_ota_kit_plugin_core:
|
|
37
|
-
path: ../../plugins/plugin-core
|
|
38
|
-
flutter_ota_kit_supabase:
|
|
39
|
-
path: ../../plugins/supabase
|
|
40
|
-
flutter_ota_kit_postgres:
|
|
41
|
-
path: ../../plugins/postgres
|
|
42
|
-
flutter_ota_kit_cloudflare:
|
|
43
|
-
path: ../../plugins/cloudflare
|
|
44
|
-
flutter_ota_kit_aws:
|
|
45
|
-
path: ../../plugins/aws
|
|
46
|
-
flutter_ota_kit_pocketbase:
|
|
47
|
-
path: ../../plugins/pocketbase
|
|
33
|
+
flutter_ota_kit:
|
|
34
|
+
path: ../../root
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import 'dart:io';
|
|
2
2
|
|
|
3
|
-
import 'package:
|
|
3
|
+
import 'package:flutter_ota_kit/src/pkg/aws/flutter_ota_kit_aws.dart';
|
|
4
4
|
import 'package:flutter_ota_kit_cli/flutter_ota_kit_cli.dart';
|
|
5
|
-
import 'package:
|
|
6
|
-
import 'package:
|
|
5
|
+
import 'package:flutter_ota_kit/src/pkg/cloudflare/flutter_ota_kit_cloudflare.dart';
|
|
6
|
+
import 'package:flutter_ota_kit/src/pkg/plugin_core/flutter_ota_kit_plugin_core.dart';
|
|
7
7
|
import 'package:test/test.dart';
|
|
8
8
|
|
|
9
9
|
import 'mocks/mock_aws_s3_client.dart' as aws;
|
|
@@ -2,7 +2,7 @@ import 'dart:io';
|
|
|
2
2
|
import 'dart:typed_data';
|
|
3
3
|
|
|
4
4
|
import 'package:flutter_ota_kit_cli/flutter_ota_kit_cli.dart';
|
|
5
|
-
import 'package:
|
|
5
|
+
import 'package:flutter_ota_kit/src/pkg/supabase/src/supabase_client_adapter.dart';
|
|
6
6
|
import 'package:path/path.dart' as p;
|
|
7
7
|
import 'package:test/test.dart';
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import 'dart:convert' show utf8;
|
|
2
2
|
|
|
3
|
-
import 'package:
|
|
3
|
+
import 'package:flutter_ota_kit/src/pkg/plugin_core/flutter_ota_kit_plugin_core.dart'
|
|
4
4
|
show StorageObject;
|
|
5
5
|
|
|
6
|
-
import 'package:
|
|
6
|
+
import 'package:flutter_ota_kit/src/pkg/aws/flutter_ota_kit_aws.dart'
|
|
7
7
|
show AwsS3ClientLike, AwsS3StorageConfig;
|
|
8
8
|
|
|
9
9
|
/// In-memory store backing [MockAwsS3Client].
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import 'dart:convert' show jsonDecode;
|
|
2
2
|
|
|
3
|
-
import 'package:
|
|
3
|
+
import 'package:flutter_ota_kit/src/pkg/cloudflare/flutter_ota_kit_cloudflare.dart'
|
|
4
4
|
show
|
|
5
5
|
CloudflareWorkerDatabaseConfig,
|
|
6
6
|
D1ClientLike,
|
|
7
7
|
D1DatabaseConfig,
|
|
8
8
|
cloudflareWorkerDatabase,
|
|
9
9
|
d1Database;
|
|
10
|
-
import 'package:
|
|
10
|
+
import 'package:flutter_ota_kit/src/pkg/plugin_core/flutter_ota_kit_plugin_core.dart'
|
|
11
11
|
show DatabasePlugin;
|
|
12
12
|
|
|
13
13
|
/// In-memory store backing [MockD1Client], mirroring the D1 tables.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/// `backends_test.dart`.
|
|
6
6
|
library;
|
|
7
7
|
|
|
8
|
-
import 'package:
|
|
8
|
+
import 'package:flutter_ota_kit/src/pkg/pocketbase/flutter_ota_kit_pocketbase.dart';
|
|
9
9
|
import 'package:http/http.dart' as http;
|
|
10
10
|
|
|
11
11
|
class MockPocketBaseClient implements PocketBaseClient {
|
|
@@ -18,6 +18,9 @@ class MockPocketBaseClient implements PocketBaseClient {
|
|
|
18
18
|
String? _email;
|
|
19
19
|
String? _password;
|
|
20
20
|
|
|
21
|
+
@override
|
|
22
|
+
String get authToken => (_email != null && _password != null) ? 'mock-token' : '';
|
|
23
|
+
|
|
21
24
|
@override
|
|
22
25
|
void adminCredentials(String email, String password) {
|
|
23
26
|
_email = email;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'dart:typed_data';
|
|
2
2
|
|
|
3
|
-
import 'package:
|
|
3
|
+
import 'package:flutter_ota_kit/src/pkg/plugin_core/flutter_ota_kit_plugin_core.dart';
|
|
4
4
|
|
|
5
|
-
import 'package:
|
|
5
|
+
import 'package:flutter_ota_kit/src/pkg/postgres/flutter_ota_kit_postgres.dart';
|
|
6
6
|
|
|
7
7
|
/// In-memory store backing [MockPostgresClient]. Mirrors the `bundles` and
|
|
8
8
|
/// `bundle_patches` tables (snake_case row maps).
|