{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://wai.transaction.science/schema/wai-build.json/1", "title": "wai-build.json, the record of a WAI project's build, version 1", "description": "What `wai build` writes last into dist/: what the tree came from and what it holds. The file is RFC 8785 over this object, on one line, with no line ending, and holds no time and no path outside dist/, so two builds of one project and lock give one record, and its SHA-256 is the tree's digest.", "type": "object", "additionalProperties": false, "required": [ "$schema", "wai", "project", "lock", "toolchain", "files" ], "properties": { "$schema": { "description": "This schema.", "const": "https://wai.transaction.science/schema/wai-build.json/1" }, "wai": { "description": "The record's version.", "const": 1 }, "project": { "description": "The project: its name where wai.json gives one, and the SHA-256 of wai.json's canonical form (RFC 8785 over what it says, a whole number however it is written).", "type": "object", "additionalProperties": false, "required": [ "sha256" ], "properties": { "name": { "type": "string" }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } }, "lock": { "description": "The lock: the SHA-256 of wai.lock, byte for byte.", "type": "object", "additionalProperties": false, "required": [ "sha256" ], "properties": { "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } }, "toolchain": { "description": "The wai that built it, as the lock pins it.", "type": "object", "additionalProperties": false, "required": [ "version", "catalogue" ], "properties": { "version": { "type": "string", "minLength": 1 }, "catalogue": { "type": "object", "additionalProperties": false, "required": [ "sha256" ], "properties": { "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } } } }, "files": { "description": "Every file of the tree but this one, sorted by path as bytes.", "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "path", "sha256", "bytes" ], "properties": { "path": { "type": "string", "minLength": 1 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "bytes": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } } } } }