Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
ebdfa06
Add forwarder commands
liammclennan Feb 28, 2024
8d4bcca
Conditional compilation
liammclennan Feb 28, 2024
d1ab1cd
Change casing of compilation symbols
liammclennan Feb 29, 2024
dabd5ff
Merge pull request #320 from liammclennan/forwarder-api
KodrAus Feb 29, 2024
6494bbf
Add forwarder config
liammclennan Feb 29, 2024
3684126
Move forwarder config to forwarder.
liammclennan Feb 29, 2024
a0e05c7
Rename configs
liammclennan Feb 29, 2024
5d7d9cb
Moved forwarder configs to directory
liammclennan Feb 29, 2024
561a5b1
Cleanup project file
liammclennan Feb 29, 2024
29d904f
Merge pull request #321 from liammclennan/forwarder-config
liammclennan Feb 29, 2024
f828da6
Import existing Seq Forwarder codebase
nblumhardt Feb 29, 2024
18f61f3
Merge branch 'feature/forwarder' of https://github.com/datalust/seqcl…
nblumhardt Feb 29, 2024
8940fed
Merge pull request #322 from nblumhardt/merge-seq-fwd
KodrAus Feb 29, 2024
2f36592
stub out encryption config
KodrAus Feb 29, 2024
6877c1f
get things building on windows
KodrAus Feb 29, 2024
585a6a7
Merge pull request #323 from KodrAus/fix/win
nblumhardt Feb 29, 2024
b1178d7
Merge changes from upstream
nblumhardt Feb 29, 2024
e07420c
Adjust namespaces
nblumhardt Feb 29, 2024
517c96e
Collection expressions
nblumhardt Feb 29, 2024
a2221ba
Clean up code style
nblumhardt Feb 29, 2024
c9336e4
Merge pull request #324 from nblumhardt/post-merge-cleanup
KodrAus Feb 29, 2024
892a7e5
Improve some command wording
nblumhardt Feb 29, 2024
1fe4f47
Merge pull request #325 from nblumhardt/forwarder-command-descs
KodrAus Feb 29, 2024
d41378e
fix build on Windows
KodrAus Feb 29, 2024
3af21bb
Merge pull request #326 from KodrAus/fix/win2
KodrAus Feb 29, 2024
aa8d671
build on linux
liammclennan Mar 1, 2024
e448300
remove forwarder data protection in favor of seqcli
KodrAus Mar 1, 2024
d670753
get forwarder run command executing
KodrAus Mar 1, 2024
843c0c3
Merge pull request #327 from liammclennan/build-on-linux
KodrAus Mar 1, 2024
e00f8fc
Merge branch 'feature/forwarder' of https://github.com/datalust/seqcl…
KodrAus Mar 1, 2024
8f1a7c5
Merge pull request #328 from KodrAus/feat/enc-config
KodrAus Mar 1, 2024
4caf14b
Switch to minimal API
liammclennan Mar 1, 2024
ed17305
Merge branch 'feature/forwarder' of github.com:datalust/seqcli into r…
liammclennan Mar 1, 2024
4c4f90d
Fix build
liammclennan Mar 1, 2024
ef46a5f
ApiRoot endpoints
liammclennan Mar 1, 2024
cea428d
Remove MVC
liammclennan Mar 1, 2024
a942aeb
Improve registration
liammclennan Mar 1, 2024
4e1abdf
Merge pull request #329 from liammclennan/remove-mvc
KodrAus Mar 1, 2024
7d69c41
start replacing forwarder with seqcli infra
KodrAus Mar 1, 2024
e6875c4
fill in clef ingest
KodrAus Mar 3, 2024
15df479
Merge pull request #330 from KodrAus/feat/clef-ingest
nblumhardt Mar 3, 2024
dbc154d
Tidy up some shut-down logic
nblumhardt May 8, 2024
2841b68
Merge pull request #349 from nblumhardt/shut-down-tidy
nblumhardt May 8, 2024
353c7b0
Hide preview commands behind the --pre flag as Seq does
nblumhardt May 8, 2024
1292fbb
Merge pull request #350 from nblumhardt/pre-flag
nblumhardt May 8, 2024
856774f
Merge branch 'dev' of https://github.com/datalust/seqcli into tests-r…
nblumhardt May 8, 2024
18673f4
fix up build on Windows
KodrAus May 8, 2024
dc27108
add a durable buffer implementation for forwarder
KodrAus May 8, 2024
dc116bc
Fix tests
nblumhardt May 8, 2024
d39fe8c
Merge pull request #351 from nblumhardt/tests-running
KodrAus May 8, 2024
7b1f2f6
Merge branch 'feature/forwarder' of https://github.com/datalust/seqcl…
KodrAus May 8, 2024
aeb3b5f
fix up warnings in tests
KodrAus May 8, 2024
6ce99a4
remove extra csproj item
KodrAus May 8, 2024
cc8f67a
fix up windows build
KodrAus May 9, 2024
a8ba843
fix up tfms
KodrAus May 9, 2024
b8b6171
updates based on PR review
KodrAus May 10, 2024
c4eef46
Merge pull request #352 from KodrAus/feat/forwarder-storage
KodrAus May 10, 2024
cdaadf5
Merge branch 'dev' of https://github.com/datalust/seqcli into feature…
nblumhardt Jul 16, 2025
ad3a7c9
Simple hook-up of API to buffer writer
nblumhardt Jul 17, 2025
f79d435
Reorganize a little, get basic forwarding working
nblumhardt Jul 18, 2025
1c44383
Remove .DS_Store
nblumhardt Jul 18, 2025
1dd399d
Fix help --pre
nblumhardt Jul 18, 2025
3e12c35
Don't inject SeqCliConfig into CLI commands
nblumhardt Jul 18, 2025
10db929
Make connection factory static
nblumhardt Jul 18, 2025
70af0d6
Use --storage to infer internal log path
nblumhardt Jul 18, 2025
59a608e
Opt out of authentication when end-to-end testing
nblumhardt Jul 18, 2025
346e524
Opt out properly :-)
nblumhardt Jul 18, 2025
659501d
Third time lucky
nblumhardt Jul 18, 2025
7989014
Fix help text
nblumhardt Jul 18, 2025
6cbbf03
Make tests build
nblumhardt Jul 18, 2025
7df9fff
Drop unused dependency
nblumhardt Jul 18, 2025
bc82148
Fix print command
nblumhardt Jul 18, 2025
a60edea
Merge branch 'dev' of https://github.com/datalust/seqcli into feature…
nblumhardt Jul 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,5 @@ __pycache__/

