Open ashleydavis opened 3 years ago
Totally agreed. This is something I'd like to work on as I've never implemented a plugins registry before.
You gave me a good starting point to implement it but I wonder if there isn't a good generally recommended procedure for this. Let me know if you know of any.
If we're going to implement it ourselves, my first question would be
The first version of this doesn't need to be very complicated.
The manifest will just be a Git repo (say called plugins-manifest). The first time the user runs Doulevo create it can do a Git clone (just like it does to download a plugin).
You could clone the repo to a manifest
directory under the app's data directory (just like this example).
If they already have a local copy of the manifest (you can check it like this) then simply do a Git pull to update it.
I haven't implemented Git pull in the Git service yet, but it would look very much like the existing clone
function.
Just remember to keep it simple. Doulevo is still only a prototype and writing a package manager is very challenging!
Thanks a lot for the great pointers. It all seems clear, except for the git pull
so far.
I will eventually need to know which branch to pull from. What do you think we require plugins have this set somewhere?
Maybe a release_branch
key in the plugin.json
file?
{
"sharedDirectories":[
{
"host":"src",
"container":"/app/src"
}
],
"release_branch": "main"
}
Just pull from the default branch. There's no need to have it in plugin.json
yet.
I think if they already have the plugin-manifest
directory under the app's data directory then just run git pull
against it. If that doesn't work for some reason let me know and we can talk it through.
Note that I've changed the name of this issue from "project manifest" to "plugin manifest" which is a more suitable name for the thing that will describe the official plugins.
When invoking
doulevo create
we should allow the user to choose from a filterable list of all project types.To implement this we'll need a manifest of official Doulevo projects. This shouldn't be baked into the Doulevo executable, it can be stored in a separate GitHub repo that Doulevo automatically clone/updates on the user's computer.
Whenever we add an official plugin we can update the manifest in GitHub so that it is updated to user computers so they always have access to the latest list of project types.