@powersync/react-native 1.16.1 → 1.16.3
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/README.md +25 -14
- package/dist/index.js +1 -1
- package/lib/db/PowerSyncDatabase.d.ts +2 -0
- package/lib/db/PowerSyncDatabase.js +8 -0
- package/package.json +6 -6
|
@@ -22,4 +22,6 @@ export declare class PowerSyncDatabase extends AbstractPowerSyncDatabase {
|
|
|
22
22
|
protected openDBAdapter(options: PowerSyncDatabaseOptionsWithSettings): DBAdapter;
|
|
23
23
|
protected generateBucketStorageAdapter(): BucketStorageAdapter;
|
|
24
24
|
protected generateSyncStreamImplementation(connector: PowerSyncBackendConnector): AbstractStreamingSyncImplementation;
|
|
25
|
+
readLock<T>(callback: (db: DBAdapter) => Promise<T>): Promise<T>;
|
|
26
|
+
writeLock<T>(callback: (db: DBAdapter) => Promise<T>): Promise<T>;
|
|
25
27
|
}
|
|
@@ -43,4 +43,12 @@ export class PowerSyncDatabase extends AbstractPowerSyncDatabase {
|
|
|
43
43
|
identifier: this.database.name
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
+
async readLock(callback) {
|
|
47
|
+
await this.waitForReady();
|
|
48
|
+
return this.database.readLock(callback);
|
|
49
|
+
}
|
|
50
|
+
async writeLock(callback) {
|
|
51
|
+
await this.waitForReady();
|
|
52
|
+
return this.database.writeLock(callback);
|
|
53
|
+
}
|
|
46
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powersync/react-native",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://docs.powersync.com/",
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@journeyapps/react-native-quick-sqlite": "^2.
|
|
28
|
-
"@powersync/common": "^1.22.
|
|
27
|
+
"@journeyapps/react-native-quick-sqlite": "^2.3.0",
|
|
28
|
+
"@powersync/common": "^1.22.2",
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-native": "*"
|
|
31
31
|
},
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@powersync/common": "1.22.
|
|
38
|
+
"@powersync/common": "1.22.2",
|
|
39
39
|
"@powersync/react": "1.5.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@craftzdog/react-native-buffer": "^6.0.5",
|
|
43
|
-
"@journeyapps/react-native-quick-sqlite": "^2.
|
|
43
|
+
"@journeyapps/react-native-quick-sqlite": "^2.3.0",
|
|
44
44
|
"@rollup/plugin-alias": "^5.1.0",
|
|
45
45
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
46
46
|
"@rollup/plugin-inject": "^5.0.5",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"scripts": {
|
|
70
70
|
"build": "tsc -b && rollup -c rollup.config.mjs",
|
|
71
71
|
"build:prod": "tsc -b --sourceMap false && rollup -c rollup.config.mjs --sourceMap false",
|
|
72
|
-
"clean": "rm -rf lib dist tsconfig.tsbuildinfo dist",
|
|
72
|
+
"clean": "rm -rf lib dist tsconfig.tsbuildinfo dist node_modules",
|
|
73
73
|
"watch": "tsc -b -w"
|
|
74
74
|
}
|
|
75
75
|
}
|