@vue-skuilder/db 0.2.13 → 0.2.15
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/{contentSource-C-0t0y0V.d.ts → contentSource-B1p-vdz7.d.ts} +7 -0
- package/dist/{contentSource-jSkcOt2s.d.cts → contentSource-Brz42x7n.d.cts} +7 -0
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +6 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +6 -3
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-BB0oi9T0.d.ts → dataLayerProvider-BWayUIoK.d.ts} +1 -1
- package/dist/{dataLayerProvider-BDClIrFC.d.cts → dataLayerProvider-CpwpT1rM.d.cts} +1 -1
- package/dist/impl/couch/index.d.cts +2 -2
- package/dist/impl/couch/index.d.ts +2 -2
- package/dist/impl/couch/index.js +6 -3
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +6 -3
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +2 -2
- package/dist/impl/static/index.d.ts +2 -2
- package/dist/impl/static/index.js +6 -3
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +6 -3
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +47 -5
- package/dist/index.d.ts +47 -5
- package/dist/index.js +50 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/interfaces/userDB.ts +8 -0
- package/src/impl/common/BaseUserDB.ts +2 -2
- package/src/impl/common/userDBHelpers.ts +14 -1
- package/src/index.ts +6 -0
- package/src/study/SessionOverlay.ts +16 -3
- package/src/study/index.ts +4 -0
- package/src/study/services/EloService.ts +20 -8
- package/src/study/services/ResponseProcessor.ts +62 -50
|
@@ -6689,6 +6689,9 @@ var init_dataDirectory = __esm({
|
|
|
6689
6689
|
|
|
6690
6690
|
// src/impl/common/userDBHelpers.ts
|
|
6691
6691
|
import moment3 from "moment";
|
|
6692
|
+
function makeScheduledCardId(reviewTime) {
|
|
6693
|
+
return DocTypePrefixes["SCHEDULED_CARD" /* SCHEDULED_CARD */] + moment3.utc(reviewTime).format(REVIEW_TIME_FORMAT2);
|
|
6694
|
+
}
|
|
6692
6695
|
function hexEncode(str) {
|
|
6693
6696
|
let hex;
|
|
6694
6697
|
let returnStr = "";
|
|
@@ -6744,7 +6747,7 @@ function scheduleCardReviewLocal(userDB, review) {
|
|
|
6744
6747
|
const now = moment3.utc();
|
|
6745
6748
|
logger.info(`Scheduling for review in: ${review.time.diff(now, "h") / 24} days`);
|
|
6746
6749
|
void userDB.put({
|
|
6747
|
-
_id:
|
|
6750
|
+
_id: makeScheduledCardId(review.time),
|
|
6748
6751
|
cardId: review.card_id,
|
|
6749
6752
|
reviewTime: review.time.toISOString(),
|
|
6750
6753
|
courseId: review.course_id,
|
|
@@ -7656,9 +7659,9 @@ Currently logged-in as ${this._username}.`
|
|
|
7656
7659
|
}
|
|
7657
7660
|
}).map((r) => r.doc);
|
|
7658
7661
|
}
|
|
7659
|
-
async getReviewsForcast(daysCount) {
|
|
7662
|
+
async getReviewsForcast(daysCount, course_id) {
|
|
7660
7663
|
const time = moment5.utc().add(daysCount, "days");
|
|
7661
|
-
return this.getReviewstoDate(time);
|
|
7664
|
+
return this.getReviewstoDate(time, course_id);
|
|
7662
7665
|
}
|
|
7663
7666
|
async getPendingReviews(course_id) {
|
|
7664
7667
|
const now = moment5.utc();
|