@@ -106,7 +106,7 @@ internal static async Task<int> RunValidateStandaloneAsync(string[] args)
106106
107107 using var loggerFactory = LoggerFactory . Create ( builder =>
108108 {
109- builder
109+ _ = builder
110110 . SetMinimumLevel ( LogLevel . Information )
111111 . AddConsole ( consoleOptions =>
112112 {
@@ -215,17 +215,9 @@ private async Task DownloadConfigAsync(string configId, OutputFormat outputForma
215215 {
216216 try
217217 {
218- var appFolder = ProxyUtils . AppFolder ;
219- if ( string . IsNullOrEmpty ( appFolder ) || ! Directory . Exists ( appFolder ) )
220- {
221- if ( outputFormat == OutputFormat . Text )
222- {
223- _logger . LogError ( "App folder {AppFolder} not found" , appFolder ) ;
224- }
225- return ;
226- }
218+ var dataFolder = ProxyUtils . DataFolder ;
227219
228- var configFolderPath = Path . Combine ( appFolder , "config " ) ;
220+ var configFolderPath = Path . Combine ( dataFolder , "configs " ) ;
229221 _logger . LogDebug ( "Checking if config folder {ConfigFolderPath} exists..." , configFolderPath ) ;
230222 if ( ! Directory . Exists ( configFolderPath ) )
231223 {
@@ -235,7 +227,7 @@ private async Task DownloadConfigAsync(string configId, OutputFormat outputForma
235227 }
236228
237229 _logger . LogDebug ( "Getting target folder path for config {ConfigId}..." , configId ) ;
238- var targetFolderPath = GetTargetFolderPath ( appFolder , configId ) ;
230+ var targetFolderPath = GetTargetFolderPath ( dataFolder , configId ) ;
239231 _logger . LogDebug ( "Creating target folder {TargetFolderPath}..." , targetFolderPath ) ;
240232 _ = Directory . CreateDirectory ( targetFolderPath ) ;
241233
@@ -287,7 +279,7 @@ private async Task DownloadConfigAsync(string configId, OutputFormat outputForma
287279 {
288280 if ( _logger . IsEnabled ( LogLevel . Information ) )
289281 {
290- _logger . LogInformation ( " devproxy --config-file \" {ConfigFile}\" " , configFile . Replace ( appFolder , "~appFolder " , StringComparison . OrdinalIgnoreCase ) ) ;
282+ _logger . LogInformation ( " devproxy --config-file \" {ConfigFile}\" " , configFile . Replace ( dataFolder , "~dataFolder " , StringComparison . OrdinalIgnoreCase ) ) ;
291283 }
292284 }
293285 }
@@ -298,7 +290,7 @@ private async Task DownloadConfigAsync(string configId, OutputFormat outputForma
298290 {
299291 if ( _logger . IsEnabled ( LogLevel . Information ) )
300292 {
301- _logger . LogInformation ( " devproxy --mock-file \" {MockFile}\" " , mockFile . Replace ( appFolder , "~appFolder " , StringComparison . OrdinalIgnoreCase ) ) ;
293+ _logger . LogInformation ( " devproxy --mock-file \" {MockFile}\" " , mockFile . Replace ( dataFolder , "~dataFolder " , StringComparison . OrdinalIgnoreCase ) ) ;
302294 }
303295 }
304296 }
@@ -332,13 +324,13 @@ private ProxyConfigInfo GetConfigInfo(string configFolder)
332324 var configInfo = new ProxyConfigInfo ( ) ;
333325
334326 _logger . LogDebug ( "Getting list of config files in {ConfigFolder}..." , configFolder ) ;
335-
327+
336328 // Get both JSON and YAML files
337329 var jsonFiles = Directory . GetFiles ( configFolder , "*.json" ) ;
338330 var yamlFiles = Directory . GetFiles ( configFolder , "*.yaml" ) ;
339331 var ymlFiles = Directory . GetFiles ( configFolder , "*.yml" ) ;
340332 var allConfigFiles = jsonFiles . Concat ( yamlFiles ) . Concat ( ymlFiles ) . ToArray ( ) ;
341-
333+
342334 if ( allConfigFiles . Length == 0 )
343335 {
344336 _logger . LogDebug ( "No config files found" ) ;
@@ -350,7 +342,7 @@ private ProxyConfigInfo GetConfigInfo(string configFolder)
350342 _logger . LogDebug ( "Reading file {ConfigFile}..." , configFile ) ;
351343
352344 var fileContents = File . ReadAllText ( configFile ) ;
353-
345+
354346 // Check for plugins marker (case-insensitive)
355347 // For JSON: "plugins":
356348 // For YAML: plugins:
@@ -561,9 +553,9 @@ private string GetTargetFileName(string name)
561553 }
562554 }
563555
564- private static string GetTargetFolderPath ( string appFolder , string configId )
556+ private static string GetTargetFolderPath ( string dataFolder , string configId )
565557 {
566- var baseFolder = Path . Combine ( appFolder , "config " , configId ) ;
558+ var baseFolder = Path . Combine ( dataFolder , "configs " , configId ) ;
567559 var newFolder = baseFolder ;
568560 var i = 1 ;
569561 while ( Directory . Exists ( newFolder ) )
@@ -701,7 +693,7 @@ private static async Task<int> ValidateConfigCoreAsync(
701693 if ( configDoc . RootElement . TryGetProperty ( "plugins" , out var pluginsElement ) &&
702694 pluginsElement . ValueKind == JsonValueKind . Array )
703695 {
704- ValidatePlugins ( pluginsElement , configFileDirectory , errors , warnings , pluginNames ) ;
696+ ValidatePlugins ( pluginsElement , configFileDirectory , errors , pluginNames ) ;
705697 }
706698 else
707699 {
@@ -737,7 +729,6 @@ private static void ValidatePlugins(
737729 JsonElement pluginsElement ,
738730 string configFileDirectory ,
739731 List < ValidationMessage > errors ,
740- List < ValidationMessage > warnings ,
741732 List < string > pluginNames )
742733 {
743734 var hasEnabledPlugins = false ;
0 commit comments