{
  "title": "Schema for Executing NodeJS apps",
  "description": "NodeJS execution options",
  "cli": "nx",
  "type": "object",
  "properties": {
    "buildTarget": {
      "type": "string",
      "description": "The target to run to build you the app"
    },
    "waitUntilTargets": {
      "type": "array",
      "description": "The targets to run to before starting the node app",
      "default": [],
      "items": {
        "type": "string"
      }
    },
    "host": {
      "type": "string",
      "default": "localhost",
      "description": "The host to inspect the process on"
    },
    "port": {
      "type": "number",
      "default": 0,
      "description": "The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes."
    },
    "watch": {
      "type": "boolean",
      "description": "Run build when files change",
      "default": true
    },
    "inspect": {
      "oneOf": [
        {
          "type": "string",
          "enum": ["inspect", "inspect-brk"]
        },
        {
          "type": "boolean"
        }
      ],
      "description": "Ensures the app is starting with debugging",
      "default": "inspect"
    },
    "runtimeArgs": {
      "type": "array",
      "description": "Extra args passed to the node process",
      "default": [],
      "items": {
        "type": "string"
      }
    },
    "args": {
      "type": "array",
      "description": "Extra args when starting the app",
      "default": [],
      "items": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false,
  "required": ["buildTarget"]
}
