aidevops 3.5.504 → 3.5.506

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/VERSION CHANGED
@@ -1 +1 @@
1
- 3.5.504
1
+ 3.5.506
package/aidevops.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  # AI DevOps Framework CLI
4
4
  # Usage: aidevops <command> [options]
5
5
  #
6
- # Version: 3.5.504
6
+ # Version: 3.5.506
7
7
 
8
8
  set -euo pipefail
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.5.504",
3
+ "version": "3.5.506",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "bin": {
package/setup.sh CHANGED
@@ -10,7 +10,7 @@ shopt -s inherit_errexit 2>/dev/null || true
10
10
  # AI Assistant Server Access Framework Setup Script
11
11
  # Helps developers set up the framework for their infrastructure
12
12
  #
13
- # Version: 3.5.504
13
+ # Version: 3.5.506
14
14
  #
15
15
  # Quick Install:
16
16
  # npm install -g aidevops && aidevops update (recommended)
@@ -500,14 +500,33 @@ create_backup_with_rotation() {
500
500
  local backup_name="$2"
501
501
  local backup_base="$HOME/.aidevops/${backup_name}-backups"
502
502
  local backup_dir
503
+ local backup_target
503
504
  backup_dir="$backup_base/$(date +%Y%m%d_%H%M%S)"
505
+ backup_target="$backup_dir/$(basename "$source_path")"
504
506
 
505
507
  # Create backup directory
506
508
  mkdir -p "$backup_dir"
507
509
 
508
510
  # Copy source to backup
509
511
  if [[ -d "$source_path" ]]; then
510
- cp -R "$source_path" "$backup_dir/"
512
+ mkdir -p "$backup_target"
513
+ if command -v rsync >/dev/null 2>&1; then
514
+ local rsync_status=0
515
+ if rsync -a "$source_path/" "$backup_target/"; then
516
+ rsync_status=0
517
+ else
518
+ rsync_status=$?
519
+ fi
520
+
521
+ if [[ "$rsync_status" -eq 24 ]]; then
522
+ print_warning "Backup completed with missing source entries skipped: $source_path"
523
+ elif [[ "$rsync_status" -ne 0 ]]; then
524
+ print_error "Backup failed for $source_path (rsync exit $rsync_status)"
525
+ return "$rsync_status"
526
+ fi
527
+ else
528
+ cp -R "$source_path" "$backup_dir/"
529
+ fi
511
530
  elif [[ -f "$source_path" ]]; then
512
531
  cp "$source_path" "$backup_dir/"
513
532
  else