@clipboard-health/ai-rules 2.14.4 → 2.14.5
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/setup.sh +11 -9
package/package.json
CHANGED
package/scripts/setup.sh
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
|
+
# When invoked as a Claude Code SessionStart hook (`CLAUDE_ENV_FILE` set), only run in remote
|
|
5
|
+
# environments (`CLAUDE_CODE_REMOTE` set). Direct invocations (e.g., Devin, local) always run.
|
|
6
|
+
if [[ -n "${CLAUDE_ENV_FILE:-}" && -z "${CLAUDE_CODE_REMOTE:-}" ]]; then
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
|
|
4
10
|
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
|
5
11
|
|
|
6
12
|
deps_only=false
|
|
@@ -29,15 +35,11 @@ if [ ! -f package.json ]; then
|
|
|
29
35
|
exit 0
|
|
30
36
|
fi
|
|
31
37
|
|
|
32
|
-
# Source NVM
|
|
33
|
-
# if the version isn't installed yet).
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if [ "$deps_only" = true ]; then
|
|
38
|
-
# Activate whatever node NVM has (try .nvmrc, then default alias).
|
|
39
|
-
# Suppressed: version may not be installed yet, or NVM may not be present.
|
|
40
|
-
nvm use 2>/dev/null || nvm use default 2>/dev/null || true
|
|
38
|
+
# Source NVM only for full bootstrap (not --deps-only, where engineers may not use NVM).
|
|
39
|
+
# --no-use avoids auto-activating .nvmrc (which fails if the version isn't installed yet).
|
|
40
|
+
if [ "$deps_only" = false ]; then
|
|
41
|
+
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
|
|
42
|
+
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" --no-use
|
|
41
43
|
fi
|
|
42
44
|
|
|
43
45
|
if [ "$deps_only" = false ]; then
|