# ci.global.json is used in CI; local builds are unconstrained
global.json

.DS_Store/
2 changes: 1 addition & 1 deletion build/Build.Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function Create-ArtifactDir

function Publish-Archives($version)
{
$rids = $([xml](Get-Content .\src\SeqCli\SeqCli.csproj)).Project.PropertyGroup.RuntimeIdentifiers.Split(';')
$rids = $([xml](Get-Content .\src\SeqCli\SeqCli.csproj)).Project.PropertyGroup.RuntimeIdentifiers[0].Split(';')
foreach ($rid in $rids) {
$tfm = $framework
if ($rid -eq "win-x64") {
Expand Down
1 change: 0 additions & 1 deletion seqcli.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{3587B633-0
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "asset", "asset", "{438A0DA5-F3CF-4FCE-B43A-B6DA2981D4AE}"
ProjectSection(SolutionItems) = preProject
asset\SeqCliLicense.rtf = asset\SeqCliLicense.rtf
asset\SeqCli.ico = asset\SeqCli.ico
asset\SeqCli.png = asset\SeqCli.png
EndProjectSection
Expand Down
5 changes: 5 additions & 0 deletions seqcli.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IO/@EntryIndexedValue">IO</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IP/@EntryIndexedValue">IP</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MS/@EntryIndexedValue">MS</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=apikey/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=appinstance/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -9,13 +11,15 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=cmds/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=command_0027s/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Datalust/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=decryptor/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=delim/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Enricher/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=enrichers/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=formattable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Gravatar/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=hackily/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mdash/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=nologo/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=n_0027est/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=retentionpolicies/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=retentionpolicy/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -32,4 +36,5 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Tokenizes/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=trailingindent/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unawaited/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unclosable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=xmpweb/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
12 changes: 6 additions & 6 deletions src/Roastery/Fake/Person.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public Person(string? name, string? address)
}

static readonly string[] Forenames =
{
[
"Akeem",
"Alice",
"Alok",
Expand All @@ -40,10 +40,10 @@ public Person(string? name, string? address)
"Yoshi",
"Zach",
"Zeynep"
};
];

static readonly string[] Surnames =
{
[
"Anderson",
"Alvarez",
"Brookes",
Expand All @@ -60,10 +60,10 @@ public Person(string? name, string? address)
"Smith",
"Xia",
"Zheng"
};
];

static readonly string[] Streets =
{
[
"Lilac Road",
"Lilly Street",
"Carnation Street",
Expand All @@ -78,7 +78,7 @@ public Person(string? name, string? address)
"Trillium Creek Parkway",
"Grevillea Street",
"Kurrajong Street"
};
];

public static Person Generate()
{
Expand Down
6 changes: 3 additions & 3 deletions src/Roastery/Web/FaultInjectionMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ public FaultInjectionMiddleware(ILogger logger, HttpServer next)
{
_logger = logger.ForContext<FaultInjectionMiddleware>();
_next = next;
_faults = new Func<HttpRequest, Task<HttpResponse>>[]
{
_faults =
[
Unauthorized,
Unauthorized,
Unauthorized,
Timeout,
Timeout,
Disposed
};
];
}

Task<HttpResponse> Unauthorized(HttpRequest request)
Expand Down
2 changes: 1 addition & 1 deletion src/Roastery/Web/Router.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Router(IEnumerable<Controller> controllers, ILogger logger)
{
using var _ = LogContext.PushProperty("Controller", controllerName);
using var __ = LogContext.PushProperty("Action", actionName);
return (Task<HttpResponse>) method.Invoke(controller, new object[] {r})!;
return (Task<HttpResponse>) method.Invoke(controller, [r])!;
});

_logger.Debug("Binding route HTTP {HttpMethod} {RouteTemplate} to action method {Controller}.{Action}()",
Expand Down
16 changes: 5 additions & 11 deletions src/SeqCli/Apps/Definitions/AppMetadataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,15 @@ static Dictionary<string, AppSettingDefinition> GetAvailableSettings(Type mainRe
});
}

static readonly HashSet<Type> IntegerTypes = new()
{
static readonly HashSet<Type> IntegerTypes =
[
typeof(short), typeof(ushort), typeof(int), typeof(uint),
typeof(long), typeof(ulong)
};
];

static readonly HashSet<Type> DecimalTypes = new()
{
typeof(float), typeof(double), typeof(decimal)
};
static readonly HashSet<Type> DecimalTypes = [typeof(float), typeof(double), typeof(decimal)];

static readonly HashSet<Type> BooleanTypes = new()
{
typeof(bool)
};
static readonly HashSet<Type> BooleanTypes = [typeof(bool)];

internal static AppSettingType GetSettingType(Type type)
{
Expand Down
2 changes: 1 addition & 1 deletion src/SeqCli/Apps/Hosting/AppContainer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright Datalust Pty Ltd and Contributors
// Copyright © Datalust Pty Ltd and Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/SeqCli/Cli/CommandAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public class CommandAttribute : Attribute, ICommandMetadata
public string Name { get; }
public string? SubCommand { get; }
public string HelpText { get; }

public string? Example { get; set; }
public bool IsPreview { get; set; }

public CommandAttribute(string name, string helpText)
{
Expand Down
21 changes: 14 additions & 7 deletions src/SeqCli/Cli/CommandLineHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,37 @@ public async Task<int> Run(string[] args, LoggingLevelSwitch levelSwitch)

if (args.Length > 0)
{
const string prereleaseArg = "--pre", verboseArg = "--verbose";

var norm = args[0].ToLowerInvariant();
var subCommandNorm = args.Length > 1 && !args[1].Contains('-') ? args[1].ToLowerInvariant() : null;


var pre = args.Any(a => a == prereleaseArg);

var cmd = _availableCommands.SingleOrDefault(c =>
c.Metadata.Name == norm && (c.Metadata.SubCommand == subCommandNorm || c.Metadata.SubCommand == null));
(!c.Metadata.IsPreview || pre) &&
c.Metadata.Name == norm &&
(c.Metadata.SubCommand == subCommandNorm || c.Metadata.SubCommand == null));

if (cmd != null)
{
var amountToSkip = cmd.Metadata.SubCommand == null ? 1 : 2;
var commandSpecificArgs = args.Skip(amountToSkip).ToArray();
var commandSpecificArgs = args.Skip(amountToSkip).Where(arg => cmd.Metadata.Name == "help" || arg != prereleaseArg).ToArray();

var verboseArg = commandSpecificArgs.FirstOrDefault(arg => arg == "--verbose");
if (verboseArg != null)
var verbose = commandSpecificArgs.Any(arg => arg == verboseArg);
if (verbose)
{
levelSwitch.MinimumLevel = LogEventLevel.Information;
commandSpecificArgs = commandSpecificArgs.Where(arg => arg != verboseArg).ToArray();
}

return await cmd.Value.Value.Invoke(commandSpecificArgs);
var impl = cmd.Value.Value;
return await impl.Invoke(commandSpecificArgs);
}
}

Console.WriteLine($"Usage: {name} <command> [<args>]");
Console.WriteLine($"Type `{name} help` for available commands");
return -1;
return 1;
}
}
3 changes: 2 additions & 1 deletion src/SeqCli/Cli/CommandMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ public class CommandMetadata : ICommandMetadata
public string? SubCommand { get; set; }
public required string HelpText { get; set; }
public string? Example { get; set; }
}
public bool IsPreview { get; set; }
}
26 changes: 14 additions & 12 deletions src/SeqCli/Cli/Commands/ApiKey/CreateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,17 @@ namespace SeqCli.Cli.Commands.ApiKey;
Example = "seqcli apikey create -t 'Test API Key' -p Environment=Test")]
class CreateCommand : Command
{
readonly SeqConnectionFactory _connectionFactory;

readonly ConnectionFeature _connection;
readonly PropertiesFeature _properties;
readonly OutputFormatFeature _output;
readonly StoragePathFeature _storagePath;

string? _title, _token, _filter, _level, _connectUsername, _connectPassword;
string[]? _permissions;
bool _useServerTimestamps, _connectPasswordStdin;

public CreateCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config)
public CreateCommand()
{
_connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));

