dsh-novel-game 0.3.1 → 0.3.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.3.2 — 2026-11-30
4
+
5
+ 修复:`game_status` / `manifest` 里的 `toolVersion` 之前写死 `0.1.0`,现在从 `package.json` 读取,与发布版本一致。
6
+
3
7
  ## 0.3.1 — 2026-11-30
4
8
 
5
9
  文档补丁:README 的「共同作者 / 喜欢它?/ 许可证」按插件市场统一格式重写(版本前缀、角色说明、GitHub ⭐/Issue/PR 入口、MIT License 链接)。无代码变更,测试仍 28/28。
package/README.md CHANGED
@@ -111,7 +111,7 @@ npm run check
111
111
 
112
112
  ## 共同作者
113
113
 
114
- 0.3.1 共同作者:[MiyueWinter](https://github.com/MiyueWinter) —— 文案、测试、设计与开发。
114
+ 0.3.2 共同作者:[MiyueWinter](https://github.com/MiyueWinter) —— 文案、测试、设计与开发。
115
115
 
116
116
  ## 喜欢它?
117
117
 
package/index.js CHANGED
@@ -313,5 +313,3 @@ export function apply(ctx) {
313
313
  ctx.effect(() => ctx.tools.register(definition));
314
314
  }
315
315
  }
316
-
317
- export default apply;
package/lib/store.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import path from 'node:path';
2
+ import { readFileSync } from 'node:fs';
2
3
  import { copyFile, readdir, readFile, rm } from 'node:fs/promises';
3
4
  import { pluginRoot } from './core/paths.mjs';
4
5
  import { GameError, ErrorCode } from './core/errors.mjs';
@@ -13,7 +14,14 @@ import {
13
14
  import { shardKey } from './core/ids.mjs';
14
15
 
15
16
  const SCHEMA_VERSION = 1;
16
- const TOOL_VERSION = '0.1.0';
17
+ // 版本从 package.json 读,避免代码里的常量与发布版本不一致。
18
+ const TOOL_VERSION = (() => {
19
+ try {
20
+ return JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version ?? '0.0.0';
21
+ } catch {
22
+ return '0.0.0';
23
+ }
24
+ })();
17
25
 
18
26
  /**
19
27
  * .dsh-novel-game/ 的唯一读写入口。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-novel-game",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "DSH 小说插件·游戏剧情:解包本地合法游戏副本中玩家可见的剧情/文本/设定,整理成可浏览、可检索、可摘录的 canon,供同人创作参考;只写 .dsh-novel-game/,游戏目录只读。",
5
5
  "type": "module",
6
6
  "main": "index.js",