sqlite-cloud-backup 0.1.2 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +24 -21
  2. package/package.json +7 -3
package/README.md CHANGED
@@ -204,27 +204,6 @@ app.on('ready', async () => {
204
204
  });
205
205
  ```
206
206
 
207
- ### React Native
208
-
209
- ```typescript
210
- import SqliteCloudBackup from 'sqlite-cloud-backup';
211
- import RNFS from 'react-native-fs';
212
-
213
- const dbPath = `${RNFS.DocumentDirectoryPath}/app.db`;
214
- const sync = new SqliteCloudBackup({
215
- dbPath,
216
- provider: 'google-drive',
217
- credentials: { /* ... */ }
218
- });
219
-
220
- // Sync when app comes to foreground
221
- AppState.addEventListener('change', async (state) => {
222
- if (state === 'active') {
223
- await sync.sync();
224
- }
225
- });
226
- ```
227
-
228
207
  ### CLI Tools
229
208
 
230
209
  ```typescript
@@ -252,6 +231,30 @@ await sync.pushToCloud();
252
231
  **Coming in v0.2+:**
253
232
  - ⏳ Additional providers (Dropbox, S3)
254
233
 
234
+ ## Important Limitations
235
+
236
+ ### Single-Device Use Only
237
+
238
+ This library is designed for **single-device backup scenarios**. The sync logic uses timestamps to determine whether to push or pull, which works reliably when only one device accesses the cloud backup.
239
+
240
+ **Not supported:**
241
+ - Multiple devices syncing to the same cloud folder simultaneously
242
+ - Real-time collaboration or multi-user scenarios
243
+ - Conflict resolution between concurrent modifications
244
+
245
+ If you need multi-device sync, consider a full database sync solution like [PowerSync](https://www.powersync.com/), [ElectricSQL](https://electric-sql.com/), or a traditional backend database.
246
+
247
+ ### Security Note for Distributed Apps
248
+
249
+ If you're distributing an Electron app or CLI tool, be aware that OAuth client secrets embedded in your application can be extracted by users. For desktop applications, Google recommends:
250
+
251
+ 1. **Use a public OAuth client** (no secret required) with PKCE flow
252
+ 2. **Or** accept that the secret is not truly secret in distributed apps
253
+
254
+ The client secret primarily protects against other developers impersonating your app, not end-users. Your users' data remains protected by their own OAuth consent.
255
+
256
+ For server-side applications where the secret stays on your server, this is not a concern.
257
+
255
258
  ## Requirements
256
259
 
257
260
  - Node.js 18+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sqlite-cloud-backup",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "Lightweight SQLite database synchronization to Google Drive with zero vendor lock-in",
6
6
  "main": "./dist/index.cjs",
@@ -25,7 +25,10 @@
25
25
  "typecheck": "tsc --noEmit",
26
26
  "lint": "eslint src --ext .ts",
27
27
  "lint:fix": "eslint src --ext .ts --fix",
28
- "prepare": "npm run build"
28
+ "prepare": "npm run build",
29
+ "publish:patch": "node scripts/publish.js patch",
30
+ "publish:minor": "node scripts/publish.js minor",
31
+ "publish:major": "node scripts/publish.js major"
29
32
  },
30
33
  "keywords": [
31
34
  "sqlite",
@@ -36,7 +39,8 @@
36
39
  "database",
37
40
  "offline-first",
38
41
  "electron",
39
- "react-native"
42
+ "nodejs",
43
+ "cli"
40
44
  ],
41
45
  "author": "1291pravin",
42
46
  "license": "MIT",