@vue-skuilder/db 0.2.14 → 0.2.16
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 +41 -5
- package/dist/index.d.ts +41 -5
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -4
- 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/CardHydrationService.ts +9 -1
package/dist/core/index.mjs
CHANGED
|
@@ -205,6 +205,9 @@ var init_dataDirectory = __esm({
|
|
|
205
205
|
|
|
206
206
|
// src/impl/common/userDBHelpers.ts
|
|
207
207
|
import moment from "moment";
|
|
208
|
+
function makeScheduledCardId(reviewTime) {
|
|
209
|
+
return DocTypePrefixes["SCHEDULED_CARD" /* SCHEDULED_CARD */] + moment.utc(reviewTime).format(REVIEW_TIME_FORMAT);
|
|
210
|
+
}
|
|
208
211
|
function filterAllDocsByPrefix(db, prefix, opts) {
|
|
209
212
|
const options = {
|
|
210
213
|
startkey: prefix,
|
|
@@ -234,7 +237,7 @@ function scheduleCardReviewLocal(userDB, review) {
|
|
|
234
237
|
const now = moment.utc();
|
|
235
238
|
logger.info(`Scheduling for review in: ${review.time.diff(now, "h") / 24} days`);
|
|
236
239
|
void userDB.put({
|
|
237
|
-
_id:
|
|
240
|
+
_id: makeScheduledCardId(review.time),
|
|
238
241
|
cardId: review.card_id,
|
|
239
242
|
reviewTime: review.time.toISOString(),
|
|
240
243
|
courseId: review.course_id,
|
|
@@ -7024,9 +7027,9 @@ Currently logged-in as ${this._username}.`
|
|
|
7024
7027
|
}
|
|
7025
7028
|
}).map((r) => r.doc);
|
|
7026
7029
|
}
|
|
7027
|
-
async getReviewsForcast(daysCount) {
|
|
7030
|
+
async getReviewsForcast(daysCount, course_id) {
|
|
7028
7031
|
const time = moment6.utc().add(daysCount, "days");
|
|
7029
|
-
return this.getReviewstoDate(time);
|
|
7032
|
+
return this.getReviewstoDate(time, course_id);
|
|
7030
7033
|
}
|
|
7031
7034
|
async getPendingReviews(course_id) {
|
|
7032
7035
|
const now = moment6.utc();
|