File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 */
88
99const LRU = require ( 'lru-cache' ) ;
10- const firebase = require ( 'firebase' ) ;
1110
1211const ENGINE_FIRESTORE = 'Firestore' ;
1312const ENGINE_RTDB = 'RTDB' ;
@@ -35,7 +34,7 @@ export class Firebase {
3534 config = { } ;
3635 }
3736
38- this . client = firebase ;
37+ this . client = require ( ' firebase' ) ;
3938 this . engine = engine === ENGINE_RTDB ? engine : ENGINE_FIRESTORE ;
4039 this . config = config ;
4140 this . dbname = dbname ;
Original file line number Diff line number Diff line change 66 * https://opensource.org/licenses/MIT.
77 */
88
9- const MongoClient = require ( 'mongodb' ) . MongoClient ;
109const LRU = require ( 'lru-cache' ) ;
1110
1211/**
@@ -20,7 +19,7 @@ export class Mongo {
2019 if ( cacheSize === undefined ) cacheSize = 1000 ;
2120 if ( dbname === undefined ) dbname = 'bgio' ;
2221
23- this . client = mockClient || MongoClient ;
22+ this . client = mockClient || require ( 'mongodb' ) . MongoClient ;
2423 this . url = url ;
2524 this . dbname = dbname ;
2625 this . cache = new LRU ( { max : cacheSize } ) ;
You can’t perform that action at this time.
0 commit comments