@vue-skuilder/db 0.1.1
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/README.md +26 -0
- package/dist/core/index.d.mts +3 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +7906 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/index.mjs +7886 -0
- package/dist/core/index.mjs.map +1 -0
- package/dist/index-QMtzQI65.d.mts +734 -0
- package/dist/index-QMtzQI65.d.ts +734 -0
- package/dist/index.d.mts +133 -0
- package/dist/index.d.ts +133 -0
- package/dist/index.js +8726 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +8699 -0
- package/dist/index.mjs.map +1 -0
- package/eslint.config.mjs +20 -0
- package/package.json +47 -0
- package/src/core/bulkImport/cardProcessor.ts +165 -0
- package/src/core/bulkImport/index.ts +2 -0
- package/src/core/bulkImport/types.ts +27 -0
- package/src/core/index.ts +9 -0
- package/src/core/interfaces/adminDB.ts +27 -0
- package/src/core/interfaces/classroomDB.ts +75 -0
- package/src/core/interfaces/contentSource.ts +64 -0
- package/src/core/interfaces/courseDB.ts +139 -0
- package/src/core/interfaces/dataLayerProvider.ts +46 -0
- package/src/core/interfaces/index.ts +7 -0
- package/src/core/interfaces/navigationStrategyManager.ts +46 -0
- package/src/core/interfaces/userDB.ts +183 -0
- package/src/core/navigators/elo.ts +76 -0
- package/src/core/navigators/index.ts +57 -0
- package/src/core/readme.md +9 -0
- package/src/core/types/contentNavigationStrategy.ts +21 -0
- package/src/core/types/db.ts +7 -0
- package/src/core/types/types-legacy.ts +155 -0
- package/src/core/types/user.ts +70 -0
- package/src/core/util/index.ts +42 -0
- package/src/factory.ts +86 -0
- package/src/impl/pouch/PouchDataLayerProvider.ts +102 -0
- package/src/impl/pouch/adminDB.ts +91 -0
- package/src/impl/pouch/auth.ts +48 -0
- package/src/impl/pouch/classroomDB.ts +306 -0
- package/src/impl/pouch/clientCache.ts +19 -0
- package/src/impl/pouch/courseAPI.ts +245 -0
- package/src/impl/pouch/courseDB.ts +772 -0
- package/src/impl/pouch/courseLookupDB.ts +135 -0
- package/src/impl/pouch/index.ts +235 -0
- package/src/impl/pouch/pouchdb-setup.ts +16 -0
- package/src/impl/pouch/types.ts +7 -0
- package/src/impl/pouch/updateQueue.ts +89 -0
- package/src/impl/pouch/user-course-relDB.ts +73 -0
- package/src/impl/pouch/userDB.ts +1097 -0
- package/src/index.ts +8 -0
- package/src/study/SessionController.ts +401 -0
- package/src/study/SpacedRepetition.ts +128 -0
- package/src/study/getCardDataShape.ts +34 -0
- package/src/study/index.ts +2 -0
- package/src/util/Loggable.ts +11 -0
- package/src/util/index.ts +1 -0
- package/src/util/logger.ts +55 -0
- package/tsconfig.json +12 -0
- package/tsup.config.ts +17 -0
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @vue-skuilder/db
|
|
2
|
+
|
|
3
|
+
Database abstraction layer for vue-skuilder.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
Abstraction in progress. Currently this is a smaller ball of mud that was separated out from the main ball of mud.
|
|
8
|
+
|
|
9
|
+
## Structure
|
|
10
|
+
|
|
11
|
+
The package is organized into:
|
|
12
|
+
|
|
13
|
+
- `core/` - Core interfaces and types for database operations
|
|
14
|
+
- `pouch/` - PouchDB implementation of the core interfaces
|
|
15
|
+
- `study/` - utilities for managing active study sessions
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
// Import the default implementation
|
|
21
|
+
import { getUserDB } from '@vue-skuilder/db';
|
|
22
|
+
|
|
23
|
+
// Or import from a specific namespace
|
|
24
|
+
import { DBInterfaces } from '@vue-skuilder/db/core';
|
|
25
|
+
import { PouchImplementation } from '@vue-skuilder/db/pouch';
|
|
26
|
+
```
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { V as ActivityRecord, A as AdminDBInterface, g as AssignedCard, d as AssignedContent, f as AssignedCourse, e as AssignedTag, a7 as BulkCardProcessorConfig, H as CardData, O as CardHistory, C as CardRecord, b as ClassroomDBInterface, w as ClassroomRegistration, v as ClassroomRegistrationDesignation, x as ClassroomRegistrationDoc, a3 as ContentNavigator, n as ContentSourceID, r as CourseDBInterface, q as CourseInfo, I as CourseListData, W as CourseRegistration, X as CourseRegistrationDoc, p as CoursesDBInterface, D as DataLayerProvider, M as DataShapeData, J as DisplayableData, z as DocType, K as Field, G as GuestUsername, a6 as ImportResult, L as Loggable, a2 as Navigators, Q as QuestionData, P as QuestionRecord, Y as ScheduledCard, B as SkuilderCourseData, c as StudentClassroomDBInterface, a as StudyContentSource, h as StudySessionFailedItem, i as StudySessionFailedNewItem, j as StudySessionFailedReviewItem, S as StudySessionItem, k as StudySessionNewItem, l as StudySessionReviewItem, E as Tag, F as TagStub, T as TeacherClassroomDBInterface, R as UserConfig, t as UserCourseSetting, s as UserCourseSettings, U as UserDBInterface, u as UsrCrsDataInterface, Z as areQuestionRecords, N as cardHistoryPrefix, a1 as docIsDeleted, $ as getCardHistoryID, o as getStudySource, a4 as importParsedCards, _ as isQuestionRecord, m as isReview, y as log, a0 as parseCardHistoryID, a5 as validateProcessorConfig } from '../index-QMtzQI65.mjs';
|
|
2
|
+
import '@vue-skuilder/common';
|
|
3
|
+
import 'moment';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { V as ActivityRecord, A as AdminDBInterface, g as AssignedCard, d as AssignedContent, f as AssignedCourse, e as AssignedTag, a7 as BulkCardProcessorConfig, H as CardData, O as CardHistory, C as CardRecord, b as ClassroomDBInterface, w as ClassroomRegistration, v as ClassroomRegistrationDesignation, x as ClassroomRegistrationDoc, a3 as ContentNavigator, n as ContentSourceID, r as CourseDBInterface, q as CourseInfo, I as CourseListData, W as CourseRegistration, X as CourseRegistrationDoc, p as CoursesDBInterface, D as DataLayerProvider, M as DataShapeData, J as DisplayableData, z as DocType, K as Field, G as GuestUsername, a6 as ImportResult, L as Loggable, a2 as Navigators, Q as QuestionData, P as QuestionRecord, Y as ScheduledCard, B as SkuilderCourseData, c as StudentClassroomDBInterface, a as StudyContentSource, h as StudySessionFailedItem, i as StudySessionFailedNewItem, j as StudySessionFailedReviewItem, S as StudySessionItem, k as StudySessionNewItem, l as StudySessionReviewItem, E as Tag, F as TagStub, T as TeacherClassroomDBInterface, R as UserConfig, t as UserCourseSetting, s as UserCourseSettings, U as UserDBInterface, u as UsrCrsDataInterface, Z as areQuestionRecords, N as cardHistoryPrefix, a1 as docIsDeleted, $ as getCardHistoryID, o as getStudySource, a4 as importParsedCards, _ as isQuestionRecord, m as isReview, y as log, a0 as parseCardHistoryID, a5 as validateProcessorConfig } from '../index-QMtzQI65.js';
|
|
2
|
+
import '@vue-skuilder/common';
|
|
3
|
+
import 'moment';
|