@@ -2,26 +2,19 @@ import { ENV } from '@/factory';
22import { DocType , GuestUsername , log , SkuilderCourseData } from '../../core/types/types-legacy' ;
33// import { getCurrentUser } from '../../stores/useAuthStore';
44import moment , { Moment } from 'moment' ;
5- import PouchDBAuth from '@nilock2/pouchdb-authentication' ;
6- import pouch from 'pouchdb' ;
7- import PouchDBFind from 'pouchdb-find' ;
5+
6+ import pouch from './pouchdb-setup' ;
7+
8+ import { ScheduledCard } from '@/core/types/user' ;
89import process from 'process' ;
910import { getUserDB } from './userDB' ;
10- import { ScheduledCard } from '@/core/types/user' ;
1111
1212const isBrowser = typeof window !== 'undefined' ;
1313
1414if ( isBrowser ) {
1515 ( window as any ) . process = process ; // required as a fix for pouchdb - see #18
1616}
1717
18- pouch . plugin ( PouchDBAuth ) ;
19- pouch . plugin ( PouchDBFind ) ;
20-
21- if ( ENV . DEBUG ) {
22- // pouch.debug.enable('pouchdb:find');
23- }
24-
2518const expiryDocID : string = 'GuestAccountExpirationDate' ;
2619
2720const remoteStr : string = ENV . COUCHDB_SERVER_PROTOCOL + '://' + ENV . COUCHDB_SERVER_URL + 'skuilder' ;
@@ -234,9 +227,9 @@ export function getStartAndEndKeys(key: string) {
234227// Package exports
235228//////////////////////
236229
237- export * from './userDB' ;
238- export * from './courseDB' ;
239- export * from './courseAPI' ;
240- export * from './classroomDB' ;
241230export * from '../../core/interfaces/contentSource' ;
242231export * from './adminDB' ;
232+ export * from './classroomDB' ;
233+ export * from './courseAPI' ;
234+ export * from './courseDB' ;
235+ export * from './userDB' ;
0 commit comments