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