In the RoPieee thread the suggestion was made by @spockfish to come up with a convention for extension distribution, to allow the creation of a generic extension installer.
What follows is the current status, this is of course open for discussion.
The repository entry
The backbone behind the distribution is npm. An extension gets an entry in a global extension repository in json format. An entry contains the fields that are shown in the below example:
{
"author": "The Appgineer",
"display_name": "Alarm Clock",
"description": "Roon Extension to start or stop playback on a specific zone at a specific time",
"repository": {
"type": "git",
"url": "https://github.com/TheAppgineer/roon-extension-alarm-clock.git"
}
}
The first three fields are shown to the user by an extension installer, the last one is used to install the extension. Updates can be automatic and do not require an update of the above information.
The repository
The repository is hosted on GitHub:
If you are an extension developer and you want your extensions included, please give me a pull request!
The platform layering
roon-extension-manager
This is the front-end towards the lower layers. There is no state information of the managed extensions in this layer and it can therefor easily be replaced by another front-end. In the current implementation the functionality behind the auto-update time hasn’t been implemented yet, I’m working on it right now.
node-api-extension-installer
This layer wraps npm commands in a Node API. I could not find an existing API for this that handles packages outside the npm repository (Roon extensions currently have to be accessed via a git url). Installed packages and available updates are all queried via standard npm commands.
node-api-extension-runner
This is a child node implementation for starting and stopping extensions. It is rather limited in its functionality, it e.g. doesn’t store the state of extensions, preventing an auto restart of running extensions after a reboot. The plan is to come up with OS optimized implementations of this layer.