diff --git a/.claude/skills/cf-init/scripts/cf-init.ps1 b/.claude/skills/cf-init/scripts/cf-init.ps1 index 6cab99d3..0834c0ad 100644 --- a/.claude/skills/cf-init/scripts/cf-init.ps1 +++ b/.claude/skills/cf-init/scripts/cf-init.ps1 @@ -1,4 +1,4 @@ -# cf-init v1.7 — Create empty 1C configuration scaffold +# cf-init v1.8 — Create empty 1C configuration scaffold # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -43,6 +43,9 @@ $co6 = [guid]::NewGuid().ToString() $co7 = [guid]::NewGuid().ToString() # --- Mobile functionalities --- +# Версия формата как число — по ней ниже включаются вставки 2.21. +$is221 = (($FormatVersion -match '^(\d+)\.(\d+)$') -and ([int]$Matches[1] * 100 + [int]$Matches[2]) -ge 221) + $mobileFuncs = @( @("Biometrics","true"), @("Location","false"), @("BackgroundLocation","false"), @("BluetoothPrinters","false"), @("WiFiPrinters","false"), @("Contacts","false"), @@ -59,6 +62,9 @@ $mobileFuncs = @( @("DocumentScanning","false"), @("SpeechToText","false"), @("Geofences","false"), @("IncomingShareRequests","false"), @("AllIncomingShareRequestsTypesProcessing","false") ) +# TextToSpeech — возможность мобильного приложения, добавленная форматом 2.21 (8.5), +# последней в списке. На младших форматах платформа её не пишет. +if ($is221) { $mobileFuncs += ,@("TextToSpeech","false") } $mobileXml = "" foreach ($mf in $mobileFuncs) { @@ -81,7 +87,6 @@ $versionEl = if ($Version) { "$([System.Security.SecurityElement]::Esca # Значения и ПОЗИЦИИ сняты с выгрузки 8.5.1 (debug/fmt221/dump_v851): те же исходники, # выгруженные с 8.3.27 и с 8.5.1, различаются ровно этим. Порядок важен — вставки идут # на своё место, а не в конец. -$is221 = (($FormatVersion -match '^(\d+)\.(\d+)$') -and ([int]$Matches[1] * 100 + [int]$Matches[2]) -ge 221) $nl = "`r`n" $f221AuxForms = ""; $f221WindowVariant = ""; $f221OpenVariant = ""; $f221Captions = ""; $f221Migration = "" $palNs = "" diff --git a/.claude/skills/cf-init/scripts/cf-init.py b/.claude/skills/cf-init/scripts/cf-init.py index 909960df..7d5249a6 100644 --- a/.claude/skills/cf-init/scripts/cf-init.py +++ b/.claude/skills/cf-init/scripts/cf-init.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# cf-init v1.7 — Create empty 1C configuration scaffold +# cf-init v1.8 — Create empty 1C configuration scaffold # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills """Generates minimal XML source files for a 1C configuration.""" import sys, os, argparse, re, uuid @@ -64,6 +64,10 @@ def main(): co = [new_uuid() for _ in range(7)] # --- Mobile functionalities --- + # Версия формата как число — по ней ниже включаются вставки 2.21. + _fm = re.match(r'^(\d+)\.(\d+)$', args.FormatVersion) + is_221 = bool(_fm) and int(_fm.group(1)) * 100 + int(_fm.group(2)) >= 221 + mobile_funcs = [ ("Biometrics","true"), ("Location","false"), ("BackgroundLocation","false"), ("BluetoothPrinters","false"), ("WiFiPrinters","false"), ("Contacts","false"), @@ -80,6 +84,10 @@ def main(): ("DocumentScanning","false"), ("SpeechToText","false"), ("Geofences","false"), ("IncomingShareRequests","false"), ("AllIncomingShareRequestsTypesProcessing","false"), ] + # TextToSpeech — возможность мобильного приложения, добавленная форматом 2.21 (8.5), + # последней в списке. На младших форматах платформа её не пишет. + if is_221: + mobile_funcs.append(("TextToSpeech", "false")) mobile_xml = "" for func_name, func_use in mobile_funcs: @@ -108,8 +116,6 @@ def main(): # Свойства и пространство имён формата 2.21 (платформа 8.5). Значения и ПОЗИЦИИ сняты # с выгрузки 8.5.1 (debug/fmt221/dump_v851): те же исходники, выгруженные с 8.3.27 и # с 8.5.1, различаются ровно этим. Порядок важен — вставки идут на своё место. - _fm = re.match(r'^(\d+)\.(\d+)$', args.FormatVersion) - is_221 = bool(_fm) and int(_fm.group(1)) * 100 + int(_fm.group(2)) >= 221 pal_ns = "" f221_aux_forms = f221_window_variant = f221_open_variant = f221_captions = f221_migration = "" if is_221: diff --git a/.claude/skills/form-add/scripts/form-add.ps1 b/.claude/skills/form-add/scripts/form-add.ps1 index 1fc8d936..df95180a 100644 --- a/.claude/skills/form-add/scripts/form-add.ps1 +++ b/.claude/skills/form-add/scripts/form-add.ps1 @@ -1,4 +1,4 @@ -# form-add v1.22 — Add managed form to 1C config object +# form-add v1.23 — Add managed form to 1C config object # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -347,6 +347,13 @@ if ($objectType -in $processorLikeTypes) { $extPresentationLine = "`n`t`t`t" } +# Использование в режиме совместимости интерфейса — свойство формата 2.21 (8.5), +# сразу после UsePurposes (проверено по выгрузке 8.5, до ExtendedPresentation). +$useInIfcLine = "" +if ((Get-FormatRank $script:formatVersion) -ge 221) { + $useInIfcLine = "`n`t`t`tAny" +} + $formMetaXml = @" @@ -365,7 +372,7 @@ $formMetaXml = @" PlatformApplication MobilePlatformApplication - $extPresentationLine + $useInIfcLine$extPresentationLine diff --git a/.claude/skills/form-add/scripts/form-add.py b/.claude/skills/form-add/scripts/form-add.py index 3360ca2a..4e198602 100644 --- a/.claude/skills/form-add/scripts/form-add.py +++ b/.claude/skills/form-add/scripts/form-add.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# form-add v1.22 — Add managed form to 1C config object +# form-add v1.23 — Add managed form to 1C config object # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -493,6 +493,10 @@ def main(): '\t\t\t\tPlatformApplication\n' '\t\t\t\tMobilePlatformApplication\n' '\t\t\t\n' + # Использование в режиме совместимости интерфейса — свойство формата 2.21 (8.5), + # сразу после UsePurposes (проверено по выгрузке 8.5, до ExtendedPresentation). + + ('\t\t\tAny\n' + if format_rank(format_version) >= 221 else '') + ('\t\t\t\n' if object_type in processor_like_types else '') + '\t\t\n' '\t\n' diff --git a/tests/skills/cases/cf-init/format-221.json b/tests/skills/cases/cf-init/format-221.json index 3aae2b67..afd0faa2 100644 --- a/tests/skills/cases/cf-init/format-221.json +++ b/tests/skills/cases/cf-init/format-221.json @@ -20,6 +20,10 @@ { "file": "Languages/Русский.xml", "text": "xmlns:lf=\"http://v8.1c.ru/8.2/managed-application/logform\" xmlns:pal=\"http://v8.1c.ru/8.1/data/ui/colors/palette\" xmlns:style=" + }, + { + "file": "Configuration.xml", + "text": "TextToSpeech" } ], "fileNotContains": { diff --git a/tests/skills/cases/cf-init/snapshots/format-221/Configuration.xml b/tests/skills/cases/cf-init/snapshots/format-221/Configuration.xml index 0c36307e..ae6bdda6 100644 --- a/tests/skills/cases/cf-init/snapshots/format-221/Configuration.xml +++ b/tests/skills/cases/cf-init/snapshots/format-221/Configuration.xml @@ -230,6 +230,10 @@ AllIncomingShareRequestsTypesProcessing false + + TextToSpeech + false + diff --git a/tests/skills/cases/cfe-borrow/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml b/tests/skills/cases/cfe-borrow/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml index 8afb1cf0..e6f0cbdd 100644 --- a/tests/skills/cases/cfe-borrow/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml +++ b/tests/skills/cases/cfe-borrow/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml @@ -16,6 +16,7 @@ PlatformApplication MobilePlatformApplication + Any \ No newline at end of file diff --git a/tests/skills/cases/form-add/format-221.json b/tests/skills/cases/form-add/format-221.json index f3b88e35..20007bd0 100644 --- a/tests/skills/cases/form-add/format-221.json +++ b/tests/skills/cases/form-add/format-221.json @@ -23,7 +23,10 @@ "fileContains": [ { "file": "Catalogs/Товары/Forms/ФормаЭлемента.xml", - "text": "xmlns:lf=\"http://v8.1c.ru/8.2/managed-application/logform\" xmlns:pal=\"http://v8.1c.ru/8.1/data/ui/colors/palette\" xmlns:style=" + "text": [ + "xmlns:lf=\"http://v8.1c.ru/8.2/managed-application/logform\" xmlns:pal=\"http://v8.1c.ru/8.1/data/ui/colors/palette\" xmlns:style=", + "Any" + ] }, { "file": "Catalogs/Товары/Forms/ФормаЭлемента/Ext/Form.xml", diff --git a/tests/skills/cases/form-add/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml b/tests/skills/cases/form-add/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml index 8afb1cf0..e6f0cbdd 100644 --- a/tests/skills/cases/form-add/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml +++ b/tests/skills/cases/form-add/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml @@ -16,6 +16,7 @@ PlatformApplication MobilePlatformApplication + Any \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml b/tests/skills/cases/form-compile/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml index 8afb1cf0..e6f0cbdd 100644 --- a/tests/skills/cases/form-compile/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml +++ b/tests/skills/cases/form-compile/snapshots/format-221/Catalogs/Товары/Forms/ФормаЭлемента.xml @@ -16,6 +16,7 @@ PlatformApplication MobilePlatformApplication + Any \ No newline at end of file