{
  "$schema": "http://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 host application should consume."
    },
    "host": {
      "type": "string",
      "description": "The name of the host application that the remote application will be consumed by."
    },
    "routing": {
      "type": "boolean",
      "description": "Generate a routing setup to allow a host application to route to the 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. _Note: This is only supported in Angular versions >= 14.1.0_",
      "default": false
    }
  },
  "required": ["appName", "mfType"],
  "additionalProperties": false,
  "examplesFile": "../../../docs/setup-mf-examples.md"
}
