From cb523eb9235eed194b9e31371413cdb595615696 Mon Sep 17 00:00:00 2001
From: Adrian Stevens <adrian.stevens@gmail.com>
Date: Sun, 16 Jun 2024 13:16:45 -0700
Subject: [PATCH 1/5] Bump version to 2.0.49

---
 Source/v2/Meadow.Cli/Meadow.CLI.csproj          | 2 +-
 Source/v2/Meadow.Cli/Properties/AssemblyInfo.cs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Source/v2/Meadow.Cli/Meadow.CLI.csproj b/Source/v2/Meadow.Cli/Meadow.CLI.csproj
index 8a9e0a82..def539a4 100644
--- a/Source/v2/Meadow.Cli/Meadow.CLI.csproj
+++ b/Source/v2/Meadow.Cli/Meadow.CLI.csproj
@@ -10,7 +10,7 @@
     <Authors>Wilderness Labs, Inc</Authors>
     <Company>Wilderness Labs, Inc</Company>
     <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
-    <PackageVersion>2.0.48.0</PackageVersion>
+    <PackageVersion>2.0.49.0</PackageVersion>
     <Platforms>AnyCPU</Platforms>
     <PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.CLI/</PackageProjectUrl>
     <RepositoryUrl>https://github.com/WildernessLabs/Meadow.CLI</RepositoryUrl>
diff --git a/Source/v2/Meadow.Cli/Properties/AssemblyInfo.cs b/Source/v2/Meadow.Cli/Properties/AssemblyInfo.cs
index 570d2eef..5976fd02 100644
--- a/Source/v2/Meadow.Cli/Properties/AssemblyInfo.cs
+++ b/Source/v2/Meadow.Cli/Properties/AssemblyInfo.cs
@@ -6,5 +6,5 @@ namespace Meadow.CLI;
 
 public static class Constants
 {
-    public const string CLI_VERSION = "2.0.48.0";
+    public const string CLI_VERSION = "2.0.49.0";
 }
\ No newline at end of file

From 191449119e0b6db8dec3f2194d3d4409670dc409 Mon Sep 17 00:00:00 2001
From: Adrian Stevens <adrian.stevens@gmail.com>
Date: Sun, 16 Jun 2024 13:17:01 -0700
Subject: [PATCH 2/5] Fix dfu install instructions

---
 Source/v2/Meadow.Dfu/DfuUtils.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Source/v2/Meadow.Dfu/DfuUtils.cs b/Source/v2/Meadow.Dfu/DfuUtils.cs
