Jesús Pérez c62e967ce3
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
   - Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
   - Update functions: parse_kcl_file→parse_nickel_file
   - Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
   - Fix cli/providers-install: add has_nickel and nickel_version variables
   - Correct import syntax: .nickel.→.ncl.
   - Update 57 files across core, CLI, config, and utilities

   Configure pre-commit hooks:
   - Activate: nushell-check, nickel-typecheck, markdownlint
   - Comment out: Rust hooks (fmt, clippy, test), check-yaml

   Testing:
   - Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) 
   - Syntax validation: 15 core files 
   - Pre-commit hooks: all passing 
2026-01-08 20:08:46 +00:00

95 lines
2.1 KiB
Plaintext

# Extensions Management Commands
use ../lib_provisioning/extensions *
# List available extensions
export def "main extensions list" [
--type: string = "" # Filter by type: provider, taskserv, or all
--helpinfo (-h) # Show help
]: nothing -> nothing {
if $helpinfo {
print "List available extensions"
return
}
match $type {
"provider" => {
print "Available Provider Extensions:"
list-providers
}
"taskserv" => {
print "Available TaskServ Extensions:"
list-taskservs
}
_ => {
print "Available Extensions:"
print "\nProviders:"
list-providers
print "\nTaskServs:"
list-taskservs
}
}
}
# Show extension details
export def "main extensions show" [
name: string # Extension name
--helpinfo (-h) # Show help
]: nothing -> nothing {
if $helpinfo {
print "Show details for a specific extension"
return
}
let provider = (get-provider $name)
let taskserv = (get-taskserv $name)
if ($provider | is-not-empty) {
print $"Provider Extension: ($name)"
$provider
} else if ($taskserv | is-not-empty) {
print $"TaskServ Extension: ($name)"
$taskserv
} else {
print $"Extension '($name)' not found"
}
}
# Initialize extensions
export def "main extensions init" [
--helpinfo (-h) # Show help
]: nothing -> nothing {
if $helpinfo {
print "Initialize extension registry"
return
}
init-registry
print "Extension registry initialized"
}
# Show current profile
export def "main profile show" [
--helpinfo (-h) # Show help
]: nothing -> nothing {
if $helpinfo {
print "Show current access profile"
return
}
show-profile | table
}
# Create example profiles
export def "main profile create-examples" [
--helpinfo (-h) # Show help
]: nothing -> nothing {
if $helpinfo {
print "Create example profile files"
return
}
create-example-profiles
}