patchcord 0.5.42 → 0.5.43
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 +1 -1
- package/scripts/check-inbox.sh +7 -1
package/package.json
CHANGED
package/scripts/check-inbox.sh
CHANGED
|
@@ -6,6 +6,12 @@ command -v jq >/dev/null 2>&1 || exit 0
|
|
|
6
6
|
|
|
7
7
|
INPUT=$(cat)
|
|
8
8
|
|
|
9
|
+
# Validate input is parseable JSON before proceeding — Claude Code may include
|
|
10
|
+
# non-standard numeric values (NaN, Infinity) in edge cases that trip jq.
|
|
11
|
+
if ! printf '%s' "$INPUT" | jq -e '.' >/dev/null 2>&1; then
|
|
12
|
+
INPUT='{}'
|
|
13
|
+
fi
|
|
14
|
+
|
|
9
15
|
# Get project cwd from Claude Code's input JSON, fall back to $PWD
|
|
10
16
|
PROJECT_CWD=$(echo "$INPUT" | jq -r '.cwd // empty' 2>/dev/null || true)
|
|
11
17
|
[ -z "$PROJECT_CWD" ] || [ "$PROJECT_CWD" = "null" ] && PROJECT_CWD="$PWD"
|
|
@@ -23,7 +29,7 @@ if [ ! -f "$UPDATE_FLAG" ]; then
|
|
|
23
29
|
touch "$UPDATE_FLAG"
|
|
24
30
|
plugin_json="${CLAUDE_PLUGIN_ROOT:-.}/.claude-plugin/plugin.json"
|
|
25
31
|
if [ -f "$plugin_json" ]; then
|
|
26
|
-
installed_ver=$(jq -r '.version // ""' "$plugin_json" 2>/dev/null)
|
|
32
|
+
installed_ver=$(jq -r '.version // ""' "$plugin_json" 2>/dev/null || true)
|
|
27
33
|
if [ -n "$installed_ver" ]; then
|
|
28
34
|
latest=$(npm view patchcord version --json 2>/dev/null | tr -d '"' || true)
|
|
29
35
|
if [ -n "$latest" ] && [ "$latest" != "$installed_ver" ]; then
|