Manages the file .v8-project.json — the registry of the project's infobases. The file stores connection parameters, aliases, and binding to Git branches.
Usage
/db-list — показать список баз
/db-list add — добавить базу (интерактивно)
/db-list remove <id> — удалить базу из реестра
/db-list show <id|alias> — подробности по базе
Format .v8-project.json
The file is located in the project root (next to .git/).
{
"v8path": "C:\\Program Files\\1cv8\\8.3.25.1257\\bin",
"v8args": ["/UseHwLicenses+"],
"databases": [
{
"id": "dev",
"name": "Разработка",
"type": "file",
"path": "C:\\Bases\\MyApp_Dev",
"v8path": "C:\\Program Files\\1cv8\\8.3.27.1688\\bin",
"user": "Admin",
"password": "",
"aliases": ["dev", "разработка"],
"branches": ["dev", "develop", "feature/*"],
"configSrc": "C:\\WS\\myapp\\cfsrc",
"repository": {
"path": "\\\\srv01\\repo\\MyApp",
"user": "Ivanov",
"password": ""
},
"extensions": [
{
"name": "МоёРасширение",
"src": "src\\cfe\\МоёРасширение",
"repository": { "path": "\\\\srv01\\repo\\MyApp_Ext", "user": "Ivanov", "password": "" }
}
]
},
{
"id": "test",
"name": "Тестовая",
"type": "server",
"server": "srv01",
"ref": "MyApp_Test",
"user": "Admin",
"password": "123",
"aliases": ["test", "тест"]
}
],
"default": "dev"
}
Fields of the root object
| Field | Type | Description |
|---|---|---|
v8path |
string | The bin directory of the 1C platform. Optional — if not set, auto-detection |
v8args |
array | Additional launch arguments 1cv8.exe for all skills, e.g. ["/UseHwLicenses+"] |
ibcmdargs |
array | Additional arguments ibcmd (form --ключ=значение) |
newObjectPosition |
"end" / "byName" |
Where a new object as part of the configuration goes: to the end of its kind (by default) or to a position by name. Overridden in databases[] |
extensionApplyCheck |
bool | Whether to check the applicability of the extension after loading into the database (by default true). Can be disabled one-time with the key -NoApplyCheck |
externalCheck |
bool | Whether to check the sources of an external data processor/report with the platform before building (by default true). Can be disabled one-time with the key -Checks off |
xsdPath |
string | Directory of the platform's XSD schemas for validating exports by format versions; by default .v8-xsd next to this file. Populated by /v8-xsd-fetch |
databases |
array | Array of databases |
default |
string | id of the default database |
Fields of the database object
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Unique identifier (Latin letters, no spaces) |
name |
string | yes | Human-readable name |
type |
"file" / "server" |
yes | Connection type |
path |
string | for file | Path to the file infobase directory |
server |
string | for server | 1C server address |
ref |
string | for server | Database name on the server |
v8path |
string | no | The platform of this specific database — overrides the root v8path (see below) |
user |
string | no | 1C user name |
password |
string | no | Password |
aliases |
string[] | no | Alternative names for quick access |
branches |
string[] | no | Git branches or glob patterns (release/*, feature/*) bound to this base |
configSrc |
string | no | Configuration XML dump directory |
repository |
object | no | Configuration repository: path, user, password (see below) |
extensions |
array | no | Extensions: name, src, optional repository (see below) |
Configuration repository
A base connected to a 1C configuration repository does not accept a single configurator operation
without repository credentials — this applies not only to /db-repo, but also to /db-load-xml,
/db-dump-xml, /db-update, /db-load-git. The credentials are taken from the repository base entry,
there is no need to pass them in every call.
| Field | Type | Required | Description |
|---|---|---|---|
repository.path |
string | yes | Repository directory or tcp://<хост>[:<порт>]/<имя> |
repository.user |
string | no | User of the repository. Not inherited from the user base |
repository.password |
string | no | Repository user password |
An extension has its own repository with its own path, so one repository is not enough:
| Field | Type | Required | Description |
|---|---|---|---|
extensions[].name |
string | yes | Extension name, as in the configuration |
extensions[].src |
string | no | Extension XML source directory |
extensions[].repository |
object | no | Extension repository. An extension without a repository is a common case |
The repository password is the same kind of secret as the password of the base; .v8-project.json в .gitignore.
Network repository. The address is
tcp://<хост>[:<порт>]/<имя>, default port 1542. Served by the repository server. If it is unavailable, the platform responds “Connection to the configuration repository has not been established” — the same message as when credentials are absent.
Database resolution algorithm
This algorithm is used by ALL skills (db-*, epf-build, epf-dump, erf-build, erf-dump) to determine the target base.
- If the user specified connection parameters (path, server) — use them directly
- If the user specified a base by name — look for a match in this order:
- By
id(exact match) - By
aliases(match an entry in the array while accounting for Russian morphology: the test-name forms «тестовую», «тестовая», and «тестовой» are treated as equivalent) - By
name(fuzzy match taking morphology and case into account)
- By
- If the user did not specify a base — match the current Git branch with
databases[].branches:- Exact match: branch
dev→"branches": ["dev"] - Glob pattern: branch
release/2.1→"branches": ["release/*"]
- Exact match: branch
- If the branch did not match — use
default - If not found or ambiguous — ask the user
- If the file
.v8-project.jsonis not found — ask for connection parameters and offer to create the file
After execution: if the base used is not registered — offer to add it via /db-list add.
Platform selection
Order: explicit -V8Path in the call → v8path of the base entry → root v8path → autodetection.
The script itself finds the base entry by matching the connection parameters with databases[], — there is no need to pass
-V8Path manually. The field for the base is needed when the project's bases live on different platform versions:
the XML export format is set by the platform that exports, and autodetection takes the oldest
installed one.
If v8path is not set anywhere:
$v8 = Get-ChildItem "C:\Program Files\1cv8\*\bin\1cv8.exe" | Sort-Object -Descending | Select-Object -First 1
Operations
Show the list of bases
Read .v8-project.json, output a table:
ID Имя Тип Путь/Сервер По умолч.
dev Разработка file C:\Bases\MyApp_Dev ✓
test Тестовая server srv01/MyApp_Test
Add a base
Ask the user via AskUserQuestion:
- id, name, type (file/server)
- path (for file) or server + ref (for server)
- user, password (optional)
- aliases, branches (optional)
- if the base is under configuration storage —
repository: path, user, password
Add to the array databases. If this is the first base — set it as default.
Delete a base
Remove from the array databases by id. If the one being removed was default — ask for a new default.
Details by database
Output all fields of a specific database.
Building the connection string
For use in command templates of other skills:
File database:
/F "<path>"
Server database:
/S "<server>/<ref>"
Authentication (added if user is set):
/N"<user>" /P"<password>"
Important: between
/Nand the name there is no space. Between/Pand the password there is no space. If the password is empty — omit/Pentirely.
Configuration storage (if the database has repositoryset) — skill scripts substitute
it themselves, matching the connection parameters against the registry entry:
/ConfigurationRepositoryF"<path>" /ConfigurationRepositoryN"<user>" /ConfigurationRepositoryP"<password>"