index c87566db..19f363ff 100644
--- a/Source/v2/Meadow.Dfu/DfuUtils.cs
+++ b/Source/v2/Meadow.Dfu/DfuUtils.cs
@@ -86,7 +86,7 @@ public static async Task<bool> FlashFile(string fileName, string? dfuSerialNumbe
         {
             if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
             {
-                logger.LogError("dfu-util not found - to install, run: `meadow install dfu-util` (may require administrator mode)");
+                logger.LogError("dfu-util not found - to install, run: `meadow dfu install` (may require administrator mode)");
             }
             else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
             {

From f1b9a219d0c1a760f1441b5fd6b44268930c3dc0 Mon Sep 17 00:00:00 2001
From: Adrian Stevens <adrian.stevens@gmail.com>
Date: Sun, 16 Jun 2024 13:17:42 -0700
Subject: [PATCH 3/5] Remove Debug.WriteLine

---
 Source/v2/Meadow.Hcom/Connections/SerialConnection.cs | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Source/v2/Meadow.Hcom/Connections/SerialConnection.cs b/Source/v2/Meadow.Hcom/Connections/SerialConnection.cs
index 76730f6f..20a3345f 100755
--- a/Source/v2/Meadow.Hcom/Connections/SerialConnection.cs
+++ b/Source/v2/Meadow.Hcom/Connections/SerialConnection.cs
@@ -1036,8 +1036,6 @@ void OnFileRetry(object? sender, EventArgs e)
         FileException += OnFileError;
         FileWriteFailed += OnFileRetry;
 
-        Debug.WriteLine($"Sending '{localFileName}'");
-
         EnqueueRequest(command);
 
         // this will wait for a "file write accepted" from the target

From 5464e5a8fbdae32f2aee549499416b4636034076 Mon Sep 17 00:00:00 2001
From: Adrian Stevens <adrian.stevens@gmail.com>
Date: Sun, 16 Jun 2024 13:18:17 -0700
Subject: [PATCH 4/5] Standardize output across commands

---
 .../Commands/Current/App/AppDeployCommand.cs          |  2 +-
 .../Meadow.Cli/Commands/Current/App/AppRunCommand.cs  |  2 +-
 .../Commands/Current/File/FileDeleteCommand.cs        | 11 +++++++++--
 .../Commands/Current/File/FileWriteCommand.cs         |  2 +-
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/Source/v2/Meadow.Cli/Commands/Current/App/AppDeployCommand.cs b/Source/v2/Meadow.Cli/Commands/Current/App/AppDeployCommand.cs
index a3b0c621..e10f0d9c 100644
--- a/Source/v2/Meadow.Cli/Commands/Current/App/AppDeployCommand.cs
+++ b/Source/v2/Meadow.Cli/Commands/Current/App/AppDeployCommand.cs
@@ -119,7 +119,7 @@ private void OnFileWriteProgress(object? sender, (string fileName, long complete
         if (!double.IsNaN(p))
         {
             // Console instead of Logger due to line breaking for progress bar
-            Console?.Output.Write($"Writing {e.fileName}: {p:0}%         \r");
+            Console?.Output.Write($"Writing  '{e.fileName}': {p:0}%         \r");
         }
     }
 }
\ No newline at end of file
diff --git a/Source/v2/Meadow.Cli/Commands/Current/App/AppRunCommand.cs b/Source/v2/Meadow.Cli/Commands/Current/App/AppRunCommand.cs
index 356ff0c0..72f4e9ca 100644
--- a/Source/v2/Meadow.Cli/Commands/Current/App/AppRunCommand.cs
+++ b/Source/v2/Meadow.Cli/Commands/Current/App/AppRunCommand.cs
@@ -130,7 +130,7 @@ private void OnFileWriteProgress(object? sender, (string fileName, long complete
 
         if (!double.IsNaN(p))
         {   // Console instead of Logger due to line breaking for progress bar
-            Console?.Output.Write($"Writing {e.fileName}: {p:0}%         \r");
+            Console?.Output.Write($"Writing  '{e.fileName}': {p:0}%         \r");
         }
     }
 
diff --git a/Source/v2/Meadow.Cli/Commands/Current/File/FileDeleteCommand.cs b/Source/v2/Meadow.Cli/Commands/Current/File/FileDeleteCommand.cs
index fdfc941f..6c36588f 100644
--- a/Source/v2/Meadow.Cli/Commands/Current/File/FileDeleteCommand.cs
+++ b/Source/v2/Meadow.Cli/Commands/Current/File/FileDeleteCommand.cs
@@ -27,7 +27,14 @@ protected override async ValueTask ExecuteCommand()
             await device.RuntimeDisable(CancellationToken);
         }
 
-        Logger?.LogInformation($"Looking for file {MeadowFile}...");
+        if (MeadowFile == "all")
+        {
+            Logger?.LogInformation($"Looking for files...");
+        }
+        else
+        {
+            Logger?.LogInformation($"Looking for file {MeadowFile}...");
+        }
 
         var folder = AppTools.SanitizeMeadowFolderName(Path.GetDirectoryName(MeadowFile)!);
 
@@ -60,7 +67,7 @@ protected override async ValueTask ExecuteCommand()
             }
             else
             {
-                Logger?.LogInformation($"Deleting file '{file}' from device...");
+                Logger?.LogInformation($"Deleting '{file}'");
                 await device.DeleteFile(file, CancellationToken);
             }
         }
diff --git a/Source/v2/Meadow.Cli/Commands/Current/File/FileWriteCommand.cs b/Source/v2/Meadow.Cli/Commands/Current/File/FileWriteCommand.cs
index 196bd2c0..cb6c7872 100644
--- a/Source/v2/Meadow.Cli/Commands/Current/File/FileWriteCommand.cs
+++ b/Source/v2/Meadow.Cli/Commands/Current/File/FileWriteCommand.cs
@@ -51,7 +51,7 @@ protected override async ValueTask ExecuteCommand()
             if (!double.IsNaN(p))
             {
                 // Console instead of Logger due to line breaking for progress bar
-                Console?.Output.Write($"Writing {e.fileName}: {p:0}%     \r");
+                Console?.Output.Write($"Writing  '{e.fileName}': {p:0}%     \r");
             }
         };
 

From c5d062259ec83e8b05014c72cad66fba8bc1e2e3 Mon Sep 17 00:00:00 2001
From: Adrian Stevens <adrian.stevens@gmail.com>
Date: Sun, 16 Jun 2024 13:18:43 -0700
Subject: [PATCH 5/5] Pad Sending file message to overwrite previous percentage
 values written to console

---
 Source/v2/Meadow.Tooling.Core/App/AppManager.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Source/v2/Meadow.Tooling.Core/App/AppManager.cs b/Source/v2/Meadow.Tooling.Core/App/AppManager.cs
index d8cf0e79..a08b74b0 100644
--- a/Source/v2/Meadow.Tooling.Core/App/AppManager.cs
+++ b/Source/v2/Meadow.Tooling.Core/App/AppManager.cs
@@ -168,7 +168,7 @@ public static async Task DeployApplication(
                 }
             }
 
-            logger?.LogInformation($"Sending  '{Path.GetFileName(localFile.Key)}'");
+            logger?.LogInformation($"Sending  '{Path.GetFileName(localFile.Key)}'".PadRight(80));
         send_file:
 
             if (!await connection.WriteFile(localFile.Key, meadowFilename, cancellationToken))