8 lines
677 B
Plaintext
8 lines
677 B
Plaintext
#let manifest = json("plugin/plugin.json")
|
|
#assert(type(manifest) == dictionary, message: "plugin manifest must be an object")
|
|
#assert(manifest.at("interface_version", default: none) == 1, message: "unsupported plugin interface")
|
|
#assert(type(manifest.at("name", default: none)) == str and manifest.name.match(regex("^[a-z][a-z0-9-]*$")) != none, message: "invalid plugin name")
|
|
#assert(manifest.at("transform", default: none) == "transform.typ", message: "unsupported plugin transform")
|
|
#assert(type(manifest.at("input", default: none)) == str and type(manifest.at("output", default: none)) == str, message: "plugin input/output must be named")
|
|
#metadata(true) <valid-plugin>
|