From c95013551ab61cedee31f3456ec793f0f3b6439a Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Wed, 13 May 2026 17:22:49 -0700 Subject: [PATCH] docs(public): add comment-based help to Get-FeatureFlagFolder, Get-PropertySetFolder, Import-GatekeeperConfig Co-Authored-By: Claude Sonnet 4.6 --- Gatekeeper/Public/Get-FeatureFlagFolder.ps1 | 25 ++++++++++++++++ Gatekeeper/Public/Get-PropertySetFolder.ps1 | 25 ++++++++++++++++ Gatekeeper/Public/Import-GatekeeperConfig.ps1 | 30 +++++++++++++++++++ 3 files changed, 80 insertions(+) diff --git a/Gatekeeper/Public/Get-FeatureFlagFolder.ps1 b/Gatekeeper/Public/Get-FeatureFlagFolder.ps1 index ea108de..8416181 100644 --- a/Gatekeeper/Public/Get-FeatureFlagFolder.ps1 +++ b/Gatekeeper/Public/Get-FeatureFlagFolder.ps1 @@ -1,5 +1,30 @@ #requires -Module Configuration function Get-FeatureFlagFolder { + <# + .SYNOPSIS + Returns the configured directory where feature flag JSON files are stored. + + .DESCRIPTION + Retrieves the feature flag folder path from the active Gatekeeper configuration. + If no path has been configured, a default location is created under the machine-wide + configuration path and saved automatically via Export-GatekeeperConfig. + + Use Export-GatekeeperConfig to set the path explicitly and avoid the auto-create + behavior on first run. + + .OUTPUTS + System.String + + .EXAMPLE + $folder = Get-FeatureFlagFolder + Get-ChildItem -Path $folder -Filter '*.json' + + Returns the feature flag folder path and lists all JSON files in it. + + .NOTES + On first run, if no path is configured, this function creates the default directory + and persists the path to configuration automatically. + #> [CmdletBinding()] param () diff --git a/Gatekeeper/Public/Get-PropertySetFolder.ps1 b/Gatekeeper/Public/Get-PropertySetFolder.ps1 index 29f9c6e..3645815 100644 --- a/Gatekeeper/Public/Get-PropertySetFolder.ps1 +++ b/Gatekeeper/Public/Get-PropertySetFolder.ps1 @@ -1,5 +1,30 @@ #requires -Module Configuration function Get-PropertySetFolder { + <# + .SYNOPSIS + Returns the configured directory where property set JSON files are stored. + + .DESCRIPTION + Retrieves the property set folder path from the active Gatekeeper configuration. + If no path has been configured, a default location is created under the machine-wide + configuration path and saved automatically via Export-GatekeeperConfig. + + Use Export-GatekeeperConfig to set the path explicitly and avoid the auto-create + behavior on first run. + + .OUTPUTS + System.String + + .EXAMPLE + $folder = Get-PropertySetFolder + Get-ChildItem -Path $folder -Filter '*.json' + + Returns the property set folder path and lists all JSON files in it. + + .NOTES + On first run, if no path is configured, this function creates the default directory + and persists the path to configuration automatically. + #> [CmdletBinding()] param () diff --git a/Gatekeeper/Public/Import-GatekeeperConfig.ps1 b/Gatekeeper/Public/Import-GatekeeperConfig.ps1 index c0aeff7..1e92367 100644 --- a/Gatekeeper/Public/Import-GatekeeperConfig.ps1 +++ b/Gatekeeper/Public/Import-GatekeeperConfig.ps1 @@ -1,4 +1,34 @@ function Import-GatekeeperConfig { + <# + .SYNOPSIS + Loads the Gatekeeper module configuration with multi-level precedence. + + .DESCRIPTION + Imports the Gatekeeper configuration using the Configuration module's precedence + chain: module defaults, machine-wide settings, enterprise roaming settings, and + user local settings. The result is cached in module scope so subsequent calls + return quickly without re-reading disk. + + Logging scripts defined in the configuration are parsed and stored in + $script:GatekeeperLogging. Scripts may be inline scriptblocks, inline PowerShell + strings, or paths to local .ps1 files. UNC and remote paths are rejected. + + .PARAMETER ForceReload + Clears the module-scope cache and re-reads configuration from disk. + + .OUTPUTS + System.Collections.Hashtable + + .EXAMPLE + Import-GatekeeperConfig + + Returns the cached configuration, loading from disk on first call. + + .EXAMPLE + Import-GatekeeperConfig -ForceReload + + Discards the cached configuration and reloads from disk. + #> [CmdletBinding()] param ( [Parameter(Mandatory = $false)]