@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.
Files changed (61) hide show
  1. package/dist/{SyncStrategy-DnJRj-Xp.d.mts → SyncStrategy-CyATpyLQ.d.mts} +6 -0
  2. package/dist/{SyncStrategy-DnJRj-Xp.d.ts → SyncStrategy-CyATpyLQ.d.ts} +6 -0
  3. package/dist/core/index.d.mts +5 -5
  4. package/dist/core/index.d.ts +5 -5
  5. package/dist/core/index.js +131 -118
  6. package/dist/core/index.js.map +1 -1
  7. package/dist/core/index.mjs +128 -115
  8. package/dist/core/index.mjs.map +1 -1
  9. package/dist/{dataLayerProvider-BbW9EnZK.d.mts → dataLayerProvider-BInqI_RF.d.mts} +1 -1
  10. package/dist/{dataLayerProvider-6stCgDME.d.ts → dataLayerProvider-DqtNroSh.d.ts} +1 -1
  11. package/dist/impl/couch/index.d.mts +6 -6
  12. package/dist/impl/couch/index.d.ts +6 -6
  13. package/dist/impl/couch/index.js +1365 -1252
  14. package/dist/impl/couch/index.js.map +1 -1
  15. package/dist/impl/couch/index.mjs +1359 -1246
  16. package/dist/impl/couch/index.mjs.map +1 -1
  17. package/dist/impl/static/index.d.mts +8 -6
  18. package/dist/impl/static/index.d.ts +8 -6
  19. package/dist/impl/static/index.js +253 -843
  20. package/dist/impl/static/index.js.map +1 -1
  21. package/dist/impl/static/index.mjs +250 -842
  22. package/dist/impl/static/index.mjs.map +1 -1
  23. package/dist/index-CLL31bEy.d.ts +137 -0
  24. package/dist/index-CUNnL38E.d.mts +137 -0
  25. package/dist/index.d.mts +10 -55
  26. package/dist/index.d.ts +10 -55
  27. package/dist/index.js +343 -170
  28. package/dist/index.js.map +1 -1
  29. package/dist/index.mjs +340 -167
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/{types-BvzcRAys.d.ts → types-BefDGkKa.d.ts} +1 -1
  32. package/dist/{types-CQQ80R5N.d.mts → types-DC-ckZug.d.mts} +1 -1
  33. package/dist/{types-legacy-CtrmkOLu.d.mts → types-legacy-Birv-Jx6.d.mts} +2 -2
  34. package/dist/{types-legacy-CtrmkOLu.d.ts → types-legacy-Birv-Jx6.d.ts} +2 -2
  35. package/dist/{userDB-DUY63VMN.d.ts → userDB-C33Hzjgn.d.mts} +10 -3
  36. package/dist/{userDB-7fM4tpgr.d.mts → userDB-DusL7OXe.d.ts} +10 -3
  37. package/dist/util/packer/index.d.mts +3 -63
  38. package/dist/util/packer/index.d.ts +3 -63
  39. package/dist/util/packer/index.js +53 -1
  40. package/dist/util/packer/index.js.map +1 -1
  41. package/dist/util/packer/index.mjs +53 -1
  42. package/dist/util/packer/index.mjs.map +1 -1
  43. package/package.json +7 -4
  44. package/src/core/types/types-legacy.ts +13 -1
  45. package/src/core/types/user.ts +9 -2
  46. package/src/core/util/index.ts +5 -4
  47. package/src/impl/common/BaseUserDB.ts +33 -22
  48. package/src/impl/common/SyncStrategy.ts +7 -0
  49. package/src/impl/common/index.ts +0 -1
  50. package/src/impl/common/userDBHelpers.ts +4 -4
  51. package/src/impl/couch/CouchDBSyncStrategy.ts +10 -0
  52. package/src/impl/couch/courseAPI.ts +7 -6
  53. package/src/impl/couch/index.ts +10 -5
  54. package/src/impl/couch/updateQueue.ts +12 -8
  55. package/src/impl/couch/user-course-relDB.ts +17 -27
  56. package/src/impl/static/NoOpSyncStrategy.ts +5 -0
  57. package/src/impl/static/StaticDataUnpacker.ts +18 -36
  58. package/src/impl/static/courseDB.ts +135 -17
  59. package/src/util/migrator/FileSystemAdapter.ts +20 -0
  60. package/src/util/migrator/StaticToCouchDBMigrator.ts +6 -0
  61. package/src/util/packer/CouchDBToStaticPacker.ts +92 -2
