Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 3 additions & 32 deletions .agents/scripts/101domains-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,17 @@
# 101domains Registrar Helper Script
# Comprehensive domain and DNS management for AI assistants

# Colors for output
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

# String literal constants
readonly ERROR_DOMAIN_NAME_REQUIRED="Domain name is required"

GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color

# Common message constants
readonly HELP_SHOW_MESSAGE="Show this help"
readonly USAGE_COMMAND_OPTIONS="Usage: $0 <command> [options]"

# Common constants
readonly CONTENT_TYPE_JSON="$CONTENT_TYPE_JSON"

print_info() {
local msg="$1"
echo -e "${BLUE}[INFO]${NC} $msg"
return 0
}

print_success() {
local msg="$1"
echo -e "${GREEN}[SUCCESS]${NC} $msg"
return 0
}

print_warning() {
local msg="$1"
echo -e "${YELLOW}[WARNING]${NC} $msg"
return 0
}

print_error() {
local msg="$1"
echo -e "${RED}[ERROR]${NC} $msg" >&2
return 0
}

CONFIG_FILE="../configs/101domains-config.json"
API_BASE_URL="https://api.101domain.com/v4"
Expand Down
18 changes: 2 additions & 16 deletions .agents/scripts/_archive/add-missing-returns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,8 @@
# Author: AI DevOps Framework
# Version: 1.1.1

# Colors for output
readonly GREEN='\033[0;32m'
readonly BLUE='\033[0;34m'
readonly NC='\033[0m'

print_success() {
local _arg1="$1"
echo -e "${GREEN}✅ $_arg1${NC}"
return 0
}

print_info() {
local _arg1="$1"
echo -e "${BLUE}ℹ️ $_arg1${NC}"
return 0
}
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

