Skip to content

fix: restore function-parameters.json generation for ListFunctionParameters#68

Merged
Zacgoose merged 1 commit into
CyberDrain:devfrom
k-grube:fix/list-function-parameters-timeout
Jul 25, 2026
Merged

fix: restore function-parameters.json generation for ListFunctionParameters#68
Zacgoose merged 1 commit into
CyberDrain:devfrom
k-grube:fix/list-function-parameters-timeout

Conversation

@k-grube

@k-grube k-grube commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

ListFunctionParameters?Module=CIPPCore currently times out due to generating help text from Get-Help on every function in CIPPCore, which makes it so you can't use the scheduler form because this field is always fetching

This PR restores the Tools/Build-FunctionParameters.ps1 script with some improvements

Changes from the original:

  • generates the cache in ~1s vs 3 minutes, AST parse instead of importing the module and running Get-Help
  • functions without comment help get a synthesized syntax-line synopsis, byte-identical to what Get-Help produced (scheduler form shows it under "PowerShell Command:")
  • output verified against the legacy script across all 476 functions: identical except 2 param descriptions written as inline # comments instead of .PARAMETER blocks, both on Internal functions the endpoint filters out
  • added to Dockerfile/Dockerfile.release as a build stage, and to build-dev-modules.ps1 for the local dev loop (generated file is gitignored/dockerignored, compose watch ignores it to avoid a double restart)
  • pester tests for Invoke-ListFunctionParameters
  • pester tests for the generator itself, synthesized synopses asserted byte-identical against live Get-Help on fixture modules.

@Zacgoose
Zacgoose merged commit a1e479e into CyberDrain:dev Jul 25, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants