Usage
/erf-build <ReportName> [SrcDir] [OutDir]
| Parameter | Required | Default | Description |
|---|---|---|---|
| ReportName | yes | — | Report name (name of the root XML) |
| SrcDir | no | src |
Sources directory |
| OutDir | no | build |
Output directory |
Connection parameters (optional)
It is preferable to use a specific base: the build is more reliable, and configSrc of the base from
.v8-project.json gives the source check the configuration common modules.
- Read
.v8-project.jsonfrom the project root and resolve the base: - If the user specified connection parameters (path, server) — use them directly
- If they specified a base 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
default - If
.v8-project.jsonis absent or the base is not found — do not specify connection parameters: the script will automatically create a temporary base. For ERF with reference types (CatalogRef, DocumentRef, etc.), metadata stubs are generated. The temporary base is deleted after the build.
Platform — v8path of the found base record, otherwise the root v8path. Not set in either place — -V8Path do not pass.
If the base used is not registered — after execution, suggest adding it via /db-list add.
Command
Use the common script from epf-build:
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-build/scripts/epf-build.ps1" <параметры>
Script parameters
| Parameter | Required | Description |
|---|---|---|
-V8Path <путь> |
no | Platform bin directory, or full path to 1cv8.exe / ibcmd.exe |
-InfoBasePath <путь> |
* | File base |
-InfoBaseServer <сервер> |
* | 1C server (for a server base) |
-InfoBaseRef <имя> |
* | Base name on the server |
-UserName <имя> |
no | User name |
-Password <пароль> |
no | Password |
-SourceFile <путь> |
yes | Path to the root XML file of the sources |
-OutputFile <путь> |
yes | Path to the output ERF file |
-Checks <список> |
no | What to check before building: modules, handlers, unreferenced, empty-handlers, config; off — do not check. By default modules,handlers |
-Context <список> |
no | Validation contexts modules: ThinClient, Server, ExternalConnection, ThickClientOrdinaryApplication. By default ThinClient,Server |
-ConfigSrc <путь> |
no | Directory of the XML export of the configuration in which the report will run. By default — configSrc of the specified database from .v8-project.json |
-AdditionalV8Arguments <список> |
no | Additional launch arguments 1cv8.exe separated by commas, e.g. /UseHwLicenses+ |
-AdditionalIbcmdArguments <список> |
no | Additional arguments ibcmd separated by commas, in the form --ключ=значение |
*— optional. If not specified — a temporary database with metadata stubs is created automatically
Check before building
Before building, the platform checks the sources: module syntax and the presence of form handlers.
If there are errors, the file is not created, and the output contains the platform message with the line and column
and the path to the source file. Build without checking — -Checks off.
If the code accesses the configuration's common modules (ОбщегоНазначения, УправлениеПечатью etc.),
the check needs an export of this configuration. By default, it takes configSrc of the specified database from
.v8-project.json; if it is not there — pass the export directory in -ConfigSrc, and if there is no export
at all — build with -Checks off. Code that calls methods of global common modules without
a module name will not pass the check even with the export — build it with -Checks off.
Examples
# Сборка отчёта (файловая база)
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/../epf-build/scripts/epf-build.ps1" -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"