{
  "$schema": "https://json-schema.org/schema",
  "$id": "GeneratorAngularMFSetup",
  "cli": "nx",
  "title": "Generate Module Federation Setup for Angular App",
  "description": "Create Module Federation configuration files for given Angular Application.",
  "type": "object",
  "properties": {
    "appName": {
      "type": "string",
      "description": "The name of the application to generate the Module Federation configuration for.",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "x-prompt": "What app would you like to generate a Module Federation configuration for?",
      "x-dropdown": "projects"
    },
    "mfType": {
      "type": "string",
      "enum": ["host", "remote"],
      "description": "Type of application to generate the Module Federation configuration for.",
      "default": "remote"
    },
    "federationType": {
      "type": "string",
      "enum": ["static", "dynamic"],
      "description": "Use either Static or Dynamic Module Federation pattern for the application.",
      "default": "static"
    },
    "port": {
      "type": "number",
      "description": "The port at which the remote application should be served."
    },
    "remotes": {
      "type": "array",
      "description": "A list of remote application names that the Consumer (host) application should consume.",
      "alias": "producers"
    },
    "host": {
      "type": "string",
      "description": "The name of the host application that the remote application will be consumed by.",
      "alias": "consumer"
    },
    "routing": {
      "type": "boolean",
      "description": "Generate a routing setup to allow a Consumer (host) application to route to the Producer (remote) application.",
      "x-priority": "important"
    },
    "skipFormat": {
      "type": "boolean",
      "description": "Skip formatting the workspace after the generator completes.",
      "x-priority": "internal"
    },
    "skipPackageJson": {
      "type": "boolean",
      "default": false,
      "description": "Do not add dependencies to `package.json`.",
      "x-priority": "internal"
    },
    "skipE2E": {
      "type": "boolean",
      "default": false,
      "description": "Do not set up E2E related config."
    },
    "e2eProjectName": {
      "type": "string",
      "description": "The project name of the associated E2E project for the application. This is only required for Cypress E2E projects that do not follow the naming convention `<appName>-e2e`."
    },
    "prefix": {
      "type": "string",
      "description": "The prefix to use for any generated component."
    },
    "standalone": {
      "type": "boolean",
      "description": "Whether the application is a standalone application.",
      "default": true
    },
    "typescriptConfiguration": {
      "type": "boolean",
      "description": "Whether the module federation configuration and webpack configuration files should use TS.",
      "default": true
    },
    "setParserOptionsProject": {
      "type": "boolean",
      "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
      "default": false
    }
  },
  "required": ["appName", "mfType"],
  "additionalProperties": false,
  "examplesFile": "../../../docs/setup-mf-examples.md"
}
