@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './userDB-
|
|
1
|
+
import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './userDB-DNa0XPtn.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Main factory interface for data access
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './userDB-
|
|
1
|
+
import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './userDB-BqwxtJ_7.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Main factory interface for data access
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T as TagStub, a as Tag, S as SkuilderCourseData, Q as QualifiedCardID } from '../../types-legacy-6ettoclI.mjs';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
|
-
import { A as AdminDBInterface, h as AssignedContent, i as StudyContentSource, j as StudentClassroomDBInterface, U as UserDBInterface, f as StudySessionReviewItem, g as ScheduledCard, S as StudySessionNewItem, T as TeacherClassroomDBInterface, b as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, D as DataLayerResult, e as ContentNavigationStrategyData, k as StudySessionItem } from '../../userDB-
|
|
4
|
-
export { p as ContentSourceID, l as StudySessionFailedItem, m as StudySessionFailedNewItem, n as StudySessionFailedReviewItem, q as getStudySource, o as isReview } from '../../userDB-
|
|
3
|
+
import { A as AdminDBInterface, h as AssignedContent, i as StudyContentSource, j as StudentClassroomDBInterface, U as UserDBInterface, f as StudySessionReviewItem, g as ScheduledCard, S as StudySessionNewItem, T as TeacherClassroomDBInterface, b as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, D as DataLayerResult, e as ContentNavigationStrategyData, k as StudySessionItem } from '../../userDB-BqwxtJ_7.mjs';
|
|
4
|
+
export { p as ContentSourceID, l as StudySessionFailedItem, m as StudySessionFailedNewItem, n as StudySessionFailedReviewItem, q as getStudySource, o as isReview } from '../../userDB-BqwxtJ_7.mjs';
|
|
5
5
|
import * as _vue_skuilder_common from '@vue-skuilder/common';
|
|
6
6
|
import { ClassroomConfig, DataShape, CourseElo, CourseConfig as CourseConfig$1 } from '@vue-skuilder/common';
|
|
7
7
|
import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-CyATpyLQ.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T as TagStub, a as Tag, S as SkuilderCourseData, Q as QualifiedCardID } from '../../types-legacy-6ettoclI.js';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
|
-
import { A as AdminDBInterface, h as AssignedContent, i as StudyContentSource, j as StudentClassroomDBInterface, U as UserDBInterface, f as StudySessionReviewItem, g as ScheduledCard, S as StudySessionNewItem, T as TeacherClassroomDBInterface, b as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, D as DataLayerResult, e as ContentNavigationStrategyData, k as StudySessionItem } from '../../userDB-
|
|
4
|
-
export { p as ContentSourceID, l as StudySessionFailedItem, m as StudySessionFailedNewItem, n as StudySessionFailedReviewItem, q as getStudySource, o as isReview } from '../../userDB-
|
|
3
|
+
import { A as AdminDBInterface, h as AssignedContent, i as StudyContentSource, j as StudentClassroomDBInterface, U as UserDBInterface, f as StudySessionReviewItem, g as ScheduledCard, S as StudySessionNewItem, T as TeacherClassroomDBInterface, b as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, D as DataLayerResult, e as ContentNavigationStrategyData, k as StudySessionItem } from '../../userDB-DNa0XPtn.js';
|
|
4
|
+
export { p as ContentSourceID, l as StudySessionFailedItem, m as StudySessionFailedNewItem, n as StudySessionFailedReviewItem, q as getStudySource, o as isReview } from '../../userDB-DNa0XPtn.js';
|
|
5
5
|
import * as _vue_skuilder_common from '@vue-skuilder/common';
|
|
6
6
|
import { ClassroomConfig, DataShape, CourseElo, CourseConfig as CourseConfig$1 } from '@vue-skuilder/common';
|
|
7
7
|
import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-CyATpyLQ.js';
|
package/dist/impl/couch/index.js
CHANGED
|
@@ -2068,18 +2068,37 @@ function accomodateGuest() {
|
|
|
2068
2068
|
};
|
|
2069
2069
|
function generateUUID() {
|
|
2070
2070
|
logger.log("[funnel] Inside generateUUID()");
|
|
2071
|
+
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
2072
|
+
const uuid2 = crypto.randomUUID();
|
|
2073
|
+
logger.log("[funnel] Generated UUID using crypto.randomUUID():", uuid2);
|
|
2074
|
+
return uuid2;
|
|
2075
|
+
}
|
|
2076
|
+
if (typeof crypto !== "undefined" && typeof crypto.getRandomValues === "function") {
|
|
2077
|
+
const bytes = new Uint8Array(16);
|
|
2078
|
+
crypto.getRandomValues(bytes);
|
|
2079
|
+
bytes[6] = bytes[6] & 15 | 64;
|
|
2080
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
2081
|
+
const uuid2 = [
|
|
2082
|
+
Array.from(bytes.slice(0, 4)).map((b) => b.toString(16).padStart(2, "0")).join(""),
|
|
2083
|
+
Array.from(bytes.slice(4, 6)).map((b) => b.toString(16).padStart(2, "0")).join(""),
|
|
2084
|
+
Array.from(bytes.slice(6, 8)).map((b) => b.toString(16).padStart(2, "0")).join(""),
|
|
2085
|
+
Array.from(bytes.slice(8, 10)).map((b) => b.toString(16).padStart(2, "0")).join(""),
|
|
2086
|
+
Array.from(bytes.slice(10, 16)).map((b) => b.toString(16).padStart(2, "0")).join("")
|
|
2087
|
+
].join("-");
|
|
2088
|
+
logger.log("[funnel] Generated UUID using crypto.getRandomValues():", uuid2);
|
|
2089
|
+
return uuid2;
|
|
2090
|
+
}
|
|
2091
|
+
logger.warn("[funnel] crypto API not available, using timestamp-based UUID (NOT SECURE)");
|
|
2071
2092
|
let d = (/* @__PURE__ */ new Date()).getTime();
|
|
2072
|
-
logger.log("[funnel] Date timestamp:", d);
|
|
2073
2093
|
if (typeof performance !== "undefined" && typeof performance.now === "function") {
|
|
2074
2094
|
d += performance.now();
|
|
2075
|
-
logger.log("[funnel] After adding performance.now():", d);
|
|
2076
2095
|
}
|
|
2077
2096
|
const uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
2078
2097
|
const r = (d + Math.random() * 16) % 16 | 0;
|
|
2079
2098
|
d = Math.floor(d / 16);
|
|
2080
2099
|
return (c === "x" ? r : r & 3 | 8).toString(16);
|
|
2081
2100
|
});
|
|
2082
|
-
logger.log("[funnel] Generated UUID
|
|
2101
|
+
logger.log("[funnel] Generated UUID (fallback):", uuid);
|
|
2083
2102
|
return uuid;
|
|
2084
2103
|
}
|
|
2085
2104
|
}
|