{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/package-json/_shared/latest--nodemon.json",
  "title": "JSON Schema for Nodemon Config",
  "x-lintel": {
    "source": "https://json.schemastore.org/nodemon.json",
    "sourceSha256": "44a58d109c8f5967ec4154a6612793fd3ca40aaa917f69e604b6367784ca6973"
  },
  "type": "object",
  "properties": {
    "colours": {
      "default": true,
      "description": "set to false to disable color output",
      "type": "boolean"
    },
    "cwd": {
      "description": "change into <dir> before running the script",
      "type": "string"
    },
    "delay": {
      "default": 0,
      "description": "debounce restart for a number of milliseconds",
      "type": "number"
    },
    "dump": {
      "default": false,
      "description": "print full debug configuration",
      "type": "boolean"
    },
    "exec": {
      "description": "execute script with \"app\", ie. -x \"python -v\".  May use variables.",
      "examples": [
        "{{pwd}}/index.js --some-arg",
        "{{filename}}"
      ],
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "execMap": {
      "description": "The global config file is useful for setting up default executables",
      "type": "object"
    },
    "exitcrash": {
      "description": "Exit nodemon after crash",
      "type": "boolean"
    },
    "ext": {
      "default": "*",
      "description": "extensions to look for, ie. \"js,jade,hbs\"",
      "type": "string"
    },
    "ignore": {
      "description": "Ignore directory or file.  One entry per ignored value.  Wildcards are allowed.",
      "oneOf": [
        {
          "$ref": "#/$defs/pathPattern"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/pathPattern",
            "description": "Path or pattern of file or directory to ignore.  Can also use regular expressions wrapped in an object with a single property named \"re\".",
            "examples": [
              ".gitignore",
              ".vscode",
              "__tests__/*",
              "__*__/*.js",
              "*.test.js"
            ]
          }
        }
      ]
    },
    "ignoreRoot": {
      "description": "root paths to ignore",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "legacyWatch": {
      "default": false,
      "description": "use polling to watch for changes (typically needed when watching over a network/Docker)",
      "type": "boolean"
    },
    "noUpdateNotifier": {
      "default": false,
      "description": "opt-out of update version check",
      "type": "boolean"
    },
    "nodeArgs": {
      "description": "arguments to pass to node if exec is \"node\"",
      "type": "array"
    },
    "pollingInterval": {
      "default": 100,
      "description": "combined with legacyWatch, milliseconds to poll for (default 100)",
      "type": "number"
    },
    "quiet": {
      "default": false,
      "description": "minimise nodemon messages to start/stop only",
      "type": "boolean"
    },
    "runOnChangeOnly": {
      "default": false,
      "description": "execute script on change only, not startup",
      "type": "boolean"
    },
    "signal": {
      "$ref": "#/$defs/terminationSignals",
      "description": "use specified kill signal instead of default (ex. SIGTERM)",
      "type": "string"
    },
    "spawn": {
      "default": false,
      "description": "force nodemon to use spawn (over fork) [node only]",
      "type": "boolean"
    },
    "stdin": {
      "default": true,
      "description": "set to false to have nodemon pass stdin directly to child process",
      "type": "boolean"
    },
    "verbose": {
      "default": false,
      "description": "show detail on what is causing restarts",
      "type": "boolean"
    },
    "watch": {
      "description": "Watch directory or file.  One entry per watched value.  Wildcards are allowed.",
      "oneOf": [
        {
          "$ref": "#/$defs/pathPattern"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/pathPattern",
            "description": "Path or pattern of file or directory to watch.  Can also use regular expressions wrapped in an object with a single property named \"re\".",
            "examples": [
              "src/index.js",
              "src",
              "src/*.js",
              "*.js"
            ]
          }
        }
      ]
    }
  },
  "$defs": {
    "pathPattern": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "properties": {
            "re": {
              "type": "string"
            }
          },
          "description": "Regular expression",
          "required": [
            "re"
          ],
          "additionalProperties": false
        }
      ]
    },
    "terminationSignals": {
      "anyOf": [
        {
          "const": "SIGTERM"
        },
        {
          "const": "SIGINT"
        },
        {
          "const": "SIGQUIT"
        },
        {
          "const": "SIGKILL"
        },
        {
          "const": "SIGHUP"
        }
      ]
    },
    "variables": {
      "anyOf": [
        {
          "const": "{{pwd}}",
          "description": "The current directory"
        },
        {
          "const": "{{filename}}",
          "description": "The filename you pass to nodemon"
        }
      ]
    }
  },
  "dependentSchemas": {
    "pollingInterval": {
      "required": [
        "legacyWatch"
      ]
    },
    "nodeArgs": {
      "properties": {
        "exec": {
          "type": "string"
        }
      },
      "required": [
        "exec"
      ],
      "type": "object"
    }
  }
}
