From 8650790207b9368cb33eabc83042eadabcd23893 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 14 Apr 2024 21:14:42 +0000 Subject: [PATCH 1/2] feat: Building https://ghcr.io/startautomating/pipescript ( Fixes #1105, Fixes #1106 ) --- Commands/Protocols/HTTP-Protocol.ps1 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Commands/Protocols/HTTP-Protocol.ps1 b/Commands/Protocols/HTTP-Protocol.ps1 index 731a6cfde..e2964f455 100644 --- a/Commands/Protocols/HTTP-Protocol.ps1 +++ b/Commands/Protocols/HTTP-Protocol.ps1 @@ -1,3 +1,6 @@ +[ValidatePattern("(?>HTTP|Protocol)")] +param() + function Protocol.HTTP { @@ -103,7 +106,15 @@ function Protocol.HTTP { # The invocation command. By default, Invoke-RestMethod. # Whatever alternative command provided should have a similar signature to Invoke-RestMethod. [string] - $Invoker = 'Invoke-RestMethod' + $Invoker = 'Invoke-RestMethod', + + [Alias('Expand Property')] + [string] + $ExpandProperty, + + [Alias('Property')] + [string[]] + $Property ) process { @@ -231,6 +242,15 @@ function Protocol.HTTP { $param.Value } } + + + if ($ExpandProperty -or $Property) { + if ($property -and -not $ExpandProperty) { + " | Select-Object -Property $(@( + + ) -join ',')" + } + } ) -join ' ' [scriptblock]::Create($newScript) From 002c03ed30618c9d706bed889866b3cd43e7bc1d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 14 Apr 2024 21:14:43 +0000 Subject: [PATCH 2/2] feat: Building https://ghcr.io/startautomating/pipescript ( Fixes #1105, Fixes #1106 ) --- PipeScript.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PipeScript.psd1 b/PipeScript.psd1 index d224ef3a1..d8e838504 100644 --- a/PipeScript.psd1 +++ b/PipeScript.psd1 @@ -10,7 +10,7 @@ CompanyName = 'Start-Automating' Copyright = '2022-2024 Start-Automating' Author = 'James Brundage' - FunctionsToExport = 'Tech.Jekyll','Tech.Hugo','Language.GLSL','Language.XML','Language.Lua','Language.Arduino','Language.LaTeX','Language.Dart','Template.HelloWorld.dart','Language.Cuda','Language.Rust','Language.GCode','Language.WebAssembly','Language.CPlusPlus','Template.HelloWorld.cpp','Template.Include.cpp','Language.JavaScript','Template.HelloWorld.js','Template.Assignment.js','Template.Class.js','Template.DoLoop.js','Template.ForeachArgument.js','Template.ForEachLoop.js','Template.ForLoop.js','Template.Function.js','Template.InvokeMethod.js','Template.RegexLiteral.js','Template.TryCatch.js','Template.WhileLoop.js','Language.Wren','Template.HelloWorld.wren','Language.Liquid','Language.CSS','Language.ATOM','Language.Razor','Language.XSD','Language.JSON','Language.Bicep','Language.XAML','Language.CSharp','Template.Class.cs','Template.HelloWorld.cs','Template.Method.cs','Template.Namespace.cs','Template.Property.cs','Template.TryCatch.cs','Language.SQL','Language.Markdown','Language.Eiffel','Language.BrightScript','Language.FSharp','Language.YAML','Language.Ruby','Template.HelloWorld.rb','Language.ADA','Language.Pug','Language.TCL','Language.RSS','Language.Crystal','Template.HelloWorld.cr','Language.Racket','Language.Go','Template.HelloWorld.go','Language.PHP','Language.HCL','Language.XSL','Language.ObjectiveC','Language.Kotlin','Language.HTML','Template.HelloWorld.html','Template.HTML.CustomElement','Template.HTML.Command.Input','Template.HTML.InputElement','Template.HTML.Parameter.Input','Template.HTML.Element','Template.HTML.Script','Template.HTML.StyleSheet','Template.HTML.Default.Layout','Language.Haxe','Language.C','Template.Include.c','Language.C3','Language.Perl','Language.OpenSCAD','Language.Conf','Language.Batch','Template.Batch.Wrapper','Language.SVG','Language.Scala','Language.Bash','Template.Bash.Wrapper','Language.Docker','Template.Docker.InstallModule','Template.Docker.InstallPackage','Template.Docker.LabelModule','Template.Docker.Add','Template.Docker.Argument','Template.Docker.Command','Template.Docker.CopyItem','Template.Docker.EntryPoint','Template.Docker.Expose','Template.Docker.From','Template.Docker.HealthCheck','Template.Docker.Label','Template.Docker.OnBuild','Template.Docker.Run','Template.Docker.SetLocation','Template.Docker.SetShell','Template.Docker.SetUser','Template.Docker.SetVariable','Template.Docker.StopSignal','Template.Docker.Volume','Language.PipeScript','Template.PipeScript.ExplicitOutput','Template.PipeScript.Inherit','Template.PipeScript.OutputFile','Template.PipeScript.ProxyCommand','Template.PipeScript.Rest','Template.PipeScript.Dot','Template.PipeScript.DoubleDot','Template.PipeScript.DoubleEqualCompare','Template.PipeScript.NamespacedAlias','Template.PipeScript.NamespacedObject','Template.PipeScript.PipedAssignment','Template.PipeScript.SwitchAsIs','Template.PipeScript.TripleEqualCompare','Template.PipeScript.WhereMethod','Language.BASIC','Language.PowerShell','Language.PowerShellData','Language.PowerShellXML','Template.PowerShell.RemoveParameter','Template.PowerShell.RenameVariable','Template.PowerShell.Attribute','Template.PowerShell.Help','Template.PowerShell.Parameter','Language.Vue','Language.Python','Template.HelloWorld.py','Template.Import.py','Template.Assignment.py','Template.DoLoop.py','Template.ForeachArgument.py','Template.UntilLoop.py','Template.WhileLoop.py','Language.Kusto','Language.TOML','Language.Java','Language.TypeScript','Template.HelloWorld.ts','Language.R','Language.HLSL','Get-Transpiler','Start-PSNode','Import-ModuleMember','Export-Json','Import-Json','Out-JSON','Get-Interpreter','Invoke-Interpreter','Serve.Asset','Serve.Command','Serve.Module','Serve.Variable','Aspect.DynamicParameter','Aspect.ModuleExtensionType','Aspect.ModuleExtensionPattern','Aspect.ModuleExtensionCommand','Aspect.GroupObjectByTypeName','Aspect.GroupObjectByType','Route.Uptime','Route.VersionInfo','Protocol.HTTP','Protocol.JSONSchema','Protocol.OpenAPI','Protocol.UDP','PipeScript.Automatic.Variable.IsPipedTo','PipeScript.Automatic.Variable.IsPipedFrom','PipeScript.Automatic.Variable.MyCallstack','PipeScript.Automatic.Variable.MySelf','PipeScript.Automatic.Variable.MyParameters','PipeScript.Automatic.Variable.MyCaller','PipeScript.Automatic.Variable.MyCommandAst','ConvertFrom-CliXml','ConvertTo-CliXml','PipeScript.Optimizer.ConsolidateAspects','Out-HTML','Out-Parser','Parse.CSharp','Parse.PowerShell','Signal.Nothing','Signal.Out','PipeScript.PostProcess.InitializeAutomaticVariables','PipeScript.PostProcess.PartialFunction','Export-Pipescript','Get-PipeScript','Import-PipeScript','Invoke-PipeScript','Join-PipeScript','New-PipeScript','Search-PipeScript','Update-PipeScript','Use-PipeScript','Search-Command','Compile.LanguageDefinition' + FunctionsToExport = 'Language.Razor','Language.Docker','Template.Docker.InstallModule','Template.Docker.InstallPackage','Template.Docker.LabelModule','Template.Docker.Add','Template.Docker.Argument','Template.Docker.Command','Template.Docker.CopyItem','Template.Docker.EntryPoint','Template.Docker.Expose','Template.Docker.From','Template.Docker.HealthCheck','Template.Docker.Label','Template.Docker.OnBuild','Template.Docker.Run','Template.Docker.SetLocation','Template.Docker.SetShell','Template.Docker.SetUser','Template.Docker.SetVariable','Template.Docker.StopSignal','Template.Docker.Volume','Language.JavaScript','Template.HelloWorld.js','Template.Assignment.js','Template.Class.js','Template.DoLoop.js','Template.ForeachArgument.js','Template.ForEachLoop.js','Template.ForLoop.js','Template.Function.js','Template.InvokeMethod.js','Template.RegexLiteral.js','Template.TryCatch.js','Template.WhileLoop.js','Language.RSS','Language.ADA','Language.Scala','Language.Arduino','Language.FSharp','Language.CPlusPlus','Template.HelloWorld.cpp','Template.Include.cpp','Language.XSD','Language.Pug','Language.XML','Language.Rust','Language.BASIC','Language.Liquid','Language.Kotlin','Language.OpenSCAD','Language.ObjectiveC','Language.Kusto','Language.XSL','Language.BrightScript','Language.Ruby','Template.HelloWorld.rb','Language.PowerShell','Language.PowerShellData','Language.PowerShellXML','Template.PowerShell.RemoveParameter','Template.PowerShell.RenameVariable','Template.PowerShell.Attribute','Template.PowerShell.Help','Template.PowerShell.Parameter','Language.Batch','Template.Batch.Wrapper','Language.SQL','Language.XAML','Language.LaTeX','Language.Perl','Language.HLSL','Language.TypeScript','Template.HelloWorld.ts','Language.PipeScript','Template.PipeScript.ExplicitOutput','Template.PipeScript.Inherit','Template.PipeScript.OutputFile','Template.PipeScript.ProxyCommand','Template.PipeScript.Rest','Template.PipeScript.Dot','Template.PipeScript.DoubleDot','Template.PipeScript.DoubleEqualCompare','Template.PipeScript.NamespacedAlias','Template.PipeScript.NamespacedObject','Template.PipeScript.PipedAssignment','Template.PipeScript.SwitchAsIs','Template.PipeScript.TripleEqualCompare','Template.PipeScript.WhereMethod','Language.Haxe','Language.TOML','Language.Dart','Template.HelloWorld.dart','Language.GLSL','Language.Racket','Language.Crystal','Template.HelloWorld.cr','Language.SVG','Language.Eiffel','Language.PHP','Language.Markdown','Language.Go','Template.HelloWorld.go','Language.HTML','Template.HelloWorld.html','Template.HTML.Command.Input','Template.HTML.InputElement','Template.HTML.Parameter.Input','Template.HTML.Element','Template.HTML.Script','Template.HTML.StyleSheet','Template.HTML.Default.Layout','Template.HTML.CustomElement','Language.Cuda','Language.WebAssembly','Language.Wren','Template.HelloWorld.wren','Language.Vue','Language.YAML','Language.Conf','Language.R','Language.Lua','Language.Bicep','Language.TCL','Language.C3','Language.ATOM','Language.Java','Language.HCL','Language.CSharp','Template.Class.cs','Template.HelloWorld.cs','Template.Method.cs','Template.Namespace.cs','Template.Property.cs','Template.TryCatch.cs','Language.GCode','Language.Python','Template.HelloWorld.py','Template.Import.py','Template.Assignment.py','Template.DoLoop.py','Template.ForeachArgument.py','Template.UntilLoop.py','Template.WhileLoop.py','Language.C','Template.Include.c','Language.CSS','Language.JSON','Language.Bash','Template.Bash.Wrapper','Get-Transpiler','Start-PSNode','Compile.LanguageDefinition','ConvertFrom-CliXml','ConvertTo-CliXml','Route.Uptime','Route.VersionInfo','Signal.Nothing','Signal.Out','PipeScript.Optimizer.ConsolidateAspects','Get-Interpreter','Invoke-Interpreter','Search-Command','Import-ModuleMember','Serve.Asset','Serve.Command','Serve.Module','Serve.Variable','Export-Pipescript','Get-PipeScript','Import-PipeScript','Invoke-PipeScript','Join-PipeScript','New-PipeScript','Search-PipeScript','Update-PipeScript','Use-PipeScript','PipeScript.PostProcess.InitializeAutomaticVariables','PipeScript.PostProcess.PartialFunction','Aspect.DynamicParameter','Aspect.ModuleExtensionType','Aspect.ModuleExtensionPattern','Aspect.ModuleExtensionCommand','Aspect.GroupObjectByTypeName','Aspect.GroupObjectByType','Out-Parser','Parse.CSharp','Parse.PowerShell','Out-HTML','Protocol.HTTP','Protocol.JSONSchema','Protocol.OpenAPI','Protocol.UDP','PipeScript.Automatic.Variable.IsPipedTo','PipeScript.Automatic.Variable.IsPipedFrom','PipeScript.Automatic.Variable.MyCallstack','PipeScript.Automatic.Variable.MySelf','PipeScript.Automatic.Variable.MyParameters','PipeScript.Automatic.Variable.MyCaller','PipeScript.Automatic.Variable.MyCommandAst','Export-Json','Import-Json','Out-JSON','Tech.Hugo','Tech.Jekyll' PrivateData = @{ FunctionTypes = @{ 'Partial' = @{