aidevops 3.5.541 → 3.5.543

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.541
1
+ 3.5.543
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.541
6
+ # Version: 3.5.543
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.541",
3
+ "version": "3.5.543",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -536,51 +536,132 @@ check_requirements() {
536
536
 
537
537
  # Check for quality/linting tools (shellcheck, shfmt, markdownlint)
538
538
  # These are optional but recommended for development
539
- check_quality_tools() {
540
- print_info "Checking quality tools..."
541
-
542
- local missing_tools=()
543
- local missing_npm_tools=()
544
-
545
- # Check for shellcheck
546
- if command -v shellcheck >/dev/null 2>&1; then
547
- print_success "shellcheck: $(shellcheck --version | head -1)"
539
+ _check_quality_tool() {
540
+ local tool_name="$1"
541
+ local version=""
542
+
543
+ if command -v "$tool_name" >/dev/null 2>&1; then
544
+ case "$tool_name" in
545
+ shellcheck)
546
+ version=$(shellcheck --version 2>/dev/null | head -1)
547
+ ;;
548
+ shfmt)
549
+ version=$(shfmt --version 2>/dev/null)
550
+ ;;
551
+ esac
552
+ print_success "$tool_name: ${version:-installed}"
548
553
  else
549
- missing_tools+=("shellcheck")
554
+ missing_tools+=("$tool_name")
550
555
  fi
551
556
 
552
- # Check for shfmt
553
- if command -v shfmt >/dev/null 2>&1; then
554
- print_success "shfmt: $(shfmt --version)"
555
- else
556
- missing_tools+=("shfmt")
557
- fi
557
+ return 0
558
+ }
559
+
560
+ _check_markdownlint_tool() {
561
+ local version=""
558
562
 
559
- # Check for markdownlint (accept either CLI variant)
560
563
  if command -v markdownlint >/dev/null 2>&1; then
561
- print_success "markdownlint: $(markdownlint --version 2>/dev/null | head -1)"
562
- elif command -v markdownlint-cli2 >/dev/null 2>&1; then
563
- print_success "markdownlint-cli2: $(markdownlint-cli2 --version 2>/dev/null | head -1)"
564
- else
565
- missing_npm_tools+=("markdownlint-cli2")
564
+ version=$(markdownlint --version 2>/dev/null | head -1)
565
+ print_success "markdownlint: ${version:-installed}"
566
+ return 0
566
567
  fi
567
568
 
568
- # If all tools present, return early
569
- if [[ ${#missing_tools[@]} -eq 0 && ${#missing_npm_tools[@]} -eq 0 ]]; then
570
- print_success "All quality tools installed"
569
+ if command -v markdownlint-cli2 >/dev/null 2>&1; then
570
+ version=$(markdownlint-cli2 --version 2>/dev/null | head -1)
571
+ print_success "markdownlint-cli2: ${version:-installed}"
571
572
  return 0
572
573
  fi
573
574
 
574
- # Show missing tools
575
+ missing_npm_tools+=("markdownlint-cli2")
576
+ return 0
577
+ }
578
+
579
+ _report_missing_quality_tools() {
575
580
  if [[ ${#missing_tools[@]} -gt 0 ]]; then
576
581
  print_warning "Missing quality tools: ${missing_tools[*]}"
577
582
  fi
583
+
578
584
  if [[ ${#missing_npm_tools[@]} -gt 0 ]]; then
579
585
  print_warning "Missing npm quality tools: ${missing_npm_tools[*]}"
580
586
  fi
587
+
581
588
  print_info "These tools are used by linters-local.sh for code quality checks"
589
+ return 0
590
+ }
591
+
592
+ _install_missing_quality_tools() {
593
+ local pkg_manager="$1"
594
+ local install_quality="Y"
595
+
596
+ if [[ "$pkg_manager" == "unknown" ]]; then
597
+ print_info "Install manually:"
598
+ echo " macOS: brew install ${missing_tools[*]}"
599
+ echo " Ubuntu/Debian: sudo apt-get install ${missing_tools[*]}"
600
+ echo " Fedora: sudo dnf install ${missing_tools[*]}"
601
+ return 0
602
+ fi
603
+
604
+ echo ""
605
+ setup_prompt install_quality "Install quality tools using $pkg_manager? [Y/n]: " "Y"
606
+
607
+ if [[ "$install_quality" =~ ^[Yy]?$ ]]; then
608
+ print_info "Installing ${missing_tools[*]}..."
609
+ if install_packages "$pkg_manager" "${missing_tools[@]}"; then
610
+ print_success "Quality tools installed successfully"
611
+ else
612
+ print_warning "Failed to install some quality tools - continuing anyway"
613
+ fi
614
+ else
615
+ print_info "Skipped quality tools installation"
616
+ print_info "Install later: $pkg_manager install ${missing_tools[*]}"
617
+ fi
618
+
619
+ return 0
620
+ }
621
+
622
+ _install_missing_npm_quality_tools() {
623
+ local install_npm_quality="Y"
624
+
625
+ if ! command -v npm >/dev/null 2>&1; then
626
+ print_warning "npm not found; cannot auto-install ${missing_npm_tools[*]}"
627
+ print_info "Install Node.js/npm, then run: npm install -g ${missing_npm_tools[*]}"
628
+ return 0
629
+ fi
630
+
631
+ echo ""
632
+ setup_prompt install_npm_quality "Install npm quality tools (npm install -g ${missing_npm_tools[*]})? [Y/n]: " "Y"
633
+ if [[ "$install_npm_quality" =~ ^[Yy]?$ ]]; then
634
+ print_info "Installing npm quality tools: ${missing_npm_tools[*]}..."
635
+ if npm install -g "${missing_npm_tools[@]}" >/dev/null 2>&1; then
636
+ print_success "npm quality tools installed successfully"
637
+ else
638
+ print_warning "Failed to install npm quality tools - continuing anyway"
639
+ fi
640
+ else
641
+ print_info "Skipped npm quality tools installation"
642
+ print_info "Install later: npm install -g ${missing_npm_tools[*]}"
643
+ fi
644
+
645
+ return 0
646
+ }
647
+
648
+ check_quality_tools() {
649
+ print_info "Checking quality tools..."
650
+
651
+ local missing_tools=()
652
+ local missing_npm_tools=()
653
+
654
+ _check_quality_tool "shellcheck"
655
+ _check_quality_tool "shfmt"
656
+ _check_markdownlint_tool
657
+
658
+ if [[ ${#missing_tools[@]} -eq 0 && ${#missing_npm_tools[@]} -eq 0 ]]; then
659
+ print_success "All quality tools installed"
660
+ return 0
661
+ fi
662
+
663
+ _report_missing_quality_tools
582
664
 
583
- # In non-interactive mode, just warn and continue
584
665
  if [[ "$NON_INTERACTIVE" == "true" ]]; then
585
666
  if [[ ${#missing_tools[@]} -gt 0 ]]; then
586
667
  print_info "Install later: brew install ${missing_tools[*]}"
@@ -599,49 +680,12 @@ check_quality_tools() {
599
680
  local pkg_manager
600
681
  pkg_manager=$(detect_package_manager)
601
682
 
602
- if [[ "$pkg_manager" == "unknown" && ${#missing_tools[@]} -gt 0 ]]; then
603
- print_info "Install manually:"
604
- echo " macOS: brew install ${missing_tools[*]}"
605
- echo " Ubuntu/Debian: sudo apt-get install ${missing_tools[*]}"
606
- echo " Fedora: sudo dnf install ${missing_tools[*]}"
607
- elif [[ ${#missing_tools[@]} -gt 0 ]]; then
608
- local install_quality="Y"
609
- echo ""
610
- setup_prompt install_quality "Install quality tools using $pkg_manager? [Y/n]: " "Y"
611
-
612
- if [[ "$install_quality" =~ ^[Yy]?$ ]]; then
613
- print_info "Installing ${missing_tools[*]}..."
614
- if install_packages "$pkg_manager" "${missing_tools[@]}"; then
615
- print_success "Quality tools installed successfully"
616
- else
617
- print_warning "Failed to install some quality tools - continuing anyway"
618
- fi
619
- else
620
- print_info "Skipped quality tools installation"
621
- print_info "Install later: $pkg_manager install ${missing_tools[*]}"
622
- fi
683
+ if [[ ${#missing_tools[@]} -gt 0 ]]; then
684
+ _install_missing_quality_tools "$pkg_manager"
623
685
  fi
624
686
 
625
687
  if [[ ${#missing_npm_tools[@]} -gt 0 ]]; then
626
- if ! command -v npm >/dev/null 2>&1; then
627
- print_warning "npm not found; cannot auto-install ${missing_npm_tools[*]}"
628
- print_info "Install Node.js/npm, then run: npm install -g ${missing_npm_tools[*]}"
629
- else
630
- local install_npm_quality="Y"
631
- echo ""
632
- setup_prompt install_npm_quality "Install npm quality tools (npm install -g ${missing_npm_tools[*]})? [Y/n]: " "Y"
633
- if [[ "$install_npm_quality" =~ ^[Yy]?$ ]]; then
634
- print_info "Installing npm quality tools: ${missing_npm_tools[*]}..."
635
- if npm install -g "${missing_npm_tools[@]}" >/dev/null 2>&1; then
636
- print_success "npm quality tools installed successfully"
637
- else
638
- print_warning "Failed to install npm quality tools - continuing anyway"
639
- fi
640
- else
641
- print_info "Skipped npm quality tools installation"
642
- print_info "Install later: npm install -g ${missing_npm_tools[*]}"
643
- fi
644
- fi
688
+ _install_missing_npm_quality_tools
645
689
  fi
646
690
 
647
691
  return 0
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.541
13
+ # Version: 3.5.543
14
14
  #
15
15
  # Quick Install:
16
16
  # npm install -g aidevops && aidevops update (recommended)