{
    "version": 2,
    "outputCapture": "direct-nodejs",
    "title": "Typescript Build Target",
    "description": "Builds using TypeScript.",
    "cli": "nx",
    "type": "object",
    "properties": {
        "main": {
            "type": "string",
            "description": "The name of the main entry-point file.",
            "x-completion-type": "file",
            "x-completion-glob": "main@(.js|.ts|.jsx|.tsx)"
        },
        "rootDir": {
            "type": "string",
            "description": "Sets the rootDir for TypeScript compilation. When not defined, it uses the root of project."
        },
        "outputPath": {
            "type": "string",
            "description": "The output path of the generated files.",
            "x-completion-type": "directory"
        },
        "tsConfig": {
            "type": "string",
            "description": "The path to the Typescript configuration file.",
            "x-completion-type": "file",
            "x-completion-glob": "tsconfig.*.json"
        },
        "packageJson": {
            "type": "string",
            "description": "The path to the package.json file.",
            "x-completion-type": "file",
            "x-completion-glob": "package.json"
        },
        "templatePath": {
            "type": "string",
            "description": "The path to the cloudformation template.yaml file.",
            "x-completion-type": "file",
            "x-completion-glob": "template.yaml"
        },
        "assets": {
            "type": "array",
            "description": "List of static assets.",
            "default": [],
            "items": {
                "$ref": "#/definitions/assetPattern"
            }
        },
        "clean": {
            "type": "boolean",
            "description": "Remove previous output before build.",
            "default": true
        },
        "transformers": {
            "type": "array",
            "description": "List of TypeScript Transformer Plugins.",
            "default": [],
            "items": {
                "$ref": "#/definitions/transformerPattern"
            }
        },
        "updateBuildableProjectDepsInPackageJson": {
            "type": "boolean",
            "description": "Whether to update the buildable project dependencies in `package.json`.",
            "default": true
        },
        "buildableProjectDepsInPackageJsonType": {
            "type": "string",
            "description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
            "enum": ["dependencies", "peerDependencies"],
            "default": "peerDependencies"
        },
        "external": {
            "description": "A list projects to be treated as external. This feature is experimental",
            "oneOf": [
                {
                    "type": "string",
                    "enum": ["all", "none"]
                },
                {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            ]
        },
        "externalBuildTargets": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "description": "List of target names that annotate a build target for a project",
            "default": ["build"]
        }
    },
    "required": ["main", "outputPath", "tsConfig"],
    "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"
                }
            ]
        },
        "transformerPattern": {
            "oneOf": [
                {
                    "type": "string"
                },
                {
                    "type": "object",
                    "properties": {
                        "name": {
                            "type": "string"
                        },
                        "options": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "additionalProperties": false,
                    "required": ["name"]
                }
            ]
        }
    },
    "examplesFile": "../../../docs/tsc-examples.md"
}
