From 4d557a7e96391a6fb118824b039b232358353755 Mon Sep 17 00:00:00 2001 From: Jacob Ernst <157037942+AT-jernst@users.noreply.github.com> Date: Thu, 18 Jan 2024 12:12:53 -0500 Subject: [PATCH 1/3] Update Helper to support comments Update Helper to support comments --- src/Helper.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Helper.ps1 b/src/Helper.ps1 index f5034e5..6a7419d 100644 --- a/src/Helper.ps1 +++ b/src/Helper.ps1 @@ -37,6 +37,13 @@ Function Get-Action { } $type = $action.type + + $Description = if ($action | Get-Member -MemberType Noteproperty -Name 'Description') { + $action.Description + } + else{ + $null + } # new ChildActions code $childActions = if (($action | Get-Member -MemberType Noteproperty -Name 'Actions') -and ($action.Actions.PSObject.Properties | measure-object).count -gt 0) { $action.Actions.PSObject.Properties.Name } else { $null } @@ -48,6 +55,7 @@ Function Get-Action { Type = $type Parent = $Parent ChildActions = $childActions + Comment = $description Inputs = if ($inputs) { Format-HTMLInputContent -Inputs $(Remove-Secrets -Inputs $($inputs | ConvertTo-Json -Depth 10 -Compress)) } @@ -254,4 +262,4 @@ Function Format-HTMLInputContent { else { $Inputs } -} \ No newline at end of file +} From 46b32eb78799de25d4a9b36131c9ceeb73035e1a Mon Sep 17 00:00:00 2001 From: Jacob Ernst <157037942+AT-jernst@users.noreply.github.com> Date: Thu, 18 Jan 2024 12:13:20 -0500 Subject: [PATCH 2/3] Update LogicApp.Doc to support comments Update LogicApp.Doc to support comments --- src/LogicApp.Doc.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LogicApp.Doc.ps1 b/src/LogicApp.Doc.ps1 index eb42fc3..77f464d 100644 --- a/src/LogicApp.Doc.ps1 +++ b/src/LogicApp.Doc.ps1 @@ -34,8 +34,8 @@ $($InputObject.diagram) Section 'Actions' { $($InputObject.actions) | Sort-Object -Property Order | - Select-Object -Property 'ActionName', 'Type', 'RunAfter', @{Name = 'Inputs'; Expression = { Format-MarkdownTableJson -Json $($_.Inputs | ConvertFrom-Json | ConvertTo-Json -Depth 10) } } | - Table -Property 'ActionName', 'Type', 'RunAfter', 'Inputs' + Select-Object -Property 'ActionName', 'Comment', 'Type', 'RunAfter', @{Name = 'Inputs'; Expression = { Format-MarkdownTableJson -Json $($_.Inputs | ConvertFrom-Json | ConvertTo-Json -Depth 10) } } | + Table -Property 'ActionName', 'Comment', 'Type', 'RunAfter', 'Inputs' } } @@ -50,4 +50,4 @@ $($InputObject.diagram) } } } -} \ No newline at end of file +} From ddc448dc6d9c9658a805d31deacd7a47fe6d3759 Mon Sep 17 00:00:00 2001 From: Jacob Ernst <157037942+AT-jernst@users.noreply.github.com> Date: Thu, 18 Jan 2024 12:18:14 -0500 Subject: [PATCH 3/3] Update Helper.ps1 to fix spacing Update Helper.ps1 to fix spacing --- src/Helper.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Helper.ps1 b/src/Helper.ps1 index 6a7419d..e3c7a73 100644 --- a/src/Helper.ps1 +++ b/src/Helper.ps1 @@ -55,7 +55,7 @@ Function Get-Action { Type = $type Parent = $Parent ChildActions = $childActions - Comment = $description + Comment = $description Inputs = if ($inputs) { Format-HTMLInputContent -Inputs $(Remove-Secrets -Inputs $($inputs | ConvertTo-Json -Depth 10 -Compress)) }