@landienzla/claude-code-notify 1.0.2 → 1.0.3

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/bin/cli.js CHANGED
@@ -90,7 +90,13 @@ function uninstall() {
90
90
  function test() {
91
91
  const input = JSON.stringify({ notification_message: 'Test notification from claude-code-notify' });
92
92
  try {
93
- execSync(`echo '${input}' | bash "${NOTIFY_SRC}"`, { stdio: 'inherit', timeout: 15000 });
93
+ const { spawnSync } = require('child_process');
94
+ const result = spawnSync('bash', [NOTIFY_SRC], {
95
+ input,
96
+ stdio: ['pipe', 'inherit', 'inherit'],
97
+ timeout: 15000
98
+ });
99
+ if (result.status !== 0) throw new Error(`exit code ${result.status}`);
94
100
  console.log('Test notification sent!');
95
101
  } catch (e) {
96
102
  console.error('Test failed:', e.message);
@@ -7,7 +7,7 @@ INPUT=$(cat)
7
7
  # Parse JSON and sanitize for safe shell usage
8
8
  # - Strip characters that could break shell/PowerShell/XML/AppleScript interpolation
9
9
  # - Truncate to 200 chars (OS notification display limit)
10
- MESSAGE=$(echo "$INPUT" | python3 -c "
10
+ MESSAGE=$(printf '%s' "$INPUT" | python3 -c "
11
11
  import sys, json, re
12
12
  data = json.load(sys.stdin)
13
13
  message = data.get('notification_message', data.get('message', 'Needs your attention'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@landienzla/claude-code-notify",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Cross-platform desktop notifications for Claude Code — plugin and CLI setup tool",
5
5
  "author": "Talha <landienzla@gmail.com>",
6
6
  "license": "MIT",