Skip to content

Commit

Permalink
Reducing directory depth of internal, private nested module dependenc…
Browse files Browse the repository at this point in the history
…ies.
  • Loading branch information
splatteredbits committed Nov 27, 2024
1 parent 7347d48 commit ba25464
Show file tree
Hide file tree
Showing 24 changed files with 30 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
/Carbon.DSC/LICENSE.txt
/Carbon.DSC/NOTICE.txt
/Carbon.DSC/README.md
/Carbon.DSC/Modules/
/Carbon.DSC/Carbon
/Carbon.DSC/Carbon.*
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@

# Carbon.DSC Changelog

## 1.0.1

Reducing directory depth of internal, private nested module dependencies.

## 1.0.0

> Released 13 Sep 2024
### Upgrade Instructions

Migrated DSC functionality from Carbon.
Expand Down
2 changes: 1 addition & 1 deletion Carbon.DSC/Carbon.DSC.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
RootModule = 'Carbon.DSC.psm1'

# Version number of this module.
ModuleVersion = '1.0.0'
ModuleVersion = '1.0.1'

# ID used to uniquely identify this module
GUID = '8aa43ac0-cd66-4fc0-aa13-efa08d573946'
Expand Down
2 changes: 1 addition & 1 deletion Carbon.DSC/Carbon.DSC.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Set-StrictMode -Version 'Latest'
# module in development has its functions in the Functions directory.
$script:moduleRoot = $PSScriptRoot

$psModulesRoot = Join-Path -Path $script:moduleRoot -ChildPath 'Modules' -Resolve
$psModulesRoot = $script:moduleRoot

Import-Module -Name (Join-Path -Path $psModulesRoot -ChildPath 'Carbon.Cryptography' -Resolve) `
-Function @('Get-CCertificate') `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Set-CEnvironmentVariable')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Get-CFirewallRule')

Expand Down
2 changes: 1 addition & 1 deletion Carbon.DSC/DscResources/Carbon_Group/Carbon_Group.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Install-CGroup', 'Get-CGroup', 'Test-CGroup', 'Uninstall-CGroup')

Expand Down
2 changes: 1 addition & 1 deletion Carbon.DSC/DscResources/Carbon_IniFile/Carbon_IniFile.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Remove-CIniEntry', 'Set-CIniEntry', 'Split-CIni')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @(
'ConvertTo-CContainerInheritanceFlags',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon.Security' -Resolve) `
-Function @('Get-CPrivilege', 'Grant-CPrivilege', 'Revoke-CPrivilege')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @(
'Get-CScheduledTask',
Expand Down
2 changes: 1 addition & 1 deletion Carbon.DSC/DscResources/Carbon_Service/Carbon_Service.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\..' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Install-CService', 'Test-CService', 'Uninstall-CService' )
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon.Accounts' -Resolve) `
Expand Down
3 changes: 1 addition & 2 deletions Carbon.DSC/prism.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@
"Name": "Carbon.Security",
"Version": "1.*"
}
],
"PSModulesDirectoryName": "Modules"
]
}
2 changes: 1 addition & 1 deletion Complete-CarbonDscTest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ param(
#Requires -Version 5.1
Set-StrictMode -Version 'Latest'

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath 'Carbon.DSC\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath 'Carbon.DSC' -Resolve

Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Get-CPowerShellModuleInstallPath', 'Uninstall-CJunction') `
Expand Down
2 changes: 1 addition & 1 deletion Start-CarbonDscTest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'Carbon.DSC' -Reso
-Function @('Clear-CDscLocalResourceCache') `
-Verbose:$false

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath 'Carbon.DSC\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath 'Carbon.DSC' -Resolve

Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Get-CCimInstance', 'Get-CPowerShellModuleInstallPath', 'Install-CJunction') `
Expand Down
2 changes: 1 addition & 1 deletion Tests/Carbon_FirewallRule.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BeforeAll {

& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-Test.ps1' -Resolve)

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Get-CFirewallRule') `
-Verbose:$false
Expand Down
2 changes: 1 addition & 1 deletion Tests/Carbon_Group.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BeforeAll {

& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-Test.ps1' -Resolve)

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Get-CGroup', 'Install-CUser', 'Install-CGroup', 'Test-CGroup') `
-Verbose:$false
Expand Down
2 changes: 1 addition & 1 deletion Tests/Carbon_IniFile.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BeforeAll {

& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-Test.ps1' -Resolve)

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Split-CIni') `
-Verbose:$false
Expand Down
2 changes: 1 addition & 1 deletion Tests/Carbon_Permission.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BeforeAll {

& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-Test.ps1' -Resolve)

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @(
'Get-CPermission',
Expand Down
2 changes: 1 addition & 1 deletion Tests/Carbon_Privilege.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BeforeAll {

& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-Test.ps1' -Resolve)

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Install-CUser') `
-Verbose:$false
Expand Down
2 changes: 1 addition & 1 deletion Tests/Carbon_ScheduledTask.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ BeforeAll {

& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-Test.ps1' -Resolve)

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @(
'Get-CScheduledTask',
Expand Down
2 changes: 1 addition & 1 deletion Tests/Carbon_Service.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BeforeAll {

& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-Test.ps1' -Resolve)

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC' -Resolve
Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Install-CUser', 'Uninstall-CService') `
-Verbose:$false
Expand Down
2 changes: 1 addition & 1 deletion Tests/Initialize-CLcm.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BeforeAll {

& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-Test.ps1' -Resolve)

$modulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC\Modules' -Resolve
$modulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC' -Resolve
Import-Module -Name (Join-Path -Path $modulesPath -ChildPath 'Carbon.Cryptography' -Resolve) `
-Function @('Get-CCertificate', 'Uninstall-CCertificate') `
-Verbose:$false
Expand Down
2 changes: 1 addition & 1 deletion Tests/Initialize-Test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ finally
$Global:WhatIfPreference = $originalWhatIfPref
}

$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC\Modules' -Resolve
$psModulesPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.DSC' -Resolve

Import-Module -Name (Join-Path -Path $psModulesPath -ChildPath 'Carbon' -Resolve) `
-Function @('Install-CUser', 'Test-CUser') `
Expand Down

0 comments on commit ba25464

Please sign in to comment.