claude-notification-plugin 1.0.23 → 1.0.24
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/notifier/notifier.js +11 -2
- package/package.json +2 -3
package/notifier/notifier.js
CHANGED
|
@@ -6,7 +6,7 @@ import path from 'path';
|
|
|
6
6
|
import process from 'process';
|
|
7
7
|
import notifier from 'node-notifier';
|
|
8
8
|
import player from 'play-sound';
|
|
9
|
-
import
|
|
9
|
+
import { spawn } from 'child_process';
|
|
10
10
|
|
|
11
11
|
const audio = player({});
|
|
12
12
|
|
|
@@ -251,7 +251,16 @@ function speakResult (config, duration) {
|
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
253
|
try {
|
|
254
|
-
|
|
254
|
+
const text = getVoicePhrase(duration);
|
|
255
|
+
const psCommand = [
|
|
256
|
+
'Add-Type -AssemblyName System.Speech;',
|
|
257
|
+
'$s = New-Object System.Speech.Synthesis.SpeechSynthesizer;',
|
|
258
|
+
`$s.Speak("${text.replace(/"/g, '`"')}");`,
|
|
259
|
+
].join('');
|
|
260
|
+
spawn('powershell', ['-Command', psCommand], {
|
|
261
|
+
stdio: 'ignore',
|
|
262
|
+
windowsHide: true,
|
|
263
|
+
});
|
|
255
264
|
} catch {
|
|
256
265
|
// silent fail
|
|
257
266
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-notification-plugin",
|
|
3
3
|
"productName": "claude-notification-plugin",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.24",
|
|
5
5
|
"description": "Telegram and Windows notifications for Claude Code task completion",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -44,8 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"node-notifier": "^10.0.1",
|
|
47
|
-
"play-sound": "^1.1.6"
|
|
48
|
-
"say": "^0.16.0"
|
|
47
|
+
"play-sound": "^1.1.6"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
50
|
"eslint-plugin-import": "^2.31.0"
|