saviola777 / haxball-headless-manager

Suite of management scripts for headless haxball hosts, including plugins with dependency management
MIT License
7 stars 3 forks source link

Repositories should provide information about the plugins they contain #20

Closed saviola777 closed 5 years ago

saviola777 commented 5 years ago

To provide a better user experience and avoid unnecessary requests, the repositories should (optionally) provide information about the plugins they contain.

saviola777 commented 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.

saviola777 commented 5 years ago

The API should be "standalone", to be able to get repository information without adding repositories to HHM.

saviola777 commented 5 years ago

This is now implemented, documentation on it is still WIP.