Loads configuration into the infobase from XML files (sources). Supports full and partial loading.
Usage
/db-load-xml <configDir> [database]
/db-load-xml src/config dev
/db-load-xml src/config dev -Mode Partial -Files "Catalogs/Номенклатура.xml,Catalogs/Номенклатура/Ext/ObjectModule.bsl"
Attention: full loading replaces the entire configuration in the database. Before executing, request confirmation from the user.
Connection parameters
Read .v8-project.json from the project root. Take v8path (path to the platform) and resolve the database:
- If the user specified connection parameters (path, server) — use them directly
- If the database was specified by name — search by id / alias / name in
.v8-project.json - If not specified — match the current Git branch with
databases[].branches - If the branch did not match — use
defaultIfv8pathis not set — auto-detection:Get-ChildItem "C:\Program Files\1cv8\*\bin\1cv8.exe" | Sort -Desc | Select -First 1If the file does not exist — suggest/db-list add. If the used database is not registered — after execution, suggest adding it via/db-list add. If the database entry specifiesconfigSrc— use it as the default load directory.
Command
powershell.exe -NoProfile -File .claude/skills/db-load-xml/scripts/db-load-xml.ps1 <параметры>
Script parameters
| Parameter | Required | Description |
|---|---|---|
-V8Path <путь> |
no | Platform bin directory (or full path to 1cv8.exe) |
-InfoBasePath <путь> |
* | File database |
-InfoBaseServer <сервер> |
* | 1C server (for server database) |
-InfoBaseRef <имя> |
* | Database name on the server |
-UserName <имя> |
no | User name |
-Password <пароль> |
no | Password |
-ConfigDir <путь> |
yes | XML sources directory |
-Mode <режим> |
no | Full (default) / Partial |
-Files <список> |
for Partial | Relative file paths separated by commas |
-ListFile <путь> |
for Partial | Path to the file with the list (alternative to -Files) |
-Extension <имя> |
no | Load into extension |
-AllExtensions |
no | Load all extensions |
-Format <формат> |
no | Hierarchical (default) / Plain |
*— either-InfoBasePathis needed, or the pair-InfoBaseServer+-InfoBaseRef
Load modes
| Mode | Description |
|---|---|
Full |
Full load — replacement of the entire configuration from the XML directory |
Partial |
Partial — loading of selected files (with -partial -updateConfigDumpInfo) |
List file format (listFile)
The file contains relative paths to files in the export directory (one per line), encoding UTF-8 с BOM:
Catalogs/Номенклатура.xml
Catalogs/Номенклатура/Ext/ObjectModule.bsl
Documents/Заказ.xml
Documents/Заказ/Forms/ФормаДокумента.xml
Return codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Error (see log) |
After execution
- Read the log and show the result
- Suggest running
/db-update— to apply the changes to the DB
Examples
# Полная загрузка
powershell.exe -NoProfile -File .claude/skills/db-load-xml/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
# Частичная загрузка конкретных файлов
powershell.exe -NoProfile -File .claude/skills/db-load-xml/scripts/db-load-xml.ps1 -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\cfsrc" -Mode Partial -Files "Catalogs/Номенклатура.xml,Catalogs/Номенклатура/Ext/ObjectModule.bsl"
# Загрузка расширения
powershell.exe -NoProfile -File .claude/skills/db-load-xml/scripts/db-load-xml.ps1 -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -ConfigDir "C:\WS\ext_src" -Mode Full -Extension "МоёРасширение"