@vue-skuilder/db 0.1.16 → 0.1.18
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/{userDB-DNa0XPtn.d.ts → classroomDB-BgfrVb8d.d.ts} +357 -103
- package/dist/{userDB-BqwxtJ_7.d.mts → classroomDB-CTOenngH.d.cts} +358 -104
- package/dist/core/index.d.cts +230 -0
- package/dist/core/index.d.ts +161 -23
- package/dist/core/index.js +1964 -154
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +1925 -121
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-BV5iZqt_.d.ts → dataLayerProvider-CZxC9GtB.d.ts} +1 -1
- package/dist/{dataLayerProvider-VlngD19_.d.mts → dataLayerProvider-D6PoCwS6.d.cts} +1 -1
- package/dist/impl/couch/{index.d.mts → index.d.cts} +46 -5
- package/dist/impl/couch/index.d.ts +44 -3
- package/dist/impl/couch/index.js +1971 -171
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +1933 -134
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/{index.d.mts → index.d.cts} +5 -6
- package/dist/impl/static/index.d.ts +2 -3
- package/dist/impl/static/index.js +1614 -119
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +1585 -92
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/{index-Bmll7Xse.d.mts → index-D-Fa4Smt.d.cts} +1 -1
- package/dist/{index.d.mts → index.d.cts} +97 -13
- package/dist/index.d.ts +90 -6
- package/dist/index.js +2085 -153
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2031 -106
- package/dist/index.mjs.map +1 -1
- package/dist/pouch/index.js +3 -3
- package/dist/{types-Dbp5DaRR.d.mts → types-CzPDLAK6.d.cts} +1 -1
- package/dist/util/packer/{index.d.mts → index.d.cts} +3 -3
- package/dist/util/packer/index.js.map +1 -1
- package/dist/util/packer/index.mjs.map +1 -1
- package/docs/brainstorm-navigation-paradigm.md +369 -0
- package/docs/navigators-architecture.md +265 -0
- package/docs/todo-evolutionary-orchestration.md +310 -0
- package/docs/todo-nominal-tag-types.md +121 -0
- package/docs/todo-pipeline-optimization.md +117 -0
- package/docs/todo-strategy-authoring.md +401 -0
- package/docs/todo-strategy-state-storage.md +278 -0
- package/eslint.config.mjs +1 -1
- package/package.json +9 -4
- package/src/core/interfaces/contentSource.ts +88 -4
- package/src/core/interfaces/navigationStrategyManager.ts +0 -5
- package/src/core/navigators/CompositeGenerator.ts +268 -0
- package/src/core/navigators/Pipeline.ts +205 -0
- package/src/core/navigators/PipelineAssembler.ts +194 -0
- package/src/core/navigators/elo.ts +104 -15
- package/src/core/navigators/filters/eloDistance.ts +132 -0
- package/src/core/navigators/filters/index.ts +6 -0
- package/src/core/navigators/filters/types.ts +115 -0
- package/src/core/navigators/generators/index.ts +2 -0
- package/src/core/navigators/generators/types.ts +107 -0
- package/src/core/navigators/hardcodedOrder.ts +111 -12
- package/src/core/navigators/hierarchyDefinition.ts +266 -0
- package/src/core/navigators/index.ts +345 -3
- package/src/core/navigators/interferenceMitigator.ts +367 -0
- package/src/core/navigators/relativePriority.ts +267 -0
- package/src/core/navigators/srs.ts +195 -0
- package/src/impl/couch/classroomDB.ts +51 -0
- package/src/impl/couch/courseDB.ts +117 -39
- package/src/impl/static/courseDB.ts +0 -4
- package/src/study/SessionController.ts +149 -1
- package/src/study/TagFilteredContentSource.ts +255 -0
- package/src/study/index.ts +1 -0
- package/src/util/dataDirectory.test.ts +51 -22
- package/src/util/logger.ts +0 -1
- package/tests/core/navigators/CompositeGenerator.test.ts +455 -0
- package/tests/core/navigators/Pipeline.test.ts +405 -0
- package/tests/core/navigators/PipelineAssembler.test.ts +351 -0
- package/tests/core/navigators/SRSNavigator.test.ts +344 -0
- package/tests/core/navigators/eloDistanceFilter.test.ts +192 -0
- package/tests/core/navigators/navigators.test.ts +710 -0
- package/tsconfig.json +1 -1
- package/vitest.config.ts +29 -0
- package/dist/core/index.d.mts +0 -92
- /package/dist/{SyncStrategy-CyATpyLQ.d.mts → SyncStrategy-CyATpyLQ.d.cts} +0 -0
- /package/dist/pouch/{index.d.mts → index.d.cts} +0 -0
- /package/dist/{types-legacy-6ettoclI.d.mts → types-legacy-6ettoclI.d.cts} +0 -0
package/tsconfig.json
CHANGED
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
const { resolve } = path;
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
test: {
|
|
8
|
+
globals: true,
|
|
9
|
+
environment: 'node',
|
|
10
|
+
include: ['tests/**/*.{test,spec}.{js,ts}', 'src/**/*.{test,spec}.{js,ts}'],
|
|
11
|
+
exclude: ['**/node_modules/**', '**/dist/**'],
|
|
12
|
+
coverage: {
|
|
13
|
+
provider: 'v8',
|
|
14
|
+
reporter: ['text', 'json', 'html'],
|
|
15
|
+
exclude: [
|
|
16
|
+
'**/node_modules/**',
|
|
17
|
+
'**/dist/**',
|
|
18
|
+
'**/*.d.ts',
|
|
19
|
+
'**/vitest.config.ts',
|
|
20
|
+
'**/tests/**',
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
resolve: {
|
|
25
|
+
alias: {
|
|
26
|
+
'@db': resolve(__dirname, 'src'),
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
package/dist/core/index.d.mts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { i as StudyContentSource, U as UserDBInterface, C as CourseDBInterface, e as ContentNavigationStrategyData, f as StudySessionReviewItem, g as ScheduledCard, S as StudySessionNewItem } from '../userDB-BqwxtJ_7.mjs';
|
|
2
|
-
export { I as ActivityRecord, A as AdminDBInterface, u as AssignedCard, h as AssignedContent, t as AssignedCourse, s as AssignedTag, c as ClassroomDBInterface, E as ClassroomRegistration, B as ClassroomRegistrationDesignation, F as ClassroomRegistrationDoc, p as ContentSourceID, d as CourseInfo, J as CourseRegistration, r as CourseRegistrationDoc, b as CoursesDBInterface, G as SessionTrackingData, j as StudentClassroomDBInterface, l as StudySessionFailedItem, m as StudySessionFailedNewItem, n as StudySessionFailedReviewItem, k as StudySessionItem, T as TeacherClassroomDBInterface, H as UserConfig, y as UserCourseSetting, x as UserCourseSettings, w as UserDBAuthenticator, a as UserDBReader, v as UserDBWriter, z as UsrCrsDataInterface, q as getStudySource, o as isReview } from '../userDB-BqwxtJ_7.mjs';
|
|
3
|
-
export { D as DataLayerProvider } from '../dataLayerProvider-VlngD19_.mjs';
|
|
4
|
-
import { C as CardHistory, c as CardRecord, i as QuestionRecord } from '../types-legacy-6ettoclI.mjs';
|
|
5
|
-
export { d as CardData, e as CourseListData, g as DataShapeData, f as DisplayableData, D as DocType, b as DocTypePrefixes, F as Field, G as GuestUsername, Q as QualifiedCardID, h as QuestionData, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from '../types-legacy-6ettoclI.mjs';
|
|
6
|
-
import { DataShape, ParsedCard } from '@vue-skuilder/common';
|
|
7
|
-
import 'moment';
|
|
8
|
-
|
|
9
|
-
declare abstract class Loggable {
|
|
10
|
-
protected abstract readonly _className: string;
|
|
11
|
-
protected log(...args: unknown[]): void;
|
|
12
|
-
protected error(...args: unknown[]): void;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare function areQuestionRecords(h: CardHistory<CardRecord>): h is CardHistory<QuestionRecord>;
|
|
16
|
-
declare function isQuestionRecord(c: CardRecord): c is QuestionRecord;
|
|
17
|
-
declare function getCardHistoryID(courseID: string, cardID: string): PouchDB.Core.DocumentId;
|
|
18
|
-
declare function parseCardHistoryID(id: string): {
|
|
19
|
-
courseID: string;
|
|
20
|
-
cardID: string;
|
|
21
|
-
};
|
|
22
|
-
interface PouchDBError extends Error {
|
|
23
|
-
error?: string;
|
|
24
|
-
reason?: string;
|
|
25
|
-
}
|
|
26
|
-
declare function docIsDeleted(e: PouchDBError): boolean;
|
|
27
|
-
|
|
28
|
-
declare enum Navigators {
|
|
29
|
-
ELO = "elo",
|
|
30
|
-
HARDCODED = "hardcodedOrder"
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* A content-navigator provides runtime steering of study sessions.
|
|
34
|
-
*/
|
|
35
|
-
declare abstract class ContentNavigator implements StudyContentSource {
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* @param user
|
|
39
|
-
* @param strategyData
|
|
40
|
-
* @returns the runtime object used to steer a study session.
|
|
41
|
-
*/
|
|
42
|
-
static create(user: UserDBInterface, course: CourseDBInterface, strategyData: ContentNavigationStrategyData): Promise<ContentNavigator>;
|
|
43
|
-
abstract getPendingReviews(): Promise<(StudySessionReviewItem & ScheduledCard)[]>;
|
|
44
|
-
abstract getNewCards(n?: number): Promise<StudySessionNewItem[]>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Interface representing the result of a bulk import operation for a single card
|
|
49
|
-
*/
|
|
50
|
-
interface ImportResult {
|
|
51
|
-
/** The original text input for the card */
|
|
52
|
-
originalText: string;
|
|
53
|
-
/** Status of the import operation */
|
|
54
|
-
status: 'success' | 'error';
|
|
55
|
-
/** Message describing the result or error */
|
|
56
|
-
message: string;
|
|
57
|
-
/** ID of the newly created card (only for success) */
|
|
58
|
-
cardId?: string;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Configuration for the bulk card processor
|
|
62
|
-
*/
|
|
63
|
-
interface BulkCardProcessorConfig {
|
|
64
|
-
/** The data shape to use for the cards */
|
|
65
|
-
dataShape: DataShape;
|
|
66
|
-
/** The course code used for adding notes */
|
|
67
|
-
courseCode: string;
|
|
68
|
-
/** The username of the current user */
|
|
69
|
-
userName: string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Processes multiple cards from bulk text input
|
|
74
|
-
*
|
|
75
|
-
* @param parsedCards - Array of parsed cards to import
|
|
76
|
-
* @param courseDB - Course database interface
|
|
77
|
-
* @param config - Configuration for the card processor
|
|
78
|
-
* @returns Array of import results
|
|
79
|
-
*/
|
|
80
|
-
declare function importParsedCards(parsedCards: ParsedCard[], courseDB: CourseDBInterface, config: BulkCardProcessorConfig): Promise<ImportResult[]>;
|
|
81
|
-
/**
|
|
82
|
-
* Validates the configuration for bulk card processing
|
|
83
|
-
*
|
|
84
|
-
* @param config - Configuration to validate
|
|
85
|
-
* @returns Object with validation result and error message if any
|
|
86
|
-
*/
|
|
87
|
-
declare function validateProcessorConfig(config: Partial<BulkCardProcessorConfig>): {
|
|
88
|
-
isValid: boolean;
|
|
89
|
-
errorMessage?: string;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export { type BulkCardProcessorConfig, CardHistory, CardRecord, ContentNavigator, CourseDBInterface, type ImportResult, Loggable, Navigators, QuestionRecord, ScheduledCard, StudyContentSource, StudySessionNewItem, StudySessionReviewItem, UserDBInterface, areQuestionRecords, docIsDeleted, getCardHistoryID, importParsedCards, isQuestionRecord, parseCardHistoryID, validateProcessorConfig };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|