Skip to content

Commit

Permalink
Merge pull request #7 from webmd-health-services/feature/reduce-nesting
Browse files Browse the repository at this point in the history
Reducing depth of nested modules.
  • Loading branch information
splatteredbits authored Nov 19, 2024
2 parents ef323b7 + cef6f71 commit 760c462
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 21 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/.output
/PSModules
/Carbon.Security/Carbon.*
/Carbon.Security/PureInvoke
/.vscode
/Carbon.Security/CHANGELOG.md
/Carbon.Security/LICENSE.txt
/Carbon.Security/NOTICE.txt
/Carbon.Security/README.md
/Carbon.Security/Modules/
/PSModules
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Carbon.Security Changelog

## 1.0.1

Decreasing depth of nested dependencies.

## 1.0.0

> Released 10 Jun 2024
### Upgrade Instructions

If switching from Carbon, the `Get-CPermission`, `Grant-CPermission`, `Revoke-CPermission`, and `Test-CPermission`
Expand Down
2 changes: 1 addition & 1 deletion Carbon.Security/Carbon.Security.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
RootModule = 'Carbon.Security.psm1'

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

# ID used to uniquely identify this module
GUID = 'd957c669-307c-409a-bb28-83fb666b5c6f'
Expand Down
12 changes: 6 additions & 6 deletions Carbon.Security/Carbon.Security.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ Set-StrictMode -Version 'Latest'
# Functions should use $moduleRoot as the relative root from which to find
# things. A published module has its function appended to this file, while a
# module in development has its functions in the Functions directory.
$moduleRoot = $PSScriptRoot
$script:moduleRoot = $PSScriptRoot

$psModulesRoot = Join-Path -Path $PSScriptRoot -ChildPath 'Modules' -Resolve
Import-Module -Name (Join-Path -Path $psModulesRoot -ChildPath 'Carbon.Core') `
$psModulesDirPath = $script:moduleRoot
Import-Module -Name (Join-Path -Path $psModulesDirPath -ChildPath 'Carbon.Core') `
-Function @('Get-CPathProvider') `
-Verbose:$false
Import-Module -Name (Join-Path -Path $psModulesRoot -ChildPath 'Carbon.Accounts') `
Import-Module -Name (Join-Path -Path $psModulesDirPath -ChildPath 'Carbon.Accounts') `
-Function @('Resolve-CIdentity', 'Resolve-CIdentityName', 'Test-CIdentity') `
-Verbose:$false
Import-Module -Name (Join-Path -Path $psModulesRoot -ChildPath 'PureInvoke' -Resolve) `
Import-Module -Name (Join-Path -Path $psModulesDirPath -ChildPath 'PureInvoke' -Resolve) `
-Function @(
'Invoke-AdvApiLookupPrivilegeName'
'Invoke-AdvApiLookupPrivilegeValue',
Expand All @@ -59,7 +59,7 @@ if (-not (Test-Path -Path 'variable:IsWindows'))
# this file, so only dot-source files that exist on the file system. This allows
# developers to work on a module without having to build it first. Grab all the
# functions that are in their own files.
$functionsPath = Join-Path -Path $moduleRoot -ChildPath 'Functions\*.ps1'
$functionsPath = Join-Path -Path $script:moduleRoot -ChildPath 'Functions\*.ps1'
if( (Test-Path -Path $functionsPath) )
{
foreach( $functionPath in (Get-Item $functionsPath) )
Expand Down
13 changes: 6 additions & 7 deletions Carbon.Security/prism.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{
"PSModules": [
"PSModules": [
{
"Name": "Carbon.Accounts",
"Version": "1.*-*"
"Version": "1.*"
},
{
"Name": "Carbon.Core",
"Version": "1.*-*"
"Version": "1.*"
},
{
"Name": "PureInvoke",
"Version": "1.*-*"
"Version": "1.*",
"AllowPrerelease": true
}
],

"PSModulesDirectoryName": "Modules"
]
}
6 changes: 3 additions & 3 deletions Carbon.Security/prism.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"PSModules": [
{
"name": "Carbon.Accounts",
"version": "1.0.0-rc5",
"version": "1.0.0",
"repositorySourceLocation": "https://www.powershellgallery.com/api/v2"
},
{
"name": "Carbon.Core",
"version": "1.4.0-rc1",
"version": "1.4.0",
"repositorySourceLocation": "https://www.powershellgallery.com/api/v2"
},
{
"name": "PureInvoke",
"version": "1.0.0-rc7",
"version": "1.0.0-rc10",
"repositorySourceLocation": "https://www.powershellgallery.com/api/v2"
}
]
Expand Down
2 changes: 1 addition & 1 deletion Tests/Grant-CPermission.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BeforeAll {

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

$psModulesSharedPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.Security\Modules' -Resolve
$psModulesSharedPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.Security' -Resolve
Import-Module -Name (Join-Path -Path $psModulesSharedPath -ChildPath 'Carbon.Core' -Resolve) `
-Function ('Get-CPathProvider') `
-Global `
Expand Down
2 changes: 1 addition & 1 deletion prism.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
{
"name": "Carbon.Registry",
"version": "1.1.0",
"version": "1.2.0",
"repositorySourceLocation": "https://www.powershellgallery.com/api/v2"
}
]
Expand Down

0 comments on commit 760c462

Please sign in to comment.