mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-09-07 18:50:53 +03:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25a310312e |
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"name": "cc-1c-skills",
|
||||
"interface": {
|
||||
"displayName": "1C Skills"
|
||||
},
|
||||
"plugins": [
|
||||
{
|
||||
"name": "1c-skills",
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/Nikolay-Shirokov/cc-1c-skills.git",
|
||||
"ref": "port-codex"
|
||||
},
|
||||
"policy": {
|
||||
"installation": "AVAILABLE"
|
||||
},
|
||||
"category": "Development"
|
||||
},
|
||||
{
|
||||
"name": "1c-skills-py",
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/Nikolay-Shirokov/cc-1c-skills.git",
|
||||
"ref": "port-codex-py"
|
||||
},
|
||||
"policy": {
|
||||
"installation": "AVAILABLE"
|
||||
},
|
||||
"category": "Development"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/claude-code-marketplace-manifest.json",
|
||||
"name": "cc-1c-skills",
|
||||
"description": "Маркетплейс навыков для разработки на платформе 1С:Предприятие",
|
||||
"owner": {
|
||||
"name": "Nikolay Shirokov"
|
||||
},
|
||||
"plugins": [
|
||||
{
|
||||
"name": "1c-skills",
|
||||
"source": "./",
|
||||
"description": "[PowerShell] Навыки для разработки на 1С:Предприятие 8.3 — абстракции над XML-форматами и CLI конфигуратора, плюс глаза и руки для тестирования через веб-клиент."
|
||||
},
|
||||
{
|
||||
"name": "1c-skills-py",
|
||||
"source": {
|
||||
"source": "github",
|
||||
"repo": "Nikolay-Shirokov/cc-1c-skills",
|
||||
"ref": "port-claude-code-py"
|
||||
},
|
||||
"description": "[Python] То же — для Linux/Mac или когда PowerShell недоступен."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
|
||||
"name": "1c-skills",
|
||||
"description": "[PowerShell] Навыки для разработки на 1С:Предприятие 8.3 — абстракции над XML-форматами и CLI конфигуратора, плюс глаза и руки для тестирования через веб-клиент.",
|
||||
"name": "1c-skills-py",
|
||||
"description": "[Python] Навыки для разработки на 1С:Предприятие 8.3 — абстракции над XML-форматами и CLI конфигуратора, плюс глаза и руки для тестирования через веб-клиент. Linux/Mac или когда PowerShell недоступен.",
|
||||
"author": {
|
||||
"name": "Nikolay Shirokov"
|
||||
},
|
||||
|
||||
@@ -24,7 +24,7 @@ allowed-tools:
|
||||
| `NoValidate` | Пропустить авто-валидацию |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cf-edit.ps1" -ConfigPath '<path>' -Operation modify-property -Value 'Version=1.0.0.1'
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cf-edit.py" -ConfigPath '<path>' -Operation modify-property -Value 'Version=1.0.0.1'
|
||||
```
|
||||
|
||||
## Операции
|
||||
|
||||
@@ -23,7 +23,7 @@ allowed-tools:
|
||||
| `OutFile` | Записать результат в файл (UTF-8 BOM) |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cf-info.ps1" -ConfigPath "<путь>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cf-info.py" -ConfigPath "<путь>"
|
||||
```
|
||||
|
||||
## Три режима
|
||||
|
||||
@@ -39,7 +39,7 @@ allowed-tools:
|
||||
не будет.
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cf-init.ps1" -Name "МояКонфигурация"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cf-init.py" -Name "МояКонфигурация"
|
||||
```
|
||||
|
||||
## Примеры
|
||||
|
||||
@@ -24,6 +24,6 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cf-validate.ps1" -ConfigPath "upload/cfempty"
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cf-validate.ps1" -ConfigPath "upload/cfempty/Configuration.xml"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cf-validate.py" -ConfigPath "upload/cfempty"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cf-validate.py" -ConfigPath "upload/cfempty/Configuration.xml"
|
||||
```
|
||||
|
||||
@@ -71,7 +71,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cfe-borrow.ps1" -ExtensionPath src\cfe\extname -ConfigPath src\cf -Object "Catalog.Контрагенты"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cfe-borrow.py" -ExtensionPath src\cfe\extname -ConfigPath src\cf -Object "Catalog.Контрагенты"
|
||||
```
|
||||
|
||||
## Примеры
|
||||
|
||||
@@ -23,7 +23,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cfe-diff.ps1" -ExtensionPath src\cfe\extname -ConfigPath src\cf -Mode A
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cfe-diff.py" -ExtensionPath src\cfe\extname -ConfigPath src\cf -Mode A
|
||||
```
|
||||
|
||||
## Mode A — обзор расширения
|
||||
|
||||
@@ -44,7 +44,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cfe-init.ps1" -Name "МоёРасширение" -OutputDir "src\cfe\МоёРасширение" -ConfigPath "src\cf"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cfe-init.py" -Name "МоёРасширение" -OutputDir "src\cfe\МоёРасширение" -ConfigPath "src\cf"
|
||||
```
|
||||
|
||||
## Примеры
|
||||
|
||||
@@ -112,7 +112,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cfe-patch-method.ps1" -ExtensionPath src\cfe\extname -ConfigPath src\cf -ModulePath "Catalog.Контрагенты.ObjectModule" -MethodName "ПриЗаписи" -InterceptorType Before
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cfe-patch-method.py" -ExtensionPath src\cfe\extname -ConfigPath src\cf -ModulePath "Catalog.Контрагенты.ObjectModule" -MethodName "ПриЗаписи" -InterceptorType Before
|
||||
```
|
||||
|
||||
## Примеры
|
||||
|
||||
@@ -36,7 +36,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cfe-validate.ps1" -ExtensionPath "src\cfe\extname"
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cfe-validate.ps1" -ExtensionPath "src\cfe\extname\Configuration.xml"
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cfe-validate.ps1" -ExtensionPath "src\cfe\extname" -ConfigPath "src\cf"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cfe-validate.py" -ExtensionPath "src\cfe\extname"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cfe-validate.py" -ExtensionPath "src\cfe\extname\Configuration.xml"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/cfe-validate.py" -ExtensionPath "src\cfe\extname" -ConfigPath "src\cf"
|
||||
```
|
||||
|
||||
@@ -36,7 +36,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-cfe-admin.ps1" -Command <команда> <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-cfe-admin.py" -Command <команда> <параметры>
|
||||
```
|
||||
|
||||
### Общие параметры
|
||||
|
||||
@@ -31,7 +31,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-create.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-create.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -59,14 +59,14 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-create.ps1" <п
|
||||
|
||||
```powershell
|
||||
# Создать файловую базу
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-create.ps1" -InfoBasePath "C:\Bases\NewDB"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-create.py" -InfoBasePath "C:\Bases\NewDB"
|
||||
|
||||
# Создать серверную базу
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-create.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Test"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-create.py" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Test"
|
||||
|
||||
# Создать из шаблона CF
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-create.ps1" -InfoBasePath "C:\Bases\NewDB" -UseTemplate "C:\Templates\config.cf"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-create.py" -InfoBasePath "C:\Bases\NewDB" -UseTemplate "C:\Templates\config.cf"
|
||||
|
||||
# Создать и добавить в список баз
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-create.ps1" -InfoBasePath "C:\Bases\NewDB" -AddToList -ListName "Новая база"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-create.py" -InfoBasePath "C:\Bases\NewDB" -AddToList -ListName "Новая база"
|
||||
```
|
||||
|
||||
@@ -35,7 +35,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-cf.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-cf.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -60,11 +60,11 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-cf.ps1" <п
|
||||
|
||||
```powershell
|
||||
# Выгрузка конфигурации (файловая база)
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-cf.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -OutputFile "C:\backup\config.cf"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-cf.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -OutputFile "C:\backup\config.cf"
|
||||
|
||||
# Серверная база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-cf.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Dev" -UserName "Admin" -Password "secret" -OutputFile "config.cf"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-cf.py" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Dev" -UserName "Admin" -Password "secret" -OutputFile "config.cf"
|
||||
|
||||
# Выгрузка расширения
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-cf.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -OutputFile "ext.cfe" -Extension "МоёРасширение"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-cf.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -OutputFile "ext.cfe" -Extension "МоёРасширение"
|
||||
```
|
||||
|
||||
@@ -38,7 +38,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-dt.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-dt.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -61,10 +61,10 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-dt.ps1" <п
|
||||
|
||||
```powershell
|
||||
# Выгрузка ИБ (файловая база)
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-dt.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -OutputFile "C:\backup\base.dt"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-dt.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -OutputFile "C:\backup\base.dt"
|
||||
|
||||
# Серверная база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-dt.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Dev" -UserName "Admin" -Password "secret" -OutputFile "base.dt"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-dt.py" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Dev" -UserName "Admin" -Password "secret" -OutputFile "base.dt"
|
||||
```
|
||||
|
||||
## Связанные навыки
|
||||
|
||||
@@ -38,7 +38,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -77,17 +77,17 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.ps1" <
|
||||
|
||||
```powershell
|
||||
# Полная выгрузка (файловая база)
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.ps1" -V8Path "C:\Program Files\1cv8\8.3.25.1257\bin" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Full
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.py" -V8Path "C:\Program Files\1cv8\8.3.25.1257\bin" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Full
|
||||
|
||||
# Инкрементальная выгрузка
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Changes
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Changes
|
||||
|
||||
# Частичная выгрузка
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Partial -Objects "Справочник.Номенклатура,Документ.Заказ"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Partial -Objects "Справочник.Номенклатура,Документ.Заказ"
|
||||
|
||||
# Серверная база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Dev" -UserName "Admin" -Password "secret" -ConfigDir "C:\WS\cfsrc" -Mode Full
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.py" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Dev" -UserName "Admin" -Password "secret" -ConfigDir "C:\WS\cfsrc" -Mode Full
|
||||
|
||||
# Выгрузка расширения
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\ext_src" -Mode Full -Extension "МоёРасширение"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-dump-xml.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\ext_src" -Mode Full -Extension "МоёРасширение"
|
||||
```
|
||||
|
||||
@@ -36,7 +36,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-cf.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-cf.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -66,11 +66,11 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-cf.ps1" <п
|
||||
|
||||
```powershell
|
||||
# Файловая база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-cf.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -InputFile "C:\backup\config.cf"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-cf.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -InputFile "C:\backup\config.cf"
|
||||
|
||||
# Серверная база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-cf.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Test" -UserName "Admin" -Password "secret" -InputFile "config.cf"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-cf.py" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Test" -UserName "Admin" -Password "secret" -InputFile "config.cf"
|
||||
|
||||
# Загрузка расширения
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-cf.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -InputFile "ext.cfe" -Extension "МоёРасширение"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-cf.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -InputFile "ext.cfe" -Extension "МоёРасширение"
|
||||
```
|
||||
|
||||
@@ -52,7 +52,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-dt.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-dt.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -82,10 +82,10 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-dt.ps1" <п
|
||||
|
||||
```powershell
|
||||
# Файловая база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-dt.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -InputFile "C:\backup\base.dt"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-dt.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -InputFile "C:\backup\base.dt"
|
||||
|
||||
# Серверная база с ускорением загрузки
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-dt.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Test" -UserName "Admin" -Password "secret" -InputFile "base.dt" -JobsCount 4
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-dt.py" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Test" -UserName "Admin" -Password "secret" -InputFile "base.dt" -JobsCount 4
|
||||
```
|
||||
|
||||
## Связанные навыки
|
||||
|
||||
@@ -38,7 +38,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-git.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-git.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -73,8 +73,8 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-git.ps1" <
|
||||
|
||||
```powershell
|
||||
# Все незафиксированные изменения
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-git.ps1" -V8Path "C:\Program Files\1cv8\8.3.25.1257\bin" -InfoBasePath "C:\Bases\MyDB" -ConfigDir "C:\WS\cfsrc" -Source All -UpdateDB
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-git.py" -V8Path "C:\Program Files\1cv8\8.3.25.1257\bin" -InfoBasePath "C:\Bases\MyDB" -ConfigDir "C:\WS\cfsrc" -Source All -UpdateDB
|
||||
|
||||
# Из диапазона коммитов
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-git.ps1" -InfoBasePath "C:\Bases\MyDB" -ConfigDir "C:\WS\cfsrc" -Source Commit -CommitRange "HEAD~3..HEAD"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-git.py" -InfoBasePath "C:\Bases\MyDB" -ConfigDir "C:\WS\cfsrc" -Source Commit -CommitRange "HEAD~3..HEAD"
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-xml.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-xml.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -92,14 +92,14 @@ Documents/Заказ/Forms/ФормаДокумента.xml
|
||||
|
||||
```powershell
|
||||
# Полная загрузка
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-xml.ps1" -V8Path "C:\Program Files\1cv8\8.3.25.1257\bin" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Full
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-xml.py" -V8Path "C:\Program Files\1cv8\8.3.25.1257\bin" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Full
|
||||
|
||||
# Частичная загрузка конкретных файлов
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-xml.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Partial -Files "Catalogs/Номенклатура.xml,Catalogs/Номенклатура/Ext/ObjectModule.bsl"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-xml.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Partial -Files "Catalogs/Номенклатура.xml,Catalogs/Номенклатура/Ext/ObjectModule.bsl"
|
||||
|
||||
# Загрузка расширения
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-xml.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\ext_src" -Mode Full -Extension "МоёРасширение"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-xml.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\ext_src" -Mode Full -Extension "МоёРасширение"
|
||||
|
||||
# Загрузка + обновление БД в одном запуске
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-xml.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Full -UpdateDB
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-load-xml.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Full -UpdateDB
|
||||
```
|
||||
|
||||
@@ -76,7 +76,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command <подкоманда> <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command <подкоманда> <параметры>
|
||||
```
|
||||
|
||||
### Рабочий цикл
|
||||
@@ -174,22 +174,22 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Comma
|
||||
|
||||
```powershell
|
||||
# Захватить справочник вместе с подчинёнными объектами
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command lock -InfoBasePath "C:\Bases\MyDB" -Objects "Справочник.Номенклатура" -WithChildren
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command lock -InfoBasePath "C:\Bases\MyDB" -Objects "Справочник.Номенклатура" -WithChildren
|
||||
|
||||
# Захватить корень — он нужен, чтобы добавить или удалить объект конфигурации
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command lock -InfoBasePath "C:\Bases\MyDB" -Objects "Конфигурация"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command lock -InfoBasePath "C:\Bases\MyDB" -Objects "Конфигурация"
|
||||
|
||||
# Поместить новый объект: он уже существует, поэтому называется вместе с корнем
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command commit -InfoBasePath "C:\Bases\MyDB" -Objects "Конфигурация,Справочник.Склады" -Comment "Добавлен справочник Склады"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command commit -InfoBasePath "C:\Bases\MyDB" -Objects "Конфигурация,Справочник.Склады" -Comment "Добавлен справочник Склады"
|
||||
|
||||
# Поместить с комментарием, оставив захват
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command commit -InfoBasePath "C:\Bases\MyDB" -Objects "Справочник.Номенклатура" -Comment "Добавлен реквизит Артикул" -KeepLocked
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command commit -InfoBasePath "C:\Bases\MyDB" -Objects "Справочник.Номенклатура" -Comment "Добавлен реквизит Артикул" -KeepLocked
|
||||
|
||||
# Получить изменения из хранилища
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command update -InfoBasePath "C:\Bases\MyDB"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command update -InfoBasePath "C:\Bases\MyDB"
|
||||
|
||||
# Серверная база, расширение
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command lock -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Dev" -UserName "Admin" -Extension "МоёРасширение" -Objects "Справочник.Номенклатура"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command lock -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Dev" -UserName "Admin" -Extension "МоёРасширение" -Objects "Справочник.Номенклатура"
|
||||
```
|
||||
|
||||
## После выполнения
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## create — создать хранилище
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command create -InfoBasePath "C:\Bases\MyDB" -RepositoryPath "C:\Repo\MyApp" -RepositoryUser "Admin" -RepositoryPassword "…"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command create -InfoBasePath "C:\Bases\MyDB" -RepositoryPath "C:\Repo\MyApp" -RepositoryUser "Admin" -RepositoryPassword "…"
|
||||
```
|
||||
|
||||
| Параметр | Описание |
|
||||
@@ -22,7 +22,7 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Comma
|
||||
## add-user — создать пользователя
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command add-user -InfoBasePath "C:\Bases\MyDB" -NewUser "Ivanov" -NewUserPassword "…" -Rights LockObjects
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command add-user -InfoBasePath "C:\Bases\MyDB" -NewUser "Ivanov" -NewUserPassword "…" -Rights LockObjects
|
||||
```
|
||||
|
||||
| Право | Что даёт |
|
||||
@@ -38,7 +38,7 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Comma
|
||||
## copy-users — скопировать пользователей из другого хранилища
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command copy-users -InfoBasePath "C:\Bases\MyDB" -SourcePath "\\srv01\repo\Other" -SourceUser "Admin" -SourcePassword "…"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command copy-users -InfoBasePath "C:\Bases\MyDB" -SourcePath "\\srv01\repo\Other" -SourceUser "Admin" -SourcePassword "…"
|
||||
```
|
||||
|
||||
`-SourcePath`, `-SourceUser`, `-SourcePassword` описывают хранилище-**источник**. Удалённые пользователи
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## connect — подключить
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command connect -InfoBasePath "C:\Bases\MyDB" -RepositoryPath "\\srv01\repo\MyApp" -RepositoryUser "Ivanov" -RepositoryPassword "…"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command connect -InfoBasePath "C:\Bases\MyDB" -RepositoryPath "\\srv01\repo\MyApp" -RepositoryUser "Ivanov" -RepositoryPassword "…"
|
||||
```
|
||||
|
||||
| Параметр | Описание |
|
||||
@@ -23,7 +23,7 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Comma
|
||||
## disconnect — отключить
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command disconnect -InfoBasePath "C:\Bases\MyDB"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command disconnect -InfoBasePath "C:\Bases\MyDB"
|
||||
```
|
||||
|
||||
**Спроси подтверждение у пользователя.** Отключение снимает связь и на стороне самого хранилища:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## report — отчёт по версиям
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command report -InfoBasePath "C:\Bases\MyDB" -OutputFile "C:\tmp\repo.txt"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command report -InfoBasePath "C:\Bases\MyDB" -OutputFile "C:\tmp\repo.txt"
|
||||
```
|
||||
|
||||
| Параметр | Описание |
|
||||
@@ -25,7 +25,7 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Comma
|
||||
## dump-cfg — выгрузить версию в CF
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command dump-cfg -InfoBasePath "C:\Bases\MyDB" -OutputFile "C:\tmp\v120.cf" -Version 120
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command dump-cfg -InfoBasePath "C:\Bases\MyDB" -OutputFile "C:\tmp\v120.cf" -Version 120
|
||||
```
|
||||
|
||||
Без `-Version` (или при `-1`) выгружается последняя версия.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## set-label — метка на версию
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command set-label -InfoBasePath "C:\Bases\MyDB" -Label "Релиз 1.2" -Version 120 -Comment "Передано в тест"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command set-label -InfoBasePath "C:\Bases\MyDB" -Label "Релиз 1.2" -Version 120 -Comment "Передано в тест"
|
||||
```
|
||||
|
||||
Без `-Version` метка ставится на последнюю версию. Несуществующая версия — ошибка.
|
||||
@@ -11,7 +11,7 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Comma
|
||||
## optimize — оптимизация хранения
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command optimize -InfoBasePath "C:\Bases\MyDB"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command optimize -InfoBasePath "C:\Bases\MyDB"
|
||||
```
|
||||
|
||||
Оптимизирует хранение данных в хранилище. Операция долгая.
|
||||
@@ -19,7 +19,7 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Comma
|
||||
## clear-cache — очистка кеша
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command clear-cache -InfoBasePath "C:\Bases\MyDB" -CacheScope local
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-repo.py" -Command clear-cache -InfoBasePath "C:\Bases\MyDB" -CacheScope local
|
||||
```
|
||||
|
||||
| `-CacheScope` | Что чистит |
|
||||
|
||||
@@ -36,7 +36,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-run.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-run.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -64,14 +64,14 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-run.ps1" <пар
|
||||
|
||||
```powershell
|
||||
# Простой запуск
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-run.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-run.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin"
|
||||
|
||||
# Запуск с обработкой
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-run.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -Execute "C:\epf\МояОбработка.epf"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-run.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -Execute "C:\epf\МояОбработка.epf"
|
||||
|
||||
# Открыть по навигационной ссылке
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-run.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -URL "e1cib/data/Справочник.Номенклатура"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-run.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -URL "e1cib/data/Справочник.Номенклатура"
|
||||
|
||||
# Серверная база с параметром запуска
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-run.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -CParam "ЗапуститьОбновление"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-run.py" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -CParam "ЗапуститьОбновление"
|
||||
```
|
||||
|
||||
@@ -37,7 +37,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-update.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-update.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -75,11 +75,11 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-update.ps1" <п
|
||||
|
||||
```powershell
|
||||
# Обычное обновление (файловая база)
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-update.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-update.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin"
|
||||
|
||||
# Динамическое обновление
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-update.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -Dynamic on
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-update.py" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -Dynamic on
|
||||
|
||||
# Обновление расширения
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-update.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -Extension "МоёРасширение"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/db-update.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -Extension "МоёРасширение"
|
||||
```
|
||||
|
||||
@@ -41,7 +41,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/epf-build.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/epf-build.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -76,8 +76,8 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/epf-build.ps1" <п
|
||||
|
||||
```powershell
|
||||
# Сборка обработки (файловая база)
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/epf-build.ps1" -InfoBasePath "C:\Bases\MyDB" -SourceFile "src/МояОбработка.xml" -OutputFile "build/МояОбработка.epf"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/epf-build.py" -InfoBasePath "C:\Bases\MyDB" -SourceFile "src/МояОбработка.xml" -OutputFile "build/МояОбработка.epf"
|
||||
|
||||
# Серверная база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/epf-build.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -SourceFile "src/МояОбработка.xml" -OutputFile "build/МояОбработка.epf"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/epf-build.py" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -SourceFile "src/МояОбработка.xml" -OutputFile "build/МояОбработка.epf"
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/epf-dump.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/epf-dump.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -64,8 +64,8 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/epf-dump.ps1" <па
|
||||
|
||||
```powershell
|
||||
# Разборка обработки (файловая база)
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/epf-dump.ps1" -InfoBasePath "C:\Bases\MyDB" -InputFile "build/МояОбработка.epf" -OutputDir "src"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/epf-dump.py" -InfoBasePath "C:\Bases\MyDB" -InputFile "build/МояОбработка.epf" -OutputDir "src"
|
||||
|
||||
# Серверная база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/epf-dump.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -InputFile "build/МояОбработка.epf" -OutputDir "src"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/epf-dump.py" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -InputFile "build/МояОбработка.epf" -OutputDir "src"
|
||||
```
|
||||
|
||||
@@ -37,7 +37,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/init.ps1" -Name "<Name>" [-Synonym "<Synonym>"] [-SrcDir "<SrcDir>"] [-FormatVersion "<версия>"]
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/init.py" -Name "<Name>" [-Synonym "<Synonym>"] [-SrcDir "<SrcDir>"] [-FormatVersion "<версия>"]
|
||||
```
|
||||
|
||||
## Дальнейшие шаги
|
||||
|
||||
@@ -26,7 +26,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/epf-validate.ps1" -ObjectPath "src/МояОбработка"
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/epf-validate.ps1" -ObjectPath "src/МояОбработка/МояОбработка.xml"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/epf-validate.py" -ObjectPath "src/МояОбработка"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/epf-validate.py" -ObjectPath "src/МояОбработка/МояОбработка.xml"
|
||||
```
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ allowed-tools:
|
||||
Используй общий скрипт из epf-build:
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-build/scripts/epf-build.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/../epf-build/scripts/epf-build.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -78,8 +78,8 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-build/scripts/epf-bu
|
||||
|
||||
```powershell
|
||||
# Сборка отчёта (файловая база)
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-build/scripts/epf-build.ps1" -InfoBasePath "C:\Bases\MyDB" -SourceFile "src/МойОтчёт.xml" -OutputFile "build/МойОтчёт.erf"
|
||||
python "${CLAUDE_SKILL_DIR}/../epf-build/scripts/epf-build.py" -InfoBasePath "C:\Bases\MyDB" -SourceFile "src/МойОтчёт.xml" -OutputFile "build/МойОтчёт.erf"
|
||||
|
||||
# Серверная база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-build/scripts/epf-build.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -SourceFile "src/МойОтчёт.xml" -OutputFile "build/МойОтчёт.erf"
|
||||
python "${CLAUDE_SKILL_DIR}/../epf-build/scripts/epf-build.py" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -SourceFile "src/МойОтчёт.xml" -OutputFile "build/МойОтчёт.erf"
|
||||
```
|
||||
|
||||
@@ -41,7 +41,7 @@ allowed-tools:
|
||||
Используй общий скрипт из epf-dump:
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-dump/scripts/epf-dump.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/../epf-dump/scripts/epf-dump.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -66,8 +66,8 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-dump/scripts/epf-dum
|
||||
|
||||
```powershell
|
||||
# Разборка отчёта (файловая база)
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-dump/scripts/epf-dump.ps1" -InfoBasePath "C:\Bases\MyDB" -InputFile "build/МойОтчёт.erf" -OutputDir "src"
|
||||
python "${CLAUDE_SKILL_DIR}/../epf-dump/scripts/epf-dump.py" -InfoBasePath "C:\Bases\MyDB" -InputFile "build/МойОтчёт.erf" -OutputDir "src"
|
||||
|
||||
# Серверная база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-dump/scripts/epf-dump.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -InputFile "build/МойОтчёт.erf" -OutputDir "src"
|
||||
python "${CLAUDE_SKILL_DIR}/../epf-dump/scripts/epf-dump.py" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -InputFile "build/МойОтчёт.erf" -OutputDir "src"
|
||||
```
|
||||
|
||||
@@ -38,7 +38,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/init.ps1" -Name "<Name>" [-Synonym "<Synonym>"] [-SrcDir "<SrcDir>"] [-FormatVersion "<версия>"] [-WithSKD]
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/init.py" -Name "<Name>" [-Synonym "<Synonym>"] [-SrcDir "<SrcDir>"] [-FormatVersion "<версия>"] [-WithSKD]
|
||||
```
|
||||
|
||||
## Дальнейшие шаги
|
||||
|
||||
@@ -28,7 +28,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-validate/scripts/epf-validate.ps1" -ObjectPath "src/МойОтчёт"
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-validate/scripts/epf-validate.ps1" -ObjectPath "src/МойОтчёт/МойОтчёт.xml"
|
||||
python "${CLAUDE_SKILL_DIR}/../epf-validate/scripts/epf-validate.py" -ObjectPath "src/МойОтчёт"
|
||||
python "${CLAUDE_SKILL_DIR}/../epf-validate/scripts/epf-validate.py" -ObjectPath "src/МойОтчёт/МойОтчёт.xml"
|
||||
```
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-add.ps1" -ObjectPath "<ObjectPath>" -FormName "<FormName>" [-Purpose "<Purpose>"] [-Synonym "<Synonym>"] [-SetDefault]
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/form-add.py" -ObjectPath "<ObjectPath>" -FormName "<FormName>" [-Purpose "<Purpose>"] [-Synonym "<Synonym>"] [-SetDefault]
|
||||
```
|
||||
|
||||
## Purpose — назначение формы
|
||||
|
||||
@@ -29,10 +29,10 @@ allowed-tools:
|
||||
|
||||
```powershell
|
||||
# Режим JSON DSL
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-compile.ps1" -JsonPath "<json>" -OutputPath "<Form.xml>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/form-compile.py" -JsonPath "<json>" -OutputPath "<Form.xml>"
|
||||
|
||||
# Режим from-object (объект и purpose выводятся из OutputPath; Document и Catalog)
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-compile.ps1" -FromObject -OutputPath "<.../TypePlural/ObjectName/Forms/FormName/Ext/Form.xml>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/form-compile.py" -FromObject -OutputPath "<.../TypePlural/ObjectName/Forms/FormName/Ext/Form.xml>"
|
||||
```
|
||||
|
||||
## JSON DSL — справка
|
||||
|
||||
@@ -31,7 +31,7 @@ allowed-tools:
|
||||
| `OutputPath` | Путь к выходному JSON. Если не задан — JSON в stdout |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-decompile.ps1" -FormPath "<Form.xml>" -OutputPath "<out.json>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/form-decompile.py" -FormPath "<Form.xml>" -OutputPath "<out.json>"
|
||||
```
|
||||
|
||||
## Что получаешь
|
||||
|
||||
@@ -29,7 +29,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-edit.ps1" -FormPath "<путь>" -JsonPath "<путь>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/form-edit.py" -FormPath "<путь>" -JsonPath "<путь>"
|
||||
```
|
||||
|
||||
## JSON формат
|
||||
|
||||
@@ -15,7 +15,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-info.ps1" -FormPath "<путь к Form.xml>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/form-info.py" -FormPath "<путь к Form.xml>"
|
||||
```
|
||||
|
||||
## Параметры
|
||||
|
||||
@@ -32,7 +32,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/remove-form.ps1" -ObjectName "<ObjectName>" -FormName "<FormName>" [-SrcDir "<SrcDir>"] [-Force]
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/remove-form.py" -ObjectName "<ObjectName>" -FormName "<FormName>" [-SrcDir "<SrcDir>"] [-Force]
|
||||
```
|
||||
|
||||
## Что удаляется
|
||||
|
||||
@@ -23,7 +23,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-validate.ps1" -FormPath "Catalogs/Номенклатура/Forms/ФормаЭлемента"
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-validate.ps1" -FormPath "src/МояОбработка/Forms/Форма/Ext/Form.xml"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/form-validate.py" -FormPath "Catalogs/Номенклатура/Forms/ФормаЭлемента"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/form-validate.py" -FormPath "src/МояОбработка/Forms/Форма/Ext/Form.xml"
|
||||
```
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/add-help.ps1" -ObjectName "<ObjectName>" [-Lang "<Lang>"] [-SrcDir "<SrcDir>"]
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/add-help.py" -ObjectName "<ObjectName>" [-Lang "<Lang>"] [-SrcDir "<SrcDir>"]
|
||||
```
|
||||
|
||||
## Что делает скрипт
|
||||
|
||||
@@ -29,13 +29,13 @@ allowed-tools:
|
||||
### Inline mode
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/interface-edit.ps1" -CIPath '<path>' -Operation hide -Value '<cmd>'
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/interface-edit.py" -CIPath '<path>' -Operation hide -Value '<cmd>'
|
||||
```
|
||||
|
||||
### JSON mode
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/interface-edit.ps1" -CIPath '<path>' -DefinitionFile '<json>'
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/interface-edit.py" -CIPath '<path>' -DefinitionFile '<json>'
|
||||
```
|
||||
|
||||
## Операции
|
||||
|
||||
@@ -24,6 +24,6 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/interface-validate.ps1" -CIPath "Subsystems/Продажи"
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/interface-validate.ps1" -CIPath "Subsystems/Продажи/Ext/CommandInterface.xml"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/interface-validate.py" -CIPath "Subsystems/Продажи"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/interface-validate.py" -CIPath "Subsystems/Продажи/Ext/CommandInterface.xml"
|
||||
```
|
||||
|
||||
@@ -24,7 +24,7 @@ allowed-tools:
|
||||
3. Изменить созданный объект — `/meta-edit`; проверить — `/meta-validate`.
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-compile.ps1" -JsonPath "<json>" -OutputDir "<ConfigDir>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/meta-compile.py" -JsonPath "<json>" -OutputDir "<ConfigDir>"
|
||||
```
|
||||
|
||||
| Параметр | Описание |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# meta-compile v1.109 — Compile 1C metadata object from JSON
|
||||
# meta-compile v1.112 — Compile 1C metadata object from JSON
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
param(
|
||||
@@ -612,6 +612,24 @@ $script:typeSynonyms["хранилищезначений"] = "ValueStorage"
|
||||
$script:typeSynonyms["хранилищезначения"] = "ValueStorage"
|
||||
$script:typeSynonyms["uuid"] = "UUID"
|
||||
$script:typeSynonyms["уникальныйидентификатор"] = "UUID"
|
||||
# Типы СУБД — прощающий ввод: модель, проектирующая внешний источник по схеме БД, пишет типы
|
||||
# так, как они названы в information_schema. Соответствие замерено на стенде PostgreSQL: то же
|
||||
# самое даёт Конфигуратор при импорте структуры таблицы. Только однозначные: boolean НЕ включён
|
||||
# (в DSL это уже Булево, а psqlODBC при импорте отдаёт Строка(5) — два разных смысла), как и
|
||||
# text/real/money/json — для них замера нет.
|
||||
$script:typeSynonyms["integer"] = "Number(10,0)"
|
||||
$script:typeSynonyms["int"] = "Number(10,0)"
|
||||
$script:typeSynonyms["int4"] = "Number(10,0)"
|
||||
$script:typeSynonyms["bigint"] = "Number(19,0)"
|
||||
$script:typeSynonyms["int8"] = "Number(19,0)"
|
||||
$script:typeSynonyms["smallint"] = "Number(5,0)"
|
||||
$script:typeSynonyms["int2"] = "Number(5,0)"
|
||||
$script:typeSynonyms["varchar"] = "String"
|
||||
$script:typeSynonyms["character varying"] = "String"
|
||||
$script:typeSynonyms["numeric"] = "Number"
|
||||
$script:typeSynonyms["decimal"] = "Number"
|
||||
$script:typeSynonyms["timestamp"] = "DateTime"
|
||||
$script:typeSynonyms["bytea"] = "BinaryData"
|
||||
# Платформенные типы, требующие префикса v8: (коллекции/периоды, частые в реквизитах обработок/отчётов).
|
||||
$script:v8PlatformTypes = @("ValueTable","ValueTree","ValueList","ValueListType","StandardPeriod",
|
||||
"StandardBeginningDate","PointInTime","TypeDescription","FixedArray","FixedMap","FixedStructure")
|
||||
@@ -894,8 +912,21 @@ function Emit-TypeContent {
|
||||
return
|
||||
}
|
||||
|
||||
# Fallback — emit as-is
|
||||
X "$indent<v8:Type>$typeStr</v8:Type>"
|
||||
# Имя с готовым префиксом пропускаем как есть: это законный ввод (v8:ValueTable, ent:AccountType,
|
||||
# v8ui:Color …), и своё пространство имён выбрал вызывающий. Правильность имени судит
|
||||
# meta-validate (проверка 22) — там виден весь файл и вид владельца.
|
||||
if ($typeStr.Contains(':')) {
|
||||
X "$indent<v8:Type>$typeStr</v8:Type>"
|
||||
return
|
||||
}
|
||||
|
||||
# Голое имя без префикса и без совпадения с известной формой — не тип платформы. Раньше
|
||||
# такое имя уходило в XML дословно, и отказ приходил только от платформы при загрузке
|
||||
# всей конфигурации — «Неизвестное имя типа», без указания объекта и реквизита.
|
||||
Write-Error ("Неизвестный тип '$typeStr'. Допустимые формы: String(N), Number(D,F), Boolean, " +
|
||||
"Date/DateTime/Time, ValueStorage, UUID, BinaryData; ссылочные <Вид>Ref.<Имя>; " +
|
||||
"DefinedType.<Имя>, Characteristic.<Имя>; типы платформы с префиксом (v8:ValueTable, ent:AccountType).")
|
||||
exit 1
|
||||
}
|
||||
|
||||
function Emit-ValueType {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# meta-compile v1.109 — Compile 1C metadata object from JSON
|
||||
# meta-compile v1.112 — Compile 1C metadata object from JSON
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
|
||||
import argparse
|
||||
@@ -743,6 +743,24 @@ type_synonyms = {
|
||||
'хранилищезначения': 'ValueStorage',
|
||||
'uuid': 'UUID',
|
||||
'уникальныйидентификатор': 'UUID',
|
||||
# Типы СУБД — прощающий ввод: модель, проектирующая внешний источник по схеме БД, пишет типы
|
||||
# так, как они названы в information_schema. Соответствие замерено на стенде PostgreSQL: то же
|
||||
# самое даёт Конфигуратор при импорте структуры таблицы. Только однозначные: boolean НЕ включён
|
||||
# (в DSL это уже Булево, а psqlODBC при импорте отдаёт Строка(5) — два разных смысла), как и
|
||||
# text/real/money/json — для них замера нет.
|
||||
'integer': 'Number(10,0)',
|
||||
'int': 'Number(10,0)',
|
||||
'int4': 'Number(10,0)',
|
||||
'bigint': 'Number(19,0)',
|
||||
'int8': 'Number(19,0)',
|
||||
'smallint': 'Number(5,0)',
|
||||
'int2': 'Number(5,0)',
|
||||
'varchar': 'String',
|
||||
'character varying': 'String',
|
||||
'numeric': 'Number',
|
||||
'decimal': 'Number',
|
||||
'timestamp': 'DateTime',
|
||||
'bytea': 'BinaryData',
|
||||
# Reference synonyms (Russian, lowercase)
|
||||
'справочникссылка': 'CatalogRef',
|
||||
'документссылка': 'DocumentRef',
|
||||
@@ -1005,8 +1023,21 @@ def emit_type_content(indent, type_str):
|
||||
else:
|
||||
X(f'{indent}<v8:Type xmlns:d5p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d5p1:{type_str}</v8:Type>')
|
||||
return
|
||||
# Fallback
|
||||
X(f'{indent}<v8:Type>{type_str}</v8:Type>')
|
||||
# Имя с готовым префиксом пропускаем как есть: это законный ввод (v8:ValueTable, ent:AccountType,
|
||||
# v8ui:Color …), и своё пространство имён выбрал вызывающий. Правильность имени судит
|
||||
# meta-validate (проверка 22) — там виден весь файл и вид владельца.
|
||||
if ':' in type_str:
|
||||
X(f'{indent}<v8:Type>{type_str}</v8:Type>')
|
||||
return
|
||||
|
||||
# Голое имя без префикса и без совпадения с известной формой — не тип платформы. Раньше
|
||||
# такое имя уходило в XML дословно, и отказ приходил только от платформы при загрузке
|
||||
# всей конфигурации — «Неизвестное имя типа», без указания объекта и реквизита.
|
||||
print(f"Неизвестный тип '{type_str}'. Допустимые формы: String(N), Number(D,F), Boolean, "
|
||||
"Date/DateTime/Time, ValueStorage, UUID, BinaryData; ссылочные <Вид>Ref.<Имя>; "
|
||||
"DefinedType.<Имя>, Characteristic.<Имя>; типы платформы с префиксом (v8:ValueTable, ent:AccountType).",
|
||||
file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
def emit_value_type(indent, type_str):
|
||||
X(f'{indent}<Type>')
|
||||
|
||||
@@ -38,7 +38,7 @@ allowed-tools:
|
||||
| `OutputPath` | Путь к выходному JSON. Если не задан — JSON в stdout |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-decompile.ps1" -ObjectPath "<Объект.xml>" -OutputPath "<out.json>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/meta-decompile.py" -ObjectPath "<Объект.xml>" -OutputPath "<out.json>"
|
||||
```
|
||||
|
||||
Неподдерживаемый тип объекта или не-`MetaDataObject` root → ненулевой код выхода и сообщение в stderr.
|
||||
|
||||
@@ -18,13 +18,13 @@ allowed-tools:
|
||||
### Inline mode (простые операции)
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-edit.ps1" -ObjectPath "<path>" -Operation <op> -Value "<val>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/meta-edit.py" -ObjectPath "<path>" -Operation <op> -Value "<val>"
|
||||
```
|
||||
|
||||
### JSON mode (сложные/комбинированные)
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-edit.ps1" -DefinitionFile "<json>" -ObjectPath "<path>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/meta-edit.py" -DefinitionFile "<json>" -ObjectPath "<path>"
|
||||
```
|
||||
|
||||
| Параметр | Описание |
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Для сложных и комбинированных операций используйте JSON-файл вместо inline-режима.
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File ${CLAUDE_SKILL_DIR}/scripts/meta-edit.ps1 -DefinitionFile "<json>" -ObjectPath "<path>"
|
||||
python ${CLAUDE_SKILL_DIR}/scripts/meta-edit.py -DefinitionFile "<json>" -ObjectPath "<path>"
|
||||
```
|
||||
|
||||
## add — добавить элементы
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# meta-edit v1.50 — Edit existing 1C metadata object XML
|
||||
# meta-edit v1.52 — Edit existing 1C metadata object XML
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
param(
|
||||
@@ -502,6 +502,39 @@ $script:typeSynonyms["catalogref"] = "CatalogRef"
|
||||
$script:typeSynonyms["documentref"] = "DocumentRef"
|
||||
$script:typeSynonyms["enumref"] = "EnumRef"
|
||||
|
||||
# Платформенные типы, требующие префикса v8: (коллекции/периоды, частые в реквизитах
|
||||
# обработок и отчётов, где набор типов шире, чем у хранимых объектов). Копия реестра meta-compile.
|
||||
$script:v8PlatformTypes = @("ValueTable","ValueTree","ValueList","ValueListType","StandardPeriod",
|
||||
"StandardBeginningDate","PointInTime","TypeDescription","FixedArray","FixedMap","FixedStructure")
|
||||
# Ниже — записи, которых в этом навыке не было: словарь дополнен до набора meta-compile,
|
||||
# который является авторитетом. Расхождение держит tests/skills/check-type-synonyms.mjs.
|
||||
$script:typeSynonyms["время"] = "Time"
|
||||
$script:typeSynonyms["time"] = "Time"
|
||||
$script:typeSynonyms["base64binary"] = "ValueStorage"
|
||||
$script:typeSynonyms["binarydata"] = "BinaryData"
|
||||
$script:typeSynonyms["двоичныеданные"] = "BinaryData"
|
||||
$script:typeSynonyms["хранилищезначений"] = "ValueStorage"
|
||||
$script:typeSynonyms["uuid"] = "UUID"
|
||||
$script:typeSynonyms["уникальныйидентификатор"] = "UUID"
|
||||
$script:typeSynonyms["integer"] = "Number(10,0)"
|
||||
$script:typeSynonyms["int"] = "Number(10,0)"
|
||||
$script:typeSynonyms["int4"] = "Number(10,0)"
|
||||
$script:typeSynonyms["bigint"] = "Number(19,0)"
|
||||
$script:typeSynonyms["int8"] = "Number(19,0)"
|
||||
$script:typeSynonyms["smallint"] = "Number(5,0)"
|
||||
$script:typeSynonyms["int2"] = "Number(5,0)"
|
||||
$script:typeSynonyms["varchar"] = "String"
|
||||
$script:typeSynonyms["character varying"] = "String"
|
||||
$script:typeSynonyms["numeric"] = "Number"
|
||||
$script:typeSynonyms["decimal"] = "Number"
|
||||
$script:typeSynonyms["timestamp"] = "DateTime"
|
||||
$script:typeSynonyms["bytea"] = "BinaryData"
|
||||
$script:typeSynonyms["таблицазначений"] = "ValueTable"
|
||||
$script:typeSynonyms["деревозначений"] = "ValueTree"
|
||||
$script:typeSynonyms["списокзначений"] = "ValueListType"
|
||||
$script:typeSynonyms["стандартныйпериод"] = "StandardPeriod"
|
||||
$script:typeSynonyms["внешнийисточникданныхтаблицассылка"] = "ExternalDataSourceTableRef"
|
||||
|
||||
# ============================================================
|
||||
# Section 4: Type system
|
||||
# ============================================================
|
||||
@@ -649,6 +682,58 @@ function Build-TypeContentXml {
|
||||
return $sb.ToString().TrimEnd("`r","`n")
|
||||
}
|
||||
|
||||
# Time — третья доля даты, наравне с Date/DateTime.
|
||||
if ($typeStr -eq "Time") {
|
||||
$sb.AppendLine("$indent<v8:Type>xs:dateTime</v8:Type>") | Out-Null
|
||||
$sb.AppendLine("$indent<v8:DateQualifiers>") | Out-Null
|
||||
$sb.AppendLine("$indent`t<v8:DateFractions>Time</v8:DateFractions>") | Out-Null
|
||||
$sb.AppendLine("$indent</v8:DateQualifiers>") | Out-Null
|
||||
return $sb.ToString().TrimEnd("`r","`n")
|
||||
}
|
||||
|
||||
# UUID
|
||||
if ($typeStr -eq "UUID") {
|
||||
$sb.AppendLine("$indent<v8:Type>v8:UUID</v8:Type>") | Out-Null
|
||||
return $sb.ToString().TrimEnd("`r","`n")
|
||||
}
|
||||
|
||||
# BinaryData — xs:base64Binary СО своими квалификаторами (в отличие от ХранилищаЗначения).
|
||||
# Формы и умолчание — как в meta-compile, который здесь авторитет системы типов.
|
||||
if ($typeStr -match '^BinaryData(\(|$)') {
|
||||
$bm = [regex]::Match($typeStr, '^BinaryData(\((\d+)(,\s*(fixed|variable))?\))?$', 'IgnoreCase')
|
||||
if (-not $bm.Success) {
|
||||
Write-Error "Неверный тип '$typeStr': ждётся BinaryData, BinaryData(Длина) или BinaryData(Длина,fixed|variable)."
|
||||
exit 1
|
||||
}
|
||||
$blen = if ($bm.Groups[2].Success) { $bm.Groups[2].Value } else { "4294967292" }
|
||||
$ballowed = if ($bm.Groups[4].Success) { if ($bm.Groups[4].Value.ToLowerInvariant() -eq "fixed") { "Fixed" } else { "Variable" } }
|
||||
elseif ($bm.Groups[2].Success) { "Variable" } else { "Fixed" }
|
||||
$sb.AppendLine("$indent<v8:Type>xs:base64Binary</v8:Type>") | Out-Null
|
||||
$sb.AppendLine("$indent<v8:BinaryDataQualifiers>") | Out-Null
|
||||
$sb.AppendLine("$indent`t<v8:Length>$blen</v8:Length>") | Out-Null
|
||||
$sb.AppendLine("$indent`t<v8:AllowedLength>$ballowed</v8:AllowedLength>") | Out-Null
|
||||
$sb.AppendLine("$indent</v8:BinaryDataQualifiers>") | Out-Null
|
||||
return $sb.ToString().TrimEnd("`r","`n")
|
||||
}
|
||||
|
||||
# Платформенные типы (коллекции/периоды) — префикс v8:, объявлен в шапке файла.
|
||||
if ($script:v8PlatformTypes -contains $typeStr) {
|
||||
$sb.AppendLine("$indent<v8:Type>v8:$typeStr</v8:Type>") | Out-Null
|
||||
return $sb.ToString().TrimEnd("`r","`n")
|
||||
}
|
||||
|
||||
# Характеристика ПВХ — множество типов, как и ОпределяемыйТип.
|
||||
if ($typeStr -match '^Characteristic\.(.+)$') {
|
||||
$sb.AppendLine("$indent<v8:TypeSet>cfg:$typeStr</v8:TypeSet>") | Out-Null
|
||||
return $sb.ToString().TrimEnd("`r","`n")
|
||||
}
|
||||
|
||||
# Голый метатип-категория без имени объекта — «любой объект категории», это TypeSet.
|
||||
if ($typeStr -match '^(CatalogRef|DocumentRef|EnumRef|ChartOfAccountsRef|ChartOfCharacteristicTypesRef|ChartOfCalculationTypesRef|ExchangePlanRef|BusinessProcessRef|TaskRef|AnyRef|AnyIBRef)$') {
|
||||
$sb.AppendLine("$indent<v8:TypeSet>cfg:$typeStr</v8:TypeSet>") | Out-Null
|
||||
return $sb.ToString().TrimEnd("`r","`n")
|
||||
}
|
||||
|
||||
# DefinedType
|
||||
if ($typeStr -match '^DefinedType\.(.+)$') {
|
||||
$dtName = $Matches[1]
|
||||
@@ -663,7 +748,7 @@ function Build-TypeContentXml {
|
||||
# Если корень URI не объявляет (файл не от платформы), остаёмся на самодостаточной
|
||||
# локальной форме: префикс тут — ТЕКСТ узла, XML-слой про него не знает и сам
|
||||
# объявление не добавит, так что иначе получился бы неразрешимый префикс.
|
||||
if ($typeStr -match '^(CatalogRef|DocumentRef|EnumRef|ChartOfAccountsRef|ChartOfCharacteristicTypesRef|ChartOfCalculationTypesRef|ExchangePlanRef|BusinessProcessRef|TaskRef)\.(.+)$') {
|
||||
if ($typeStr -match '^(CatalogRef|DocumentRef|EnumRef|ChartOfAccountsRef|ChartOfCharacteristicTypesRef|ChartOfCalculationTypesRef|ExchangePlanRef|BusinessProcessRef|BusinessProcessRoutePointRef|TaskRef|ExternalDataSourceTableRef)\.(.+)$') {
|
||||
if ($script:cfgPrefix) {
|
||||
$sb.AppendLine("$indent<v8:Type>$($script:cfgPrefix):$typeStr</v8:Type>") | Out-Null
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# meta-edit v1.50 — Edit existing 1C metadata object XML
|
||||
# meta-edit v1.52 — Edit existing 1C metadata object XML
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
|
||||
import argparse
|
||||
@@ -540,6 +540,42 @@ type_synonyms = {
|
||||
"catalogref": "CatalogRef",
|
||||
"documentref": "DocumentRef",
|
||||
"enumref": "EnumRef",
|
||||
# Ниже — записи, которых в этом навыке не было: словарь дополнен до набора meta-compile,
|
||||
# который является авторитетом. Расхождение держит tests/skills/check-type-synonyms.mjs.
|
||||
"время": "Time",
|
||||
"time": "Time",
|
||||
"base64binary": "ValueStorage",
|
||||
"binarydata": "BinaryData",
|
||||
"двоичныеданные": "BinaryData",
|
||||
"хранилищезначений": "ValueStorage",
|
||||
"uuid": "UUID",
|
||||
"уникальныйидентификатор": "UUID",
|
||||
"integer": "Number(10,0)",
|
||||
"int": "Number(10,0)",
|
||||
"int4": "Number(10,0)",
|
||||
"bigint": "Number(19,0)",
|
||||
"int8": "Number(19,0)",
|
||||
"smallint": "Number(5,0)",
|
||||
"int2": "Number(5,0)",
|
||||
"varchar": "String",
|
||||
"character varying": "String",
|
||||
"numeric": "Number",
|
||||
"decimal": "Number",
|
||||
"timestamp": "DateTime",
|
||||
"bytea": "BinaryData",
|
||||
"таблицазначений": "ValueTable",
|
||||
"деревозначений": "ValueTree",
|
||||
"списокзначений": "ValueListType",
|
||||
"стандартныйпериод": "StandardPeriod",
|
||||
"внешнийисточникданныхтаблицассылка": "ExternalDataSourceTableRef",
|
||||
}
|
||||
|
||||
# Платформенные типы, требующие префикса v8: (коллекции/периоды, частые в реквизитах
|
||||
# обработок и отчётов, где набор типов шире, чем у хранимых объектов). Копия реестра meta-compile.
|
||||
V8_PLATFORM_TYPES = {
|
||||
"ValueTable", "ValueTree", "ValueList", "ValueListType", "StandardPeriod",
|
||||
"StandardBeginningDate", "PointInTime", "TypeDescription", "FixedArray", "FixedMap",
|
||||
"FixedStructure",
|
||||
}
|
||||
|
||||
# ============================================================
|
||||
@@ -666,6 +702,54 @@ def build_type_content_xml(indent, type_str):
|
||||
lines.append(f"{indent}</v8:DateQualifiers>")
|
||||
return "\r\n".join(lines)
|
||||
|
||||
# Time — третья доля даты, наравне с Date/DateTime.
|
||||
if type_str == "Time":
|
||||
lines.append(f"{indent}<v8:Type>xs:dateTime</v8:Type>")
|
||||
lines.append(f"{indent}<v8:DateQualifiers>")
|
||||
lines.append(f"{indent}\t<v8:DateFractions>Time</v8:DateFractions>")
|
||||
lines.append(f"{indent}</v8:DateQualifiers>")
|
||||
return "\r\n".join(lines)
|
||||
|
||||
# UUID
|
||||
if type_str == "UUID":
|
||||
lines.append(f"{indent}<v8:Type>v8:UUID</v8:Type>")
|
||||
return "\r\n".join(lines)
|
||||
|
||||
# BinaryData — xs:base64Binary СО своими квалификаторами (в отличие от ХранилищаЗначения).
|
||||
# Формы и умолчание — как в meta-compile, который здесь авторитет системы типов.
|
||||
if re.match(r"^BinaryData(\(|$)", type_str, re.I):
|
||||
m_bin = re.match(r"^BinaryData(?:\((\d+)(?:,\s*(fixed|variable))?\))?$", type_str, re.I)
|
||||
if not m_bin:
|
||||
print(f"Неверный тип '{type_str}': ждётся BinaryData, BinaryData(Длина) или BinaryData(Длина,fixed|variable).", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
blen = m_bin.group(1) or "4294967292"
|
||||
if m_bin.group(2):
|
||||
ballowed = "Fixed" if m_bin.group(2).lower() == "fixed" else "Variable"
|
||||
else:
|
||||
ballowed = "Variable" if m_bin.group(1) else "Fixed"
|
||||
lines.append(f"{indent}<v8:Type>xs:base64Binary</v8:Type>")
|
||||
lines.append(f"{indent}<v8:BinaryDataQualifiers>")
|
||||
lines.append(f"{indent}\t<v8:Length>{blen}</v8:Length>")
|
||||
lines.append(f"{indent}\t<v8:AllowedLength>{ballowed}</v8:AllowedLength>")
|
||||
lines.append(f"{indent}</v8:BinaryDataQualifiers>")
|
||||
return "\r\n".join(lines)
|
||||
|
||||
# Платформенные типы (коллекции/периоды) — префикс v8:, объявлен в шапке файла.
|
||||
if type_str in V8_PLATFORM_TYPES:
|
||||
lines.append(f"{indent}<v8:Type>v8:{type_str}</v8:Type>")
|
||||
return "\r\n".join(lines)
|
||||
|
||||
# Характеристика ПВХ — множество типов, как и ОпределяемыйТип.
|
||||
if re.match(r"^Characteristic\.(.+)$", type_str):
|
||||
lines.append(f"{indent}<v8:TypeSet>cfg:{type_str}</v8:TypeSet>")
|
||||
return "\r\n".join(lines)
|
||||
|
||||
# Голый метатип-категория без имени объекта — «любой объект категории», это TypeSet.
|
||||
if re.match(r"^(CatalogRef|DocumentRef|EnumRef|ChartOfAccountsRef|ChartOfCharacteristicTypesRef|"
|
||||
r"ChartOfCalculationTypesRef|ExchangePlanRef|BusinessProcessRef|TaskRef|AnyRef|AnyIBRef)$", type_str):
|
||||
lines.append(f"{indent}<v8:TypeSet>cfg:{type_str}</v8:TypeSet>")
|
||||
return "\r\n".join(lines)
|
||||
|
||||
# DefinedType
|
||||
m = re.match(r"^DefinedType\.(.+)$", type_str)
|
||||
if m:
|
||||
@@ -682,7 +766,8 @@ def build_type_content_xml(indent, type_str):
|
||||
# объявление не добавит, так что иначе получился бы неразрешимый префикс.
|
||||
m = re.match(
|
||||
r"^(CatalogRef|DocumentRef|EnumRef|ChartOfAccountsRef|ChartOfCharacteristicTypesRef|"
|
||||
r"ChartOfCalculationTypesRef|ExchangePlanRef|BusinessProcessRef|TaskRef)\.(.+)$",
|
||||
r"ChartOfCalculationTypesRef|ExchangePlanRef|BusinessProcessRef|BusinessProcessRoutePointRef|"
|
||||
r"TaskRef|ExternalDataSourceTableRef)\.(.+)$",
|
||||
type_str,
|
||||
)
|
||||
if m:
|
||||
|
||||
@@ -23,7 +23,7 @@ allowed-tools:
|
||||
| `OutFile` | Записать результат в файл (UTF-8 BOM) |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-info.ps1" -ObjectPath "<путь>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/meta-info.py" -ObjectPath "<путь>"
|
||||
```
|
||||
|
||||
## Три режима
|
||||
|
||||
@@ -32,7 +32,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-remove.ps1" -ConfigDir "<путь>" -Object "Catalog.Товары"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/meta-remove.py" -ConfigDir "<путь>" -Object "Catalog.Товары"
|
||||
```
|
||||
|
||||
## Поддерживаемые типы
|
||||
|
||||
@@ -24,6 +24,6 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-validate.ps1" -ObjectPath "Catalogs/Номенклатура/Номенклатура.xml"
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-validate.ps1" -ObjectPath "Catalogs/Банки|Documents/Заказ"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/meta-validate.py" -ObjectPath "Catalogs/Номенклатура/Номенклатура.xml"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/meta-validate.py" -ObjectPath "Catalogs/Банки|Documents/Заказ"
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# meta-validate v1.27 — Validate 1C metadata object structure
|
||||
# meta-validate v1.28 — Validate 1C metadata object structure
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
param(
|
||||
@@ -1625,6 +1625,106 @@ if ($script:configDir) {
|
||||
}
|
||||
}
|
||||
|
||||
# --- Check 22: имя типа — грамматика (уровень 1) и словарь по контексту владельца (уровень 2) ---
|
||||
# УРОВЕНЬ 1 не зависит ни от версии платформы, ни от состава конфигурации: содержимое <v8:Type>
|
||||
# всегда несёт префикс пространства имён (xs:/v8:/cfg:/dNpM:/ent:/…). Голое имя платформа не примет
|
||||
# никогда — так выглядит и тип СУБД («varchar(150)»), и опечатка («Srting(20)»).
|
||||
# УРОВЕНЬ 2 — словарь: у хранимого объекта набор типов у́же, чем у обработки или отчёта, где
|
||||
# доступны ТаблицаЗначений, ОписаниеТипов, Картинка и прочие рантайм-типы. Здесь только
|
||||
# предупреждение: список конечен, но пополняется с версиями платформы.
|
||||
$knownXsTypes = @("xs:string", "xs:decimal", "xs:boolean", "xs:dateTime", "xs:base64Binary")
|
||||
$knownV8Types = @("ValueStorage", "UUID", "Null", "Type", "ValueTable", "ValueTree", "ValueList",
|
||||
"ValueListType", "StandardPeriod", "StandardBeginningDate", "PointInTime", "TypeDescription",
|
||||
"FixedArray", "FixedMap", "FixedStructure", "FillChecking", "Universal")
|
||||
# Ссылочные метатипы: с именем объекта (<Метатип>.<Имя>) — конкретный тип, без имени — множество.
|
||||
$refMetaTypes = @("CatalogRef", "DocumentRef", "EnumRef", "ChartOfAccountsRef",
|
||||
"ChartOfCharacteristicTypesRef", "ChartOfCalculationTypesRef", "ExchangePlanRef",
|
||||
"BusinessProcessRef", "BusinessProcessRoutePointRef", "TaskRef", "AnyRef", "AnyIBRef")
|
||||
# Прочие имена пространства current-config без точки — платформенные, состав конфигурации их не меняет.
|
||||
$cfgBareNames = @("ConstantsSet", "ReportBuilder", "FilterCriterion", "DynamicList")
|
||||
# Виды, чьи реквизиты ХРАНЯТСЯ в базе: там рантайм-типы недопустимы. У обработки и отчёта — наоборот.
|
||||
$storedOwnerTypes = @("Catalog", "Document", "DocumentJournal", "InformationRegister",
|
||||
"AccumulationRegister", "AccountingRegister", "CalculationRegister", "ChartOfAccounts",
|
||||
"ChartOfCharacteristicTypes", "ChartOfCalculationTypes", "ExchangePlan", "BusinessProcess",
|
||||
"Task", "Constant", "Table")
|
||||
|
||||
function Test-StorableType([string]$t) {
|
||||
if ($knownXsTypes -contains $t) { return $true }
|
||||
if ($t -eq "v8:ValueStorage" -or $t -eq "v8:UUID" -or $t -eq "v8:Null") { return $true }
|
||||
$m = [regex]::Match($t, '^(?:cfg|d\d+p\d+):(.+)$')
|
||||
if (-not $m.Success) { return $false }
|
||||
$name = $m.Groups[1].Value
|
||||
$base = if ($name.Contains('.')) { $name.Substring(0, $name.IndexOf('.')) } else { $name }
|
||||
if ($refMetaTypes -contains $base) { return $true }
|
||||
if ($base -eq "DefinedType" -or $base -eq "Characteristic" -or $base -eq "ExternalDataSourceTableRef") { return $true }
|
||||
return $false
|
||||
}
|
||||
|
||||
$typeNodes22 = @($xmlDoc.SelectNodes("//v8:Type", $ns)) + @($xmlDoc.SelectNodes("//v8:TypeSet", $ns))
|
||||
# Уровень 2 смотрит только на типы САМИХ реквизитов: параметры команд, характеристики и стандартные
|
||||
# реквизиты живут по другим правилам, и мешать их в один котёл нельзя.
|
||||
$attrTypePaths = @("Attribute", "Dimension", "Resource", "Column", "Field", "AddressingAttribute",
|
||||
"AccountingFlag", "ExtDimensionAccountingFlag")
|
||||
$badGrammar = @{}
|
||||
$unknownVocab = @{}
|
||||
$notStorable = @{}
|
||||
$typesSeen = 0
|
||||
foreach ($tn in $typeNodes22) {
|
||||
$t = "$($tn.InnerText)".Trim()
|
||||
if (-not $t) { continue }
|
||||
$typesSeen++
|
||||
if (-not $t.Contains(':')) {
|
||||
$badGrammar[$t] = $true
|
||||
continue
|
||||
}
|
||||
$prefix = $t.Substring(0, $t.IndexOf(':'))
|
||||
$local = $t.Substring($t.IndexOf(':') + 1)
|
||||
if ($prefix -eq "xs") {
|
||||
if ($knownXsTypes -notcontains $t) { $unknownVocab[$t] = $true }
|
||||
} elseif ($prefix -eq "v8") {
|
||||
if ($knownV8Types -notcontains $local) { $unknownVocab[$t] = $true }
|
||||
} elseif ($prefix -eq "cfg" -or $prefix -match '^d\d+p\d+$') {
|
||||
# Имя объекта конфигурации проверяет Check 16; здесь — только форма и платформенная часть.
|
||||
if (-not $local.Contains('.')) {
|
||||
if (($refMetaTypes -notcontains $local) -and ($cfgBareNames -notcontains $local) -and
|
||||
($local -notmatch '^[A-Za-z][A-Za-z0-9]*(Object|Manager|List|Selection|RecordSet|RecordKey|RecordManager)$')) {
|
||||
$unknownVocab[$t] = $true
|
||||
}
|
||||
} elseif ($local -notmatch '^[A-Za-z][A-Za-z0-9]*\.[^.]+(\.[^.]+)?$') {
|
||||
$badGrammar[$t] = $true
|
||||
}
|
||||
}
|
||||
# Прочие пространства (ent:, v8ui:, dcs*:, mxl: …) — форму имени не навязываем: там свои словари.
|
||||
|
||||
if ($storedOwnerTypes -contains $mdType) {
|
||||
$owner = $tn.ParentNode # <Type>
|
||||
$props = if ($owner) { $owner.ParentNode } else { $null } # <Properties>
|
||||
$child = if ($props) { $props.ParentNode } else { $null } # <Attribute>/<Field>/…
|
||||
if ($child -and ($attrTypePaths -contains $child.LocalName) -and -not (Test-StorableType $t)) {
|
||||
$notStorable[$t] = $child.LocalName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($badGrammar.Count -gt 0) {
|
||||
foreach ($bk in ($badGrammar.Keys | Sort-Object)) {
|
||||
Report-Error "22. Тип '$bk' — не имя типа платформы: нет префикса пространства имён либо неверна форма ссылочного типа. При загрузке — «Неизвестное имя типа»"
|
||||
}
|
||||
}
|
||||
if ($notStorable.Count -gt 0) {
|
||||
foreach ($nk in ($notStorable.Keys | Sort-Object)) {
|
||||
Report-Warn "22. Тип '$nk' у элемента $($notStorable[$nk]) объекта ${mdType}: такие типы бывают у реквизитов обработок и отчётов, но не у хранимых в базе"
|
||||
}
|
||||
}
|
||||
if ($unknownVocab.Count -gt 0) {
|
||||
foreach ($uk in ($unknownVocab.Keys | Sort-Object)) {
|
||||
Report-Warn "22. Тип '$uk' не в списке известных платформенных типов — проверьте написание (список пополняется с версиями платформы)"
|
||||
}
|
||||
}
|
||||
if ($badGrammar.Count -eq 0 -and $notStorable.Count -eq 0 -and $unknownVocab.Count -eq 0 -and $typesSeen -gt 0) {
|
||||
Report-OK "22. Type names: $typesSeen checked"
|
||||
}
|
||||
|
||||
# --- Check 18: свойства, появившиеся в новых версиях формата ---
|
||||
# Реестр «тег → минимальная версия формата». Служит двум целям: (1) поймать свойство в файле со
|
||||
# слишком старым штампом — при сборке на старой платформе оно будет молча отброшено (платформа
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# meta-validate v1.27 — Validate 1C metadata object structure (Python port)
|
||||
# meta-validate v1.28 — Validate 1C metadata object structure (Python port)
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import os
|
||||
@@ -1569,6 +1569,103 @@ if config_dir:
|
||||
if not absent_refs and not missing_refs and not unknown_refs and checked_refs:
|
||||
report_ok(f"16. Reference types: {len(checked_refs)} resolved")
|
||||
|
||||
# ── Check 22: имя типа — грамматика (уровень 1) и словарь по контексту владельца (уровень 2) ──
|
||||
# УРОВЕНЬ 1 не зависит ни от версии платформы, ни от состава конфигурации: содержимое <v8:Type>
|
||||
# всегда несёт префикс пространства имён (xs:/v8:/cfg:/dNpM:/ent:/…). Голое имя платформа не примет
|
||||
# никогда — так выглядит и тип СУБД («varchar(150)»), и опечатка («Srting(20)»).
|
||||
# УРОВЕНЬ 2 — словарь: у хранимого объекта набор типов у́же, чем у обработки или отчёта, где
|
||||
# доступны ТаблицаЗначений, ОписаниеТипов, Картинка и прочие рантайм-типы. Здесь только
|
||||
# предупреждение: список конечен, но пополняется с версиями платформы.
|
||||
KNOWN_XS_TYPES = {"xs:string", "xs:decimal", "xs:boolean", "xs:dateTime", "xs:base64Binary"}
|
||||
KNOWN_V8_TYPES = {
|
||||
"ValueStorage", "UUID", "Null", "Type", "ValueTable", "ValueTree", "ValueList",
|
||||
"ValueListType", "StandardPeriod", "StandardBeginningDate", "PointInTime", "TypeDescription",
|
||||
"FixedArray", "FixedMap", "FixedStructure", "FillChecking", "Universal",
|
||||
}
|
||||
# Ссылочные метатипы: с именем объекта (<Метатип>.<Имя>) — конкретный тип, без имени — множество.
|
||||
REF_META_TYPES = {
|
||||
"CatalogRef", "DocumentRef", "EnumRef", "ChartOfAccountsRef",
|
||||
"ChartOfCharacteristicTypesRef", "ChartOfCalculationTypesRef", "ExchangePlanRef",
|
||||
"BusinessProcessRef", "BusinessProcessRoutePointRef", "TaskRef", "AnyRef", "AnyIBRef",
|
||||
}
|
||||
# Прочие имена пространства current-config без точки — платформенные, состав конфигурации их не меняет.
|
||||
CFG_BARE_NAMES = {"ConstantsSet", "ReportBuilder", "FilterCriterion", "DynamicList"}
|
||||
# Виды, чьи реквизиты ХРАНЯТСЯ в базе: там рантайм-типы недопустимы. У обработки и отчёта — наоборот.
|
||||
STORED_OWNER_TYPES = {
|
||||
"Catalog", "Document", "DocumentJournal", "InformationRegister", "AccumulationRegister",
|
||||
"AccountingRegister", "CalculationRegister", "ChartOfAccounts", "ChartOfCharacteristicTypes",
|
||||
"ChartOfCalculationTypes", "ExchangePlan", "BusinessProcess", "Task", "Constant", "Table",
|
||||
}
|
||||
ATTR_TYPE_HOLDERS = {
|
||||
"Attribute", "Dimension", "Resource", "Column", "Field", "AddressingAttribute",
|
||||
"AccountingFlag", "ExtDimensionAccountingFlag",
|
||||
}
|
||||
|
||||
|
||||
def _is_storable_type(t):
|
||||
if t in KNOWN_XS_TYPES:
|
||||
return True
|
||||
if t in ("v8:ValueStorage", "v8:UUID", "v8:Null"):
|
||||
return True
|
||||
m = re.match(r"^(?:cfg|d\d+p\d+):(.+)$", t)
|
||||
if not m:
|
||||
return False
|
||||
name = m.group(1)
|
||||
base = name.split(".", 1)[0]
|
||||
if base in REF_META_TYPES:
|
||||
return True
|
||||
return base in ("DefinedType", "Characteristic", "ExternalDataSourceTableRef")
|
||||
|
||||
|
||||
type_nodes_22 = root.findall(".//v8:Type", NS) + root.findall(".//v8:TypeSet", NS)
|
||||
bad_grammar = {}
|
||||
unknown_vocab = {}
|
||||
not_storable = {}
|
||||
types_seen = 0
|
||||
for tn in type_nodes_22:
|
||||
t = (tn.text or "").strip()
|
||||
if not t:
|
||||
continue
|
||||
types_seen += 1
|
||||
if ":" not in t:
|
||||
bad_grammar[t] = True
|
||||
continue
|
||||
prefix, local = t.split(":", 1)
|
||||
if prefix == "xs":
|
||||
if t not in KNOWN_XS_TYPES:
|
||||
unknown_vocab[t] = True
|
||||
elif prefix == "v8":
|
||||
if local not in KNOWN_V8_TYPES:
|
||||
unknown_vocab[t] = True
|
||||
elif prefix == "cfg" or re.match(r"^d\d+p\d+$", prefix):
|
||||
# Имя объекта конфигурации проверяет Check 16; здесь — только форма и платформенная часть.
|
||||
if "." not in local:
|
||||
if (local not in REF_META_TYPES and local not in CFG_BARE_NAMES
|
||||
and not re.match(r"^[A-Za-z][A-Za-z0-9]*(Object|Manager|List|Selection|RecordSet|RecordKey|RecordManager)$", local)):
|
||||
unknown_vocab[t] = True
|
||||
elif not re.match(r"^[A-Za-z][A-Za-z0-9]*\.[^.]+(\.[^.]+)?$", local):
|
||||
bad_grammar[t] = True
|
||||
# Прочие пространства (ent:, v8ui:, dcs*:, mxl: …) — форму имени не навязываем: там свои словари.
|
||||
|
||||
if md_type in STORED_OWNER_TYPES:
|
||||
owner = tn.getparent() # <Type>
|
||||
props = owner.getparent() if owner is not None else None # <Properties>
|
||||
child = props.getparent() if props is not None else None # <Attribute>/<Field>/…
|
||||
if child is not None and etree.QName(child).localname in ATTR_TYPE_HOLDERS and not _is_storable_type(t):
|
||||
not_storable[t] = etree.QName(child).localname
|
||||
|
||||
for bk in sorted(bad_grammar):
|
||||
report_error(f"22. Тип '{bk}' — не имя типа платформы: нет префикса пространства имён либо "
|
||||
"неверна форма ссылочного типа. При загрузке — «Неизвестное имя типа»")
|
||||
for nk in sorted(not_storable):
|
||||
report_warn(f"22. Тип '{nk}' у элемента {not_storable[nk]} объекта {md_type}: такие типы "
|
||||
"бывают у реквизитов обработок и отчётов, но не у хранимых в базе")
|
||||
for uk in sorted(unknown_vocab):
|
||||
report_warn(f"22. Тип '{uk}' не в списке известных платформенных типов — проверьте написание "
|
||||
"(список пополняется с версиями платформы)")
|
||||
if not bad_grammar and not not_storable and not unknown_vocab and types_seen:
|
||||
report_ok(f"22. Type names: {types_seen} checked")
|
||||
|
||||
# ── Check 18: свойства, появившиеся в новых версиях формата ──
|
||||
# Реестр «тег → минимальная версия формата». Служит двум целям: (1) поймать свойство в файле со
|
||||
# слишком старым штампом — при сборке на старой платформе оно будет молча отброшено (платформа
|
||||
|
||||
@@ -29,7 +29,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/mxl-compile.ps1" -JsonPath "<путь>.json" -OutputPath "<путь>/Template.xml"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/mxl-compile.py" -JsonPath "<путь>.json" -OutputPath "<путь>/Template.xml"
|
||||
```
|
||||
|
||||
## Рабочий процесс
|
||||
|
||||
@@ -29,7 +29,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/mxl-decompile.ps1" -TemplatePath "<путь>/Template.xml" [-OutputPath "<путь>.json"]
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/mxl-decompile.py" -TemplatePath "<путь>/Template.xml" [-OutputPath "<путь>.json"]
|
||||
```
|
||||
|
||||
## Рабочий процесс
|
||||
|
||||
@@ -38,12 +38,12 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/mxl-info.ps1" -TemplatePath "<путь>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/mxl-info.py" -TemplatePath "<путь>"
|
||||
```
|
||||
|
||||
Или по имени обработки/макета:
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/mxl-info.ps1" -ProcessorName "<Имя>" -TemplateName "<Макет>" [-SrcDir "<каталог>"]
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/mxl-info.py" -ProcessorName "<Имя>" -TemplateName "<Макет>" [-SrcDir "<каталог>"]
|
||||
```
|
||||
|
||||
Дополнительные флаги:
|
||||
|
||||
@@ -23,7 +23,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/mxl-validate.ps1" -TemplatePath "Catalogs/Номенклатура/Templates/Макет"
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/mxl-validate.ps1" -TemplatePath "src/МояОбработка/Templates/ПечатнаяФорма"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/mxl-validate.py" -TemplatePath "Catalogs/Номенклатура/Templates/Макет"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/mxl-validate.py" -TemplatePath "src/МояОбработка/Templates/ПечатнаяФорма"
|
||||
```
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ allowed-tools:
|
||||
| `OutputDir` | Корень выгрузки конфигурации (где `Configuration.xml`, `Roles/` и т.д.) |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/role-compile.ps1" -JsonPath "<json>" -OutputDir "<ConfigDir>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/role-compile.py" -JsonPath "<json>" -OutputDir "<ConfigDir>"
|
||||
```
|
||||
|
||||
Создаёт `{OutputDir}/Roles/Имя.xml` и `{OutputDir}/Roles/Имя/Ext/Rights.xml`. Регистрирует `<Role>` в `Configuration.xml`.
|
||||
|
||||
@@ -22,7 +22,7 @@ allowed-tools:
|
||||
## Запуск скрипта
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/role-info.ps1" -RightsPath <path> -OutFile <output.txt>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/role-info.py" -RightsPath <path> -OutFile <output.txt>
|
||||
```
|
||||
|
||||
### Параметры
|
||||
|
||||
@@ -23,7 +23,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/role-validate.ps1" -RightsPath "Roles/МояРоль"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/role-validate.py" -RightsPath "Roles/МояРоль"
|
||||
```
|
||||
|
||||
## Что считается ошибкой
|
||||
|
||||
@@ -23,10 +23,10 @@ allowed-tools:
|
||||
|
||||
```powershell
|
||||
# Из файла
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/skd-compile.ps1" -DefinitionFile "<json>" -OutputPath "<Template.xml>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/skd-compile.py" -DefinitionFile "<json>" -OutputPath "<Template.xml>"
|
||||
|
||||
# Из строки (без промежуточного файла)
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/skd-compile.ps1" -Value '<json-string>' -OutputPath "<Template.xml>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/skd-compile.py" -Value '<json-string>' -OutputPath "<Template.xml>"
|
||||
```
|
||||
|
||||
## JSON DSL — краткий справочник
|
||||
|
||||
@@ -31,7 +31,7 @@ allowed-tools:
|
||||
| `OutputPath` | Путь к выходному JSON. Если не задан — JSON в stdout |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/skd-decompile.ps1" -TemplatePath "<Template.xml>" -OutputPath "<out.json>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/skd-decompile.py" -TemplatePath "<Template.xml>" -OutputPath "<out.json>"
|
||||
```
|
||||
|
||||
## Что получаешь
|
||||
|
||||
@@ -25,7 +25,7 @@ allowed-tools:
|
||||
| `NoSelection` | (опц.) Не добавлять поле в selection варианта |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/skd-edit.ps1" -TemplatePath "<path>" -Operation <op> -Value "<value>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/skd-edit.py" -TemplatePath "<path>" -Operation <op> -Value "<value>"
|
||||
```
|
||||
|
||||
## Пакетный режим (batch)
|
||||
|
||||
@@ -25,7 +25,7 @@ allowed-tools:
|
||||
| `OutFile` | Записать результат в файл (UTF-8 BOM) |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/skd-info.ps1" -TemplatePath "<путь>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/skd-info.py" -TemplatePath "<путь>"
|
||||
```
|
||||
|
||||
С указанием режима:
|
||||
|
||||
@@ -24,6 +24,6 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/skd-validate.ps1" -TemplatePath "src/МойОтчёт/Templates/ОсновнаяСхема"
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/skd-validate.ps1" -TemplatePath "Catalogs/Номенклатура/Templates/СКД/Ext/Template.xml"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/skd-validate.py" -TemplatePath "src/МойОтчёт/Templates/ОсновнаяСхема"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/skd-validate.py" -TemplatePath "Catalogs/Номенклатура/Templates/СКД/Ext/Template.xml"
|
||||
```
|
||||
|
||||
@@ -24,7 +24,7 @@ allowed-tools:
|
||||
| `NoValidate` | Пропустить авто-валидацию |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/subsystem-compile.ps1" -Value '<json>' -OutputDir '<ConfigDir>'
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/subsystem-compile.py" -Value '<json>' -OutputDir '<ConfigDir>'
|
||||
```
|
||||
|
||||
## JSON-определение
|
||||
|
||||
@@ -24,7 +24,7 @@ allowed-tools:
|
||||
| `NoValidate` | Пропустить авто-валидацию |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/subsystem-edit.ps1" -SubsystemPath '<path>' -Operation add-content -Value 'Catalog.Товары'
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/subsystem-edit.py" -SubsystemPath '<path>' -Operation add-content -Value 'Catalog.Товары'
|
||||
```
|
||||
|
||||
## Операции
|
||||
|
||||
@@ -23,7 +23,7 @@ allowed-tools:
|
||||
| `OutFile` | Записать результат в файл (UTF-8 BOM) |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/subsystem-info.ps1" -SubsystemPath "<путь>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/subsystem-info.py" -SubsystemPath "<путь>"
|
||||
```
|
||||
|
||||
## Пять режимов
|
||||
|
||||
@@ -24,6 +24,6 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/subsystem-validate.ps1" -SubsystemPath "Subsystems/Продажи"
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/subsystem-validate.ps1" -SubsystemPath "Subsystems/Продажи.xml"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/subsystem-validate.py" -SubsystemPath "Subsystems/Продажи"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/subsystem-validate.py" -SubsystemPath "Subsystems/Продажи.xml"
|
||||
```
|
||||
|
||||
@@ -28,7 +28,7 @@ allowed-tools:
|
||||
`-Path` — тот же путь, который отклонил `support-guard` (объект, форма, макет или каталог дампа).
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/support-edit.ps1" -Path "Catalogs/Контрагенты.xml" -Set editable
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/support-edit.py" -Path "Catalogs/Контрагенты.xml" -Set editable
|
||||
```
|
||||
|
||||
## editable или off-support?
|
||||
|
||||
@@ -33,7 +33,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/add-template.ps1" -ObjectName "<ObjectName>" -TemplateName "<TemplateName>" -TemplateType "<TemplateType>" [-Synonym "<Synonym>"] [-SrcDir "<SrcDir>"] [-SetMainSKD]
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/add-template.py" -ObjectName "<ObjectName>" -TemplateName "<TemplateName>" -TemplateType "<TemplateType>" [-Synonym "<Synonym>"] [-SrcDir "<SrcDir>"] [-SetMainSKD]
|
||||
```
|
||||
|
||||
## Пример
|
||||
@@ -41,7 +41,7 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/add-template.ps1" -
|
||||
Добавить основную СКД к отчёту в расширении:
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/add-template.ps1" -ObjectName "ОтчётПродажи" -TemplateName "ОсновнаяСхемаКомпоновкиДанных" -TemplateType "DataCompositionSchema" -SrcDir "src/cfe/МоёРасширение/Reports"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/add-template.py" -ObjectName "ОтчётПродажи" -TemplateName "ОсновнаяСхемаКомпоновкиДанных" -TemplateType "DataCompositionSchema" -SrcDir "src/cfe/МоёРасширение/Reports"
|
||||
```
|
||||
|
||||
## Маппинг типов
|
||||
|
||||
@@ -31,7 +31,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/remove-template.ps1" -ObjectName "<ObjectName>" -TemplateName "<TemplateName>" [-SrcDir "<SrcDir>"]
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/remove-template.py" -ObjectName "<ObjectName>" -TemplateName "<TemplateName>" [-SrcDir "<SrcDir>"]
|
||||
```
|
||||
|
||||
## Что удаляется
|
||||
|
||||
@@ -26,7 +26,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-info.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-info.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -62,8 +62,8 @@ Apache, но не публикаций. Убедиться в конкретно
|
||||
|
||||
```powershell
|
||||
# Статус по умолчанию
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-info.ps1"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-info.py"
|
||||
|
||||
# Указать путь к Apache
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-info.ps1" -ApachePath "C:\tools\apache24"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-info.py" -ApachePath "C:\tools\apache24"
|
||||
```
|
||||
|
||||
@@ -41,7 +41,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-publish.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-publish.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -92,14 +92,14 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-publish.ps1" <
|
||||
|
||||
```powershell
|
||||
# Файловая база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-publish.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-publish.py" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin"
|
||||
|
||||
# С явным именем публикации и портом
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-publish.ps1" -InfoBasePath "C:\Bases\MyDB" -AppName "mydb" -Port 9090
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-publish.py" -InfoBasePath "C:\Bases\MyDB" -AppName "mydb" -Port 9090
|
||||
|
||||
# Серверная база
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-publish.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-publish.py" -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret"
|
||||
|
||||
# Ручной режим (только инструкция)
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-publish.ps1" -InfoBasePath "C:\Bases\MyDB" -Manual
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-publish.py" -InfoBasePath "C:\Bases\MyDB" -Manual
|
||||
```
|
||||
|
||||
@@ -26,7 +26,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-stop.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-stop.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -45,8 +45,8 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-stop.ps1" <па
|
||||
|
||||
```powershell
|
||||
# Остановить Apache
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-stop.ps1"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-stop.py"
|
||||
|
||||
# С указанием пути
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-stop.ps1" -ApachePath "C:\tools\apache24"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-stop.py" -ApachePath "C:\tools\apache24"
|
||||
```
|
||||
|
||||
@@ -35,7 +35,7 @@ allowed-tools:
|
||||
## Команда
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-unpublish.ps1" <параметры>
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-unpublish.py" <параметры>
|
||||
```
|
||||
|
||||
### Параметры скрипта
|
||||
@@ -52,11 +52,11 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-unpublish.ps1"
|
||||
|
||||
```powershell
|
||||
# Удалить одну публикацию
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-unpublish.ps1" -AppName "bpdemo"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-unpublish.py" -AppName "bpdemo"
|
||||
|
||||
# Удалить все публикации
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-unpublish.ps1" -All
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-unpublish.py" -All
|
||||
|
||||
# С указанием пути
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/web-unpublish.ps1" -AppName "mydb" -ApachePath "C:\tools\apache24"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/web-unpublish.py" -AppName "mydb" -ApachePath "C:\tools\apache24"
|
||||
```
|
||||
|
||||
@@ -28,7 +28,7 @@ allowed-tools:
|
||||
| `Force` | нет | Перезаписать существующий пакет. Без него навык откажется затирать уже собранный пакет |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/xdto-compile.ps1" -XsdPath "<схема.xsd>" -OutputDir "<каталог-исходников>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/xdto-compile.py" -XsdPath "<схема.xsd>" -OutputDir "<каталог-исходников>"
|
||||
```
|
||||
|
||||
Примеры:
|
||||
|
||||
@@ -21,7 +21,7 @@ allowed-tools:
|
||||
| `OutFile` | нет | Записать схему в файл (UTF-8 с BOM). Без него — вывод в stdout |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/xdto-decompile.ps1" -PackagePath "<путь>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/xdto-decompile.py" -PackagePath "<путь>"
|
||||
```
|
||||
|
||||
Примеры:
|
||||
|
||||
@@ -27,7 +27,7 @@ allowed-tools:
|
||||
| `NoValidate` | нет | Не запускать `xdto-validate` после правки |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/xdto-edit.ps1" -PackagePath "<путь>" -Operation <op> -Target "<адрес>" -Value "<значение>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/xdto-edit.py" -PackagePath "<путь>" -Operation <op> -Target "<адрес>" -Value "<значение>"
|
||||
```
|
||||
|
||||
## Операции
|
||||
|
||||
@@ -29,7 +29,7 @@ allowed-tools:
|
||||
| `OutFile` | нет | Записать результат в файл (UTF-8 BOM) |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/xdto-info.ps1" -PackagePath "<путь>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/xdto-info.py" -PackagePath "<путь>"
|
||||
```
|
||||
|
||||
## Что показывает
|
||||
|
||||
@@ -24,7 +24,7 @@ allowed-tools:
|
||||
| `OutFile` | нет | Записать отчёт в файл |
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/xdto-validate.ps1" -PackagePath "<путь>"
|
||||
python "${CLAUDE_SKILL_DIR}/scripts/xdto-validate.py" -PackagePath "<путь>"
|
||||
```
|
||||
|
||||
`[ERROR]` — платформа такой пакет не примет либо примет неправильно.
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# Коммиты, которые git blame должен «проскакивать» (механические правки —
|
||||
# не меняют авторство содержимого). Включить локально:
|
||||
# git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
# GitHub/GitLab уважают этот файл в blame-UI автоматически.
|
||||
|
||||
# chore(repo): нормализация EOL к LF + .gitattributes
|
||||
26888a07d58351755fb8e487727c00d5b611eb95
|
||||
@@ -1,28 +0,0 @@
|
||||
# EOL policy
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# Авторский контент нормализуем к LF: инструмент правки (Edit) всегда пишет LF,
|
||||
# поэтому единый LF убирает EOL-шум в диффах и ловушку «не правь CRLF-файл».
|
||||
# git с eol=lf конвертит ТОЛЬКО CR<->LF и не трогает BOM (BOM — байты контента),
|
||||
# поэтому BOM на .ps1 сохраняется.
|
||||
*.ps1 text eol=lf
|
||||
*.psm1 text eol=lf
|
||||
*.py text eol=lf
|
||||
*.mjs text eol=lf
|
||||
*.md text eol=lf
|
||||
*.json text eol=lf
|
||||
.gitignore text eol=lf
|
||||
|
||||
# .bsl уже целиком LF — пин фиксирует статус-кво от будущего дрейфа.
|
||||
*.bsl text eol=lf
|
||||
|
||||
# Данные 1С НЕ трогаем. *.xml — реальные выгрузки 1С (EOL местами значим,
|
||||
# правим не мы, а навыки): оставляем как есть, под управление не берём.
|
||||
# autocrlf=false и отсутствие text-атрибута => git хранит их байты как есть.
|
||||
|
||||
# Бинарники 1С
|
||||
*.bin binary
|
||||
|
||||
# Package.bin пакетов XDTO — текстовый XML, несмотря на расширение. Оставляем
|
||||
# под правилом *.bin binary (байты не нормализуются), но включаем текстовый diff,
|
||||
# иначе изменение модели пакета в истории выглядит как «Binary files differ».
|
||||
XDTOPackages/**/Package.bin diff
|
||||
@@ -1,26 +0,0 @@
|
||||
# 1C Skills for {{PLATFORM_LABEL}} ({{RUNTIME_LABEL}})
|
||||
|
||||
Автоматическая сборка из [main]({{MAIN_REPO_URL}}) — навыки 1С:Предприятие 8.3 для AI-агента **{{PLATFORM_LABEL}}** с рантаймом **{{RUNTIME_LABEL}}**.
|
||||
|
||||
> Эта ветка генерируется CI на каждый push в main. **Не редактируйте напрямую** — все правки идут в [main]({{MAIN_REPO_URL}}).
|
||||
|
||||
## Установка
|
||||
|
||||
1. Скачайте ZIP этой ветки: **Code → Download ZIP** (или `git archive`).
|
||||
2. Распакуйте в корень своего проекта — должна появиться папка `{{PLATFORM_DIR}}/`.
|
||||
3. Запустите {{PLATFORM_LABEL}} из этого проекта — навыки станут доступны.
|
||||
|
||||
## Требования
|
||||
|
||||
{{RUNTIME_REQUIREMENTS}}
|
||||
- **1С:Предприятие 8.3** — для сборки/разборки EPF/ERF и работы с базами.
|
||||
- **Node.js 18+** — для `/web-test`.
|
||||
|
||||
## Документация
|
||||
|
||||
Полные гайды, спецификации и описание навыков — в [main]({{MAIN_REPO_URL}}).
|
||||
|
||||
---
|
||||
|
||||
Source: {{MAIN_REPO_URL}}
|
||||
Build commit: `{{COMMIT_SHA}}`
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
|
||||
"name": "{{PLUGIN_NAME}}",
|
||||
"description": "[Python] Навыки для разработки на 1С:Предприятие 8.3 — абстракции над XML-форматами и CLI конфигуратора, плюс глаза и руки для тестирования через веб-клиент. Linux/Mac или когда PowerShell недоступен.",
|
||||
"author": {
|
||||
"name": "Nikolay Shirokov"
|
||||
},
|
||||
"homepage": "https://github.com/Nikolay-Shirokov/cc-1c-skills",
|
||||
"repository": "https://github.com/Nikolay-Shirokov/cc-1c-skills",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"1c",
|
||||
"1c-dev",
|
||||
"cf",
|
||||
"cfe",
|
||||
"epf",
|
||||
"erf",
|
||||
"metadata",
|
||||
"configuration",
|
||||
"extension",
|
||||
"form",
|
||||
"report",
|
||||
"skd",
|
||||
"data-processor",
|
||||
"mxl",
|
||||
"web-client",
|
||||
"testing",
|
||||
"test-automation"
|
||||
],
|
||||
"skills": "./.claude/skills/"
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"name": "{{PLUGIN_NAME}}",
|
||||
"version": "{{VERSION}}",
|
||||
"description": "[{{RUNTIME_LABEL}}] Навыки для разработки на 1С:Предприятие 8.3 — абстракции над XML-форматами и CLI конфигуратора, плюс глаза и руки для тестирования через веб-клиент.",
|
||||
"author": {
|
||||
"name": "Nikolay Shirokov"
|
||||
},
|
||||
"homepage": "https://github.com/Nikolay-Shirokov/cc-1c-skills",
|
||||
"repository": "https://github.com/Nikolay-Shirokov/cc-1c-skills",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"1c",
|
||||
"1c-dev",
|
||||
"cf",
|
||||
"cfe",
|
||||
"epf",
|
||||
"erf",
|
||||
"metadata",
|
||||
"configuration",
|
||||
"extension",
|
||||
"form",
|
||||
"report",
|
||||
"skd",
|
||||
"data-processor",
|
||||
"mxl",
|
||||
"web-client",
|
||||
"testing",
|
||||
"test-automation"
|
||||
],
|
||||
"skills": "./.codex/skills/",
|
||||
"interface": {
|
||||
"displayName": "1C Skills ({{RUNTIME_LABEL}})",
|
||||
"shortDescription": "{{SHORT_DESCRIPTION}}",
|
||||
"category": "Development"
|
||||
}
|
||||
}
|
||||
@@ -1,246 +0,0 @@
|
||||
name: Build port branches
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '.claude/skills/**'
|
||||
- 'scripts/switch.py'
|
||||
- 'requirements.txt'
|
||||
- '.github/templates/README.port.md.tmpl'
|
||||
- '.github/templates/codex-plugin.json.tmpl'
|
||||
- '.github/templates/claude-plugin.json.tmpl'
|
||||
- '.github/workflows/build-ports.yml'
|
||||
- 'LICENSE'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: claude-code
|
||||
runtime: python
|
||||
branch: port-claude-code-py
|
||||
label: Claude Code
|
||||
target_dir: .claude/skills
|
||||
- platform: cursor
|
||||
runtime: powershell
|
||||
branch: port-cursor
|
||||
label: Cursor
|
||||
target_dir: .cursor/skills
|
||||
- platform: cursor
|
||||
runtime: python
|
||||
branch: port-cursor-py
|
||||
label: Cursor
|
||||
target_dir: .cursor/skills
|
||||
- platform: codex
|
||||
runtime: powershell
|
||||
branch: port-codex
|
||||
label: Codex
|
||||
target_dir: .codex/skills
|
||||
- platform: codex
|
||||
runtime: python
|
||||
branch: port-codex-py
|
||||
label: Codex
|
||||
target_dir: .codex/skills
|
||||
- platform: copilot
|
||||
runtime: powershell
|
||||
branch: port-copilot
|
||||
label: GitHub Copilot
|
||||
target_dir: .github/skills
|
||||
- platform: copilot
|
||||
runtime: python
|
||||
branch: port-copilot-py
|
||||
label: GitHub Copilot
|
||||
target_dir: .github/skills
|
||||
- platform: augment
|
||||
runtime: powershell
|
||||
branch: port-augment
|
||||
label: Augment
|
||||
target_dir: .augment/skills
|
||||
- platform: augment
|
||||
runtime: python
|
||||
branch: port-augment-py
|
||||
label: Augment
|
||||
target_dir: .augment/skills
|
||||
- platform: cline
|
||||
runtime: powershell
|
||||
branch: port-cline
|
||||
label: Cline
|
||||
target_dir: .cline/skills
|
||||
- platform: cline
|
||||
runtime: python
|
||||
branch: port-cline-py
|
||||
label: Cline
|
||||
target_dir: .cline/skills
|
||||
- platform: kilo
|
||||
runtime: powershell
|
||||
branch: port-kilo
|
||||
label: Kilo Code
|
||||
target_dir: .kilocode/skills
|
||||
- platform: kilo
|
||||
runtime: python
|
||||
branch: port-kilo-py
|
||||
label: Kilo Code
|
||||
target_dir: .kilocode/skills
|
||||
- platform: kiro
|
||||
runtime: powershell
|
||||
branch: port-kiro
|
||||
label: Kiro
|
||||
target_dir: .kiro/skills
|
||||
- platform: kiro
|
||||
runtime: python
|
||||
branch: port-kiro-py
|
||||
label: Kiro
|
||||
target_dir: .kiro/skills
|
||||
- platform: gemini
|
||||
runtime: powershell
|
||||
branch: port-gemini
|
||||
label: Gemini CLI
|
||||
target_dir: .gemini/skills
|
||||
- platform: gemini
|
||||
runtime: python
|
||||
branch: port-gemini-py
|
||||
label: Gemini CLI
|
||||
target_dir: .gemini/skills
|
||||
- platform: opencode
|
||||
runtime: powershell
|
||||
branch: port-opencode
|
||||
label: OpenCode
|
||||
target_dir: .opencode/skills
|
||||
- platform: opencode
|
||||
runtime: python
|
||||
branch: port-opencode-py
|
||||
label: OpenCode
|
||||
target_dir: .opencode/skills
|
||||
- platform: roo
|
||||
runtime: powershell
|
||||
branch: port-roo
|
||||
label: Roo Code
|
||||
target_dir: .roo/skills
|
||||
- platform: roo
|
||||
runtime: python
|
||||
branch: port-roo-py
|
||||
label: Roo Code
|
||||
target_dir: .roo/skills
|
||||
- platform: windsurf
|
||||
runtime: powershell
|
||||
branch: port-windsurf
|
||||
label: Windsurf
|
||||
target_dir: .windsurf/skills
|
||||
- platform: windsurf
|
||||
runtime: python
|
||||
branch: port-windsurf-py
|
||||
label: Windsurf
|
||||
target_dir: .windsurf/skills
|
||||
- platform: codeassistant
|
||||
runtime: powershell
|
||||
branch: port-codeassistant
|
||||
label: Yandex Code Assistant
|
||||
target_dir: .codeassistant/skills
|
||||
- platform: codeassistant
|
||||
runtime: python
|
||||
branch: port-codeassistant-py
|
||||
label: Yandex Code Assistant
|
||||
target_dir: .codeassistant/skills
|
||||
- platform: agents
|
||||
runtime: powershell
|
||||
branch: port-agents
|
||||
label: Agent Skills
|
||||
target_dir: .agents/skills
|
||||
- platform: agents
|
||||
runtime: python
|
||||
branch: port-agents-py
|
||||
label: Agent Skills
|
||||
target_dir: .agents/skills
|
||||
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Build skills tree for ${{ matrix.platform }} (${{ matrix.runtime }})
|
||||
run: |
|
||||
python scripts/switch.py "${{ matrix.platform }}" \
|
||||
--project-dir build \
|
||||
--runtime "${{ matrix.runtime }}"
|
||||
|
||||
- name: Render port README
|
||||
env:
|
||||
PLATFORM_LABEL: ${{ matrix.label }}
|
||||
PLATFORM_DIR: ${{ matrix.target_dir }}
|
||||
RUNTIME: ${{ matrix.runtime }}
|
||||
RUNTIME_LABEL: ${{ matrix.runtime == 'powershell' && 'PowerShell' || 'Python' }}
|
||||
COMMIT_SHA: ${{ github.sha }}
|
||||
MAIN_REPO_URL: https://github.com/${{ github.repository }}
|
||||
run: |
|
||||
if [ "$RUNTIME" = "powershell" ]; then
|
||||
RUNTIME_REQUIREMENTS='- **Windows** с PowerShell 5.1+ (входит в Windows).'
|
||||
else
|
||||
RUNTIME_REQUIREMENTS='- **Python 3.9+**. Установка зависимостей: `pip install -r requirements.txt` (lxml, Pillow, psutil).'
|
||||
fi
|
||||
sed \
|
||||
-e "s|{{PLATFORM_LABEL}}|${PLATFORM_LABEL}|g" \
|
||||
-e "s|{{PLATFORM_DIR}}|${PLATFORM_DIR}|g" \
|
||||
-e "s|{{RUNTIME_LABEL}}|${RUNTIME_LABEL}|g" \
|
||||
-e "s|{{RUNTIME_REQUIREMENTS}}|${RUNTIME_REQUIREMENTS}|g" \
|
||||
-e "s|{{COMMIT_SHA}}|${COMMIT_SHA}|g" \
|
||||
-e "s|{{MAIN_REPO_URL}}|${MAIN_REPO_URL}|g" \
|
||||
.github/templates/README.port.md.tmpl > build/README.md
|
||||
|
||||
- name: Render Codex plugin manifest
|
||||
if: matrix.platform == 'codex'
|
||||
env:
|
||||
PLUGIN_NAME: ${{ matrix.runtime == 'python' && '1c-skills-py' || '1c-skills' }}
|
||||
RUNTIME_LABEL: ${{ matrix.runtime == 'powershell' && 'PowerShell' || 'Python' }}
|
||||
SHORT_DESCRIPTION: ${{ matrix.runtime == 'python' && 'Python runtime (Linux/Mac/Windows)' || 'PowerShell runtime (Windows-first)' }}
|
||||
COMMIT_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
VERSION="$(date -u +%Y.%-m.%-d)+${COMMIT_SHA::7}"
|
||||
mkdir -p build/.codex-plugin
|
||||
sed \
|
||||
-e "s|{{PLUGIN_NAME}}|${PLUGIN_NAME}|g" \
|
||||
-e "s|{{VERSION}}|${VERSION}|g" \
|
||||
-e "s|{{RUNTIME_LABEL}}|${RUNTIME_LABEL}|g" \
|
||||
-e "s|{{SHORT_DESCRIPTION}}|${SHORT_DESCRIPTION}|g" \
|
||||
.github/templates/codex-plugin.json.tmpl > build/.codex-plugin/plugin.json
|
||||
|
||||
- name: Render Claude plugin manifest (Py variant)
|
||||
if: matrix.platform == 'claude-code' && matrix.runtime == 'python'
|
||||
env:
|
||||
PLUGIN_NAME: 1c-skills-py
|
||||
run: |
|
||||
mkdir -p build/.claude-plugin
|
||||
sed -e "s|{{PLUGIN_NAME}}|${PLUGIN_NAME}|g" \
|
||||
.github/templates/claude-plugin.json.tmpl > build/.claude-plugin/plugin.json
|
||||
|
||||
- name: Copy LICENSE
|
||||
run: cp LICENSE build/LICENSE
|
||||
|
||||
- name: Copy requirements.txt (Python builds only)
|
||||
if: matrix.runtime == 'python'
|
||||
run: cp requirements.txt build/requirements.txt
|
||||
|
||||
- name: Force-push orphan snapshot to ${{ matrix.branch }}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
cd build
|
||||
git init -q -b master
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add -A
|
||||
git commit -q -m "Auto-build: ${{ matrix.platform }} (${{ matrix.runtime }}) from ${GITHUB_SHA::7}"
|
||||
git push --force \
|
||||
"https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" \
|
||||
"master:${{ matrix.branch }}"
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
# Реальные выгрузки обработок (примеры, не для версионирования)
|
||||
upload/
|
||||
|
||||
# Результаты сборки
|
||||
build/
|
||||
base/
|
||||
*.epf
|
||||
*.log
|
||||
|
||||
# Временные файлы тестов
|
||||
test-tmp/
|
||||
|
||||
# Локальные настройки Claude Code
|
||||
.claude/settings.local.json
|
||||
|
||||
# Инструменты (portable Apache и т.д.)
|
||||
tools/
|
||||
|
||||
# Отладка навыков (eval, trigger-test, run_loop результаты)
|
||||
debug/
|
||||
|
||||
# Кэш тестов навыков
|
||||
tests/skills/.cache/
|
||||
|
||||
# Python кэш
|
||||
__pycache__/
|
||||
|
||||
# Локальный реестр баз данных 1С
|
||||
.v8-project.json
|
||||
# ...но в кейсах он — вход теста (настройка newObjectPosition), и эталон без него
|
||||
# на чистом клоне не сойдётся с результатом прогона.
|
||||
!tests/skills/cases/**/.v8-project.json
|
||||
|
||||
# web-test: Node.js зависимости и runtime-артефакты
|
||||
.claude/skills/web-test/scripts/node_modules/
|
||||
.claude/skills/web-test/.browser-session.json
|
||||
|
||||
# Маркер отработавшего prepare() в фикстуре _suite-root
|
||||
tests/web-test/_suite-root/prepare-ran.txt
|
||||
|
||||
# Скриншоты и видео (артефакты тестирования web-test)
|
||||
*.png
|
||||
*.mp4
|
||||
|
||||
# Навыки, скопированные для других AI-платформ (генерируются scripts/switch.py)
|
||||
.agents/skills/
|
||||
.augment/
|
||||
.cline/
|
||||
.codex/
|
||||
.cursor/
|
||||
.gemini/
|
||||
.github/skills/
|
||||
.kilocode/
|
||||
.kiro/
|
||||
.opencode/
|
||||
.roo/
|
||||
.windsurf/
|
||||
debug-templates.txt
|
||||
@@ -1,65 +0,0 @@
|
||||
{
|
||||
"v8path": "C:\\Program Files\\1cv8\\8.3.24.1691\\bin",
|
||||
"databases": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Разработка",
|
||||
"type": "file",
|
||||
"path": "C:\\Bases\\MyApp_Dev",
|
||||
"user": "Администратор",
|
||||
"password": "",
|
||||
"aliases": [
|
||||
"dev",
|
||||
"разработка"
|
||||
],
|
||||
"branches": [
|
||||
"dev",
|
||||
"develop",
|
||||
"feature/*"
|
||||
],
|
||||
"configSrc": "src\\cf",
|
||||
"webUrl": "http://localhost:8081/dev",
|
||||
"repository": {
|
||||
"path": "\\\\srv01\\repo\\MyApp",
|
||||
"user": "",
|
||||
"password": ""
|
||||
},
|
||||
"extensions": [
|
||||
{
|
||||
"name": "",
|
||||
"src": "src\\cfe",
|
||||
"repository": {
|
||||
"path": "",
|
||||
"user": "",
|
||||
"password": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Тестовая",
|
||||
"type": "server",
|
||||
"server": "srv01",
|
||||
"ref": "MyApp_Test",
|
||||
"user": "Администратор",
|
||||
"password": "",
|
||||
"aliases": [
|
||||
"test",
|
||||
"тест",
|
||||
"тестовая"
|
||||
],
|
||||
"branches": [
|
||||
"main",
|
||||
"release/*"
|
||||
]
|
||||
}
|
||||
],
|
||||
"default": "dev",
|
||||
"webPath": "C:\\tools\\apache24",
|
||||
"ffmpegPath": "C:\\tools\\ffmpeg\\bin\\ffmpeg.exe",
|
||||
"tts": {
|
||||
"provider": "edge",
|
||||
"voice": "ru-RU-DmitryNeural"
|
||||
}
|
||||
}
|
||||
@@ -1,285 +1,26 @@
|
||||
# 1C Skills for Claude Code
|
||||
# 1C Skills for Claude Code (Python)
|
||||
|
||||
> **Проект живой, активно развивается** — добавляются новые возможности, отлавливаются и исправляются баги, производится оптимизация. Следите за обновлениями.
|
||||
Автоматическая сборка из [main](https://github.com/Nikolay-Shirokov/cc-1c-skills) — навыки 1С:Предприятие 8.3 для AI-агента **Claude Code** с рантаймом **Python**.
|
||||
|
||||
Набор навыков для AI-агентов (в первую очередь для [Claude Code](https://docs.anthropic.com/en/docs/claude-code/skills)), помогающий охватить полный цикл разработки на платформе 1С:Предприятие 8.3 — от создания конфигураций, расширений, внешних обработок и отчётов до загрузки изменений в информационную базу, обновления, запуска, публикации на веб-сервере (портативная версия Apache), тестирования через веб-клиент и записи видеоинструкций.
|
||||
> Эта ветка генерируется CI на каждый push в main. **Не редактируйте напрямую** — все правки идут в [main](https://github.com/Nikolay-Shirokov/cc-1c-skills).
|
||||
|
||||
Навыки дают модели готовые абстракции над XML-форматами и CLI конфигуратора — чтобы работать с сутью задачи, а не с деталями реализации. А веб-тестирование даёт ей глаза и руки для взаимодействия с интерфейсом 1С.
|
||||
## Установка
|
||||
|
||||
## Версии навыков для разных платформ
|
||||
|
||||
> **PS** — версия со скриптами на PowerShell (стандартная, для Windows). **Py** — версия со скриптами на Python (если PowerShell не подходит). Можно начать с **PS** — это основной вариант.
|
||||
|
||||
**Claude Code** [PS](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/main) · [Py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-claude-code-py) — **Cursor** [PS](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-cursor) · [Py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-cursor-py) — **Codex** [PS](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-codex) · [Py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-codex-py) — [Другие платформы →](#поддерживаемые-платформы)
|
||||
|
||||
## Быстрый старт
|
||||
|
||||
Скопируйте каталог `.claude/skills/` из этого репозитория в корень вашего проекта. Навыки станут доступны при запуске Claude Code из этого каталога.
|
||||
|
||||
```
|
||||
МойПроект/
|
||||
├── .claude/skills/ ← скопировать сюда
|
||||
└── ...
|
||||
```
|
||||
|
||||
Или установите как плагин Claude Code:
|
||||
|
||||
```
|
||||
/plugin marketplace add https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
/plugin install 1c-skills@cc-1c-skills # PowerShell (Windows)
|
||||
/plugin install 1c-skills-py@cc-1c-skills # Python (Linux/Mac или если PS недоступен)
|
||||
```
|
||||
|
||||
Или установите как плагин OpenAI Codex:
|
||||
|
||||
```
|
||||
codex plugin marketplace add Nikolay-Shirokov/cc-1c-skills
|
||||
codex /plugins # выберите 1c-skills (PowerShell) или 1c-skills-py (Python) и нажмите Install
|
||||
```
|
||||
|
||||
Или используйте скрипт установки:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Nikolay-Shirokov/cc-1c-skills.git tools/cc-1c-skills
|
||||
|
||||
# Копия (рекомендуется): независимая копия, обновление — повторный запуск
|
||||
python tools/cc-1c-skills/scripts/switch.py claude-code --project-dir .
|
||||
|
||||
# Ссылки (экспериментально): обновления подхватываются через git pull
|
||||
python tools/cc-1c-skills/scripts/switch.py claude-code --project-dir . --link
|
||||
|
||||
# Интерактивный режим: пошаговый выбор платформы, способа установки и рантайма
|
||||
python tools/cc-1c-skills/scripts/switch.py
|
||||
```
|
||||
|
||||
Не обязательно запоминать команды и параметры — просто опишите задачу своими словами, Claude сам подберёт нужные навыки. Слеш-команды (например `/epf-init МояОбработка`) тоже работают — для точного контроля.
|
||||
|
||||
## Группы навыков
|
||||
|
||||
| Группа | Навыки | Описание | Гайд |
|
||||
|--------|--------|----------|------|
|
||||
| Внешние обработки (EPF) | 7 навыков `/epf-*` | Создание, сборка, разборка, валидация обработок из XML-исходников | [Подробнее](docs/epf-guide.md) |
|
||||
| Внешние отчёты (ERF) | 4 навыка `/erf-*` | Создание, сборка, разборка, валидация внешних отчётов | [Подробнее](docs/epf-guide.md#внешние-отчёты-erf) |
|
||||
| Универсальные операции | `/template-add`, `/template-remove`, `/help-add`, `/form-remove` | Добавление/удаление макетов, форм, справки для любых объектов | [Подробнее](docs/epf-guide.md#универсальные-навыки) |
|
||||
| Табличный документ (MXL) | 4 навыка `/mxl-*` | Анализ, создание, компиляция макетов печатных форм | [Подробнее](docs/mxl-guide.md) |
|
||||
| Управляемые формы (Form) | 6 навыков `/form-*` | Создание, анализ, генерация, модификация, валидация управляемых форм | [Подробнее](docs/form-guide.md) |
|
||||
| Роли (Role) | 3 навыка `/role-*` | Анализ прав роли, создание из JSON DSL, валидация | [Подробнее](docs/role-guide.md) |
|
||||
| Схема компоновки (СКД) | 4 навыка `/skd-*` | Анализ, генерация из JSON DSL, точечное редактирование, валидация схем компоновки данных | [Подробнее](docs/skd-guide.md) |
|
||||
| Метаданные конфигурации | 5 навыков `/meta-*` | Создание, анализ, редактирование, удаление, валидация объектов метаданных (23 типа) | [Подробнее](docs/meta-guide.md) |
|
||||
| Корневая конфигурация | 4 навыка `/cf-*` | Создание, анализ, редактирование, валидация корневых файлов конфигурации | [Подробнее](docs/cf-guide.md) |
|
||||
| Расширения (CFE) | 5 навыков `/cfe-*` | Создание, заимствование, перехват методов, валидация, анализ расширений | [Подробнее](docs/cfe-guide.md) |
|
||||
| Подсистемы (Subsystem) | 4 навыка `/subsystem-*` | Анализ, создание, редактирование, валидация подсистем конфигурации | [Подробнее](docs/subsystem-guide.md) |
|
||||
| Командный интерфейс (CI) | 2 навыка `/interface-*` | Редактирование и валидация CommandInterface.xml подсистем | [Подробнее](docs/subsystem-guide.md) |
|
||||
| Пакеты XDTO | 5 навыков `/xdto-*` | Анализ, создание из XML-схемы, выгрузка в схему, точечное редактирование, валидация пакетов XDTO | [Подробнее](docs/xdto-guide.md) |
|
||||
| Базы данных (DB) | 13 навыков `/db-*` | Создание баз, загрузка/выгрузка конфигураций, обновление БД, загрузка из Git, хранилище конфигурации, управление расширениями в базе | [Подробнее](docs/db-guide.md) |
|
||||
| Веб-публикация (Web) | 4 навыка `/web-*` | Публикация баз через Apache, статус, остановка, удаление публикаций | [Подробнее](docs/web-guide.md) |
|
||||
| Тестирование (Web) | `/web-test` | Взаимодействие с веб-клиентом 1С — навигация, формы, таблицы, отчёты, тестирование | [Подробнее](docs/web-test-guide.md) |
|
||||
| Запись видео (Web) | `/web-test` | Запись видеоинструкций с субтитрами, подсветкой и TTS-озвучкой | [Подробнее](docs/web-test-recording-guide.md) |
|
||||
| Регресс прикладного решения (Web) | `/web-test` | Автоматический регресс конфигурации: тесты, проверки, отчёты, прогон после правок | [Подробнее](docs/web-test-regression-guide.md) |
|
||||
| Утилиты | `/img-grid` | Наложение сетки на изображение для определения пропорций колонок | — |
|
||||
1. Скачайте ZIP этой ветки: **Code → Download ZIP** (или `git archive`).
|
||||
2. Распакуйте в корень своего проекта — должна появиться папка `.claude/skills/`.
|
||||
3. Запустите Claude Code из этого проекта — навыки станут доступны.
|
||||
|
||||
## Требования
|
||||
|
||||
- **Windows** с PowerShell 5.1+ (входит в Windows) — рантайм по умолчанию
|
||||
- **1С:Предприятие 8.3** — для сборки/разборки EPF/ERF (навыки генерации XML работают без платформы)
|
||||
- **Node.js 18+** — для `/web-test` (тестирование через браузер)
|
||||
- **Python 3.9+**. Установка зависимостей: `pip install -r requirements.txt` (lxml, Pillow, psutil).
|
||||
- **1С:Предприятие 8.3** — для сборки/разборки EPF/ERF и работы с базами.
|
||||
- **Node.js 18+** — для `/web-test`.
|
||||
|
||||
<a id="поддерживаемые-платформы"></a>
|
||||
### Другие AI-платформы
|
||||
## Документация
|
||||
|
||||
Навыки построены на открытом стандарте [Agent Skills](https://agentskills.io/specification) и совместимы с любой платформой, поддерживающей этот формат. Самый быстрый путь — скачать готовую сборку под нужную платформу из ветки ниже (**Code → Download ZIP**) и распаковать в корень своего проекта.
|
||||
Полные гайды, спецификации и описание навыков — в [main](https://github.com/Nikolay-Shirokov/cc-1c-skills).
|
||||
|
||||
#### Поддерживаемые платформы
|
||||
---
|
||||
|
||||
| Платформа | Целевой каталог | PowerShell | Python |
|
||||
|-----------|----------------|------------|--------|
|
||||
| Claude Code | `.claude/skills/` | [main](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/main) | [port-claude-code-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-claude-code-py) |
|
||||
| Cursor | `.cursor/skills/` | [port-cursor](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-cursor) | [port-cursor-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-cursor-py) |
|
||||
| OpenAI Codex | `.codex/skills/` | [port-codex](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-codex) | [port-codex-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-codex-py) |
|
||||
| GitHub Copilot | `.github/skills/` | [port-copilot](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-copilot) | [port-copilot-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-copilot-py) |
|
||||
| Augment | `.augment/skills/` | [port-augment](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-augment) | [port-augment-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-augment-py) |
|
||||
| Cline | `.cline/skills/` | [port-cline](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-cline) | [port-cline-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-cline-py) |
|
||||
| Kilo Code | `.kilocode/skills/` | [port-kilo](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-kilo) | [port-kilo-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-kilo-py) |
|
||||
| Kiro | `.kiro/skills/` | [port-kiro](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-kiro) | [port-kiro-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-kiro-py) |
|
||||
| Gemini CLI | `.gemini/skills/` | [port-gemini](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-gemini) | [port-gemini-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-gemini-py) |
|
||||
| OpenCode | `.opencode/skills/` | [port-opencode](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-opencode) | [port-opencode-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-opencode-py) |
|
||||
| Roo Code | `.roo/skills/` | [port-roo](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-roo) | [port-roo-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-roo-py) |
|
||||
| Windsurf | `.windsurf/skills/` | [port-windsurf](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-windsurf) | [port-windsurf-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-windsurf-py) |
|
||||
| Yandex Code Assistant | `.codeassistant/skills/` | [port-codeassistant](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-codeassistant) | [port-codeassistant-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-codeassistant-py) |
|
||||
| Agent Skills | `.agents/skills/` | [port-agents](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-agents) | [port-agents-py](https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/port-agents-py) |
|
||||
|
||||
Готовые ветки `port-*` пересобираются автоматически на каждое изменение в навыках. Если нужна свежая сборка прямо сейчас — соберите [локально через `switch.py`](#альтернативный-способ--собрать-локально-через-switchpy).
|
||||
|
||||
Некоторые платформы (Augment, Cline, VS Code/Copilot) также сканируют `.claude/skills/` как fallback — для них достаточно `main`.
|
||||
|
||||
<a id="альтернативный-способ--собрать-локально-через-switchpy"></a>
|
||||
#### Альтернативный способ — собрать локально через `switch.py`
|
||||
|
||||
Если нужна свежая сборка под свою платформу (или платформа ещё не в матрице port-веток):
|
||||
|
||||
```bash
|
||||
python scripts/switch.py # интерактивный режим
|
||||
python scripts/switch.py cursor # скопировать навыки для Cursor
|
||||
python scripts/switch.py cursor --runtime python # Cursor + Python-рантайм
|
||||
python scripts/switch.py claude-code --project-dir /my/proj # установить копию в проект
|
||||
python scripts/switch.py claude-code --project-dir /my/proj --link # ссылки вместо копий
|
||||
python scripts/switch.py --undo cursor # удалить копию / ссылки
|
||||
```
|
||||
|
||||
Если репозиторий склонирован внутрь проекта (например, в `tools/cc-1c-skills`), используйте `--project-dir` для установки навыков в целевой проект.
|
||||
|
||||
**Ссылки vs копии.** Флаг `--link` (экспериментальный) создаёт directory junction (Windows) или symlink (Linux/Mac) вместо копирования файлов. Обновления в источнике автоматически подхватываются во всех подключённых проектах — достаточно `git pull`. Ссылки доступны только для платформы Claude Code (для остальных платформ требуется перезапись путей в SKILL.md). Удаление ссылок: `--undo` — безопасно удаляет только ссылки, не трогая источник.
|
||||
|
||||
> ⚠ **Известные ограничения `--link`:** Node.js резолвит `__dirname` через junction к реальному пути источника, а не к каталогу проекта. Это может приводить к тому, что навыки с Node.js-скриптами (например, `/web-test`) будут записывать файлы в каталог репозитория навыков вместо каталога проекта. При возникновении проблем переключитесь на копирование (без `--link`).
|
||||
|
||||
Автоактивация — основной режим: просто опишите задачу своими словами, ассистент сам подберёт нужный навык по `description` в SKILL.md. Слеш-команды (например `/epf-init`) — для точного контроля, когда нужно вызвать конкретный навык.
|
||||
|
||||
### Переключение рантайма (PowerShell ↔ Python)
|
||||
|
||||
На Windows рекомендуется PS1-рантайм (по умолчанию). Python-порты — для **Linux/Mac** или если PowerShell недоступен. PS1-скрипты — мастер-версия; Python-порты производные (см. [Python Porting Guide](docs/python-porting-guide.md)).
|
||||
|
||||
```bash
|
||||
python scripts/switch.py --runtime python # переключить на Python
|
||||
python scripts/switch.py --runtime powershell # вернуть на PowerShell
|
||||
```
|
||||
|
||||
Дополнительные зависимости Python-рантайма (Python 3.9+), одной командой — `pip install -r requirements.txt`:
|
||||
- `lxml>=4.9.0` — для навыков, работающих с DOM (edit/validate/info)
|
||||
- `Pillow>=10.0.0` — для `/img-grid` (чтение изображений и наложение сетки)
|
||||
- `psutil>=5.9.0` — для web-навыков (управление Apache)
|
||||
|
||||
Параметры скриптов идентичны для обоих рантаймов — переключение меняет только интерпретатор в вызовах. Подробнее: [Python Porting Guide](docs/python-porting-guide.md).
|
||||
|
||||
## Спецификации
|
||||
|
||||
Полный индекс с оглавлением по всем 44 типам объектов: **[Сводный индекс спецификаций](docs/1c-specs-index.md)**
|
||||
|
||||
- [XML-формат выгрузки обработок](docs/1c-epf-spec.md) — структура XML-файлов, namespace, элементы форм
|
||||
- [XML-формат внешних отчётов](docs/1c-erf-spec.md) — отличия ERF от EPF, Properties, MainDataCompositionSchema
|
||||
- [Управляемая форма](docs/1c-form-spec.md) — Form.xml, элементы, команды, реквизиты
|
||||
- [Встроенная справка](docs/1c-help-spec.md) — Help.xml, HTML-страницы, кнопка справки на форме
|
||||
- [Пакетный режим конфигуратора 1С](docs/build-spec.md) — команды `1cv8.exe`, DESIGNER, ENTERPRISE, CREATEINFOBASE
|
||||
- [Табличный документ (MXL)](docs/1c-spreadsheet-spec.md) — XML-формат SpreadsheetDocument, совместимость версий
|
||||
- [MXL DSL](docs/mxl-dsl-spec.md) — JSON-формат описания макета для `/mxl-compile` и `/mxl-decompile`: структура, оформление, полный перечень свойств стиля
|
||||
- [Form DSL](docs/form-dsl-spec.md) — JSON-формат описания формы для `/form-compile`
|
||||
- [Роли (Rights.xml)](docs/1c-role-spec.md) — XML-формат прав роли, типы объектов, RLS
|
||||
- [Role DSL](docs/role-dsl-spec.md) — JSON-формат описания ролей для `/role-compile`
|
||||
- [Схема компоновки данных (DCS)](docs/1c-dcs-spec.md) — XML-формат DataCompositionSchema, 930 схем проанализировано
|
||||
- [SKD DSL](docs/skd-dsl-spec.md) — JSON-формат описания СКД для `/skd-compile`
|
||||
- [Объекты конфигурации](docs/1c-config-objects-spec.md) — XML-формат объектов метаданных конфигурации (23 типа)
|
||||
- [Подсистемы и командный интерфейс](docs/1c-subsystem-spec.md) — XML-формат подсистем, CommandInterface.xml, секции видимости/размещения/порядка
|
||||
- [Корневая конфигурация](docs/1c-configuration-spec.md) — XML-формат Configuration.xml, ConfigDumpInfo.xml, Languages/, 44 типа ChildObjects
|
||||
- [Расширения конфигурации (CFE)](docs/1c-extension-spec.md) — XML-формат выгрузки расширений конфигурации
|
||||
- [Веб-публикация 1С](docs/web-spec.md) — VRD, httpd.conf, wsap24.dll, portable Apache
|
||||
|
||||
## Структура репозитория
|
||||
|
||||
```
|
||||
.claude/skills/ # Навыки Claude Code
|
||||
├── epf-init/ # Создание обработки
|
||||
├── epf-build/ # Сборка EPF
|
||||
├── epf-dump/ # Разборка EPF
|
||||
├── epf-bsp-init/ # Регистрация БСП
|
||||
├── epf-bsp-add-command/ # Команда БСП
|
||||
├── epf-validate/ # Валидация обработки
|
||||
├── erf-init/ # Создание внешнего отчёта
|
||||
├── erf-build/ # Сборка ERF
|
||||
├── erf-dump/ # Разборка ERF
|
||||
├── erf-validate/ # Валидация отчёта
|
||||
├── template-add/ # Добавление макета (универсальный)
|
||||
├── template-remove/ # Удаление макета (универсальный)
|
||||
├── form-add/ # Добавление формы (универсальный)
|
||||
├── form-remove/ # Удаление формы (универсальный)
|
||||
├── help-add/ # Добавление справки (универсальный)
|
||||
├── mxl-info/ # Анализ макета
|
||||
├── mxl-validate/ # Валидация макета
|
||||
├── mxl-compile/ # Компиляция макета из JSON
|
||||
├── mxl-decompile/ # Декомпиляция макета в JSON
|
||||
├── form-info/ # Анализ структуры управляемой формы
|
||||
├── form-compile/ # Компиляция формы из JSON
|
||||
├── form-validate/ # Валидация формы
|
||||
├── form-edit/ # Добавление элементов в форму
|
||||
├── form-patterns/ # Справочник паттернов компоновки форм
|
||||
├── role-info/ # Анализ прав роли
|
||||
├── role-compile/ # Создание роли из JSON DSL
|
||||
├── role-validate/ # Валидация роли
|
||||
├── skd-info/ # Анализ схемы компоновки данных
|
||||
├── skd-compile/ # Компиляция СКД из JSON DSL
|
||||
├── skd-edit/ # Точечное редактирование СКД (25 операций)
|
||||
├── skd-validate/ # Валидация СКД
|
||||
├── meta-info/ # Структура объекта метаданных
|
||||
├── meta-compile/ # Создание объекта метаданных
|
||||
├── meta-edit/ # Редактирование объекта метаданных
|
||||
├── meta-remove/ # Удаление объекта метаданных
|
||||
├── meta-validate/ # Валидация объекта метаданных
|
||||
├── cf-info/ # Анализ структуры конфигурации
|
||||
├── cf-init/ # Создание пустой конфигурации
|
||||
├── cf-edit/ # Редактирование конфигурации
|
||||
├── cf-validate/ # Валидация конфигурации
|
||||
├── cfe-init/ # Создание расширения
|
||||
├── cfe-borrow/ # Заимствование объектов
|
||||
├── cfe-patch-method/ # Перехват методов
|
||||
├── cfe-validate/ # Валидация расширения
|
||||
├── cfe-diff/ # Анализ и сравнение
|
||||
├── subsystem-info/ # Анализ структуры подсистемы
|
||||
├── subsystem-compile/ # Создание подсистемы из JSON
|
||||
├── subsystem-edit/ # Редактирование подсистемы
|
||||
├── subsystem-validate/ # Валидация подсистемы
|
||||
├── interface-edit/ # Редактирование CommandInterface.xml
|
||||
├── interface-validate/ # Валидация CommandInterface.xml
|
||||
├── db-list/ # Управление реестром баз данных
|
||||
├── db-create/ # Создание информационной базы
|
||||
├── db-dump-cf/ # Выгрузка конфигурации в CF
|
||||
├── db-load-cf/ # Загрузка конфигурации из CF
|
||||
├── db-dump-xml/ # Выгрузка конфигурации в XML
|
||||
├── db-load-xml/ # Загрузка конфигурации из XML
|
||||
├── db-dump-dt/ # Выгрузка информационной базы в DT
|
||||
├── db-load-dt/ # Загрузка информационной базы из DT
|
||||
├── db-update/ # Обновление конфигурации БД
|
||||
├── db-run/ # Запуск 1С:Предприятие
|
||||
├── db-load-git/ # Загрузка изменений из Git
|
||||
├── db-repo/ # Хранилище конфигурации
|
||||
├── db-cfe-admin/ # Расширения в базе: состав, проверки, свойства, удаление
|
||||
├── web-publish/ # Публикация базы через Apache
|
||||
├── web-info/ # Статус Apache и публикаций
|
||||
├── web-stop/ # Остановка Apache
|
||||
├── web-unpublish/ # Удаление публикации
|
||||
├── web-test/ # Тестирование через веб-клиент 1С
|
||||
└── img-grid/ # Сетка для анализа изображений
|
||||
scripts/
|
||||
└── switch.py # Переключение платформы и рантайма (13 платформ)
|
||||
docs/
|
||||
├── epf-guide.md # Гайд: внешние обработки и отчёты
|
||||
├── mxl-guide.md # Гайд: табличный документ
|
||||
├── form-guide.md # Гайд: управляемые формы
|
||||
├── role-guide.md # Гайд: роли
|
||||
├── skd-guide.md # Гайд: схема компоновки данных
|
||||
├── meta-guide.md # Гайд: объекты метаданных конфигурации
|
||||
├── cf-guide.md # Гайд: корневые файлы конфигурации
|
||||
├── cfe-guide.md # Гайд: расширения конфигурации (CFE)
|
||||
├── subsystem-guide.md # Гайд: подсистемы и командный интерфейс
|
||||
├── v8-project-guide.md # Гайд: конфигурация проекта (.v8-project.json)
|
||||
├── db-guide.md # Гайд: базы данных 1С
|
||||
├── web-guide.md # Гайд: веб-публикация через Apache
|
||||
├── web-test-guide.md # Гайд: тестирование через веб-клиент
|
||||
├── web-test-recording-guide.md # Гайд: запись видеоинструкций
|
||||
├── web-test-regression-guide.md # Гайд: регресс прикладного решения
|
||||
├── 1c-epf-spec.md # Спецификация XML-формата (EPF)
|
||||
├── 1c-erf-spec.md # Спецификация XML-формата (ERF)
|
||||
├── 1c-form-spec.md # Спецификация управляемых форм
|
||||
├── 1c-help-spec.md # Спецификация встроенной справки
|
||||
├── 1c-config-objects-spec.md # Спецификация объектов конфигурации
|
||||
├── build-spec.md # Пакетный режим конфигуратора 1С
|
||||
├── 1c-spreadsheet-spec.md # Спецификация табличного документа
|
||||
├── mxl-dsl-spec.md # Спецификация MXL DSL
|
||||
├── form-dsl-spec.md # Спецификация Form DSL
|
||||
├── meta-dsl-spec.md # Спецификация Meta DSL
|
||||
├── 1c-role-spec.md # Спецификация ролей (Rights.xml)
|
||||
├── 1c-dcs-spec.md # Спецификация СКД (DataCompositionSchema)
|
||||
├── skd-dsl-spec.md # Спецификация SKD DSL
|
||||
├── role-dsl-spec.md # Спецификация Role DSL
|
||||
├── 1c-extension-spec.md # Спецификация расширений конфигурации (CFE)
|
||||
├── 1c-subsystem-spec.md # Спецификация подсистем и командного интерфейса
|
||||
├── web-spec.md # Спецификация веб-публикации (VRD, httpd.conf, Apache)
|
||||
└── python-porting-guide.md # Руководство по Python-портам навыков
|
||||
```
|
||||
Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
Build commit: `6169a7ff939aa3c73f7d9799acf693fa3bfd33ed`
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-1043
File diff suppressed because it is too large
Load Diff
@@ -1,785 +0,0 @@
|
||||
# Спецификация XML-формата выгрузки внешней обработки 1С
|
||||
|
||||
Формат: XML-выгрузка внешней обработки (ExternalDataProcessor) из конфигуратора 1С:Предприятие 8.3.
|
||||
Версия формата: `2.17`.
|
||||
|
||||
> **Связанная спецификация**: Для внешних отчётов (ExternalReport / ERF) см. [1c-erf-spec.md](1c-erf-spec.md). Формат отчётов основан на формате обработок с дополнительными свойствами для СКД и вариантов.
|
||||
|
||||
## 1. Структура каталогов
|
||||
|
||||
```
|
||||
<ИмяОбработки>.xml # Корневой файл метаданных
|
||||
<ИмяОбработки>/
|
||||
Ext/
|
||||
ObjectModule.bsl # Модуль объекта (опционально)
|
||||
Help.xml # Метаданные справки (опционально)
|
||||
Help/
|
||||
ru.html # HTML-страница справки
|
||||
Forms/
|
||||
<ИмяФормы>.xml # Метаданные формы
|
||||
<ИмяФормы>/
|
||||
Ext/
|
||||
Form.xml # Описание формы (элементы, реквизиты, команды)
|
||||
Form/
|
||||
Module.bsl # Модуль формы
|
||||
Templates/
|
||||
<ИмяМакета>.xml # Метаданные макета
|
||||
<ИмяМакета>/
|
||||
Ext/
|
||||
Template.<расш> # Тело макета: .html, .xml (mxl) и др.
|
||||
```
|
||||
|
||||
Обработка может содержать:
|
||||
- 0..N реквизитов объекта (описаны в корневом XML)
|
||||
- 0..N табличных частей (описаны в корневом XML)
|
||||
- 0..N форм (каталог `Forms/`)
|
||||
- 0..N макетов (каталог `Templates/`)
|
||||
- 0..1 модуль объекта (`Ext/ObjectModule.bsl`)
|
||||
- 0..1 встроенная справка (`Ext/Help.xml` + `Ext/Help/<язык>.html`), см. [1c-help-spec.md](1c-help-spec.md)
|
||||
|
||||
## 2. Пространства имён XML
|
||||
|
||||
### 2.1. Файлы метаданных (корневой XML, формы, макеты)
|
||||
|
||||
Корневой элемент — `<MetaDataObject>`, пространство имён:
|
||||
|
||||
```
|
||||
xmlns="http://v8.1c.ru/8.3/MDClasses"
|
||||
```
|
||||
|
||||
Полный набор деклараций (можно копировать как есть):
|
||||
|
||||
```xml
|
||||
<MetaDataObject
|
||||
xmlns="http://v8.1c.ru/8.3/MDClasses"
|
||||
xmlns:app="http://v8.1c.ru/8.2/managed-application/core"
|
||||
xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config"
|
||||
xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi"
|
||||
xmlns:ent="http://v8.1c.ru/8.1/data/enterprise"
|
||||
xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform"
|
||||
xmlns:style="http://v8.1c.ru/8.1/data/ui/style"
|
||||
xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web"
|
||||
xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows"
|
||||
xmlns:xen="http://v8.1c.ru/8.3/xcf/enums"
|
||||
xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef"
|
||||
xmlns:xr="http://v8.1c.ru/8.3/xcf/readable"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
version="2.17">
|
||||
```
|
||||
|
||||
### 2.2. Описание формы (Form.xml)
|
||||
|
||||
Корневой элемент — `<Form>`, пространство имён:
|
||||
|
||||
```
|
||||
xmlns="http://v8.1c.ru/8.3/xcf/logform"
|
||||
```
|
||||
|
||||
Полный набор деклараций:
|
||||
|
||||
```xml
|
||||
<Form
|
||||
xmlns="http://v8.1c.ru/8.3/xcf/logform"
|
||||
xmlns:app="http://v8.1c.ru/8.2/managed-application/core"
|
||||
xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:ent="http://v8.1c.ru/8.1/data/enterprise"
|
||||
xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform"
|
||||
xmlns:style="http://v8.1c.ru/8.1/data/ui/style"
|
||||
xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web"
|
||||
xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows"
|
||||
xmlns:xr="http://v8.1c.ru/8.3/xcf/readable"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
version="2.17">
|
||||
```
|
||||
|
||||
**Ключевое отличие**: файлы метаданных используют `http://v8.1c.ru/8.3/MDClasses`, описание формы — `http://v8.1c.ru/8.3/xcf/logform`.
|
||||
|
||||
## 3. Корневой файл обработки (`<Имя>.xml`)
|
||||
|
||||
Определяет имя обработки, синоним, форму по умолчанию и список дочерних объектов.
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MetaDataObject xmlns="..." version="2.17">
|
||||
<ExternalDataProcessor uuid="<UUID>">
|
||||
<InternalInfo>
|
||||
<xr:ContainedObject>
|
||||
<xr:ClassId>c3831ec8-d8d5-4f93-8a22-f9bfae07327f</xr:ClassId>
|
||||
<xr:ObjectId><UUID></xr:ObjectId>
|
||||
</xr:ContainedObject>
|
||||
<xr:GeneratedType name="ExternalDataProcessorObject.<Имя>" category="Object">
|
||||
<xr:TypeId><UUID></xr:TypeId>
|
||||
<xr:ValueId><UUID></xr:ValueId>
|
||||
</xr:GeneratedType>
|
||||
</InternalInfo>
|
||||
<Properties>
|
||||
<Name><Имя></Name>
|
||||
<Synonym>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content><Представление></v8:content>
|
||||
</v8:item>
|
||||
</Synonym>
|
||||
<Comment/>
|
||||
<DefaultForm>ExternalDataProcessor.<Имя>.Form.<ИмяФормы></DefaultForm>
|
||||
<AuxiliaryForm/>
|
||||
</Properties>
|
||||
<ChildObjects>
|
||||
<!-- Реквизиты объекта (опционально) -->
|
||||
<Attribute uuid="<UUID>">...</Attribute>
|
||||
<!-- Табличные части (опционально) -->
|
||||
<TabularSection uuid="<UUID>">...</TabularSection>
|
||||
<!-- Формы -->
|
||||
<Form><ИмяФормы></Form>
|
||||
<!-- Макеты -->
|
||||
<Template><ИмяМакета></Template>
|
||||
</ChildObjects>
|
||||
</ExternalDataProcessor>
|
||||
</MetaDataObject>
|
||||
```
|
||||
|
||||
### Правила
|
||||
|
||||
| Элемент | Описание |
|
||||
|---------|----------|
|
||||
| `ClassId` | Всегда `c3831ec8-d8d5-4f93-8a22-f9bfae07327f` (идентификатор класса ExternalDataProcessor) |
|
||||
| `ObjectId`, `TypeId`, `ValueId` | Уникальные UUID, генерируются при создании |
|
||||
| `DefaultForm` | Полный путь: `ExternalDataProcessor.<Имя>.Form.<ИмяФормы>` |
|
||||
| `<Form>`, `<Template>` | Только имена (без путей), соответствуют именам подкаталогов в `Forms/` и `Templates/` |
|
||||
| `<Attribute>` | Реквизиты объекта обработки (полное описание с типами) |
|
||||
| `<TabularSection>` | Полное описание табличных частей объекта (включая реквизиты ТЧ с типами) |
|
||||
|
||||
### Порядок элементов в ChildObjects
|
||||
|
||||
Порядок дочерних объектов **фиксирован**:
|
||||
|
||||
1. `<Attribute>` — реквизиты объекта (0..N)
|
||||
2. `<TabularSection>` — табличные части (0..N)
|
||||
3. `<Form>` — формы (0..N)
|
||||
4. `<Template>` — макеты (0..N)
|
||||
|
||||
### Реквизиты объекта
|
||||
|
||||
Если обработка имеет реквизиты объекта, они описываются в `<ChildObjects>` корневого файла:
|
||||
|
||||
```xml
|
||||
<Attribute uuid="<UUID>">
|
||||
<Properties>
|
||||
<Name><ИмяРеквизита></Name>
|
||||
<Synonym/>
|
||||
<Comment/>
|
||||
<Type>
|
||||
<v8:Type>xs:string</v8:Type>
|
||||
<v8:StringQualifiers>
|
||||
<v8:Length>10</v8:Length>
|
||||
<v8:AllowedLength>Variable</v8:AllowedLength>
|
||||
</v8:StringQualifiers>
|
||||
</Type>
|
||||
<PasswordMode>false</PasswordMode>
|
||||
<Format/>
|
||||
<EditFormat/>
|
||||
<ToolTip/>
|
||||
<MarkNegatives>false</MarkNegatives>
|
||||
<Mask/>
|
||||
<MultiLine>false</MultiLine>
|
||||
<ExtendedEdit>false</ExtendedEdit>
|
||||
<MinValue xsi:nil="true"/>
|
||||
<MaxValue xsi:nil="true"/>
|
||||
<FillChecking>DontCheck</FillChecking>
|
||||
<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
|
||||
<ChoiceParameterLinks/>
|
||||
<ChoiceParameters/>
|
||||
<QuickChoice>Auto</QuickChoice>
|
||||
<CreateOnInput>Auto</CreateOnInput>
|
||||
<ChoiceForm/>
|
||||
<LinkByType/>
|
||||
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
|
||||
</Properties>
|
||||
</Attribute>
|
||||
```
|
||||
|
||||
#### Свойства реквизита объекта (полный перечень)
|
||||
|
||||
Порядок фиксирован:
|
||||
|
||||
| Свойство | Тип | Описание | Значение по умолчанию |
|
||||
|----------|-----|----------|----------------------|
|
||||
| `Name` | string | Имя реквизита | — |
|
||||
| `Synonym` | LocalString | Синоним (отображаемое имя) | — |
|
||||
| `Comment` | string | Комментарий | пустой |
|
||||
| `Type` | TypeDescription | Тип данных | — |
|
||||
| `PasswordMode` | boolean | Режим пароля | `false` |
|
||||
| `Format` | string | Формат вывода | пустой |
|
||||
| `EditFormat` | string | Формат редактирования | пустой |
|
||||
| `ToolTip` | LocalString | Подсказка | пустой |
|
||||
| `MarkNegatives` | boolean | Выделять отрицательные | `false` |
|
||||
| `Mask` | string | Маска ввода | пустой |
|
||||
| `MultiLine` | boolean | Многострочный | `false` |
|
||||
| `ExtendedEdit` | boolean | Расширенное редактирование | `false` |
|
||||
| `MinValue` | any | Минимальное значение | `xsi:nil="true"` |
|
||||
| `MaxValue` | any | Максимальное значение | `xsi:nil="true"` |
|
||||
| `FillChecking` | enum | Проверка заполнения | `DontCheck` |
|
||||
| `ChoiceFoldersAndItems` | enum | Выбор групп и элементов | `Items` |
|
||||
| `ChoiceParameterLinks` | list | Связи параметров выбора | пустой |
|
||||
| `ChoiceParameters` | list | Параметры выбора | пустой |
|
||||
| `QuickChoice` | enum | Быстрый выбор | `Auto` |
|
||||
| `CreateOnInput` | enum | Создание при вводе | `Auto` |
|
||||
| `ChoiceForm` | string | Форма выбора | пустой |
|
||||
| `LinkByType` | ref | Связь по типу | пустой |
|
||||
| `ChoiceHistoryOnInput` | enum | История выбора при вводе | `Auto` |
|
||||
|
||||
#### Типы реквизитов
|
||||
|
||||
| v8:Type | Описание | Квалификаторы |
|
||||
|---------|----------|---------------|
|
||||
| `xs:string` | Строка | `v8:StringQualifiers`: `Length`, `AllowedLength` (Variable/Fixed) |
|
||||
| `xs:boolean` | Булево | — |
|
||||
| `xs:decimal` | Число | `v8:NumberQualifiers`: `Digits`, `FractionDigits`, `AllowedSign` (Any/Nonnegative) |
|
||||
| `xs:dateTime` | Дата | `v8:DateQualifiers`: `DateFractions` (Date/Time/DateTime) |
|
||||
| `cfg:CatalogRef.<Имя>` | Ссылка на справочник | — |
|
||||
| `cfg:DocumentRef.<Имя>` | Ссылка на документ | — |
|
||||
| `cfg:EnumRef.<Имя>` | Ссылка на перечисление | — |
|
||||
|
||||
> **Примечание**: Ссылочные типы (`cfg:CatalogRef.*` и т.д.) работают **только** при наличии в информационной базе конфигурации с соответствующими объектами.
|
||||
|
||||
### Табличные части объекта
|
||||
|
||||
Если обработка имеет табличные части, они описываются в `<ChildObjects>` корневого файла:
|
||||
|
||||
```xml
|
||||
<TabularSection uuid="<UUID>">
|
||||
<InternalInfo>
|
||||
<xr:GeneratedType name="DataProcessorTabularSection.<ИмяОбработки>.<ИмяТЧ>" category="TabularSection">
|
||||
<xr:TypeId><UUID></xr:TypeId>
|
||||
<xr:ValueId><UUID></xr:ValueId>
|
||||
</xr:GeneratedType>
|
||||
<xr:GeneratedType name="DataProcessorTabularSectionRow.<ИмяОбработки>.<ИмяТЧ>" category="TabularSectionRow">
|
||||
<xr:TypeId><UUID></xr:TypeId>
|
||||
<xr:ValueId><UUID></xr:ValueId>
|
||||
</xr:GeneratedType>
|
||||
</InternalInfo>
|
||||
<Properties>
|
||||
<Name><ИмяТЧ></Name>
|
||||
<Synonym>...</Synonym>
|
||||
<Comment/>
|
||||
<ToolTip/>
|
||||
<FillChecking>DontCheck</FillChecking>
|
||||
<StandardAttributes>
|
||||
<xr:StandardAttribute name="LineNumber">
|
||||
<!-- Стандартные свойства реквизита -->
|
||||
</xr:StandardAttribute>
|
||||
</StandardAttributes>
|
||||
</Properties>
|
||||
<ChildObjects>
|
||||
<Attribute uuid="<UUID>">
|
||||
<Properties>
|
||||
<Name><ИмяРеквизита></Name>
|
||||
<Synonym/>
|
||||
<Comment/>
|
||||
<Type>...</Type>
|
||||
<PasswordMode>false</PasswordMode>
|
||||
<Format/>
|
||||
<EditFormat/>
|
||||
<ToolTip/>
|
||||
<MarkNegatives>false</MarkNegatives>
|
||||
<Mask/>
|
||||
<MultiLine>false</MultiLine>
|
||||
<ExtendedEdit>false</ExtendedEdit>
|
||||
<MinValue xsi:nil="true"/>
|
||||
<MaxValue xsi:nil="true"/>
|
||||
<FillFromFillingValue>false</FillFromFillingValue>
|
||||
<FillValue xsi:nil="true"/>
|
||||
<FillChecking>DontCheck</FillChecking>
|
||||
<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
|
||||
<ChoiceParameterLinks/>
|
||||
<ChoiceParameters/>
|
||||
<QuickChoice>Auto</QuickChoice>
|
||||
<CreateOnInput>Auto</CreateOnInput>
|
||||
<ChoiceForm/>
|
||||
<LinkByType/>
|
||||
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
|
||||
</Properties>
|
||||
</Attribute>
|
||||
</ChildObjects>
|
||||
</TabularSection>
|
||||
```
|
||||
|
||||
> **Важно**: Реквизиты табличных частей имеют 2 дополнительных свойства по сравнению с реквизитами объекта: `FillFromFillingValue` и `FillValue`. Они вставляются между `MaxValue` и `FillChecking`. При этом свойства `Indexing`, `FullTextSearch`, `DataHistory` и `Use` **отсутствуют** как у реквизитов объекта, так и у реквизитов ТЧ обработок/отчётов (в отличие от хранимых объектов конфигурации).
|
||||
|
||||
## 4. Метаданные формы (`Forms/<Имя>.xml`)
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MetaDataObject xmlns="..." version="2.17">
|
||||
<Form uuid="<UUID>">
|
||||
<Properties>
|
||||
<Name><ИмяФормы></Name>
|
||||
<Synonym>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content><Представление></v8:content>
|
||||
</v8:item>
|
||||
</Synonym>
|
||||
<Comment/>
|
||||
<FormType>Managed</FormType>
|
||||
<IncludeHelpInContents>false</IncludeHelpInContents>
|
||||
<UsePurposes>
|
||||
<v8:Value xsi:type="app:ApplicationUsePurpose">PlatformApplication</v8:Value>
|
||||
</UsePurposes>
|
||||
<ExtendedPresentation/>
|
||||
</Properties>
|
||||
</Form>
|
||||
</MetaDataObject>
|
||||
```
|
||||
|
||||
`FormType` — всегда `Managed` для управляемых форм.
|
||||
|
||||
## 5. Метаданные макета (`Templates/<Имя>.xml`)
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MetaDataObject xmlns="..." version="2.17">
|
||||
<Template uuid="<UUID>">
|
||||
<Properties>
|
||||
<Name><ИмяМакета></Name>
|
||||
<Synonym>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content><Представление></v8:content>
|
||||
</v8:item>
|
||||
</Synonym>
|
||||
<Comment/>
|
||||
<TemplateType><ТипМакета></TemplateType>
|
||||
</Properties>
|
||||
</Template>
|
||||
</MetaDataObject>
|
||||
```
|
||||
|
||||
### Типы макетов
|
||||
|
||||
| Значение `TemplateType` | Расширение файла тела | Описание |
|
||||
|---|---|---|
|
||||
| `SpreadsheetDocument` | `.xml` | Табличный документ (MXL в XML) |
|
||||
| `DataCompositionSchema` | `.xml` | Схема компоновки данных (СКД), см. [1c-dcs-spec.md](1c-dcs-spec.md) |
|
||||
| `HTMLDocument` | `.html` | HTML-документ |
|
||||
| `TextDocument` | `.txt` | Текстовый документ |
|
||||
| `BinaryData` | `.bin` | Двоичные данные |
|
||||
| `ActiveDocument` | `.xml` | Активный документ |
|
||||
|
||||
## 6. Описание формы (`Form.xml`)
|
||||
|
||||
Самый сложный файл. Содержит три корневых секции:
|
||||
- `<ChildItems>` — дерево элементов формы (визуальная структура)
|
||||
- `<Attributes>` — реквизиты формы (данные)
|
||||
- `<Commands>` — команды формы
|
||||
|
||||
### 6.1. Общая структура
|
||||
|
||||
```xml
|
||||
<Form xmlns="http://v8.1c.ru/8.3/xcf/logform" ... version="2.17">
|
||||
<Title>...</Title>
|
||||
<AutoTitle>false</AutoTitle>
|
||||
<AutoCommandBar name="ФормаКоманднаяПанель" id="-1">
|
||||
<Autofill>false</Autofill>
|
||||
</AutoCommandBar>
|
||||
<Events>
|
||||
<Event name="OnCreateAtServer">ПриСозданииНаСервере</Event>
|
||||
</Events>
|
||||
<ChildItems>
|
||||
<!-- Элементы формы -->
|
||||
</ChildItems>
|
||||
<Attributes>
|
||||
<!-- Реквизиты формы -->
|
||||
</Attributes>
|
||||
<Commands>
|
||||
<!-- Команды формы -->
|
||||
</Commands>
|
||||
</Form>
|
||||
```
|
||||
|
||||
### 6.2. Идентификаторы (id)
|
||||
|
||||
- Каждый элемент, реквизит и команда имеет уникальный `id` (целое число).
|
||||
- `id` уникален в пределах своей секции: элементы, реквизиты и команды нумеруются независимо.
|
||||
- `id="-1"` зарезервирован для `AutoCommandBar` формы.
|
||||
- `id` колонок (`Column`) — уникальны в пределах своего реквизита.
|
||||
|
||||
### 6.3. Элементы формы (`<ChildItems>`)
|
||||
|
||||
#### Типы элементов
|
||||
|
||||
| XML-тег | Описание | Ключевые свойства |
|
||||
|---------|----------|-------------------|
|
||||
| `UsualGroup` | Обычная группа | `Group` (Vertical/Horizontal), `Representation`, `ShowTitle` |
|
||||
| `Button` | Кнопка | `Type` (UsualButton/CommandBarButton), `CommandName` |
|
||||
| `InputField` | Поле ввода | `DataPath`, `MinValue`, `MaxValue` |
|
||||
| `CheckBoxField` | Флажок | `DataPath`, `CheckBoxType`, `ThreeState`, `ReadOnly` |
|
||||
| `LabelField` | Поле надписи | `DataPath` (только отображение) |
|
||||
| `LabelDecoration` | Декорация-надпись | `Title` (статический текст) |
|
||||
| `FormTree` | Дерево формы | `DataPath`, `Header`, `RowPictureDataPath` |
|
||||
| `Table` | Таблица формы | `DataPath`, `Representation` (List/Tree), `ChangeRowSet` |
|
||||
| `HTMLDocumentField` | Поле HTML-документа | `DataPath` |
|
||||
| `CommandBar` | Командная панель (внутри элемента) | `Autofill` |
|
||||
| `Popup` | Подменю на командной панели | `Title`, `Picture` |
|
||||
|
||||
#### Правила DataPath
|
||||
|
||||
- Простые реквизиты: `DataPath` = имя реквизита формы. Пример: `<DataPath>СтрокаПоиска</DataPath>`
|
||||
- Колонки таблицы/дерева (реквизит формы): `<ИмяРеквизита>.<ИмяКолонки>`. Пример: `<DataPath>ТаблицаРеквизитов.Пометка</DataPath>`
|
||||
- Табличные части объекта: `Объект.<ИмяТЧ>.<ИмяРеквизита>`. Пример: `<DataPath>Объект.ТЧМетаданные.Флаг</DataPath>`
|
||||
|
||||
#### ExtendedTooltip
|
||||
|
||||
Каждый элемент формы **должен** иметь дочерний `<ExtendedTooltip>`. Минимальная форма:
|
||||
|
||||
```xml
|
||||
<ExtendedTooltip name="<ИмяЭлемента>ExtendedTooltip" id="<ID>"/>
|
||||
```
|
||||
|
||||
Имя: `<ИмяРодительскогоЭлемента>ExtendedTooltip`. Может содержать `<Title>` с текстом подсказки.
|
||||
|
||||
#### ContextMenu
|
||||
|
||||
Элементы, поддерживающие контекстное меню (`InputField`, `CheckBoxField`, `LabelField`, `FormTree`, `Table`, `HTMLDocumentField`), **должны** иметь:
|
||||
|
||||
```xml
|
||||
<ContextMenu name="<ИмяЭлемента>КонтекстноеМеню" id="<ID>"/>
|
||||
```
|
||||
|
||||
#### Пример: группа с кнопками
|
||||
|
||||
```xml
|
||||
<UsualGroup name="ГруппаКоманд" id="1">
|
||||
<Title><v8:item><v8:lang>ru</v8:lang><v8:content>Команды</v8:content></v8:item></Title>
|
||||
<Representation>None</Representation>
|
||||
<ShowTitle>false</ShowTitle>
|
||||
<ExtendedTooltip name="ГруппаКомандExtendedTooltip" id="100"/>
|
||||
<ChildItems>
|
||||
<Button name="КнопкаПостроить" id="2">
|
||||
<Type>UsualButton</Type>
|
||||
<Title>...</Title>
|
||||
<CommandName>Form.Command.Построить</CommandName>
|
||||
<ExtendedTooltip name="КнопкаПостроитьExtendedTooltip" id="101"/>
|
||||
</Button>
|
||||
</ChildItems>
|
||||
</UsualGroup>
|
||||
```
|
||||
|
||||
#### Пример: FormTree (дерево)
|
||||
|
||||
```xml
|
||||
<FormTree name="ДеревоМетаданных" id="11">
|
||||
<DataPath>ДеревоМетаданных</DataPath>
|
||||
<TitleLocation>None</TitleLocation>
|
||||
<ContextMenu name="ДеревоМетаданныхКонтекстноеМеню" id="12"/>
|
||||
<ExtendedTooltip name="ДеревоМетаданныхExtendedTooltip" id="108"/>
|
||||
<CommandBar name="ДеревоМетаданныхКоманднаяПанель" id="13">
|
||||
<Autofill>false</Autofill>
|
||||
<ExtendedTooltip name="ДеревоМетаданныхКоманднаяПанельExtendedTooltip" id="109"/>
|
||||
</CommandBar>
|
||||
<Header>false</Header>
|
||||
<RowPictureDataPath>ДеревоМетаданных.ИндексКартинки</RowPictureDataPath>
|
||||
<Events>
|
||||
<Event name="OnActivateRow">ДеревоМетаданныхПриАктивизацииСтроки</Event>
|
||||
</Events>
|
||||
<ChildItems>
|
||||
<!-- Колонки как дочерние элементы -->
|
||||
<CheckBoxField name="ДеревоМетаданныхПометка" id="14">
|
||||
<DataPath>ДеревоМетаданных.Пометка</DataPath>
|
||||
...
|
||||
</CheckBoxField>
|
||||
</ChildItems>
|
||||
</FormTree>
|
||||
```
|
||||
|
||||
#### Пример: Table (таблица, привязанная к реквизиту формы типа ValueTable)
|
||||
|
||||
```xml
|
||||
<Table name="ТаблицаРеквизитов" id="26">
|
||||
<DataPath>ТаблицаРеквизитов</DataPath>
|
||||
<TitleLocation>None</TitleLocation>
|
||||
<ContextMenu name="ТаблицаРеквизитовКонтекстноеМеню" id="27"/>
|
||||
<ExtendedTooltip name="ТаблицаРеквизитовExtendedTooltip" id="119"/>
|
||||
<CommandBar name="ТаблицаРеквизитовКоманднаяПанель" id="28">
|
||||
<Autofill>false</Autofill>
|
||||
<ExtendedTooltip name="ТаблицаРеквизитовКоманднаяПанельExtendedTooltip" id="120"/>
|
||||
</CommandBar>
|
||||
<ChangeRowSet>false</ChangeRowSet>
|
||||
<ChangeRowOrder>false</ChangeRowOrder>
|
||||
<ChildItems>
|
||||
<CheckBoxField name="ТаблицаРеквизитовПометка" id="29">
|
||||
<DataPath>ТаблицаРеквизитов.Пометка</DataPath>
|
||||
...
|
||||
</CheckBoxField>
|
||||
</ChildItems>
|
||||
</Table>
|
||||
```
|
||||
|
||||
#### Table: режим дерева
|
||||
|
||||
Элемент `Table` может отображать данные как дерево через `<Representation>Tree</Representation>`. В этом случае реквизит формы должен иметь тип `v8:ValueTree`.
|
||||
|
||||
```xml
|
||||
<Table name="ДеревоМетаданных" id="238">
|
||||
<Representation>Tree</Representation>
|
||||
<DataPath>ДеревоМетаданных</DataPath>
|
||||
...
|
||||
</Table>
|
||||
```
|
||||
|
||||
> **Примечание**: Элемент `FormTree` — альтернативный способ отобразить дерево. `FormTree` не требует явного указания `<Representation>`, дерево подразумевается. `Table` с `<Representation>Tree</Representation>` — более полный элемент с дополнительными возможностями (SearchStringAddition, ViewStatusAddition и др.).
|
||||
|
||||
#### Table: привязка к ТЧ объекта vs реквизит формы
|
||||
|
||||
| Источник данных | DataPath таблицы | DataPath колонки | Тип реквизита |
|
||||
|---|---|---|---|
|
||||
| Табличная часть объекта | `Объект.<ИмяТЧ>` | `Объект.<ИмяТЧ>.<ИмяРеквизита>` | (определён в корневом XML) |
|
||||
| Реквизит формы (ValueTable) | `<ИмяРеквизита>` | `<ИмяРеквизита>.<ИмяКолонки>` | `v8:ValueTable` |
|
||||
| Реквизит формы (ValueTree) | `<ИмяРеквизита>` | `<ИмяРеквизита>.<ИмяКолонки>` | `v8:ValueTree` |
|
||||
|
||||
### 6.4. Реквизиты формы (`<Attributes>`)
|
||||
|
||||
#### Примитивные типы
|
||||
|
||||
```xml
|
||||
<Attribute name="СтрокаПоиска" id="18">
|
||||
<Title><v8:item><v8:lang>ru</v8:lang><v8:content>Строка поиска</v8:content></v8:item></Title>
|
||||
<Type>
|
||||
<v8:Type>xs:string</v8:Type>
|
||||
<v8:StringQualifiers>
|
||||
<v8:Length>200</v8:Length>
|
||||
<v8:AllowedLength>Variable</v8:AllowedLength>
|
||||
</v8:StringQualifiers>
|
||||
</Type>
|
||||
</Attribute>
|
||||
```
|
||||
|
||||
#### Таблица типов
|
||||
|
||||
| v8:Type | Описание | Квалификаторы |
|
||||
|---------|----------|---------------|
|
||||
| `xs:string` | Строка | `v8:StringQualifiers`: `Length` (0 = неограниченная), `AllowedLength` (Variable/Fixed) |
|
||||
| `xs:boolean` | Булево | — |
|
||||
| `xs:decimal` | Число | `v8:NumberQualifiers`: `Digits`, `FractionDigits`, `AllowedSign` (Any/Nonnegative) |
|
||||
| `xs:dateTime` | Дата | `v8:DateQualifiers`: `DateFractions` (Date/Time/DateTime) |
|
||||
| `v8:ValueTable` | Таблица значений | Должен содержать `<Columns>` |
|
||||
| `v8:ValueTree` | Дерево значений | Должен содержать `<Columns>` |
|
||||
| `v8:UUID` | Уникальный идентификатор | — |
|
||||
| `cfg:ExternalDataProcessorObject.<Имя>` | Объект обработки (основной реквизит) | `<MainAttribute>true</MainAttribute>` |
|
||||
| `cfg:CatalogRef.<Имя>` | Ссылка на справочник | — |
|
||||
| `xmlns:mxl="http://v8.1c.ru/8.2/data/spreadsheet"` `mxl:SpreadsheetDocument` | Табличный документ | Требует дополнительное объявление namespace `mxl` |
|
||||
|
||||
> **ВАЖНО**: Для коллекций (ValueTable, ValueTree) тип **обязателен**. Пустой `<Type/>` приведёт к ошибке «Неверный путь к данным» при обращении к колонкам через DataPath.
|
||||
|
||||
#### Коллекции: ValueTable и ValueTree
|
||||
|
||||
```xml
|
||||
<Attribute name="ТаблицаРеквизитов" id="8">
|
||||
<Title>...</Title>
|
||||
<Type>
|
||||
<v8:Type>v8:ValueTable</v8:Type>
|
||||
</Type>
|
||||
<Columns>
|
||||
<Column name="Пометка" id="1">
|
||||
<Title>...</Title>
|
||||
<Type>
|
||||
<v8:Type>xs:boolean</v8:Type>
|
||||
</Type>
|
||||
</Column>
|
||||
<Column name="ИмяРеквизита" id="2">
|
||||
<Title>...</Title>
|
||||
<Type>
|
||||
<v8:Type>xs:string</v8:Type>
|
||||
<v8:StringQualifiers>
|
||||
<v8:Length>150</v8:Length>
|
||||
<v8:AllowedLength>Variable</v8:AllowedLength>
|
||||
</v8:StringQualifiers>
|
||||
</Type>
|
||||
</Column>
|
||||
</Columns>
|
||||
</Attribute>
|
||||
```
|
||||
|
||||
Для дерева — `v8:ValueTree`, структура аналогична.
|
||||
|
||||
#### Основной реквизит (Объект)
|
||||
|
||||
Связывает форму с объектом обработки. Обязателен для доступа к табличным частям и модулю объекта.
|
||||
|
||||
```xml
|
||||
<Attribute name="Объект" id="20">
|
||||
<Type>
|
||||
<v8:Type>cfg:ExternalDataProcessorObject.<ИмяОбработки></v8:Type>
|
||||
</Type>
|
||||
<MainAttribute>true</MainAttribute>
|
||||
</Attribute>
|
||||
```
|
||||
|
||||
### 6.5. Команды формы (`<Commands>`)
|
||||
|
||||
```xml
|
||||
<Command name="Построить" id="1">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Построить</v8:content>
|
||||
</v8:item>
|
||||
</Title>
|
||||
<ToolTip>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Построить ER-диаграмму</v8:content>
|
||||
</v8:item>
|
||||
</ToolTip>
|
||||
<Action>КомандаПостроить</Action>
|
||||
<CurrentRowUse>DontUse</CurrentRowUse>
|
||||
</Command>
|
||||
```
|
||||
|
||||
Команда привязывается к кнопке через `CommandName`:
|
||||
```xml
|
||||
<Button ...>
|
||||
<CommandName>Form.Command.Построить</CommandName>
|
||||
</Button>
|
||||
```
|
||||
|
||||
### 6.6. События формы и элементов
|
||||
|
||||
#### События формы
|
||||
|
||||
```xml
|
||||
<Events>
|
||||
<Event name="OnCreateAtServer">ПриСозданииНаСервере</Event>
|
||||
<Event name="OnOpen">ПриОткрытии</Event>
|
||||
</Events>
|
||||
```
|
||||
|
||||
#### События элементов (внутри элемента)
|
||||
|
||||
```xml
|
||||
<Events>
|
||||
<Event name="OnChange">ДеревоМетаданныхПометкаПриИзменении</Event>
|
||||
<Event name="OnActivateRow">ДеревоМетаданныхПриАктивизацииСтроки</Event>
|
||||
</Events>
|
||||
```
|
||||
|
||||
| Имя события | Описание |
|
||||
|-------------|----------|
|
||||
| `OnCreateAtServer` | При создании на сервере (форма) |
|
||||
| `OnOpen` | При открытии (форма) |
|
||||
| `OnChange` | При изменении (элементы ввода, флажки) |
|
||||
| `OnActivateRow` | При активизации строки (дерево, таблица) |
|
||||
| `OnEditEnd` | При окончании редактирования (таблица) |
|
||||
|
||||
## 7. Модули BSL
|
||||
|
||||
### 7.1. Модуль объекта (`ObjectModule.bsl`)
|
||||
|
||||
Серверная логика без контекста формы. Доступен через `РеквизитФормыВЗначение("Объект")`.
|
||||
|
||||
```bsl
|
||||
// Экспортные функции — API объекта
|
||||
Функция ПолучитьДанные() Экспорт
|
||||
// ...
|
||||
КонецФункции
|
||||
```
|
||||
|
||||
### 7.2. Модуль формы (`Module.bsl`)
|
||||
|
||||
Обработчики событий формы, элементов и команд.
|
||||
|
||||
Директивы компиляции:
|
||||
- `&НаСервере` — выполняется на сервере, есть доступ к реквизитам формы
|
||||
- `&НаКлиенте` — выполняется на клиенте
|
||||
- `&НаСервереБезКонтекста` — на сервере без контекста формы
|
||||
|
||||
```bsl
|
||||
#Область ОбработчикиСобытийФормы
|
||||
|
||||
&НаСервере
|
||||
Процедура ПриСозданииНаСервере(Отказ, СтандартнаяОбработка)
|
||||
ОбъектОбработки = РеквизитФормыВЗначение("Объект");
|
||||
// ... вызовы функций модуля объекта
|
||||
КонецПроцедуры
|
||||
|
||||
#КонецОбласти
|
||||
```
|
||||
|
||||
## 8. Генерация UUID
|
||||
|
||||
Все UUID в XML-файлах должны быть валидными UUID v4. Формат: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`.
|
||||
|
||||
При генерации нового проекта каждый UUID должен быть уникальным. UUID используются для:
|
||||
- Идентификации объекта обработки (`ExternalDataProcessor uuid`)
|
||||
- Внутренних типов (`ContainedObject`, `GeneratedType`)
|
||||
- Форм (`Form uuid`)
|
||||
- Макетов (`Template uuid`)
|
||||
- Табличных частей и их реквизитов
|
||||
|
||||
## 9. Известные ошибки и подводные камни
|
||||
|
||||
### «Неверный путь к данным» для колонок таблицы
|
||||
|
||||
**Проблема**: При загрузке формы конфигуратор выдаёт ошибку «Неверный путь к данным: <Реквизит>.<Колонка>» для всех колонок таблицы.
|
||||
|
||||
**Причина**: Реквизит формы с колонками (`<Columns>`) не имеет правильного типа. Для коллекций тип обязателен:
|
||||
- `v8:ValueTable` для таблиц
|
||||
- `v8:ValueTree` для деревьев
|
||||
|
||||
**Неправильно**:
|
||||
```xml
|
||||
<Attribute name="МояТаблица" id="1">
|
||||
<Type/> <!-- ОШИБКА: тип пустой -->
|
||||
<Columns>...</Columns>
|
||||
</Attribute>
|
||||
```
|
||||
|
||||
**Правильно**:
|
||||
```xml
|
||||
<Attribute name="МояТаблица" id="1">
|
||||
<Type>
|
||||
<v8:Type>v8:ValueTable</v8:Type> <!-- Тип обязателен -->
|
||||
</Type>
|
||||
<Columns>...</Columns>
|
||||
</Attribute>
|
||||
```
|
||||
|
||||
### BOM в файлах метаданных
|
||||
|
||||
Файлы метаданных (корневой XML, формы, макеты), выгруженные конфигуратором, содержат BOM (Byte Order Mark, `\xEF\xBB\xBF`) в начале. Файл `Form.xml` (описание формы) и `.bsl`-модули — **без BOM**. При ручном создании файлов рекомендуется следовать этому же правилу, хотя конфигуратор принимает файлы и без BOM.
|
||||
|
||||
### Кодировка
|
||||
|
||||
Все файлы — UTF-8. XML-файлы имеют заголовок `<?xml version="1.0" encoding="UTF-8"?>`.
|
||||
|
||||
## 10. Чеклист для создания новой обработки
|
||||
|
||||
1. Сгенерировать UUID для каждого объекта (обработка, реквизиты, формы, макеты, ТЧ)
|
||||
2. Создать структуру каталогов (раздел 1)
|
||||
3. Создать корневой XML (раздел 3) с правильными ChildObjects:
|
||||
- Порядок: Attribute → TabularSection → Form → Template
|
||||
- GeneratedType для ТЧ: `DataProcessorTabularSection.<Имя>.<ТЧ>` (не `ExternalDataProcessorTabularSection`!)
|
||||
4. Для каждой формы:
|
||||
- Создать `<Имя>.xml` (раздел 4)
|
||||
- Создать `Form.xml` (раздел 6) — проверить пространство имён!
|
||||
- Создать `Module.bsl` (раздел 7.2)
|
||||
5. Для каждого макета:
|
||||
- Создать `<Имя>.xml` (раздел 5) с правильным TemplateType
|
||||
- Создать тело макета (`Template.<расш>`)
|
||||
6. При необходимости создать `ObjectModule.bsl` (раздел 7.1)
|
||||
7. Проверить:
|
||||
- Все `<Type>` для коллекций содержат `v8:ValueTable` / `v8:ValueTree`
|
||||
- Все `DataPath` корректны (особенно для колонок таблиц)
|
||||
- Все элементы имеют `ExtendedTooltip`
|
||||
- Все ID уникальны в пределах своих секций
|
||||
- `DefaultForm` в корневом файле соответствует реальному имени формы
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user