{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/nodehawkrc.json",
  "properties": {
    "paths": {
      "$id": "#/properties/paths",
      "description": "A string or an array of paths to watch. Supports globbing.",
      "default": "./src",
      "examples": ["./src"],
      "oneOf": [
        {
          "type": "string",
          "default": "./src"
        },
        {
          "type": "array",
          "default": ["./src"],
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "root": {
      "$id": "#/properties/root",
      "type": "string",
      "description": "The root path from which all other paths will be resolved.",
      "default": ".",
      "examples": ["."]
    },
    "ignored": {
      "$id": "#/properties/ignored",
      "type": "string",
      "description": "Paths, globs or regular expressions to ignore.",
      "default": ""
    },
    "exec": {
      "$id": "#/properties/exec",
      "type": "string",
      "description": "The command to execute on file change.",
      "default": "",
      "examples": ["babel-node src/server", "ts-node src/server"]
    },
    "port": {
      "$id": "#/properties/port",
      "type": "integer",
      "description": "The port on which the server should run. This is passed to your application as `process.env.PORT` which should be used by you.",
      "default": 4000
    },
    "logLevel": {
      "$id": "#/properties/logLevel",
      "type": "integer",
      "description": "The level of logging. 0 - fatal, 1 - error, 2 - warning, 3 - info, 4 - debug",
      "default": 3
    },
    "buffer": {
      "$id": "#/properties/buffer",
      "type": "integer",
      "description": "The buffer duration to wait before triggering a restart.",
      "default": 1500
    },
    "bufferPoll": {
      "$id": "#/properties/bufferPoll",
      "type": "integer",
      "description": "The buffer polling interval to check for the file stability.",
      "default": 100
    },
    "display": {
      "$id": "#/properties/display",
      "type": "object",
      "description": "The various messages to display during different events.",
      "properties": {
        "onBeforeStart": {
          "$id": "#/properties/display/properties/onBeforeStart",
          "type": "string",
          "description": "The message to display before the watcher starts.",
          "default": "Starting..."
        },
        "onStart": {
          "$id": "#/properties/display/properties/onStart",
          "type": "string",
          "description": "The message to display after the watcher starts.",
          "default": "Started"
        },
        "onBeforeRestart": {
          "$id": "#/properties/display/properties/onBeforeRestart",
          "type": "string",
          "description": "The message to display before the watcher restarts.",
          "default": "Restarting..."
        },
        "onRestart": {
          "$id": "#/properties/display/properties/onRestart",
          "type": "string",
          "description": "The message to display after the watcher restarts.",
          "default": "Restarted"
        },
        "onBeforeStop": {
          "$id": "#/properties/display/properties/onBeforeStop",
          "type": "string",
          "description": "The message to display before the watcher stops.",
          "default": "Stopping..."
        }
      }
    },
    "clearScreen": {
      "$id": "#/properties/clearScreen",
      "type": "boolean",
      "description": "Clear the screen on start and on every restart.",
      "default": true
    },
    "env": {
      "$id": "#/properties/env",
      "type": "object",
      "description": "A set of key-value pairs which will be promptly passed on to your process and accessible via `process.env`.",
      "default": {}
    }
  },
  "required": ["exec"],
  "title": "Nodehawk configuration schema.",
  "type": "object"
}
