Targeted editing of Configuration.xml: properties, ChildObjects composition, default roles.
Parameters and command
| Parameter | Description |
|---|---|
ConfigPath |
Path to Configuration.xml or the export directory |
Operation |
Operation (see the table) |
Value |
Value for the operation (batch via ;;) |
DefinitionFile |
JSON file with an array of operations |
NoValidate |
Skip auto-validation |
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/cf-edit.ps1" -ConfigPath '<path>' -Operation modify-property -Value 'Version=1.0.0.1'
Operations
| Operation | Value format | Description |
|---|---|---|
modify-property |
Ключ=Значение (batch ;;) |
Change a property |
add-childObject |
Type.Name (batch ;;) |
Register an already existing object file in ChildObjects. To create a new object, use /meta-compile, /role-compile, /subsystem-compile — they register automatically |
remove-childObject |
Type.Name (batch ;;) |
Remove an object from ChildObjects |
sort-childObjects |
kind, e.g. Catalog (batch ;;), or empty |
Order ChildObjects by name within a kind. Without a value — all kinds except four (see reference) |
add-defaultRole |
Role.Name or Name |
Add a default role |
remove-defaultRole |
Role.Name or Name |
Remove a default role |
set-defaultRoles |
Names separated by ;; |
Replace the list of default roles |
set-panels |
JSON object (see reference.md) | Overwrite Ext/ClientApplicationInterface.xml (panel layout) |
set-home-page |
JSON object (see reference.md) | Overwrite Ext/HomePageWorkArea.xml (start page) |
Valid property values, DefinitionFile format (JSON), canonical order: reference.md
Examples
# Изменить версию и поставщика
... -ConfigPath src -Operation modify-property -Value "Version=1.0.0.1 ;; Vendor=Фирма 1С"
# Добавить объекты
... -ConfigPath src -Operation add-childObject -Value "Catalog.Товары ;; Document.Заказ"
# Удалить объект
... -ConfigPath src -Operation remove-childObject -Value "Catalog.Устаревший"
# Роли по умолчанию
... -ConfigPath src -Operation add-defaultRole -Value "ПолныеПрава"
... -ConfigPath src -Operation set-defaultRoles -Value "ПолныеПрава ;; Администратор"