Pode icon indicating copy to clipboard operation
Pode copied to clipboard

Support passing Arrays to Functions Using Piping

Open mdaneri opened this issue 7 months ago • 2 comments

Description

This feature enhances the Pode module by enabling full support for passing arrays to functions using the pipeline. The update ensures that the specified functions can correctly handle multiple input objects when piped as arrays, improving flexibility and usability in scripting and automation.

Impacted Functions:

  • Set-PodeCache
  • Add-PodeOAResponse
  • Remove-PodeOAResponse
  • Set-PodeOARequest
  • Set-PodeOARouteInfo
  • Add-PodeOACallBack
  • Add-PodeOAExternalRoute
  • ConvertTo-PodeRoute
  • Update-PodeSecret
  • Set-PodeSecret
  • Set-PodeState
  • Out-PodeHost
  • Write-PodeHost
  • Out-PodeVariable

Key Changes:

  • Modified the impacted functions to support array input via the pipeline.
  • Enhanced processing logic to aggregate piped values and handle them appropriately.
  • Ensured backward compatibility by retaining existing parameter functionalities.

This update will streamline the process of handling multiple objects in a single pipeline, making it easier to work with collections of items in Pode scripts.

This update address #1343

mdaneri avatar Jun 27 '24 23:06 mdaneri