{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:grida-fx:schema:fx-project-init-v1", "title": "Local FX project initialization or template installation result", "type": "object", "additionalProperties": true, "required": [ "kind", "created", "project_root", "files_created" ], "dependentRequired": { "workflow_entry": ["template", "missing_inputs", "prerequisites"] }, "if": { "required": ["workflow_entry"] }, "then": { "properties": { "created": { "const": true }, "template": { "type": "object", "properties": { "source": { "enum": ["release", "local", "github"] } } } } }, "$defs": { "project_file": { "type": "string", "not": { "pattern": "(^|/)[.]{1,2}(/|$)" }, "pattern": "^[^/:\\\\\\u0000-\\u001f\\u007f-\\u009f]+(?:/[^/:\\\\\\u0000-\\u001f\\u007f-\\u009f]+)*$" } }, "properties": { "kind": { "const": "fx-project-init-v1" }, "created": { "type": "boolean" }, "project_root": { "type": "string", "minLength": 1 }, "files_created": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1, "pattern": "^[^/\\\\]+(/[^/\\\\]+)*$" } }, "workflow_entry": { "$ref": "#/$defs/project_file", "description": "The installed starter's workflow entry when using add." }, "inputs_file": { "$ref": "#/$defs/project_file", "description": "The starter's bundled input preset, when declared." }, "missing_inputs": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/project_file" }, "description": "Declared user-supplied inputs absent from the installed source." }, "prerequisites": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "Requirements for using the starter, supplied by its author." }, "template": { "oneOf": [ { "type": "null" }, { "type": "object", "additionalProperties": true, "required": [ "name", "source" ], "properties": { "name": { "type": "string" }, "source": { "enum": [ "built_in", "release", "local", "github" ] } }, "if": { "properties": { "source": { "const": "github" } } }, "then": { "properties": { "name": { "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?/(?![.]{1,2}@)[A-Za-z0-9_.-]{1,100}@(?=[A-Za-z0-9_.+/-]{1,255}$)(?!.*[.]{2})(?!.*[.]$)(?!.*[.]lock(?:/|$))[A-Za-z0-9_+-][A-Za-z0-9_.+-]*(?:/[A-Za-z0-9_+-][A-Za-z0-9_.+-]*)*$" } } }, "else": { "properties": { "name": { "pattern": "^[a-z0-9-]+$" } } } } ] } } }