@vue-skuilder/db 0.1.13-8 → 0.1.13
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/core/index.d.mts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-CNyNuV0r.d.ts → dataLayerProvider-BV5iZqt_.d.ts} +1 -1
- package/dist/{dataLayerProvider-BKo0bz_q.d.mts → dataLayerProvider-VlngD19_.d.mts} +1 -1
- package/dist/impl/couch/index.d.mts +2 -2
- package/dist/impl/couch/index.d.ts +2 -2
- package/dist/impl/couch/index.js +22 -3
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +22 -3
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.mts +2 -2
- package/dist/impl/static/index.d.ts +2 -2
- package/dist/impl/static/index.js +22 -3
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +22 -3
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{userDB-zzBUpIzY.d.mts → userDB-BqwxtJ_7.d.mts} +12 -1
- package/dist/{userDB-aPdG17B4.d.ts → userDB-DNa0XPtn.d.ts} +12 -1
- package/package.json +3 -3
- package/src/core/interfaces/contentSource.ts +2 -0
- package/src/core/types/user.ts +15 -0
- package/src/impl/common/BaseUserDB.ts +34 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { U as UserDBInterface, r as CourseRegistrationDoc, k as StudySessionItem, i as StudyContentSource } from './userDB-
|
|
2
|
-
export {
|
|
3
|
-
import { D as DataLayerProvider } from './dataLayerProvider-
|
|
1
|
+
import { U as UserDBInterface, r as CourseRegistrationDoc, k as StudySessionItem, i as StudyContentSource } 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, C as CourseDBInterface, d as CourseInfo, J as CourseRegistration, b as CoursesDBInterface, K as DocumentUpdater, g as ScheduledCard, G as SessionTrackingData, j as StudentClassroomDBInterface, l as StudySessionFailedItem, m as StudySessionFailedNewItem, n as StudySessionFailedReviewItem, S as StudySessionNewItem, f as StudySessionReviewItem, 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, L as newInterval } from './userDB-BqwxtJ_7.mjs';
|
|
3
|
+
import { D as DataLayerProvider } from './dataLayerProvider-VlngD19_.mjs';
|
|
4
4
|
import { C as CardHistory, c as CardRecord } from './types-legacy-6ettoclI.mjs';
|
|
5
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, i as QuestionRecord, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from './types-legacy-6ettoclI.mjs';
|
|
6
6
|
import { Loggable } from './core/index.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { U as UserDBInterface, r as CourseRegistrationDoc, k as StudySessionItem, i as StudyContentSource } from './userDB-
|
|
2
|
-
export {
|
|
3
|
-
import { D as DataLayerProvider } from './dataLayerProvider-
|
|
1
|
+
import { U as UserDBInterface, r as CourseRegistrationDoc, k as StudySessionItem, i as StudyContentSource } from './userDB-DNa0XPtn.js';
|
|
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, C as CourseDBInterface, d as CourseInfo, J as CourseRegistration, b as CoursesDBInterface, K as DocumentUpdater, g as ScheduledCard, G as SessionTrackingData, j as StudentClassroomDBInterface, l as StudySessionFailedItem, m as StudySessionFailedNewItem, n as StudySessionFailedReviewItem, S as StudySessionNewItem, f as StudySessionReviewItem, 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, L as newInterval } from './userDB-DNa0XPtn.js';
|
|
3
|
+
import { D as DataLayerProvider } from './dataLayerProvider-BV5iZqt_.js';
|
|
4
4
|
import { C as CardHistory, c as CardRecord } from './types-legacy-6ettoclI.js';
|
|
5
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, i as QuestionRecord, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from './types-legacy-6ettoclI.js';
|
|
6
6
|
import { Loggable } from './core/index.js';
|
package/dist/index.js
CHANGED
|
@@ -2481,18 +2481,37 @@ function accomodateGuest() {
|
|
|
2481
2481
|
};
|
|
2482
2482
|
function generateUUID() {
|
|
2483
2483
|
logger.log("[funnel] Inside generateUUID()");
|
|
2484
|
+
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
2485
|
+
const uuid2 = crypto.randomUUID();
|
|
2486
|
+
logger.log("[funnel] Generated UUID using crypto.randomUUID():", uuid2);
|
|
2487
|
+
return uuid2;
|
|
2488
|
+
}
|
|
2489
|
+
if (typeof crypto !== "undefined" && typeof crypto.getRandomValues === "function") {
|
|
2490
|
+
const bytes = new Uint8Array(16);
|
|
2491
|
+
crypto.getRandomValues(bytes);
|
|
2492
|
+
bytes[6] = bytes[6] & 15 | 64;
|
|
2493
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
2494
|
+
const uuid2 = [
|
|
2495
|
+
Array.from(bytes.slice(0, 4)).map((b) => b.toString(16).padStart(2, "0")).join(""),
|
|
2496
|
+
Array.from(bytes.slice(4, 6)).map((b) => b.toString(16).padStart(2, "0")).join(""),
|
|
2497
|
+
Array.from(bytes.slice(6, 8)).map((b) => b.toString(16).padStart(2, "0")).join(""),
|
|
2498
|
+
Array.from(bytes.slice(8, 10)).map((b) => b.toString(16).padStart(2, "0")).join(""),
|
|
2499
|
+
Array.from(bytes.slice(10, 16)).map((b) => b.toString(16).padStart(2, "0")).join("")
|
|
2500
|
+
].join("-");
|
|
2501
|
+
logger.log("[funnel] Generated UUID using crypto.getRandomValues():", uuid2);
|
|
2502
|
+
return uuid2;
|
|
2503
|
+
}
|
|
2504
|
+
logger.warn("[funnel] crypto API not available, using timestamp-based UUID (NOT SECURE)");
|
|
2484
2505
|
let d = (/* @__PURE__ */ new Date()).getTime();
|
|
2485
|
-
logger.log("[funnel] Date timestamp:", d);
|
|
2486
2506
|
if (typeof performance !== "undefined" && typeof performance.now === "function") {
|
|
2487
2507
|
d += performance.now();
|
|
2488
|
-
logger.log("[funnel] After adding performance.now():", d);
|
|
2489
2508
|
}
|
|
2490
2509
|
const uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
2491
2510
|
const r = (d + Math.random() * 16) % 16 | 0;
|
|
2492
2511
|
d = Math.floor(d / 16);
|
|
2493
2512
|
return (c === "x" ? r : r & 3 | 8).toString(16);
|
|
2494
2513
|
});
|
|
2495
|
-
logger.log("[funnel] Generated UUID
|
|
2514
|
+
logger.log("[funnel] Generated UUID (fallback):", uuid);
|
|
2496
2515
|
return uuid;
|
|
2497
2516
|
}
|
|
2498
2517
|
}
|