mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-02-04 02:43:32 +00:00
Workshop - Improved workshop entry compatibility handling
Workshop - Added minimum Artemis version to releases
This commit is contained in:
parent
86f2426f37
commit
6bf5a11108
@ -113,7 +113,8 @@ public class PluginInfo : IPrerequisitesSubject
|
||||
/// <summary>
|
||||
/// Gets the minimum version of Artemis required by this plugin
|
||||
/// </summary>
|
||||
public Version? MinimumVersion { get; internal init; } = new(1, 0, 0);
|
||||
[JsonInclude]
|
||||
public Version? MinimumVersion { get; internal init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the plugin this info is associated with
|
||||
|
||||
@ -29,7 +29,8 @@ public interface IWindowService : IArtemisSharedUIService
|
||||
/// </summary>
|
||||
/// <param name="title">The title of the dialog</param>
|
||||
/// <param name="exception">The exception to display</param>
|
||||
void ShowExceptionDialog(string title, Exception exception);
|
||||
/// <param name="customMessage"></param>
|
||||
void ShowExceptionDialog(string title, Exception exception, string? customMessage = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a view model instance of type <typeparamref name="TViewModel" /> and shows its corresponding View as a
|
||||
|
||||
@ -22,9 +22,7 @@
|
||||
|
||||
<StackPanel Grid.Row="2" Margin="20">
|
||||
<TextBlock Classes="h3">Awww :(</TextBlock>
|
||||
<TextBlock>
|
||||
It looks like Artemis ran into an unexpected error. If this keeps happening feel free to hit us up on Discord.
|
||||
</TextBlock>
|
||||
<TextBlock Text="{CompiledBinding Message}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="3" ColumnDefinitions="*,Auto" RowDefinitions="*,Auto">
|
||||
|
||||
@ -9,15 +9,17 @@ internal class ExceptionDialogViewModel : DialogViewModelBase<object>
|
||||
{
|
||||
private readonly INotificationService _notificationService;
|
||||
|
||||
public ExceptionDialogViewModel(string title, Exception exception, INotificationService notificationService)
|
||||
public ExceptionDialogViewModel(string title, Exception exception, string? customMessage, INotificationService notificationService)
|
||||
{
|
||||
_notificationService = notificationService;
|
||||
|
||||
Title = $"Artemis | {title}";
|
||||
Message = customMessage ?? "It looks like Artemis ran into an unexpected error. If this keeps happening feel free to hit us up on Discord.";
|
||||
Exception = exception;
|
||||
}
|
||||
|
||||
public string Title { get; }
|
||||
public string Message { get; }
|
||||
public Exception Exception { get; }
|
||||
|
||||
public async Task CopyException()
|
||||
|
||||
@ -125,7 +125,7 @@ internal class WindowService : IWindowService
|
||||
return await window.ShowDialog<TResult>(parent);
|
||||
}
|
||||
|
||||
public void ShowExceptionDialog(string title, Exception exception)
|
||||
public void ShowExceptionDialog(string title, Exception exception, string? customMessage = null)
|
||||
{
|
||||
if (_exceptionDialogOpen)
|
||||
return;
|
||||
@ -136,7 +136,7 @@ internal class WindowService : IWindowService
|
||||
{
|
||||
try
|
||||
{
|
||||
await ShowDialogAsync(new ExceptionDialogViewModel(title, exception, _container.Resolve<INotificationService>()));
|
||||
await ShowDialogAsync(new ExceptionDialogViewModel(title, exception, customMessage, _container.Resolve<INotificationService>()));
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
23
src/Artemis.UI/Extensions/IReleaseExtensions.cs
Normal file
23
src/Artemis.UI/Extensions/IReleaseExtensions.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using Artemis.Core;
|
||||
using Artemis.WebClient.Workshop;
|
||||
|
||||
namespace Artemis.UI.Extensions;
|
||||
|
||||
public static class ReleaseExtensions
|
||||
{
|
||||
extension(IRelease release)
|
||||
{
|
||||
/// <summary>
|
||||
/// Determines whether the release is compatible with the current version of Artemis.
|
||||
/// </summary>
|
||||
/// <returns>A value indicating whether the release is compatible with the current version of Artemis.</returns>
|
||||
public bool IsCompatible()
|
||||
{
|
||||
if (release.MinimumVersion == null || Constants.CurrentVersion == "local")
|
||||
return true;
|
||||
|
||||
return release.MinimumVersion <= Version.Parse(Constants.CurrentVersion).ArtemisVersionToLong();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/Artemis.UI/Extensions/VersionExtensions.cs
Normal file
45
src/Artemis.UI/Extensions/VersionExtensions.cs
Normal file
@ -0,0 +1,45 @@
|
||||
using System;
|
||||
|
||||
namespace Artemis.UI.Extensions;
|
||||
|
||||
public static class VersionExtensions
|
||||
{
|
||||
/// <param name="version">The version to convert</param>
|
||||
extension(Version version)
|
||||
{
|
||||
/// <summary>
|
||||
/// Convert a Version to a long representation for easy comparison in PostgreSQL
|
||||
/// <remarks>Assumes format: major.year.dayOfYear.revision (e.g., 1.2024.0225.2)</remarks>
|
||||
/// </summary>
|
||||
/// <returns>A long value that preserves version comparison order</returns>
|
||||
public long ArtemisVersionToLong()
|
||||
{
|
||||
// Format: major.year.dayOfYear.revision
|
||||
// Convert to: majorYYYYDDDRRRR (16 digits)
|
||||
// Major: 1 digit (0-9)
|
||||
// Year: 4 digits (e.g., 2024)
|
||||
// Day: 3 digits (001-366, padded)
|
||||
// Revision: 4 digits (0000-9999, padded)
|
||||
|
||||
long major = Math.Max(0, Math.Min(9, version.Major));
|
||||
long year = Math.Max(1000, Math.Min(9999, version.Minor));
|
||||
long day = Math.Max(1, Math.Min(366, version.Build));
|
||||
long revision = Math.Max(0, Math.Min(9999, version.Revision >= 0 ? version.Revision : 0));
|
||||
|
||||
return major * 100000000000L +
|
||||
year * 10000000L +
|
||||
day * 10000L +
|
||||
revision;
|
||||
}
|
||||
|
||||
public static Version FromLong(long versionLong)
|
||||
{
|
||||
int major = (int)(versionLong / 100000000000L);
|
||||
int year = (int)((versionLong / 10000000L) % 10000);
|
||||
int day = (int)((versionLong / 10000L) % 1000);
|
||||
int revision = (int)(versionLong % 10000L);
|
||||
|
||||
return new Version(major, year, day, revision);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -90,11 +90,11 @@
|
||||
<!-- Install state -->
|
||||
<StackPanel Grid.Column="2" Grid.Row="1" Margin="0 0 4 0" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsVisible="{CompiledBinding IsInstalled}">
|
||||
<TextBlock TextAlignment="Right" IsVisible="{CompiledBinding !UpdateAvailable}">
|
||||
<avalonia:MaterialIcon Kind="CheckCircle" Foreground="{DynamicResource SystemAccentColorLight1}" Width="20" Height="20" />
|
||||
<avalonia:MaterialIcon Kind="CheckCircle" Foreground="{DynamicResource SystemAccentColorLight1}" Width="20" Height="20" Margin="0 0 0 -4"/>
|
||||
<Run>installed</Run>
|
||||
</TextBlock>
|
||||
<TextBlock TextAlignment="Right" IsVisible="{CompiledBinding UpdateAvailable}">
|
||||
<avalonia:MaterialIcon Kind="Update" Foreground="{DynamicResource SystemAccentColorLight1}" Width="20" Height="20" />
|
||||
<avalonia:MaterialIcon Kind="Update" Foreground="{DynamicResource SystemAccentColorLight1}" Width="20" Height="20" Margin="0 0 0 -4"/>
|
||||
<Run>update available</Run>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
@ -30,7 +30,7 @@ public partial class EntryListViewModel : RoutableScreen
|
||||
[Notify] private bool _initializing = true;
|
||||
[Notify] private bool _fetchingMore;
|
||||
[Notify] private int _entriesPerFetch;
|
||||
[Notify] private bool _includeDefaultEntries;
|
||||
[Notify] private bool _includeDefaultEntries = true;
|
||||
[Notify] private Vector _scrollOffset;
|
||||
|
||||
protected EntryListViewModel(EntryType entryType,
|
||||
|
||||
@ -37,13 +37,17 @@
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
<StackPanel>
|
||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
||||
<Button Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Classes="icon-button" Margin="0 0 5 0" Command="{CompiledBinding Close}" IsVisible="{CompiledBinding InDetailsScreen}">
|
||||
<avalonia:MaterialIcon Kind="ArrowBack" />
|
||||
</Button>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Theme="{StaticResource SubtitleTextBlockStyle}" IsVisible="{CompiledBinding InDetailsScreen}">Release info</TextBlock>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Theme="{StaticResource SubtitleTextBlockStyle}" IsVisible="{CompiledBinding !InDetailsScreen}">Latest release</TextBlock>
|
||||
<StackPanel Grid.Column="2">
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="5" Margin="0 0 15 0" IsVisible="{CompiledBinding IncompatibilityReason, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<avalonia:MaterialIcon Kind="Alert" Width="20" Height="20" Foreground="#DAA520" />
|
||||
<TextBlock VerticalAlignment="Center" Text="{CompiledBinding IncompatibilityReason}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="3">
|
||||
<!-- Install progress -->
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Spacing="5"
|
||||
@ -64,7 +68,11 @@
|
||||
|
||||
<!-- Install button -->
|
||||
<Panel IsVisible="{CompiledBinding !InstallationInProgress}" HorizontalAlignment="Right">
|
||||
<Button IsVisible="{CompiledBinding !IsCurrentVersion}" Classes="accent" Width="80" Command="{CompiledBinding Install}">
|
||||
<Button IsVisible="{CompiledBinding !IsCurrentVersion}"
|
||||
Classes="accent"
|
||||
Width="80"
|
||||
Command="{CompiledBinding Install}"
|
||||
IsEnabled="{CompiledBinding IncompatibilityReason, Converter={x:Static ObjectConverters.IsNull}}">
|
||||
Install
|
||||
</Button>
|
||||
<StackPanel IsVisible="{CompiledBinding IsCurrentVersion}" Orientation="Horizontal" Spacing="10">
|
||||
|
||||
@ -7,6 +7,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.UI.Extensions;
|
||||
using Artemis.UI.Screens.Workshop.EntryReleases.Dialogs;
|
||||
using Artemis.UI.Services.Interfaces;
|
||||
using Artemis.UI.Shared;
|
||||
@ -38,6 +39,7 @@ public partial class EntryReleaseInfoViewModel : ActivatableViewModelBase
|
||||
[Notify] private bool _isCurrentVersion;
|
||||
[Notify] private bool _installationInProgress;
|
||||
[Notify] private bool _inDetailsScreen;
|
||||
[Notify] private string? _incompatibilityReason;
|
||||
|
||||
private CancellationTokenSource? _cts;
|
||||
|
||||
@ -67,9 +69,11 @@ public partial class EntryReleaseInfoViewModel : ActivatableViewModelBase
|
||||
}).DisposeWith(d);
|
||||
|
||||
IsCurrentVersion = Release != null && _workshopService.GetInstalledEntry(Release.Entry.Id)?.ReleaseId == Release.Id;
|
||||
IncompatibilityReason = Release != null && !Release.IsCompatible() ? $"Requires Artemis v{Version.FromLong(Release.MinimumVersion!.Value)} or later" : null;
|
||||
});
|
||||
|
||||
this.WhenAnyValue(vm => vm.Release).Subscribe(r => IsCurrentVersion = r != null && _workshopService.GetInstalledEntry(r.Entry.Id)?.ReleaseId == r.Id);
|
||||
this.WhenAnyValue(vm => vm.Release).Subscribe(r => IncompatibilityReason = r != null && !r.IsCompatible() ? $"Requires Artemis v{Version.FromLong(r.MinimumVersion!.Value)} or later" : null);
|
||||
|
||||
InDetailsScreen = true;
|
||||
}
|
||||
@ -131,7 +135,17 @@ public partial class EntryReleaseInfoViewModel : ActivatableViewModelBase
|
||||
}
|
||||
else if (!_cts.IsCancellationRequested)
|
||||
{
|
||||
_notificationService.CreateNotification().WithTitle("Installation failed").WithMessage(result.Message).WithSeverity(NotificationSeverity.Error).Show();
|
||||
if (result.Exception != null)
|
||||
{
|
||||
// Not taking the fall on this one :')
|
||||
_windowService.ShowExceptionDialog(
|
||||
"Failed to install workshop entry",
|
||||
result.Exception,
|
||||
"Make sure the entry is compatible with this version of Artemis or reach out to the author for support."
|
||||
);
|
||||
}
|
||||
else
|
||||
await _windowService.ShowConfirmContentDialog("Failed to install workshop entry", result.Message ?? "Unknown error", "Close", null);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@ -30,5 +30,6 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<avalonia:MaterialIcon Classes="status-icon" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" Kind="CheckCircle" ToolTip.Tip="Current version" IsVisible="{CompiledBinding IsCurrentVersion}" />
|
||||
<avalonia:MaterialIcon Classes="status-icon" Foreground="#DAA520" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" Kind="Alert" ToolTip.Tip="{CompiledBinding IncompatibilityReason}" IsVisible="{CompiledBinding IncompatibilityReason, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
using System.Reactive.Disposables;
|
||||
using System;
|
||||
using System.Reactive.Disposables;
|
||||
using System.Reactive.Disposables.Fluent;
|
||||
using Artemis.UI.Extensions;
|
||||
using Artemis.UI.Shared;
|
||||
using Artemis.WebClient.Workshop;
|
||||
using Artemis.WebClient.Workshop.Models;
|
||||
@ -13,7 +15,9 @@ public partial class EntryReleaseItemViewModel : ActivatableViewModelBase
|
||||
{
|
||||
private readonly IWorkshopService _workshopService;
|
||||
private readonly IEntryDetails _entry;
|
||||
|
||||
[Notify] private bool _isCurrentVersion;
|
||||
[Notify] private string? _incompatibilityReason;
|
||||
|
||||
public EntryReleaseItemViewModel(IWorkshopService workshopService, IEntryDetails entry, IRelease release)
|
||||
{
|
||||
@ -33,6 +37,7 @@ public partial class EntryReleaseItemViewModel : ActivatableViewModelBase
|
||||
}).DisposeWith(d);
|
||||
|
||||
IsCurrentVersion = _workshopService.GetInstalledEntry(_entry.Id)?.ReleaseId == Release.Id;
|
||||
IncompatibilityReason = !Release.IsCompatible() ? $"Requires Artemis v{Version.FromLong(Release.MinimumVersion!.Value)} or later" : null;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -24,22 +24,32 @@
|
||||
<Button Command="{CompiledBinding Browse}" Margin="0 20">Browse file</Button>
|
||||
</StackPanel>
|
||||
<Border Grid.Row="1" Classes="card" ClipToBounds="True" IsVisible="{CompiledBinding SelectedPlugin, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<Grid RowDefinitions="30,30,30,30,Auto" ColumnDefinitions="200,Auto">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" FontWeight="SemiBold">Path</TextBlock>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="{CompiledBinding Path}"></TextBlock>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" FontWeight="SemiBold">Name</TextBlock>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Name}"></TextBlock>
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" FontWeight="SemiBold">Description</TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Description}"></TextBlock>
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" FontWeight="SemiBold">Main entry point</TextBlock>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Main}"></TextBlock>
|
||||
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" FontWeight="SemiBold">Version</TextBlock>
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Version}"></TextBlock>
|
||||
<StackPanel Orientation="Vertical" Spacing="5">
|
||||
<Grid ColumnDefinitions="200,*">
|
||||
<TextBlock Grid.Column="0" FontWeight="SemiBold">Path</TextBlock>
|
||||
<TextBlock Grid.Column="1" Text="{CompiledBinding Path}" TextWrapping="Wrap"></TextBlock>
|
||||
</Grid>
|
||||
<Grid ColumnDefinitions="200,*">
|
||||
<TextBlock Grid.Column="0" FontWeight="SemiBold">Name</TextBlock>
|
||||
<TextBlock Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Name}" TextWrapping="Wrap"></TextBlock>
|
||||
</Grid>
|
||||
<Grid ColumnDefinitions="200,*">
|
||||
<TextBlock Grid.Column="0" FontWeight="SemiBold">Description</TextBlock>
|
||||
<TextBlock Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Description}" TextWrapping="Wrap"></TextBlock>
|
||||
</Grid>
|
||||
<Grid ColumnDefinitions="200,*">
|
||||
<TextBlock Grid.Column="0" FontWeight="SemiBold">Main entry point</TextBlock>
|
||||
<TextBlock Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Main}" TextWrapping="Wrap"></TextBlock>
|
||||
</Grid>
|
||||
<Grid ColumnDefinitions="200,*">
|
||||
<TextBlock Grid.Column="0" FontWeight="SemiBold">Version</TextBlock>
|
||||
<TextBlock Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Version}" TextWrapping="Wrap"></TextBlock>
|
||||
</Grid>
|
||||
<Grid ColumnDefinitions="200,*" IsVisible="{CompiledBinding SelectedPlugin.MinimumVersion, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<TextBlock Grid.Column="0" FontWeight="SemiBold">Min. Artemis version</TextBlock>
|
||||
<TextBlock Grid.Column="1" Text="{CompiledBinding SelectedPlugin.MinimumVersion}" TextWrapping="Wrap"></TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.UI.Extensions;
|
||||
using Artemis.UI.Services.Interfaces;
|
||||
using Artemis.UI.Shared.Utilities;
|
||||
using Artemis.WebClient.Workshop;
|
||||
@ -69,6 +70,12 @@ public class WorkshopUpdateService : IWorkshopUpdateService
|
||||
if (latestRelease.Id == installedEntry.ReleaseId)
|
||||
return false;
|
||||
|
||||
if (!latestRelease.IsCompatible())
|
||||
{
|
||||
_logger.Information("Skipping auto-update of entry {Entry} because it requires a newer version of Artemis ({RequiredVersion})", entry, latestRelease.MinimumVersion);
|
||||
return false;
|
||||
}
|
||||
|
||||
_logger.Information("Auto-updating entry {Entry} to version {Version}", entry, latestRelease.Version);
|
||||
EntryInstallResult updateResult = await _workshopService.InstallEntry(entry, latestRelease, new Progress<StreamProgress>(), CancellationToken.None);
|
||||
|
||||
|
||||
@ -15,6 +15,11 @@ public class EntryInstallResult
|
||||
/// </summary>
|
||||
public string? Message { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets an exception thrown during the installation process, if any.
|
||||
/// </summary>
|
||||
public Exception? Exception { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the entry that was installed, if any.
|
||||
/// </summary>
|
||||
@ -35,6 +40,16 @@ public class EntryInstallResult
|
||||
};
|
||||
}
|
||||
|
||||
public static EntryInstallResult FromException(Exception exception)
|
||||
{
|
||||
return new EntryInstallResult
|
||||
{
|
||||
IsSuccess = false,
|
||||
Message = exception.Message,
|
||||
Exception = exception
|
||||
};
|
||||
}
|
||||
|
||||
public static EntryInstallResult FromSuccess(InstalledEntry installedEntry, object? result)
|
||||
{
|
||||
return new EntryInstallResult
|
||||
|
||||
@ -37,7 +37,7 @@ public class LayoutEntryInstallationHandler : IEntryInstallationHandler
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return EntryInstallResult.FromFailure(e.Message);
|
||||
return EntryInstallResult.FromException(e);
|
||||
}
|
||||
|
||||
// Ensure there is an installed entry
|
||||
|
||||
@ -51,7 +51,7 @@ public class PluginEntryInstallationHandler : IEntryInstallationHandler
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return EntryInstallResult.FromFailure(e.Message);
|
||||
return EntryInstallResult.FromException(e);
|
||||
}
|
||||
|
||||
// Create the release directory
|
||||
@ -102,8 +102,9 @@ public class PluginEntryInstallationHandler : IEntryInstallationHandler
|
||||
// ignored, will get cleaned up as an orphaned file
|
||||
}
|
||||
|
||||
if (installedEntry.Entity.Id != Guid.Empty)
|
||||
_workshopService.RemoveInstalledEntry(installedEntry);
|
||||
return EntryInstallResult.FromFailure(e.Message);
|
||||
return EntryInstallResult.FromException(e);
|
||||
}
|
||||
|
||||
return ApplyAndSave(plugin, installedEntry, release);
|
||||
|
||||
@ -32,7 +32,7 @@ public class ProfileEntryInstallationHandler : IEntryInstallationHandler
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return EntryInstallResult.FromFailure(e.Message);
|
||||
return EntryInstallResult.FromException(e);
|
||||
}
|
||||
|
||||
// Find existing installation to potentially replace the profile
|
||||
|
||||
@ -79,6 +79,7 @@ fragment entryDetails on Entry {
|
||||
fragment release on Release {
|
||||
id
|
||||
version
|
||||
minimumVersion
|
||||
downloadSize
|
||||
md5Hash
|
||||
createdAt
|
||||
|
||||
@ -138,8 +138,6 @@ type PluginInfo {
|
||||
entryId: Long!
|
||||
entry: Entry!
|
||||
pluginGuid: UUID!
|
||||
api: Int
|
||||
minmumVersion: String
|
||||
website: String
|
||||
helpPage: String
|
||||
repository: String
|
||||
@ -253,6 +251,7 @@ type Release {
|
||||
downloads: Long!
|
||||
downloadSize: Long!
|
||||
md5Hash: String
|
||||
minimumVersion: Long
|
||||
entry: Entry!
|
||||
entryId: Long!
|
||||
dependencies: [Entry!]!
|
||||
@ -532,8 +531,6 @@ input PluginInfoFilterInput {
|
||||
entryId: LongOperationFilterInput
|
||||
entry: EntryFilterInput
|
||||
pluginGuid: UuidOperationFilterInput
|
||||
api: IntOperationFilterInput
|
||||
minmumVersion: StringOperationFilterInput
|
||||
website: StringOperationFilterInput
|
||||
helpPage: StringOperationFilterInput
|
||||
repository: StringOperationFilterInput
|
||||
@ -547,8 +544,6 @@ input PluginInfoSortInput {
|
||||
entryId: SortEnumType @cost(weight: "10")
|
||||
entry: EntrySortInput @cost(weight: "10")
|
||||
pluginGuid: SortEnumType @cost(weight: "10")
|
||||
api: SortEnumType @cost(weight: "10")
|
||||
minmumVersion: SortEnumType @cost(weight: "10")
|
||||
website: SortEnumType @cost(weight: "10")
|
||||
helpPage: SortEnumType @cost(weight: "10")
|
||||
repository: SortEnumType @cost(weight: "10")
|
||||
@ -575,6 +570,7 @@ input ReleaseFilterInput {
|
||||
downloads: LongOperationFilterInput
|
||||
downloadSize: LongOperationFilterInput
|
||||
md5Hash: StringOperationFilterInput
|
||||
minimumVersion: LongOperationFilterInput
|
||||
entry: EntryFilterInput
|
||||
entryId: LongOperationFilterInput
|
||||
dependencies: ListFilterInputTypeOfEntryFilterInput
|
||||
@ -588,6 +584,7 @@ input ReleaseSortInput {
|
||||
downloads: SortEnumType @cost(weight: "10")
|
||||
downloadSize: SortEnumType @cost(weight: "10")
|
||||
md5Hash: SortEnumType @cost(weight: "10")
|
||||
minimumVersion: SortEnumType @cost(weight: "10")
|
||||
entry: EntrySortInput @cost(weight: "10")
|
||||
entryId: SortEnumType @cost(weight: "10")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user