From 77a609758bb80bac9497d2e3988550f8be578407 Mon Sep 17 00:00:00 2001 From: Rory& Date: Mon, 23 Feb 2026 02:03:20 +0100 Subject: Initial commit --- .../Configuration/AssetCacheConfig.cs | 15 +++++++++++++++ .../Configuration/ProxyConfiguration.cs | 8 ++++++++ .../Configuration/TestClientConfig.cs | 13 +++++++++++++ .../Configuration/TestClientDebug.cs | 7 +++++++ .../Configuration/TestClientPatchOptions.cs | 7 +++++++ 5 files changed, 50 insertions(+) create mode 100644 ReferenceClientProxyImplementation/Configuration/AssetCacheConfig.cs create mode 100644 ReferenceClientProxyImplementation/Configuration/ProxyConfiguration.cs create mode 100644 ReferenceClientProxyImplementation/Configuration/TestClientConfig.cs create mode 100644 ReferenceClientProxyImplementation/Configuration/TestClientDebug.cs create mode 100644 ReferenceClientProxyImplementation/Configuration/TestClientPatchOptions.cs (limited to 'ReferenceClientProxyImplementation/Configuration') diff --git a/ReferenceClientProxyImplementation/Configuration/AssetCacheConfig.cs b/ReferenceClientProxyImplementation/Configuration/AssetCacheConfig.cs new file mode 100644 index 0000000..7360a0a --- /dev/null +++ b/ReferenceClientProxyImplementation/Configuration/AssetCacheConfig.cs @@ -0,0 +1,15 @@ +namespace ReferenceClientProxyImplementation.Configuration; + +public class AssetCacheConfig { + public bool MemoryCache { get; set; } = true; + public bool DiskCache { get; set; } = true; + public string DiskCachePath { get; set; } = "cache"; + public bool WipeOnStartup { get; set; } = false; + public string DiskCacheBaseDirectory { get; set; } = "./clientRepository"; + public List> ExecOnRevisionChange { get; set; } = []; + public bool DitchPatchedOnStartup { get; set; } = false; + public string BiomePath { get; set; } = "biome"; + public string PrettierPath { get; set; } = "prettier"; + + public string NodePath { get; set; } = "node"; +} \ No newline at end of file diff --git a/ReferenceClientProxyImplementation/Configuration/ProxyConfiguration.cs b/ReferenceClientProxyImplementation/Configuration/ProxyConfiguration.cs new file mode 100644 index 0000000..84afacd --- /dev/null +++ b/ReferenceClientProxyImplementation/Configuration/ProxyConfiguration.cs @@ -0,0 +1,8 @@ +namespace ReferenceClientProxyImplementation.Configuration; + +public class ProxyConfiguration { + public ProxyConfiguration(IConfiguration configuration) => configuration.GetRequiredSection("ProxyConfiguration").Bind(this); + + public TestClientConfig TestClient { get; set; } = new(); + public AssetCacheConfig AssetCache { get; set; } = new(); +} \ No newline at end of file diff --git a/ReferenceClientProxyImplementation/Configuration/TestClientConfig.cs b/ReferenceClientProxyImplementation/Configuration/TestClientConfig.cs new file mode 100644 index 0000000..1776eef --- /dev/null +++ b/ReferenceClientProxyImplementation/Configuration/TestClientConfig.cs @@ -0,0 +1,13 @@ +namespace ReferenceClientProxyImplementation.Configuration; + +public class TestClientConfig { + public TestClientDebug DebugOptions = new(); + public bool Enabled { get; set; } = true; + // public bool UseLatest = true; + public string Revision { get; set; } = "canary"; + public Dictionary GlobalEnv { get; set; } = new(); + + // internal + public string RevisionPath { get; set; } = null!; + public string RevisionBaseUrl { get; set; } = null!; +} \ No newline at end of file diff --git a/ReferenceClientProxyImplementation/Configuration/TestClientDebug.cs b/ReferenceClientProxyImplementation/Configuration/TestClientDebug.cs new file mode 100644 index 0000000..b7370b5 --- /dev/null +++ b/ReferenceClientProxyImplementation/Configuration/TestClientDebug.cs @@ -0,0 +1,7 @@ +namespace ReferenceClientProxyImplementation.Configuration; + +public class TestClientDebug { + public bool DumpWebsocketTraffic = false; + public bool DumpWebsocketTrafficToBrowserConsole = false; + public TestClientPatchOptions PatchOptions = new(); +} \ No newline at end of file diff --git a/ReferenceClientProxyImplementation/Configuration/TestClientPatchOptions.cs b/ReferenceClientProxyImplementation/Configuration/TestClientPatchOptions.cs new file mode 100644 index 0000000..e95dfa5 --- /dev/null +++ b/ReferenceClientProxyImplementation/Configuration/TestClientPatchOptions.cs @@ -0,0 +1,7 @@ +namespace ReferenceClientProxyImplementation.Configuration; + +public class TestClientPatchOptions { + public bool GatewayImmediateReconnect = false; + public bool GatewayPlaintext = true; + public bool NoXssWarning = true; +} \ No newline at end of file -- cgit 1.5.1