{
  "title": "Serverless Application Compile Target",
  "description": "Serverless application build target options for Compile Facade",
  "type": "object",
  "properties": {
    "servicePath": {
      "type": "string",
      "description": "The path to the source file to get the .ts entry points"
    },
    "tsConfig": {
      "type": "string",
      "description": "The name of the Typescript configuration file."
    },
    "outputPath": {
      "type": "string",
      "description": "The output path of the generated files."
    },
    "watch": {
      "type": "boolean",
      "description": "Run build when files change.",
      "default": false
    },
    "sourceMap": {
      "type": "boolean",
      "description": "Produce source maps.",
      "default": true
    },
    "progress": {
      "type": "boolean",
      "description": "Log progress to the console while building.",
      "default": false
    },
    "assets": {
      "type": "array",
      "description": "List of static application assets.",
      "default": [],
      "items": {
        "$ref": "#/definitions/assetPattern"
      }
    },
    "maxWorkers": {
      "type": "number",
      "description": "Number of workers to use for type checking. (defaults to # of CPUS - 2)"
    },
    "fileReplacements": {
      "description": "Replace files with other files in the build.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "replace": {
            "type": "string"
          },
          "with": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": ["replace", "with"]
      },
      "default": []
    },
    "processEnvironmentFile": {
      "type": "string",
      "description": "The env.json you want to build serverless with",
      "default": "env.json"
    },
    "logGroupName": {
      "type": "string",
      "description": "The cloud watch log group name to override all functions and log to"
    },
    "skipClean": {
      "type": "boolean",
      "description": "Skips cleaning the output folder",
      "default": false
    }
  },
  "required": [
    "tsConfig",
    "servicePath",
    "outputPath",
    "serverlessConfig",
    "package",
    "processEnvironmentFile"
  ],
  "definitions": {
    "assetPattern": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "glob": {
              "type": "string",
              "description": "The pattern to match."
            },
            "input": {
              "type": "string",
              "description": "The input directory path in which to apply 'glob'. Defaults to the project root."
            },
            "ignore": {
              "description": "An array of globs to ignore.",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "output": {
              "type": "string",
              "description": "Absolute path within the output."
            }
          },
          "additionalProperties": false,
          "required": ["glob", "input", "output"]
        },
        {
          "type": "string"
        }
      ]
    }
  }
}
