refactor(module_loader + layers + diagnostics): selective imports (ADR-025 L2/L3)
Four files, 3 stars each -> selective.
module_loader.nu:
config/accessor/core.nu [config-get get-config]
config/cache/simple-cache.nu DROPPED (dead)
utils/ DROPPED (dead)
layers/resolver.nu:
taskservs/discover.nu [discover-taskservs get-taskserv-info]
providers/discover.nu [discover-providers get-provider-info]
clusters/discover.nu [discover-clusters get-cluster-info]
Note: these 3 discover.nu files live outside lib_provisioning/ (at
core/nulib/{taskservs,providers,clusters}/). Absolute paths from
nulib/ root preserved. Former relative paths (../../) replaced.
diagnostics/system_status.nu:
config/accessor/core.nu [config-get]
user/config.nu [load-user-config]
plugins/mod.nu DROPPED (dead)
diagnostics/mod.nu (Layer 3 facade):
system_status.nu ["provisioning status" "provisioning status-json"]
health_check.nu ["provisioning health" "provisioning health-json"]
next_steps.nu ["provisioning next" "provisioning phase"]
All multi-word Nu subcommands, quoted per syntax.
Validation: all 4 nu --ide-check 50 -> 0 errors.
Refs: ADR-025
This commit is contained in:
parent
ee68806cb1
commit
d50fa22d92
4 changed files with 19 additions and 12 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
# Diagnostics Module
|
# Diagnostics Module
|
||||||
# Comprehensive system diagnostics and health monitoring
|
# Comprehensive system diagnostics and health monitoring
|
||||||
|
|
||||||
export use system_status.nu *
|
# diagnostics/ subsystem facade — selective re-exports (ADR-025 Phase 3 Layer 3).
|
||||||
export use health_check.nu *
|
# All 3 files export multi-word Nu subcommands ("provisioning status", etc.).
|
||||||
export use next_steps.nu *
|
|
||||||
|
export use system_status.nu ["provisioning status" "provisioning status-json"]
|
||||||
|
export use health_check.nu ["provisioning health" "provisioning health-json"]
|
||||||
|
export use next_steps.nu ["provisioning next" "provisioning phase"]
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,10 @@
|
||||||
# Provides comprehensive system status checks for provisioning platform
|
# Provides comprehensive system status checks for provisioning platform
|
||||||
|
|
||||||
use std log
|
use std log
|
||||||
use ../config/accessor.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ../user/config.nu *
|
# plugins/mod.nu star-import was dead — dropped.
|
||||||
use ../plugins/mod.nu *
|
use lib_provisioning/config/accessor/core.nu [config-get]
|
||||||
|
use lib_provisioning/user/config.nu [load-user-config]
|
||||||
|
|
||||||
# Check Nushell version meets requirements
|
# Check Nushell version meets requirements
|
||||||
def check-nushell-version [] {
|
def check-nushell-version [] {
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,12 @@
|
||||||
# Layered Module Resolver
|
# Layered Module Resolver
|
||||||
# Provides unified resolution across 3 layers: System → Workspace → Infrastructure
|
# Provides unified resolution across 3 layers: System → Workspace → Infrastructure
|
||||||
|
|
||||||
use ../../taskservs/discover.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ../../providers/discover.nu *
|
# discover.nu files live at core/nulib/{taskservs,providers,clusters}/ — outside
|
||||||
use ../../clusters/discover.nu *
|
# lib_provisioning/. Absolute paths from nulib/ root used.
|
||||||
|
use taskservs/discover.nu [discover-taskservs get-taskserv-info]
|
||||||
|
use providers/discover.nu [discover-providers get-provider-info]
|
||||||
|
use clusters/discover.nu [discover-clusters get-cluster-info]
|
||||||
|
|
||||||
# Resolve module path with layer information
|
# Resolve module path with layer information
|
||||||
# Returns: {path: string, layer: string, name: string, type: string, found: bool}
|
# Returns: {path: string, layer: string, name: string, type: string, found: bool}
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
# Author: JesusPerezLorenzo
|
# Author: JesusPerezLorenzo
|
||||||
# Date: 2025-09-29
|
# Date: 2025-09-29
|
||||||
|
|
||||||
use config/accessor.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use config/cache/simple-cache.nu *
|
# config/cache/simple-cache.nu and utils/ star-imports were dead — dropped.
|
||||||
use utils *
|
use lib_provisioning/config/accessor/core.nu [config-get get-config]
|
||||||
|
|
||||||
# Discover Nickel modules from extensions (providers, taskservs, clusters)
|
# Discover Nickel modules from extensions (providers, taskservs, clusters)
|
||||||
export def "discover-nickel-modules" [
|
export def "discover-nickel-modules" [
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue