{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/nodemon-json/latest.json",
  "title": "JSON Schema for Nodemon Config",
  "x-lintel": {
    "source": "https://www.schemastore.org/nodemon.json",
    "sourceSha256": "4d704051f22978ad4932b082ec36d1cad2239325bc4999617bae8f6c03c58bac",
    "fileMatch": [
      "nodemon.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "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}}"
      ],
      "format": "<app> <your args>",
      "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.",
      "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"
        ]
      },
      "type": "array"
    },
    "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.",
      "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"
        ]
      },
      "type": "array"
    }
  },
  "$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": {
      "exec": {
        "const": "node"
      },
      "required": [
        "exec"
      ]
    }
  }
}
