diff --git a/.claude/skills/skd-compile/scripts/skd-compile.ps1 b/.claude/skills/skd-compile/scripts/skd-compile.ps1
index f10a2076..9f8e98b1 100644
--- a/.claude/skills/skd-compile/scripts/skd-compile.ps1
+++ b/.claude/skills/skd-compile/scripts/skd-compile.ps1
@@ -1,4 +1,4 @@
-# skd-compile v1.64 — Compile 1C DCS from JSON
+# skd-compile v1.65 — Compile 1C DCS from JSON
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[string]$DefinitionFile,
@@ -2549,12 +2549,28 @@ function Emit-UserFields {
}
if ($uType -eq "UserFieldExpression") {
if ($uf.detail) {
- if ($uf.detail.expression) { X "$indent`t`t$(Esc-Xml "$($uf.detail.expression)")" }
- if ($uf.detail.presentation) { X "$indent`t`t$(Esc-Xml "$($uf.detail.presentation)")" }
+ if ($uf.detail.PSObject.Properties.Match('expression').Count -gt 0) {
+ $_v = "$($uf.detail.expression)"
+ if ($_v) { X "$indent`t`t$(Esc-Xml $_v)" }
+ else { X "$indent`t`t" }
+ }
+ if ($uf.detail.PSObject.Properties.Match('presentation').Count -gt 0) {
+ $_v = "$($uf.detail.presentation)"
+ if ($_v) { X "$indent`t`t$(Esc-Xml $_v)" }
+ else { X "$indent`t`t" }
+ }
}
if ($uf.total) {
- if ($uf.total.expression) { X "$indent`t`t$(Esc-Xml "$($uf.total.expression)")" }
- if ($uf.total.presentation) { X "$indent`t`t$(Esc-Xml "$($uf.total.presentation)")" }
+ if ($uf.total.PSObject.Properties.Match('expression').Count -gt 0) {
+ $_v = "$($uf.total.expression)"
+ if ($_v) { X "$indent`t`t$(Esc-Xml $_v)" }
+ else { X "$indent`t`t" }
+ }
+ if ($uf.total.PSObject.Properties.Match('presentation').Count -gt 0) {
+ $_v = "$($uf.total.presentation)"
+ if ($_v) { X "$indent`t`t$(Esc-Xml $_v)" }
+ else { X "$indent`t`t" }
+ }
}
} else {
# UserFieldCase
diff --git a/.claude/skills/skd-compile/scripts/skd-compile.py b/.claude/skills/skd-compile/scripts/skd-compile.py
index fc3b57f5..cc3c58e0 100644
--- a/.claude/skills/skd-compile/scripts/skd-compile.py
+++ b/.claude/skills/skd-compile/scripts/skd-compile.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# skd-compile v1.64 — Compile 1C DCS from JSON
+# skd-compile v1.65 — Compile 1C DCS from JSON
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
import json
@@ -2106,16 +2106,22 @@ def emit_user_fields(lines, items, indent):
if uf.get('title'):
emit_mltext(lines, f'{indent}\t\t', 'dcsset:lwsTitle', uf['title'], no_xsi_type=True)
if u_type == 'UserFieldExpression':
- d = uf.get('detail') or {}
- if d.get('expression'):
- lines.append(f'{indent}\t\t{esc_xml(str(d["expression"]))}')
- if d.get('presentation'):
- lines.append(f'{indent}\t\t{esc_xml(str(d["presentation"]))}')
- t = uf.get('total') or {}
- if t.get('expression'):
- lines.append(f'{indent}\t\t{esc_xml(str(t["expression"]))}')
- if t.get('presentation'):
- lines.append(f'{indent}\t\t{esc_xml(str(t["presentation"]))}')
+ d = uf.get('detail')
+ if d is not None:
+ if 'expression' in d:
+ v = str(d['expression'])
+ lines.append(f'{indent}\t\t{esc_xml(v)}' if v else f'{indent}\t\t')
+ if 'presentation' in d:
+ v = str(d['presentation'])
+ lines.append(f'{indent}\t\t{esc_xml(v)}' if v else f'{indent}\t\t')
+ t = uf.get('total')
+ if t is not None:
+ if 'expression' in t:
+ v = str(t['expression'])
+ lines.append(f'{indent}\t\t{esc_xml(v)}' if v else f'{indent}\t\t')
+ if 'presentation' in t:
+ v = str(t['presentation'])
+ lines.append(f'{indent}\t\t{esc_xml(v)}' if v else f'{indent}\t\t')
else:
cases = uf.get('cases') or []
if len(cases) == 0:
diff --git a/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 b/.claude/skills/skd-decompile/scripts/skd-decompile.ps1
index 585e9bac..0a3fc80a 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.48 — Decompile 1C DCS Template.xml to JSON DSL (draft)
+# skd-decompile v0.49 — Decompile 1C DCS Template.xml to JSON DSL (draft)
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[Parameter(Mandatory)]
@@ -2292,20 +2292,20 @@ foreach ($sv in $svNodes) {
$titleV = Get-MLText $titleN
if ($titleV) { $entry['title'] = $titleV }
if ($uxt -eq 'UserFieldExpression') {
- $dEx = Get-Text $ufItem "dcsset:detailExpression"
- $dEp = Get-Text $ufItem "dcsset:detailExpressionPresentation"
- $tEx = Get-Text $ufItem "dcsset:totalExpression"
- $tEp = Get-Text $ufItem "dcsset:totalExpressionPresentation"
- if ($dEx -or $dEp) {
+ $dExN = $ufItem.SelectSingleNode("dcsset:detailExpression", $ns)
+ $dEpN = $ufItem.SelectSingleNode("dcsset:detailExpressionPresentation", $ns)
+ $tExN = $ufItem.SelectSingleNode("dcsset:totalExpression", $ns)
+ $tEpN = $ufItem.SelectSingleNode("dcsset:totalExpressionPresentation", $ns)
+ if ($dExN -or $dEpN) {
$d = [ordered]@{}
- if ($dEx) { $d['expression'] = $dEx }
- if ($dEp) { $d['presentation'] = $dEp }
+ if ($dExN) { $d['expression'] = $dExN.InnerText }
+ if ($dEpN) { $d['presentation'] = $dEpN.InnerText }
$entry['detail'] = $d
}
- if ($tEx -or $tEp) {
+ if ($tExN -or $tEpN) {
$t = [ordered]@{}
- if ($tEx) { $t['expression'] = $tEx }
- if ($tEp) { $t['presentation'] = $tEp }
+ if ($tExN) { $t['expression'] = $tExN.InnerText }
+ if ($tEpN) { $t['presentation'] = $tEpN.InnerText }
$entry['total'] = $t
}
} elseif ($uxt -eq 'UserFieldCase') {