@vue-skuilder/db 0.1.32-a → 0.1.32-c

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.
Files changed (51) hide show
  1. package/dist/core/index.d.cts +16 -12
  2. package/dist/core/index.d.ts +16 -12
  3. package/dist/core/index.js +2279 -227
  4. package/dist/core/index.js.map +1 -1
  5. package/dist/core/index.mjs +2256 -200
  6. package/dist/core/index.mjs.map +1 -1
  7. package/dist/{contentSource-Bdwkvqa8.d.ts → dataLayerProvider-BAn-LRh5.d.ts} +626 -83
  8. package/dist/{contentSource-DF1nUbPQ.d.cts → dataLayerProvider-BJqBlMIl.d.cts} +626 -83
  9. package/dist/impl/couch/index.d.cts +18 -3
  10. package/dist/impl/couch/index.d.ts +18 -3
  11. package/dist/impl/couch/index.js +2323 -224
  12. package/dist/impl/couch/index.js.map +1 -1
  13. package/dist/impl/couch/index.mjs +2311 -208
  14. package/dist/impl/couch/index.mjs.map +1 -1
  15. package/dist/impl/static/index.d.cts +5 -4
  16. package/dist/impl/static/index.d.ts +5 -4
  17. package/dist/impl/static/index.js +2283 -231
  18. package/dist/impl/static/index.js.map +1 -1
  19. package/dist/impl/static/index.mjs +2268 -212
  20. package/dist/impl/static/index.mjs.map +1 -1
  21. package/dist/{index-BWvO-_rJ.d.ts → index-X6wHrURm.d.ts} +1 -1
  22. package/dist/{index-Ba7hYbHj.d.cts → index-m8MMGxxR.d.cts} +1 -1
  23. package/dist/index.d.cts +9 -381
  24. package/dist/index.d.ts +9 -381
  25. package/dist/index.js +9626 -8815
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +9559 -8748
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/{types-CJrLM1Ew.d.ts → types-DZ5dUqbL.d.ts} +1 -1
  30. package/dist/{types-W8n-B6HG.d.cts → types-ZL8tOPQZ.d.cts} +1 -1
  31. package/dist/{types-legacy-JXDxinpU.d.cts → types-legacy-C7r0T4OV.d.cts} +1 -1
  32. package/dist/{types-legacy-JXDxinpU.d.ts → types-legacy-C7r0T4OV.d.ts} +1 -1
  33. package/dist/util/packer/index.d.cts +3 -3
  34. package/dist/util/packer/index.d.ts +3 -3
  35. package/docs/navigators-architecture.md +2 -2
  36. package/package.json +2 -2
  37. package/src/core/interfaces/contentSource.ts +2 -1
  38. package/src/core/navigators/Pipeline.ts +51 -25
  39. package/src/core/navigators/PipelineDebugger.ts +49 -1
  40. package/src/core/navigators/filters/hierarchyDefinition.ts +92 -5
  41. package/src/core/navigators/filters/relativePriority.ts +7 -1
  42. package/src/core/navigators/generators/prescribed.ts +618 -43
  43. package/src/core/navigators/index.ts +2 -1
  44. package/src/impl/couch/CourseSyncService.ts +72 -4
  45. package/src/impl/couch/courseDB.ts +11 -0
  46. package/src/impl/static/courseDB.ts +13 -0
  47. package/src/study/SessionController.ts +276 -24
  48. package/src/study/services/EloService.ts +22 -3
  49. package/src/study/services/ResponseProcessor.ts +7 -3
  50. package/dist/dataLayerProvider-BKmVoyJR.d.ts +0 -67
  51. package/dist/dataLayerProvider-BQdfJuBN.d.cts +0 -67
