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 +4 -0
- package/README.md +1 -1
- package/index.js +0 -2
- package/lib/store.mjs +9 -1
- package/package.json +1 -1
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
package/index.js
CHANGED
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
|
-
|
|
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/ 的唯一读写入口。
|