mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-13 06:53:21 +03:00
fix(web-info): детект OData по <standardOdata enable> + метка сервисов расширений
Тег [OData] искался по атрибуту enableStandardOdata на <point> — форма до 8.3.9, которую web-publish не пишет с перехода на <standardOdata enable="true"/>, поэтому в сводке не появлялся никогда. Старая форма оставлена как fallback для дескрипторов не нашего происхождения. Плюс суффикс +ext на WS/HTTP, когда в дескрипторе publishExtensionsByDefault. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
1eeea204c3
commit
fbf4d4f986
@@ -45,12 +45,15 @@ Port: 8081
|
|||||||
Module: C:/Program Files/1cv8/8.3.24.1691/bin/wsap24.dll
|
Module: C:/Program Files/1cv8/8.3.24.1691/bin/wsap24.dll
|
||||||
|
|
||||||
=== Опубликованные базы ===
|
=== Опубликованные базы ===
|
||||||
mydb http://localhost:8081/mydb File="C:\Bases\MyDB";
|
mydb http://localhost:8081/mydb File="C:\Bases\MyDB"; [WS+ext HTTP+ext OData]
|
||||||
|
|
||||||
=== Последние ошибки ===
|
=== Последние ошибки ===
|
||||||
(пусто)
|
(пусто)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
В скобках — что опубликовано для базы: `WS` (SOAP), `HTTP` (HTTP-сервисы), `OData`.
|
||||||
|
Суффикс `+ext` — публикуются и сервисы, поставляемые расширениями конфигурации.
|
||||||
|
|
||||||
## Примеры
|
## Примеры
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# web-info v1.0 — Apache & 1C publication status
|
# web-info v1.1 — Apache & 1C publication status
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
@@ -115,9 +115,20 @@ if ($pubMatches.Count -eq 0) {
|
|||||||
# Detect published services
|
# Detect published services
|
||||||
$svcTags = @()
|
$svcTags = @()
|
||||||
if (Test-Path $vrdPath) {
|
if (Test-Path $vrdPath) {
|
||||||
if ($vrdContent -match '<ws\s') { $svcTags += "WS" }
|
# "+ext" — publishExtensionsByDefault: сервисы расширений тоже опубликованы
|
||||||
if ($vrdContent -match '<httpServices\s') { $svcTags += "HTTP" }
|
if ($vrdContent -match '<ws\s[^>]*>') {
|
||||||
if ($vrdContent -match 'enableStandardOdata\s*=\s*"true"') { $svcTags += "OData" }
|
$wsTag = "WS"
|
||||||
|
if ($Matches[0] -match 'publishExtensionsByDefault\s*=\s*"true"') { $wsTag += "+ext" }
|
||||||
|
$svcTags += $wsTag
|
||||||
|
}
|
||||||
|
if ($vrdContent -match '<httpServices\s[^>]*>') {
|
||||||
|
$hsTag = "HTTP"
|
||||||
|
if ($Matches[0] -match 'publishExtensionsByDefault\s*=\s*"true"') { $hsTag += "+ext" }
|
||||||
|
$svcTags += $hsTag
|
||||||
|
}
|
||||||
|
# Актуальная форма — <standardOdata enable="true"/>; enableStandardOdata — до 8.3.9
|
||||||
|
if ($vrdContent -match '<standardOdata\s[^>]*enable\s*=\s*"true"' -or
|
||||||
|
$vrdContent -match 'enableStandardOdata\s*=\s*"true"') { $svcTags += "OData" }
|
||||||
}
|
}
|
||||||
$svcLabel = if ($svcTags.Count -gt 0) { " [" + ($svcTags -join " ") + "]" } else { "" }
|
$svcLabel = if ($svcTags.Count -gt 0) { " [" + ($svcTags -join " ") + "]" } else { "" }
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# web-info v1.0 — Apache & 1C publication status
|
# web-info v1.1 — Apache & 1C publication status
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -124,11 +124,18 @@ def main():
|
|||||||
# Detect published services
|
# Detect published services
|
||||||
svc_tags = []
|
svc_tags = []
|
||||||
if vrd_content:
|
if vrd_content:
|
||||||
if re.search(r'<ws\s', vrd_content):
|
# "+ext" — publishExtensionsByDefault: сервисы расширений тоже опубликованы
|
||||||
svc_tags.append('WS')
|
m_ws = re.search(r'<ws\s[^>]*>', vrd_content)
|
||||||
if re.search(r'<httpServices\s', vrd_content):
|
if m_ws:
|
||||||
svc_tags.append('HTTP')
|
svc_tags.append('WS+ext' if re.search(
|
||||||
if re.search(r'enableStandardOdata\s*=\s*"true"', vrd_content):
|
r'publishExtensionsByDefault\s*=\s*"true"', m_ws.group(0)) else 'WS')
|
||||||
|
m_hs = re.search(r'<httpServices\s[^>]*>', vrd_content)
|
||||||
|
if m_hs:
|
||||||
|
svc_tags.append('HTTP+ext' if re.search(
|
||||||
|
r'publishExtensionsByDefault\s*=\s*"true"', m_hs.group(0)) else 'HTTP')
|
||||||
|
# Актуальная форма — <standardOdata enable="true"/>; enableStandardOdata — до 8.3.9
|
||||||
|
if (re.search(r'<standardOdata\s[^>]*enable\s*=\s*"true"', vrd_content)
|
||||||
|
or re.search(r'enableStandardOdata\s*=\s*"true"', vrd_content)):
|
||||||
svc_tags.append('OData')
|
svc_tags.append('OData')
|
||||||
svc_label = ' [' + ' '.join(svc_tags) + ']' if svc_tags else ''
|
svc_label = ' [' + ' '.join(svc_tags) + ']' if svc_tags else ''
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user