-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNebula.Core.psm1
More file actions
28 lines (25 loc) · 878 Bytes
/
Nebula.Core.psm1
File metadata and controls
28 lines (25 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Nebula.Core.psm1
$script:ModuleRoot = $PSScriptRoot
# --- Load Private helpers first (NOT exported) ---
$privateDir = Join-Path $PSScriptRoot 'Private'
if (Test-Path $privateDir) {
Get-ChildItem -Path $privateDir -Filter '*.ps1' -File -Recurse | Sort-Object FullName | ForEach-Object {
try {
. $_.FullName # dot-source
} catch {
throw "Failed to load Private script '$($_.Name)': $($_.Exception.Message)"
}
}
}
Initialize-NebulaConfig
# --- Load Public entry points (will be exported) ---
$publicDir = Join-Path $PSScriptRoot 'Public'
if (Test-Path $publicDir) {
Get-ChildItem -Path $publicDir -Filter '*.ps1' -File | ForEach-Object {
try {
. $_.FullName # dot-source
} catch {
throw "Failed to load Public script '$($_.Name)': $($_.Exception.Message)"
}
}
}