From ae98ffea7930ea8597a9aa6bcb37b490c321dbb4 Mon Sep 17 00:00:00 2001 From: Pier Paolo MAMMI Date: Mon, 24 Aug 2026 11:05:21 +0200 Subject: [PATCH] fix debugging in vscode --- .../Invoke-ElixFormsSchemaBulkUpdate.ps1 | 11 +++- .vscode/launch.json | 26 +++++--- ...orms-schema-616-search-20260824103622.json | 59 +++++++++++++++++++ 3 files changed, 86 insertions(+), 10 deletions(-) create mode 100644 backups/elixforms-schema-616-search-20260824103622.json diff --git a/.agents/skills/elixforms-schema-bulk-updater/scripts/Invoke-ElixFormsSchemaBulkUpdate.ps1 b/.agents/skills/elixforms-schema-bulk-updater/scripts/Invoke-ElixFormsSchemaBulkUpdate.ps1 index 7f3534b..d42d5cc 100644 --- a/.agents/skills/elixforms-schema-bulk-updater/scripts/Invoke-ElixFormsSchemaBulkUpdate.ps1 +++ b/.agents/skills/elixforms-schema-bulk-updater/scripts/Invoke-ElixFormsSchemaBulkUpdate.ps1 @@ -15,6 +15,10 @@ Directory for pre-write search-response backups. .PARAMETER PageSize Number of rows requested per search page. All reported pages are retrieved. + +.PARAMETER RunWhenDotSourced +Runs the interactive workflow even when the script is dot-sourced. Intended for +debuggers such as the VS Code PowerShell debugger that dot-source launch scripts. #> [CmdletBinding()] param( @@ -28,7 +32,10 @@ param( [Parameter()] [ValidateRange(1, 1000)] - [int] $PageSize = 80 + [int] $PageSize = 80, + + [Parameter()] + [switch] $RunWhenDotSourced ) Set-StrictMode -Version Latest @@ -681,6 +688,6 @@ function Invoke-ElixFormsMetadataBulkUpdate { } } -if ($MyInvocation.InvocationName -ne '.') { +if ($MyInvocation.InvocationName -ne '.' -or $RunWhenDotSourced) { Invoke-ElixFormsMetadataBulkUpdate -BaseUri $BaseUri -BackupDirectory $BackupDirectory -PageSize $PageSize } diff --git a/.vscode/launch.json b/.vscode/launch.json index 0db65ac..4b0376e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,12 +4,22 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - { - "name": "PowerShell: Launch Current File", - "type": "PowerShell", - "request": "launch", - "script": "${file}", - "args": [] - } + { + "name": "PowerShell: Launch Current File", + "type": "PowerShell", + "request": "launch", + "script": "${file}", + "args": [] + }, + { + "name": "PowerShell: Debug ElixForms Schema Bulk Update", + "type": "PowerShell", + "request": "launch", + "script": "${workspaceFolder}/.agents/skills/elixforms-schema-bulk-updater/scripts/Invoke-ElixFormsSchemaBulkUpdate.ps1", + "args": [ + "-RunWhenDotSourced" + ], + "cwd": "${workspaceFolder}" + } ] -} \ No newline at end of file +} diff --git a/backups/elixforms-schema-616-search-20260824103622.json b/backups/elixforms-schema-616-search-20260824103622.json new file mode 100644 index 0000000..2d4c01e --- /dev/null +++ b/backups/elixforms-schema-616-search-20260824103622.json @@ -0,0 +1,59 @@ +{ + "backedUpAt": "2026-08-24T10:36:22.7629037+02:00", + "baseUri": "https://console-unipr.elixforms.it/AJSRV/metadata", + "schemaId": 616, + "pageSize": 80, + "filters": { + "COL0010": "azione_form_AUTOR_firmaAutorizzazione" + }, + "pages": [ + { + "totalRecords": 1, + "pageSize": 80, + "numPages": 1, + "currentPage": 1, + "columns": [ + { + "key": "ID_OBJECT", + "value": "ID_OBJECT" + }, + { + "key": "S_616_ID_GENERICSCHEMA", + "value": "S_616_ID_GENERICSCHEMA" + }, + { + "key": "S_616_COL0014", + "value": "Titolo template" + }, + { + "key": "S_616_COL0010", + "value": "Tag azione" + }, + { + "key": "S_616_COL0011", + "value": "Tag procedimento" + }, + { + "key": "S_616_COL0009", + "value": "Template" + }, + { + "key": "S_616_COL0012", + "value": "Tag modulo" + } + ], + "data": [ + [ + "35274", + "168008", + "Autorizzazione sottodominio", + "azione_form_AUTOR_firmaAutorizzazione", + "gestione_siti_web_nuovo_wf", + "Template autorizzazione sottodominio", + "RequestForm_GESTIONE_SITI_WEB_NUOVO" + ] + ], + "extraData": {} + } + ] +} \ No newline at end of file