diff --git a/.claude/skills/cfe-init/scripts/cfe-init.ps1 b/.claude/skills/cfe-init/scripts/cfe-init.ps1 index d8790ecd..07fc791a 100644 --- a/.claude/skills/cfe-init/scripts/cfe-init.ps1 +++ b/.claude/skills/cfe-init/scripts/cfe-init.ps1 @@ -1,4 +1,4 @@ -# cfe-init v1.4 — Create 1C configuration extension scaffold (CFE) +# cfe-init v1.5 — Create 1C configuration extension scaffold (CFE) # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -147,10 +147,14 @@ if (-not $NoRole) { } $childObjectsXml += "`r`n`t`t" +# Объявления пространств имён — одной переменной: места эмиссии её только интерполируют. +# Правки шапки (как xmlns:pal в формате 2.21) делаются здесь, в одном месте. +$xmlnsDecl = 'xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' + # --- Configuration.xml --- $cfgXml = @" - + @@ -215,7 +219,7 @@ $cfgXml = @" # --- Languages/Русский.xml (adopted format) --- $langXml = @" - + @@ -232,7 +236,7 @@ $langXml = @" # --- Role XML --- $roleXml = @" - + $([System.Security.SecurityElement]::Escape($roleName)) diff --git a/.claude/skills/cfe-init/scripts/cfe-init.py b/.claude/skills/cfe-init/scripts/cfe-init.py index 8fde8d35..cb4252c3 100644 --- a/.claude/skills/cfe-init/scripts/cfe-init.py +++ b/.claude/skills/cfe-init/scripts/cfe-init.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# cfe-init v1.4 — Create 1C configuration extension scaffold (CFE) +# cfe-init v1.5 — Create 1C configuration extension scaffold (CFE) # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills """Generates minimal XML source files for a 1C configuration extension.""" import sys, os, argparse, uuid @@ -171,6 +171,28 @@ def main(): ] contained_objects = "" + + # Объявления пространств имён — одной переменной: места эмиссии её только подставляют. + # Правки шапки (как xmlns:pal в формате 2.21) делаются здесь, в одном месте. + xmlns_decl = ( + 'xmlns="http://v8.1c.ru/8.3/MDClasses"' + ' xmlns:app="http://v8.1c.ru/8.2/managed-application/core"' + ' xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config"' + ' xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi"' + ' xmlns:ent="http://v8.1c.ru/8.1/data/enterprise"' + ' xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform"' + ' xmlns:style="http://v8.1c.ru/8.1/data/ui/style"' + ' xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system"' + ' xmlns:v8="http://v8.1c.ru/8.1/data/core"' + ' xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"' + ' xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web"' + ' xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows"' + ' xmlns:xen="http://v8.1c.ru/8.3/xcf/enums"' + ' xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef"' + ' xmlns:xr="http://v8.1c.ru/8.3/xcf/readable"' + ' xmlns:xs="http://www.w3.org/2001/XMLSchema"' + ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' + ) for i in range(7): contained_objects += f"""\t\t\t \t\t\t\t{class_ids[i]} @@ -178,7 +200,7 @@ def main(): \t\t\t\n""" cfg_xml = f''' - + \t \t\t {contained_objects}\t\t @@ -213,7 +235,7 @@ def main(): # --- Languages/Русский.xml (adopted format) --- lang_xml = f''' - + \t \t\t \t\t @@ -228,7 +250,7 @@ def main(): # --- Role XML --- role_xml = f''' - + \t \t\t \t\t\t{esc_xml(role_name)} diff --git a/.claude/skills/form-add/scripts/form-add.ps1 b/.claude/skills/form-add/scripts/form-add.ps1 index 3e9d4be6..f720d744 100644 --- a/.claude/skills/form-add/scripts/form-add.ps1 +++ b/.claude/skills/form-add/scripts/form-add.ps1 @@ -1,4 +1,4 @@ -# form-add v1.19 — Add managed form to 1C config object +# form-add v1.20 — Add managed form to 1C config object # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -192,6 +192,11 @@ $objectXmlFull = Resolve-Path $ObjectPath Assert-EditAllowed $objectXmlFull.Path 'editable' $script:formatVersion = Detect-FormatVersion (Split-Path $objectXmlFull.Path -Parent) +# Объявления пространств имён — одной переменной на корень: места эмиссии их только +# интерполируют. Правки шапки (как xmlns:pal в формате 2.21) делаются здесь, в одном месте. +$script:xmlnsDecl = 'xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +$script:formNsDecl = 'xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' + $xmlDoc = New-Object System.Xml.XmlDocument $xmlDoc.PreserveWhitespace = $true $xmlDoc.Load($objectXmlFull.Path) @@ -315,7 +320,7 @@ if ($objectType -in $processorLikeTypes) { $formMetaXml = @" - +
$FormName @@ -354,8 +359,6 @@ Write-XmlFile $formMetaPath $formMetaXml $encBom $formXmlPath = Join-Path $formExtDir "Form.xml" -$formNsDecl = 'xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' - if ($Purpose -eq "List" -or $Purpose -eq "Choice") { # Динамический список # MainTable: тип.имя @@ -363,7 +366,7 @@ if ($Purpose -eq "List" -or $Purpose -eq "Choice") { $formXml = @" - + true @@ -388,7 +391,7 @@ if ($Purpose -eq "List" -or $Purpose -eq "Choice") { $formXml = @" - + true @@ -435,7 +438,7 @@ if ($Purpose -eq "List" -or $Purpose -eq "Choice") { $formXml = @" - + true diff --git a/.claude/skills/form-add/scripts/form-add.py b/.claude/skills/form-add/scripts/form-add.py index 94a7f603..f676bbe8 100644 --- a/.claude/skills/form-add/scripts/form-add.py +++ b/.claude/skills/form-add/scripts/form-add.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# form-add v1.19 — Add managed form to 1C config object +# form-add v1.20 — Add managed form to 1C config object # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -316,6 +316,46 @@ def main(): assert_edit_allowed(object_xml_full, "editable") format_version = detect_format_version(os.path.dirname(object_xml_full)) + # Объявления пространств имён — одной переменной на корень: места эмиссии их только + # подставляют. Правки шапки (как xmlns:pal в формате 2.21) делаются здесь, в одном месте. + xmlns_decl = ( + 'xmlns="http://v8.1c.ru/8.3/MDClasses"' + ' xmlns:app="http://v8.1c.ru/8.2/managed-application/core"' + ' xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config"' + ' xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi"' + ' xmlns:ent="http://v8.1c.ru/8.1/data/enterprise"' + ' xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform"' + ' xmlns:style="http://v8.1c.ru/8.1/data/ui/style"' + ' xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system"' + ' xmlns:v8="http://v8.1c.ru/8.1/data/core"' + ' xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"' + ' xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web"' + ' xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows"' + ' xmlns:xen="http://v8.1c.ru/8.3/xcf/enums"' + ' xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef"' + ' xmlns:xr="http://v8.1c.ru/8.3/xcf/readable"' + ' xmlns:xs="http://www.w3.org/2001/XMLSchema"' + ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' + ) + form_ns_decl = ( + 'xmlns="http://v8.1c.ru/8.3/xcf/logform"' + ' xmlns:app="http://v8.1c.ru/8.2/managed-application/core"' + ' xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config"' + ' xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"' + ' xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"' + ' xmlns:ent="http://v8.1c.ru/8.1/data/enterprise"' + ' xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform"' + ' xmlns:style="http://v8.1c.ru/8.1/data/ui/style"' + ' xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system"' + ' xmlns:v8="http://v8.1c.ru/8.1/data/core"' + ' xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"' + ' xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web"' + ' xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows"' + ' xmlns:xr="http://v8.1c.ru/8.3/xcf/readable"' + ' xmlns:xs="http://www.w3.org/2001/XMLSchema"' + ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' + ) + parser_xml = etree.XMLParser(remove_blank_text=False) tree = etree.parse(object_xml_full, parser_xml) root = tree.getroot() @@ -403,24 +443,7 @@ def main(): form_meta_xml = ( '\n' - '\n' + f'\n' f'\t\n' '\t\t\n' f'\t\t\t{form_name}\n' @@ -449,25 +472,6 @@ def main(): form_xml_path = os.path.join(form_ext_dir, "Form.xml") - form_ns_decl = ( - 'xmlns="http://v8.1c.ru/8.3/xcf/logform"' - ' xmlns:app="http://v8.1c.ru/8.2/managed-application/core"' - ' xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config"' - ' xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"' - ' xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"' - ' xmlns:ent="http://v8.1c.ru/8.1/data/enterprise"' - ' xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform"' - ' xmlns:style="http://v8.1c.ru/8.1/data/ui/style"' - ' xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system"' - ' xmlns:v8="http://v8.1c.ru/8.1/data/core"' - ' xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"' - ' xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web"' - ' xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows"' - ' xmlns:xr="http://v8.1c.ru/8.3/xcf/readable"' - ' xmlns:xs="http://www.w3.org/2001/XMLSchema"' - ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' - ) - if purpose in ("List", "Choice"): # Dynamic list main_table = f"{object_type}.{object_name}" diff --git a/.claude/skills/form-compile/scripts/form-compile.ps1 b/.claude/skills/form-compile/scripts/form-compile.ps1 index 7033e8c5..5d027b69 100644 --- a/.claude/skills/form-compile/scripts/form-compile.ps1 +++ b/.claude/skills/form-compile/scripts/form-compile.ps1 @@ -1,4 +1,4 @@ -# form-compile v1.182 — Compile 1C managed form from JSON or object metadata +# form-compile v1.183 — Compile 1C managed form from JSON or object metadata # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$JsonPath, @@ -1485,6 +1485,10 @@ $script:outPathResolved = if ([System.IO.Path]::IsPathRooted($OutputPath)) { $Ou Assert-EditAllowed $script:outPathResolved 'editable' $script:formatVersion = Detect-FormatVersion ([System.IO.Path]::GetDirectoryName($script:outPathResolved)) +# Объявления пространств имён — одной переменной: место эмиссии её только интерполирует. +# Правки шапки (как xmlns:pal в формате 2.21) делаются здесь, в одном месте. +$script:formNsDecl = 'xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcssch="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' + # --- 0. Path normalization and mode dispatch --- # Form name → purpose mapping @@ -6463,25 +6467,14 @@ function Compute-MainAcbAutofill { # --- 12. Main compilation --- -# Title -if ($def.title) { - Emit-MLText -tag "Title" -text $def.title -indent "`t" -} - -# Header -X '' -X "" - -# Oops — Title was emitted before header. Need to fix the order. -# Actually, let me restructure: build the body into a separate buffer, then assemble - -# Reset and rebuild properly +# Буфер и счётчики — с чистого листа: до этой точки они могли быть тронуты режимом from-object. $script:xml = New-Object System.Text.StringBuilder 8192 $script:nextId = 1 $script:seenElementNames = @{} # пул имён элементов (глобально по всей форме) +# Header X '' -X "" +X "" # 12a. Title (from def.title or properties.title — must be multilingual XML) $formTitle = $def.title diff --git a/.claude/skills/form-compile/scripts/form-compile.py b/.claude/skills/form-compile/scripts/form-compile.py index 7d36b0cb..5d29cf78 100644 --- a/.claude/skills/form-compile/scripts/form-compile.py +++ b/.claude/skills/form-compile/scripts/form-compile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# form-compile v1.182 — Compile 1C managed form from JSON or object metadata +# form-compile v1.183 — Compile 1C managed form from JSON or object metadata # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import copy @@ -6214,6 +6214,28 @@ def main(): assert_edit_allowed(out_path_resolved, "editable") format_version = detect_format_version(os.path.dirname(out_path_resolved)) + # Объявления пространств имён — одной переменной: место эмиссии её только подставляет. + # Правки шапки (как xmlns:pal в формате 2.21) делаются здесь, в одном месте. + form_ns_decl = ( + 'xmlns="http://v8.1c.ru/8.3/xcf/logform"' + ' xmlns:app="http://v8.1c.ru/8.2/managed-application/core"' + ' xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config"' + ' xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"' + ' xmlns:dcssch="http://v8.1c.ru/8.1/data-composition-system/schema"' + ' xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"' + ' xmlns:ent="http://v8.1c.ru/8.1/data/enterprise"' + ' xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform"' + ' xmlns:style="http://v8.1c.ru/8.1/data/ui/style"' + ' xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system"' + ' xmlns:v8="http://v8.1c.ru/8.1/data/core"' + ' xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"' + ' xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web"' + ' xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows"' + ' xmlns:xr="http://v8.1c.ru/8.3/xcf/readable"' + ' xmlns:xs="http://www.w3.org/2001/XMLSchema"' + ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' + ) + # --- 0. From-object mode --- if args.FromObject: # Resolve object path and purpose from OutputPath convention: @@ -6464,7 +6486,7 @@ def main(): lines = [] lines.append('') - lines.append(f'') + lines.append(f'') # Title form_title = defn.get('title') diff --git a/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 b/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 index b59192e5..3b6746ec 100644 --- a/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 +++ b/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 @@ -1,4 +1,4 @@ -# subsystem-compile v1.17 — Create 1C subsystem from JSON definition +# subsystem-compile v1.18 — Create 1C subsystem from JSON definition # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$DefinitionFile, @@ -224,7 +224,7 @@ function Write-ChildSubsystemStub([string]$childPath, [string]$childName, [strin $childUuid = New-Guid-String $sb = New-Object System.Text.StringBuilder 2048 [void]$sb.AppendLine('') - [void]$sb.AppendLine("") + [void]$sb.AppendLine("") [void]$sb.AppendLine("`t") [void]$sb.AppendLine("`t`t") [void]$sb.AppendLine("`t`t`t$(Esc-Xml $childName)") @@ -447,12 +447,16 @@ function Detect-FormatVersion([string]$dir) { $formatVersion = Detect-FormatVersion $OutputDir +# Объявления пространств имён — одной переменной: места эмиссии её только интерполируют. +# Правки шапки (как xmlns:pal в формате 2.21) делаются здесь, в одном месте. +$script:xmlnsDecl = 'xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' + # --- 4. Build XML --- $uuid = New-Guid-String $indent = "`t`t`t" X '' -X "" +X "" X "`t" X "`t`t" diff --git a/.claude/skills/subsystem-compile/scripts/subsystem-compile.py b/.claude/skills/subsystem-compile/scripts/subsystem-compile.py index 59c1ea48..5dcf1432 100644 --- a/.claude/skills/subsystem-compile/scripts/subsystem-compile.py +++ b/.claude/skills/subsystem-compile/scripts/subsystem-compile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# subsystem-compile v1.17 — Create 1C subsystem from JSON definition +# subsystem-compile v1.18 — Create 1C subsystem from JSON definition # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import json @@ -248,30 +248,34 @@ def split_camel_case(name): return result +# Объявления пространств имён — одной переменной: места эмиссии её только подставляют. +# Правки шапки (как xmlns:pal в формате 2.21) делаются в одном месте, в main. +XMLNS_DECL = ( + 'xmlns="http://v8.1c.ru/8.3/MDClasses"' + ' xmlns:app="http://v8.1c.ru/8.2/managed-application/core"' + ' xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config"' + ' xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi"' + ' xmlns:ent="http://v8.1c.ru/8.1/data/enterprise"' + ' xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform"' + ' xmlns:style="http://v8.1c.ru/8.1/data/ui/style"' + ' xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system"' + ' xmlns:v8="http://v8.1c.ru/8.1/data/core"' + ' xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"' + ' xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web"' + ' xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows"' + ' xmlns:xen="http://v8.1c.ru/8.3/xcf/enums"' + ' xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef"' + ' xmlns:xr="http://v8.1c.ru/8.3/xcf/readable"' + ' xmlns:xs="http://www.w3.org/2001/XMLSchema"' + ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +) + + def write_child_subsystem_stub(child_path, child_name, format_version): child_uuid = new_uuid() lines = [] lines.append('') - lines.append( - '' - ) + lines.append(f'') lines.append(f'\t') lines.append('\t\t') lines.append(f'\t\t\t{esc_xml(child_name)}') @@ -418,6 +422,7 @@ def main(): return f'{type_part}.{name_part}' format_version = detect_format_version(output_dir) + xmlns_decl = XMLNS_DECL # --- 3. Resolve defaults --- synonym = str(defn['synonym']) if defn.get('synonym') else split_camel_case(obj_name) @@ -455,7 +460,7 @@ def main(): lines = [] lines.append('') - lines.append(f'') + lines.append(f'') lines.append(f'\t') lines.append('\t\t') diff --git a/.claude/skills/subsystem-edit/scripts/subsystem-edit.ps1 b/.claude/skills/subsystem-edit/scripts/subsystem-edit.ps1 index 66086fe9..87c6da6f 100644 --- a/.claude/skills/subsystem-edit/scripts/subsystem-edit.ps1 +++ b/.claude/skills/subsystem-edit/scripts/subsystem-edit.ps1 @@ -1,4 +1,4 @@ -# subsystem-edit v1.13 — Edit existing 1C subsystem XML +# subsystem-edit v1.14 — Edit existing 1C subsystem XML # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)][Alias('Path')][string]$SubsystemPath, @@ -261,6 +261,10 @@ $script:xmlDoc.Load($resolvedPath) $script:formatVersion = $script:xmlDoc.DocumentElement.GetAttribute("version") if (-not $script:formatVersion) { $script:formatVersion = "2.17" } + +# Объявления пространств имён — одной переменной: место эмиссии её только интерполирует. +# Правки шапки (как xmlns:pal в формате 2.21) делаются здесь, в одном месте. +$script:xmlnsDecl = 'xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' $script:utf8Bom = New-Object System.Text.UTF8Encoding($true) $script:addCount = 0 @@ -316,7 +320,7 @@ function Write-ChildSubsystemStub([string]$childPath, [string]$childName, [strin $childUuid = New-Guid-String $sb = New-Object System.Text.StringBuilder 2048 [void]$sb.AppendLine('') - [void]$sb.AppendLine("") + [void]$sb.AppendLine("") [void]$sb.AppendLine("`t") [void]$sb.AppendLine("`t`t") [void]$sb.AppendLine("`t`t`t$(Esc-Xml $childName)") diff --git a/.claude/skills/subsystem-edit/scripts/subsystem-edit.py b/.claude/skills/subsystem-edit/scripts/subsystem-edit.py index 5771ddf0..dd3943b8 100644 --- a/.claude/skills/subsystem-edit/scripts/subsystem-edit.py +++ b/.claude/skills/subsystem-edit/scripts/subsystem-edit.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# subsystem-edit v1.13 — Edit existing 1C subsystem XML +# subsystem-edit v1.14 — Edit existing 1C subsystem XML # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -203,30 +203,34 @@ def write_utf8_bom(path, content): f.write(content) +# Объявления пространств имён — одной переменной: место эмиссии её только подставляет. +# Правки шапки (как xmlns:pal в формате 2.21) делаются в одном месте, в main. +XMLNS_DECL = ( + 'xmlns="http://v8.1c.ru/8.3/MDClasses"' + ' xmlns:app="http://v8.1c.ru/8.2/managed-application/core"' + ' xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config"' + ' xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi"' + ' xmlns:ent="http://v8.1c.ru/8.1/data/enterprise"' + ' xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform"' + ' xmlns:style="http://v8.1c.ru/8.1/data/ui/style"' + ' xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system"' + ' xmlns:v8="http://v8.1c.ru/8.1/data/core"' + ' xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"' + ' xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web"' + ' xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows"' + ' xmlns:xen="http://v8.1c.ru/8.3/xcf/enums"' + ' xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef"' + ' xmlns:xr="http://v8.1c.ru/8.3/xcf/readable"' + ' xmlns:xs="http://www.w3.org/2001/XMLSchema"' + ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +) + + def write_child_subsystem_stub(child_path, child_name, format_version): child_uuid = new_uuid() lines = [] lines.append('') - lines.append( - '' - ) + lines.append(f'') lines.append(f'\t') lines.append('\t\t') lines.append(f'\t\t\t{esc_xml(child_name)}') diff --git a/.claude/skills/template-add/scripts/add-template.ps1 b/.claude/skills/template-add/scripts/add-template.ps1 index 5a6fbb19..d91937ca 100644 --- a/.claude/skills/template-add/scripts/add-template.ps1 +++ b/.claude/skills/template-add/scripts/add-template.ps1 @@ -1,4 +1,4 @@ -# template-add v1.18 — Add template to 1C object +# template-add v1.19 — Add template to 1C object # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -237,13 +237,17 @@ function Detect-FormatVersion([string]$dir) { $formatVersion = Detect-FormatVersion (Resolve-Path $SrcDir).Path +# Объявления пространств имён — одной переменной: место эмиссии её только интерполирует. +# Правки шапки (как xmlns:pal в формате 2.21) делаются здесь, в одном месте. +$xmlnsDecl = 'xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' + # --- 1. Метаданные макета (Templates/.xml) --- $templateUuid = [guid]::NewGuid().ToString() $templateMetaXml = @" - +