Options.Add(
"t=|title=",
"A title for the API key",
Expand Down Expand Up @@ -94,12 +91,15 @@ public CreateCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config
_ => _connectPasswordStdin = true);

_connection = Enable<ConnectionFeature>();
_output = Enable(new OutputFormatFeature(config.Output));
_output = Enable<OutputFormatFeature>();
_storagePath = Enable<StoragePathFeature>();
}

protected override async Task<int> Run()
{
var connection = await TryConnectAsync();
var config = RuntimeConfigurationLoader.Load(_storagePath);

var connection = await TryConnectAsync(config);
if (connection == null)
return 1;

Expand Down Expand Up @@ -149,19 +149,21 @@ protected override async Task<int> Run()

apiKey = await connection.ApiKeys.AddAsync(apiKey);

if (_token == null && !_output.Json)
var output = _output.GetOutputFormat(config);

if (_token == null && !output.Json)
{
Console.WriteLine(apiKey.Token);
}
else
{
_output.WriteEntity(apiKey);
output.WriteEntity(apiKey);
}

return 0;
}

async Task<SeqConnection?> TryConnectAsync()
async Task<SeqConnection?> TryConnectAsync(SeqCliConfig config)
{
SeqConnection connection;
if (_connectUsername != null)
Expand All @@ -183,13 +185,13 @@ protected override async Task<int> Run()
_connectPassword = await Console.In.ReadLineAsync();
}

