PipeScript icon indicating copy to clipboard operation
PipeScript copied to clipboard

`PSNodeJob.ContentPipeline` should determine how content is served

Open StartAutomating opened this issue 1 year ago • 0 comments

Currently, this is hardcoded into PSNode (and that's generally not ideal).

Essentially, if we are serving HTTP requests, our pipeline should be flexibly determinable by content type.

This will be a lookup table of content-type to a series of pipeline steps.

  • Any [string] will be considered a command name.
  • Any [ScriptBlock] will be considered a command.
  • Any [Management.Automation.CommandInfo] will obviously be a command
  • Anytime a new Command is encountered, it will become an .AddCommand or .AddScript
  • Any [Object[]] will be considered arguments, and will become .AddArguments()
  • Any [Dictionary] or [PSObject] will be considered parameters and will become .AddParameters()

Any commands referenced in this information should be added to the initial session state (preferably by importing their modules)

This relates to #970 (which will serve as the basis for the default values)

StartAutomating avatar Apr 02 '24 03:04 StartAutomating