Skip to content

Commit ed4654d

Browse files
committed
Version 1.0.4.1
1 parent b4de71e commit ed4654d

File tree

57 files changed

+1188
-765
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1188
-765
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ You could see PowerCommands as your CLI application starter kit. It is a structu
33

44
[Follow progress on twitter](https://twitter.com/PowerCommands) <img src="https://github.com/PowerCommands/PowerCommands2022/blob/main/Docs/images/Twitter.png?raw=true" alt="drawing" width="20"/>
55

6+
## Version 1.0.4.1
7+
**Released 2025-01-21**
8+
- PowerCommandPrivacyAttribute to prevent sensitive data leak out to the logfile.
9+
- Improved dialog and toolbar service.
10+
- New function for deserialization of Yaml.
11+
- Improved ZipService.
12+
- Every PowerCommand implementation now has it´s own working folder.
13+
- Filter on dir command is now not case sensitive.
14+
- Nuget packages has been updated.
615
## Version 1.0.4.0
716
**Released 2024-12-12**
817
- Added a new `FileCommand` command to Read, Copy, Move, Delete files and show file properties.
@@ -13,7 +22,7 @@ You could see PowerCommands as your CLI application starter kit. It is a structu
1322
- Added the feature to `Commands` command to pickup and display diagnostics about the latest RunResult (if any) for a given command (by name).
1423
- Log view is now the default action instead of viewing log files
1524
- Improved `cd` and `dir` command, added som nice new features to them
16-
- All Nuget packages has been updated.
25+
- Nuget packages has been updated.
1726

1827
https://github.com/user-attachments/assets/b718cc18-2cbb-4812-b3a2-0d054e948a00
1928

Templates/PowerCommands.zip

33.2 KB
Binary file not shown.

Templates/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ I recommend you to use the option ```Place solution in the same directory``` som
1818
![Alt text](../Docs/images/VS_solution_option.png?raw=true "Command Base")
1919

2020
# What is new?
21+
## Version 1.0.4.1
22+
**Released 2025-01-21**
23+
- PowerCommandPrivacyAttribute to prevent sensitive data leak out to the logfile.
24+
- Improved dialog and toolbar service.
25+
- New function for deserialization of Yaml.
26+
- Improved ZipService.
27+
- Every PowerCommand implementation now has it´s own working folder.
28+
- Filter on dir command is now not case sensitive.
29+
- Nuget packages has been updated.
2130
## Version 1.0.4.0
2231
**Released 2024-12-12**
2332
- Added a new `FileCommand` command to Read, Copy, Move, Delete files and show file properties.

Templates/src/Core/PainKiller.PowerCommands.Configuration/DOMAINOBJECTS/ConfigurationGlobals.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22

33
public static class ConfigurationGlobals
44
{
5-
public const string Prompt = "pcm>";
5+
public const string ApplicationName = "PC";
66
public const string MainConfigurationFile = "PowerCommandsConfiguration.yaml";
77
public const string SecurityFileName = "security.yaml";
88
public const string WhatsNewFileName = "whats_new.md";
99
public const char ArraySplitter = '|';
1010
public const string SetupConfigurationFile = "setup.yaml";
1111
public const string EncryptionEnvironmentVariableName = "_encryptionManager";
1212

13-
public static readonly string ApplicationDataFolder = $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}\\{nameof(PowerCommands)}";
14-
public static readonly string MainConfigurationFileFullPath = Path.Combine(AppContext.BaseDirectory, MainConfigurationFile);
13+
public static readonly string ApplicationDataFolder = Path.Combine($"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}\\{nameof(PowerCommands)}", ApplicationName);
14+
public static readonly string EnvironmentVariableName = $"{nameof(PowerCommands)}_{ApplicationName}";
15+
16+
private static string _prompt = "pcm>";
17+
public static string GetPrompt() => _prompt;
18+
public static void SetPrompt(string prompt= "Clairvoyant>") => _prompt = prompt;
1519
}

Templates/src/Core/PainKiller.PowerCommands.Configuration/EXTENSIONS/ConfigurationExtension.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,11 @@ public static string GetPath(this ArtifactPathsConfiguration configuration, stri
2424
.Build();
2525
return serializer.Serialize(configuration);
2626
}
27+
public static T GetObjectFromYaml<T>(this string yaml) where T : new()
28+
{
29+
var serializer = new DeserializerBuilder()
30+
.WithNamingConvention(CamelCaseNamingConvention.Instance)
31+
.Build();
32+
return serializer.Deserialize<T>(yaml);
33+
}
2734
}

Templates/src/Core/PainKiller.PowerCommands.Configuration/PainKiller.PowerCommands.Configuration.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<LangVersion>12.0</LangVersion>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8-
<Version>1.0.4.0</Version>
8+
<Version>1.0.4.1</Version>
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="YamlDotNet" Version="16.2.1" />
12+
<PackageReference Include="YamlDotNet" Version="16.3.0" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

Templates/src/Core/PainKiller.PowerCommands.Core/COMMANDS/CdCommand.cs

Lines changed: 140 additions & 138 deletions
Large diffs are not rendered by default.

Templates/src/Core/PainKiller.PowerCommands.Core/COMMANDS/DirCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
namespace $safeprojectname$.Commands;
44

55
[PowerCommandDesign(description: "List the content of the working directory or this applications app directory, with the option to open the directory with the File explorer ",
6-
options: "!filter|browse|drive-info",
7-
example: "//List the content and open the current working directory|dir --open|//Open the AppData roaming directory|dir --app --open")]
6+
disableProxyOutput: true,
7+
options: "!filter|browse|drive-info",
8+
example: "//List the content and open the current working directory|dir --open|//Open the AppData roaming directory|dir --app --open")]
89
public class DirCommand(string identifier, CommandsConfiguration configuration) : CdCommand(identifier, configuration)
910
{
1011
public override RunResult Run()

Templates/src/Core/PainKiller.PowerCommands.Core/COMMANDS/FileCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private RunResult ReadFile(string path)
5656
private RunResult WritePreviousCommandResult()
5757
{
5858
var latestCommandResult = IPowerCommandsRuntime.DefaultInstance?.Latest;
59-
if (latestCommandResult == null) return BadParameterError("You must provide a valid file path as the first parameter (must be surrounded with quotation marks if filename contains whitespaces.");
59+
if (latestCommandResult == null) return BadParameterError("Could not fetch the latest command.");
6060
var inputs = latestCommandResult.Input.Raw.Split(' ');
6161
var path = inputs[1].Contains("\"") ? Input.Quotes.First().Replace("\"","") : inputs[1];
6262
if (!string.IsNullOrEmpty(GetOptionValue("target"))) path = GetOptionValue("target"); //If a path is provided with the option flag target, this will be used instead.

Templates/src/Core/PainKiller.PowerCommands.Core/PainKiller.PowerCommands.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<LangVersion>12.0</LangVersion>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8-
<Version>1.0.4.0</Version>
8+
<Version>1.0.4.1</Version>
99
</PropertyGroup>
1010

1111
<ItemGroup>

0 commit comments

Comments
 (0)