From c394812eb8a4936ba660d13b4395d821ee29129f Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Tue, 21 Jul 2020 12:59:53 +0300 Subject: [PATCH 1/2] Cli: added Angular option to NpmApplicationType --- .../ProjectModification/NpmApplicationType.cs | 5 +++-- .../ProjectModification/SolutionModuleAdder.cs | 17 +++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmApplicationType.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmApplicationType.cs index 9f58aa52e9..0e05a1ffb0 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmApplicationType.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmApplicationType.cs @@ -5,6 +5,7 @@ namespace Volo.Abp.Cli.ProjectModification [Flags] public enum NpmApplicationType { - Mvc = 1 + Mvc = 1, + Angular = 2 } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs index acf4231520..a19af6f52c 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs @@ -39,7 +39,7 @@ namespace Volo.Abp.Cli.ProjectModification EfCoreMigrationAdder efCoreMigrationAdder, DerivedClassFinder derivedClassFinder, ProjectNpmPackageAdder projectNpmPackageAdder, - NpmGlobalPackagesChecker npmGlobalPackagesChecker, + NpmGlobalPackagesChecker npmGlobalPackagesChecker, IRemoteServiceExceptionHandler remoteServiceExceptionHandler, SourceCodeDownloadService sourceCodeDownloadService, SolutionFileModifier solutionFileModifier, @@ -159,7 +159,7 @@ namespace Volo.Abp.Cli.ProjectModification { Directory.Delete(demoFolder, true); } - + var hostFolder = Path.Combine(targetModuleFolder, "host"); if (Directory.Exists(hostFolder)) { @@ -186,7 +186,9 @@ namespace Volo.Abp.Cli.ProjectModification await ProjectNugetPackageAdder.AddAsync(targetProjectFile, nugetPackage); } - if (!module.NpmPackages.IsNullOrEmpty()) + var mvcNpmPackages = module.NpmPackages?.Where(p => p.ApplicationType.HasFlag(NpmApplicationType.Mvc)).ToList(); + + if (!mvcNpmPackages.IsNullOrEmpty()) { var targetProjects = ProjectFinder.FindNpmTargetProjectFile(projectFiles); if (targetProjects.Any()) @@ -195,8 +197,7 @@ namespace Volo.Abp.Cli.ProjectModification foreach (var targetProject in targetProjects) { - foreach (var npmPackage in module.NpmPackages.Where(p => - p.ApplicationType.HasFlag(NpmApplicationType.Mvc))) + foreach (var npmPackage in mvcNpmPackages) { await ProjectNpmPackageAdder.AddAsync(Path.GetDirectoryName(targetProject), npmPackage); } @@ -222,7 +223,7 @@ namespace Volo.Abp.Cli.ProjectModification } var dbMigrationsProject = projectFiles.FirstOrDefault(p => p.EndsWith(".DbMigrations.csproj")); - + if (dbMigrationsProject == null) { Logger.LogDebug("Solution doesn't have a \".DbMigrations\" project."); @@ -241,7 +242,7 @@ namespace Volo.Abp.Cli.ProjectModification if (addedNewBuilder && !skipDbMigrations) { - EfCoreMigrationAdder.AddMigration(dbMigrationsProject, module.Name, startupProject); + EfCoreMigrationAdder.AddMigration(dbMigrationsProject, module.Name, startupProject); } } @@ -274,4 +275,4 @@ namespace Volo.Abp.Cli.ProjectModification .Any(p => p.EndsWith(".IdentityServer") || p.EndsWith(".HttpApi.Host")); } } -} \ No newline at end of file +} From 5ce41d2c8ec0a49a3cd67f5f0f83bd7565308b79 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Wed, 22 Jul 2020 14:06:53 +0300 Subject: [PATCH 2/2] fix broken links in docs --- docs/en/API/Application-Configuration.md | 12 ++++++------ docs/en/Authorization.md | 2 -- docs/en/Background-Workers-Quartz.md | 2 +- docs/en/Best-Practices/Application-Services.md | 2 +- docs/en/Blob-Storing-Database.md | 2 +- docs/en/Entity-Framework-Core-Migrations.md | 2 +- docs/en/Modules/Docs.md | 2 +- docs/en/Startup-Templates/Module.md | 2 +- docs/en/Tutorials/Part-2.md | 2 +- 9 files changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/en/API/Application-Configuration.md b/docs/en/API/Application-Configuration.md index db624987c5..1465f0fd24 100644 --- a/docs/en/API/Application-Configuration.md +++ b/docs/en/API/Application-Configuration.md @@ -2,12 +2,12 @@ ABP Framework provides a pre-built and standard endpoint that contains some useful information about the application/service. Here, the list of some fundamental information at this endpoint: -* [Localization](Localization.md) values, supported and the current language of the application. -* Available and granted [policies](Authorization.md) (permissions) for the current user. -* [Setting](Settings.md) values for the current user. -* Info about the [current user](CurrentUser.md) (like id and user name). -* Info about the current [tenant](Multi-Tenancy.md) (like id and name). -* [Time zone](Timing.md) information for the current user and the [clock](Timing.md) type of the application. +* [Localization](../Localization.md) values, supported and the current language of the application. +* Available and granted [policies](../Authorization.md) (permissions) for the current user. +* [Setting](../Settings.md) values for the current user. +* Info about the [current user](../CurrentUser.md) (like id and user name). +* Info about the current [tenant](../Multi-Tenancy.md) (like id and name). +* [Time zone](../Timing.md) information for the current user and the [clock](Timing.md) type of the application. ## HTTP API diff --git a/docs/en/Authorization.md b/docs/en/Authorization.md index 1ede9f7577..4b7502f437 100644 --- a/docs/en/Authorization.md +++ b/docs/en/Authorization.md @@ -284,8 +284,6 @@ You may need to check a policy/permission on the client side. For ASP.NET Core M abp.auth.isGranted('MyPermissionName'); ``` -See [abp.auth](UI/AspNetCore/JavaScript-API/Index.md) API documentation for details. - ## Permission Management Permission management is normally done by an admin user using the permission management modal: diff --git a/docs/en/Background-Workers-Quartz.md b/docs/en/Background-Workers-Quartz.md index f8495b27a4..9b419d6c27 100644 --- a/docs/en/Background-Workers-Quartz.md +++ b/docs/en/Background-Workers-Quartz.md @@ -1,6 +1,6 @@ # Quartz Background Worker Manager -[Quartz](https://www.quartz-scheduler.net/) is an advanced background worker manager. You can integrate Quartz with the ABP Framework to use it instead of the [default background worker manager](Background-Worker.md). ABP simply integrates quartz. +[Quartz](https://www.quartz-scheduler.net/) is an advanced background worker manager. You can integrate Quartz with the ABP Framework to use it instead of the [default background worker manager](Background-Workers.md). ABP simply integrates quartz. ## Installation diff --git a/docs/en/Best-Practices/Application-Services.md b/docs/en/Best-Practices/Application-Services.md index 876105c214..3332ce08ea 100644 --- a/docs/en/Best-Practices/Application-Services.md +++ b/docs/en/Best-Practices/Application-Services.md @@ -206,7 +206,7 @@ This method votes a question and returns the current score of the question. #### Extra Properties -* **Do** use either `MapExtraPropertiesTo` extension method ([see](Object-Extensions.md)) or configure the object mapper (`MapExtraProperties`) to allow application developers to be able to extend the objects and services. +* **Do** use either `MapExtraPropertiesTo` extension method ([see](../Object-Extensions.md)) or configure the object mapper (`MapExtraProperties`) to allow application developers to be able to extend the objects and services. #### Manipulating / Deleting Entities diff --git a/docs/en/Blob-Storing-Database.md b/docs/en/Blob-Storing-Database.md index 69b9232ee8..c14086a2f4 100644 --- a/docs/en/Blob-Storing-Database.md +++ b/docs/en/Blob-Storing-Database.md @@ -27,7 +27,7 @@ This command adds all the NuGet packages to corresponding layers of your solutio Here, all the NuGet packages defined by this provider; -* [Volo.Abp.BlobStoring.Database.Domain.Shared](https://www.nuget.org/packages/Volo.Abp.BlobStoring.Domain.Shared) +* [Volo.Abp.BlobStoring.Database.Domain.Shared](https://www.nuget.org/packages/Volo.Abp.BlobStoring.Database.Domain.Shared) * [Volo.Abp.BlobStoring.Database.Domain](https://www.nuget.org/packages/Volo.Abp.BlobStoring.Database.Domain) * [Volo.Abp.BlobStoring.Database.EntityFrameworkCore](https://www.nuget.org/packages/Volo.Abp.BlobStoring.Database.EntityFrameworkCore) * [Volo.Abp.BlobStoring.Database.MongoDB](https://www.nuget.org/packages/Volo.Abp.BlobStoring.Database.MongoDB) diff --git a/docs/en/Entity-Framework-Core-Migrations.md b/docs/en/Entity-Framework-Core-Migrations.md index 00e791a94e..d59f9f96c7 100644 --- a/docs/en/Entity-Framework-Core-Migrations.md +++ b/docs/en/Entity-Framework-Core-Migrations.md @@ -2,7 +2,7 @@ This document begins by **introducing the default structure** provided by [the application startup template](Startup-Templates/Application.md) and **discusses various scenarios** you may want to implement for your own application. -> This document is for who want to fully understand and customize the database structure comes with [the application startup template](Startup-Templates/Application.md). If you simply want to create entities and manage your code first migrations, just follow [the startup tutorials](Tutorials/Index.md). +> This document is for who want to fully understand and customize the database structure comes with [the application startup template](Startup-Templates/Application.md). If you simply want to create entities and manage your code first migrations, just follow [the startup tutorials](Tutorials/Part-1.md). ### Source Code diff --git a/docs/en/Modules/Docs.md b/docs/en/Modules/Docs.md index b8f678dc48..e788a4c0f8 100644 --- a/docs/en/Modules/Docs.md +++ b/docs/en/Modules/Docs.md @@ -613,7 +613,7 @@ Configure(options => The `Index` is automatically created after the application starts if the `Index` does not exist. `DefaultElasticClientProvider` is responsible for creating `IElasticClient`. By default, it reads Elastic Search's `Url` from `IConfiguration`. -If your `IElasticClient` needs additional configuration, please use override `IElasticClientProvider` service and replace it in the [dependency injection](Dependency-Injection.md) system. +If your `IElasticClient` needs additional configuration, please use override `IElasticClientProvider` service and replace it in the [dependency injection](../Dependency-Injection.md) system. ``` { diff --git a/docs/en/Startup-Templates/Module.md b/docs/en/Startup-Templates/Module.md index 45e123971b..ea2fe5acca 100644 --- a/docs/en/Startup-Templates/Module.md +++ b/docs/en/Startup-Templates/Module.md @@ -56,7 +56,7 @@ An `IssueType` enum and an `IssueConsts` class (which may have some constant fie ### .Domain Project -This is the domain layer of the solution. It mainly contains [entities, aggregate roots](../Entities.md), [domain services](../Domain-Services.md), [value types](../Value-Types.md), [repository interfaces](../Repositories.md) and other domain objects. +This is the domain layer of the solution. It mainly contains [entities, aggregate roots](../Entities.md), [domain services](../Domain-Services.md), value types, [repository interfaces](../Repositories.md) and other domain objects. An `Issue` entity, an `IssueManager` domain service and an `IIssueRepository` interface are good candidates for this project. diff --git a/docs/en/Tutorials/Part-2.md b/docs/en/Tutorials/Part-2.md index 690394264c..a100d8370e 100644 --- a/docs/en/Tutorials/Part-2.md +++ b/docs/en/Tutorials/Part-2.md @@ -51,7 +51,7 @@ This tutorials has multiple versions based on your **UI** and **Database** prefe It's common to call the HTTP API endpoints via AJAX from the **JavaScript** side. You can use `$.ajax` or another tool to call the endpoints. However, ABP offers a better way. -ABP **dynamically** creates **[JavaScript Proxies](../UI/AspNetCore/)** for all API endpoints. So, you can use any **endpoint** just like calling a **JavaScript function**. +ABP **dynamically** creates **[JavaScript Proxies](https://docs.abp.io/en/abp/latest/API/Dynamic-CSharp-API-Clients#client-proxy-generation)** for all API endpoints. So, you can use any **endpoint** just like calling a **JavaScript function**. ### Testing in the Developer Console