chore: update scripts
This commit is contained in:
parent
0ccd697e55
commit
3904d2fbc7
2
.gitignore
vendored
2
.gitignore
vendored
@ -9,7 +9,7 @@ ai_demo.nu
|
||||
CLAUDE.md
|
||||
.cache
|
||||
.coder
|
||||
wrks
|
||||
.wrks
|
||||
ROOT
|
||||
OLD
|
||||
plugins/nushell-plugins
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
# Infrastructure Validation and Review Tool
|
||||
# Validates KCL/YAML configurations, checks best practices, and generates reports
|
||||
# Validates Nickel/YAML configurations, checks best practices, and generates reports
|
||||
|
||||
use core/nulib/lib_provisioning/infra_validator/validator.nu *
|
||||
|
||||
@ -140,7 +140,7 @@ def show_detailed_help []: nothing -> nothing {
|
||||
print ""
|
||||
print "VALIDATION RULES:"
|
||||
print " VAL001 YAML Syntax Validation (critical)"
|
||||
print " VAL002 KCL Compilation Check (critical)"
|
||||
print " VAL002 Nickel Compilation Check (critical)"
|
||||
print " VAL003 Unquoted Variable References (error)"
|
||||
print " VAL004 Required Fields Validation (error)"
|
||||
print " VAL005 Resource Naming Conventions (warning)"
|
||||
@ -172,7 +172,7 @@ def show_detailed_help []: nothing -> nothing {
|
||||
|
||||
def setup_validation_environment [verbose: bool]: nothing -> nothing {
|
||||
# Check required dependencies
|
||||
let dependencies = ["kcl"] # Add other required tools
|
||||
let dependencies = ["nickel"] # Add other required tools
|
||||
|
||||
for dep in $dependencies {
|
||||
let check = (^bash -c $"type -P ($dep)" | complete)
|
||||
|
||||
@ -41,7 +41,7 @@ if $ai_available {
|
||||
|
||||
print ""
|
||||
print "🎯 AI Integration Features Implemented:"
|
||||
print " 1. ✅ KCL configuration schema (kcl/settings.k:54-79)"
|
||||
print " 1. ✅ Nickel configuration schema (nickel/settings.ncl:54-79)"
|
||||
print " 2. ✅ AI library (core/nulib/lib_provisioning/ai/lib.nu)"
|
||||
print " 3. ✅ Template generation with AI prompts"
|
||||
print " 4. ✅ Natural language queries (--ai_query flag)"
|
||||
|
||||
@ -80,18 +80,18 @@ servers:
|
||||
print "------------------------------------------"
|
||||
|
||||
if ("klab/sgoyol" | path exists) {
|
||||
let sgoyol_files = (glob "klab/sgoyol/**/*.k")
|
||||
print $"Found ($sgoyol_files | length) KCL files in sgoyol infrastructure"
|
||||
let sgoyol_files = (glob "klab/sgoyol/**/*.ncl")
|
||||
print $"Found ($sgoyol_files | length) Nickel files in sgoyol infrastructure"
|
||||
|
||||
if ($sgoyol_files | length) > 0 {
|
||||
let first_file = ($sgoyol_files | first)
|
||||
print $"Testing KCL compilation on: ($first_file)"
|
||||
print $"Testing Nickel compilation on: ($first_file)"
|
||||
|
||||
let kcl_result = (validate_kcl_compilation $first_file)
|
||||
if $kcl_result.passed {
|
||||
print "✅ KCL compilation test passed"
|
||||
let nickel_result = (validate_nickel_compilation $first_file)
|
||||
if $nickel_result.passed {
|
||||
print "✅ Nickel compilation test passed"
|
||||
} else {
|
||||
print $"❌ KCL compilation failed: ($kcl_result.issue.message)"
|
||||
print $"❌ Nickel compilation failed: ($nickel_result.issue.message)"
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ servers:
|
||||
print "✅ Unquoted variables detection: Working"
|
||||
print "✅ YAML syntax validation: Working"
|
||||
print "✅ Auto-fix functionality: Working"
|
||||
print "✅ KCL compilation check: Working"
|
||||
print "✅ Nickel compilation check: Working"
|
||||
print ""
|
||||
print "The infrastructure validation system is ready for use!"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user