Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

Commit

Permalink
!deploy v2.3.2 to resolve #29
Browse files Browse the repository at this point in the history
  • Loading branch information
scrthq committed Jul 22, 2018
1 parent a2b9815 commit 31190ce
Show file tree
Hide file tree
Showing 575 changed files with 3,203 additions and 575 deletions.
26 changes: 25 additions & 1 deletion VaporShell/Private/Convert-SpecToFunction.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,31 @@ function $FunctionName {
}
Process {
foreach (`$key in `$PSBoundParameters.Keys | Where-Object {`$commonParams -notcontains `$_}) {
`$obj | Add-Member -MemberType NoteProperty -Name `$key -Value `$PSBoundParameters.`$key
switch (`$key) {
"@
foreach ($Prop in $Properties | Where-Object {$_.Value.PrimitiveType -eq "Json"}) {
$scriptContents += @"
$($Prop.Name) {
if ((`$PSBoundParameters[`$key]).PSObject.TypeNames -contains "System.String"){
try {
`$JSONObject = (ConvertFrom-Json -InputObject `$PSBoundParameters[`$key] -ErrorAction Stop)
}
catch {
`$PSCmdlet.ThrowTerminatingError((New-VSError -String "Unable to convert parameter '`$key' string value to PSObject! Please use a JSON string OR provide a Hashtable or PSCustomObject instead!"))
}
}
else {
`$JSONObject = ([PSCustomObject]`$PSBoundParameters[`$key])
}
`$obj | Add-Member -MemberType NoteProperty -Name `$key -Value `$JSONObject
}
"@
}
$scriptContents += @"
Default {
`$obj | Add-Member -MemberType NoteProperty -Name `$key -Value `$PSBoundParameters.`$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
Expand Down
Loading

0 comments on commit 31190ce

Please sign in to comment.