From a1da63984b5cdcd77e3ef696e00f8640d46ea069 Mon Sep 17 00:00:00 2001 From: EzioTheDeadPoet <52624146+EzioTheDeadPoet@users.noreply.github.com> Date: Tue, 28 May 2024 18:41:18 +0200 Subject: [PATCH 1/4] update dependency --- Wabbajack.CLI/Wabbajack.CLI.csproj | 2 +- .../Wabbajack.Hashing.PHash.Test.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Wabbajack.CLI/Wabbajack.CLI.csproj b/Wabbajack.CLI/Wabbajack.CLI.csproj index f3af5d29..2f289c5f 100644 --- a/Wabbajack.CLI/Wabbajack.CLI.csproj +++ b/Wabbajack.CLI/Wabbajack.CLI.csproj @@ -25,7 +25,7 @@ - + diff --git a/Wabbajack.Hashing.PHash.Test/Wabbajack.Hashing.PHash.Test.csproj b/Wabbajack.Hashing.PHash.Test/Wabbajack.Hashing.PHash.Test.csproj index da6b6c5c..34fd44db 100644 --- a/Wabbajack.Hashing.PHash.Test/Wabbajack.Hashing.PHash.Test.csproj +++ b/Wabbajack.Hashing.PHash.Test/Wabbajack.Hashing.PHash.Test.csproj @@ -14,7 +14,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive From 12409ababbeabab97f57d995c2c8e68d5feb9247 Mon Sep 17 00:00:00 2001 From: EzioTheDeadPoet <52624146+EzioTheDeadPoet@users.noreply.github.com> Date: Tue, 28 May 2024 18:45:03 +0200 Subject: [PATCH 2/4] refactor interface name to the naming convention for interfaces --- Wabbajack.CLI/Verbs/SetNexusApiKey.cs | 14 ++++---------- Wabbajack.Networking.NexusApi/AuthInfo.cs | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Wabbajack.CLI/Verbs/SetNexusApiKey.cs b/Wabbajack.CLI/Verbs/SetNexusApiKey.cs index 95775d7f..a6657644 100644 --- a/Wabbajack.CLI/Verbs/SetNexusApiKey.cs +++ b/Wabbajack.CLI/Verbs/SetNexusApiKey.cs @@ -1,29 +1,23 @@ - -using System.CommandLine; -using System.CommandLine.Invocation; -using System.CommandLine.NamingConventionBinder; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Wabbajack.CLI.Builder; using Wabbajack.DTOs.Logins; -using Wabbajack.Paths; -using Wabbajack.Paths.IO; using Wabbajack.Services.OSIntegrated; namespace Wabbajack.CLI.Verbs; public class SetNexusApiKey { - private readonly EncryptedJsonTokenProvider _tokenProvider; + private readonly EncryptedJsonTokenProvider _tokenProvider; private readonly ILogger _logger; - public SetNexusApiKey(EncryptedJsonTokenProvider tokenProvider, ILogger logger) + public SetNexusApiKey(EncryptedJsonTokenProvider tokenProvider, ILogger logger) { _tokenProvider = tokenProvider; _logger = logger; } - public static VerbDefinition Definition = new VerbDefinition("set-nexus-api-key", + public static VerbDefinition Definition = new("set-nexus-api-key", "Sets the Nexus API key to the specified value", [ new OptionDefinition(typeof(string), "k", "key", "The Nexus API key") @@ -38,7 +32,7 @@ public class SetNexusApiKey } else { - await _tokenProvider.SetToken(new NexusApiState { ApiKey = key }); + await _tokenProvider.SetToken(new() { ApiKey = key }); _logger.LogInformation("Set Nexus API Key to {key}", key); return 0; } diff --git a/Wabbajack.Networking.NexusApi/AuthInfo.cs b/Wabbajack.Networking.NexusApi/AuthInfo.cs index fa25d3f8..7699e1b4 100644 --- a/Wabbajack.Networking.NexusApi/AuthInfo.cs +++ b/Wabbajack.Networking.NexusApi/AuthInfo.cs @@ -3,6 +3,6 @@ using Wabbajack.Networking.Http.Interfaces; namespace Wabbajack.Networking.NexusApi; -public interface AuthInfo : ITokenProvider +public interface IAuthInfo : ITokenProvider { } \ No newline at end of file From 1b949b538a291ea66a745cbc5d7ac0c757b5ed4d Mon Sep 17 00:00:00 2001 From: EzioTheDeadPoet <52624146+EzioTheDeadPoet@users.noreply.github.com> Date: Tue, 28 May 2024 18:46:47 +0200 Subject: [PATCH 3/4] fix SetNexusApiKey CLI command --- .../TokenProviders/NexusApiTokenProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Wabbajack.Services.OSIntegrated/TokenProviders/NexusApiTokenProvider.cs b/Wabbajack.Services.OSIntegrated/TokenProviders/NexusApiTokenProvider.cs index 03302585..0556a4fa 100644 --- a/Wabbajack.Services.OSIntegrated/TokenProviders/NexusApiTokenProvider.cs +++ b/Wabbajack.Services.OSIntegrated/TokenProviders/NexusApiTokenProvider.cs @@ -5,7 +5,7 @@ using Wabbajack.Networking.NexusApi; namespace Wabbajack.Services.OSIntegrated.TokenProviders; -public class NexusApiTokenProvider : EncryptedJsonTokenProvider, AuthInfo +public class NexusApiTokenProvider : EncryptedJsonTokenProvider, IAuthInfo { public NexusApiTokenProvider(ILogger logger, DTOSerializer dtos) : base(logger, dtos, "nexus-oauth-info") From 720a3b1f45b7e3edbf0e4555668e2236f2a92585 Mon Sep 17 00:00:00 2001 From: EzioTheDeadPoet <52624146+EzioTheDeadPoet@users.noreply.github.com> Date: Tue, 28 May 2024 19:20:09 +0200 Subject: [PATCH 4/4] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f72ca7b..b777d46d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ### Changelog +#### Version - 3.6.1.1 - TBD +* Fixed `set-nexus-api-key` CLI command + #### Version - 3.6.1.0 - 5/26/2024 * Fixed a race condition on renewing Nexus Mods OAuth2 tokens * Added `set-nexus-api-key` CLI command