Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format code with dotnet-format, Prettier and StandardJS #18

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions LICENSE.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
---

date: 2023-07-13T05:44:46:00-05:00Z
description: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, yadda, yadda, yadda...
keywords:

- IP
- copyright
- license
- mit
permissions:
permissions:
- commercial-use
- modifications
- distribution
- private-use
conditions:
conditions:
- include-copyright
limitations:
limitations:
- liability
- warranty
lastmod: 2024-01-0T00:39:00.0000+05:00Z
license: MIT
slug: mit-license
title: MIT License
type: license
lastmod: 2024-01-0T00:39:00.0000+05:00Z
license: MIT
slug: mit-license
title: MIT License
type: license

---

# MIT License
Expand All @@ -32,4 +35,3 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2 changes: 1 addition & 1 deletion Tasks/DeleteAndPush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class DeleteAndPush : NuGetTaskBase
public override bool Execute()
{
new DeletePackage(TaskResources, HelpKeywordPrefix) { Source = Source, ApiKey = this.ApiKey, PackageId = PackageId, Version = Version, MSBuildProjectDirectory = MSBuildProjectDirectory }.Execute();
new Push(TaskResources, HelpKeywordPrefix) { Source = Source, ApiKey = ApiKey, PackagePath = PackagePath, MSBuildProjectDirectory = MSBuildProjectDirectory }.Execute();
new Push(TaskResources, HelpKeywordPrefix) { Source = Source, ApiKey = ApiKey, PackagePath = PackagePath, MSBuildProjectDirectory = MSBuildProjectDirectory }.Execute();
return true;
}
}
92 changes: 46 additions & 46 deletions Tasks/NuGetMSBuildLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,50 @@ namespace NuGetPush.Tasks;

public class NuGetMSBuildTaskLogger(MSBTask task) : NuGet.Common.ILogger
{
public void LogDebug(string data) => LogMessage(MessageImportance.Low, data);
public void LogVerbose(string data) => LogMessage(MessageImportance.Low, data);
public void LogInformation(string data) => LogMessage(MessageImportance.Low, data);
public void LogMinimal(string data) => LogMessage(MessageImportance.Low, data);
public void LogWarning(string data) => LogMessage(MessageImportance.High, data);
public void LogError(string data) => LogMessage(MessageImportance.High, data);
public void LogInformationSummary(string data) => LogMessage(MessageImportance.Low, data);
public void Log(LogLevel level, string data) => LogMessage(data);
public TTask LogAsync(LogLevel level, string data)
{
LogMessage(MessageImportance.Low, data);
return TTask.CompletedTask;
}
public void Log(ILogMessage message) => LogMessage(message.ToString());
public TTask LogAsync(ILogMessage message)
{
LogMessage(message.ToString());
return TTask.CompletedTask;
}
protected MSBTask Task => task;
protected IBuildEngine BuildEngine=> Task.BuildEngine;
protected void LogMessage(string message) => LogMessage(MessageImportance.Low, message);
protected void LogMessage(MessageImportance importance, string message, params object[] messageArgs)
{
var e = new BuildMessageEventArgs(
message,
helpKeyword: null,
senderName: Task.GetType().Name,
importance,
DateTime.UtcNow,
messageArgs);
BuildEngine.LogMessageEvent(e);
}
public void LogDebug(string data) => LogMessage(MessageImportance.Low, data);

public void LogVerbose(string data) => LogMessage(MessageImportance.Low, data);

public void LogInformation(string data) => LogMessage(MessageImportance.Low, data);

public void LogMinimal(string data) => LogMessage(MessageImportance.Low, data);

public void LogWarning(string data) => LogMessage(MessageImportance.High, data);

public void LogError(string data) => LogMessage(MessageImportance.High, data);

public void LogInformationSummary(string data) => LogMessage(MessageImportance.Low, data);

public void Log(LogLevel level, string data) => LogMessage(data);

public TTask LogAsync(LogLevel level, string data)
{
LogMessage(MessageImportance.Low, data);
return TTask.CompletedTask;
}

public void Log(ILogMessage message) => LogMessage(message.ToString());

public TTask LogAsync(ILogMessage message)
{
LogMessage(message.ToString());
return TTask.CompletedTask;
}

protected MSBTask Task => task;
protected IBuildEngine BuildEngine => Task.BuildEngine;

protected void LogMessage(string message) => LogMessage(MessageImportance.Low, message);

protected void LogMessage(MessageImportance importance, string message, params object[] messageArgs)
{
var e = new BuildMessageEventArgs(
message,
helpKeyword: null,
senderName: Task.GetType().Name,
importance,
DateTime.UtcNow,
messageArgs);
BuildEngine.LogMessageEvent(e);
}
}
2 changes: 1 addition & 1 deletion Tasks/NuGetTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public NuGetTaskBase() : base() { }
protected PackageSourceProvider PackageSourceProvider => new(Settings);

private NuGetMSBuildTaskLogger? _logger;
public virtual NuGetMSBuildTaskLogger Logger { get => _logger ??= new (this); set => _logger = value; }
public virtual NuGetMSBuildTaskLogger Logger { get => _logger ??= new(this); set => _logger = value; }

private string? _apiKey;
public virtual string ApiKey
Expand Down
20 changes: 11 additions & 9 deletions TestPush/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
---

date: 2023-07-13T05:44:46:00-05:00Z
description: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, yadda, yadda, yadda...
keywords:

- IP
- copyright
- license
- mit
permissions:
permissions:
- commercial-use
- modifications
- distribution
- private-use
conditions:
conditions:
- include-copyright
limitations:
limitations:
- liability
- warranty
lastmod: 2024-01-0T00:39:00.0000+05:00Z
license: MIT
slug: mit-license
title: MIT License
type: license
lastmod: 2024-01-0T00:39:00.0000+05:00Z
license: MIT
slug: mit-license
title: MIT License
type: license

---

# MIT License
Expand All @@ -32,4 +35,3 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Loading