refactor(config/cache + utils + config/commands): 7 files selective (ADR-025 L2)
Batch of 7 files, 2 stars each -> selective. config/cache/commands.nu: cache/core.nu [cache-clear-type get-cache-stats] cache/metadata.nu DROPPED (dead) config/cache/mod.nu: cache/core.nu [get-cache-stats] cache/metadata.nu DROPPED (dead) config/cache/sops.nu: cache/core.nu [cache-clear-type cache-lookup cache-write] cache/metadata.nu DROPPED (dead) config/cache/final.nu: cache/core.nu [cache-clear-type cache-lookup cache-write] cache/metadata.nu DROPPED (dead) utils/templates.nu: utils/logging.nu [is-debug-enabled] config/accessor DROPPED (dead) utils/error.nu: utils/logging.nu [is-debug-enabled is-metadata-enabled] utils/interface.nu [_ansi] (kept, already selective; promoted to absolute) config/accessor DROPPED (dead) config/commands.nu: config/encryption.nu [9 symbols] config/accessor DROPPED (dead) Validation: 5/7 files 0 errors. 2 files (cache/commands, utils/templates) show pre-existing errors matching baseline. Zero new errors. Refs: ADR-025
This commit is contained in:
parent
36eac674f4
commit
c6ff85c872
7 changed files with 26 additions and 15 deletions
|
|
@ -2,8 +2,9 @@
|
||||||
# Provides user-facing commands for cache operations and configuration
|
# Provides user-facing commands for cache operations and configuration
|
||||||
# Follows Nushell 0.109.0+ guidelines
|
# Follows Nushell 0.109.0+ guidelines
|
||||||
|
|
||||||
use ./core.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ./metadata.nu *
|
# cache/metadata star-import was dead — dropped.
|
||||||
|
use lib_provisioning/config/cache/core.nu [cache-clear-type get-cache-stats]
|
||||||
# Avoid importing all modules - use only what's needed
|
# Avoid importing all modules - use only what's needed
|
||||||
# use ./config_manager.nu *
|
# use ./config_manager.nu *
|
||||||
# use ./nickel.nu *
|
# use ./nickel.nu *
|
||||||
|
|
|
||||||
5
nulib/lib_provisioning/config/cache/final.nu
vendored
5
nulib/lib_provisioning/config/cache/final.nu
vendored
|
|
@ -4,8 +4,9 @@
|
||||||
# TTL: 5 minutes (short for safety - workspace configs can change)
|
# TTL: 5 minutes (short for safety - workspace configs can change)
|
||||||
# Follows Nushell 0.109.0+ guidelines
|
# Follows Nushell 0.109.0+ guidelines
|
||||||
|
|
||||||
use ./core.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ./metadata.nu *
|
# cache/metadata star-import was dead — dropped.
|
||||||
|
use lib_provisioning/config/cache/core.nu [cache-clear-type cache-lookup cache-write]
|
||||||
|
|
||||||
# Helper: Generate cache key for workspace + environment combination
|
# Helper: Generate cache key for workspace + environment combination
|
||||||
def compute-final-config-key [
|
def compute-final-config-key [
|
||||||
|
|
|
||||||
5
nulib/lib_provisioning/config/cache/mod.nu
vendored
5
nulib/lib_provisioning/config/cache/mod.nu
vendored
|
|
@ -2,8 +2,9 @@
|
||||||
# Avoids complex re-export patterns that cause Nushell 0.110.0 parser issues
|
# Avoids complex re-export patterns that cause Nushell 0.110.0 parser issues
|
||||||
|
|
||||||
# Import core only - other modules import their dependencies directly
|
# Import core only - other modules import their dependencies directly
|
||||||
use ./core.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ./metadata.nu *
|
# cache/metadata star-import was dead — dropped.
|
||||||
|
use lib_provisioning/config/cache/core.nu [get-cache-stats]
|
||||||
|
|
||||||
# Helper: Initialize cache system
|
# Helper: Initialize cache system
|
||||||
export def init-cache-system [] {
|
export def init-cache-system [] {
|
||||||
|
|
|
||||||
5
nulib/lib_provisioning/config/cache/sops.nu
vendored
5
nulib/lib_provisioning/config/cache/sops.nu
vendored
|
|
@ -4,8 +4,9 @@
|
||||||
# TTL: 15 minutes (configurable, balances security and performance)
|
# TTL: 15 minutes (configurable, balances security and performance)
|
||||||
# Follows Nushell 0.109.0+ guidelines
|
# Follows Nushell 0.109.0+ guidelines
|
||||||
|
|
||||||
use ./core.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ./metadata.nu *
|
# cache/metadata star-import was dead — dropped.
|
||||||
|
use lib_provisioning/config/cache/core.nu [cache-clear-type cache-lookup cache-write]
|
||||||
|
|
||||||
# Helper: Compute hash of SOPS file path
|
# Helper: Compute hash of SOPS file path
|
||||||
def compute-sops-hash [file_path: string] {
|
def compute-sops-hash [file_path: string] {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
# Configuration Encryption CLI Commands
|
# Configuration Encryption CLI Commands
|
||||||
# Provides user-friendly commands for config encryption operations
|
# Provides user-friendly commands for config encryption operations
|
||||||
|
|
||||||
use encryption.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use accessor.nu *
|
# config/accessor star-import was dead — dropped.
|
||||||
|
use lib_provisioning/config/encryption.nu [
|
||||||
|
contains-sensitive-data decrypt-config edit-encrypted-config
|
||||||
|
encrypt-config encrypt-sensitive-configs is-encrypted-config
|
||||||
|
rotate-encryption-keys scan-unencrypted-configs validate-encryption-config
|
||||||
|
]
|
||||||
|
|
||||||
# Encrypt a configuration file
|
# Encrypt a configuration file
|
||||||
export def "config encrypt" [
|
export def "config encrypt" [
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,10 @@
|
||||||
# Purpose: Centralized error handling, error messages, and exception management.
|
# Purpose: Centralized error handling, error messages, and exception management.
|
||||||
# Dependencies: logging
|
# Dependencies: logging
|
||||||
|
|
||||||
use ../config/accessor.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ./logging.nu *
|
# config/accessor star-import was dead — dropped.
|
||||||
use ./interface.nu [_ansi]
|
use lib_provisioning/utils/logging.nu [is-debug-enabled is-metadata-enabled]
|
||||||
|
use lib_provisioning/utils/interface.nu [_ansi]
|
||||||
|
|
||||||
export def throw-error [
|
export def throw-error [
|
||||||
error: string
|
error: string
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
use ../config/accessor.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ./logging.nu *
|
# config/accessor star-import was dead — dropped.
|
||||||
|
use lib_provisioning/utils/logging.nu [is-debug-enabled]
|
||||||
|
|
||||||
export def run_from_template [
|
export def run_from_template [
|
||||||
template_path: string # Template path
|
template_path: string # Template path
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue