diff --git a/.claude/skills/meta-edit/reference/properties.md b/.claude/skills/meta-edit/reference/properties.md index 292663f2e..5e7cc55c1 100644 --- a/.claude/skills/meta-edit/reference/properties.md +++ b/.claude/skills/meta-edit/reference/properties.md @@ -29,13 +29,15 @@ | Свойство | Объекты | Inline-значение | |----------|---------|-----------------| -| Owners | Catalog, ChartOfCharacteristicTypes | `Catalog.XXX` | -| RegisterRecords | Document | `AccumulationRegister.XXX` | -| BasedOn | Document, Catalog, BP, Task | `Document.XXX` | -| InputByString | Catalog, ChartOf*, Task | `StandardAttribute.Description` | -| DataLockFields | Catalog, Document, регистры и др. | `Организация` (короткое имя реквизита → полный путь) | +| Owners | Catalog | `Catalog.XXX` | +| RegisterRecords | Document, Sequence | `AccumulationRegister.XXX` | +| BasedOn | ссылочные* | `Document.XXX` | +| InputByString | ссылочные* | `StandardAttribute.Description` | +| DataLockFields | ссылочные* | `Организация` (короткое имя реквизита → полный путь) | | RegisteredDocuments | DocumentJournal | `Document.XXX` | +\* Catalog, Document, ChartOfCharacteristicTypes, ChartOfAccounts, ChartOfCalculationTypes, ExchangePlan, BusinessProcess, Task. + ### add-owner / add-registerRecord / add-basedOn / add-registeredDocument Полное имя метаданных `MetaType.Name`: diff --git a/.claude/skills/meta-edit/scripts/meta-edit.ps1 b/.claude/skills/meta-edit/scripts/meta-edit.ps1 index e76481581..4b000a316 100644 --- a/.claude/skills/meta-edit/scripts/meta-edit.ps1 +++ b/.claude/skills/meta-edit/scripts/meta-edit.ps1 @@ -1,4 +1,4 @@ -# meta-edit v1.54 — Edit existing 1C metadata object XML +# meta-edit v1.55 — Edit existing 1C metadata object XML # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills [CmdletBinding(PositionalBinding=$false)] param( @@ -374,6 +374,13 @@ function Info($msg) { Write-Host "[INFO] $msg" -ForegroundColor Cyan } +# Операцию выполнить нельзя: в stderr и exit 1 до сохранения — файл не меняется. +# Console.Error, а не Write-Error: под ErrorActionPreference=Stop тот бросает исключение. +function Die($msg) { + [Console]::Error.WriteLine($msg) + exit 1 +} + # ============================================================ # Section 2: Detect object type # ============================================================ @@ -3126,13 +3133,18 @@ function Normalize-MDObjectRef { # mdref — значения списка суть MDObjectRef-пути → прогоняем через Normalize-MDObjectRef. # root — корень для голого имени без точки. +# types — у каких объектов свойство есть (Properties выгрузок ERP, БП, УТ, УНФ). +# adopted — у каких заимствованных объектов расширение может менять свойство (8.3.27): прочие +# списки платформа либо контролирует на равенство основной конфигурации (Owners, RegisteredDocuments — +# расширение не применяется), либо молча выбрасывает при загрузке. +$script:refObjectTypes = @('Catalog','Document','ChartOfAccounts','ChartOfCalculationTypes','ChartOfCharacteristicTypes','ExchangePlan','BusinessProcess','Task') $script:complexPropertyMap = @{ - "Owners" = @{ tag = "xr:Item"; attr = 'xsi:type="xr:MDObjectRef"'; mdref = $true; root = 'Catalog' } - "RegisterRecords" = @{ tag = "xr:Item"; attr = 'xsi:type="xr:MDObjectRef"'; mdref = $true } - "BasedOn" = @{ tag = "xr:Item"; attr = 'xsi:type="xr:MDObjectRef"'; mdref = $true } - "InputByString" = @{ tag = "xr:Field"; attr = $null } - "DataLockFields" = @{ tag = "xr:Field"; attr = $null; expand = $true } - "RegisteredDocuments" = @{ tag = "xr:Item"; attr = 'xsi:type="xr:MDObjectRef"'; mdref = $true } + "Owners" = @{ tag = "xr:Item"; attr = 'xsi:type="xr:MDObjectRef"'; mdref = $true; root = 'Catalog'; types = @('Catalog') } + "RegisterRecords" = @{ tag = "xr:Item"; attr = 'xsi:type="xr:MDObjectRef"'; mdref = $true; types = @('Document','Sequence'); adopted = @('Document') } + "BasedOn" = @{ tag = "xr:Item"; attr = 'xsi:type="xr:MDObjectRef"'; mdref = $true; types = $script:refObjectTypes } + "InputByString" = @{ tag = "xr:Field"; attr = $null; types = $script:refObjectTypes } + "DataLockFields" = @{ tag = "xr:Field"; attr = $null; expand = $true; types = $script:refObjectTypes } + "RegisteredDocuments" = @{ tag = "xr:Item"; attr = 'xsi:type="xr:MDObjectRef"'; mdref = $true; types = @('DocumentJournal') } } # Известные свойства объекта (union по корпусу acc+erp 8.3.24) — allowlist для modify-property. @@ -3573,6 +3585,30 @@ function Find-PropertyElement([string]$propName) { return $null } +# Элемент свойства-списка. Свойство, которого у типа объекта нет, — ошибка (раньше на справочнике +# add-registerRecord тихо не делал ничего). У заимствованного объекта расширения в Properties только +# изменённые свойства, поэтому отсутствующий элемент при $create создаём (в конец, как Modify-Properties); +# у обычного объекта выгрузка содержит все свойства, и отсутствие элемента — ошибка. +function Get-ListPropertyElement([string]$propName, [bool]$create) { + $mapEntry = $script:complexPropertyMap[$propName] + if ($mapEntry -and $mapEntry.types -cnotcontains $script:objType) { + Die "Свойство '$propName' не применимо к $($script:objType)" + } + $belonging = Find-PropertyElement 'ObjectBelonging' + $isAdopted = $belonging -and $belonging.InnerText -ceq 'Adopted' + if ($isAdopted -and $mapEntry.adopted -cnotcontains $script:objType) { + Die "Свойство '$propName' заимствованного объекта $($script:objType).$($script:objName) расширение не меняет — значение берётся из основной конфигурации" + } + $propEl = Find-PropertyElement $propName + if ($propEl -or -not $create) { return $propEl } + if (-not $isAdopted) { + Die "В Properties объекта $($script:objType).$($script:objName) нет элемента '$propName' — файл не из выгрузки платформы?" + } + $newNodes = Import-Fragment "<$propName/>" + Insert-PropertyInOrder $script:propertiesEl $newNodes[0] $null $propName + return $newNodes[0] +} + function Get-ComplexPropertyValues([System.Xml.XmlElement]$propEl) { $values = @() foreach ($child in $propEl.ChildNodes) { @@ -3589,11 +3625,7 @@ function Add-ComplexPropertyItem([string]$propertyName, [string[]]$values) { if ($mapEntry.expand) { $values = @($values | ForEach-Object { Expand-DataPath "$_" }) } if ($mapEntry.mdref) { $values = @($values | ForEach-Object { Normalize-MDObjectRef "$_" $mapEntry.root }) } - $propEl = Find-PropertyElement $propertyName - if (-not $propEl) { - Warn "Property element '$propertyName' not found in Properties" - return - } + $propEl = Get-ListPropertyElement $propertyName $true # Get existing values to check duplicates $existing = Get-ComplexPropertyValues $propEl @@ -3638,7 +3670,7 @@ function Remove-ComplexPropertyItem([string]$propertyName, [string[]]$values) { $mapEntry = $script:complexPropertyMap[$propertyName] if ($mapEntry -and $mapEntry.expand) { $values = @($values | ForEach-Object { Expand-DataPath "$_" }) } if ($mapEntry -and $mapEntry.mdref) { $values = @($values | ForEach-Object { Normalize-MDObjectRef "$_" $mapEntry.root }) } - $propEl = Find-PropertyElement $propertyName + $propEl = Get-ListPropertyElement $propertyName $false if (-not $propEl) { Warn "Property element '$propertyName' not found in Properties" return @@ -3678,11 +3710,9 @@ function Set-ComplexProperty([string]$propertyName, [string[]]$values) { if ($mapEntry.expand) { $values = @($values | ForEach-Object { Expand-DataPath "$_" }) } if ($mapEntry.mdref) { $values = @($values | ForEach-Object { Normalize-MDObjectRef "$_" $mapEntry.root }) } - $propEl = Find-PropertyElement $propertyName - if (-not $propEl) { - Warn "Property element '$propertyName' not found in Properties" - return - } + # Пустой список на отсутствующем элементе: очищать нечего, пустой элемент не создаём + $propEl = Get-ListPropertyElement $propertyName ($values.Count -gt 0) + if (-not $propEl) { return } $indent = Get-ChildIndent $script:propertiesEl $childIndent = "$indent`t" diff --git a/.claude/skills/meta-edit/scripts/meta-edit.py b/.claude/skills/meta-edit/scripts/meta-edit.py index c95e2a150..5863d974b 100644 --- a/.claude/skills/meta-edit/scripts/meta-edit.py +++ b/.claude/skills/meta-edit/scripts/meta-edit.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# meta-edit v1.54 — Edit existing 1C metadata object XML +# meta-edit v1.55 — Edit existing 1C metadata object XML # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -2988,13 +2988,18 @@ def normalize_md_object_ref(ref, default_root=None): # mdref — значения списка суть MDObjectRef-пути → прогоняем через normalize_md_object_ref. # root — корень для голого имени без точки. +# types — у каких объектов свойство есть (Properties выгрузок ERP, БП, УТ, УНФ). +# adopted — у каких заимствованных объектов расширение может менять свойство (8.3.27): прочие +# списки платформа либо контролирует на равенство основной конфигурации (Owners, RegisteredDocuments — +# расширение не применяется), либо молча выбрасывает при загрузке. +ref_object_types = ["Catalog", "Document", "ChartOfAccounts", "ChartOfCalculationTypes", "ChartOfCharacteristicTypes", "ExchangePlan", "BusinessProcess", "Task"] complex_property_map = { - "Owners": {"tag": "xr:Item", "attr": 'xsi:type="xr:MDObjectRef"', "mdref": True, "root": "Catalog"}, - "RegisterRecords": {"tag": "xr:Item", "attr": 'xsi:type="xr:MDObjectRef"', "mdref": True}, - "BasedOn": {"tag": "xr:Item", "attr": 'xsi:type="xr:MDObjectRef"', "mdref": True}, - "InputByString": {"tag": "xr:Field", "attr": None}, - "DataLockFields": {"tag": "xr:Field", "attr": None, "expand": True}, - "RegisteredDocuments": {"tag": "xr:Item", "attr": 'xsi:type="xr:MDObjectRef"', "mdref": True}, + "Owners": {"tag": "xr:Item", "attr": 'xsi:type="xr:MDObjectRef"', "mdref": True, "root": "Catalog", "types": ["Catalog"]}, + "RegisterRecords": {"tag": "xr:Item", "attr": 'xsi:type="xr:MDObjectRef"', "mdref": True, "types": ["Document", "Sequence"], "adopted": ["Document"]}, + "BasedOn": {"tag": "xr:Item", "attr": 'xsi:type="xr:MDObjectRef"', "mdref": True, "types": ref_object_types}, + "InputByString": {"tag": "xr:Field", "attr": None, "types": ref_object_types}, + "DataLockFields": {"tag": "xr:Field", "attr": None, "expand": True, "types": ref_object_types}, + "RegisteredDocuments": {"tag": "xr:Item", "attr": 'xsi:type="xr:MDObjectRef"', "mdref": True, "types": ["DocumentJournal"]}, } # Известные свойства объекта (union по корпусу acc+erp 8.3.24) — allowlist для modify-property. @@ -3514,6 +3519,28 @@ def find_property_element(prop_name): return None +# Элемент свойства-списка. Свойство, которого у типа объекта нет, — ошибка (раньше на справочнике +# add-registerRecord тихо не делал ничего). У заимствованного объекта расширения в Properties только +# изменённые свойства, поэтому отсутствующий элемент при create создаём (в конец, как modify_properties); +# у обычного объекта выгрузка содержит все свойства, и отсутствие элемента — ошибка. +def get_list_property_element(prop_name, create): + map_entry = complex_property_map.get(prop_name) + if map_entry and obj_type not in map_entry["types"]: + die(f"Свойство '{prop_name}' не применимо к {obj_type}") + belonging = find_property_element("ObjectBelonging") + is_adopted = belonging is not None and (belonging.text or "") == "Adopted" + if is_adopted and obj_type not in (map_entry or {}).get("adopted", []): + die(f"Свойство '{prop_name}' заимствованного объекта {obj_type}.{obj_name} расширение не меняет — значение берётся из основной конфигурации") + prop_el = find_property_element(prop_name) + if prop_el is not None or not create: + return prop_el + if not is_adopted: + die(f"В Properties объекта {obj_type}.{obj_name} нет элемента '{prop_name}' — файл не из выгрузки платформы?") + new_nodes = import_fragment(f"<{prop_name}/>") + insert_property_in_order(properties_el, new_nodes[0], None, prop_name) + return new_nodes[0] + + def get_complex_property_values(prop_el): values = [] for child in prop_el: @@ -3533,10 +3560,7 @@ def add_complex_property_item(property_name, values): if map_entry.get("mdref"): values = [normalize_md_object_ref(str(v), map_entry.get("root")) for v in values] - prop_el = find_property_element(property_name) - if prop_el is None: - warn(f"Property element '{property_name}' not found in Properties") - return + prop_el = get_list_property_element(property_name, True) # Get existing values to check duplicates existing = get_complex_property_values(prop_el) @@ -3576,7 +3600,7 @@ def remove_complex_property_item(property_name, values): values = [expand_data_path(str(v)) for v in values] if map_entry and map_entry.get("mdref"): values = [normalize_md_object_ref(str(v), map_entry.get("root")) for v in values] - prop_el = find_property_element(property_name) + prop_el = get_list_property_element(property_name, False) if prop_el is None: warn(f"Property element '{property_name}' not found in Properties") return @@ -3611,9 +3635,9 @@ def set_complex_property(property_name, values): if map_entry.get("mdref"): values = [normalize_md_object_ref(str(v), map_entry.get("root")) for v in values] - prop_el = find_property_element(property_name) + # Пустой список на отсутствующем элементе: очищать нечего, пустой элемент не создаём + prop_el = get_list_property_element(property_name, len(values) > 0) if prop_el is None: - warn(f"Property element '{property_name}' not found in Properties") return indent = get_child_indent(properties_el) diff --git a/tests/skills/cases/meta-edit/add-registerrecord-adopted.json b/tests/skills/cases/meta-edit/add-registerrecord-adopted.json new file mode 100644 index 000000000..76b25148a --- /dev/null +++ b/tests/skills/cases/meta-edit/add-registerrecord-adopted.json @@ -0,0 +1,112 @@ +{ + "name": "Движения заимствованного документа: inline add-registerRecord создаёт элемент RegisterRecords (раньше — WARN, файл без изменений, код 0)", + "setup": "empty-config-220", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { + "type": "AccumulationRegister", + "name": "Ост", + "dimensions": [ + "Товар: String(10)" + ], + "resources": [ + "Кол: Number(10,0)" + ] + }, + "args": { + "-JsonPath": "{inputFile}", + "-OutputDir": "{workDir}" + } + }, + { + "script": "meta-compile/scripts/meta-compile", + "input": { + "type": "AccumulationRegister", + "name": "Ост2", + "dimensions": [ + "Товар: String(10)" + ], + "resources": [ + "Кол: Number(10,0)" + ] + }, + "args": { + "-JsonPath": "{inputFile}", + "-OutputDir": "{workDir}" + } + }, + { + "script": "meta-compile/scripts/meta-compile", + "input": { + "type": "Document", + "name": "Расх", + "registerRecords": [ + "AccumulationRegister.Ост", + "AccumulationRegister.Ост2" + ] + }, + "args": { + "-JsonPath": "{inputFile}", + "-OutputDir": "{workDir}" + } + }, + { + "script": "meta-compile/scripts/meta-compile", + "input": { + "type": "Document", + "name": "Прих" + }, + "args": { + "-JsonPath": "{inputFile}", + "-OutputDir": "{workDir}" + } + }, + { + "script": "cfe-init/scripts/cfe-init", + "args": { + "-Name": "Расш", + "-OutputDir": "{workDir}/cfe", + "-ConfigPath": "{workDir}" + } + }, + { + "script": "cfe-borrow/scripts/cfe-borrow", + "args": { + "-ExtensionPath": "{workDir}/cfe", + "-ConfigPath": "{workDir}", + "-Object": "Document.Прих ;; AccumulationRegister.Ост ;; AccumulationRegister.Ост2" + } + }, + { + "script": "meta-edit/scripts/meta-edit", + "args": { + "-ObjectPath": "{workDir}/cfe/Documents/Прих.xml", + "-Operation": "add-registerRecord", + "-Value": "AccumulationRegister.Ост", + "-NoValidate": true + } + } + ], + "params": { + "objectPath": "cfe/Documents/Прих.xml", + "extensionPath": "cfe" + }, + "input": { + "modify": { + "properties": { + "Comment": "движения из расширения" + } + } + }, + "expect": { + "fileContains": [ + { + "file": "cfe/Documents/Прих.xml", + "text": [ + "AccumulationRegister.Ост" + ] + } + ] + } +} diff --git a/tests/skills/cases/meta-edit/error-adopted-basedon.json b/tests/skills/cases/meta-edit/error-adopted-basedon.json new file mode 100644 index 000000000..587ca0bb2 --- /dev/null +++ b/tests/skills/cases/meta-edit/error-adopted-basedon.json @@ -0,0 +1,104 @@ +{ + "name": "Ввод на основании у заимствованного документа: отказ — платформа выбросила бы свойство при загрузке расширения", + "setup": "empty-config-220", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { + "type": "AccumulationRegister", + "name": "Ост", + "dimensions": [ + "Товар: String(10)" + ], + "resources": [ + "Кол: Number(10,0)" + ] + }, + "args": { + "-JsonPath": "{inputFile}", + "-OutputDir": "{workDir}" + } + }, + { + "script": "meta-compile/scripts/meta-compile", + "input": { + "type": "AccumulationRegister", + "name": "Ост2", + "dimensions": [ + "Товар: String(10)" + ], + "resources": [ + "Кол: Number(10,0)" + ] + }, + "args": { + "-JsonPath": "{inputFile}", + "-OutputDir": "{workDir}" + } + }, + { + "script": "meta-compile/scripts/meta-compile", + "input": { + "type": "Document", + "name": "Расх", + "registerRecords": [ + "AccumulationRegister.Ост", + "AccumulationRegister.Ост2" + ] + }, + "args": { + "-JsonPath": "{inputFile}", + "-OutputDir": "{workDir}" + } + }, + { + "script": "meta-compile/scripts/meta-compile", + "input": { + "type": "Document", + "name": "Прих" + }, + "args": { + "-JsonPath": "{inputFile}", + "-OutputDir": "{workDir}" + } + }, + { + "script": "cfe-init/scripts/cfe-init", + "args": { + "-Name": "Расш", + "-OutputDir": "{workDir}/cfe", + "-ConfigPath": "{workDir}" + } + }, + { + "script": "cfe-borrow/scripts/cfe-borrow", + "args": { + "-ExtensionPath": "{workDir}/cfe", + "-ConfigPath": "{workDir}", + "-Object": "Document.Прих ;; AccumulationRegister.Ост ;; AccumulationRegister.Ост2" + } + } + ], + "params": { + "objectPath": "cfe/Documents/Прих.xml", + "extensionPath": "cfe" + }, + "input": { + "modify": { + "properties": { + "BasedOn": [ + "Document.Расх" + ] + } + } + }, + "expectError": "расширение не меняет", + "expect": { + "fileNotContains": [ + { + "file": "cfe/Documents/Прих.xml", + "text": "BasedOn" + } + ] + } +} diff --git a/tests/skills/cases/meta-edit/error-list-property-wrong-type.json b/tests/skills/cases/meta-edit/error-list-property-wrong-type.json new file mode 100644 index 000000000..c848dc985 --- /dev/null +++ b/tests/skills/cases/meta-edit/error-list-property-wrong-type.json @@ -0,0 +1,20 @@ +{ + "name": "Свойство-список, которого у типа нет (движения у справочника): отказ, файл не меняется", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { "type": "Catalog", "name": "Контрагенты" }, + "args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" } + } + ], + "params": { "objectPath": "Catalogs/Контрагенты" }, + "input": { + "modify": { "properties": { "RegisterRecords": ["AccumulationRegister.Продажи"] } } + }, + "expectError": "не применимо к Catalog", + "expect": { + "fileNotContains": [ + { "file": "Catalogs/Контрагенты.xml", "text": "RegisterRecords" } + ] + } +} diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/AccumulationRegisters/Ост.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/AccumulationRegisters/Ост.xml new file mode 100644 index 000000000..28ea8fc43 --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/AccumulationRegisters/Ост.xml @@ -0,0 +1,273 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + + Ост + + + ru + Ост + + + + true + + + Balance + false + + + + DontCheck + false + false + Auto + TransformValues + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + TransformValues + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + TransformValues + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + TransformValues + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + TransformValues + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + Managed + Use + true + + + + + + + + Кол + + + ru + Кол + + + + + xs:decimal + + 10 + 0 + Any + + + false + + + + false + + false + false + + + DontCheck + Items + + + Auto + Auto + + + Auto + Use + + + + + Товар + + + ru + Товар + + + + + xs:string + + 10 + Variable + + + false + + + + false + + false + false + + + DontCheck + Items + + + Auto + Auto + + + Auto + false + DontIndex + Use + true + + + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/AccumulationRegisters/Ост/Ext/RecordSetModule.bsl b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/AccumulationRegisters/Ост/Ext/RecordSetModule.bsl new file mode 100644 index 000000000..e69de29bb diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/AccumulationRegisters/Ост2.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/AccumulationRegisters/Ост2.xml new file mode 100644 index 000000000..0011c4302 --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/AccumulationRegisters/Ост2.xml @@ -0,0 +1,273 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + + Ост2 + + + ru + Ост2 + + + + true + + + Balance + false + + + + DontCheck + false + false + Auto + TransformValues + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + TransformValues + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + TransformValues + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + TransformValues + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + TransformValues + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + Managed + Use + true + + + + + + + + Кол + + + ru + Кол + + + + + xs:decimal + + 10 + 0 + Any + + + false + + + + false + + false + false + + + DontCheck + Items + + + Auto + Auto + + + Auto + Use + + + + + Товар + + + ru + Товар + + + + + xs:string + + 10 + Variable + + + false + + + + false + + false + false + + + DontCheck + Items + + + Auto + Auto + + + Auto + false + DontIndex + Use + true + + + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/AccumulationRegisters/Ост2/Ext/RecordSetModule.bsl b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/AccumulationRegisters/Ост2/Ext/RecordSetModule.bsl new file mode 100644 index 000000000..e69de29bb diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Configuration.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Configuration.xml new file mode 100644 index 000000000..d2dc29830 --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Configuration.xml @@ -0,0 +1,259 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + UUID-014 + UUID-015 + + + + TestConfig + + + ru + TestConfig + + + + + Version8_3_27 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + TextToSpeech + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_27 + + + + Русский + Расх + Прих + Ост + Ост2 + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Documents/Прих.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Documents/Прих.xml new file mode 100644 index 000000000..1872e6773 --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Documents/Прих.xml @@ -0,0 +1,82 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + + Прих + + + ru + Прих + + + + true + + String + 11 + Variable + Year + true + true + + + + Document.Прих.StandardAttribute.Number + + Use + Begin + DontUse + Directly + + + + + + + Allow + Deny + AutoDelete + WriteSelected + AutoFill + + true + true + false + + Managed + Use + + + + + + Auto + DontUse + false + false + + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Documents/Прих/Ext/ObjectModule.bsl b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Documents/Прих/Ext/ObjectModule.bsl new file mode 100644 index 000000000..e69de29bb diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Documents/Расх.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Documents/Расх.xml new file mode 100644 index 000000000..8ff6fd91d --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Documents/Расх.xml @@ -0,0 +1,85 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + + Расх + + + ru + Расх + + + + true + + String + 11 + Variable + Year + true + true + + + + Document.Расх.StandardAttribute.Number + + Use + Begin + DontUse + Directly + + + + + + + Allow + Deny + AutoDelete + WriteSelected + AutoFill + + AccumulationRegister.Ост + AccumulationRegister.Ост2 + + true + true + false + + Managed + Use + + + + + + Auto + DontUse + false + false + + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Documents/Расх/Ext/ObjectModule.bsl b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Documents/Расх/Ext/ObjectModule.bsl new file mode 100644 index 000000000..e69de29bb diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Ext/ClientApplicationInterface.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Ext/ClientApplicationInterface.xml new file mode 100644 index 000000000..3c1161b2d --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Languages/Русский.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Languages/Русский.xml new file mode 100644 index 000000000..fe1c53366 --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/AccumulationRegisters/Ост.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/AccumulationRegisters/Ост.xml new file mode 100644 index 000000000..33c648438 --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/AccumulationRegisters/Ост.xml @@ -0,0 +1,38 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + + Adopted + Ост + + UUID-014 + + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/AccumulationRegisters/Ост2.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/AccumulationRegisters/Ост2.xml new file mode 100644 index 000000000..84b43731b --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/AccumulationRegisters/Ост2.xml @@ -0,0 +1,38 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + + Adopted + Ост2 + + UUID-014 + + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Configuration.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Configuration.xml new file mode 100644 index 000000000..4f2a6bd80 --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Configuration.xml @@ -0,0 +1,74 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + UUID-014 + UUID-015 + + + + Adopted + Расш + + + ru + Расш + + + + Customization + true + Расш_ + Version8_3_27 + ManagedApplication + + PlatformApplication + + Russian + + Role.Расш_ОсновнаяРоль + + + + Language.Русский + + + + + + TaxiEnableVersion8_2 + + + Русский + Расш_ОсновнаяРоль + Прих + Ост + Ост2 + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Documents/Прих.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Documents/Прих.xml new file mode 100644 index 000000000..03a182aa5 --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Documents/Прих.xml @@ -0,0 +1,37 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + + Adopted + Прих + движения из расширения + UUID-012 + + AccumulationRegister.Ост + + + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Languages/Русский.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Languages/Русский.xml new file mode 100644 index 000000000..87112c20b --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Languages/Русский.xml @@ -0,0 +1,13 @@ + + + + + + Adopted + Русский + + UUID-002 + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Roles/Расш_ОсновнаяРоль.xml b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Roles/Расш_ОсновнаяРоль.xml new file mode 100644 index 000000000..7fc211d46 --- /dev/null +++ b/tests/skills/cases/meta-edit/snapshots/add-registerrecord-adopted/cfe/Roles/Расш_ОсновнаяРоль.xml @@ -0,0 +1,10 @@ + + + + + Расш_ОсновнаяРоль + + + + + \ No newline at end of file diff --git a/tests/skills/verify-snapshots.mjs b/tests/skills/verify-snapshots.mjs index 89c732773..b175a64db 100644 --- a/tests/skills/verify-snapshots.mjs +++ b/tests/skills/verify-snapshots.mjs @@ -1292,7 +1292,9 @@ async function verifyCase(skillName, caseName, skillConfig, caseData, opts) { return result; } - if (CFE_SKILLS.has(skillName)) { + // Кейс навыка не из CFE_SKILLS тоже может править расширение (meta-edit над заимствованным + // объектом) — признак тот же params.extensionPath. + if (CFE_SKILLS.has(skillName) || caseData.params?.extensionPath) { // CFE: two-stage load — base config first, then extension. // Каталог расширения берём из кейса, а не хардкодим: при жёстком 'ext' кейс, назвавший // каталог иначе, молча терял вторую половину проверки — блок ниже обходился по existsSync,