From 318abe3fc954de8329c2d7148f0ed63c15e83548 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sun, 26 Jul 2026 12:29:28 +0300 Subject: [PATCH] =?UTF-8?q?feat(xdto-edit):=20=D1=82=D0=BE=D1=87=D0=B5?= =?UTF-8?q?=D1=87=D0=BD=D0=B0=D1=8F=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=BF=D0=B0=D0=BA=D0=B5=D1=82=D0=B0=20=D0=B1=D0=B5=D0=B7=20?= =?UTF-8?q?=D1=87=D1=82=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=D1=81=D0=B5=D0=B9?= =?UTF-8?q?=20=D1=81=D1=85=D0=B5=D0=BC=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Навык нужен ровно для одного: не втаскивать в контекст мегабайтную схему ради одного поля. Чистота диффа тут ни при чём — она уже обеспечена round-trip'ом (замер: правка двух вещей через decompile→compile даёт 3 изменённые строки из 241). Поэтому edit не заводит второй эмиттер, а строится поверх round-trip'а: пакет выгружается в XSD, операция применяется к схеме, пакет собирается обратно компилятором. Байт-точность для нетронутого достаётся даром, а смена namespace перегенерирует все объявления префиксов сама — в EnterpriseData_1_20_2 их 5280. На лишний шаг (загрузка XSD в DOM и пересохранение) заведён отдельный харнесс: холостая правка не меняет ни байта на всех 760 пакетах. Операции: add/replace/remove-property, add/remove-type, add-enum, add-import, rename, set-synonym, set-comment, set-namespace. Содержимое — всегда фрагмент XSD, тем же языком, что в компиляторе; отдельных -MinOccurs нет, свойство меняется целиком через replace-property. Адресация точкой, путь заходит внутрь встроенных типов. rename трогает три места (объект метаданных, имена файла и каталога, регистрацию в Configuration.xml). set-namespace правит свой пакет и перечисляет зависящие, но не меняет их: при версионировании они и должны смотреть на прежнее пространство имён. После правки автоматически запускается xdto-validate. Проверено загрузкой в базу 8.3.24: add-property, add-enum и set-namespace переживают db-load-xml + db-update. Попутные ловушки портирования (детали — debug/xdto/FINDINGS.md): пустой элемент в lxml ложен, из-за чего "or"-цепочка создавала бы вторую частицу в типе с пустой sequence; диапазон [Ѐ-ӿԀ-ӿ] валиден в .NET и не компилируется в Python. Co-Authored-By: Claude Opus 5 (1M context) --- .claude/skills/xdto-edit/SKILL.md | 90 +++ .../skills/xdto-edit/scripts/xdto-edit.ps1 | 520 ++++++++++++++++++ .claude/skills/xdto-edit/scripts/xdto-edit.py | 503 +++++++++++++++++ tests/skills/cases/xdto-edit/_skill.json | 11 + tests/skills/cases/xdto-edit/add-enum.json | 32 ++ tests/skills/cases/xdto-edit/add-import.json | 30 + .../xdto-edit/add-property-attribute.json | 32 ++ .../skills/cases/xdto-edit/add-property.json | 32 ++ tests/skills/cases/xdto-edit/add-type.json | 30 + tests/skills/cases/xdto-edit/common.xsd | 8 + .../xdto-edit/remove-property-batch.json | 30 + tests/skills/cases/xdto-edit/rename.json | 31 ++ .../cases/xdto-edit/replace-property.json | 32 ++ .../skills/cases/xdto-edit/set-namespace.json | 39 ++ tests/skills/cases/xdto-edit/set-synonym.json | 30 + .../snapshots/add-enum/Configuration.xml | 252 +++++++++ .../Ext/ClientApplicationInterface.xml | 18 + .../snapshots/add-enum/Languages/Русский.xml | 16 + .../snapshots/add-enum/XDTOPackages/types.xml | 16 + .../XDTOPackages/types/Ext/Package.bin | 28 + .../xdto-edit/snapshots/add-enum/types.xsd | 35 ++ .../snapshots/add-import/Configuration.xml | 252 +++++++++ .../Ext/ClientApplicationInterface.xml | 18 + .../add-import/Languages/Русский.xml | 16 + .../add-import/XDTOPackages/types.xml | 16 + .../XDTOPackages/types/Ext/Package.bin | 27 + .../xdto-edit/snapshots/add-import/types.xsd | 35 ++ .../add-property-attribute/Configuration.xml | 252 +++++++++ .../Ext/ClientApplicationInterface.xml | 18 + .../Languages/Русский.xml | 16 + .../XDTOPackages/types.xml | 16 + .../XDTOPackages/types/Ext/Package.bin | 27 + .../add-property-attribute/types.xsd | 35 ++ .../snapshots/add-property/Configuration.xml | 252 +++++++++ .../Ext/ClientApplicationInterface.xml | 18 + .../add-property/Languages/Русский.xml | 16 + .../add-property/XDTOPackages/types.xml | 16 + .../XDTOPackages/types/Ext/Package.bin | 27 + .../snapshots/add-property/types.xsd | 35 ++ .../snapshots/add-type/Configuration.xml | 252 +++++++++ .../Ext/ClientApplicationInterface.xml | 18 + .../snapshots/add-type/Languages/Русский.xml | 16 + .../snapshots/add-type/XDTOPackages/types.xml | 16 + .../XDTOPackages/types/Ext/Package.bin | 29 + .../xdto-edit/snapshots/add-type/types.xsd | 35 ++ .../remove-property-batch/Configuration.xml | 252 +++++++++ .../Ext/ClientApplicationInterface.xml | 18 + .../Languages/Русский.xml | 16 + .../XDTOPackages/types.xml | 16 + .../XDTOPackages/types/Ext/Package.bin | 24 + .../snapshots/remove-property-batch/types.xsd | 35 ++ .../snapshots/rename/Configuration.xml | 252 +++++++++ .../rename/Ext/ClientApplicationInterface.xml | 18 + .../snapshots/rename/Languages/Русский.xml | 16 + .../rename/XDTOPackages/ОбменСБанком.xml | 16 + .../XDTOPackages/ОбменСБанком/Ext/Package.bin | 26 + .../xdto-edit/snapshots/rename/types.xsd | 35 ++ .../replace-property/Configuration.xml | 252 +++++++++ .../Ext/ClientApplicationInterface.xml | 18 + .../replace-property/Languages/Русский.xml | 16 + .../replace-property/XDTOPackages/types.xml | 16 + .../XDTOPackages/types/Ext/Package.bin | 26 + .../snapshots/replace-property/types.xsd | 35 ++ .../snapshots/set-namespace/Configuration.xml | 253 +++++++++ .../Ext/ClientApplicationInterface.xml | 18 + .../set-namespace/Languages/Русский.xml | 16 + .../set-namespace/XDTOPackages/common.xml | 16 + .../XDTOPackages/common/Ext/Package.bin | 6 + .../XDTOPackages/uses_common.xml | 16 + .../XDTOPackages/uses_common/Ext/Package.bin | 9 + .../snapshots/set-namespace/common.xsd | 8 + .../snapshots/set-namespace/uses-common.xsd | 12 + .../snapshots/set-synonym/Configuration.xml | 252 +++++++++ .../Ext/ClientApplicationInterface.xml | 18 + .../set-synonym/Languages/Русский.xml | 16 + .../set-synonym/XDTOPackages/types.xml | 16 + .../XDTOPackages/types/Ext/Package.bin | 26 + .../xdto-edit/snapshots/set-synonym/types.xsd | 35 ++ tests/skills/cases/xdto-edit/types.xsd | 35 ++ tests/skills/cases/xdto-edit/uses-common.xsd | 12 + 80 files changed, 5124 insertions(+) create mode 100644 .claude/skills/xdto-edit/SKILL.md create mode 100644 .claude/skills/xdto-edit/scripts/xdto-edit.ps1 create mode 100644 .claude/skills/xdto-edit/scripts/xdto-edit.py create mode 100644 tests/skills/cases/xdto-edit/_skill.json create mode 100644 tests/skills/cases/xdto-edit/add-enum.json create mode 100644 tests/skills/cases/xdto-edit/add-import.json create mode 100644 tests/skills/cases/xdto-edit/add-property-attribute.json create mode 100644 tests/skills/cases/xdto-edit/add-property.json create mode 100644 tests/skills/cases/xdto-edit/add-type.json create mode 100644 tests/skills/cases/xdto-edit/common.xsd create mode 100644 tests/skills/cases/xdto-edit/remove-property-batch.json create mode 100644 tests/skills/cases/xdto-edit/rename.json create mode 100644 tests/skills/cases/xdto-edit/replace-property.json create mode 100644 tests/skills/cases/xdto-edit/set-namespace.json create mode 100644 tests/skills/cases/xdto-edit/set-synonym.json create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-enum/Configuration.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-enum/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-enum/Languages/Русский.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-enum/XDTOPackages/types.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-enum/XDTOPackages/types/Ext/Package.bin create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-enum/types.xsd create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-import/Configuration.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-import/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-import/Languages/Русский.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-import/XDTOPackages/types.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-import/XDTOPackages/types/Ext/Package.bin create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-import/types.xsd create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Configuration.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Languages/Русский.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property-attribute/XDTOPackages/types.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property-attribute/XDTOPackages/types/Ext/Package.bin create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property-attribute/types.xsd create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property/Configuration.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property/Languages/Русский.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property/XDTOPackages/types.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property/XDTOPackages/types/Ext/Package.bin create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-property/types.xsd create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-type/Configuration.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-type/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-type/Languages/Русский.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-type/XDTOPackages/types.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-type/XDTOPackages/types/Ext/Package.bin create mode 100644 tests/skills/cases/xdto-edit/snapshots/add-type/types.xsd create mode 100644 tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Configuration.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Languages/Русский.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/remove-property-batch/XDTOPackages/types.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/remove-property-batch/XDTOPackages/types/Ext/Package.bin create mode 100644 tests/skills/cases/xdto-edit/snapshots/remove-property-batch/types.xsd create mode 100644 tests/skills/cases/xdto-edit/snapshots/rename/Configuration.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/rename/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/rename/Languages/Русский.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/rename/XDTOPackages/ОбменСБанком.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/rename/XDTOPackages/ОбменСБанком/Ext/Package.bin create mode 100644 tests/skills/cases/xdto-edit/snapshots/rename/types.xsd create mode 100644 tests/skills/cases/xdto-edit/snapshots/replace-property/Configuration.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/replace-property/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/replace-property/Languages/Русский.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/replace-property/XDTOPackages/types.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/replace-property/XDTOPackages/types/Ext/Package.bin create mode 100644 tests/skills/cases/xdto-edit/snapshots/replace-property/types.xsd create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-namespace/Configuration.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-namespace/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-namespace/Languages/Русский.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/common.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/common/Ext/Package.bin create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/uses_common.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/uses_common/Ext/Package.bin create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-namespace/common.xsd create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-namespace/uses-common.xsd create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-synonym/Configuration.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-synonym/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-synonym/Languages/Русский.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-synonym/XDTOPackages/types.xml create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-synonym/XDTOPackages/types/Ext/Package.bin create mode 100644 tests/skills/cases/xdto-edit/snapshots/set-synonym/types.xsd create mode 100644 tests/skills/cases/xdto-edit/types.xsd create mode 100644 tests/skills/cases/xdto-edit/uses-common.xsd diff --git a/.claude/skills/xdto-edit/SKILL.md b/.claude/skills/xdto-edit/SKILL.md new file mode 100644 index 00000000..2cd1ba8e --- /dev/null +++ b/.claude/skills/xdto-edit/SKILL.md @@ -0,0 +1,90 @@ +--- +name: xdto-edit +description: Точечное редактирование пакета XDTO 1С. Используй когда нужно добавить, изменить или удалить тип или свойство в существующем пакете, переименовать пакет, сменить пространство имён +argument-hint: -Operation <операция> [-Target <путь>] [-Value <значение>] [-NoValidate] +allowed-tools: + - Bash + - Read + - Glob +--- + +# /xdto-edit — Точечное редактирование пакета XDTO + +Меняет один элемент пакета, не требуя читать и переписывать всю схему. Для больших +пакетов (`EnterpriseData` — около мегабайта) это единственный практичный путь. + +Для маленького пакета проще связка `/xdto-decompile` → правка XSD → `/xdto-compile -Force`: +она даёт тот же результат и позволяет видеть схему целиком. + +## Параметры + +| Параметр | Обязательный | Описание | +|----------|--------------|----------| +| `PackagePath` | да | Каталог пакета, `Ext/Package.bin` или `<Имя>.xml`. Псевдоним — `-Path` | +| `Operation` | да | Операция из таблицы ниже | +| `Target` | зависит | Адрес: имя типа или путь `Тип.Свойство` | +| `Value` | зависит | Фрагмент XSD, литерал, URI или текст | +| `NoValidate` | нет | Не запускать `xdto-validate` после правки | + +```powershell +powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/xdto-edit.ps1" -PackagePath "<путь>" -Operation -Target "<адрес>" -Value "<значение>" +``` + +## Операции + +| Операция | `-Target` | `-Value` | +|---|---|---| +| `add-property` | имя типа | `` или `` | +| `replace-property` | `Тип.Свойство` | новое объявление целиком | +| `remove-property` | `Тип.Свойство` | — | +| `add-type` | — | `` или `` | +| `remove-type` | имя типа | — | +| `add-enum` | имя типа значения | литерал | +| `add-import` | — | URI пространства имён | +| `rename` | — | новое имя объекта метаданных | +| `set-synonym` | — | синоним | +| `set-comment` | — | комментарий | +| `set-namespace` | — | новый URI пространства имён | + +Батч через `;;` там, где перечисление осмысленно: `remove-property`, `remove-type`, +`add-enum`, `add-import`. + +```powershell +... -Operation add-property -Target "Платёж" -Value '' +... -Operation remove-property -Target "Платёж.Комментарий ;; Платёж.Черновик" +... -Operation add-enum -Target "ВидДокумента" -Value "Инкассо ;; Аккредитив" +... -Operation rename -Value ОбменСБанком +``` + +Содержимое всегда описывается фрагментом XML-схемы — тем же языком, что и в +`/xdto-compile`. Отдельных параметров вида `-MinOccurs` нет: чтобы поменять свойство, +дай его новое объявление целиком через `replace-property`. + +## Адресация + +Путь `Тип.Свойство`. Точка безопасна: имена типов и свойств — идентификаторы 1С. +Путь продолжается внутрь встроенных типов: `ПлатежныйДокумент.ДатаСписано.ИдПлатежа`. + +Посмотреть, что есть в пакете и как называется нужный тип, — `/xdto-info`. +Перед правкой типа полезно `/xdto-info -Mode used-by -Name <Тип>`: покажет, +кого затронет изменение. + +## Что тянет за собой переименование и смена namespace + +`rename` меняет имя в объекте метаданных, переименовывает файл `<Имя>.xml` и каталог +`<Имя>/`, правит регистрацию в `Configuration.xml`. Новое имя проверяется на +допустимость как идентификатор 1С и на занятость. + +`set-namespace` меняет `targetNamespace`, все внутренние ссылки на собственные типы +и `` объекта метаданных. Пакеты, импортирующие старое пространство имён, +**не изменяются** — при версионировании они и должны продолжать смотреть на прежнее. +Навык их перечислит; если правка не версионная, поправь их импорты сами. + +После правки автоматически запускается `/xdto-validate` — отключается через `-NoValidate`. + +## Типичный workflow + +1. `/xdto-info <пакет>` — найти нужный тип +2. `/xdto-info <пакет> -Mode used-by -Name <Тип>` — если меняешь существующее +3. `/xdto-edit <пакет> -Operation …` +4. `/db-load-xml` + `/db-update` diff --git a/.claude/skills/xdto-edit/scripts/xdto-edit.ps1 b/.claude/skills/xdto-edit/scripts/xdto-edit.ps1 new file mode 100644 index 00000000..fd42a646 --- /dev/null +++ b/.claude/skills/xdto-edit/scripts/xdto-edit.ps1 @@ -0,0 +1,520 @@ +# xdto-edit v1.0 — Point edits of a 1C XDTO package +# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills +param( + [Parameter(Mandatory=$true)] + [Alias('Path')] + [string]$PackagePath, + [Parameter(Mandatory=$true)] + [ValidateSet("add-property", "replace-property", "remove-property", + "add-type", "remove-type", "add-enum", "add-import", + "rename", "set-synonym", "set-comment", "set-namespace")] + [string]$Operation, + [string]$Target, + [string]$Value, + [switch]$NoValidate +) + +$ErrorActionPreference = "Stop" +[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 + +$XDTO_NS = "http://v8.1c.ru/8.1/xdto" +$XS_NS = "http://www.w3.org/2001/XMLSchema" +$MD_NS = "http://v8.1c.ru/8.3/MDClasses" +$V8_NS = "http://v8.1c.ru/8.1/data/core" + +# --- Support guard (Ext/ParentConfigurations.bin) --- +# See docs/1c-support-state-spec.md. Blocks edits of vendor objects "на замке" / +# read-only configs unless allowed. Trigger = bin present; reaction from +# .v8-project.json editingAllowedCheck (deny|warn|off, default deny). Never +# throws — guard errors degrade to allow. +function Test-ExternalObjectRoot([string]$xmlPath) { + if (-not (Test-Path $xmlPath)) { return $false } + try { + [xml]$mx = Get-Content -Path $xmlPath -Encoding UTF8 + $el = $mx.DocumentElement.FirstChild + while ($el -and $el.NodeType -ne 'Element') { $el = $el.NextSibling } + if ($el) { return @('ExternalDataProcessor','ExternalReport') -contains $el.get_LocalName() } + } catch {} + return $false +} +function Find-V8Project([string]$startDir) { + $d = $startDir + for ($i = 0; $i -lt 20 -and $d; $i++) { + $pj = Join-Path $d ".v8-project.json" + if (Test-Path $pj) { return $pj } + $parent = [System.IO.Path]::GetDirectoryName($d) + if ($parent -eq $d) { break } + $d = $parent + } + return $null +} +function Get-EditMode([string]$cfgDir) { + $mode = "deny" + try { + $pj = Find-V8Project $cfgDir + if ($pj) { + $cfg = Get-Content -Path $pj -Raw -Encoding UTF8 | ConvertFrom-Json + if ($cfg.PSObject.Properties.Name -contains 'editingAllowedCheck' -and $cfg.editingAllowedCheck) { + $mode = [string]$cfg.editingAllowedCheck + } + } + } catch {} + return $mode +} +function Assert-EditAllowed([string]$targetPath) { + try { + $d = $targetPath + for ($i = 0; $i -lt 20 -and $d; $i++) { + foreach ($x in @(Get-ChildItem -Path $d -Filter "*.xml" -File -ErrorAction SilentlyContinue)) { + if (Test-ExternalObjectRoot $x.FullName) { return } + } + $cfgXml = Join-Path $d "Configuration.xml" + $supportBin = Join-Path (Join-Path $d "Ext") "ParentConfigurations.bin" + if (Test-Path $cfgXml) { + if (Test-Path $supportBin) { + $mode = Get-EditMode $d + if ($mode -eq "off") { return } + $msg = "Конфигурация находится на поддержке (Ext/ParentConfigurations.bin). Правка может быть запрещена." + if ($mode -eq "warn") { Write-Warning $msg; return } + throw "$msg Снимите с поддержки (/support-edit) или задайте editingAllowedCheck в .v8-project.json." + } + return + } + $parent = [System.IO.Path]::GetDirectoryName($d) + if ($parent -eq $d) { break } + $d = $parent + } + } catch [System.Management.Automation.RuntimeException] { + throw + } catch {} +} + +# --- Resolve package ------------------------------------------------------------ + +if (-not [System.IO.Path]::IsPathRooted($PackagePath)) { + $PackagePath = Join-Path (Get-Location).Path $PackagePath +} + +$pkgDir = $null +if (Test-Path $PackagePath -PathType Container) { + if (Test-Path (Join-Path (Join-Path $PackagePath "Ext") "Package.bin")) { $pkgDir = $PackagePath } +} elseif ((Test-Path $PackagePath -PathType Leaf) -and ([System.IO.Path]::GetFileName($PackagePath) -eq "Package.bin")) { + $pkgDir = Split-Path (Split-Path $PackagePath -Parent) -Parent +} elseif ($PackagePath.EndsWith(".xml")) { + $stem = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($PackagePath), + [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)) + if (Test-Path (Join-Path (Join-Path $stem "Ext") "Package.bin")) { $pkgDir = $stem } +} +if (-not $pkgDir) { throw "Не найден пакет XDTO по пути: $PackagePath" } + +$pkgName = [System.IO.Path]::GetFileName($pkgDir) +$xdtoRoot = Split-Path $pkgDir -Parent +$configRoot = Split-Path $xdtoRoot -Parent +$binFile = Join-Path (Join-Path $pkgDir "Ext") "Package.bin" +$mdFile = Join-Path $xdtoRoot "$pkgName.xml" +$configXml = Join-Path $configRoot "Configuration.xml" + +Assert-EditAllowed $pkgDir + +$encBom = New-Object System.Text.UTF8Encoding($true) + +# --- Sibling skills ------------------------------------------------------------- +# Правка идёт через уже проверенный round-trip: пакет выгружается в XSD, операция +# применяется к схеме, пакет собирается обратно. Второго эмиттера не заводим — +# байт-точность для всего нетронутого достаётся от компилятора. + +$decompileScript = Join-Path (Join-Path $PSScriptRoot "..\..\xdto-decompile") "scripts\xdto-decompile.ps1" +$compileScript = Join-Path (Join-Path $PSScriptRoot "..\..\xdto-compile") "scripts\xdto-compile.ps1" +$validateScript = Join-Path (Join-Path $PSScriptRoot "..\..\xdto-validate") "scripts\xdto-validate.ps1" + +function Invoke-Sibling([string]$script, [string[]]$argList, [string]$what) { + if (-not (Test-Path $script)) { throw "Не найден навык $what по пути: $script" } + $out = & powershell.exe -NoProfile -ExecutionPolicy Bypass -File $script @argList 2>&1 + if ($LASTEXITCODE -ne 0) { throw "$what завершился с ошибкой:`n$($out -join "`n")" } + return $out +} + +# --- Metadata object edits ------------------------------------------------------ + +function Edit-Metadata([string]$field, [string]$newValue) { + $doc = New-Object System.Xml.XmlDocument + $doc.PreserveWhitespace = $true + $doc.Load($mdFile) + $nsm = New-Object System.Xml.XmlNamespaceManager($doc.NameTable) + $nsm.AddNamespace("md", $MD_NS) + $nsm.AddNamespace("v8", $V8_NS) + $props = $doc.SelectSingleNode("//md:XDTOPackage/md:Properties", $nsm) + if (-not $props) { throw "В объекте метаданных не найден блок " } + + switch ($field) { + "Name" { + $n = $props.SelectSingleNode("md:Name", $nsm) + if (-not $n) { throw "В объекте метаданных нет " } + $n.InnerText = $newValue + } + "Comment" { + $c = $props.SelectSingleNode("md:Comment", $nsm) + if (-not $c) { + $c = $doc.CreateElement("Comment", $MD_NS) + $props.AppendChild($c) | Out-Null + } + $c.InnerText = $newValue + } + "Namespace" { + $ns = $props.SelectSingleNode("md:Namespace", $nsm) + if (-not $ns) { throw "В объекте метаданных нет " } + $ns.InnerText = $newValue + } + "Synonym" { + $syn = $props.SelectSingleNode("md:Synonym", $nsm) + if (-not $syn) { + $syn = $doc.CreateElement("Synonym", $MD_NS) + $props.AppendChild($syn) | Out-Null + } + $item = $syn.SelectSingleNode("v8:item[v8:lang='ru']", $nsm) + if (-not $item) { + $item = $doc.CreateElement("v8", "item", $V8_NS) + $lang = $doc.CreateElement("v8", "lang", $V8_NS); $lang.InnerText = "ru" + $cont = $doc.CreateElement("v8", "content", $V8_NS) + $item.AppendChild($lang) | Out-Null + $item.AppendChild($cont) | Out-Null + $syn.AppendChild($item) | Out-Null + } + $item.SelectSingleNode("v8:content", $nsm).InnerText = $newValue + } + } + + $settings = New-Object System.Xml.XmlWriterSettings + $settings.Encoding = $encBom + $settings.Indent = $false + $stream = New-Object System.IO.FileStream($mdFile, [System.IO.FileMode]::Create) + $writer = [System.Xml.XmlWriter]::Create($stream, $settings) + $doc.Save($writer) + $writer.Close(); $stream.Close() +} + +function Rename-Package([string]$newName) { + if ($newName -notmatch '^[\wЀ-ӿ]+$' -or $newName -match '^\d') { + throw "`"$newName`" не является допустимым идентификатором 1С" + } + $newMd = Join-Path $xdtoRoot "$newName.xml" + $newDir = Join-Path $xdtoRoot $newName + if ((Test-Path $newMd) -or (Test-Path $newDir)) { throw "Имя `"$newName`" уже занято другим пакетом" } + + Edit-Metadata "Name" $newName + Move-Item $mdFile $newMd + Move-Item $pkgDir $newDir + + if (Test-Path $configXml) { + $cfg = New-Object System.Xml.XmlDocument + $cfg.PreserveWhitespace = $true + $cfg.Load($configXml) + $nsm = New-Object System.Xml.XmlNamespaceManager($cfg.NameTable) + $nsm.AddNamespace("md", $MD_NS) + $found = $false + foreach ($e in $cfg.SelectNodes("//md:Configuration/md:ChildObjects/md:XDTOPackage", $nsm)) { + if ($e.InnerText -eq $pkgName) { $e.InnerText = $newName; $found = $true; break } + } + if ($found) { + $s = New-Object System.Xml.XmlWriterSettings + $s.Encoding = $encBom; $s.Indent = $false + $st = New-Object System.IO.FileStream($configXml, [System.IO.FileMode]::Create) + $w = [System.Xml.XmlWriter]::Create($st, $s) + $cfg.Save($w); $w.Close(); $st.Close() + Write-Host " Configuration.xml: переименован в $newName" + } else { + Write-Warning "В Configuration.xml не найдена запись $pkgName — зарегистрируйте пакет вручную" + } + } + Write-Host "✓ Пакет переименован: $pkgName → $newName" + Write-Host " Перемещены: $newName.xml, $newName/" +} + +# --- Model edits through the XSD round-trip ------------------------------------- + +$XSD_DECL = @{ "add-property" = "element"; "replace-property" = "element"; "remove-property" = "element" } + +function Get-SchemaChildren([System.Xml.XmlElement]$el, [string]$local) { + $res = New-Object System.Collections.ArrayList + foreach ($c in $el.ChildNodes) { + if ($c.NodeType -eq [System.Xml.XmlNodeType]::Element -and $c.NamespaceURI -eq $XS_NS -and $c.get_LocalName() -eq $local) { [void]$res.Add($c) } + } + return ,$res +} +function Get-SchemaFirst([System.Xml.XmlElement]$el, [string]$local) { + $r = Get-SchemaChildren $el $local + if ($r.Count -gt 0) { return $r[0] } + return $null +} + +function Find-TypeElement($schema, [string]$typeName) { + foreach ($kind in @("complexType", "simpleType")) { + foreach ($t in (Get-SchemaChildren $schema $kind)) { + if ($t.GetAttribute("name") -eq $typeName) { return $t } + } + } + throw "В пакете нет типа `"$typeName`"" +} + +# Тело типа: внутрь xs:complexContent/xs:extension, если тип наследуется +function Get-TypeBody([System.Xml.XmlElement]$ct) { + $content = Get-SchemaFirst $ct "complexContent" + if ($content) { + $ext = Get-SchemaFirst $content "extension" + if ($ext) { return $ext } + } + return $ct +} + +function Find-Declaration([System.Xml.XmlElement]$body, [string]$propName) { + foreach ($node in $body.SelectNodes(".//*")) { + if ($node.NamespaceURI -ne $XS_NS) { continue } + if (@("element", "attribute") -notcontains $node.get_LocalName()) { continue } + if ($node.GetAttribute("name") -eq $propName) { return $node } + } + return $null +} + +# Путь Тип.Свойство[.Вложенное...] — точка безопасна: имена в модели XDTO +# являются идентификаторами 1С и точку содержать не могут +function Resolve-Path($schema, [string]$path) { + $segments = $path.Split(".") + $typeEl = Find-TypeElement $schema $segments[0] + if ($segments.Count -eq 1) { return [pscustomobject]@{ Type = $typeEl; Decl = $null } } + + $body = Get-TypeBody $typeEl + $decl = $null + for ($i = 1; $i -lt $segments.Count; $i++) { + $decl = Find-Declaration $body $segments[$i] + if (-not $decl) { throw "По пути `"$path`" не найдено свойство `"$($segments[$i])`"" } + if ($i -lt $segments.Count - 1) { + $inner = Get-SchemaFirst $decl "complexType" + if (-not $inner) { throw "Свойство `"$($segments[$i])`" не содержит вложенного типа — путь дальше не идёт" } + $body = Get-TypeBody $inner + } + } + return [pscustomobject]@{ Type = $typeEl; Decl = $decl } +} + +function Import-Fragment($schema, [string]$xml) { + $tmp = New-Object System.Xml.XmlDocument + $nsAttrs = " xmlns:xs=`"$XS_NS`" xmlns:xdto=`"$XDTO_NS`"" + $tns = $schema.GetAttribute("targetNamespace") + if ($tns) { $nsAttrs += " xmlns:tns=`"$tns`"" } + foreach ($a in $schema.Attributes) { + if ($a.Prefix -eq "xmlns" -and $a.get_LocalName() -notin @("xs", "xdto", "tns")) { + $nsAttrs += " xmlns:$($a.get_LocalName())=`"$($a.Value)`"" + } + } + $tmp.LoadXml("$xml") + $res = New-Object System.Collections.ArrayList + foreach ($c in $tmp.DocumentElement.ChildNodes) { + if ($c.NodeType -eq [System.Xml.XmlNodeType]::Element) { + [void]$res.Add($schema.OwnerDocument.ImportNode($c, $true)) + } + } + if ($res.Count -eq 0) { throw "Во фрагменте нет ни одного элемента: $xml" } + return ,$res +} + +function Apply-ModelOperation($schema) { + switch ($Operation) { + + "add-property" { + if (-not $Target) { throw "add-property требует -Target <Тип>" } + $loc = Resolve-Path $schema $Target + $body = Get-TypeBody $(if ($loc.Decl) { Get-SchemaFirst $loc.Decl "complexType" } else { $loc.Type }) + foreach ($frag in (Import-Fragment $schema $Value)) { + $kind = $frag.get_LocalName() + if ($kind -eq "attribute") { + $body.AppendChild($frag) | Out-Null + } elseif ($kind -eq "element") { + $particle = Get-SchemaFirst $body "sequence" + if (-not $particle) { $particle = Get-SchemaFirst $body "choice" } + if (-not $particle) { $particle = Get-SchemaFirst $body "all" } + if (-not $particle) { + $particle = $schema.OwnerDocument.CreateElement("xs", "sequence", $XS_NS) + $firstAttr = Get-SchemaFirst $body "attribute" + if ($firstAttr) { $body.InsertBefore($particle, $firstAttr) | Out-Null } + else { $body.AppendChild($particle) | Out-Null } + } + $particle.AppendChild($frag) | Out-Null + } else { + throw "add-property ожидает или , получен " + } + Write-Host " + $($frag.GetAttribute('name')) в тип $Target" + } + } + + "replace-property" { + if (-not $Target) { throw "replace-property требует -Target `"Тип.Свойство`"" } + $loc = Resolve-Path $schema $Target + if (-not $loc.Decl) { throw "replace-property требует путь вида `"Тип.Свойство`"" } + $frags = Import-Fragment $schema $Value + if ($frags.Count -ne 1) { throw "replace-property ожидает ровно одно объявление" } + $loc.Decl.ParentNode.ReplaceChild($frags[0], $loc.Decl) | Out-Null + Write-Host " ~ $Target заменено" + } + + "remove-property" { + if (-not $Target) { throw "remove-property требует путь `"Тип.Свойство`"" } + foreach ($one in ($Target -split "\s*;;\s*")) { + if (-not $one) { continue } + $loc = Resolve-Path $schema $one + if (-not $loc.Decl) { throw "remove-property требует путь вида `"Тип.Свойство`", получено `"$one`"" } + $loc.Decl.ParentNode.RemoveChild($loc.Decl) | Out-Null + Write-Host " − $one удалено" + } + } + + "add-type" { + foreach ($frag in (Import-Fragment $schema $Value)) { + if (@("complexType", "simpleType") -notcontains $frag.get_LocalName()) { + throw "add-type ожидает или , получен " + } + $schema.AppendChild($frag) | Out-Null + Write-Host " + тип $($frag.GetAttribute('name'))" + } + } + + "remove-type" { + if (-not $Target) { throw "remove-type требует -Target <Тип>" } + foreach ($one in ($Target -split "\s*;;\s*")) { + if (-not $one) { continue } + $t = Find-TypeElement $schema $one + $t.ParentNode.RemoveChild($t) | Out-Null + Write-Host " − тип $one удалён" + } + } + + "add-enum" { + if (-not $Target) { throw "add-enum требует -Target <ТипЗначения>" } + $t = Find-TypeElement $schema $Target + $restriction = Get-SchemaFirst $t "restriction" + if (-not $restriction) { throw "Тип `"$Target`" не является ограничением простого типа" } + foreach ($lit in ($Value -split "\s*;;\s*")) { + if (-not $lit) { continue } + $e = $schema.OwnerDocument.CreateElement("xs", "enumeration", $XS_NS) + $e.SetAttribute("value", $lit) + $restriction.AppendChild($e) | Out-Null + Write-Host " + значение `"$lit`" в тип $Target" + } + } + + "add-import" { + foreach ($uri in ($Value -split "\s*;;\s*")) { + if (-not $uri) { continue } + $exists = $false + foreach ($i in (Get-SchemaChildren $schema "import")) { + if ($i.GetAttribute("namespace") -eq $uri) { $exists = $true; break } + } + if ($exists) { Write-Host " = импорт $uri уже объявлен"; continue } + $imp = $schema.OwnerDocument.CreateElement("xs", "import", $XS_NS) + $imp.SetAttribute("namespace", $uri) + $firstOther = $null + foreach ($c in $schema.ChildNodes) { + if ($c.NodeType -eq [System.Xml.XmlNodeType]::Element -and $c.get_LocalName() -notin @("annotation", "import")) { $firstOther = $c; break } + } + if ($firstOther) { $schema.InsertBefore($imp, $firstOther) | Out-Null } else { $schema.AppendChild($imp) | Out-Null } + Write-Host " + импорт $uri" + } + } + + "set-namespace" { + if (-not $Value) { throw "set-namespace требует -Value " } + $old = $schema.GetAttribute("targetNamespace") + # Установка того же значения не отбрасывается: пакет пересобирается вхолостую, + # и это заодно проба точности пути «выгрузить → собрать» на любом пакете + if ($old -eq $Value) { Write-Host " = namespace уже $Value, пакет пересобран без изменений" } + # Меняем и targetNamespace, и объявление префикса, который на него указывал: + # иначе ссылки на собственные типы станут ссылками в чужое пространство имён + $schema.SetAttribute("targetNamespace", $Value) + foreach ($a in @($schema.Attributes)) { + if ($a.Prefix -eq "xmlns" -and $a.Value -eq $old) { + $schema.SetAttribute("xmlns:$($a.get_LocalName())", $Value) + } + } + Write-Host " ~ namespace: $old → $Value" + } + } +} + +# --- Dispatch ------------------------------------------------------------------- + +$metaOps = @("rename", "set-synonym", "set-comment") +$touchesModel = ($metaOps -notcontains $Operation) + +Write-Host "Пакет: $pkgName" + +if ($Operation -eq "rename") { + if (-not $Value) { throw "rename требует -Value <НовоеИмя>" } + Rename-Package $Value + $pkgName = $Value + $pkgDir = Join-Path $xdtoRoot $Value +} elseif ($Operation -eq "set-synonym") { + if (-not $Value) { throw "set-synonym требует -Value <текст>" } + Edit-Metadata "Synonym" $Value + Write-Host "✓ Синоним: $Value" +} elseif ($Operation -eq "set-comment") { + Edit-Metadata "Comment" $Value + Write-Host "✓ Комментарий обновлён" +} else { + $tmpDir = Join-Path ([System.IO.Path]::GetTempPath()) ("xdto-edit_" + [guid]::NewGuid().ToString("N").Substring(0, 8)) + New-Item -ItemType Directory -Path $tmpDir -Force | Out-Null + try { + $xsdPath = Join-Path $tmpDir "schema.xsd" + Invoke-Sibling $decompileScript @("-PackagePath", $binFile, "-OutFile", $xsdPath) "xdto-decompile" | Out-Null + + $doc = New-Object System.Xml.XmlDocument + $doc.PreserveWhitespace = $false + $doc.Load($xsdPath) + $schema = $doc.DocumentElement + + $oldNamespace = $schema.GetAttribute("targetNamespace") + Apply-ModelOperation $schema + + $doc.Save($xsdPath) + Invoke-Sibling $compileScript @("-XsdPath", $xsdPath, "-OutputDir", $configRoot, "-Name", $pkgName, "-Force") "xdto-compile" | Out-Null + + if ($Operation -eq "set-namespace") { + Edit-Metadata "Namespace" $Value + # Зависящие пакеты не трогаем: при версионировании они обязаны продолжать + # смотреть на прежний namespace. Но молчать о них нельзя. + $dependents = @() + foreach ($d in (Get-ChildItem $xdtoRoot -Directory -ErrorAction SilentlyContinue)) { + if ($d.Name -eq $pkgName) { continue } + $ob = Join-Path (Join-Path $d.FullName "Ext") "Package.bin" + if (-not (Test-Path $ob)) { continue } + try { + $od = New-Object System.Xml.XmlDocument + $od.Load($ob) + foreach ($imp in $od.DocumentElement.ChildNodes) { + if ($imp.NodeType -eq [System.Xml.XmlNodeType]::Element -and $imp.get_LocalName() -eq "import" -and + $imp.GetAttribute("namespace") -eq $oldNamespace) { $dependents += $d.Name; break } + } + } catch {} + } + if ($dependents.Count -gt 0) { + Write-Host "" + Write-Warning ("Старый namespace импортируют пакеты ($($dependents.Count)): " + ($dependents -join ", ") + + ". Они не изменены — при версионировании это верно; если нет, поправьте их импорты.") + } + } + Write-Host "✓ Пакет пересобран: XDTOPackages/$pkgName/Ext/Package.bin" + } finally { + Remove-Item $tmpDir -Recurse -Force -ErrorAction SilentlyContinue + } +} + +# --- Validate ------------------------------------------------------------------- + +if (-not $NoValidate) { + if (Test-Path $validateScript) { + Write-Host "" + Write-Host "--- xdto-validate ---" + & powershell.exe -NoProfile -ExecutionPolicy Bypass -File $validateScript -PackagePath (Join-Path $xdtoRoot $pkgName) + } else { + Write-Host "[SKIP] xdto-validate не найден: $validateScript" + } +} +exit 0 diff --git a/.claude/skills/xdto-edit/scripts/xdto-edit.py b/.claude/skills/xdto-edit/scripts/xdto-edit.py new file mode 100644 index 00000000..403dcfcf --- /dev/null +++ b/.claude/skills/xdto-edit/scripts/xdto-edit.py @@ -0,0 +1,503 @@ +# xdto-edit v1.0 — Point edits of a 1C XDTO package (Python port) +# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills +import argparse +import json +import os +import re +import shutil +import subprocess +import sys +import tempfile +import uuid + +from lxml import etree + +sys.stdout.reconfigure(encoding="utf-8") +sys.stderr.reconfigure(encoding="utf-8") + +XDTO_NS = "http://v8.1c.ru/8.1/xdto" +XS_NS = "http://www.w3.org/2001/XMLSchema" +MD_NS = "http://v8.1c.ru/8.3/MDClasses" +V8_NS = "http://v8.1c.ru/8.1/data/core" + +OPS = ["add-property", "replace-property", "remove-property", "add-type", "remove-type", + "add-enum", "add-import", "rename", "set-synonym", "set-comment", "set-namespace"] + +parser = argparse.ArgumentParser(allow_abbrev=False) +parser.add_argument("-PackagePath", "-Path", required=True) +parser.add_argument("-Operation", required=True, choices=OPS) +parser.add_argument("-Target", default="") +parser.add_argument("-Value", default="") +parser.add_argument("-NoValidate", action="store_true") +args = parser.parse_args() + + +def die(msg): + print(msg, file=sys.stderr) + sys.exit(1) + + +def local(el): + return etree.QName(el).localname + + +def _parse_xml(source, from_string=False): + """Разбор с узким отступлением для не-URI пространств имён. + + Платформа допускает в targetNamespace произвольную строку, .NET такое принимает, + а libxml2 отвергает. Откатываемся на восстанавливающий разбор ТОЛЬКО на этой ошибке. + """ + try: + return (etree.fromstring(source) if from_string else etree.parse(source)) + except etree.XMLSyntaxError as e: + if "is not a valid URI" not in str(e): + raise + p = etree.XMLParser(recover=True) + return (etree.fromstring(source, p) if from_string else etree.parse(source, p)) + + +# ── support guard ──────────────────────────────────────────── +# См. docs/1c-support-state-spec.md. + +def find_v8_project(start_dir): + d = os.path.abspath(start_dir) + for _ in range(20): + pj = os.path.join(d, ".v8-project.json") + if os.path.exists(pj): + return pj + parent = os.path.dirname(d) + if parent == d: + break + d = parent + return None + + +def get_edit_mode(cfg_dir): + try: + pj = find_v8_project(cfg_dir) + if pj: + with open(pj, encoding="utf-8-sig") as f: + return str(json.load(f).get("editingAllowedCheck") or "deny") + except Exception: # noqa: BLE001 + pass + return "deny" + + +def is_external_object_root(xml_path): + try: + for el in _parse_xml(xml_path).getroot(): + if isinstance(el.tag, str): + return local(el) in ("ExternalDataProcessor", "ExternalReport") + except Exception: # noqa: BLE001 + pass + return False + + +def assert_edit_allowed(target_path): + d = os.path.abspath(target_path) + for _ in range(20): + try: + for f in os.listdir(d): + if f.endswith(".xml") and is_external_object_root(os.path.join(d, f)): + return + except OSError: + pass + if os.path.exists(os.path.join(d, "Configuration.xml")): + if os.path.exists(os.path.join(d, "Ext", "ParentConfigurations.bin")): + mode = get_edit_mode(d) + if mode == "off": + return + msg = ("Конфигурация находится на поддержке (Ext/ParentConfigurations.bin). " + "Правка может быть запрещена.") + if mode == "warn": + print("WARNING: " + msg, file=sys.stderr) + return + die(msg + " Снимите с поддержки (/support-edit) или задайте " + "editingAllowedCheck в .v8-project.json.") + return + parent = os.path.dirname(d) + if parent == d: + break + d = parent + + +# ── resolve package ────────────────────────────────────────── + +package_path = os.path.abspath(args.PackagePath) +pkg_dir = None +if os.path.isdir(package_path): + if os.path.exists(os.path.join(package_path, "Ext", "Package.bin")): + pkg_dir = package_path +elif os.path.isfile(package_path) and os.path.basename(package_path) == "Package.bin": + pkg_dir = os.path.dirname(os.path.dirname(package_path)) +elif package_path.endswith(".xml"): + stem = os.path.join(os.path.dirname(package_path), + os.path.splitext(os.path.basename(package_path))[0]) + if os.path.exists(os.path.join(stem, "Ext", "Package.bin")): + pkg_dir = stem +if not pkg_dir: + die(f"Не найден пакет XDTO по пути: {package_path}") + +pkg_name = os.path.basename(pkg_dir.rstrip("\\/")) +xdto_root = os.path.dirname(pkg_dir) +config_root = os.path.dirname(xdto_root) +bin_file = os.path.join(pkg_dir, "Ext", "Package.bin") +md_file = os.path.join(xdto_root, pkg_name + ".xml") +config_xml = os.path.join(config_root, "Configuration.xml") + +assert_edit_allowed(pkg_dir) + +SKILLS = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +DECOMPILE = os.path.join(SKILLS, "xdto-decompile", "scripts", "xdto-decompile.py") +COMPILE = os.path.join(SKILLS, "xdto-compile", "scripts", "xdto-compile.py") +VALIDATE = os.path.join(SKILLS, "xdto-validate", "scripts", "xdto-validate.py") + + +def invoke_sibling(script, argv, what): + if not os.path.exists(script): + die(f"Не найден навык {what} по пути: {script}") + r = subprocess.run([sys.executable, script, *argv], capture_output=True, text=True, encoding="utf-8") + if r.returncode != 0: + die(f"{what} завершился с ошибкой:\n{(r.stderr or '') + (r.stdout or '')}") + return r.stdout + + +def save_xml(doc, path): + raw = etree.tostring(doc, xml_declaration=True, encoding="UTF-8") + with open(path, "wb") as f: + f.write(b"\xef\xbb\xbf" + raw) + + +# ── metadata object edits ──────────────────────────────────── + +def edit_metadata(field, new_value): + doc = _parse_xml(md_file) + props = doc.find(f".//{{{MD_NS}}}XDTOPackage/{{{MD_NS}}}Properties") + if props is None: + die("В объекте метаданных не найден блок ") + + if field in ("Name", "Namespace"): + el = props.find(f"{{{MD_NS}}}{field}") + if el is None: + die(f"В объекте метаданных нет <{field}>") + el.text = new_value + elif field == "Comment": + el = props.find(f"{{{MD_NS}}}Comment") + if el is None: + el = etree.SubElement(props, f"{{{MD_NS}}}Comment") + el.text = new_value + elif field == "Synonym": + syn = props.find(f"{{{MD_NS}}}Synonym") + if syn is None: + syn = etree.SubElement(props, f"{{{MD_NS}}}Synonym") + item = None + for it in syn.iterfind(f"{{{V8_NS}}}item"): + lg = it.find(f"{{{V8_NS}}}lang") + if lg is not None and (lg.text or "") == "ru": + item = it + break + if item is None: + item = etree.SubElement(syn, f"{{{V8_NS}}}item") + etree.SubElement(item, f"{{{V8_NS}}}lang").text = "ru" + etree.SubElement(item, f"{{{V8_NS}}}content") + item.find(f"{{{V8_NS}}}content").text = new_value + save_xml(doc, md_file) + + +def rename_package(new_name): + global pkg_name, pkg_dir + # \w с re.UNICODE уже покрывает кириллицу; явные диапазоны только плодят ошибки + if not re.match(r"^\w+$", new_name, re.UNICODE) or re.match(r"^\d", new_name): + die(f'"{new_name}" не является допустимым идентификатором 1С') + new_md = os.path.join(xdto_root, new_name + ".xml") + new_dir = os.path.join(xdto_root, new_name) + if os.path.exists(new_md) or os.path.exists(new_dir): + die(f'Имя "{new_name}" уже занято другим пакетом') + + edit_metadata("Name", new_name) + shutil.move(md_file, new_md) + shutil.move(pkg_dir, new_dir) + + if os.path.exists(config_xml): + cfg = _parse_xml(config_xml) + found = False + for e in cfg.iterfind(f".//{{{MD_NS}}}Configuration/{{{MD_NS}}}ChildObjects/{{{MD_NS}}}XDTOPackage"): + if (e.text or "") == pkg_name: + e.text = new_name + found = True + break + if found: + save_xml(cfg, config_xml) + print(f" Configuration.xml: переименован в {new_name}") + else: + print(f"WARNING: В Configuration.xml не найдена запись {pkg_name} — " + "зарегистрируйте пакет вручную", file=sys.stderr) + print(f"✓ Пакет переименован: {pkg_name} → {new_name}") + print(f" Перемещены: {new_name}.xml, {new_name}/") + pkg_name = new_name + pkg_dir = new_dir + + +# ── model edits through the XSD round-trip ─────────────────── + +def xs_children(el, name): + return [c for c in el if isinstance(c.tag, str) + and etree.QName(c).namespace == XS_NS and local(c) == name] + + +def xs_first(el, name): + r = xs_children(el, name) + return r[0] if r else None + + +def find_type_element(schema, type_name): + for kind in ("complexType", "simpleType"): + for t in xs_children(schema, kind): + if t.get("name") == type_name: + return t + die(f'В пакете нет типа "{type_name}"') + + +def get_type_body(ct): + content = xs_first(ct, "complexContent") + if content is not None: + ext = xs_first(content, "extension") + if ext is not None: + return ext + return ct + + +def find_declaration(body, prop_name): + for node in body.iter(): + if not isinstance(node.tag, str) or etree.QName(node).namespace != XS_NS: + continue + if local(node) in ("element", "attribute") and node.get("name") == prop_name: + return node + return None + + +def resolve_path(schema, path): + # Точка безопасна: имена в модели XDTO — идентификаторы 1С + segments = path.split(".") + type_el = find_type_element(schema, segments[0]) + if len(segments) == 1: + return (type_el, None) + body = get_type_body(type_el) + decl = None + for i in range(1, len(segments)): + decl = find_declaration(body, segments[i]) + if decl is None: + die(f'По пути "{path}" не найдено свойство "{segments[i]}"') + if i < len(segments) - 1: + inner = xs_first(decl, "complexType") + if inner is None: + die(f'Свойство "{segments[i]}" не содержит вложенного типа — путь дальше не идёт') + body = get_type_body(inner) + return (type_el, decl) + + +def import_fragment(schema, xml): + ns = {"xs": XS_NS, "xdto": XDTO_NS} + tns = schema.get("targetNamespace") + if tns: + ns["tns"] = tns + for px, uri in schema.nsmap.items(): + if px and px not in ns: + ns[px] = uri + decls = " ".join(f'xmlns:{k}="{v}"' for k, v in ns.items()) + wrapped = etree.fromstring(f"{xml}".encode("utf-8")) + res = [c for c in wrapped if isinstance(c.tag, str)] + if not res: + die(f"Во фрагменте нет ни одного элемента: {xml}") + return res + + +def apply_model_operation(schema): + op = args.Operation + + if op == "add-property": + if not args.Target: + die("add-property требует -Target <Тип>") + type_el, decl = resolve_path(schema, args.Target) + host = xs_first(decl, "complexType") if decl is not None else type_el + body = get_type_body(host) + for frag in import_fragment(schema, args.Value): + kind = local(frag) + if kind == "attribute": + body.append(frag) + elif kind == "element": + # Явные is not None: пустой в lxml ложен, + # и через "or" мы бы создали вторую частицу + particle = xs_first(body, "sequence") + if particle is None: + particle = xs_first(body, "choice") + if particle is None: + particle = xs_first(body, "all") + if particle is None: + particle = etree.Element(f"{{{XS_NS}}}sequence") + first_attr = xs_first(body, "attribute") + if first_attr is not None: + first_attr.addprevious(particle) + else: + body.append(particle) + particle.append(frag) + else: + die(f"add-property ожидает или , получен ") + print(f' + {frag.get("name")} в тип {args.Target}') + + elif op == "replace-property": + if not args.Target: + die('replace-property требует -Target "Тип.Свойство"') + _, decl = resolve_path(schema, args.Target) + if decl is None: + die('replace-property требует путь вида "Тип.Свойство"') + frags = import_fragment(schema, args.Value) + if len(frags) != 1: + die("replace-property ожидает ровно одно объявление") + decl.getparent().replace(decl, frags[0]) + print(f" ~ {args.Target} заменено") + + elif op == "remove-property": + if not args.Target: + die('remove-property требует путь "Тип.Свойство"') + for one in [x.strip() for x in args.Target.split(";;") if x.strip()]: + _, decl = resolve_path(schema, one) + if decl is None: + die(f'remove-property требует путь вида "Тип.Свойство", получено "{one}"') + decl.getparent().remove(decl) + print(f" − {one} удалено") + + elif op == "add-type": + for frag in import_fragment(schema, args.Value): + if local(frag) not in ("complexType", "simpleType"): + die(f"add-type ожидает или , получен ") + schema.append(frag) + print(f' + тип {frag.get("name")}') + + elif op == "remove-type": + if not args.Target: + die("remove-type требует -Target <Тип>") + for one in [x.strip() for x in args.Target.split(";;") if x.strip()]: + t = find_type_element(schema, one) + t.getparent().remove(t) + print(f" − тип {one} удалён") + + elif op == "add-enum": + if not args.Target: + die("add-enum требует -Target <ТипЗначения>") + t = find_type_element(schema, args.Target) + restriction = xs_first(t, "restriction") + if restriction is None: + die(f'Тип "{args.Target}" не является ограничением простого типа') + for lit in [x.strip() for x in args.Value.split(";;") if x.strip()]: + e = etree.SubElement(restriction, f"{{{XS_NS}}}enumeration") + e.set("value", lit) + print(f' + значение "{lit}" в тип {args.Target}') + + elif op == "add-import": + for uri in [x.strip() for x in args.Value.split(";;") if x.strip()]: + if any(i.get("namespace") == uri for i in xs_children(schema, "import")): + print(f" = импорт {uri} уже объявлен") + continue + imp = etree.Element(f"{{{XS_NS}}}import") + imp.set("namespace", uri) + first_other = next((c for c in schema if isinstance(c.tag, str) + and local(c) not in ("annotation", "import")), None) + if first_other is not None: + first_other.addprevious(imp) + else: + schema.append(imp) + print(f" + импорт {uri}") + + elif op == "set-namespace": + if not args.Value: + die("set-namespace требует -Value ") + old = schema.get("targetNamespace") + if old == args.Value: + # Установка того же значения не отбрасывается: пакет пересобирается вхолостую + print(f" = namespace уже {args.Value}, пакет пересобран без изменений") + else: + print(f" ~ namespace: {old} → {args.Value}") + # Меняем и targetNamespace, и объявление префикса, который на него указывал + new_nsmap = {px: (args.Value if uri == old else uri) for px, uri in schema.nsmap.items()} + rebuilt = etree.Element(schema.tag, nsmap=new_nsmap) + for k, v in schema.attrib.items(): + rebuilt.set(k, v) + rebuilt.set("targetNamespace", args.Value) + rebuilt.text = schema.text + for c in list(schema): + rebuilt.append(c) + return rebuilt + return schema + + +# ── dispatch ───────────────────────────────────────────────── + +print(f"Пакет: {pkg_name}") +old_namespace = None + +if args.Operation == "rename": + if not args.Value: + die("rename требует -Value <НовоеИмя>") + rename_package(args.Value) +elif args.Operation == "set-synonym": + if not args.Value: + die("set-synonym требует -Value <текст>") + edit_metadata("Synonym", args.Value) + print(f"✓ Синоним: {args.Value}") +elif args.Operation == "set-comment": + edit_metadata("Comment", args.Value) + print("✓ Комментарий обновлён") +else: + tmp_dir = tempfile.mkdtemp(prefix="xdto-edit_") + try: + xsd_path = os.path.join(tmp_dir, "schema.xsd") + invoke_sibling(DECOMPILE, ["-PackagePath", bin_file, "-OutFile", xsd_path], "xdto-decompile") + + doc = _parse_xml(xsd_path) + schema = doc.getroot() + old_namespace = schema.get("targetNamespace") + schema = apply_model_operation(schema) + + with open(xsd_path, "wb") as f: + f.write(etree.tostring(schema, xml_declaration=True, encoding="UTF-8")) + invoke_sibling(COMPILE, ["-XsdPath", xsd_path, "-OutputDir", config_root, + "-Name", pkg_name, "-Force"], "xdto-compile") + + if args.Operation == "set-namespace": + edit_metadata("Namespace", args.Value) + # Зависящие пакеты не трогаем: при версионировании они обязаны продолжать + # смотреть на прежний namespace. Но молчать о них нельзя. + dependents = [] + for d in sorted(os.listdir(xdto_root)): + if d == pkg_name or not os.path.isdir(os.path.join(xdto_root, d)): + continue + ob = os.path.join(xdto_root, d, "Ext", "Package.bin") + if not os.path.exists(ob): + continue + try: + for imp in _parse_xml(ob).getroot(): + if isinstance(imp.tag, str) and local(imp) == "import" \ + and imp.get("namespace") == old_namespace: + dependents.append(d) + break + except Exception: # noqa: BLE001 + pass + if dependents: + print("") + print(f"WARNING: Старый namespace импортируют пакеты ({len(dependents)}): " + + ", ".join(dependents) + + ". Они не изменены — при версионировании это верно; " + "если нет, поправьте их импорты.", file=sys.stderr) + print(f"✓ Пакет пересобран: XDTOPackages/{pkg_name}/Ext/Package.bin") + finally: + shutil.rmtree(tmp_dir, ignore_errors=True) + +if not args.NoValidate: + if os.path.exists(VALIDATE): + print("") + print("--- xdto-validate ---") + subprocess.run([sys.executable, VALIDATE, "-PackagePath", os.path.join(xdto_root, pkg_name)]) + else: + print(f"[SKIP] xdto-validate не найден: {VALIDATE}") +sys.exit(0) diff --git a/tests/skills/cases/xdto-edit/_skill.json b/tests/skills/cases/xdto-edit/_skill.json new file mode 100644 index 00000000..7b505463 --- /dev/null +++ b/tests/skills/cases/xdto-edit/_skill.json @@ -0,0 +1,11 @@ +{ + "script": "xdto-edit/scripts/xdto-edit", + "setup": "empty-config", + "args": [ + { "flag": "-PackagePath", "from": "workPath", "field": "packagePath" } + ], + "snapshot": { + "root": "workDir", + "normalizeUuids": true + } +} diff --git a/tests/skills/cases/xdto-edit/add-enum.json b/tests/skills/cases/xdto-edit/add-enum.json new file mode 100644 index 00000000..9eafa3af --- /dev/null +++ b/tests/skills/cases/xdto-edit/add-enum.json @@ -0,0 +1,32 @@ +{ + "name": "добавление значений в перечислимый тип", + "caseFiles": [ + "types.xsd" + ], + "preRun": [ + { + "script": "xdto-compile/scripts/xdto-compile", + "args": { + "-XsdPath": "{workDir}/types.xsd", + "-OutputDir": "{workDir}" + } + } + ], + "params": { + "packagePath": "XDTOPackages/types" + }, + "args_extra": [ + "-Operation", + "add-enum", + "-Target", + "ВидДокумента", + "-Value", + "Инкассо ;; Аккредитив", + "-NoValidate" + ], + "expect": { + "files": [ + "XDTOPackages/types/Ext/Package.bin" + ] + } +} diff --git a/tests/skills/cases/xdto-edit/add-import.json b/tests/skills/cases/xdto-edit/add-import.json new file mode 100644 index 00000000..36b06818 --- /dev/null +++ b/tests/skills/cases/xdto-edit/add-import.json @@ -0,0 +1,30 @@ +{ + "name": "добавление импорта", + "caseFiles": [ + "types.xsd" + ], + "preRun": [ + { + "script": "xdto-compile/scripts/xdto-compile", + "args": { + "-XsdPath": "{workDir}/types.xsd", + "-OutputDir": "{workDir}" + } + } + ], + "params": { + "packagePath": "XDTOPackages/types" + }, + "args_extra": [ + "-Operation", + "add-import", + "-Value", + "urn:test:other", + "-NoValidate" + ], + "expect": { + "files": [ + "XDTOPackages/types/Ext/Package.bin" + ] + } +} diff --git a/tests/skills/cases/xdto-edit/add-property-attribute.json b/tests/skills/cases/xdto-edit/add-property-attribute.json new file mode 100644 index 00000000..ce82d75b --- /dev/null +++ b/tests/skills/cases/xdto-edit/add-property-attribute.json @@ -0,0 +1,32 @@ +{ + "name": "добавление свойства-атрибута", + "caseFiles": [ + "types.xsd" + ], + "preRun": [ + { + "script": "xdto-compile/scripts/xdto-compile", + "args": { + "-XsdPath": "{workDir}/types.xsd", + "-OutputDir": "{workDir}" + } + } + ], + "params": { + "packagePath": "XDTOPackages/types" + }, + "args_extra": [ + "-Operation", + "add-property", + "-Target", + "Платёж", + "-Value", + "", + "-NoValidate" + ], + "expect": { + "files": [ + "XDTOPackages/types/Ext/Package.bin" + ] + } +} diff --git a/tests/skills/cases/xdto-edit/add-property.json b/tests/skills/cases/xdto-edit/add-property.json new file mode 100644 index 00000000..829f1f39 --- /dev/null +++ b/tests/skills/cases/xdto-edit/add-property.json @@ -0,0 +1,32 @@ +{ + "name": "добавление свойства в тип", + "caseFiles": [ + "types.xsd" + ], + "preRun": [ + { + "script": "xdto-compile/scripts/xdto-compile", + "args": { + "-XsdPath": "{workDir}/types.xsd", + "-OutputDir": "{workDir}" + } + } + ], + "params": { + "packagePath": "XDTOPackages/types" + }, + "args_extra": [ + "-Operation", + "add-property", + "-Target", + "Платёж", + "-Value", + "", + "-NoValidate" + ], + "expect": { + "files": [ + "XDTOPackages/types/Ext/Package.bin" + ] + } +} diff --git a/tests/skills/cases/xdto-edit/add-type.json b/tests/skills/cases/xdto-edit/add-type.json new file mode 100644 index 00000000..1e481a47 --- /dev/null +++ b/tests/skills/cases/xdto-edit/add-type.json @@ -0,0 +1,30 @@ +{ + "name": "добавление нового типа", + "caseFiles": [ + "types.xsd" + ], + "preRun": [ + { + "script": "xdto-compile/scripts/xdto-compile", + "args": { + "-XsdPath": "{workDir}/types.xsd", + "-OutputDir": "{workDir}" + } + } + ], + "params": { + "packagePath": "XDTOPackages/types" + }, + "args_extra": [ + "-Operation", + "add-type", + "-Value", + "", + "-NoValidate" + ], + "expect": { + "files": [ + "XDTOPackages/types/Ext/Package.bin" + ] + } +} diff --git a/tests/skills/cases/xdto-edit/common.xsd b/tests/skills/cases/xdto-edit/common.xsd new file mode 100644 index 00000000..927c85dd --- /dev/null +++ b/tests/skills/cases/xdto-edit/common.xsd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/remove-property-batch.json b/tests/skills/cases/xdto-edit/remove-property-batch.json new file mode 100644 index 00000000..60991d75 --- /dev/null +++ b/tests/skills/cases/xdto-edit/remove-property-batch.json @@ -0,0 +1,30 @@ +{ + "name": "удаление нескольких свойств через ;;", + "caseFiles": [ + "types.xsd" + ], + "preRun": [ + { + "script": "xdto-compile/scripts/xdto-compile", + "args": { + "-XsdPath": "{workDir}/types.xsd", + "-OutputDir": "{workDir}" + } + } + ], + "params": { + "packagePath": "XDTOPackages/types" + }, + "args_extra": [ + "-Operation", + "remove-property", + "-Target", + "Платёж.Необязательное ;; Платёж.Коллекция", + "-NoValidate" + ], + "expect": { + "files": [ + "XDTOPackages/types/Ext/Package.bin" + ] + } +} diff --git a/tests/skills/cases/xdto-edit/rename.json b/tests/skills/cases/xdto-edit/rename.json new file mode 100644 index 00000000..77485c51 --- /dev/null +++ b/tests/skills/cases/xdto-edit/rename.json @@ -0,0 +1,31 @@ +{ + "name": "переименование: объект метаданных, файлы, регистрация", + "caseFiles": [ + "types.xsd" + ], + "preRun": [ + { + "script": "xdto-compile/scripts/xdto-compile", + "args": { + "-XsdPath": "{workDir}/types.xsd", + "-OutputDir": "{workDir}" + } + } + ], + "params": { + "packagePath": "XDTOPackages/types" + }, + "args_extra": [ + "-Operation", + "rename", + "-Value", + "ОбменСБанком", + "-NoValidate" + ], + "expect": { + "files": [ + "XDTOPackages/ОбменСБанком.xml", + "XDTOPackages/ОбменСБанком/Ext/Package.bin" + ] + } +} diff --git a/tests/skills/cases/xdto-edit/replace-property.json b/tests/skills/cases/xdto-edit/replace-property.json new file mode 100644 index 00000000..38480f64 --- /dev/null +++ b/tests/skills/cases/xdto-edit/replace-property.json @@ -0,0 +1,32 @@ +{ + "name": "замена объявления свойства целиком", + "caseFiles": [ + "types.xsd" + ], + "preRun": [ + { + "script": "xdto-compile/scripts/xdto-compile", + "args": { + "-XsdPath": "{workDir}/types.xsd", + "-OutputDir": "{workDir}" + } + } + ], + "params": { + "packagePath": "XDTOPackages/types" + }, + "args_extra": [ + "-Operation", + "replace-property", + "-Target", + "Платёж.Необязательное", + "-Value", + "", + "-NoValidate" + ], + "expect": { + "files": [ + "XDTOPackages/types/Ext/Package.bin" + ] + } +} diff --git a/tests/skills/cases/xdto-edit/set-namespace.json b/tests/skills/cases/xdto-edit/set-namespace.json new file mode 100644 index 00000000..db7c2d74 --- /dev/null +++ b/tests/skills/cases/xdto-edit/set-namespace.json @@ -0,0 +1,39 @@ +{ + "name": "смена namespace: ссылки внутри пакета и объект метаданных", + "caseFiles": [ + "common.xsd", + "uses-common.xsd" + ], + "preRun": [ + { + "script": "xdto-compile/scripts/xdto-compile", + "args": { + "-XsdPath": "{workDir}/common.xsd", + "-OutputDir": "{workDir}" + } + }, + { + "script": "xdto-compile/scripts/xdto-compile", + "args": { + "-XsdPath": "{workDir}/uses-common.xsd", + "-OutputDir": "{workDir}" + } + } + ], + "params": { + "packagePath": "XDTOPackages/common" + }, + "args_extra": [ + "-Operation", + "set-namespace", + "-Value", + "urn:test:common:v2", + "-NoValidate" + ], + "expect": { + "files": [ + "XDTOPackages/common/Ext/Package.bin", + "XDTOPackages/common.xml" + ] + } +} diff --git a/tests/skills/cases/xdto-edit/set-synonym.json b/tests/skills/cases/xdto-edit/set-synonym.json new file mode 100644 index 00000000..bdf9fea8 --- /dev/null +++ b/tests/skills/cases/xdto-edit/set-synonym.json @@ -0,0 +1,30 @@ +{ + "name": "синоним в объекте метаданных", + "caseFiles": [ + "types.xsd" + ], + "preRun": [ + { + "script": "xdto-compile/scripts/xdto-compile", + "args": { + "-XsdPath": "{workDir}/types.xsd", + "-OutputDir": "{workDir}" + } + } + ], + "params": { + "packagePath": "XDTOPackages/types" + }, + "args_extra": [ + "-Operation", + "set-synonym", + "-Value", + "Обмен с банком", + "-NoValidate" + ], + "expect": { + "files": [ + "XDTOPackages/types.xml" + ] + } +} diff --git a/tests/skills/cases/xdto-edit/snapshots/add-enum/Configuration.xml b/tests/skills/cases/xdto-edit/snapshots/add-enum/Configuration.xml new file mode 100644 index 00000000..389a4b4c --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-enum/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 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_24 + 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 + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-enum/Ext/ClientApplicationInterface.xml b/tests/skills/cases/xdto-edit/snapshots/add-enum/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-enum/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-enum/Languages/Русский.xml b/tests/skills/cases/xdto-edit/snapshots/add-enum/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-enum/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-enum/XDTOPackages/types.xml b/tests/skills/cases/xdto-edit/snapshots/add-enum/XDTOPackages/types.xml new file mode 100644 index 00000000..13992fd8 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-enum/XDTOPackages/types.xml @@ -0,0 +1,16 @@ + + + + + types + + + ru + types + + + + urn:test:types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-enum/XDTOPackages/types/Ext/Package.bin b/tests/skills/cases/xdto-edit/snapshots/add-enum/XDTOPackages/types/Ext/Package.bin new file mode 100644 index 00000000..5fdffbc1 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-enum/XDTOPackages/types/Ext/Package.bin @@ -0,0 +1,28 @@ + + + + [0-9]{20} + + + Поручение + Требование + Инкассо + Аккредитив + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-enum/types.xsd b/tests/skills/cases/xdto-edit/snapshots/add-enum/types.xsd new file mode 100644 index 00000000..4f4c3507 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-enum/types.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/snapshots/add-import/Configuration.xml b/tests/skills/cases/xdto-edit/snapshots/add-import/Configuration.xml new file mode 100644 index 00000000..389a4b4c --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-import/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 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_24 + 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 + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-import/Ext/ClientApplicationInterface.xml b/tests/skills/cases/xdto-edit/snapshots/add-import/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-import/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-import/Languages/Русский.xml b/tests/skills/cases/xdto-edit/snapshots/add-import/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-import/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-import/XDTOPackages/types.xml b/tests/skills/cases/xdto-edit/snapshots/add-import/XDTOPackages/types.xml new file mode 100644 index 00000000..13992fd8 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-import/XDTOPackages/types.xml @@ -0,0 +1,16 @@ + + + + + types + + + ru + types + + + + urn:test:types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-import/XDTOPackages/types/Ext/Package.bin b/tests/skills/cases/xdto-edit/snapshots/add-import/XDTOPackages/types/Ext/Package.bin new file mode 100644 index 00000000..45055d34 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-import/XDTOPackages/types/Ext/Package.bin @@ -0,0 +1,27 @@ + + + + + [0-9]{20} + + + Поручение + Требование + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-import/types.xsd b/tests/skills/cases/xdto-edit/snapshots/add-import/types.xsd new file mode 100644 index 00000000..4f4c3507 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-import/types.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Configuration.xml b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Configuration.xml new file mode 100644 index 00000000..389a4b4c --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 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_24 + 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 + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Ext/ClientApplicationInterface.xml b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Languages/Русский.xml b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/XDTOPackages/types.xml b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/XDTOPackages/types.xml new file mode 100644 index 00000000..13992fd8 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/XDTOPackages/types.xml @@ -0,0 +1,16 @@ + + + + + types + + + ru + types + + + + urn:test:types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/XDTOPackages/types/Ext/Package.bin b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/XDTOPackages/types/Ext/Package.bin new file mode 100644 index 00000000..81828003 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/XDTOPackages/types/Ext/Package.bin @@ -0,0 +1,27 @@ + + + + [0-9]{20} + + + Поручение + Требование + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/types.xsd b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/types.xsd new file mode 100644 index 00000000..4f4c3507 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property-attribute/types.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property/Configuration.xml b/tests/skills/cases/xdto-edit/snapshots/add-property/Configuration.xml new file mode 100644 index 00000000..389a4b4c --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 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_24 + 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 + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property/Ext/ClientApplicationInterface.xml b/tests/skills/cases/xdto-edit/snapshots/add-property/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property/Languages/Русский.xml b/tests/skills/cases/xdto-edit/snapshots/add-property/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property/XDTOPackages/types.xml b/tests/skills/cases/xdto-edit/snapshots/add-property/XDTOPackages/types.xml new file mode 100644 index 00000000..13992fd8 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property/XDTOPackages/types.xml @@ -0,0 +1,16 @@ + + + + + types + + + ru + types + + + + urn:test:types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property/XDTOPackages/types/Ext/Package.bin b/tests/skills/cases/xdto-edit/snapshots/add-property/XDTOPackages/types/Ext/Package.bin new file mode 100644 index 00000000..05d9abe6 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property/XDTOPackages/types/Ext/Package.bin @@ -0,0 +1,27 @@ + + + + [0-9]{20} + + + Поручение + Требование + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-property/types.xsd b/tests/skills/cases/xdto-edit/snapshots/add-property/types.xsd new file mode 100644 index 00000000..4f4c3507 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-property/types.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/snapshots/add-type/Configuration.xml b/tests/skills/cases/xdto-edit/snapshots/add-type/Configuration.xml new file mode 100644 index 00000000..389a4b4c --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-type/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 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_24 + 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 + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-type/Ext/ClientApplicationInterface.xml b/tests/skills/cases/xdto-edit/snapshots/add-type/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-type/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-type/Languages/Русский.xml b/tests/skills/cases/xdto-edit/snapshots/add-type/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-type/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-type/XDTOPackages/types.xml b/tests/skills/cases/xdto-edit/snapshots/add-type/XDTOPackages/types.xml new file mode 100644 index 00000000..13992fd8 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-type/XDTOPackages/types.xml @@ -0,0 +1,16 @@ + + + + + types + + + ru + types + + + + urn:test:types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-type/XDTOPackages/types/Ext/Package.bin b/tests/skills/cases/xdto-edit/snapshots/add-type/XDTOPackages/types/Ext/Package.bin new file mode 100644 index 00000000..93ed9904 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-type/XDTOPackages/types/Ext/Package.bin @@ -0,0 +1,29 @@ + + + + [0-9]{20} + + + Поручение + Требование + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/add-type/types.xsd b/tests/skills/cases/xdto-edit/snapshots/add-type/types.xsd new file mode 100644 index 00000000..4f4c3507 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/add-type/types.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Configuration.xml b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Configuration.xml new file mode 100644 index 00000000..389a4b4c --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 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_24 + 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 + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Ext/ClientApplicationInterface.xml b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Languages/Русский.xml b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/XDTOPackages/types.xml b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/XDTOPackages/types.xml new file mode 100644 index 00000000..13992fd8 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/XDTOPackages/types.xml @@ -0,0 +1,16 @@ + + + + + types + + + ru + types + + + + urn:test:types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/XDTOPackages/types/Ext/Package.bin b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/XDTOPackages/types/Ext/Package.bin new file mode 100644 index 00000000..f29bb86f --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/XDTOPackages/types/Ext/Package.bin @@ -0,0 +1,24 @@ + + + + [0-9]{20} + + + Поручение + Требование + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/types.xsd b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/types.xsd new file mode 100644 index 00000000..4f4c3507 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/remove-property-batch/types.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/snapshots/rename/Configuration.xml b/tests/skills/cases/xdto-edit/snapshots/rename/Configuration.xml new file mode 100644 index 00000000..f42b6da8 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/rename/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 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_24 + 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 + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + ОбменСБанком + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/rename/Ext/ClientApplicationInterface.xml b/tests/skills/cases/xdto-edit/snapshots/rename/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/rename/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/rename/Languages/Русский.xml b/tests/skills/cases/xdto-edit/snapshots/rename/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/rename/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/rename/XDTOPackages/ОбменСБанком.xml b/tests/skills/cases/xdto-edit/snapshots/rename/XDTOPackages/ОбменСБанком.xml new file mode 100644 index 00000000..e278d4c6 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/rename/XDTOPackages/ОбменСБанком.xml @@ -0,0 +1,16 @@ + + + + + ОбменСБанком + + + ru + types + + + + urn:test:types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/rename/XDTOPackages/ОбменСБанком/Ext/Package.bin b/tests/skills/cases/xdto-edit/snapshots/rename/XDTOPackages/ОбменСБанком/Ext/Package.bin new file mode 100644 index 00000000..4031d43f --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/rename/XDTOPackages/ОбменСБанком/Ext/Package.bin @@ -0,0 +1,26 @@ + + + + [0-9]{20} + + + Поручение + Требование + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/rename/types.xsd b/tests/skills/cases/xdto-edit/snapshots/rename/types.xsd new file mode 100644 index 00000000..4f4c3507 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/rename/types.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/snapshots/replace-property/Configuration.xml b/tests/skills/cases/xdto-edit/snapshots/replace-property/Configuration.xml new file mode 100644 index 00000000..389a4b4c --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/replace-property/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 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_24 + 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 + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/replace-property/Ext/ClientApplicationInterface.xml b/tests/skills/cases/xdto-edit/snapshots/replace-property/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/replace-property/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/replace-property/Languages/Русский.xml b/tests/skills/cases/xdto-edit/snapshots/replace-property/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/replace-property/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/replace-property/XDTOPackages/types.xml b/tests/skills/cases/xdto-edit/snapshots/replace-property/XDTOPackages/types.xml new file mode 100644 index 00000000..13992fd8 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/replace-property/XDTOPackages/types.xml @@ -0,0 +1,16 @@ + + + + + types + + + ru + types + + + + urn:test:types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/replace-property/XDTOPackages/types/Ext/Package.bin b/tests/skills/cases/xdto-edit/snapshots/replace-property/XDTOPackages/types/Ext/Package.bin new file mode 100644 index 00000000..1a92a614 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/replace-property/XDTOPackages/types/Ext/Package.bin @@ -0,0 +1,26 @@ + + + + [0-9]{20} + + + Поручение + Требование + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/replace-property/types.xsd b/tests/skills/cases/xdto-edit/snapshots/replace-property/types.xsd new file mode 100644 index 00000000..4f4c3507 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/replace-property/types.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/snapshots/set-namespace/Configuration.xml b/tests/skills/cases/xdto-edit/snapshots/set-namespace/Configuration.xml new file mode 100644 index 00000000..05a1dd19 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-namespace/Configuration.xml @@ -0,0 +1,253 @@ + + + + + + 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_24 + 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 + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + common + uses_common + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-namespace/Ext/ClientApplicationInterface.xml b/tests/skills/cases/xdto-edit/snapshots/set-namespace/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-namespace/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-namespace/Languages/Русский.xml b/tests/skills/cases/xdto-edit/snapshots/set-namespace/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-namespace/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/common.xml b/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/common.xml new file mode 100644 index 00000000..2454db9c --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/common.xml @@ -0,0 +1,16 @@ + + + + + common + + + ru + common + + + + urn:test:common:v2 + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/common/Ext/Package.bin b/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/common/Ext/Package.bin new file mode 100644 index 00000000..979575ab --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/common/Ext/Package.bin @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/uses_common.xml b/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/uses_common.xml new file mode 100644 index 00000000..93f6d93c --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/uses_common.xml @@ -0,0 +1,16 @@ + + + + + uses_common + + + ru + uses_common + + + + urn:test:uses + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/uses_common/Ext/Package.bin b/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/uses_common/Ext/Package.bin new file mode 100644 index 00000000..a0be6645 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-namespace/XDTOPackages/uses_common/Ext/Package.bin @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-namespace/common.xsd b/tests/skills/cases/xdto-edit/snapshots/set-namespace/common.xsd new file mode 100644 index 00000000..927c85dd --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-namespace/common.xsd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/snapshots/set-namespace/uses-common.xsd b/tests/skills/cases/xdto-edit/snapshots/set-namespace/uses-common.xsd new file mode 100644 index 00000000..2de94e0f --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-namespace/uses-common.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/snapshots/set-synonym/Configuration.xml b/tests/skills/cases/xdto-edit/snapshots/set-synonym/Configuration.xml new file mode 100644 index 00000000..389a4b4c --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-synonym/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 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_24 + 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 + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-synonym/Ext/ClientApplicationInterface.xml b/tests/skills/cases/xdto-edit/snapshots/set-synonym/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-synonym/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-synonym/Languages/Русский.xml b/tests/skills/cases/xdto-edit/snapshots/set-synonym/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-synonym/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-synonym/XDTOPackages/types.xml b/tests/skills/cases/xdto-edit/snapshots/set-synonym/XDTOPackages/types.xml new file mode 100644 index 00000000..64ac9323 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-synonym/XDTOPackages/types.xml @@ -0,0 +1,16 @@ + + + + + types + + + ru + Обмен с банком + + + + urn:test:types + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-synonym/XDTOPackages/types/Ext/Package.bin b/tests/skills/cases/xdto-edit/snapshots/set-synonym/XDTOPackages/types/Ext/Package.bin new file mode 100644 index 00000000..4031d43f --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-synonym/XDTOPackages/types/Ext/Package.bin @@ -0,0 +1,26 @@ + + + + [0-9]{20} + + + Поручение + Требование + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/xdto-edit/snapshots/set-synonym/types.xsd b/tests/skills/cases/xdto-edit/snapshots/set-synonym/types.xsd new file mode 100644 index 00000000..4f4c3507 --- /dev/null +++ b/tests/skills/cases/xdto-edit/snapshots/set-synonym/types.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/types.xsd b/tests/skills/cases/xdto-edit/types.xsd new file mode 100644 index 00000000..4f4c3507 --- /dev/null +++ b/tests/skills/cases/xdto-edit/types.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/skills/cases/xdto-edit/uses-common.xsd b/tests/skills/cases/xdto-edit/uses-common.xsd new file mode 100644 index 00000000..2de94e0f --- /dev/null +++ b/tests/skills/cases/xdto-edit/uses-common.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + +