Skip to content

Commit

Permalink
Merge pull request #14255 from abpframework/auto-merge/rel-6-0/1392
Browse files Browse the repository at this point in the history
Merge branch dev with rel-6.0
  • Loading branch information
enisn authored Oct 7, 2022
2 parents 8865ee3 + 1a275ce commit adc0051
Show file tree
Hide file tree
Showing 127 changed files with 1,582 additions and 1,456 deletions.
10 changes: 5 additions & 5 deletions docs/en/Migration-Guides/OpenIddict-Angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
- In **MyApplication.HttpApi.Host.csproj** replace **project references**:

```csharp
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="6.0.*" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.*" />
```

with

```csharp
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.*" />
```

- In the **MyApplicationHttpApiHostModule.cs** replace usings and **module dependencies**:
Expand Down Expand Up @@ -117,13 +117,13 @@ This project is renamed to **AuthServer** after v6.0.0-rc1. You can also refacto
- In **MyApplication.IdentityServer.csproj** replace **project references**:

```csharp
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.*" />
```

with

```csharp
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.*" />
```

- In the **MyApplicationIdentityServerModule.cs** replace usings and **module dependencies**:
Expand Down
10 changes: 5 additions & 5 deletions docs/en/Migration-Guides/OpenIddict-Blazor-Server.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
- In the **MyApplication.Blazor.csproj** replace **project references**:

```csharp
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="6.0.*" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.*" />
```

with

```csharp
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.*" />
```

- In the **MyApplicationBlazorModule.cs** replace usings and **module dependencies**:
Expand Down Expand Up @@ -108,13 +108,13 @@ This project is renamed to **AuthServer** after v6.0.0-rc1. You can also refacto
- In **MyApplication.IdentityServer.csproj** replace **project references**:

```csharp
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.*" />
```

with

```csharp
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.*" />
```

- In **MyApplicationIdentityServerModule.cs** replace usings and **module dependencies**:
Expand Down
10 changes: 5 additions & 5 deletions docs/en/Migration-Guides/OpenIddict-Blazor.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
- In the **MyApplication.HttpApi.Host.csproj** replace **project references**:

```csharp
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="6.0.*" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.*" />
```

with

```csharp
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.*" />
```

- In the **MyApplicationHttpApiHostModule.cs** replace usings and **module dependencies**:
Expand Down Expand Up @@ -136,13 +136,13 @@ This project is renamed to **AuthServer** after v6.0.0-rc1. You can also refacto
- In **MyApplication.IdentityServer.csproj** replace **project references**:

```csharp
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.*" />
```

with

```csharp
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.*" />
```

- In the **MyApplicationIdentityServerModule.cs** replace usings and **module dependencies**:
Expand Down
10 changes: 5 additions & 5 deletions docs/en/Migration-Guides/OpenIddict-Mvc.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
- In **MyApplication.Web.csproj** replace **project references**:

```csharp
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="6.0.*" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.*" />
```

with

```csharp
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.*" />
```

- In **MyApplicationWebModule.cs** replace usings and **module dependencies**:
Expand Down Expand Up @@ -116,13 +116,13 @@ This project is renamed to **AuthServer** after v6.0.0-rc1. You can also refacto
- In **MyApplication.IdentityServer.csproj** replace **project references**:

```csharp
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="6.0.*" />
```

with

```csharp
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.*" />
```

