{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "server": {
      "description": "The URL address of the Eik server where packages are published to.",
      "type": "string",
      "format": "uri"
    },
    "name": {
      "description": "The name of the Eik package. Follows the same rules as for NPM package names. Must be parseable by validate-npm-package-name package, which is bundled with npm as a dependency.",
      "type": "string",
      "maxLength": 214,
      "minLength": 1
    },
    "version": {
      "description": "The version of the Eik package. Follows the same rules as for NPM package versions. Must be parseable by node-semver, which is bundled with npm as a dependency.",
      "type": "string",
      "minLength": 1
    },
    "type": {
      "description": "The type of the Eik package. Must be one of 'package', 'npm', 'map' or 'image'. Setting this value changes the URL publish namespace between '/pkg' (default), '/npm', '/map' and '/img', use 'npm' when publishing NPM packages. Use 'image' when publishing images. Use 'map' when publishing import maps.",
      "type": "string",
      "enum": ["package", "npm", "map", "image"],
      "default": "package"
    },
    "files": {
      "description": "File mapping definition for the package. Keys represent files or paths to be created on the Eik Server. Values represent paths to local files to be published.",
      "oneOf": [
        {
          "type": "object",
          "minProperties": 1,
          "additionalProperties": {
            "type": "string"
          }
        },
        { "type": "string", "minLength": 1 }
      ]
    },
    "import-map": {
      "description": "Import map files given by URL(s) to be used during package bundling. Specified as a URL or array of URLs. URLs are locations of import map files that follow the W3C import map spec.",
      "oneOf": [
        { "type": "string", "format": "uri" },
        {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        }
      ]
    },
    "out": {
      "description": "Location of local Eik build directory (defaults to .eik). Used by Eik client.",
      "type": "string",
      "format": "uri-reference",
      "minLength": 1
    }
  },
  "required": ["server", "name", "version", "files"]
}