# Add return statements to functions missing them
add_returns_to_file() {
Expand Down
18 changes: 2 additions & 16 deletions .agents/scripts/_archive/fix-auth-headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,8 @@
# Author: AI DevOps Framework
# Version: 1.1.1

# Colors for output
readonly GREEN='\033[0;32m'
readonly BLUE='\033[0;34m'
readonly NC='\033[0m'

print_success() {
local _arg1="$1"
echo -e "${GREEN}✅ $_arg1${NC}"
return 0
}

print_info() {
local _arg1="$1"
echo -e "${BLUE}ℹ️ $_arg1${NC}"
return 0
}
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

# Fix Authorization header in a file
fix_auth_header_in_file() {
Expand Down
33 changes: 2 additions & 31 deletions .agents/scripts/_archive/fix-common-strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,10 @@
# Version: 1.1.1
# License: MIT

# Colors for output
readonly GREEN='\033[0;32m'
readonly BLUE='\033[0;34m'
readonly YELLOW='\033[1;33m'
readonly RED='\033[0;31m'
readonly PURPLE='\033[0;35m'
readonly NC='\033[0m' # No Color
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

# Print functions
print_success() {
local message="$1"
echo -e "${GREEN}✅ $message${NC}"
return 0
}

print_info() {
local message="$1"
echo -e "${BLUE}ℹ️ $message${NC}"
return 0
}

print_warning() {
local message="$1"
echo -e "${YELLOW}⚠️ $message${NC}"
return 0
}

print_error() {
local message="$1"
echo -e "${RED}❌ $message${NC}" >&2
return 0
}

print_header() {
local message="$1"
echo -e "${PURPLE}🔧 $message${NC}"
Expand Down
20 changes: 2 additions & 18 deletions .agents/scripts/_archive/fix-content-type.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,8 @@
# Author: AI DevOps Framework
# Version: 1.1.1

# Colors for output
readonly GREEN='\033[0;32m'
readonly BLUE='\033[0;34m'
readonly NC='\033[0m'

print_success() {
local _arg1="$1"
echo -e "${GREEN}✅ $_arg1${NC}"
return 0
}

print_info() {
local _arg1="$1"
echo -e "${BLUE}ℹ️ $_arg1${NC}"
return 0
}
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

# Fix Content-Type in a file
fix_content_type_in_file() {
Expand All @@ -41,13 +27,11 @@ fix_content_type_in_file() {
sed -i '' '/NC=.*No Color/a\
\
# Common constants\
readonly CONTENT_TYPE_JSON="Content-Type: application/json"
' "$file"
elif grep -q "readonly.*NC=" "$file"; then
sed -i '' '/readonly.*NC=/a\
\
# Common constants\
readonly CONTENT_TYPE_JSON="Content-Type: application/json"
' "$file"
fi
fi
Expand Down
19 changes: 2 additions & 17 deletions .agents/scripts/_archive/fix-error-messages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,8 @@
# Author: AI DevOps Framework
# Version: 1.1.1

# Colors for output
readonly GREEN='\033[0;32m'
readonly BLUE='\033[0;34m'
readonly NC='\033[0m'

print_success() {
local _arg1="$1"
echo -e "${GREEN}✅ $_arg1${NC}"
return 0
}

print_info() {
local _arg1="$1"
echo -e "${BLUE}ℹ️ $_arg1${NC}"
return 0
}
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

# Fix error messages in a file
fix_error_messages_in_file() {
Expand Down Expand Up @@ -62,7 +48,6 @@ fix_error_messages_in_file() {
if [[ $unknown_cmd_count -ge 1 ]]; then
if ! grep -q "ERROR_UNKNOWN_COMMAND" "$file"; then
sed -i '' '/# Error message constants/a\
readonly ERROR_UNKNOWN_COMMAND="Unknown command:"
' "$file"
changes_made=1
fi
Expand Down
3 changes: 3 additions & 0 deletions .agents/scripts/_archive/fix-misplaced-returns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Script to fix misplaced return statements in mainwp-helper.sh
# These were introduced by the earlier mass fix script

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

cd providers || exit

echo "🔧 Fixing misplaced return statements in mainwp-helper.sh..."
Expand Down
19 changes: 2 additions & 17 deletions .agents/scripts/_archive/fix-remaining-literals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,8 @@
# Author: AI DevOps Framework
# Version: 1.1.1

# Colors for output
readonly GREEN='\033[0;32m'
readonly BLUE='\033[0;34m'
readonly NC='\033[0m'

print_success() {
local _arg1="$1"
echo -e "${GREEN}✅ $_arg1${NC}"
return 0
}

print_info() {
local _arg1="$1"
echo -e "${BLUE}ℹ️ $_arg1${NC}"
return 0
}
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

# Fix remaining string literals in a file
fix_remaining_literals_in_file() {
Expand Down Expand Up @@ -103,7 +89,6 @@ readonly HELP_SHOW_MESSAGE="Show this help"
fi

sed -i '' '/# Common.*constants/a\
readonly CONTENT_TYPE_JSON="Content-Type: application/json"
' "$file"
sed -i '' 's|"Content-Type: application/json"|"$CONTENT_TYPE_JSON"|g' "$file"
changes_made=1
Expand Down
15 changes: 3 additions & 12 deletions .agents/scripts/_archive/fix-s131-default-cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,10 @@
#
# This script finds case statements missing a default (*) case and adds one.

set -euo pipefail

# Colors
readonly GREEN='\033[0;32m'
readonly BLUE='\033[0;34m'
readonly YELLOW='\033[1;33m'
readonly RED='\033[0;31m'
readonly NC='\033[0m'
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

print_info() { echo -e "${BLUE}[INFO]${NC} $1"; return 0; }
print_success() { echo -e "${GREEN}[SUCCESS]${NC} $1"; return 0; }
print_warning() { echo -e "${YELLOW}[WARNING]${NC} $1"; return 0; }
print_error() { echo -e "${RED}[ERROR]${NC} $1" >&2; return 0; }
set -euo pipefail

DRY_RUN=false
TARGET_FILE=""
Expand Down
18 changes: 2 additions & 16 deletions .agents/scripts/_archive/fix-sc2155-simple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,8 @@
# Author: AI DevOps Framework
# Version: 1.1.1

# Colors for output
readonly GREEN='\033[0;32m'
readonly BLUE='\033[0;34m'
readonly NC='\033[0m'

print_success() {
local _arg1="$1"
echo -e "${GREEN}✅ $_arg1${NC}"
return 0
}

print_info() {
local _arg1="$1"
echo -e "${BLUE}ℹ️ $_arg1${NC}"
return 0
}
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

# Fix SC2155 in a file using simple patterns
fix_sc2155_simple() {
Expand Down
25 changes: 2 additions & 23 deletions .agents/scripts/_archive/fix-shellcheck-critical.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,8 @@
# Author: AI DevOps Framework
# Version: 1.1.1

# Colors for output
readonly GREEN='\033[0;32m'
readonly BLUE='\033[0;34m'
readonly YELLOW='\033[1;33m'
readonly NC='\033[0m'

print_success() {
local _arg1="$1"
echo -e "${GREEN}✅ $_arg1${NC}"
return 0
}

print_info() {
local _arg1="$1"
echo -e "${BLUE}ℹ️ $_arg1${NC}"
return 0
}

print_warning() {
local _arg1="$1"
echo -e "${YELLOW}⚠️ $_arg1${NC}"
return 0
}
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

# Fix SC2155 issues in a file
fix_sc2155_in_file() {
Expand Down
33 changes: 2 additions & 31 deletions .agents/scripts/_archive/fix-string-literals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,10 @@
# Version: 1.1.1
# License: MIT

# Colors for output
readonly GREEN='\033[0;32m'
readonly BLUE='\033[0;34m'
readonly YELLOW='\033[1;33m'
readonly RED='\033[0;31m'
readonly PURPLE='\033[0;35m'
readonly NC='\033[0m' # No Color
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
source "${SCRIPT_DIR}/shared-constants.sh"

# Print functions
print_success() {
local message="$1"
echo -e "${GREEN}✅ $message${NC}"
return 0
}

print_info() {
local message="$1"
echo -e "${BLUE}ℹ️ $message${NC}"
return 0
}

print_warning() {
local message="$1"
echo -e "${YELLOW}⚠️ $message${NC}"
return 0
}

print_error() {
local message="$1"
echo -e "${RED}❌ $message${NC}" >&2
return 0
}

print_header() {
local message="$1"
echo -e "${PURPLE}🔧 $message${NC}"
Expand Down
Loading