refactor(workspace/services commands): selective imports (ADR-025 L2)
Two workspace+services command files converted, batched because they share the same pattern (4 stars each -> selective). workspace/commands.nu: user/config.nu [11 symbols] utils/hints.nu [show-next-step] platform/activation.nu [activate-workspace-platform] workspace/notation.nu [3 symbols] Pre-existing name collision documented: get-workspace-path and list-workspaces are exported by BOTH user/config.nu and notation.nu. Star-import resolved via last-wins (notation.nu). Selective version attributes both to notation.nu to preserve behaviour. services/commands.nu: services/manager.nu [9 symbols] services/health.nu [2 symbols] services/preflight.nu [4 symbols] services/dependencies.nu [5 symbols] Validation: both files nu --ide-check 50 -> 0 errors. Refs: ADR-025
This commit is contained in:
parent
e92896cbfa
commit
34b389c8c8
2 changed files with 30 additions and 8 deletions
|
|
@ -3,10 +3,21 @@
|
||||||
# Service CLI Commands
|
# Service CLI Commands
|
||||||
# User-facing commands for service management
|
# User-facing commands for service management
|
||||||
|
|
||||||
use manager.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use health.nu *
|
use lib_provisioning/services/manager.nu [
|
||||||
use preflight.nu *
|
get-service-logs get-service-status init-service-state list-all-services
|
||||||
use dependencies.nu *
|
list-running-services load-service-registry restart-service start-service
|
||||||
|
stop-service
|
||||||
|
]
|
||||||
|
use lib_provisioning/services/health.nu [get-health-status monitor-service-health]
|
||||||
|
use lib_provisioning/services/preflight.nu [
|
||||||
|
check-required-services get-readiness-report preflight-start-service
|
||||||
|
validate-all-services
|
||||||
|
]
|
||||||
|
use lib_provisioning/services/dependencies.nu [
|
||||||
|
can-stop-service get-dependency-tree get-startup-order
|
||||||
|
start-services-with-deps visualize-dependency-graph
|
||||||
|
]
|
||||||
|
|
||||||
# Platform management commands (manage all services)
|
# Platform management commands (manage all services)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,21 @@
|
||||||
# Workspace Management CLI Commands
|
# Workspace Management CLI Commands
|
||||||
# Commands for switching between workspaces and managing workspace registry
|
# Commands for switching between workspaces and managing workspace registry
|
||||||
|
|
||||||
use ../user/config.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ../utils/hints.nu *
|
# Pre-existing name collision: get-workspace-path and list-workspaces are
|
||||||
use ../platform/activation.nu *
|
# exported by BOTH user/config.nu and workspace/notation.nu. Original star
|
||||||
use ./notation.nu *
|
# imports resolved via last-wins (notation.nu line was after user/config.nu).
|
||||||
|
# Keep notation.nu as the owner for the 2 collision symbols.
|
||||||
|
use lib_provisioning/user/config.nu [
|
||||||
|
get-active-workspace get-active-workspace-details get-user-preference
|
||||||
|
load-user-config register-workspace remove-workspace set-active-workspace
|
||||||
|
set-user-preference set-workspace-default-infra validate-workspace-exists
|
||||||
|
]
|
||||||
|
use lib_provisioning/utils/hints.nu [show-next-step]
|
||||||
|
use lib_provisioning/platform/activation.nu [activate-workspace-platform]
|
||||||
|
use lib_provisioning/workspace/notation.nu [
|
||||||
|
get-workspace-path list-workspaces parse-workspace-infra-notation
|
||||||
|
]
|
||||||
|
|
||||||
# Activate a workspace (set as current)
|
# Activate a workspace (set as current)
|
||||||
export def "workspace activate" [
|
export def "workspace activate" [
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue