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

CLI: Check HttpApi.Host project if exists for SignalR nuget package target to add the related package to the project #19348

Merged
merged 1 commit into from
Mar 20, 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
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
return FindProjectEndsWith(projectFiles, assemblyNames, ".HttpApi.Client");
case NuGetPackageTarget.SignalR:
return FindProjectEndsWith(projectFiles, assemblyNames, ".SignalR") ??
FindProjectEndsWith(projectFiles, assemblyNames, ".Web") ??
FindProjectEndsWith(projectFiles, assemblyNames, ".HttpApi.Host");
FindProjectEndsWith(projectFiles, assemblyNames, ".HttpApi.Host") ??
FindProjectEndsWith(projectFiles, assemblyNames, ".Web");

Check warning on line 50 in framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectFinder.cs

View check run for this annotation

Codecov / codecov/patch

framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectFinder.cs#L49-L50

Added lines #L49 - L50 were not covered by tests
case NuGetPackageTarget.Blazor:
return FindProjectEndsWith(projectFiles, assemblyNames, ".Blazor")
?? FindProjectEndsWith(projectFiles, assemblyNames, ".MauiBlazor");;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@
private async Task AddNugetAndNpmReferences(ModuleWithMastersInfo module, string[] projectFiles,
bool useDotnetCliToInstall)
{
var webPackagesWillBeAddedToBlazorServerProject = SouldWebPackagesBeAddedToBlazorServerProject(module, projectFiles);
var webPackagesWillBeAddedToBlazorServerProject = ShouldWebPackagesBeAddedToBlazorServerProject(module, projectFiles);

Check warning on line 628 in framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs

View check run for this annotation

Codecov / codecov/patch

framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs#L628

Added line #L628 was not covered by tests

await PublishEventAsync(3, "Adding nuget package references");
foreach (var nugetPackage in module.NugetPackages)
Expand Down Expand Up @@ -687,7 +687,7 @@
}
}

private static bool SouldWebPackagesBeAddedToBlazorServerProject(ModuleWithMastersInfo module, string[] projectFiles)
private static bool ShouldWebPackagesBeAddedToBlazorServerProject(ModuleWithMastersInfo module, string[] projectFiles)
{
var blazorProject = projectFiles.FirstOrDefault(p => p.EndsWith(".Blazor.csproj"));

Expand Down
Loading