- In **MyApplicationIdentityServerModule.cs** replace usings and **module dependencies**:
Expand Down
20 changes: 10 additions & 10 deletions docs/en/Migration-Guides/OpenIddict-Step-by-Step.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Use the `abp update` command to update your existing application. See [Upgrading

- In **MyApplication.Domain.Shared.csproj** replace **project reference**:
```csharp
<PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="6.0.*" />
```
with
```csharp
<PackageReference Include="Volo.Abp.OpenIddict.Domain.Shared" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.OpenIddict.Domain.Shared" Version="6.0.*" />
```

- In **MyApplicationDomainSharedModule.cs** replace usings and **module dependencies:**
Expand All @@ -45,15 +45,15 @@ Use the `abp update` command to update your existing application. See [Upgrading
- In **MyApplication.Domain.csproj** replace **project references**:

```csharp
<PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="6.0.*" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="6.0.*" />
```

with

```csharp
<PackageReference Include="Volo.Abp.OpenIddict.Domain" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.OpenIddict" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.OpenIddict.Domain" Version="6.0.*" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.OpenIddict" Version="6.0.*" />
```

- In **MyApplicationDomainModule.cs** replace usings and **module dependencies**:
Expand Down Expand Up @@ -90,13 +90,13 @@ If you are using MongoDB, skip this step and check the *MongoDB* layer section.
- In **MyApplication.EntityFrameworkCore.csproj** replace **project reference**:

```csharp
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="6.0.*" />
```

with

```csharp
<PackageReference Include="Volo.Abp.OpenIddict.EntityFrameworkCore" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.OpenIddict.EntityFrameworkCore" Version="6.0.*" />
```

- In **MyApplicationEntityFrameworkCoreModule.cs** replace usings and **module dependencies**:
Expand Down Expand Up @@ -154,13 +154,13 @@ If you are using EntityFrameworkCore, skip this step and check the *EntityFramew
- In **MyApplication.MongoDB.csproj** replace **project reference**:

```csharp
<PackageReference Include="Volo.Abp.IdentityServer.MongoDB" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.IdentityServer.MongoDB" Version="6.0.*" />
```

with

```csharp
<PackageReference Include="Volo.Abp.OpenIddict.MongoDB" Version="6.0.0-rc.5" />
<PackageReference Include="Volo.Abp.OpenIddict.MongoDB" Version="6.0.*" />
```

- In **MyApplicationMongoDbModule.cs** replace usings and **module dependencies**:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ public override void ConfigureServices(ServiceConfigurationContext context)
options.Commands[InstallLibsCommand.Name] = typeof(InstallLibsCommand);
options.Commands[CleanCommand.Name] = typeof(CleanCommand);
options.Commands[CliCommand.Name] = typeof(CliCommand);

options.DisabledModulesToAddToSolution.Add("Volo.Abp.LeptonXTheme.Pro");
options.DisabledModulesToAddToSolution.Add("Volo.Abp.LeptonXTheme.Lite");
});

