@vue-skuilder/db 0.2.14 → 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.
Files changed (35) hide show
  1. package/dist/{contentSource-C-0t0y0V.d.ts → contentSource-B1p-vdz7.d.ts} +7 -0
  2. package/dist/{contentSource-jSkcOt2s.d.cts → contentSource-Brz42x7n.d.cts} +7 -0
  3. package/dist/core/index.d.cts +3 -3
  4. package/dist/core/index.d.ts +3 -3
  5. package/dist/core/index.js +6 -3
  6. package/dist/core/index.js.map +1 -1
  7. package/dist/core/index.mjs +6 -3
  8. package/dist/core/index.mjs.map +1 -1
  9. package/dist/{dataLayerProvider-BB0oi9T0.d.ts → dataLayerProvider-BWayUIoK.d.ts} +1 -1
  10. package/dist/{dataLayerProvider-BDClIrFC.d.cts → dataLayerProvider-CpwpT1rM.d.cts} +1 -1
  11. package/dist/impl/couch/index.d.cts +2 -2
  12. package/dist/impl/couch/index.d.ts +2 -2
  13. package/dist/impl/couch/index.js +6 -3
  14. package/dist/impl/couch/index.js.map +1 -1
  15. package/dist/impl/couch/index.mjs +6 -3
  16. package/dist/impl/couch/index.mjs.map +1 -1
  17. package/dist/impl/static/index.d.cts +2 -2
  18. package/dist/impl/static/index.d.ts +2 -2
  19. package/dist/impl/static/index.js +6 -3
  20. package/dist/impl/static/index.js.map +1 -1
  21. package/dist/impl/static/index.mjs +6 -3
  22. package/dist/impl/static/index.mjs.map +1 -1
  23. package/dist/index.d.cts +41 -5
  24. package/dist/index.d.ts +41 -5
  25. package/dist/index.js +17 -3
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +12 -3
  28. package/dist/index.mjs.map +1 -1
  29. package/package.json +3 -3
  30. package/src/core/interfaces/userDB.ts +8 -0
  31. package/src/impl/common/BaseUserDB.ts +2 -2
  32. package/src/impl/common/userDBHelpers.ts +14 -1
  33. package/src/index.ts +6 -0
  34. package/src/study/SessionOverlay.ts +16 -3
  35. package/src/study/index.ts +4 -0
@@ -177,6 +177,9 @@ var init_dataDirectory = __esm({
177
177
 
178
178
  // src/impl/common/userDBHelpers.ts
179
179
  import moment from "moment";
180
+ function makeScheduledCardId(reviewTime) {
181
+ return DocTypePrefixes["SCHEDULED_CARD" /* SCHEDULED_CARD */] + moment.utc(reviewTime).format(REVIEW_TIME_FORMAT);
182
+ }
180
183
  function filterAllDocsByPrefix(db, prefix, opts) {
181
184
  const options = {
182
185
  startkey: prefix,
@@ -206,7 +209,7 @@ function scheduleCardReviewLocal(userDB, review) {
206
209
  const now = moment.utc();
207
210
  logger.info(`Scheduling for review in: ${review.time.diff(now, "h") / 24} days`);
208
211
  void userDB.put({
209
- _id: DocTypePrefixes["SCHEDULED_CARD" /* SCHEDULED_CARD */] + review.time.format(REVIEW_TIME_FORMAT),
212
+ _id: makeScheduledCardId(review.time),
210
213
  cardId: review.card_id,
211
214
  reviewTime: review.time.toISOString(),
212
215
  courseId: review.course_id,
@@ -5726,9 +5729,9 @@ Currently logged-in as ${this._username}.`
5726
5729
  }
5727
5730
  }).map((r) => r.doc);
5728
5731
  }
5729
- async getReviewsForcast(daysCount) {
5732
+ async getReviewsForcast(daysCount, course_id) {
5730
5733
  const time = moment6.utc().add(daysCount, "days");
5731
- return this.getReviewstoDate(time);
5734
+ return this.getReviewstoDate(time, course_id);
5732
5735
  }
5733
5736
  async getPendingReviews(course_id) {
5734
5737
  const now = moment6.utc();