@vue-skuilder/db 0.1.7 → 0.1.8-0
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/dist/{SyncStrategy-DnJRj-Xp.d.mts → SyncStrategy-CyATpyLQ.d.mts} +6 -0
- package/dist/{SyncStrategy-DnJRj-Xp.d.ts → SyncStrategy-CyATpyLQ.d.ts} +6 -0
- package/dist/core/index.d.mts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +131 -118
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +128 -115
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-BbW9EnZK.d.mts → dataLayerProvider-BInqI_RF.d.mts} +1 -1
- package/dist/{dataLayerProvider-6stCgDME.d.ts → dataLayerProvider-DqtNroSh.d.ts} +1 -1
- package/dist/impl/couch/index.d.mts +6 -6
- package/dist/impl/couch/index.d.ts +6 -6
- package/dist/impl/couch/index.js +1365 -1252
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +1359 -1246
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.mts +8 -6
- package/dist/impl/static/index.d.ts +8 -6
- package/dist/impl/static/index.js +253 -843
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +250 -842
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index-CLL31bEy.d.ts +137 -0
- package/dist/index-CUNnL38E.d.mts +137 -0
- package/dist/index.d.mts +10 -55
- package/dist/index.d.ts +10 -55
- package/dist/index.js +343 -170
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +340 -167
- package/dist/index.mjs.map +1 -1
- package/dist/{types-BvzcRAys.d.ts → types-BefDGkKa.d.ts} +1 -1
- package/dist/{types-CQQ80R5N.d.mts → types-DC-ckZug.d.mts} +1 -1
- package/dist/{types-legacy-CtrmkOLu.d.mts → types-legacy-Birv-Jx6.d.mts} +2 -2
- package/dist/{types-legacy-CtrmkOLu.d.ts → types-legacy-Birv-Jx6.d.ts} +2 -2
- package/dist/{userDB-DUY63VMN.d.ts → userDB-C33Hzjgn.d.mts} +10 -3
- package/dist/{userDB-7fM4tpgr.d.mts → userDB-DusL7OXe.d.ts} +10 -3
- package/dist/util/packer/index.d.mts +3 -63
- package/dist/util/packer/index.d.ts +3 -63
- package/dist/util/packer/index.js +53 -1
- package/dist/util/packer/index.js.map +1 -1
- package/dist/util/packer/index.mjs +53 -1
- package/dist/util/packer/index.mjs.map +1 -1
- package/package.json +7 -4
- package/src/core/types/types-legacy.ts +13 -1
- package/src/core/types/user.ts +9 -2
- package/src/core/util/index.ts +5 -4
- package/src/impl/common/BaseUserDB.ts +33 -22
- package/src/impl/common/SyncStrategy.ts +7 -0
- package/src/impl/common/index.ts +0 -1
- package/src/impl/common/userDBHelpers.ts +4 -4
- package/src/impl/couch/CouchDBSyncStrategy.ts +10 -0
- package/src/impl/couch/courseAPI.ts +7 -6
- package/src/impl/couch/index.ts +10 -5
- package/src/impl/couch/updateQueue.ts +12 -8
- package/src/impl/couch/user-course-relDB.ts +17 -27
- package/src/impl/static/NoOpSyncStrategy.ts +5 -0
- package/src/impl/static/StaticDataUnpacker.ts +18 -36
- package/src/impl/static/courseDB.ts +135 -17
- package/src/util/migrator/FileSystemAdapter.ts +20 -0
- package/src/util/migrator/StaticToCouchDBMigrator.ts +6 -0
- package/src/util/packer/CouchDBToStaticPacker.ts +92 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, b as ClassroomDBInterface, A as AdminDBInterface } from './userDB-
|
|
1
|
+
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, b as ClassroomDBInterface, A as AdminDBInterface } from './userDB-C33Hzjgn.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Main factory interface for data access
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, b as ClassroomDBInterface, A as AdminDBInterface } from './userDB-
|
|
1
|
+
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, b as ClassroomDBInterface, A as AdminDBInterface } from './userDB-DusL7OXe.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Main factory interface for data access
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { T as TagStub, a as Tag, S as SkuilderCourseData } from '../../types-legacy-
|
|
1
|
+
import { T as TagStub, a as Tag, S as SkuilderCourseData } from '../../types-legacy-Birv-Jx6.mjs';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
|
-
import { A as AdminDBInterface, g as AssignedContent, h as StudyContentSource, i as StudentClassroomDBInterface, U as UserDBInterface, e as StudySessionReviewItem, f as ScheduledCard, S as StudySessionNewItem, T as TeacherClassroomDBInterface, a as CoursesDBInterface, C as CourseDBInterface, c as CourseInfo, D as DataLayerResult, d as ContentNavigationStrategyData, j as StudySessionItem } from '../../userDB-
|
|
4
|
-
export { o as ContentSourceID, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, p as getStudySource, n as isReview } from '../../userDB-
|
|
3
|
+
import { A as AdminDBInterface, g as AssignedContent, h as StudyContentSource, i as StudentClassroomDBInterface, U as UserDBInterface, e as StudySessionReviewItem, f as ScheduledCard, S as StudySessionNewItem, T as TeacherClassroomDBInterface, a as CoursesDBInterface, C as CourseDBInterface, c as CourseInfo, D as DataLayerResult, d as ContentNavigationStrategyData, j as StudySessionItem } from '../../userDB-C33Hzjgn.mjs';
|
|
4
|
+
export { o as ContentSourceID, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, p as getStudySource, n as isReview } from '../../userDB-C33Hzjgn.mjs';
|
|
5
5
|
import * as _vue_skuilder_common from '@vue-skuilder/common';
|
|
6
6
|
import { ClassroomConfig, DataShape, CourseElo, CourseConfig as CourseConfig$1 } from '@vue-skuilder/common';
|
|
7
|
-
import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-
|
|
7
|
+
import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-CyATpyLQ.mjs';
|
|
8
8
|
|
|
9
9
|
type NamespacedDatashape = string;
|
|
10
10
|
interface DataShape55 {
|
|
@@ -234,6 +234,7 @@ declare function updateCredentialledCourseConfig(courseID: string, config: Cours
|
|
|
234
234
|
declare class CouchDBSyncStrategy implements SyncStrategy {
|
|
235
235
|
private syncHandle?;
|
|
236
236
|
setupRemoteDB(username: string): PouchDB.Database;
|
|
237
|
+
getWriteDB(username: string): PouchDB.Database;
|
|
237
238
|
startSync(localDB: PouchDB.Database, remoteDB: PouchDB.Database): void;
|
|
238
239
|
stopSync?(): void;
|
|
239
240
|
canCreateAccount(): boolean;
|
|
@@ -272,7 +273,6 @@ declare function getCourseDoc<T extends SkuilderCourseData>(courseID: string, do
|
|
|
272
273
|
* @param courseIDs A list of all course_ids to get cards from
|
|
273
274
|
*/
|
|
274
275
|
declare function getRandomCards(courseIDs: string[]): Promise<string[]>;
|
|
275
|
-
declare const REVIEW_PREFIX: string;
|
|
276
276
|
declare const REVIEW_TIME_FORMAT: string;
|
|
277
277
|
declare function getCouchUserDB(username: string): PouchDB.Database;
|
|
278
278
|
declare function scheduleCardReview(review: {
|
|
@@ -289,4 +289,4 @@ declare function getStartAndEndKeys(key: string): {
|
|
|
289
289
|
endkey: string;
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
-
export { AdminDB, CLASSROOM_CONFIG, ClassroomLookupDB, type ClassroomMessage, CouchDBSyncStrategy, CourseDB, CoursesDB,
|
|
292
|
+
export { AdminDB, CLASSROOM_CONFIG, ClassroomLookupDB, type ClassroomMessage, CouchDBSyncStrategy, CourseDB, CoursesDB, REVIEW_TIME_FORMAT, StudentClassroomDB, StudyContentSource, StudySessionItem, StudySessionNewItem, StudySessionReviewItem, TeacherClassroomDB, addNote55, addTagToCard, createTag, deleteTag, filterAllDocsByPrefix, getAncestorTagIDs, getAppliedTags, getChildTagStubs, getClassroomConfig, getClassroomDB, getCouchUserDB, getCourseDB, getCourseDataShapes, getCourseDoc, getCourseDocs, getCourseQuestionTypes, getCourseTagStubs, getCredentialledCourseConfig, getCredentialledDataShapes, getLatestVersion, getRandomCards, getStartAndEndKeys, getTag, getTagID, hexEncode, localUserDB, pouchDBincludeCredentialsConfig, removeTagFromCard, scheduleCardReview, updateCardElo, updateCredentialledCourseConfig, updateGuestAccountExpirationDate, updateTag, usernameIsAvailable };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { T as TagStub, a as Tag, S as SkuilderCourseData } from '../../types-legacy-
|
|
1
|
+
import { T as TagStub, a as Tag, S as SkuilderCourseData } from '../../types-legacy-Birv-Jx6.js';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
|
-
import { A as AdminDBInterface, g as AssignedContent, h as StudyContentSource, i as StudentClassroomDBInterface, U as UserDBInterface, e as StudySessionReviewItem, f as ScheduledCard, S as StudySessionNewItem, T as TeacherClassroomDBInterface, a as CoursesDBInterface, C as CourseDBInterface, c as CourseInfo, D as DataLayerResult, d as ContentNavigationStrategyData, j as StudySessionItem } from '../../userDB-
|
|
4
|
-
export { o as ContentSourceID, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, p as getStudySource, n as isReview } from '../../userDB-
|
|
3
|
+
import { A as AdminDBInterface, g as AssignedContent, h as StudyContentSource, i as StudentClassroomDBInterface, U as UserDBInterface, e as StudySessionReviewItem, f as ScheduledCard, S as StudySessionNewItem, T as TeacherClassroomDBInterface, a as CoursesDBInterface, C as CourseDBInterface, c as CourseInfo, D as DataLayerResult, d as ContentNavigationStrategyData, j as StudySessionItem } from '../../userDB-DusL7OXe.js';
|
|
4
|
+
export { o as ContentSourceID, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, p as getStudySource, n as isReview } from '../../userDB-DusL7OXe.js';
|
|
5
5
|
import * as _vue_skuilder_common from '@vue-skuilder/common';
|
|
6
6
|
import { ClassroomConfig, DataShape, CourseElo, CourseConfig as CourseConfig$1 } from '@vue-skuilder/common';
|
|
7
|
-
import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-
|
|
7
|
+
import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-CyATpyLQ.js';
|
|
8
8
|
|
|
9
9
|
type NamespacedDatashape = string;
|
|
10
10
|
interface DataShape55 {
|
|
@@ -234,6 +234,7 @@ declare function updateCredentialledCourseConfig(courseID: string, config: Cours
|
|
|
234
234
|
declare class CouchDBSyncStrategy implements SyncStrategy {
|
|
235
235
|
private syncHandle?;
|
|
236
236
|
setupRemoteDB(username: string): PouchDB.Database;
|
|
237
|
+
getWriteDB(username: string): PouchDB.Database;
|
|
237
238
|
startSync(localDB: PouchDB.Database, remoteDB: PouchDB.Database): void;
|
|
238
239
|
stopSync?(): void;
|
|
239
240
|
canCreateAccount(): boolean;
|
|
@@ -272,7 +273,6 @@ declare function getCourseDoc<T extends SkuilderCourseData>(courseID: string, do
|
|
|
272
273
|
* @param courseIDs A list of all course_ids to get cards from
|
|
273
274
|
*/
|
|
274
275
|
declare function getRandomCards(courseIDs: string[]): Promise<string[]>;
|
|
275
|
-
declare const REVIEW_PREFIX: string;
|
|
276
276
|
declare const REVIEW_TIME_FORMAT: string;
|
|
277
277
|
declare function getCouchUserDB(username: string): PouchDB.Database;
|
|
278
278
|
declare function scheduleCardReview(review: {
|
|
@@ -289,4 +289,4 @@ declare function getStartAndEndKeys(key: string): {
|
|
|
289
289
|
endkey: string;
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
-
export { AdminDB, CLASSROOM_CONFIG, ClassroomLookupDB, type ClassroomMessage, CouchDBSyncStrategy, CourseDB, CoursesDB,
|
|
292
|
+
export { AdminDB, CLASSROOM_CONFIG, ClassroomLookupDB, type ClassroomMessage, CouchDBSyncStrategy, CourseDB, CoursesDB, REVIEW_TIME_FORMAT, StudentClassroomDB, StudyContentSource, StudySessionItem, StudySessionNewItem, StudySessionReviewItem, TeacherClassroomDB, addNote55, addTagToCard, createTag, deleteTag, filterAllDocsByPrefix, getAncestorTagIDs, getAppliedTags, getChildTagStubs, getClassroomConfig, getClassroomDB, getCouchUserDB, getCourseDB, getCourseDataShapes, getCourseDoc, getCourseDocs, getCourseQuestionTypes, getCourseTagStubs, getCredentialledCourseConfig, getCredentialledDataShapes, getLatestVersion, getRandomCards, getStartAndEndKeys, getTag, getTagID, hexEncode, localUserDB, pouchDBincludeCredentialsConfig, removeTagFromCard, scheduleCardReview, updateCardElo, updateCredentialledCourseConfig, updateGuestAccountExpirationDate, updateTag, usernameIsAvailable };
|