Release PPT workflow 0.7.1 with portable installation and production components

This commit is contained in:
2026-10-12 18:45:54 +08:00
parent 4e3271ff62
commit f932b1970d
40 changed files with 2166 additions and 28 deletions
+12
View File
@@ -194,6 +194,10 @@ def load_manifest(path: Path) -> dict:
v2 = value["schema_version"] == 2
if v2:
read_json(file_path(path.parent, value.get("style"), "style"), None)
if "page_library" in value:
library = read_json(file_path(path.parent, value["page_library"], "page_library"), (1,))
require(library.get("template_id") == value["template_id"],
"page_library: template_id mismatch")
variants_key = "themes" if v2 else "modes"
variants = value.get(variants_key)
require(isinstance(variants, dict) and bool(variants), f"{variants_key}: expected non-empty object")
@@ -313,6 +317,9 @@ def export_style(path: Path, value: dict, args: argparse.Namespace) -> dict:
inputs.update(workspace_inputs(root, workspace))
if native is not None and native.is_file():
inputs.add(native)
library = file_path(root, value["page_library"], "page_library") if "page_library" in value else None
if library is not None:
inputs.add(library)
return {"schema_version": 2, "template_id": value["template_id"], "version": value["version"],
"status": value["status"], "production_ready": value["status"] == "released",
"manifest": str(path), "manifest_sha256": digest(path), "theme": selected,
@@ -321,6 +328,7 @@ def export_style(path: Path, value: dict, args: argparse.Namespace) -> dict:
"workspace": str(workspace), "native_template": str(native) if native is not None else None,
"style_path": str(style_path), "theme_path": str(theme_path),
"style": style, "theme_data": theme, "editable_policy": deepcopy(value["editable_policy"]),
"page_library": str(library) if library is not None else None,
"inputs": input_hashes(root, inputs),
"verification_scope": "style review and alignment only; no PPT creation, selector execution or release acceptance"}
@@ -362,6 +370,10 @@ def resolve(path: Path, value: dict, args: argparse.Namespace) -> dict:
inputs.update(theme_files)
result.update(status=value["status"], production_ready=True,
style_path=str(style_path), theme_path=str(theme_path))
library = file_path(root, value["page_library"], "page_library") if "page_library" in value else None
if library is not None:
inputs.add(library)
result["page_library"] = str(library) if library is not None else None
result["inputs"] = input_hashes(root, inputs)
return result