SuperAPI AI Directory

web-publish

General & other

View repository

Updated 10-15 17:18

About this skill

/web-publish — Publishing 1C via Apache

Generates default.vrd, configures httpd.conf and starts Apache HTTP Server for web access to the infobase. If necessary, downloads portable Apache. Idempotent — a repeated call updates the configuration.

Usage

/web-publish [database]
/web-publish dev
/web-publish dev --manual
/web-publish dev --port 9090

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 the user specified a database by name — search by id / alias / name in .v8-project.json
  3. If not specified — match the current Git branch with databases[].branches
  4. If the branch did not match — use default

MUST pass all found parameters:

  • -V8Path — from v8path в .v8-project.json. If not passed, the script will auto-detect the platform version, which may select the wrong version
  • -UserName — from the field user of the found database record (if any)
  • -Password — from the field password of the found database record (if any)
  • -ApachePath — from webPath в .v8-project.json (if any)

If the file .v8-project.json does not exist — suggest /db-list add.

Command

powershell.exe -NoProfile -File .claude/skills/web-publish/scripts/web-publish.ps1 <параметры>

Script parameters

Parameter Required Description
-V8Path <путь> no Platform bin directory (for wsap24.dll)
-InfoBasePath <путь> * File database
-InfoBaseServer <сервер> * 1C server (for a server database)
-InfoBaseRef <имя> * Database name on the server
-UserName <имя> no User name
-Password <пароль> no Password
-AppName <имя> no Publication name (by default from the database directory name)
-ApachePath <путь> no Apache root (by default tools/apache24)
-Port <порт> no Port (by default 8081)
-Manual no Do not download — only check and provide instructions

* — either -InfoBasePathis required, or the pair -InfoBaseServer + -InfoBaseRef

Multiple users of one database

A repeated call with the same AppName replaces publication (idempotency). This is used for:

  • changing the user: "publish as Ivanov" → same AppName, new -UserName
  • restart after /web-stop: the same call brings Apache back up

If the user asks for a parallel publication under a different user (to test different permission sets), add a suffix to AppName:

  • base bpdemo, user Иванов → -AppName bpdemo-ivanov
  • base bpdemo, user Admin → -AppName bpdemo-admin (or simply bpdemo)

Keywords: "another publication", "additionally", "in parallel", "under a different user without removing the current one".

After execution

  1. Report the URLs:
    • Web client: http://localhost:{Port}/{AppName}
    • OData: http://localhost:{Port}/{AppName}/odata/standard.odata
    • HTTP services: http://localhost:{Port}/{AppName}/hs/<RootUrl>/...
    • Web services: http://localhost:{Port}/{AppName}/ws/<Имя>?wsdl
  2. Suggest opening in the browser
  3. If you need to test the service — help compose a request
  4. If the base is not registered — suggest /db-list add

Examples

# Файловая база
powershell.exe -NoProfile -File .claude/skills/web-publish/scripts/web-publish.ps1 -InfoBasePath "C:\Bases\MyDB" -UserName "Admin"

# С явным именем публикации и портом
powershell.exe -NoProfile -File .claude/skills/web-publish/scripts/web-publish.ps1 -InfoBasePath "C:\Bases\MyDB" -AppName "mydb" -Port 9090

# Серверная база
powershell.exe -NoProfile -File .claude/skills/web-publish/scripts/web-publish.ps1 -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret"

# Ручной режим (только инструкция)
powershell.exe -NoProfile -File .claude/skills/web-publish/scripts/web-publish.ps1 -InfoBasePath "C:\Bases\MyDB" -Manual