@docstack/pouchdb-adapter-googledrive 0.0.6 → 0.0.9
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/.env.example +3 -0
- package/README.md +72 -72
- package/compaction_test.log +725 -0
- package/docs/DEBUG_BIDIRECTIONAL_REPLICATION.ipynb +481 -0
- package/{DOCUMENTATION.md → docs/DOCUMENTATION.md} +61 -0
- package/docs/PROMISE_SUPPORT.md +75 -0
- package/docs/REPLICATION_ISSUE.md +63 -0
- package/emulation-test.log +163 -0
- package/failing_test.log +31 -0
- package/final_test.log +2620 -0
- package/jest.config.js +8 -8
- package/lib/adapter.d.ts +3 -0
- package/lib/adapter.js +373 -163
- package/lib/cache.d.ts +0 -0
- package/lib/cache.js +0 -0
- package/lib/client.d.ts +5 -0
- package/lib/client.js +43 -20
- package/lib/drive.d.ts +12 -2
- package/lib/drive.js +373 -189
- package/lib/index.d.ts +0 -0
- package/lib/index.js +4 -3
- package/lib/types.d.ts +6 -0
- package/lib/types.js +0 -0
- package/live_test.log +1209 -0
- package/package.json +47 -40
- package/test_output.log +563 -0
- package/test_output_2.log +1408 -0
- package/test_output_3.log +2445 -0
package/lib/index.d.ts
CHANGED
|
File without changes
|
package/lib/index.js
CHANGED
|
@@ -43,12 +43,13 @@ function GoogleDriveAdapter(config) {
|
|
|
43
43
|
// @ts-ignore
|
|
44
44
|
ConfiguredAdapter.use_prefix = BaseAdapter.use_prefix;
|
|
45
45
|
// Register the adapter manually
|
|
46
|
-
//
|
|
46
|
+
// Check if already registered to avoid overwriting or conflicts
|
|
47
47
|
if (PouchDB.adapters) {
|
|
48
|
-
PouchDB.adapters['googledrive']
|
|
48
|
+
if (!PouchDB.adapters['googledrive'] || PouchDB.adapters['googledrive'] !== ConfiguredAdapter) {
|
|
49
|
+
PouchDB.adapters['googledrive'] = ConfiguredAdapter;
|
|
50
|
+
}
|
|
49
51
|
}
|
|
50
52
|
else {
|
|
51
|
-
// Fallback/Warning if adapters object is somehow missing (should not happen in core)
|
|
52
53
|
console.warn('PouchDB.adapters not found, unable to register googledrive adapter');
|
|
53
54
|
}
|
|
54
55
|
};
|
package/lib/types.d.ts
CHANGED
|
@@ -15,6 +15,12 @@ export interface GoogleDriveAdapterOptions extends DriveClientOptions {
|
|
|
15
15
|
compactionSizeThreshold?: number;
|
|
16
16
|
/** Cache size (number of documents) */
|
|
17
17
|
cacheSize?: number;
|
|
18
|
+
/** Enable debug logging */
|
|
19
|
+
debug?: boolean;
|
|
20
|
+
/** Enable test mode (emulates Google Drive API) */
|
|
21
|
+
testMode?: boolean;
|
|
22
|
+
/** Test server URL (defaults to http://localhost:3000) */
|
|
23
|
+
testServerUrl?: string;
|
|
18
24
|
}
|
|
19
25
|
/** A single change entry in the append-only log */
|
|
20
26
|
export interface ChangeEntry {
|
package/lib/types.js
CHANGED
|
File without changes
|