BykaCCSupervisor.psm1
|
# BykaCCSupervisor - module loader # # Dot-sources Private/ first (helpers must exist before Public/ references # them), then Public/. Each .ps1 file under those directories defines exactly # one function. The manifest's FunctionsToExport controls visibility -- no # Export-ModuleMember calls here. $ModuleRoot = $PSScriptRoot $privateDir = Join-Path $ModuleRoot 'Private' if (Test-Path $privateDir) { # Sort by name so load order is deterministic across filesystems # ([G4] code-reviewer T2: NTFS FS-cache may otherwise return helpers in # arbitrary order, and Write-OnceWarn inside Resolve-ProjectDir.ps1 # references Write-LogLine which must exist when it runs). Get-ChildItem -Path $privateDir -Filter '*.ps1' -ErrorAction SilentlyContinue | Sort-Object Name | ForEach-Object { . $_.FullName } } $publicDir = Join-Path $ModuleRoot 'Public' if (Test-Path $publicDir) { Get-ChildItem -Path $publicDir -Filter '*.ps1' -ErrorAction SilentlyContinue | Sort-Object Name | ForEach-Object { . $_.FullName } } |