@@ -1,67 +0,0 @@
1
- import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './contentSource-Bdwkvqa8.js';
2
-
3
- /**
4
- * Main factory interface for data access
5
- */
6
- interface DataLayerProvider {
7
- /**
8
- * Get the user database interface
9
- */
10
- getUserDB(): UserDBInterface;
11
- /**
12
- * Create a UserDBReader for a specific user (admin access required)
13
- * Uses session authentication to verify requesting user is admin
14
- * @param targetUsername - The username to create a reader for
15
- * @throws Error if requesting user is not 'admin'
16
- */
17
- createUserReaderForUser(targetUsername: string): Promise<UserDBReader>;
18
- /**
19
- * Get a course database interface
20
- */
21
- getCourseDB(courseId: string): CourseDBInterface;
22
- /**
23
- * Get the courses-lookup interface
24
- */
25
- getCoursesDB(): CoursesDBInterface;
26
- /**
27
- * Get a classroom database interface
28
- */
29
- getClassroomDB(classId: string, type: 'student' | 'teacher'): Promise<ClassroomDBInterface>;
30
- /**
31
- * Get the admin database interface
32
- */
33
- getAdminDB(): AdminDBInterface;
34
- /**
35
- * Initialize the data layer
36
- */
37
- initialize(): Promise<void>;
38
- /**
39
- * Teardown the data layer
40
- */
41
- teardown(): Promise<void>;
42
- /**
43
- * Check if this data layer is read-only
44
- */
45
- isReadOnly(): boolean;
46
- /**
47
- * Trigger local replication of a course database.
48
- *
49
- * When a course opts in via `CourseConfig.localSync.enabled`, this method
50
- * replicates the remote course DB to a local PouchDB instance. Subsequent
51
- * `getCourseDB()` calls for that course will return a CourseDB that reads
52
- * from the local replica (fast, no network) and writes to the remote
53
- * (ELO updates, admin ops).
54
- *
55
- * Safe to call multiple times — concurrent calls coalesce. Returns when
56
- * sync is complete (or immediately if already synced / disabled).
57
- *
58
- * Implementations that don't support local sync may no-op.
59
- *
60
- * @param courseId - The course to sync locally
61
- * @param forceEnabled - Skip CourseConfig check and sync regardless.
62
- * Use when the caller already knows local sync is desired.
63
- */
64
- ensureCourseSynced?(courseId: string, forceEnabled?: boolean): Promise<void>;
65
- }
66
-
67
- export type { DataLayerProvider as D };
@@ -1,67 +0,0 @@
1
- import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './contentSource-DF1nUbPQ.cjs';
2
-
3
- /**
4
- * Main factory interface for data access
5
- */
6
- interface DataLayerProvider {
7
- /**
8
- * Get the user database interface
9
- */
10
- getUserDB(): UserDBInterface;
11
- /**
12
- * Create a UserDBReader for a specific user (admin access required)
13
- * Uses session authentication to verify requesting user is admin
14
- * @param targetUsername - The username to create a reader for
15
- * @throws Error if requesting user is not 'admin'
16
- */
17
- createUserReaderForUser(targetUsername: string): Promise<UserDBReader>;
18
- /**
19
- * Get a course database interface
20
- */
21
- getCourseDB(courseId: string): CourseDBInterface;
22
- /**
23
- * Get the courses-lookup interface
24
- */
25
- getCoursesDB(): CoursesDBInterface;
26
- /**
27
- * Get a classroom database interface
28
- */
29
- getClassroomDB(classId: string, type: 'student' | 'teacher'): Promise<ClassroomDBInterface>;
30
- /**
31
- * Get the admin database interface
32
- */
33
- getAdminDB(): AdminDBInterface;
34
- /**
35
- * Initialize the data layer
36
- */
37
- initialize(): Promise<void>;
38
- /**
39
- * Teardown the data layer
40
- */
41
- teardown(): Promise<void>;
42
- /**
43
- * Check if this data layer is read-only
44
- */
45
- isReadOnly(): boolean;
46
- /**
47
- * Trigger local replication of a course database.
48
- *
49
- * When a course opts in via `CourseConfig.localSync.enabled`, this method
50
- * replicates the remote course DB to a local PouchDB instance. Subsequent
51
- * `getCourseDB()` calls for that course will return a CourseDB that reads
52
- * from the local replica (fast, no network) and writes to the remote
53
- * (ELO updates, admin ops).
54
- *
55
- * Safe to call multiple times — concurrent calls coalesce. Returns when
56
- * sync is complete (or immediately if already synced / disabled).
57
- *
58
- * Implementations that don't support local sync may no-op.
59
- *
60
- * @param courseId - The course to sync locally
61
- * @param forceEnabled - Skip CourseConfig check and sync regardless.
62
- * Use when the caller already knows local sync is desired.
63
- */
64
- ensureCourseSynced?(courseId: string, forceEnabled?: boolean): Promise<void>;
65
- }
66
-
67
- export type { DataLayerProvider as D };