dsh-notify-say 0.4.26 → 0.4.27
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-notify-say",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.27",
|
|
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",
|
|
@@ -28,7 +28,20 @@ import { mkdtempSync, writeFileSync, mkdirSync, readFileSync, existsSync, statSy
|
|
|
28
28
|
import { tmpdir } from 'node:os';
|
|
29
29
|
import { join, resolve, dirname } from 'node:path';
|
|
30
30
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
31
|
-
import
|
|
31
|
+
// ⚠️ 不能静态 import registerHooks —— 它是 Node 22.15+ 才有的导出,
|
|
32
|
+
// Node 20 上会让整个测试文件加载失败(CI 首跑抓到)。
|
|
33
|
+
// 改为运行时按需取,取不到就跳过相关断言。
|
|
34
|
+
let _registerHooks;
|
|
35
|
+
async function getRegisterHooks() {
|
|
36
|
+
if (_registerHooks !== undefined) return _registerHooks;
|
|
37
|
+
try {
|
|
38
|
+
const mod = await import('node:module');
|
|
39
|
+
_registerHooks = typeof mod.registerHooks === 'function' ? mod.registerHooks : null;
|
|
40
|
+
} catch {
|
|
41
|
+
_registerHooks = null;
|
|
42
|
+
}
|
|
43
|
+
return _registerHooks;
|
|
44
|
+
}
|
|
32
45
|
|
|
33
46
|
import { computeFingerprint } from '../lib/dev-reload.js';
|
|
34
47
|
|