Files
curriculum-project-hub/crates/cph-model/tests/fixtures/bad-target-config/manifest.toml
T
sjfhsjfh d5bce1bede feat(checker): cph-model manifest v2 — Artifact-with-fields + typed steps (WU-B', ADR-0011)
[targets.*] reworked: artifact is now an inline table with a type discriminator
({type="single-file",filepath} / {type="file-tree",root,outputs}) and steps is an
ordered array-of-tables ({type="typst-compile",template} / {type="shell",run}).
numbering removed entirely (presentation lives in the template per ADR-0011).

TargetConfig { name, artifact: Artifact, steps: Vec<Step> }; Artifact and Step
mirror Spec.Courseware.Artifact / Spec.Courseware.Step (doc-cited). Sensible
defaults so a bare [targets.student] still works: single-file build/<name>.pdf +
one typst-compile exports/<name>.typ. Malformed artifact/step type → non-fatal
SchemaViolation with fallback. 8 tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 09:57:50 +08:00

19 lines
590 B
TOML

[project]
id = "fixture-bad-target-config"
name = "bad-target-config"
[info]
title = "测试课:非法导出目标配置"
# Invalid artifact `type` → SchemaViolation, falls back to default (single-file).
[targets.student]
artifact = { type = "pdf-thing", filepath = "build/student.pdf" }
# Invalid step `type` → SchemaViolation; the bad step is skipped and the build
# falls back to the default step.
[targets.teacher]
artifact = { type = "file-tree", root = "build/teacher", outputs = "**/*.html" }
[[targets.teacher.steps]]
type = "make-it-nice"
template = "exports/teacher.typ"