feat(uploader): settings, DPAPI token, single instance and startup registration
uploader.json (server, user, DPAPI CurrentUser-protected token, trusted fingerprints, options, watch folders) written atomically; command line (paths, --tray, --capture); named mutex plus a current-user named pipe that hands a second launch's paths to the running instance; HKCU Run key for "Start with Windows"; coalescing background writer for state files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
10 files changed
+540
No files matched your search
@@ -0,0 +1,18 @@
|
||||
using System.IO;
|
||||
using Titano.Testing;
|
||||
using Titano.Uploader.Infrastructure;
|
||||
|
||||
namespace Titano.App.Tests.Uploader;
|
||||
|
||||
public sealed class CoalescingWriterTests(TestContext context)
|
||||
{
|
||||
[Test]
|
||||
public void KeepsTheNewestContent()
|
||||
{
|
||||
var path = Path.Combine(context.CreateTempDirectory(), "uploader-queue.json");
|
||||
var writer = new CoalescingWriter();
|
||||
for (var i = 0; i < 50; i++) writer.Write(path, [(byte)i]);
|
||||
writer.Flush(TimeSpan.FromSeconds(10));
|
||||
Assert.SequenceEqual([(byte)49], File.ReadAllBytes(path));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user