@@ -0,0 +1,137 @@
1
+ import { P as PackerConfig, a as PackedCourseData, S as StaticCourseManifest } from './types-BefDGkKa.js';
2
+
3
+ /**
4
+ * Abstraction for file system operations needed by the migrator.
5
+ * This allows dependency injection of file system operations,
6
+ * avoiding bundling issues with Node.js fs module.
7
+ */
8
+ interface FileSystemAdapter {
9
+ /**
10
+ * Read a text file and return its contents as a string
11
+ */
12
+ readFile(filePath: string): Promise<string>;
13
+ /**
14
+ * Read a binary file and return its contents as a Buffer
15
+ */
16
+ readBinary(filePath: string): Promise<Buffer>;
17
+ /**
18
+ * Check if a file or directory exists
19
+ */
20
+ exists(filePath: string): Promise<boolean>;
21
+ /**
22
+ * Get file/directory statistics
23
+ */
24
+ stat(filePath: string): Promise<FileStats>;
25
+ /**
26
+ * Write text data to a file
27
+ */
28
+ writeFile(filePath: string, data: string | Buffer): Promise<void>;
29
+ /**
30
+ * Write JSON data to a file with formatting
31
+ */
32
+ writeJson(filePath: string, data: any, options?: {
33
+ spaces?: number;
34
+ }): Promise<void>;
35
+ /**
36
+ * Ensure a directory exists, creating it and parent directories if needed
37
+ */
38
+ ensureDir(dirPath: string): Promise<void>;
39
+ /**
40
+ * Join path segments into a complete path
41
+ */
42
+ joinPath(...segments: string[]): string;
43
+ /**
44
+ * Get the directory name of a path
45
+ */
46
+ dirname(filePath: string): string;
47
+ /**
48
+ * Check if a path is absolute
49
+ */
50
+ isAbsolute(filePath: string): boolean;
51
+ }
52
+ interface FileStats {
53
+ isDirectory(): boolean;
54
+ isFile(): boolean;
55
+ size: number;
56
+ }
57
+ /**
58
+ * Error thrown when file system operations fail
59
+ */
60
+ declare class FileSystemError extends Error {
61
+ readonly operation: string;
62
+ readonly filePath: string;
63
+ readonly cause?: Error | undefined;
64
+ constructor(message: string, operation: string, filePath: string, cause?: Error | undefined);
65
+ }
66
+
67
+ declare class CouchDBToStaticPacker {
68
+ private config;
69
+ private sourceDB;
70
+ constructor(config?: Partial<PackerConfig>);
71
+ /**
72
+ * Pack a CouchDB course database into static data structures
73
+ */
74
+ packCourse(sourceDB: PouchDB.Database, courseId: string): Promise<PackedCourseData>;
75
+ /**
76
+ * Pack a CouchDB course database and write the static files to disk
77
+ */
78
+ packCourseToFiles(sourceDB: PouchDB.Database, courseId: string, outputDir: string, fsAdapter: FileSystemAdapter): Promise<{
79
+ manifest: StaticCourseManifest;
80
+ filesWritten: number;
81
+ attachmentsFound: number;
82
+ }>;
83
+ /**
84
+ * Write packed course data to files using FileSystemAdapter
85
+ */
86
+ private writePackedDataToFiles;
87
+ private extractCourseConfig;
88
+ private extractDesignDocs;
89
+ private extractDocumentsByType;
90
+ private createChunks;
91
+ private prepareChunkData;
92
+ private buildIndices;
93
+ private buildEloIndex;
94
+ private buildTagIndex;
95
+ /**
96
+ * Build view index by querying CouchDB views directly instead of parsing map functions
97
+ */
98
+ private buildViewIndex;
99
+ /**
100
+ * Format CouchDB view results for static consumption
101
+ */
102
+ private formatViewResults;
103
+ /**
104
+ * Format ELO view results - convert to sorted array format
105
+ */
106
+ private formatEloViewIndex;
107
+ /**
108
+ * Format tags view results - convert to tag mapping format
109
+ */
110
+ private formatTagsViewIndex;
111
+ /**
112
+ * Format inexperience view results - convert to experience-based format
113
+ */
114
+ private formatInexperienceViewIndex;
115
+ /**
116
+ * Format generic view results - fallback for unknown views
117
+ */
118
+ private formatGenericViewIndex;
119
+ /**
120
+ * Extract all attachments from documents and download binary data
121
+ */
122
+ private extractAllAttachments;
123
+ /**
124
+ * Extract attachments for a single document
125
+ */
126
+ private extractDocumentAttachments;
127
+ /**
128
+ * Transform attachment stubs to include file paths
129
+ */
130
+ private transformAttachmentStubs;
131
+ /**
132
+ * Get file extension from content type
133
+ */
134
+ private getFileExtension;
135
+ }
136
+
137
+ export { CouchDBToStaticPacker as C, type FileSystemAdapter as F, type FileStats as a, FileSystemError as b };
@@ -0,0 +1,137 @@
1
+ import { P as PackerConfig, a as PackedCourseData, S as StaticCourseManifest } from './types-DC-ckZug.mjs';
2
+
3
+ /**
4
+ * Abstraction for file system operations needed by the migrator.
5
+ * This allows dependency injection of file system operations,
6
+ * avoiding bundling issues with Node.js fs module.
7
+ */
8
+ interface FileSystemAdapter {
9
+ /**
10
+ * Read a text file and return its contents as a string
11
+ */
12
+ readFile(filePath: string): Promise<string>;
13
+ /**
14
+ * Read a binary file and return its contents as a Buffer
15
+ */
16
+ readBinary(filePath: string): Promise<Buffer>;
17
+ /**
18
+ * Check if a file or directory exists
19
+ */
20
+ exists(filePath: string): Promise<boolean>;
21
+ /**
22
+ * Get file/directory statistics
23
+ */
24
+ stat(filePath: string): Promise<FileStats>;
25
+ /**
26
+ * Write text data to a file
27
+ */
28
+ writeFile(filePath: string, data: string | Buffer): Promise<void>;
29
+ /**
30
+ * Write JSON data to a file with formatting
31
+ */
32
+ writeJson(filePath: string, data: any, options?: {
33
+ spaces?: number;
34
+ }): Promise<void>;
35
+ /**
36
+ * Ensure a directory exists, creating it and parent directories if needed
37
+ */
38
+ ensureDir(dirPath: string): Promise<void>;
39
+ /**
40
+ * Join path segments into a complete path
41
+ */
42
+ joinPath(...segments: string[]): string;
43
+ /**
44
+ * Get the directory name of a path
45
+ */
46
+ dirname(filePath: string): string;
47
+ /**
48
+ * Check if a path is absolute
49
+ */
50
+ isAbsolute(filePath: string): boolean;
51
+ }
52
+ interface FileStats {
53
+ isDirectory(): boolean;
54
+ isFile(): boolean;
55
+ size: number;
56
+ }
57
+ /**
58
+ * Error thrown when file system operations fail
59
+ */
60
+ declare class FileSystemError extends Error {
61
+ readonly operation: string;
62
+ readonly filePath: string;
63
+ readonly cause?: Error | undefined;
64
+ constructor(message: string, operation: string, filePath: string, cause?: Error | undefined);
65
+ }
66
+
67
+ declare class CouchDBToStaticPacker {
68
+ private config;
69
+ private sourceDB;
70
+ constructor(config?: Partial<PackerConfig>);
71
+ /**
72
+ * Pack a CouchDB course database into static data structures
73
+ */
74
+ packCourse(sourceDB: PouchDB.Database, courseId: string): Promise<PackedCourseData>;
75
+ /**
76
+ * Pack a CouchDB course database and write the static files to disk
77
+ */
78
+ packCourseToFiles(sourceDB: PouchDB.Database, courseId: string, outputDir: string, fsAdapter: FileSystemAdapter): Promise<{
79
+ manifest: StaticCourseManifest;
80
+ filesWritten: number;
81
+ attachmentsFound: number;
82
+ }>;
83
+ /**
84
+ * Write packed course data to files using FileSystemAdapter
85
+ */
86
+ private writePackedDataToFiles;
87
+ private extractCourseConfig;
88
+ private extractDesignDocs;
89
+ private extractDocumentsByType;
90
+ private createChunks;
91
+ private prepareChunkData;
92
+ private buildIndices;
93
+ private buildEloIndex;
94
+ private buildTagIndex;
95
+ /**
96
+ * Build view index by querying CouchDB views directly instead of parsing map functions
97
+ */
98
+ private buildViewIndex;
99
+ /**
100
+ * Format CouchDB view results for static consumption
101
+ */
102
+ private formatViewResults;
103
+ /**
104
+ * Format ELO view results - convert to sorted array format
105
+ */
106
+ private formatEloViewIndex;
107
+ /**
108
+ * Format tags view results - convert to tag mapping format
109
+ */
110
+ private formatTagsViewIndex;
111
+ /**
112
+ * Format inexperience view results - convert to experience-based format
113
+ */
114
+ private formatInexperienceViewIndex;
115
+ /**
116
+ * Format generic view results - fallback for unknown views
117
+ */
118
+ private formatGenericViewIndex;
119
+ /**
120
+ * Extract all attachments from documents and download binary data
121
+ */
122
+ private extractAllAttachments;
123
+ /**
124
+ * Extract attachments for a single document
125
+ */
126
+ private extractDocumentAttachments;
127
+ /**
128
+ * Transform attachment stubs to include file paths
129
+ */
130
+ private transformAttachmentStubs;
131
+ /**
132
+ * Get file extension from content type
133
+ */
134
+ private getFileExtension;
135
+ }
136
+
137
+ export { CouchDBToStaticPacker as C, type FileSystemAdapter as F, type FileStats as a, FileSystemError as b };
package/dist/index.d.mts CHANGED
@@ -1,13 +1,14 @@
1
- import { j as StudySessionItem, h as StudyContentSource } from './userDB-7fM4tpgr.mjs';
2
- export { B as ActivityRecord, A as AdminDBInterface, s as AssignedCard, g as AssignedContent, r as AssignedCourse, q as AssignedTag, b as ClassroomDBInterface, x as ClassroomRegistration, w as ClassroomRegistrationDesignation, y as ClassroomRegistrationDoc, o as ContentSourceID, C as CourseDBInterface, c as CourseInfo, E as CourseRegistration, F as CourseRegistrationDoc, a as CoursesDBInterface, G as DocumentUpdater, f as ScheduledCard, i as StudentClassroomDBInterface, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionNewItem, e as StudySessionReviewItem, T as TeacherClassroomDBInterface, z as UserConfig, u as UserCourseSetting, t as UserCourseSettings, U as UserDBInterface, v as UsrCrsDataInterface, p as getStudySource, n as isReview, H as newInterval } from './userDB-7fM4tpgr.mjs';
3
- import { D as DataLayerProvider } from './dataLayerProvider-BbW9EnZK.mjs';
4
- import { C as CardRecord } from './types-legacy-CtrmkOLu.mjs';
5
- export { b as CardData, g as CardHistory, c as CourseListData, e as DataShapeData, d as DisplayableData, D as DocType, F as Field, G as GuestUsername, Q as QuestionData, h as QuestionRecord, S as SkuilderCourseData, a as Tag, T as TagStub, f as cardHistoryPrefix, l as log } from './types-legacy-CtrmkOLu.mjs';
1
+ import { j as StudySessionItem, h as StudyContentSource } from './userDB-C33Hzjgn.mjs';
2
+ export { B as ActivityRecord, A as AdminDBInterface, s as AssignedCard, g as AssignedContent, r as AssignedCourse, q as AssignedTag, b as ClassroomDBInterface, x as ClassroomRegistration, w as ClassroomRegistrationDesignation, y as ClassroomRegistrationDoc, o as ContentSourceID, C as CourseDBInterface, c as CourseInfo, E as CourseRegistration, F as CourseRegistrationDoc, a as CoursesDBInterface, G as DocumentUpdater, f as ScheduledCard, i as StudentClassroomDBInterface, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionNewItem, e as StudySessionReviewItem, T as TeacherClassroomDBInterface, z as UserConfig, u as UserCourseSetting, t as UserCourseSettings, U as UserDBInterface, v as UsrCrsDataInterface, p as getStudySource, n as isReview, H as newInterval } from './userDB-C33Hzjgn.mjs';
3
+ import { D as DataLayerProvider } from './dataLayerProvider-BInqI_RF.mjs';
4
+ import { C as CardRecord } from './types-legacy-Birv-Jx6.mjs';
5
+ export { b as CardData, g as CardHistory, c as CourseListData, e as DataShapeData, d as DisplayableData, D as DocType, f as DocTypePrefixes, F as Field, G as GuestUsername, Q as QuestionData, h as QuestionRecord, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from './types-legacy-Birv-Jx6.mjs';
6
6
  import { Loggable } from './core/index.mjs';
7
7
  export { BulkCardProcessorConfig, ContentNavigator, ImportResult, Navigators, areQuestionRecords, docIsDeleted, getCardHistoryID, importParsedCards, isQuestionRecord, parseCardHistoryID, validateProcessorConfig } from './core/index.mjs';
8
- import { S as StaticCourseManifest } from './types-CQQ80R5N.mjs';
9
- export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-CQQ80R5N.mjs';
10
- export { CouchDBToStaticPacker } from './util/packer/index.mjs';
8
+ import { S as StaticCourseManifest } from './types-DC-ckZug.mjs';
9
+ export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-DC-ckZug.mjs';
10
+ import { F as FileSystemAdapter } from './index-CUNnL38E.mjs';
11
+ export { C as CouchDBToStaticPacker, a as FileStats, b as FileSystemError } from './index-CUNnL38E.mjs';
11
12
  import '@vue-skuilder/common';
12
13
  import 'moment';
13
14
 
@@ -74,52 +75,6 @@ interface AttachmentUploadResult {
74
75
  }
75
76
  declare const DEFAULT_MIGRATION_OPTIONS: MigrationOptions;
76
77
 
77
- /**
78
- * Abstraction for file system operations needed by the migrator.
79
- * This allows dependency injection of file system operations,
80
- * avoiding bundling issues with Node.js fs module.
81
- */
82
- interface FileSystemAdapter {
83
- /**
84
- * Read a text file and return its contents as a string
85
- */
86
- readFile(filePath: string): Promise<string>;
87
- /**
88
- * Read a binary file and return its contents as a Buffer
89
- */
90
- readBinary(filePath: string): Promise<Buffer>;
91
- /**
92
- * Check if a file or directory exists
93
- */
94
- exists(filePath: string): Promise<boolean>;
95
- /**
96
- * Get file/directory statistics
97
- */
98
- stat(filePath: string): Promise<FileStats>;
99
- /**
100
- * Join path segments into a complete path
101
- */
102
- joinPath(...segments: string[]): string;
103
- /**
104
- * Check if a path is absolute
105
- */
106
- isAbsolute(filePath: string): boolean;
107
- }
108
- interface FileStats {
109
- isDirectory(): boolean;
110
- isFile(): boolean;
111
- size: number;
112
- }
113
- /**
114
- * Error thrown when file system operations fail
115
- */
116
- declare class FileSystemError extends Error {
117
- readonly operation: string;
118
- readonly filePath: string;
119
- readonly cause?: Error | undefined;
120
- constructor(message: string, operation: string, filePath: string, cause?: Error | undefined);
121
- }
122
-
123
78
  declare class StaticToCouchDBMigrator {
124
79
  private options;
125
80
  private progressCallback?;
@@ -375,4 +330,4 @@ declare function getDataLayer(): DataLayerProvider;
375
330
  */
376
331
  declare function _resetDataLayer(): Promise<void>;
377
332
 
378
- export { type AggregatedDocument, type AttachmentUploadResult, CardRecord, CourseLookup, DEFAULT_MIGRATION_OPTIONS, type DataLayerConfig, DataLayerProvider, type DocumentCounts, ENV, type FileStats, type FileSystemAdapter, FileSystemError, Loggable, type MigrationOptions, type MigrationResult, type RestoreProgress, SessionController, StaticCourseManifest, type StaticCourseValidation, StaticToCouchDBMigrator, StudyContentSource, StudySessionItem, type StudySessionRecord, type ValidationIssue, type ValidationResult, _resetDataLayer, ensureAppDataDirectory, getAppDataDirectory, getDataLayer, getDbPath, getLogFilePath, initializeDataDirectory, initializeDataLayer, initializeTuiLogging, logger, showUserError, showUserMessage, validateMigration, validateStaticCourse };
333
+ export { type AggregatedDocument, type AttachmentUploadResult, CardRecord, CourseLookup, DEFAULT_MIGRATION_OPTIONS, type DataLayerConfig, DataLayerProvider, type DocumentCounts, ENV, FileSystemAdapter, Loggable, type MigrationOptions, type MigrationResult, type RestoreProgress, SessionController, StaticCourseManifest, type StaticCourseValidation, StaticToCouchDBMigrator, StudyContentSource, StudySessionItem, type StudySessionRecord, type ValidationIssue, type ValidationResult, _resetDataLayer, ensureAppDataDirectory, getAppDataDirectory, getDataLayer, getDbPath, getLogFilePath, initializeDataDirectory, initializeDataLayer, initializeTuiLogging, logger, showUserError, showUserMessage, validateMigration, validateStaticCourse };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,14 @@
1
- import { j as StudySessionItem, h as StudyContentSource } from './userDB-DUY63VMN.js';
2
- export { B as ActivityRecord, A as AdminDBInterface, s as AssignedCard, g as AssignedContent, r as AssignedCourse, q as AssignedTag, b as ClassroomDBInterface, x as ClassroomRegistration, w as ClassroomRegistrationDesignation, y as ClassroomRegistrationDoc, o as ContentSourceID, C as CourseDBInterface, c as CourseInfo, E as CourseRegistration, F as CourseRegistrationDoc, a as CoursesDBInterface, G as DocumentUpdater, f as ScheduledCard, i as StudentClassroomDBInterface, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionNewItem, e as StudySessionReviewItem, T as TeacherClassroomDBInterface, z as UserConfig, u as UserCourseSetting, t as UserCourseSettings, U as UserDBInterface, v as UsrCrsDataInterface, p as getStudySource, n as isReview, H as newInterval } from './userDB-DUY63VMN.js';
3
- import { D as DataLayerProvider } from './dataLayerProvider-6stCgDME.js';
4
- import { C as CardRecord } from './types-legacy-CtrmkOLu.js';
5
- export { b as CardData, g as CardHistory, c as CourseListData, e as DataShapeData, d as DisplayableData, D as DocType, F as Field, G as GuestUsername, Q as QuestionData, h as QuestionRecord, S as SkuilderCourseData, a as Tag, T as TagStub, f as cardHistoryPrefix, l as log } from './types-legacy-CtrmkOLu.js';
1
+ import { j as StudySessionItem, h as StudyContentSource } from './userDB-DusL7OXe.js';
2
+ export { B as ActivityRecord, A as AdminDBInterface, s as AssignedCard, g as AssignedContent, r as AssignedCourse, q as AssignedTag, b as ClassroomDBInterface, x as ClassroomRegistration, w as ClassroomRegistrationDesignation, y as ClassroomRegistrationDoc, o as ContentSourceID, C as CourseDBInterface, c as CourseInfo, E as CourseRegistration, F as CourseRegistrationDoc, a as CoursesDBInterface, G as DocumentUpdater, f as ScheduledCard, i as StudentClassroomDBInterface, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionNewItem, e as StudySessionReviewItem, T as TeacherClassroomDBInterface, z as UserConfig, u as UserCourseSetting, t as UserCourseSettings, U as UserDBInterface, v as UsrCrsDataInterface, p as getStudySource, n as isReview, H as newInterval } from './userDB-DusL7OXe.js';
3
+ import { D as DataLayerProvider } from './dataLayerProvider-DqtNroSh.js';
4
+ import { C as CardRecord } from './types-legacy-Birv-Jx6.js';
5
+ export { b as CardData, g as CardHistory, c as CourseListData, e as DataShapeData, d as DisplayableData, D as DocType, f as DocTypePrefixes, F as Field, G as GuestUsername, Q as QuestionData, h as QuestionRecord, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from './types-legacy-Birv-Jx6.js';
6
6
  import { Loggable } from './core/index.js';
7
7
  export { BulkCardProcessorConfig, ContentNavigator, ImportResult, Navigators, areQuestionRecords, docIsDeleted, getCardHistoryID, importParsedCards, isQuestionRecord, parseCardHistoryID, validateProcessorConfig } from './core/index.js';
8
- import { S as StaticCourseManifest } from './types-BvzcRAys.js';
9
- export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-BvzcRAys.js';
10
- export { CouchDBToStaticPacker } from './util/packer/index.js';
8
+ import { S as StaticCourseManifest } from './types-BefDGkKa.js';
9
+ export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-BefDGkKa.js';
10
+ import { F as FileSystemAdapter } from './index-CLL31bEy.js';
11
+ export { C as CouchDBToStaticPacker, a as FileStats, b as FileSystemError } from './index-CLL31bEy.js';
11
12
  import '@vue-skuilder/common';
12
13
  import 'moment';
13
14
 
@@ -74,52 +75,6 @@ interface AttachmentUploadResult {
74
75
  }
75
76
  declare const DEFAULT_MIGRATION_OPTIONS: MigrationOptions;
76
77
 
77
- /**
78
- * Abstraction for file system operations needed by the migrator.
79
- * This allows dependency injection of file system operations,
80
- * avoiding bundling issues with Node.js fs module.
81
- */
82
- interface FileSystemAdapter {
83
- /**
84
- * Read a text file and return its contents as a string
85
- */
86
- readFile(filePath: string): Promise<string>;
87
- /**
88
- * Read a binary file and return its contents as a Buffer
89
- */
90
- readBinary(filePath: string): Promise<Buffer>;
91
- /**
92
- * Check if a file or directory exists
93
- */
94
- exists(filePath: string): Promise<boolean>;
95
- /**
96
- * Get file/directory statistics
97
- */
98
- stat(filePath: string): Promise<FileStats>;
99
- /**
100
- * Join path segments into a complete path
101
- */
102
- joinPath(...segments: string[]): string;
103
- /**
104
- * Check if a path is absolute
105
- */
106
- isAbsolute(filePath: string): boolean;
107
- }
108
- interface FileStats {
109
- isDirectory(): boolean;
110
- isFile(): boolean;
111
- size: number;
112
- }
113
- /**
114
- * Error thrown when file system operations fail
115
- */
116
- declare class FileSystemError extends Error {
117
- readonly operation: string;
118
- readonly filePath: string;
119
- readonly cause?: Error | undefined;
120
- constructor(message: string, operation: string, filePath: string, cause?: Error | undefined);
121
- }
122
-
123
78
  declare class StaticToCouchDBMigrator {
124
79
  private options;
125
80
  private progressCallback?;
@@ -375,4 +330,4 @@ declare function getDataLayer(): DataLayerProvider;
375
330
  */
376
331
  declare function _resetDataLayer(): Promise<void>;
377
332
 
378
- export { type AggregatedDocument, type AttachmentUploadResult, CardRecord, CourseLookup, DEFAULT_MIGRATION_OPTIONS, type DataLayerConfig, DataLayerProvider, type DocumentCounts, ENV, type FileStats, type FileSystemAdapter, FileSystemError, Loggable, type MigrationOptions, type MigrationResult, type RestoreProgress, SessionController, StaticCourseManifest, type StaticCourseValidation, StaticToCouchDBMigrator, StudyContentSource, StudySessionItem, type StudySessionRecord, type ValidationIssue, type ValidationResult, _resetDataLayer, ensureAppDataDirectory, getAppDataDirectory, getDataLayer, getDbPath, getLogFilePath, initializeDataDirectory, initializeDataLayer, initializeTuiLogging, logger, showUserError, showUserMessage, validateMigration, validateStaticCourse };
333
+ export { type AggregatedDocument, type AttachmentUploadResult, CardRecord, CourseLookup, DEFAULT_MIGRATION_OPTIONS, type DataLayerConfig, DataLayerProvider, type DocumentCounts, ENV, FileSystemAdapter, Loggable, type MigrationOptions, type MigrationResult, type RestoreProgress, SessionController, StaticCourseManifest, type StaticCourseValidation, StaticToCouchDBMigrator, StudyContentSource, StudySessionItem, type StudySessionRecord, type ValidationIssue, type ValidationResult, _resetDataLayer, ensureAppDataDirectory, getAppDataDirectory, getDataLayer, getDbPath, getLogFilePath, initializeDataDirectory, initializeDataLayer, initializeTuiLogging, logger, showUserError, showUserMessage, validateMigration, validateStaticCourse };