mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Plugins: Load plugins by order, aesthetic plugin dependency system (#2020)
* Plugins: Load plugins by order, aesthetic plugin dependency system Introduces plugins loading in order of installation, BTCPay itself shows up as a system plugin, and that plugins can define other plugins as dependencies. * use a proper type for plugin dependencies * rebase fixes * message when cannot install
This commit is contained in:
@@ -66,6 +66,11 @@ namespace BTCPayServer.Plugins
|
||||
UninstallPlugin(plugin);
|
||||
PluginManager.QueueCommands(dest, ("install", plugin));
|
||||
}
|
||||
public void UpdatePlugin(string plugin)
|
||||
{
|
||||
var dest = _btcPayServerOptions.PluginDir;
|
||||
PluginManager.QueueCommands(dest, ("update", plugin));
|
||||
}
|
||||
|
||||
public async Task UploadPlugin(IFormFile plugin)
|
||||
{
|
||||
@@ -93,7 +98,7 @@ namespace BTCPayServer.Plugins
|
||||
public string Description { get; set; }
|
||||
public bool SystemPlugin { get; set; } = false;
|
||||
|
||||
public string[] Dependencies { get; } = Array.Empty<string>();
|
||||
public IBTCPayServerPlugin.PluginDependency[] Dependencies { get; set; } = Array.Empty<IBTCPayServerPlugin.PluginDependency>();
|
||||
|
||||
public void Execute(IApplicationBuilder applicationBuilder,
|
||||
IServiceProvider applicationBuilderApplicationServices)
|
||||
|
||||
Reference in New Issue
Block a user