claude-notification-plugin 1.0.35 → 1.0.39

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "claude-notification-plugin",
3
- "version": "1.0.35",
4
- "description": "Telegram, Windows toast, sound, and voice notifications for Claude Code task completion",
3
+ "version": "1.0.39",
4
+ "description": "Claude Code notifications щт task completion: Telegram, Windows toast, sound, and voice",
5
5
  "author": {
6
6
  "name": "Viacheslav Makarov",
7
7
  "email": "npmjs@bazilio.ru"
@@ -4,7 +4,6 @@ import fs from 'fs';
4
4
  import os from 'os';
5
5
  import path from 'path';
6
6
  import process from 'process';
7
- import notifier from 'node-notifier';
8
7
  import { spawn } from 'child_process';
9
8
 
10
9
  // ----------------------
@@ -200,16 +199,21 @@ async function sendTelegram (config, state) {
200
199
  // WINDOWS NOTIFICATION
201
200
  // ----------------------
202
201
 
203
- function sendWindowsNotification (config, message) {
202
+ async function sendWindowsNotification (config, message) {
204
203
  if (!config.windowsNotification.enabled) {
205
204
  return;
206
205
  }
207
- notifier.notify({
208
- title: 'Claude Code',
209
- message,
210
- sound: true,
211
- wait: false,
212
- });
206
+ try {
207
+ const { default: notifier } = await import('node-notifier');
208
+ notifier.notify({
209
+ title: 'Claude Code',
210
+ message,
211
+ sound: true,
212
+ wait: false,
213
+ });
214
+ } catch {
215
+ // node-notifier not available (e.g. plugin cache without node_modules)
216
+ }
213
217
  }
214
218
 
215
219
  // ----------------------
@@ -467,7 +471,7 @@ process.stdin.on('end', async () => {
467
471
  delete state._telegramText;
468
472
  saveState(state);
469
473
 
470
- sendWindowsNotification(config, message);
474
+ await sendWindowsNotification(config, message);
471
475
  playSound(config);
472
476
  speakResult(config, duration);
473
477
  });
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "claude-notification-plugin",
3
3
  "productName": "claude-notification-plugin",
4
- "version": "1.0.35",
5
- "description": "Telegram, Windows toast, sound, and voice notifications for Claude Code task completion",
4
+ "version": "1.0.39",
5
+ "description": "Claude Code notifications щт task completion: Telegram, Windows toast, sound, and voice",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=18.0.0"