diff --git a/demos/supabase-anonymous-auth/pubspec.lock b/demos/supabase-anonymous-auth/pubspec.lock index 6bb0d8da..0e804340 100644 --- a/demos/supabase-anonymous-auth/pubspec.lock +++ b/demos/supabase-anonymous-auth/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: app_links - sha256: "4e392b5eba997df356ca6021f28431ce1cfeb16758699553a94b13add874a3bb" + sha256: "42dc15aecf2618ace4ffb74a2e58a50e45cd1b9f2c17c8f0cafe4c297f08c815" url: "https://pub.dev" source: hosted - version: "3.5.0" + version: "4.0.1" async: dependency: transitive description: @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "3b276c838ff7f8e19aac18a51f9b388715268f3534eaaf8047c8455ef3c1738d" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.16.0" fake_async: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: @@ -130,10 +130,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" flutter_test: dependency: "direct dev" description: flutter @@ -156,10 +156,10 @@ packages: dependency: transitive description: name: gotrue - sha256: "1bf6354278a98b8a1867263e94921da8a239de07e9babceab2b4e80af651a098" + sha256: a0eee21a7e8ec09e6bbd5c9a36e31e423827b575ba6fc2dd049805dcfaac5b02 url: "https://pub.dev" source: hosted - version: "2.5.1" + version: "2.6.0" gtk: dependency: transitive description: @@ -172,10 +172,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" http_parser: dependency: transitive description: @@ -200,6 +200,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lints: dependency: transitive description: @@ -220,26 +244,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" mime: dependency: transitive description: @@ -260,10 +284,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: "direct main" description: @@ -276,10 +300,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" + sha256: "51f0d2c554cfbc9d6a312ab35152fc77e2f0b758ce9f1a444a3a1e5b8f3c6b7f" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" path_provider_foundation: dependency: transitive description: @@ -342,15 +366,15 @@ packages: path: "../../packages/powersync" relative: true source: path - version: "1.3.0-alpha.2" + version: "1.3.0-alpha.3" realtime_client: dependency: transitive description: name: realtime_client - sha256: "41d6c5e0327d6c270b98b79bfed672928244af60e2856770f3eff697f9efe459" + sha256: bb6747fe2feff7f8349d563ac9d4a8f10ac2dd809bdff1e7e319321d5ea16b49 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" retry: dependency: transitive description: @@ -411,10 +435,10 @@ packages: dependency: transitive description: name: shared_preferences_web - sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf + sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" shared_preferences_windows: dependency: transitive description: @@ -448,10 +472,10 @@ packages: dependency: transitive description: name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + sha256: "1abbeb84bf2b1a10e5e1138c913123c8aa9d83cd64e5f9a0dd847b3c83063202" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.2" sqlite3_flutter_libs: dependency: transitive description: @@ -464,10 +488,10 @@ packages: dependency: "direct main" description: name: sqlite_async - sha256: "7a68036b2fc2fae5fc0efbc6bd436deb79e39090282348d979e6a7c38c8d067e" + sha256: cfe14e9b10db9f40f550125f4a8528ad5f891754a4852bf1c1622a4b0192e80c url: "https://pub.dev" source: hosted - version: "0.7.0-alpha.2" + version: "0.7.0-alpha.3" stack_trace: dependency: transitive description: @@ -504,18 +528,18 @@ packages: dependency: transitive description: name: supabase - sha256: f431753d2a4cb9dacd72c7378154f806c2b2cef23859bd9cee1add23821e874d + sha256: "2ddedf13f6dc013084569673dff7a7d540f5eacdd5b36fede8d58322e5d79c55" url: "https://pub.dev" source: hosted - version: "2.0.8" + version: "2.1.0" supabase_flutter: dependency: "direct main" description: name: supabase_flutter - sha256: "30e966b89ee61dc9de845e2d7e1c60967b3189c410d105c6d42f09b6259f4cb6" + sha256: "2d9683a15098258de137cb9182e695fa2a1a0f366c7409c2a6e6d47bc5a42be3" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.5.0" term_glyph: dependency: transitive description: @@ -552,10 +576,10 @@ packages: dependency: transitive description: name: url_launcher - sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c + sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.2.5" url_launcher_android: dependency: transitive description: @@ -568,10 +592,10 @@ packages: dependency: transitive description: name: url_launcher_ios - sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.2.5" url_launcher_linux: dependency: transitive description: @@ -600,10 +624,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" + sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" url_launcher_windows: dependency: transitive description: @@ -616,10 +640,10 @@ packages: dependency: transitive description: name: uuid - sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 + sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" url: "https://pub.dev" source: hosted - version: "4.3.3" + version: "4.4.0" vector_math: dependency: transitive description: @@ -628,30 +652,38 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" web: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" win32: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.4.0" xdg_directories: dependency: transitive description: @@ -669,5 +701,5 @@ packages: source: hosted version: "2.0.0" sdks: - dart: ">=3.2.3 <4.0.0" - flutter: ">=3.13.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.19.0" diff --git a/demos/supabase-edge-function-auth/pubspec.lock b/demos/supabase-edge-function-auth/pubspec.lock index 6bb0d8da..0e804340 100644 --- a/demos/supabase-edge-function-auth/pubspec.lock +++ b/demos/supabase-edge-function-auth/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: app_links - sha256: "4e392b5eba997df356ca6021f28431ce1cfeb16758699553a94b13add874a3bb" + sha256: "42dc15aecf2618ace4ffb74a2e58a50e45cd1b9f2c17c8f0cafe4c297f08c815" url: "https://pub.dev" source: hosted - version: "3.5.0" + version: "4.0.1" async: dependency: transitive description: @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "3b276c838ff7f8e19aac18a51f9b388715268f3534eaaf8047c8455ef3c1738d" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.16.0" fake_async: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: @@ -130,10 +130,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" flutter_test: dependency: "direct dev" description: flutter @@ -156,10 +156,10 @@ packages: dependency: transitive description: name: gotrue - sha256: "1bf6354278a98b8a1867263e94921da8a239de07e9babceab2b4e80af651a098" + sha256: a0eee21a7e8ec09e6bbd5c9a36e31e423827b575ba6fc2dd049805dcfaac5b02 url: "https://pub.dev" source: hosted - version: "2.5.1" + version: "2.6.0" gtk: dependency: transitive description: @@ -172,10 +172,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" http_parser: dependency: transitive description: @@ -200,6 +200,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lints: dependency: transitive description: @@ -220,26 +244,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" mime: dependency: transitive description: @@ -260,10 +284,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: "direct main" description: @@ -276,10 +300,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" + sha256: "51f0d2c554cfbc9d6a312ab35152fc77e2f0b758ce9f1a444a3a1e5b8f3c6b7f" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" path_provider_foundation: dependency: transitive description: @@ -342,15 +366,15 @@ packages: path: "../../packages/powersync" relative: true source: path - version: "1.3.0-alpha.2" + version: "1.3.0-alpha.3" realtime_client: dependency: transitive description: name: realtime_client - sha256: "41d6c5e0327d6c270b98b79bfed672928244af60e2856770f3eff697f9efe459" + sha256: bb6747fe2feff7f8349d563ac9d4a8f10ac2dd809bdff1e7e319321d5ea16b49 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" retry: dependency: transitive description: @@ -411,10 +435,10 @@ packages: dependency: transitive description: name: shared_preferences_web - sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf + sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" shared_preferences_windows: dependency: transitive description: @@ -448,10 +472,10 @@ packages: dependency: transitive description: name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + sha256: "1abbeb84bf2b1a10e5e1138c913123c8aa9d83cd64e5f9a0dd847b3c83063202" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.2" sqlite3_flutter_libs: dependency: transitive description: @@ -464,10 +488,10 @@ packages: dependency: "direct main" description: name: sqlite_async - sha256: "7a68036b2fc2fae5fc0efbc6bd436deb79e39090282348d979e6a7c38c8d067e" + sha256: cfe14e9b10db9f40f550125f4a8528ad5f891754a4852bf1c1622a4b0192e80c url: "https://pub.dev" source: hosted - version: "0.7.0-alpha.2" + version: "0.7.0-alpha.3" stack_trace: dependency: transitive description: @@ -504,18 +528,18 @@ packages: dependency: transitive description: name: supabase - sha256: f431753d2a4cb9dacd72c7378154f806c2b2cef23859bd9cee1add23821e874d + sha256: "2ddedf13f6dc013084569673dff7a7d540f5eacdd5b36fede8d58322e5d79c55" url: "https://pub.dev" source: hosted - version: "2.0.8" + version: "2.1.0" supabase_flutter: dependency: "direct main" description: name: supabase_flutter - sha256: "30e966b89ee61dc9de845e2d7e1c60967b3189c410d105c6d42f09b6259f4cb6" + sha256: "2d9683a15098258de137cb9182e695fa2a1a0f366c7409c2a6e6d47bc5a42be3" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.5.0" term_glyph: dependency: transitive description: @@ -552,10 +576,10 @@ packages: dependency: transitive description: name: url_launcher - sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c + sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.2.5" url_launcher_android: dependency: transitive description: @@ -568,10 +592,10 @@ packages: dependency: transitive description: name: url_launcher_ios - sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.2.5" url_launcher_linux: dependency: transitive description: @@ -600,10 +624,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" + sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" url_launcher_windows: dependency: transitive description: @@ -616,10 +640,10 @@ packages: dependency: transitive description: name: uuid - sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 + sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" url: "https://pub.dev" source: hosted - version: "4.3.3" + version: "4.4.0" vector_math: dependency: transitive description: @@ -628,30 +652,38 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" web: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" win32: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.4.0" xdg_directories: dependency: transitive description: @@ -669,5 +701,5 @@ packages: source: hosted version: "2.0.0" sdks: - dart: ">=3.2.3 <4.0.0" - flutter: ">=3.13.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.19.0" diff --git a/demos/supabase-simple-chat/README.md b/demos/supabase-simple-chat/README.md index 6c892968..b9606126 100644 --- a/demos/supabase-simple-chat/README.md +++ b/demos/supabase-simple-chat/README.md @@ -4,8 +4,10 @@ Based on the Supabase Flutter tutorial to build a simple chat app: 3.43.1) + - sqlite3 (~> 3.45.1) - sqlite3/fts5 - sqlite3/perf-threadsafe - sqlite3/rtree @@ -64,15 +64,15 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: app_links: 5ef33d0d295a89d9d16bb81b0e3b0d5f70d6c875 - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 - shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c + shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440 - sqlite3: e0a0623a33a20a47cb5921552aebc6e9e437dc91 - sqlite3_flutter_libs: 0d61e18fab1bed977dbd2d2fc76a726044ca00e7 - url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 - webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a + sqlite3: 73b7fc691fdc43277614250e04d183740cb15078 + sqlite3_flutter_libs: af0e8fe9bce48abddd1ffdbbf839db0302d72d80 + url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812 + webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36 -PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189 +PODFILE CHECKSUM: 7be2f5f74864d463a8ad433546ed1de7e0f29aef -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2 diff --git a/demos/supabase-simple-chat/pubspec.lock b/demos/supabase-simple-chat/pubspec.lock index c678a36c..1166ab2d 100644 --- a/demos/supabase-simple-chat/pubspec.lock +++ b/demos/supabase-simple-chat/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: app_links - sha256: "4e392b5eba997df356ca6021f28431ce1cfeb16758699553a94b13add874a3bb" + sha256: "3ced568a5d9e309e99af71285666f1f3117bddd0bd5b3317979dccc1a40cada4" url: "https://pub.dev" source: hosted - version: "3.5.0" + version: "3.5.1" async: dependency: transitive description: @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "3b276c838ff7f8e19aac18a51f9b388715268f3534eaaf8047c8455ef3c1738d" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.16.0" fake_async: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: @@ -138,10 +138,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" flutter_test: dependency: "direct dev" description: flutter @@ -196,10 +196,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" http_parser: dependency: transitive description: @@ -232,6 +232,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lints: dependency: transitive description: @@ -252,26 +276,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" mime: dependency: transitive description: @@ -292,10 +316,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: "direct main" description: @@ -308,10 +332,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" + sha256: "51f0d2c554cfbc9d6a312ab35152fc77e2f0b758ce9f1a444a3a1e5b8f3c6b7f" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" path_provider_foundation: dependency: transitive description: @@ -374,7 +398,7 @@ packages: path: "../../packages/powersync" relative: true source: path - version: "1.3.0-alpha.2" + version: "1.3.0-alpha.3" realtime_client: dependency: transitive description: @@ -443,10 +467,10 @@ packages: dependency: transitive description: name: shared_preferences_web - sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf + sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" shared_preferences_windows: dependency: transitive description: @@ -467,10 +491,10 @@ packages: dependency: transitive description: name: sign_in_with_apple_platform_interface - sha256: a5883edee09ed6be19de19e7d9f618a617fe41a6fa03f76d082dfb787e9ea18d + sha256: c2ef2ce6273fce0c61acd7e9ff5be7181e33d7aa2b66508b39418b786cca2119 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" sign_in_with_apple_web: dependency: transitive description: @@ -504,10 +528,10 @@ packages: dependency: transitive description: name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + sha256: "1abbeb84bf2b1a10e5e1138c913123c8aa9d83cd64e5f9a0dd847b3c83063202" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.2" sqlite3_flutter_libs: dependency: transitive description: @@ -520,10 +544,10 @@ packages: dependency: transitive description: name: sqlite_async - sha256: "91f454cddc85617bea2c7c1544ff386887d0d2cf0ecdb3599015c05cc141ff4d" + sha256: cfe14e9b10db9f40f550125f4a8528ad5f891754a4852bf1c1622a4b0192e80c url: "https://pub.dev" source: hosted - version: "0.7.0-alpha.1" + version: "0.7.0-alpha.3" stack_trace: dependency: transitive description: @@ -616,10 +640,10 @@ packages: dependency: transitive description: name: url_launcher - sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c + sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.2.5" url_launcher_android: dependency: transitive description: @@ -632,10 +656,10 @@ packages: dependency: transitive description: name: url_launcher_ios - sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.2.5" url_launcher_linux: dependency: transitive description: @@ -664,10 +688,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" + sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" url_launcher_windows: dependency: transitive description: @@ -680,10 +704,10 @@ packages: dependency: transitive description: name: uuid - sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 + sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" url: "https://pub.dev" source: hosted - version: "4.3.3" + version: "4.4.0" vector_math: dependency: transitive description: @@ -692,22 +716,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" web: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" webview_flutter: dependency: transitive description: @@ -720,10 +752,10 @@ packages: dependency: transitive description: name: webview_flutter_android - sha256: "3e5f4e9d818086b0d01a66fb1ff9cc72ab0cc58c71980e3d3661c5685ea0efb0" + sha256: f038ee2fae73b509dde1bc9d2c5a50ca92054282de17631a9a3d515883740934 url: "https://pub.dev" source: hosted - version: "3.15.0" + version: "3.16.0" webview_flutter_platform_interface: dependency: transitive description: @@ -736,18 +768,18 @@ packages: dependency: transitive description: name: webview_flutter_wkwebview - sha256: "9bf168bccdf179ce90450b5f37e36fe263f591c9338828d6bf09b6f8d0f57f86" + sha256: f12f8d8a99784b863e8b85e4a9a5e3cf1839d6803d2c0c3e0533a8f3c5a992a7 url: "https://pub.dev" source: hosted - version: "3.12.0" + version: "3.13.0" win32: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.4.0" xdg_directories: dependency: transitive description: @@ -765,5 +797,5 @@ packages: source: hosted version: "1.1.1" sdks: - dart: ">=3.2.3 <4.0.0" - flutter: ">=3.16.6" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.19.0" diff --git a/demos/supabase-todolist/README.md b/demos/supabase-todolist/README.md index b9524d48..79bb04ff 100644 --- a/demos/supabase-todolist/README.md +++ b/demos/supabase-todolist/README.md @@ -6,13 +6,13 @@ Demo app demonstrating use of the PowerSync SDK for Flutter together with Supaba # Running the app -Install the Flutter SDK, then: +Ensure you have [melos](https://melos.invertase.dev/~melos-latest/getting-started) installed. -```sh -cp lib/app_config_template.dart lib/app_config.dart -flutter pub get -flutter run -``` +1. `cd demos/supabase-todolist` +2. `melos prepare` +3. `cp lib/app_config_template.dart lib/app_config.dart` +4. Insert your Supabase and PowerSync project credentials into `lib/app_config.dart` (See instructions below) +5. `flutter run` # Set up Supabase Project diff --git a/demos/supabase-todolist/ios/Podfile b/demos/supabase-todolist/ios/Podfile index 656de635..e9f73048 100644 --- a/demos/supabase-todolist/ios/Podfile +++ b/demos/supabase-todolist/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '12.0' +platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/demos/supabase-todolist/ios/Podfile.lock b/demos/supabase-todolist/ios/Podfile.lock index 8acfd0ee..56f60723 100644 --- a/demos/supabase-todolist/ios/Podfile.lock +++ b/demos/supabase-todolist/ios/Podfile.lock @@ -67,6 +67,6 @@ SPEC CHECKSUMS: sqlite3_flutter_libs: af0e8fe9bce48abddd1ffdbbf839db0302d72d80 url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812 -PODFILE CHECKSUM: 13e359f40c4925bcdf0c1bfa13aeba35011fde30 +PODFILE CHECKSUM: f7b3cb7384a2d5da4b22b090e1f632de7f377987 -COCOAPODS: 1.13.0 +COCOAPODS: 1.15.2 diff --git a/demos/supabase-todolist/lib/attachments/queue.dart b/demos/supabase-todolist/lib/attachments/queue.dart index 07a4b995..75273309 100644 --- a/demos/supabase-todolist/lib/attachments/queue.dart +++ b/demos/supabase-todolist/lib/attachments/queue.dart @@ -74,9 +74,9 @@ class PhotoAttachmentQueue extends AbstractAttachmentQueue { return results.map((row) => row['photo_id'] as String).toList(); }).listen((ids) async { List idsInQueue = await attachmentsService.getAttachmentIds(); - for (String id in ids) { - await syncingService.reconcileId(id, idsInQueue, fileExtension); - } + List relevantIds = + ids.where((element) => !idsInQueue.contains(element)).toList(); + syncingService.processIds(relevantIds, fileExtension); }); } } diff --git a/demos/supabase-todolist/pubspec.lock b/demos/supabase-todolist/pubspec.lock index 773523c0..e48e2e3d 100644 --- a/demos/supabase-todolist/pubspec.lock +++ b/demos/supabase-todolist/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: app_links - sha256: "4e392b5eba997df356ca6021f28431ce1cfeb16758699553a94b13add874a3bb" + sha256: "42dc15aecf2618ace4ffb74a2e58a50e45cd1b9f2c17c8f0cafe4c297f08c815" url: "https://pub.dev" source: hosted - version: "3.5.0" + version: "4.0.1" archive: dependency: transitive description: @@ -45,34 +45,34 @@ packages: dependency: transitive description: name: camera_android - sha256: "351429510121d179b9aac5a2e8cb525c3cd6c39f4d709c5f72dfb21726e52371" + sha256: "7b0aba6398afa8475e2bc9115d976efb49cf8db781e922572d443795c04a4f4f" url: "https://pub.dev" source: hosted - version: "0.10.8+16" + version: "0.10.9+1" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "7d0763dfcbf060f56aa254a68c103210280bee9e97bbe4fdef23e257a4f70ab9" + sha256: "5d009ae48de1c8ab621b1c4496dadb6e2a83f3223b76c6e6a4a252414105f561" url: "https://pub.dev" source: hosted - version: "0.9.14" + version: "0.9.15" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - sha256: fceb2c36038b6392317b1d5790c6ba9e6ca9f1da3031181b8bea03882bf9387a + sha256: a250314a48ea337b35909a4c9d5416a208d736dcb01d0b02c6af122be66660b0 url: "https://pub.dev" source: hosted - version: "2.7.3" + version: "2.7.4" camera_web: dependency: transitive description: name: camera_web - sha256: f18ccfb33b2a7c49a52ad5aa3f07330b7422faaecbdfd9b9fe8e51182f6ad67d + sha256: "9e9aba2fbab77ce2472924196ff8ac4dd8f9126c4f9a3096171cd1d870d6b26c" url: "https://pub.dev" source: hosted - version: "0.3.2+4" + version: "0.3.3" characters: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: cross_file - sha256: "2f9d2cbccb76127ba28528cb3ae2c2326a122446a83de5a056aaa3880d3882c5" + sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" url: "https://pub.dev" source: hosted - version: "0.3.3+7" + version: "0.3.4+1" crypto: dependency: transitive description: @@ -125,10 +125,10 @@ packages: dependency: transitive description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "3b276c838ff7f8e19aac18a51f9b388715268f3534eaaf8047c8455ef3c1738d" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.16.0" fake_async: dependency: transitive description: @@ -157,10 +157,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: @@ -186,18 +186,18 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da + sha256: "592dc01a18961a51c24ae5d963b724b2b7fa4a95c100fe8eb6ca8a5a4732cadf" url: "https://pub.dev" source: hosted - version: "2.0.17" + version: "2.0.18" flutter_test: dependency: "direct dev" description: flutter @@ -220,10 +220,10 @@ packages: dependency: transitive description: name: gotrue - sha256: "1bf6354278a98b8a1867263e94921da8a239de07e9babceab2b4e80af651a098" + sha256: a0eee21a7e8ec09e6bbd5c9a36e31e423827b575ba6fc2dd049805dcfaac5b02 url: "https://pub.dev" source: hosted - version: "2.5.1" + version: "2.6.0" gtk: dependency: transitive description: @@ -236,10 +236,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" http_parser: dependency: transitive description: @@ -272,6 +272,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lints: dependency: transitive description: @@ -292,26 +316,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" mime: dependency: transitive description: @@ -332,10 +356,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: "direct main" description: @@ -348,10 +372,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" + sha256: "51f0d2c554cfbc9d6a312ab35152fc77e2f0b758ce9f1a444a3a1e5b8f3c6b7f" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" path_provider_foundation: dependency: transitive description: @@ -412,10 +436,10 @@ packages: dependency: transitive description: name: pointycastle - sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29" + sha256: "70fe966348fe08c34bf929582f1d8247d9d9408130723206472b4687227e4333" url: "https://pub.dev" source: hosted - version: "3.7.4" + version: "3.8.0" postgrest: dependency: transitive description: @@ -430,7 +454,7 @@ packages: path: "../../packages/powersync" relative: true source: path - version: "1.3.0-alpha.2" + version: "1.3.0-alpha.3" powersync_attachments_helper: dependency: "direct main" description: @@ -442,10 +466,10 @@ packages: dependency: transitive description: name: realtime_client - sha256: "41d6c5e0327d6c270b98b79bfed672928244af60e2856770f3eff697f9efe459" + sha256: bb6747fe2feff7f8349d563ac9d4a8f10ac2dd809bdff1e7e319321d5ea16b49 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" retry: dependency: transitive description: @@ -506,10 +530,10 @@ packages: dependency: transitive description: name: shared_preferences_web - sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf + sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" shared_preferences_windows: dependency: transitive description: @@ -543,10 +567,10 @@ packages: dependency: transitive description: name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + sha256: "1abbeb84bf2b1a10e5e1138c913123c8aa9d83cd64e5f9a0dd847b3c83063202" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.2" sqlite3_flutter_libs: dependency: transitive description: @@ -559,10 +583,10 @@ packages: dependency: "direct main" description: name: sqlite_async - sha256: "7a68036b2fc2fae5fc0efbc6bd436deb79e39090282348d979e6a7c38c8d067e" + sha256: cfe14e9b10db9f40f550125f4a8528ad5f891754a4852bf1c1622a4b0192e80c url: "https://pub.dev" source: hosted - version: "0.7.0-alpha.2" + version: "0.7.0-alpha.3" stack_trace: dependency: transitive description: @@ -607,18 +631,18 @@ packages: dependency: transitive description: name: supabase - sha256: f431753d2a4cb9dacd72c7378154f806c2b2cef23859bd9cee1add23821e874d + sha256: "2ddedf13f6dc013084569673dff7a7d540f5eacdd5b36fede8d58322e5d79c55" url: "https://pub.dev" source: hosted - version: "2.0.8" + version: "2.1.0" supabase_flutter: dependency: "direct main" description: name: supabase_flutter - sha256: "30e966b89ee61dc9de845e2d7e1c60967b3189c410d105c6d42f09b6259f4cb6" + sha256: "2d9683a15098258de137cb9182e695fa2a1a0f366c7409c2a6e6d47bc5a42be3" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.5.0" term_glyph: dependency: transitive description: @@ -655,10 +679,10 @@ packages: dependency: transitive description: name: url_launcher - sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c + sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.2.5" url_launcher_android: dependency: transitive description: @@ -671,10 +695,10 @@ packages: dependency: transitive description: name: url_launcher_ios - sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.2.5" url_launcher_linux: dependency: transitive description: @@ -703,10 +727,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" + sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" url_launcher_windows: dependency: transitive description: @@ -719,10 +743,10 @@ packages: dependency: transitive description: name: uuid - sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 + sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" url: "https://pub.dev" source: hosted - version: "4.3.3" + version: "4.4.0" vector_math: dependency: transitive description: @@ -731,30 +755,38 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" web: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" win32: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.4.0" xdg_directories: dependency: transitive description: @@ -780,5 +812,5 @@ packages: source: hosted version: "2.0.0" sdks: - dart: ">=3.2.3 <4.0.0" - flutter: ">=3.16.6" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.19.0" diff --git a/packages/powersync/CHANGELOG.md b/packages/powersync/CHANGELOG.md index a0f4fa85..d5b77c67 100644 --- a/packages/powersync/CHANGELOG.md +++ b/packages/powersync/CHANGELOG.md @@ -1,15 +1,20 @@ ## 1.3.0-alpha.3 - - Fixed issue where disconnectAndClear would prevent subsequent sync connection on native platforms and would fail to clear the database on web. +- Fixed issue where disconnectAndClear would prevent subsequent sync connection on native platforms and would fail to clear the database on web. ## 1.3.0-alpha.2 - - **FIX**(powersync-attachements-helper): pubspec file (#29). - - **DOCS**: update readme and getting started (#51). +- **FIX**(powersync-attachements-helper): pubspec file (#29). +- **DOCS**: update readme and getting started (#51). ## 1.3.0-alpha.1 - Added initial support for Web platform. + +## 1.3.0 + +- Add `crudThrottleTime` option to arguments when running `PowerSyncDatabase.connect` to set throttle time for crud operations. + ## 1.2.2 - Deprecate DevConnector and related diff --git a/packages/powersync/pubspec.yaml b/packages/powersync/pubspec.yaml index 45dd7e94..1cebf8e9 100644 --- a/packages/powersync/pubspec.yaml +++ b/packages/powersync/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: flutter: sdk: flutter - sqlite_async: ^0.7.0-alpha.1 + sqlite_async: ^0.7.0-alpha.3 sqlite3_flutter_libs: ^0.5.15 meta: ^1.0.0 http: ^1.1.0 diff --git a/packages/powersync_attachments_helper/CHANGELOG.md b/packages/powersync_attachments_helper/CHANGELOG.md index f0082638..b8e84272 100644 --- a/packages/powersync_attachments_helper/CHANGELOG.md +++ b/packages/powersync_attachments_helper/CHANGELOG.md @@ -2,6 +2,11 @@ - Added initial support for Web platform. +## 0.3.0 + +- BREAKING CHANGE: `reconcileId` has been removed in favour of `reconcileIds`. This will require a change to `watchIds` implementation which is shown in `example/getting_started.dart` +- Improved queue so that uploads, downloads and deletes do not happen multiple times + ## 0.2.1 - Added `onUploadError` as an optional function that can be set when setting up the queue to handle upload errors diff --git a/packages/powersync_attachments_helper/README.md b/packages/powersync_attachments_helper/README.md index a599887e..032319f7 100644 --- a/packages/powersync_attachments_helper/README.md +++ b/packages/powersync_attachments_helper/README.md @@ -62,7 +62,7 @@ class PhotoAttachmentQueue extends AbstractAttachmentQueue { // This watcher will handle adding items to the queue based on // a users table element receiving a photoId @override - StreamSubscription watchIds() { + StreamSubscription watchIds({String fileExtension = 'jpg'}) { return db.watch(''' SELECT photo_id FROM users WHERE photo_id IS NOT NULL @@ -70,9 +70,9 @@ class PhotoAttachmentQueue extends AbstractAttachmentQueue { return results.map((row) => row['photo_id'] as String).toList(); }).listen((ids) async { List idsInQueue = await attachmentsService.getAttachmentIds(); - for (String id in ids) { - await syncingService.reconcileId(id, idsInQueue); - } + List relevantIds = + ids.where((element) => !idsInQueue.contains(element)).toList(); + syncingService.processIds(relevantIds, fileExtension); }); } } diff --git a/packages/powersync_attachments_helper/example/getting_started.dart b/packages/powersync_attachments_helper/example/getting_started.dart index ed62f524..3f045b01 100644 --- a/packages/powersync_attachments_helper/example/getting_started.dart +++ b/packages/powersync_attachments_helper/example/getting_started.dart @@ -52,9 +52,9 @@ class PhotoAttachmentQueue extends AbstractAttachmentQueue { return results.map((row) => row['photo_id'] as String).toList(); }).listen((ids) async { List idsInQueue = await attachmentsService.getAttachmentIds(); - for (String id in ids) { - await syncingService.reconcileId(id, idsInQueue, fileExtension); - } + List relevantIds = + ids.where((element) => !idsInQueue.contains(element)).toList(); + syncingService.processIds(relevantIds, fileExtension); }); } } diff --git a/packages/powersync_attachments_helper/lib/src/attachments_queue.dart b/packages/powersync_attachments_helper/lib/src/attachments_queue.dart index e9e525ab..e8ed1965 100644 --- a/packages/powersync_attachments_helper/lib/src/attachments_queue.dart +++ b/packages/powersync_attachments_helper/lib/src/attachments_queue.dart @@ -67,9 +67,7 @@ abstract class AbstractAttachmentQueue { await localStorage.makeDir(await getStorageDirectory()); watchIds(); - syncingService.watchUploads(); - syncingService.watchDownloads(); - syncingService.watchDeletes(); + syncingService.watchAttachments(); db.statusStream.listen((status) { if (db.currentStatus.connected) { @@ -79,9 +77,7 @@ abstract class AbstractAttachmentQueue { } _trigger() async { - await syncingService.runDownloads(); - await syncingService.runDeletes(); - await syncingService.runUploads(); + await syncingService.runSync(); } /// Returns the local file path for the given filename, used to store in the database. diff --git a/packages/powersync_attachments_helper/lib/src/attachments_service.dart b/packages/powersync_attachments_helper/lib/src/attachments_service.dart index f8ac8d9c..c0d39c20 100644 --- a/packages/powersync_attachments_helper/lib/src/attachments_service.dart +++ b/packages/powersync_attachments_helper/lib/src/attachments_service.dart @@ -59,6 +59,47 @@ class AttachmentsService { return updatedRecord; } + /// Save the attachments to the attachment queue. + Future saveAttachments(List attachments) async { + if (attachments.isEmpty) { + return; + } + List> ids = List.empty(growable: true); + + RegExp extractObjectValueRegEx = RegExp(r': (.*?)(?:,|$)'); + + // This adds a timestamp to the attachments and + // extracts the values from the attachment object + // e.g "foo: bar, baz: qux" => ["bar", "qux"] + // TODO: Extract value without needing to use regex + List> updatedRecords = attachments + .map((attachment) { + ids.add([attachment.id]); + return attachment.copyWith( + timestamp: DateTime.now().millisecondsSinceEpoch, + ); + }) + .toList() + .map((attachment) { + return extractObjectValueRegEx + .allMatches(attachment.toString().replaceAll('}', '')) + .map((match) => match.group(1)) + .toList(); + }) + .toList(); + + await db.executeBatch(''' + INSERT OR REPLACE INTO $table + (id, filename, local_uri, media_type, size, timestamp, state) VALUES (?, ?, ?, ?, ?, ?, ?) + ''', updatedRecords); + + await db.executeBatch(''' + DELETE FROM $table WHERE id = ? + ''', ids); + + return; + } + /// Get all the ID's of attachments in the attachment queue. Future> getAttachmentIds() async { ResultSet results = diff --git a/packages/powersync_attachments_helper/lib/src/syncing_service.dart b/packages/powersync_attachments_helper/lib/src/syncing_service.dart index 853a1504..baaf4d58 100644 --- a/packages/powersync_attachments_helper/lib/src/syncing_service.dart +++ b/packages/powersync_attachments_helper/lib/src/syncing_service.dart @@ -19,6 +19,7 @@ class SyncingService { onDownloadError; final Future Function(Attachment attachment, Object exception)? onUploadError; + bool isProcessing = false; SyncingService(this.db, this.remoteStorage, this.localStorage, this.attachmentsService, this.getLocalUri, @@ -103,139 +104,79 @@ class SyncingService { } } - /// Function to manually run downloads for attachments marked for download - /// in the attachment queue. - /// Once a an attachment marked for download is found it will initiate a - /// download of the file to local storage. - StreamSubscription watchDownloads() { - log.info('Watching downloads...'); - return db.watch(''' - SELECT * FROM ${attachmentsService.table} - WHERE state = ${AttachmentState.queuedDownload.index} - ''').map((results) { - return results.map((row) => Attachment.fromRow(row)); - }).listen((attachments) async { - for (Attachment attachment in attachments) { - log.info('Downloading ${attachment.filename}'); - await downloadAttachment(attachment); - } - }); - } + /// Handle downloading, uploading or deleting of attachments + Future handleSync(Iterable attachments) async { + if (isProcessing == true) { + return; + } - /// Watcher for attachments marked for download in the attachment queue. - /// Once a an attachment marked for download is found it will initiate a - /// download of the file to local storage. - Future runDownloads() async { - List attachments = await db.execute(''' - SELECT * FROM ${attachmentsService.table} - WHERE state = ${AttachmentState.queuedDownload.index} - ''').then((results) { - return results.map((row) => Attachment.fromRow(row)).toList(); - }); + isProcessing = true; for (Attachment attachment in attachments) { - log.info('Downloading ${attachment.filename}'); - await downloadAttachment(attachment); - } - } - - /// Watcher for attachments marked for upload in the attachment queue. - /// Once a an attachment marked for upload is found it will initiate an - /// upload of the file to remote storage. - StreamSubscription watchUploads() { - log.info('Watching uploads...'); - return db.watch(''' - SELECT * FROM ${attachmentsService.table} - WHERE local_uri IS NOT NULL - AND state = ${AttachmentState.queuedUpload.index} - ''').map((results) { - return results.map((row) => Attachment.fromRow(row)); - }).listen((attachments) async { - for (Attachment attachment in attachments) { + if (AttachmentState.queuedDownload.index == attachment.state) { + log.info('Downloading ${attachment.filename}'); + await downloadAttachment(attachment); + } + if (AttachmentState.queuedUpload.index == attachment.state) { log.info('Uploading ${attachment.filename}'); await uploadAttachment(attachment); } - }); - } - - /// Function to manually run uploads for attachments marked for upload - /// in the attachment queue. - /// Once a an attachment marked for deletion is found it will initiate an - /// upload of the file to remote storage - Future runUploads() async { - List attachments = await db.execute(''' - SELECT * FROM ${attachmentsService.table} - WHERE local_uri IS NOT NULL - AND state = ${AttachmentState.queuedUpload.index} - ''').then((results) { - return results.map((row) => Attachment.fromRow(row)).toList(); - }); - - for (Attachment attachment in attachments) { - log.info('Uploading ${attachment.filename}'); - await uploadAttachment(attachment); + if (AttachmentState.queuedDelete.index == attachment.state) { + log.info('Deleting ${attachment.filename}'); + await deleteAttachment(attachment); + } } + + isProcessing = false; } - /// Watcher for attachments marked for deletion in the attachment queue. - /// Once a an attachment marked for deletion is found it will initiate remote - /// and local deletions of the file. - StreamSubscription watchDeletes() { - log.info('Watching deletes...'); + /// Watcher for changes to attachments table + /// Once a change is detected it will initiate a sync of the attachments + StreamSubscription watchAttachments() { + log.info('Watching attachments...'); return db.watch(''' SELECT * FROM ${attachmentsService.table} - WHERE state = ${AttachmentState.queuedDelete.index} + WHERE state != ${AttachmentState.archived.index} ''').map((results) { return results.map((row) => Attachment.fromRow(row)); }).listen((attachments) async { - for (Attachment attachment in attachments) { - log.info('Deleting ${attachment.filename}'); - await deleteAttachment(attachment); - } + await handleSync(attachments); }); } - /// Function to manually run deletes for attachments marked for deletion - /// in the attachment queue. - /// Once a an attachment marked for deletion is found it will initiate remote - /// and local deletions of the file. - Future runDeletes() async { + /// Run the sync process on all attachments + Future runSync() async { List attachments = await db.execute(''' SELECT * FROM ${attachmentsService.table} - WHERE state = ${AttachmentState.queuedDelete.index} + WHERE state != ${AttachmentState.archived.index} ''').then((results) { return results.map((row) => Attachment.fromRow(row)).toList(); }); - for (Attachment attachment in attachments) { - log.info('Deleting ${attachment.filename}'); - await deleteAttachment(attachment); - } + await handleSync(attachments); } - /// Reconcile an ID with ID's in the attachment queue. - /// If the ID is not in the queue, but the file exists locally then it is - /// in local and remote storage. - /// If the ID is in the queue, but the file does not exist locally then it is - /// marked for download. - reconcileId(String id, List idsInQueue, String fileExtension) async { - bool idIsInQueue = idsInQueue.contains(id); + /// Process ID's to be included in the attachment queue. + processIds(List ids, String fileExtension) async { + List attachments = List.empty(growable: true); - String path = await getLocalUri('$id.$fileExtension'); - File file = File(path); - bool fileExists = await file.exists(); + for (String id in ids) { + String path = await getLocalUri('$id.$fileExtension'); + File file = File(path); + bool fileExists = await file.exists(); - if (!idIsInQueue) { if (fileExists) { log.info('ignore file $id.$fileExtension as it already exists'); return; } + log.info('Adding $id to queue'); - return await attachmentsService.saveAttachment(Attachment( - id: id, - filename: '$id.$fileExtension', - state: AttachmentState.queuedDownload.index, - )); + attachments.add(Attachment( + id: id, + filename: '$id.$fileExtension', + state: AttachmentState.queuedDownload.index)); } + + await attachmentsService.saveAttachments(attachments); } } diff --git a/packages/powersync_attachments_helper/pubspec.yaml b/packages/powersync_attachments_helper/pubspec.yaml index 38610843..67e6ddf7 100644 --- a/packages/powersync_attachments_helper/pubspec.yaml +++ b/packages/powersync_attachments_helper/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: dev_dependencies: lints: ^3.0.0 - test: ^1.25.0 + test: ^1.25.2 platforms: android: