SuperAPI AI Directory

web-publish

General & other

View repository

Updated 10-15 21:03

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 information base. Downloads portable Apache if necessary. 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 base:

  1. If the user specified connection parameters (path, server) — use them directly
  2. If they specified the base 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

ALWAYS pass all found parameters:

  • -V8Path — v8path of the found base record, otherwise the root v8path. Not set in either place — do not pass it, but then the platform version will be selected automatically and may turn out to be the wrong one
  • -UserName — from the field user of the found base record (if present)
  • -Password — from the field password of the found base record (if present)
  • -ApachePath — from webPath в .v8-project.json (if present)

If the file .v8-project.json is absent — suggest /db-list add.

Command

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

Script parameters

Parameter Required Description
-V8Path <путь> no Platform bin directory (for wsap24.dll)
-InfoBasePath <путь> * File base
-InfoBaseServer <сервер> * 1C server (for a server base)
-InfoBaseRef <имя> * Base name on the server
-UserName <имя> no User name
-Password <пароль> no Password
-AppName <имя> no Publication name (by default from the base 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 base

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

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

If the user asks for 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: "one more 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

Extension services are published on par with configuration services. If an extension service still returns 404 (HTTP) or 500 "Service not found" (SOAP) — the extension is not applied to the database: /db-update -Extension <имя>.

Examples

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

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

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

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