Bug fix include modules cross module references#13
Conversation
…th new aliases and commands
| # to use the store path, mocked or not, to create the final store file name. | ||
| # All functions of this ps1 will depend on `GetConfigFile` for functionality. | ||
| # | ||
| # TODO : Create a related public ps1 |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| # | ||
| # TODO : Create a related public ps1 | ||
|
|
||
| # Create a related public ps1 |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| # Sample code (replace "MyModule" with a unique module prefix): | ||
| # $CONFIG_INVOKE_GET_ROOT_PATH_ALIAS = "MyModuleGetConfigRootPath" | ||
| # $CONFIG_INVOKE_GET_ROOT_PATH_CMD = "Invoke-MyModuleGetConfigRootPath" | ||
| # |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| # $CONFIG_INVOKE_GET_ROOT_PATH_CMD = "Invoke-MyModuleGetConfigRootPath" | ||
| # | ||
| # Set-MyInvokeCommandAlias -Alias $CONFIG_INVOKE_GET_ROOT_PATH_ALIAS -Command $CONFIG_INVOKE_GET_ROOT_PATH_CMD | ||
| # |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| # $DB_INVOKE_GET_ROOT_PATH_CMD = "Invoke-SfGetDbRootPath" | ||
| # | ||
| # Set-MyInvokeCommandAlias -Alias $DB_INVOKE_GET_ROOT_PATH_ALIAS -Command $DB_INVOKE_GET_ROOT_PATH_CMD | ||
| # |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| return Save-Configuration -Config $Config | ||
| } Export-ModuleMember -Function Save-SfConfig | ||
|
|
||
| function Open-SfConfig{ |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Open-SfConfig' does not have a help comment. Note
|
|
||
| } Export-ModuleMember -Function Open-SfConfig | ||
|
|
||
| function Add-SfConfigAttribute{ |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Add-SfConfigAttribute' does not have a help comment. Note
| if(-Not $config){ | ||
| $config = @{} | ||
| } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| process{ | ||
| $config.attributes += $Attribute | ||
| } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
|
|
||
| $config = Get-SfConfig | ||
| Write-Output $config.attributes | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
Standardization of root path invocation:
Test/include/config.mock.ps1: Introduced$CONFIG_INVOKE_GET_ROOT_PATH_CMDand updatedMock_Configto use this variable. [1] [2]Test/include/database.mock.ps1: Introduced$DB_INVOKE_GET_ROOT_PATH_CMDand updatedMock_Databaseto use this variable.Test/public/sfDataQuery.test.ps1: UpdatedTest_GetSfAccountto use$DB_INVOKE_GET_ROOT_PATH_CMDfor database store path.Refactoring configuration and database scripts:
include/config.ps1: Added detailed comments explaining the design and usage of root path invocation. RenamedInvoke-GetConfigRootPathtoGetConfigRootPathand updatedGetConfigFileto use$CONFIG_INVOKE_GET_ROOT_PATH_ALIAS. [1] [2]include/databaseV2.ps1: Renamed fromprivate/dependencies/databaseV2.ps1, added detailed comments, and refactored functions to use$DB_INVOKE_GET_ROOT_PATH_ALIAS. Removed redundant functions. [1] [2] [3]New public scripts for configuration and database handling:
public/sfDatabase.ps1: Introduced$DB_INVOKE_GET_ROOT_PATH_ALIASand$DB_INVOKE_GET_ROOT_PATH_CMD, and added functionsInvoke-SfGetDbRootPathandReset-DatabaseStore.public/sfconfig.ps1: Introduced$CONFIG_INVOKE_GET_ROOT_PATH_ALIASand$CONFIG_INVOKE_GET_ROOT_PATH_CMD, and added functionsInvoke-SfGetConfigRootPath,Get-SfConfig,Save-SfConfig,Open-SfConfig, andAdd-SfConfigAttribute.