@codyswann/lisa 1.54.0 → 1.54.2
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/lisa-update-local.sh +45 -12
package/package.json
CHANGED
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"axios": ">=1.13.5"
|
|
73
73
|
},
|
|
74
74
|
"name": "@codyswann/lisa",
|
|
75
|
-
"version": "1.54.
|
|
75
|
+
"version": "1.54.2",
|
|
76
76
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
77
77
|
"main": "dist/index.js",
|
|
78
78
|
"exports": {
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
# Lisa Local Project Update
|
|
4
4
|
#
|
|
5
5
|
# Iterates over projects defined in .lisa.config.local.json, checks out their
|
|
6
|
-
# target branches, pulls latest changes, and
|
|
7
|
-
#
|
|
6
|
+
# target branches, pulls latest changes, and updates @codyswann/lisa via the
|
|
7
|
+
# project's package manager. The postinstall script automatically applies
|
|
8
|
+
# Lisa templates.
|
|
8
9
|
#
|
|
9
10
|
# This enables batch-updating all locally managed projects in a single command
|
|
10
11
|
# rather than manually visiting each project directory.
|
|
@@ -18,8 +19,8 @@
|
|
|
18
19
|
#
|
|
19
20
|
# Prerequisites:
|
|
20
21
|
# - jq installed
|
|
21
|
-
# - bun installed
|
|
22
22
|
# - .lisa.config.local.json exists in the project root
|
|
23
|
+
# - each project's package manager (bun, pnpm, yarn, or npm) installed
|
|
23
24
|
#
|
|
24
25
|
|
|
25
26
|
set -euo pipefail
|
|
@@ -70,11 +71,6 @@ if ! command -v jq &> /dev/null; then
|
|
|
70
71
|
exit 1
|
|
71
72
|
fi
|
|
72
73
|
|
|
73
|
-
if ! command -v bun &> /dev/null; then
|
|
74
|
-
log_error "bun is required but not installed. Install from: https://bun.sh"
|
|
75
|
-
exit 1
|
|
76
|
-
fi
|
|
77
|
-
|
|
78
74
|
if [[ ! -f "$CONFIG_FILE" ]]; then
|
|
79
75
|
log_error "Config file not found: $CONFIG_FILE"
|
|
80
76
|
log_info "Create .lisa.config.local.json with project paths and target branches"
|
|
@@ -132,10 +128,47 @@ while IFS=$'\t' read -r project_path target_branch; do
|
|
|
132
128
|
continue
|
|
133
129
|
fi
|
|
134
130
|
|
|
135
|
-
#
|
|
136
|
-
log_info "
|
|
137
|
-
|
|
138
|
-
|
|
131
|
+
# Detect package manager and update @codyswann/lisa
|
|
132
|
+
log_info "Updating @codyswann/lisa (triggers postinstall template application)..."
|
|
133
|
+
pm=""
|
|
134
|
+
yarn_subcmd=""
|
|
135
|
+
if [[ -f "$expanded_path/bun.lockb" ]]; then
|
|
136
|
+
pm="bun"
|
|
137
|
+
elif [[ -f "$expanded_path/pnpm-lock.yaml" ]]; then
|
|
138
|
+
pm="pnpm"
|
|
139
|
+
elif [[ -f "$expanded_path/yarn.lock" ]]; then
|
|
140
|
+
pm="yarn"
|
|
141
|
+
# Berry (v2+) identified by .yarnrc.yml uses 'up'; Classic (v1) uses 'upgrade'
|
|
142
|
+
if [[ -f "$expanded_path/.yarnrc.yml" ]]; then
|
|
143
|
+
yarn_subcmd="up"
|
|
144
|
+
else
|
|
145
|
+
yarn_subcmd="upgrade"
|
|
146
|
+
fi
|
|
147
|
+
elif [[ -f "$expanded_path/package-lock.json" ]]; then
|
|
148
|
+
pm="npm"
|
|
149
|
+
else
|
|
150
|
+
log_error "Unable to detect package manager for $expanded_path (no supported lockfile found)"
|
|
151
|
+
((fail_count++)) || true
|
|
152
|
+
continue
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
log_info "Using package manager: $pm"
|
|
156
|
+
|
|
157
|
+
if ! command -v "$pm" &> /dev/null; then
|
|
158
|
+
log_error "Package manager '$pm' is not installed for $expanded_path"
|
|
159
|
+
((fail_count++)) || true
|
|
160
|
+
continue
|
|
161
|
+
fi
|
|
162
|
+
|
|
163
|
+
update_ok=true
|
|
164
|
+
if [[ -n "$yarn_subcmd" ]]; then
|
|
165
|
+
(cd "$expanded_path" && yarn "$yarn_subcmd" @codyswann/lisa) || update_ok=false
|
|
166
|
+
else
|
|
167
|
+
(cd "$expanded_path" && "$pm" update @codyswann/lisa) || update_ok=false
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
if [[ "$update_ok" != true ]]; then
|
|
171
|
+
log_error "Failed to update @codyswann/lisa in $expanded_path"
|
|
139
172
|
((fail_count++)) || true
|
|
140
173
|
continue
|
|
141
174
|
fi
|