5c7643fcf2
- Overlay 26 changed files from SiteForge_Enterprise_V8_12 (UI layer only: professional-ui.js/css, workspace/factory-v2/operations/editor templates, +2 test files, compose/ci/scripts/docs) - Re-apply v8_workflows type-mapping fix (类型/分类) lost in upgrade - Pin compose project name to siteforge-v8-10 so existing data volumes (hesupipe site 483295c29ea0, 193 entries) keep attached - Drop stray .s10_* state files; ignore .s10_*/.sf_*/.s87_* patterns - Plan/spec revisions per plan-review round 1 (icons are new design, real test assertions, recorded deviations) Tests: 226 passed / 1 env-only failure (test needs node binary in PATH, absent in python:3.12-slim container; host node v24 --check all 9 JS OK) Co-Authored-By: Claude Code <noreply@anthropic.com>
26 lines
1.3 KiB
Python
26 lines
1.3 KiB
Python
"""Fast static checks before producing an official release archive."""
|
||
from pathlib import Path
|
||
import re
|
||
import subprocess
|
||
import sys
|
||
ROOT=Path(__file__).resolve().parent.parent
|
||
sys.path.insert(0,str(ROOT))
|
||
from app.version import VERSION
|
||
assert VERSION=='8.12.0-dev.1'
|
||
api=(ROOT/'app'/'main.py').read_text(encoding='utf-8')
|
||
assert 'return builder.build(' not in api, 'A synchronous request-thread build has reappeared'
|
||
assert "@app.post('/api/sites/{site_id}/builds', status_code=202)" in api
|
||
assert 'VERSION' in api
|
||
for name in ('automotive','industrial','corporate','minimal'):
|
||
theme=ROOT/'themes'/name
|
||
manifest=theme/'manifest.json'
|
||
assert manifest.is_file() and (theme/'pro.html').is_file()
|
||
assert len(list((theme/'pages').glob('*.html')))>=14
|
||
for file in (ROOT/'requirements.lock',ROOT/'requirements-dev.lock'):
|
||
pins=[ln for ln in file.read_text(encoding='utf-8').splitlines() if ln and not ln.startswith('#')]
|
||
assert pins and all(re.fullmatch(r'[a-zA-Z0-9_.-]+==[0-9][a-zA-Z0-9_.!+\-]*',ln) for ln in pins)
|
||
assert (ROOT/'.github/workflows/ci.yml').is_file()
|
||
for file in (ROOT/'app/static').glob('*.js'):
|
||
subprocess.run(['node','--check',str(file)],check=True)
|
||
print('PASS: version, 4× themes, worker route, pinned dependencies, CI workflow, JS syntax')
|