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 ✅
71 lines
2.1 KiB
Plaintext
71 lines
2.1 KiB
Plaintext
# Version Management Commands
|
|
# Manages versions with progressive cache hierarchy
|
|
|
|
use ../lib_provisioning/cache/cache_manager.nu *
|
|
use ../lib_provisioning/cache/grace_checker.nu *
|
|
use ../lib_provisioning/cache/version_loader.nu *
|
|
use ../lib_provisioning/cache/batch_updater.nu *
|
|
|
|
# Get version for a specific component
|
|
export def "version get" [
|
|
component: string # Component name (e.g., kubernetes, containerd)
|
|
]: nothing -> string {
|
|
get-cached-version $component
|
|
}
|
|
|
|
# Show cache status and statistics
|
|
export def "version status" []: nothing -> nothing {
|
|
show-cache-status
|
|
}
|
|
|
|
# Initialize the cache system
|
|
export def "version init" []: nothing -> nothing {
|
|
print "🚀 Initializing version cache system..."
|
|
init-cache-system
|
|
print "✅ Cache system initialized"
|
|
}
|
|
|
|
# Clear all cached versions
|
|
export def "version clear" []: nothing -> nothing {
|
|
print "🧹 Clearing version cache..."
|
|
clear-cache-system
|
|
print "✅ Cache cleared"
|
|
}
|
|
|
|
# Update all cached versions in batches
|
|
export def "version update-all" []: nothing -> nothing {
|
|
print "🔄 Updating all cached versions..."
|
|
batch-update-all
|
|
print "✅ Cache updated"
|
|
}
|
|
|
|
# Invalidate a specific component's cache entry
|
|
export def "version invalidate" [
|
|
component: string # Component to invalidate
|
|
]: nothing -> nothing {
|
|
invalidate-cache-entry $component "infra"
|
|
invalidate-cache-entry $component "provisioning"
|
|
print $"✅ Invalidated cache for ($component)"
|
|
}
|
|
|
|
# List all available components
|
|
export def "version list" []: nothing -> list<string> {
|
|
get-all-components
|
|
}
|
|
|
|
# Sync cache from source (force refresh)
|
|
export def "version sync" [
|
|
component?: string # Optional specific component
|
|
]: nothing -> nothing {
|
|
if ($component | is-not-empty) {
|
|
invalidate-cache-entry $component "infra"
|
|
invalidate-cache-entry $component "provisioning"
|
|
let version = (get-cached-version $component)
|
|
print $"🔄 Synced ($component): ($version)"
|
|
} else {
|
|
version clear
|
|
version update-all
|
|
print "🔄 Synced all versions"
|
|
}
|
|
}
|