claude-dev-kit 2.1.5 → 2.1.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/migrate.sh +32 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-kit",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "Transform Claude Code into a fully autonomous development team — orchestrated sub-agents for planning, implementation, testing, and review.",
5
5
  "bin": {
6
6
  "claude-dev-kit": "./bin/claude-dev-kit.js"
@@ -45,7 +45,6 @@ dim() { echo -e "${DIM}$*${NC}"; }
45
45
  CI_MODE="${CI:-false}"
46
46
 
47
47
  # ─── Section 1: Load existing manifest ────────────────────────────────────────
48
- declare -A manifest_set
49
48
  IS_FIRST_INSTALL=false
50
49
 
51
50
  mkdir -p "$TGT_CLAUDE"
@@ -54,7 +53,6 @@ if [[ -f "$MANIFEST" ]]; then
54
53
  while IFS= read -r line; do
55
54
  [[ "$line" =~ ^# ]] && continue
56
55
  [[ -z "$line" ]] && continue
57
- manifest_set["$line"]=1
58
56
  done < "$MANIFEST"
59
57
  else
60
58
  IS_FIRST_INSTALL=true
@@ -175,14 +173,41 @@ if [[ "$CI_MODE" != "true" && ${#cat_modified[@]} -eq 0 ]]; then
175
173
  fi
176
174
 
177
175
  # ─── Section 6: Resolve MODIFIED files interactively ──────────────────────────
178
- declare -A resolutions
176
+ declare -a resolution_files=()
177
+ declare -a resolution_actions=()
178
+
179
+ set_resolution() {
180
+ local file="$1"
181
+ local action="$2"
182
+ local i
183
+ for (( i=0; i<${#resolution_files[@]}; i++ )); do
184
+ if [[ "${resolution_files[$i]}" == "$file" ]]; then
185
+ resolution_actions[$i]="$action"
186
+ return
187
+ fi
188
+ done
189
+ resolution_files+=("$file")
190
+ resolution_actions+=("$action")
191
+ }
192
+
193
+ get_resolution() {
194
+ local file="$1"
195
+ local i
196
+ for (( i=0; i<${#resolution_files[@]}; i++ )); do
197
+ if [[ "${resolution_files[$i]}" == "$file" ]]; then
198
+ printf '%s\n' "${resolution_actions[$i]}"
199
+ return
200
+ fi
201
+ done
202
+ printf 'keep\n'
203
+ }
179
204
 
180
205
  if [[ ${#cat_modified[@]} -gt 0 ]]; then
181
206
  if [[ "$CI_MODE" == "true" ]]; then
182
207
  warn "CI mode — all ${#cat_modified[@]} modified file(s) will be preserved (keeping your versions)"
183
208
  warn "To update them: run scripts/migrate.sh manually and choose [u] for each"
184
209
  for rel in "${cat_modified[@]}"; do
185
- resolutions["$rel"]="keep"
210
+ set_resolution "$rel" "keep"
186
211
  done
187
212
  else
188
213
  header "Resolving modified files"
@@ -202,12 +227,12 @@ if [[ ${#cat_modified[@]} -gt 0 ]]; then
202
227
 
203
228
  case "$choice" in
204
229
  k|K)
205
- resolutions["$rel"]="keep"
230
+ set_resolution "$rel" "keep"
206
231
  info "Keeping your version"
207
232
  break
208
233
  ;;
209
234
  u|U)
210
- resolutions["$rel"]="cdk"
235
+ set_resolution "$rel" "cdk"
211
236
  info "Will use CDK version"
212
237
  break
213
238
  ;;
@@ -264,7 +289,7 @@ done
264
289
 
265
290
  # Apply MODIFIED based on user decisions
266
291
  for rel in "${cat_modified[@]}"; do
267
- case "${resolutions[$rel]:-keep}" in
292
+ case "$(get_resolution "$rel")" in
268
293
  cdk)
269
294
  mkdir -p "$(dirname "$TGT_CLAUDE/$rel")"
270
295
  cp "$CDK_CLAUDE/$rel" "$TGT_CLAUDE/$rel"