claude-notification-plugin 1.0.25 → 1.0.28
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 +8 -6
- package/package.json +2 -3
package/notifier/notifier.js
CHANGED
|
@@ -5,11 +5,8 @@ import os from 'os';
|
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import process from 'process';
|
|
7
7
|
import notifier from 'node-notifier';
|
|
8
|
-
import player from 'play-sound';
|
|
9
8
|
import { spawn } from 'child_process';
|
|
10
9
|
|
|
11
|
-
const audio = player({});
|
|
12
|
-
|
|
13
10
|
// ----------------------
|
|
14
11
|
// CONFIG
|
|
15
12
|
// ----------------------
|
|
@@ -222,7 +219,12 @@ function playSound (config) {
|
|
|
222
219
|
return;
|
|
223
220
|
}
|
|
224
221
|
try {
|
|
225
|
-
|
|
222
|
+
const file = config.sound.file.replace(/'/g, "''");
|
|
223
|
+
const psCommand = `(New-Object Media.SoundPlayer '${file}').PlaySync()`;
|
|
224
|
+
spawn('powershell', ['-Command', psCommand], {
|
|
225
|
+
stdio: 'ignore',
|
|
226
|
+
windowsHide: true,
|
|
227
|
+
});
|
|
226
228
|
} catch {
|
|
227
229
|
// silent fail
|
|
228
230
|
}
|
|
@@ -283,9 +285,9 @@ function numberToWordsEn (n) {
|
|
|
283
285
|
return parts.join(' ');
|
|
284
286
|
}
|
|
285
287
|
|
|
286
|
-
// Russian: feminine
|
|
288
|
+
// Russian: feminine accusative for "секунду" (одну, две)
|
|
287
289
|
const numWordsRu = {
|
|
288
|
-
ones: ['', '
|
|
290
|
+
ones: ['', 'одну', 'две', 'три', 'четыре', 'пять', 'шесть', 'семь', 'восемь', 'девять',
|
|
289
291
|
'десять', 'одиннадцать', 'двенадцать', 'тринадцать', 'четырнадцать', 'пятнадцать',
|
|
290
292
|
'шестнадцать', 'семнадцать', 'восемнадцать', 'девятнадцать'],
|
|
291
293
|
tens: ['', '', 'двадцать', 'тридцать', 'сорок', 'пятьдесят', 'шестьдесят',
|
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.28",
|
|
5
5
|
"description": "Telegram and Windows notifications for Claude Code task completion",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -43,8 +43,7 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"node-notifier": "^10.0.1"
|
|
47
|
-
"play-sound": "^1.1.6"
|
|
46
|
+
"node-notifier": "^10.0.1"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
50
49
|
"eslint-plugin-import": "^2.31.0"
|