File tree Expand file tree Collapse file tree 3 files changed +25
-10
lines changed
packages/powersync/lib/src/database Expand file tree Collapse file tree 3 files changed +25
-10
lines changed Original file line number Diff line number Diff line change 9
9
# This action is not compatible with tags such as `powersync-v1.1.1`
10
10
# marvinpinto/action-automatic-releases struggles to generate changelogs
11
11
# Be sure to manually tag the commit to trigger this action
12
- - ' v* '
12
+ - " powersync-v[0-9]+.[0-9]+.[0-9]+ "
13
13
14
14
jobs :
15
15
build :
22
22
- name : Install Flutter
23
23
uses : subosito/flutter-action@v2
24
24
with :
25
- flutter-version : ' 3.x'
26
- channel : ' stable'
25
+ flutter-version : " 3.x"
26
+ channel : " stable"
27
27
28
28
- name : Install Melos
29
29
run : flutter pub global activate melos
32
32
run : melos prepare
33
33
34
34
- name : Create Draft Release
35
- uses : ' marvinpinto/action-automatic-releases@latest'
36
- with :
37
- repo_token : ' ${{ secrets.GITHUB_TOKEN }}'
38
- prerelease : true # TODO update when out of alpha
39
- draft : true
40
- files : |
41
- assets/powersync_db.worker.js
35
+ run : |
36
+ tag="${{ github.ref_name }}"
37
+ body="Release $tag"
38
+ gh release create --draft "$tag" --title "$tag" --notes "$body" --generate-notes --prerelease
39
+ gh release upload "${{ github.ref_name }}" assets/powersync_db.worker.js
Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ packages:
8
8
ide :
9
9
intellij : false
10
10
11
+ command :
12
+ version :
13
+ packageFilters :
14
+ noPrivate : true
15
+
11
16
scripts :
12
17
prepare : melos bootstrap && dart ./scripts/compile_webworker.dart && dart ./scripts/init_sqlite_wasm.dart && dart ./scripts/init_powersync_core_binary.dart
13
18
Original file line number Diff line number Diff line change @@ -104,6 +104,18 @@ mixin PowerSyncDatabaseMixin implements SqliteConnection {
104
104
}
105
105
}
106
106
107
+ /// Returns a [Future] which will resolve once the first full sync has completed.
108
+ Future <void > waitForFirstSync () async {
109
+ if (currentStatus.hasSynced ?? false ) {
110
+ return ;
111
+ }
112
+ await for (final result in statusStream) {
113
+ if (result.hasSynced ?? false ) {
114
+ break ;
115
+ }
116
+ }
117
+ }
118
+
107
119
@protected
108
120
void setStatus (SyncStatus status) {
109
121
if (status != currentStatus) {
You can’t perform that action at this time.
0 commit comments