Configure<AbpCliServiceProxyOptions>(options =>
Expand Down
3 changes: 3 additions & 0 deletions framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ public class AbpCliOptions
{
public Dictionary<string, Type> Commands { get; }

public List<string> DisabledModulesToAddToSolution { get; set; }

/// <summary>
/// Default value: true.
/// </summary>
Expand All @@ -22,5 +24,6 @@ public class AbpCliOptions
public AbpCliOptions()
{
Commands = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase);
DisabledModulesToAddToSolution = new();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Volo.Abp.Cli.Args;
using Volo.Abp.Cli.ProjectBuilding.Templates.MvcModule;
using Volo.Abp.Cli.ProjectModification;
Expand All @@ -14,6 +15,7 @@ namespace Volo.Abp.Cli.Commands;

public class AddModuleCommand : IConsoleCommand, ITransientDependency
{
private readonly AbpCliOptions _options;
public const string Name = "add-module";

private AddModuleInfoOutput _lastAddedModuleInfo;
Expand All @@ -33,8 +35,12 @@ public AddModuleInfoOutput LastAddedModuleInfo {
}
}

public AddModuleCommand(SolutionModuleAdder solutionModuleAdder, SolutionPackageVersionFinder solutionPackageVersionFinder)
public AddModuleCommand(
SolutionModuleAdder solutionModuleAdder,
SolutionPackageVersionFinder solutionPackageVersionFinder,
IOptions<AbpCliOptions> options)
{
_options = options.Value;
SolutionModuleAdder = solutionModuleAdder;
SolutionPackageVersionFinder = solutionPackageVersionFinder;
Logger = NullLogger<AddModuleCommand>.Instance;
Expand All @@ -50,6 +56,13 @@ public async Task ExecuteAsync(CommandLineArgs commandLineArgs)
GetUsageInfo()
);
}

if (_options.DisabledModulesToAddToSolution.Contains(commandLineArgs.Target))
{
throw new CliUsageException(
$"{commandLineArgs.Target} Module is not available for this command! You can check the module's documentation for more info."
);
}

var newTemplate = commandLineArgs.Options.ContainsKey(Options.NewTemplate.Long);
var template = commandLineArgs.Options.GetOrNull(Options.Template.Short, Options.Template.Long);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Newtonsoft.Json.Linq;
using NuGet.Versioning;
using Volo.Abp.Cli.Args;
using Volo.Abp.Cli.Auth;
using Volo.Abp.Cli.Commands.Services;
using Volo.Abp.Cli.Http;
using Volo.Abp.Cli.NuGet;
Expand All @@ -32,6 +33,7 @@ public class SuiteCommand : IConsoleCommand, ITransientDependency
public ICmdHelper CmdHelper { get; }
private readonly AbpNuGetIndexUrlService _nuGetIndexUrlService;
private readonly NuGetService _nuGetService;
private readonly AuthService _authService;
private readonly CliHttpClientFactory _cliHttpClientFactory;
private const string SuitePackageName = "Volo.Abp.Suite";
public ILogger<SuiteCommand> Logger { get; set; }
Expand All @@ -42,17 +44,28 @@ public SuiteCommand(
AbpNuGetIndexUrlService nuGetIndexUrlService,
NuGetService nuGetService,
ICmdHelper cmdHelper,
AuthService authService,
CliHttpClientFactory cliHttpClientFactory)
{
CmdHelper = cmdHelper;
_nuGetIndexUrlService = nuGetIndexUrlService;
_nuGetService = nuGetService;
_authService = authService;
_cliHttpClientFactory = cliHttpClientFactory;
Logger = NullLogger<SuiteCommand>.Instance;
}

public async Task ExecuteAsync(CommandLineArgs commandLineArgs)
{
#if !DEBUG
var loginInfo = await _authService.GetLoginInfoAsync();

if (string.IsNullOrEmpty(loginInfo?.Organization))
{
throw new CliUsageException("Please login with your account.");
}
#endif

var operationType = NamespaceHelper.NormalizeNamespace(commandLineArgs.Target);

var preview = commandLineArgs.Options.ContainsKey(Options.Preview.Short) ||
Expand Down Expand Up @@ -534,4 +547,4 @@ public static class Entity
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@ private string ProcessReferenceNodes(XmlDocument doc, string content)
var oldNodeIncludeValue = oldNode.Attributes["Include"].Value;

// ReSharper disable once PossibleNullReferenceException : Can not be null because nodes are selected with include attribute filter in previous method
if (oldNodeIncludeValue.Contains(_projectName))
if (oldNodeIncludeValue.Contains(_projectName) && _isMicroserviceServiceTemplate)
{
if (_isMicroserviceServiceTemplate || _entries.Any(e => e.Name.EndsWith(GetProjectNameWithExtensionFromProjectReference(oldNodeIncludeValue))))
{
continue;
}
continue;
}
if(_entries.Any(e => e.Name.EndsWith(GetProjectNameWithExtensionFromProjectReference(oldNodeIncludeValue))))
{
continue;
}

XmlNode newNode = GetNewReferenceNode(doc, oldNodeIncludeValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ protected void DeleteUnrelatedProjects(ProjectBuildContext context, List<Project
if (context.BuildArgs.MobileApp == MobileApp.Maui)
{
steps.Add(new MauiChangeApplicationIdGuidStep());
steps.Add(new MauiChangePortStep());
}
else
{
Expand Down
Loading

0 comments on commit adc0051

Please sign in to comment.