-
-
Notifications
You must be signed in to change notification settings - Fork 0
Bug fix include modules cross module references #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
|
|
||
|
|
||
| $DB_INVOKE_GET_ROOT_PATH_ALIAS = "SfGetDbRootPath" | ||
| $DB_INVOKE_GET_ROOT_PATH_CMD = "Invoke-SfGetDbRootPath" | ||
|
|
||
| Set-MyInvokeCommandAlias -Alias $DB_INVOKE_GET_ROOT_PATH_ALIAS -Command $DB_INVOKE_GET_ROOT_PATH_CMD | ||
|
|
||
| function Invoke-SfGetDbRootPath{ | ||
Check noticeCode scanning / PSScriptAnalyzer The cmdlet 'Invoke-SfGetDbRootPath' does not have a help comment. Note
The cmdlet 'Invoke-SfGetDbRootPath' does not have a help comment.
|
||
| [CmdletBinding()] | ||
| param() | ||
|
|
||
| $databaseRoot = GetDatabaseRootPath | ||
| return $databaseRoot | ||
|
|
||
| } Export-ModuleMember -Function Invoke-SfGetDbRootPath | ||
|
|
||
|
|
||
| function Reset-DatabaseStore{ | ||
Check noticeCode scanning / PSScriptAnalyzer The cmdlet 'Reset-DatabaseStore' does not have a help comment. Note
The cmdlet 'Reset-DatabaseStore' does not have a help comment.
Check warningCode scanning / PSScriptAnalyzer Function 'Reset-DatabaseStore' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
Function 'Reset-DatabaseStore' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'.
|
||
| [CmdletBinding()] | ||
| param() | ||
|
|
||
| $databaseRoot = Invoke-MyCommand -Command $DB_INVOKE_GET_ROOT_PATH_ALIAS | ||
|
|
||
Check noticeCode scanning / PSScriptAnalyzer Line has trailing whitespace Note
Line has trailing whitespace
|
||
| Remove-Item -Path $databaseRoot -Recurse -Force -ErrorAction SilentlyContinue | ||
|
|
||
| New-Item -Path $databaseRoot -ItemType Directory | ||
|
|
||
| } Export-ModuleMember -Function Reset-DatabaseStore | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
|
|
||
| $CONFIG_INVOKE_GET_ROOT_PATH_ALIAS = "SfGetConfigRootPath" | ||
| $CONFIG_INVOKE_GET_ROOT_PATH_CMD = "Invoke-SfGetConfigRootPath" | ||
|
|
||
| Set-MyInvokeCommandAlias -Alias $CONFIG_INVOKE_GET_ROOT_PATH_ALIAS -Command $CONFIG_INVOKE_GET_ROOT_PATH_CMD | ||
|
|
||
| function Invoke-SfGetConfigRootPath{ | ||
Check noticeCode scanning / PSScriptAnalyzer The cmdlet 'Invoke-SfGetConfigRootPath' does not have a help comment. Note
The cmdlet 'Invoke-SfGetConfigRootPath' does not have a help comment.
|
||
| $configRoot = GetConfigRootPath | ||
| return $configRoot | ||
| } Export-ModuleMember -Function Invoke-SfGetConfigRootPath | ||
|
|
||
|
|
||
| function Get-SfConfig{ | ||
Check noticeCode scanning / PSScriptAnalyzer The cmdlet 'Get-SfConfig' does not have a help comment. Note
The cmdlet 'Get-SfConfig' does not have a help comment.
|
||
| [CmdletBinding()] | ||
| param() | ||
|
|
||
| $config = Get-Configuration | ||
|
|
||
| return $config | ||
| } Export-ModuleMember -Function Get-SfConfig | ||
|
|
||
| function Save-SfConfig{ | ||
Check noticeCode scanning / PSScriptAnalyzer The cmdlet 'Save-SfConfig' does not have a help comment. Note
The cmdlet 'Save-SfConfig' does not have a help comment.
|
||
| [CmdletBinding()] | ||
| param( | ||
| [Parameter(Mandatory, ValueFromPipeline, Position = 0)][Object]$Config | ||
Check warningCode scanning / PSScriptAnalyzer Command accepts pipeline input but has not defined a process block. Warning
Command accepts pipeline input but has not defined a process block.
|
||
| ) | ||
|
|
||
| return Save-Configuration -Config $Config | ||
| } Export-ModuleMember -Function Save-SfConfig | ||
|
|
||
| function Open-SfConfig{ | ||
Check noticeCode scanning / PSScriptAnalyzer The cmdlet 'Open-SfConfig' does not have a help comment. Note
The cmdlet 'Open-SfConfig' does not have a help comment.
|
||
| [CmdletBinding()] | ||
| param() | ||
|
|
||
| $path = GetConfigFile -Key "config" | ||
|
|
||
| code $path | ||
|
|
||
| } Export-ModuleMember -Function Open-SfConfig | ||
|
|
||
| function Add-SfConfigAttribute{ | ||
Check noticeCode scanning / PSScriptAnalyzer The cmdlet 'Add-SfConfigAttribute' does not have a help comment. Note
The cmdlet 'Add-SfConfigAttribute' does not have a help comment.
|
||
| [CmdletBinding()] | ||
| param( | ||
| [Parameter(Mandatory, ValueFromPipeline, Position = 0)][string]$Attribute | ||
| ) | ||
|
|
||
| begin{ | ||
| $config = Get-Configuration | ||
|
|
||
| if(-Not $config){ | ||
| $config = @{} | ||
| } | ||
|
|
||
Check noticeCode scanning / PSScriptAnalyzer Line has trailing whitespace Note
Line has trailing whitespace
|
||
| if(-Not $config.attributes){ | ||
| $config.attributes = @() | ||
| } | ||
| } | ||
|
|
||
| process{ | ||
| $config.attributes += $Attribute | ||
| } | ||
|
|
||
Check noticeCode scanning / PSScriptAnalyzer Line has trailing whitespace Note
Line has trailing whitespace
|
||
| End{ | ||
| $ret = Save-Configuration -Config $config | ||
| if(-Not $ret){ | ||
| throw "Error saving configuration" | ||
| } | ||
|
|
||
| $config = Get-SfConfig | ||
| Write-Output $config.attributes | ||
|
|
||
Check noticeCode scanning / PSScriptAnalyzer Line has trailing whitespace Note
Line has trailing whitespace
|
||
| } | ||
|
|
||
| } Export-ModuleMember -Function Add-SfConfigAttribute | ||
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note