From a417b76e2c70c9aa65557f58983dcae9b5e144b4 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sat, 23 May 2026 16:41:38 +0300 Subject: [PATCH] =?UTF-8?q?feat(skd-decompile):=20StandardPeriod=20Custom?= =?UTF-8?q?=20+=20use=3Dfalse=20=D0=BD=D0=B0=20dataParameters=20items?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build-DataParameters раньше пропускал variant=Custom в шорткоде, теряя как сам StandardPeriod-маркер, так и use=false (читался из dcsset:use вместо правильного dcscor:use). Теперь Custom попадает в shorthand как "=Custom", compile воспроизводит StandardPeriod tag + boilerplate dates корректно. sample30: −166 строк (3036 → 2870). --- .claude/skills/skd-decompile/scripts/skd-decompile.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 b/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 index 9d4d1ea0..fc177afe 100644 --- a/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 +++ b/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 @@ -1,4 +1,4 @@ -# skd-decompile v0.52 — Decompile 1C DCS Template.xml to JSON DSL (draft) +# skd-decompile v0.53 — Decompile 1C DCS Template.xml to JSON DSL (draft) # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -1742,7 +1742,9 @@ function Build-DataParameters { if (-not $usid) { $canAuto = $false } # Compare value to top-level param value $valNode = $it.SelectSingleNode("dcscor:value", $ns) - $use = Get-Text $it "dcsset:use" + # use на dataParameter item — это (не dcsset) + $use = Get-Text $it "dcscor:use" + if ($use -eq 'false') { $canAuto = $false } $tp = $visibleTop[$pn] $flags = @() if ($usid) { $flags += '@user' } @@ -1751,7 +1753,7 @@ function Build-DataParameters { $vDisplay = $null if ($vt -eq 'StandardPeriod') { $variant = Get-Text $valNode "v8:variant" - if ($variant -and $variant -ne 'Custom') { $vDisplay = $variant } + if ($variant) { $vDisplay = $variant } } elseif ($vt -eq 'DesignTimeValue') { $vDisplay = $valNode.InnerText } elseif ($vt -eq 'LocalStringType') {