Browse Source

Merge branch 'dev' into pr/23701

pull/23701/head
maliming 9 months ago
parent
commit
36ec3f5036
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 10
      Directory.Packages.props
  2. 9
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs
  3. 4
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularSourceCodeAdder.cs
  4. 12
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs

10
Directory.Packages.props

@ -128,11 +128,11 @@
<PackageVersion Include="NUglify" Version="1.21.15" />
<PackageVersion Include="Nullable" Version="1.3.1" />
<PackageVersion Include="Octokit" Version="14.0.0" />
<PackageVersion Include="OpenIddict.Abstractions" Version="7.0.0" />
<PackageVersion Include="OpenIddict.Core" Version="7.0.0" />
<PackageVersion Include="OpenIddict.Server.AspNetCore" Version="7.0.0" />
<PackageVersion Include="OpenIddict.Validation.AspNetCore" Version="7.0.0" />
<PackageVersion Include="OpenIddict.Validation.ServerIntegration" Version="7.0.0" />
<PackageVersion Include="OpenIddict.Abstractions" Version="7.1.0" />
<PackageVersion Include="OpenIddict.Core" Version="7.1.0" />
<PackageVersion Include="OpenIddict.Server.AspNetCore" Version="7.1.0" />
<PackageVersion Include="OpenIddict.Validation.AspNetCore" Version="7.1.0" />
<PackageVersion Include="OpenIddict.Validation.ServerIntegration" Version="7.1.0" />
<PackageVersion Include="Oracle.EntityFrameworkCore" Version="9.23.80" />
<PackageVersion Include="Polly" Version="8.5.2" />
<PackageVersion Include="Polly.Extensions.Http" Version="3.0.0" />

9
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs

@ -69,6 +69,7 @@ public class AddModuleCommand : IConsoleCommand, ITransientDependency
var newProTemplate = !string.IsNullOrEmpty(template) && template == ModuleProTemplate.TemplateName;
var withSourceCode = newTemplate || newProTemplate || commandLineArgs.Options.ContainsKey(Options.SourceCode.Long);
var addSourceCodeToSolutionFile = withSourceCode && commandLineArgs.Options.ContainsKey("add-to-solution-file");
var skipOpeningDocumentation = commandLineArgs.Options.ContainsKey(Options.SkipOpeningDocumentation.Long);
var skipDbMigrations = newTemplate || newProTemplate || commandLineArgs.Options.ContainsKey(Options.DbMigrations.Skip);
var solutionFile = GetSolutionFile(commandLineArgs);
@ -98,7 +99,8 @@ public class AddModuleCommand : IConsoleCommand, ITransientDependency
withSourceCode,
addSourceCodeToSolutionFile,
newTemplate,
newProTemplate
newProTemplate,
skipOpeningDocumentation
);
_lastAddedModuleInfo = new AddModuleInfoOutput
@ -223,5 +225,10 @@ public class AddModuleCommand : IConsoleCommand, ITransientDependency
public const string Short = "t";
public const string Long = "template";
}
public class SkipOpeningDocumentation
{
public const string Long = "skip-opening-documentation";
}
}
}

4
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularSourceCodeAdder.cs

@ -14,11 +14,11 @@ namespace Volo.Abp.Cli.ProjectModification;
public class AngularSourceCodeAdder : ITransientDependency
{
public ILogger<SolutionModuleAdder> Logger { get; set; }
public ILogger<AngularSourceCodeAdder> Logger { get; set; }
public AngularSourceCodeAdder()
{
Logger = NullLogger<SolutionModuleAdder>.Instance;
Logger = NullLogger<AngularSourceCodeAdder>.Instance;
}
public async Task AddFromModuleAsync(string solutionFilePath, string angularPath)

12
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs

@ -98,7 +98,8 @@ public class SolutionModuleAdder : ITransientDependency
bool withSourceCode = false,
bool addSourceCodeToSolutionFile = false,
bool newTemplate = false,
bool newProTemplate = false)
bool newProTemplate = false,
bool skipOpeningDocumentation = false)
{
Check.NotNull(solutionFile, nameof(solutionFile));
Check.NotNull(moduleName, nameof(moduleName));
@ -159,10 +160,13 @@ public class SolutionModuleAdder : ITransientDependency
await SetLeptonXAbpVersionsAsync(solutionFile, Path.Combine(modulesFolderInSolution, module.Name));
}
var documentationLink = module.GetFirstDocumentationLinkOrNull();
if (documentationLink != null)
if (!skipOpeningDocumentation)
{
CmdHelper.Open(documentationLink);
var documentationLink = module.GetFirstDocumentationLinkOrNull();
if (documentationLink != null)
{
CmdHelper.Open(documentationLink);
}
}
return module;

Loading…
Cancel
Save