proa-cli 0.1.3

CLI for scaffolding, inspecting, formatting, and validating Proa web projects
Documentation
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://proa.so/schema/proa.config.json",
  "title": "Proa project configuration",
  "type": "object",
  "additionalProperties": false,
  "required": ["$schema", "paths", "registries", "dev", "build"],
  "properties": {
    "$schema": {
      "const": "https://proa.so/schema/proa.config.json"
    },
    "paths": {
      "type": "object",
      "additionalProperties": false,
      "required": ["components", "assets"],
      "properties": {
        "components": {
          "$ref": "#/$defs/relativePath",
          "default": "src/components"
        },
        "assets": {
          "$ref": "#/$defs/relativePath",
          "default": "public/proa"
        }
      }
    },
    "registries": {
      "type": "object",
      "additionalProperties": false,
      "required": ["@proa", "@proa-pro"],
      "properties": {
        "@proa": {
          "$ref": "#/$defs/registryTemplate",
          "default": "https://ui.proa.so/r/{name}.json"
        },
        "@proa-pro": {
          "$ref": "#/$defs/registryTemplate",
          "default": "https://console.proa.so/r/{name}.json"
        }
      }
    },
    "dev": {
      "type": "object",
      "additionalProperties": false,
      "required": ["command", "host", "port", "watch"],
      "properties": {
        "command": { "$ref": "#/$defs/command" },
        "host": { "type": "string", "minLength": 1 },
        "port": { "type": "integer", "minimum": 1, "maximum": 65535 },
        "watch": {
          "type": "array",
          "uniqueItems": true,
          "items": { "$ref": "#/$defs/relativePath" }
        }
      }
    },
    "build": {
      "type": "object",
      "additionalProperties": false,
      "required": ["command", "assets"],
      "properties": {
        "command": { "$ref": "#/$defs/command" },
        "assets": {
          "type": "array",
          "items": { "$ref": "#/$defs/asset" }
        }
      }
    }
  },
  "$defs": {
    "relativePath": {
      "type": "string",
      "minLength": 1,
      "pattern": "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000]+$"
    },
    "registryTemplate": {
      "type": "string",
      "minLength": 7,
      "pattern": "\\{name\\}"
    },
    "command": {
      "type": "array",
      "minItems": 1,
      "items": { "type": "string", "minLength": 1 }
    },
    "asset": {
      "type": "object",
      "additionalProperties": false,
      "required": ["kind", "command", "input", "output"],
      "properties": {
        "kind": { "enum": ["tailwind", "command"] },
        "command": {
          "type": "array",
          "items": { "type": "string", "minLength": 1 }
        },
        "input": { "type": "string" },
        "output": { "type": "string" },
        "config": {
          "oneOf": [
            { "$ref": "#/$defs/relativePath" },
            { "type": "null" }
          ]
        }
      }
    }
  }
}