d9e6c6c9dd
Selecting a .cap in the RAM installer or the SCP81 "Install from .cap" template now runs a read-only analysis (POST /api/cap-info) before any APDU is built: the archive is validated structurally (a corrupt or wrong-format file fails here) and the bundled capmem analyzer estimates the code size and the persistent (NVRAM) / volatile (RAM) requirements, with the tool's suggested C6/C7/C8 quotas shown as information. The form's action button (Execute / Generate) stays disabled until the analysis succeeds - pressing it is the user's confirmation to continue. - pysim_simple_server/capmem.py: bundled analyzer (component parsers + JCVM opcode table + method-bytecode allocation scan), adapted to take the CAP archive as bytes and return report/memory dicts; output verified byte-identical to the workspace tool on 21 real CAPs. - _cap_info_body + POST /api/cap-info (read-only; the install endpoints stay unchanged and self-sufficient). - PWA: shared capAnalyzeFile/capMemHtml/capGateOk helpers, estimate box under both CAP inputs (reusing the idle #ram-cap-info div, new #scripts-cap-info), data-cap-gate gating in pysimApplyAvailability, stale-response guard, Retry, EN/RU strings. - Tests: tests/test_cap_memory.py (synthetic CAPs: new/newarray/ makeTransientByteArray/static fields/unknown-opcode warnings/corrupt input), frontend capmem.test.js (renderer, gate, analyze flow). - help EN/RU, docs/api.md, AGENTS; version 3.5.8; sw cache simple-v261. 567 frontend / 429 Python green.
21 lines
701 B
TOML
21 lines
701 B
TOML
[build-system]
|
|
requires = ["setuptools", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "pysim-simple-server"
|
|
version = "3.5.8"
|
|
description = "HTTP REST server wrapping pysim for the SIMple PWA"
|
|
requires-python = ">=3.8"
|
|
# pysim is a git-only dependency installed explicitly by setup.bat/setup.sh.
|
|
# Declaring it here would make pip resolve its full tree (including the SMPP
|
|
# bridge -> Twisted -> twisted-iocpsupport, which needs MSVC on Windows).
|
|
|
|
[project.scripts]
|
|
pysim-simple-server = "pysim_simple_server.__main__:main"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["pysim_simple_server*"]
|
|
|
|
[tool.setuptools.package-data]
|
|
pysim_simple_server = ["data/*.json", "data/*.LICENSE"] |