Closed saviola777 closed 5 years ago
The repository API should provide two functions getPlugin
and getRepositoryInformation
(which has to make sure that certain information, like repository name, are provided). For GitHub and other file-based repositories, a file repository.json
at the root of the repository will be loaded, which looks like this:
// repository.json
{
"name": "Mandatory name for the repository",
"description": "Optional description for the repository.",
"author": "Optional author of the repository.",
"config": {
"path": "Optional path to where the plugins are in the repository"
},
"plugins": [
"bla/bla",
"bla/daa"
]
}
Other repository types can just provide this information as a JavaScript object. All but the name is optional, if the repository does not provide any information, the repository type handler has to generate a name.
The API should be "standalone", to be able to get repository information without adding repositories to HHM.
This is now implemented, documentation on it is still WIP.
To provide a better user experience and avoid unnecessary requests, the repositories should (optionally) provide information about the plugins they contain.