var (url, _) = _connectionFactory.GetConnectionDetails(_connection);
var (url, _) = SeqConnectionFactory.GetConnectionDetails(_connection, config);
connection = new SeqConnection(url);
await connection.Users.LoginAsync(_connectUsername, _connectPassword ?? "");
}
else
{
connection = _connectionFactory.Connect(_connection);
connection = SeqConnectionFactory.Connect(_connection, config);
}

return connection;
Expand Down
16 changes: 7 additions & 9 deletions src/SeqCli/Cli/Commands/ApiKey/ListCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,30 @@ namespace SeqCli.Cli.Commands.ApiKey;
[Command("apikey", "list", "List available API keys", Example="seqcli apikey list")]
class ListCommand : Command
{
readonly SeqConnectionFactory _connectionFactory;

readonly EntityIdentityFeature _entityIdentity;
readonly ConnectionFeature _connection;
readonly OutputFormatFeature _output;
readonly StoragePathFeature _storagePath;

public ListCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config)
public ListCommand()
{
if (config == null) throw new ArgumentNullException(nameof(config));
_connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));

_entityIdentity = Enable(new EntityIdentityFeature("API key", "list"));
_output = Enable(new OutputFormatFeature(config.Output));
_output = Enable<OutputFormatFeature>();
_storagePath = Enable<StoragePathFeature>();
_connection = Enable<ConnectionFeature>();
}

