{
  "definitions": {
    "ImportItemString": {
      "type": "string",
      "minLength": 1
    },
    "ImportItemObject": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "syntax": {
          "enum": [
            "default",
            "named",
            "namespace",
            "side-effects",
            "single",
            "multiple",
            "pure"
          ]
        },
        "moduleName": {
          "type": "string",
          "minLength": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "alias": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": ["moduleName"]
    },
    "ImportItem": {
      "anyOf": [
        {
          "$ref": "#/definitions/ImportItemString"
        },
        {
          "$ref": "#/definitions/ImportItemObject"
        }
      ]
    }
  },
  "type": "object",
  "properties": {
    "type": {
      "enum": ["module", "commonjs"]
    },
    "imports": {
      "anyOf": [
        {
          "$ref": "#/definitions/ImportItem"
        },
        {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/ImportItem"
          }
        }
      ]
    },
    "wrapper": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "thisArg": {
              "type": "string",
              "minLength": 1
            },
            "args": {
              "anyOf": [
                {
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": ["thisArg"]
        }
      ]
    },
    "additionalCode": {
      "type": "string",
      "minLength": 1
    }
  },
  "anyOf": [
    { "required": ["imports"] },
    { "required": ["wrapper"] },
    { "required": ["additionalCode"] }
  ],
  "additionalProperties": false
}
