{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "packageSettings": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/GeneratedPackageSettings"
      },
      "description": "Generated settings to correct issues with packages or optimize their bundling process."
    },
    "$schema": {
      "type": "string"
    }
  },
  "additionalProperties": false,
  "description": "Per-application generated configuration for Cloudpack.",
  "definitions": {
    "GeneratedPackageSettings": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "match": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Name of the package. Can use a trailing wildcard (e.g. `@scope/*`). `*` to match any name.\n\nTo negate a match, use `!` as the first character (e.g. `!@scope/foo` or `!@scope/*`)."
                },
                "version": {
                  "type": "string",
                  "description": "Version of the package. Unspecified matches any version.\n\nNote that if the package version is a prerelease, it will only match `*` or ranges that explicitly include prereleases. For example, `^1.0.0` will not match `1.0.1-beta.0`."
                }
              },
              "additionalProperties": false,
              "description": "Make all properties in T required"
            }
          ],
          "description": "This will be a string (name) for internal packages, or match with name and version for external. The match in this case will NOT contain wildcards in the name."
        },
        "exports": {
          "$ref": "#/definitions/GeneratedExports",
          "description": "Generated exports. This will always be a simple object with import paths."
        },
        "includedDependencies": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The dependencies which should be included when computing the import map. This is primarily used when devDependencies are needed by the app. This often happens when a library has a demo app which relies on devDependencies.\n\nAccepts `$devDependencies` as a special value to include all devDependencies."
        },
        "excludedDependencies": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it.\n\nAccepts `$peerDependencies` as a special value to exclude all peerDependencies."
        },
        "dynamicImports": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Only relevant for packages bundled with rollup: globs of files that include dynamic (async) imports with non-literal paths, to be processed by `@rollup/plugin-dynamic-import-vars` (subject to that plugin's [limitations](https://www.npmjs.com/package/\\@rollup/plugin-dynamic-import-vars#limitations)). Files matching `*.dynamic.*` are automatically included.\n\nThis is not needed for ori/esbuild and webpack because they should handle these types of imports automatically."
        }
      },
      "required": [
        "match"
      ],
      "description": "Subset of PackageSettings used in the generated config."
    },
    "GeneratedExports": {
      "type": "object",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          },
          {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              ]
            }
          }
        ]
      },
      "description": "Mapping from import path to either file path, or a nested object of conditions to file paths (occasionally with two levels of conditions). This is the format used for generated exports maps."
    }
  }
}