dsh-notify-say 0.4.71 → 0.4.72
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/lib/config-store.js +429 -421
- package/lib/index.js +3039 -3035
- package/package.json +1 -1
- package/test/toast-title-jump-rule.test.mjs +12 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-notify-say",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.72",
|
|
4
4
|
"description": "Desktop notifications for DSH Desktop that actually speak: Windows TTS out of the box (zero download), VOICEVOX voice packs optional, a selectable system-sound fallback, and an idle gate that waits for running subagents before saying the turn is done. Includes a settings-page GUI (sound source, per-event overrides, jump-back-to-session, cooldowns) and a self hot-reload for development.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -134,9 +134,18 @@ test('T12: 客户端能同时吃新队列和旧单条响应', () => {
|
|
|
134
134
|
// ══ T13:配置透传链路 ══════════════════════════════════════════════════
|
|
135
135
|
test('T13: multiJumpRule 在 schema/store/index 三处白名单与透传都在', () => {
|
|
136
136
|
const store = readFileSync(join(ROOT, 'lib/config-store.js'), 'utf8');
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
|
|
138
|
+
// v0.4.71 修正:multiJumpRule 之前被**错放进 BOOL_KEYS**(那是给 boolean 用的),
|
|
139
|
+
// sanitize 会按 boolean 校验并丢弃它 —— 保存设置时静默失效。
|
|
140
|
+
// 现在它必须在 RULES 里以「字符串枚举」的形式校验。
|
|
141
|
+
assert.doesNotMatch(store, /BOOL_KEYS[\s\S]{0,400}'multiJumpRule'/,
|
|
142
|
+
'multiJumpRule 不能出现在 BOOL_KEYS 里(它是字符串,不是 boolean)');
|
|
143
|
+
assert.match(store, /multiJumpRule: \(v\) => \(\['clicked', 'earliest', 'latest', 'none'\]\.includes\(v\)/,
|
|
144
|
+
'config-store 必须在 RULES 里按枚举校验 multiJumpRule');
|
|
145
|
+
|
|
146
|
+
// index.js 的 sanitize 白名单(normalizeConfig)仍要有它
|
|
147
|
+
assert.match(INDEX, /'jumpWhenForeground', 'multiJumpRule'/, 'index 白名单');
|
|
148
|
+
|
|
140
149
|
assert.match(store, /multiJumpRule: cfg\.multiJumpRule,/, 'config-store 透传');
|
|
141
150
|
assert.match(INDEX, /multiJumpRule: g\.multiJumpRule,/, 'effectiveForClient 透传');
|
|
142
151
|
});
|