dsh-half-page 0.4.50 → 0.4.51

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 (2) hide show
  1. package/index.js +6 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2469,8 +2469,9 @@ async function signWork(rel, who) {
2469
2469
  parameters: obj(),
2470
2470
  output: textOut,
2471
2471
  async execute(args, exec) {
2472
- const { dir, perDay, st, shelf, readToday: rt, today: t } = await stateOf()
2473
- const reader = await readerOf(exec)
2472
+ const { dir, perDay, st, shelf, today: t } = await stateOf()
2473
+ const reader = await readerOf(exec)
2474
+ const rt = readTodayOf(st, reader.id)
2474
2475
  const books = []
2475
2476
  for (const b of shelf) {
2476
2477
  const r = st.books[b.id] || {}
@@ -2526,8 +2527,9 @@ async function signWork(rel, who) {
2526
2527
  const q = inQuietNow(await config())
2527
2528
  if (q) throw new Error(`静音时段(${q.fromText}–${q.toText}),不自动读。真要读请传 force: true`)
2528
2529
  }
2529
- const { dir, perDay, st, readToday: rt } = await stateOf()
2530
- const reader = await readerOf(exec)
2530
+ const { dir, perDay, st } = await stateOf()
2531
+ const reader = await readerOf(exec)
2532
+ const rt = readTodayOf(st, reader.id)
2531
2533
  // 取书口径跟 reading_note 一致:明说 > 我自己刚读的那本 > 全局当前那本
2532
2534
  const id = args?.book || lastReadBookOf(st, reader.id)
2533
2535
  if (!id) throw new Error('不知道读哪本:传 book,或先读过一本')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-half-page",
3
- "version": "0.4.50",
3
+ "version": "0.4.51",
4
4
  "private": false,
5
5
  "author": "鹿野 <luye@dsh.local>",
6
6
  "license": "MIT",