@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/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
- // We use PouchDB.adapters object directly to avoid using the .adapter() method
46
+ // Check if already registered to avoid overwriting or conflicts
47
47
  if (PouchDB.adapters) {
48
- PouchDB.adapters['googledrive'] = ConfiguredAdapter;
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