{
  "$id": "https://nuscien.github.io/winkit/schema/localwebapp.project.v6.json",
  "$schema": "https://json-schema.org/draft-07/schema",
  "description": "Project configuration for local web app.",
  "properties": {
    "dev": {
      "description": "The dev environment settings.",
      "type": "object"
    },
    "id": {
      "description": "The project identifier, such as @demo/app.",
      "maxLength": 214,
      "minLength": 1,
      "pattern": "^(?:@[a-z0-9-*~][a-z0-9-*._~]*/)?[a-z0-9-~][a-z0-9-._~]*$",
      "type": "string"
    },
    "package": {
      "description": "The package manifest.",
      "properties": {
        "copyright": {
          "description": "The copyright.",
          "type": "string"
        },
        "dataRes": {
          "description": "The JSON files which will load on app init to bind.",
          "patternProperties": {
            "\\s\\S": {
              "description": "The relative path of the JSON file to bind.",
              "type": "string"
            }
          },
          "type": "object"
        },
        "description": {
          "description": "The project description",
          "type": "string"
        },
        "entry": {
          "description": "The file name of the homepage.",
          "type": "string"
        },
        "host": {
          "description": "The host app binding information.",
          "items": {
            "properties": {
              "id": {
                "description": "The host app identifier to match.",
                "type": "string"
              },
              "kind": {
                "description": "The host app kind.",
                "type": "string"
              },
              "max": {
                "description": "The maximum verstion to test",
                "type": "string"
              },
              "min": {
                "description": "The minimum version to test.",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "icon": {
          "description": "The relative path of the icon.",
          "type": "string"
        },
        "meta": {
          "description": "Additional metadata.",
          "type": "object"
        },
        "publisher": {
          "description": "The display name of publisher.",
          "type": "string"
        },
        "strRes": {
          "description": "The plain text files which will load on app init to bind.",
          "patternProperties": {
            "\\s\\S": {
              "description": "The relative path of the plain text file to bind.",
              "type": "string"
            }
          },
          "type": "object"
        },
        "tags": {
          "description": "The tags.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "title": {
          "description": "The display name of the project.",
          "type": "string"
        },
        "version": {
          "description": "Version must be in node-semver.",
          "type": "string"
        },
        "website": {
          "description": "The homepage URL of the official website of the project or publisher.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ref": {
      "description": "The reference information.",
      "properties": {
        "key": {
          "description": "The PEM with private key.",
          "type": "string"
        },
        "output": {
          "description": "The output files.",
          "items": {
            "properties": {
              "config": {
                "description": "The relative path of the resource package config file.",
                "type": "string"
              },
              "zip": {
                "description": "The relative path of the resource package compressed file.",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "path": {
          "description": "The relative directory path of the front-end files.",
          "type": "string"
        },
        "sign": {
          "description": "The signature algorithm name, e.g. RS256, RS384 and RS512.",
          "type": "string"
        },
        "update": {
          "description": "The update information for client.",
          "properties": {
            "params": {
              "description": "The parameters to append to the url.",
              "patternProperties": {
                "\\s\\S": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "prop": {
              "description": "The property key in response to read update strategy and information.",
              "type": "string"
            },
            "settings": {
              "description": "The additional settings.",
              "type": "object"
            },
            "url": {
              "description": "The URL of Web API to check update.",
              "type": "string"
            }
          },
          "type": "object"
        },
        "updateMeta": {
          "description": "The output metadata for update service.",
          "properties": {
            "hash": {
              "description": "The hash algorithm name, e.g. SHA256, SHA384 and SHA512. It will output the hash value of the zip file.",
              "type": "string"
            },
            "info": {
              "description": "The additional information.",
              "type": "object"
            },
            "path": {
              "description": "The relative path of the output file.",
              "type": "string"
            },
            "sign": {
              "description": "The additional specific signature information.",
              "type": [
                "string",
                "object"
              ]
            },
            "urlTemplate": {
              "description": "The URL template for downloading zip file.",
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    }
  },
  "title": "LWA project config",
  "type": "object"
}