SuperAPI AI Directory

db-load-xml

General & other

View repository

Updated 10-15 21:04

About this skill

/db-load-xml — Loading configuration from XML

Loads the 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 and resolve the database:

  1. If the user specified connection parameters (path, server) — use them directly
  2. If they specified the database by name — search by id / alias / name in .v8-project.json
  3. If they did not specify — match the current Git branch with databases[].branches
  4. If the branch did not match — use default Platform — v8path of the found database entry, otherwise the root v8path. Not set in either place — -V8Path do not pass. If 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 specifies configSrc — use it as the default load directory. For -Extension the directory is taken from extensions[].src of the database entry, if it is specified there.

Command

powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-xml.ps1" <параметры>

Script parameters

Parameter Required Description
-V8Path <путь> no Platform bin directory, or full path to 1cv8.exe / ibcmd.exe
-InfoBasePath <путь> * File database
-InfoBaseServer <сервер> * 1C server (for a 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 Comma-separated relative file paths
-ListFile <путь> for Partial Path to the file with the list (alternative to -Files)
-Extension <имя> no Load into extension
-AllExtensions no Load all extensions (only in full; partially — one at a time via -Extension)
-NoApplyCheck no Do not check extension applicability after loading
-Format <формат> no Hierarchical (default) / Plain
-UpdateDB no After loading, immediately update the DB configuration (/UpdateDBCfg)
-AdditionalV8Arguments <список> no Additional launch arguments 1cv8.exe separated by commas, e.g. /UseHwLicenses+
-AdditionalIbcmdArguments <список> no Additional arguments ibcmd separated by commas, in the form --ключ=значение

* — either -InfoBasePath, or the pair -InfoBaseServer + -InfoBaseRef

Load modes

Mode Description
Full Full load — replace the entire configuration from the XML directory
Partial Partial — the listed objects together with their children (forms, templates) and Ext/

If the file list includes Configuration.xml, the platform will perform a full configuration load, and not only the listed objects.

File list 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

After execution

If -UpdateDB was not specified — suggest running /db-update to apply the changes to the DB

Examples

# Полная загрузка
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

# Частичная загрузка конкретных файлов
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"

# Загрузка расширения
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 "МоёРасширение"

# Загрузка + обновление БД в одном запуске
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