protected override async Task<int> Run()
{
var connection = _connectionFactory.Connect(_connection);
var config = RuntimeConfigurationLoader.Load(_storagePath);
var connection = SeqConnectionFactory.Connect(_connection, config);

var list = _entityIdentity.Id != null ?
new[] { await connection.ApiKeys.FindAsync(_entityIdentity.Id) } :
(await connection.ApiKeys.ListAsync())
.Where(ak => _entityIdentity.Title == null || _entityIdentity.Title == ak.Title);

_output.ListEntities(list);
_output.GetOutputFormat(config).ListEntities(list);

return 0;
}
Expand Down
16 changes: 8 additions & 8 deletions src/SeqCli/Cli/Commands/ApiKey/RemoveCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using System.Linq;
using System.Threading.Tasks;
using SeqCli.Cli.Features;
using SeqCli.Config;
using SeqCli.Connection;
using Serilog;

Expand All @@ -25,17 +26,15 @@ namespace SeqCli.Cli.Commands.ApiKey;
Example="seqcli apikey remove -t 'Test API Key'")]
class RemoveCommand : Command
{
readonly SeqConnectionFactory _connectionFactory;

readonly EntityIdentityFeature _entityIdentity;
readonly ConnectionFeature _connection;
readonly StoragePathFeature _storagePath;

public RemoveCommand(SeqConnectionFactory connectionFactory)
public RemoveCommand()
{
_connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));

_entityIdentity = Enable(new EntityIdentityFeature("API key", "remove"));
_connection = Enable<ConnectionFeature>();
_storagePath = Enable<StoragePathFeature>();
}

protected override async Task<int> Run()
Expand All @@ -46,10 +45,11 @@ protected override async Task<int> Run()
return 1;
}

var connection = _connectionFactory.Connect(_connection);
var config = RuntimeConfigurationLoader.Load(_storagePath);
var connection = SeqConnectionFactory.Connect(_connection, config);

var toRemove = _entityIdentity.Id != null ?
new[] {await connection.ApiKeys.FindAsync(_entityIdentity.Id)} :
var toRemove = _entityIdentity.Id != null ? [await connection.ApiKeys.FindAsync(_entityIdentity.Id)]
:
(await connection.ApiKeys.ListAsync())
.Where(ak => _entityIdentity.Title == ak.Title)
.ToArray();
Expand Down
4 changes: 2 additions & 2 deletions src/SeqCli/Cli/Commands/ApiKey/UpdateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ namespace SeqCli.Cli.Commands.ApiKey;
[Command("apikey", "update",
"Update an existing API key",
Example="seqcli apikey update --json '{...}'")]
class UpdateCommand(SeqConnectionFactory connectionFactory):
Shared.UpdateCommand(connectionFactory, "apikey", nameof(SeqConnection.ApiKeys), "API key");
class UpdateCommand():
Shared.UpdateCommand("apikey", nameof(SeqConnection.ApiKeys), "API key");

Loading