Fix ZIP dependency and allow imports into owned multisite workspaces
DC CMS qualification / qualify (push) Successful in 1m54s

This commit is contained in:
Codex
2026-11-04 21:38:26 +03:00
parent 7c93383f35
commit c9d8f0ae59
6 changed files with 25 additions and 11 deletions
+3 -3
View File
@@ -17,11 +17,11 @@ STEPS = ['frozen-install', 'syntax', 'multisite-tests']
def digest(data): return hashlib.sha256(data).hexdigest()
def run(args): subprocess.run(args, cwd=ROOT, check=True)
def tracked_payload():
names = subprocess.check_output(['git','ls-files','-z','admin','server'], cwd=ROOT).decode().split('\0')
names = subprocess.check_output(['git','ls-files','-z','admin','server','package.json','package-lock.json'], cwd=ROOT).decode().split('\0')
files = {}
for name in sorted(filter(None,names)):
path=ROOT/name
if path.is_symlink() or not path.is_file() or path.suffix not in ('.js','.mjs','.html','.css','.svg'):
if path.is_symlink() or not path.is_file() or (name not in ('package.json','package-lock.json') and path.suffix not in ('.js','.mjs','.html','.css','.svg')):
raise ValueError('unsupported runtime path: '+name)
files[name]=path.read_bytes()
if not {'admin/index.html','admin/admin.js','admin/admin.css','server/admin-server.mjs'} <= set(files):
@@ -32,7 +32,7 @@ def bundle(files, commit, run_id, run_number, foundation):
if not re.fullmatch('[a-f0-9]{40}',commit) or any(type(n) is not int or n<=0 for n in (run_id,run_number)):
raise ValueError('full source and positive run identity required')
for name, data in files.items():
if not re.fullmatch(r'(?:admin|server)/[a-zA-Z0-9_-]+\.(?:mjs|js|css|html|svg)', name) or not isinstance(data, bytes):
if (name not in ('package.json','package-lock.json') and not re.fullmatch(r'(?:admin|server)/[a-zA-Z0-9_-]+\.(?:mjs|js|css|html|svg)', name)) or not isinstance(data, bytes):
raise ValueError('unsupported application payload: '+name)
if not files:
raise ValueError('empty application payload')