summary refs log tree commit diff
path: root/ReferenceClientProxyImplementation/Configuration
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ReferenceClientProxyImplementation/Configuration/AssetCacheConfig.cs15
-rw-r--r--ReferenceClientProxyImplementation/Configuration/ProxyConfiguration.cs8
-rw-r--r--ReferenceClientProxyImplementation/Configuration/TestClientConfig.cs13
-rw-r--r--ReferenceClientProxyImplementation/Configuration/TestClientDebug.cs7
-rw-r--r--ReferenceClientProxyImplementation/Configuration/TestClientPatchOptions.cs7
5 files changed, 50 insertions, 0 deletions
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<List<string>> 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<string, object> 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