CORE/CONTENT test5593 и адаптация UI

This commit is contained in:
AidarKC
2026-11-27 00:47:13 +03:00
parent 205b7ad971
commit 873535654e
1271 changed files with 219621 additions and 1900 deletions
+5 -6
View File
@@ -10,7 +10,7 @@ DOCS = ROOT / 'docs'
REGISTRY = ROOT / 'SHiNE-server/shine-server-net-protocol/src/main/java/server/logic/ws_protocol/JSON/JsonHandlerRegistry.java'
INDEX = DOCS / 'API/09_Operations_Index.md'
LINK = re.compile(r'\[[^\]]+\]\(([^)]+)\)')
OP = re.compile(r'Map\.entry\("([A-Za-z0-9_]+)"')
OP = re.compile(r'add\(handlers,types,"([A-Za-z0-9_]+)"')
INDEX_OP = re.compile(r'^\| `([A-Za-z0-9_]+)` \|', re.MULTILINE)
@@ -30,12 +30,11 @@ def check_links():
def check_operations():
source = REGISTRY.read_text(encoding='utf-8')
source = '\n'.join(line for line in source.splitlines() if not line.lstrip().startswith('//'))
handlers_part, request_part = source.split('private static final Map<String, Class<? extends Net_Request>> REQUEST_TYPES', 1)
handlers = set(OP.findall(handlers_part))
requests = set(OP.findall(request_part))
registrations = OP.findall(source)
handlers = set(registrations)
documented = set(INDEX_OP.findall(INDEX.read_text(encoding='utf-8')))
return ([f'Нет request type для WS-операции: {op}' for op in sorted(handlers - requests)]
+ [f'Нет handler для request type: {op}' for op in sorted(requests - handlers)]
# Handler and DTO are registered together by add(); the runtime Routes constructor checks map parity.
return ([f'Повтор WS-операции: {op}' for op in sorted(handlers) if registrations.count(op) != 1]
+ [f'Нет в индексе API: {op}' for op in sorted(handlers - documented)]
+ [f'Нет в реестре WS: {op}' for op in sorted(documented - handlers)])