Browse Source

Merge branch 'dev' into identity-installer

pull/10363/head
Yunus Emre Kalkan 5 years ago
parent
commit
ef1e597e2f
  1. 16
      .github/workflows/codeql-analysis.yml
  2. 23
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/it.json
  3. 2
      docs/en/Authorization.md
  4. 2
      docs/en/Community-Articles/2020-05-29-Real-Time-Messaging-In-A-Distributed-Architecture-Using-Abp-Framework-SingalR-RabbitMQ/POST.md
  5. 6
      docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md
  6. 2
      docs/en/Community-Articles/2021-03-12-Simple-SignalR-Notification/POST.md
  7. 3
      docs/en/Concurrency-Check.md
  8. 35
      docs/en/Data-Filtering.md
  9. 8
      docs/en/Data-Transfer-Objects.md
  10. 7
      docs/en/Modules/Docs.md
  11. 5
      docs/en/Modules/Virtual-File-Explorer.md
  12. 2
      docs/en/SignalR-Integration.md
  13. 2
      docs/en/Text-Templating-Scriban.md
  14. 18
      docs/en/UI/AspNetCore/Client-Side-Package-Management.md
  15. 33
      docs/zh-Hans/Data-Filtering.md
  16. 8
      docs/zh-Hans/Data-Transfer-Objects.md
  17. 5
      docs/zh-Hans/Modules/Docs.md
  18. 5
      docs/zh-Hans/Modules/Virtual-File-Explorer.md
  19. 4
      docs/zh-Hans/SignalR-Integration.md
  20. 16
      docs/zh-Hans/UI/AspNetCore/Client-Side-Package-Management.md
  21. 3
      npm/ng-packs/.eslintrc.json
  22. 13
      npm/ng-packs/package.json
  23. 10
      npm/ng-packs/packages/core/src/lib/tests/initial-utils.spec.ts
  24. 1
      npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts
  25. 2
      npm/ng-packs/packages/theme-shared/extensions/src/tests/enum.util.spec.ts
  26. 2
      npm/ng-packs/scripts/build-schematics.ts
  27. 3
      npm/ng-packs/scripts/build.ts
  28. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj

16
.github/workflows/codeql-analysis.yml

@ -7,12 +7,22 @@ name: "CodeQL"
on:
push:
branches: [dev, rel-1.0, rel-1.1, rel-2.0, rel-2.1, rel-2.2, rel-2.3, rel-2.4, rel-2.5, rel-2.6, rel-2.7, rel-2.8, rel-2.9, rel-3.0, rel-3.1, rel-3.2]
branches: [dev, rel-*]
paths:
- 'abp/**/*.js'
- 'abp/**/*.cs'
- 'abp/**/*.cshtml'
- 'abp/**/*.csproj'
- 'abp/**/*.razor'
pull_request:
# The branches below must be a subset of the branches above
branches: [dev]
schedule:
- cron: '0 8 * * 6'
paths:
- 'abp/**/*.js'
- 'abp/**/*.cs'
- 'abp/**/*.cshtml'
- 'abp/**/*.csproj'
- 'abp/**/*.razor'
jobs:
analyze:

23
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/it.json

@ -358,6 +358,25 @@
"WeWillSendYouADownloadLink": "Un link per scaricare il libro e-book è stato spedito a {0}.<br/> Controlla nella posta in arrivo / indesiderata / spam!",
"InvalidFormInputs": "Per favore, digita le informazioni valide specificate nel modulo",
"DDDBookEmailBody": "Grazie. <br /> Per scaricare il tuo libro, <a href=\"{0}\">clicca qui</a>.",
"FreeDDDEBook": "E-Book Gratuito DDD"
"FreeDDDEBook": "E-Book Gratuito DDD",
"StartFree": "Inizia gratuitamente",
"FreeTrial": "Prova Gratuita",
"AcceptsMarketingCommunications": "Si desidero ricevere comunicazioni marketing riguardanti ABP Commercial",
"PurposeOfUsage": "Proposta di utilizzo",
"Industry": "Settore",
"Choose": "- Scegli -",
"CompanyOrganizationName": "Azienda / Nome organizzazione",
"CompanySize": "Dimensioni Azienda",
"Next": "Prossimo",
"StartTrial": "Inizia la mia prova gratuita",
"ContactUsIssues": "Contattaci per qualsiasi problema",
"TrialActivatedWarning": "Caro {0}, un utente ha diritto di avere 1 solo periodo di prova gratuito. Hai già utilizzato il tuo periodo di prova.",
"ActivationRequirement": "Ti manca un solo passo per iniziare il tuo periodo di prova gratuito.<br>Abbiamo inviato un'email a <b>{0}</b> per attivare il tuo account. Controlla la tua casella di posta e non dimenticare la cartella spam!",
"SaveAndDownload": "Salva e Scarica",
"CompanyNameValidationMessage": "Il nome dell'azienda è troppo lungo!",
"AddressValidationMessage": "L'indirizzo è troppo lungo!",
"TaxNoValidationMessage": "TAX/VAT (IVA) è troppo lungo!",
"NotesValidationMessage": "Il campo note è troppo lungo!",
"CheckYourBillingInfo": "Puoi creare una fattura solo una volta! Controlla i tuoi dati di fatturazione prima di creare una fattura."
}
}
}

2
docs/en/Authorization.md

@ -256,7 +256,7 @@ myGroup.AddPermission("Book_Creation")
#### Depending on a Global Feature
Use the `RequireFeatures` extension method on your permission definition to make the permission available only if a given feature is enabled:
Use the `RequireGlobalFeatures` extension method on your permission definition to make the permission available only if a given feature is enabled:
````csharp
myGroup.AddPermission("Book_Creation")

2
docs/en/Community-Articles/2020-05-29-Real-Time-Messaging-In-A-Distributed-Architecture-Using-Abp-Framework-SingalR-RabbitMQ/POST.md

@ -168,7 +168,7 @@ namespace SignalRTieredDemo.Web
{
````
Also, we need to add [@abp/signalr](https://www.npmjs.com/package/@abp/signalr) npm package to package.json in ***.Web** project, then run **yarn** and **gulp** commands.
Also, we need to add [@abp/signalr](https://www.npmjs.com/package/@abp/signalr) npm package to package.json in ***.Web** project, then run **abp install-libs** command.
`````json
{

6
docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md

@ -77,9 +77,11 @@ module.exports = {
};
```
Open your `DevExtremeSample.Web` project folder with a command line and run the `gulp` command. This command will copy the needed library files into the ``/wwwroot/libs/devextreme/` folder.
Open your `DevExtremeSample.Web` project folder with a command line and run the `abp install-libs` command. This command will copy the needed library files into the `/wwwroot/libs/devextreme/` folder.
![gulp](gulp.png)
````bash
abp install-libs
````
You can see `devextreme` folder inside the `wwwroot/libs`:

2
docs/en/Community-Articles/2021-03-12-Simple-SignalR-Notification/POST.md

@ -91,7 +91,7 @@ You can install the latest version (3.1.13 will be old)
#### 3- Add resource Mapping
We added SignalR to the `package.json` but it comes into your `node_modules` folder. We need to copy the related files to `wwwroot/libs` folder. To do this copy the content of the following file to your `abp.resourcemappings.js` file. It's in your root directory of Web folder. After you do this, go to your web directory and run `gulp` command. By doing this, it'll copy the related files into your `wwwroot/libs` folder.
We added SignalR to the `package.json` but it comes into your `node_modules` folder. We need to copy the related files to `wwwroot/libs` folder. To do this copy the content of the following file to your `abp.resourcemappings.js` file. It's in your root directory of Web folder. After you do this, go to your web directory and run `abp install-libs` command. By doing this, it'll copy the related files into your `wwwroot/libs` folder.
[abp.resourcemappings.js](https://gist.github.com/ebicoglu/f7dc22cca2d353f8bf7f68a03e3395b8#file-abp-resourcemapping-js)

3
docs/en/Concurrency-Check.md

@ -0,0 +1,3 @@
## Concurrency Check
TODO

35
docs/en/Data-Filtering.md

@ -239,15 +239,25 @@ protected override Expression<Func<TEntity, bool>> CreateFilterExpression<TEntit
### MongoDB
ABP implements data filters directly in the [repository](Repositories.md) level for the [MongoDB Integration](MongoDB.md). So, it works only if you use the repositories properly. Otherwise, you should manually filter the data.
ABP abstracts the `IMongoDbRepositoryFilterer` interface to implement data filtering for the [MongoDB Integration](MongoDB.md), it works only if you use the repositories properly. Otherwise, you should manually filter the data.
Currently, the best way to implement a data filter for the MongoDB integration is to override the `AddGlobalFilters` in the repository derived from the `MongoDbRepository` class. Example:
Currently, the best way to implement a data filter for the MongoDB integration is to create a derived class of `MongoDbRepositoryFilterer` and override `AddGlobalFilters`. Example:
````csharp
public class BookRepository : MongoDbRepository<BookStoreMongoDbContext, Book, Guid>
[ExposeServices(typeof(IMongoDbRepositoryFilterer<Book, Guid>))]
public class BookMongoDbRepositoryFilterer : MongoDbRepositoryFilterer<Book, Guid> , ITransientDependency
{
protected override void AddGlobalFilters(List<FilterDefinition<Book>> filters)
public BookMongoDbRepositoryFilterer(
IDataFilter dataFilter,
ICurrentTenant currentTenant) :
base(dataFilter, currentTenant)
{
}
public override void AddGlobalFilters(List<FilterDefinition<Book>> filters)
{
base.AddGlobalFilters(filters);
if (DataFilter.IsEnabled<IIsActive>())
{
filters.Add(Builders<Book>.Filter.Eq(e => ((IIsActive)e).IsActive, true));
@ -256,7 +266,7 @@ public class BookRepository : MongoDbRepository<BookStoreMongoDbContext, Book, G
}
````
This example implements it only for the `Book` entity. If you want to implement for all entities (those implement the `IIsActive` interface), create your own custom MongoDB repository base class and override the `AddGlobalFilters` as shown below:
This example implements it only for the `Book` entity. If you want to implement for all entities (those implement the `IIsActive` interface), create your own custom MongoDB repository filterer base class and override the `AddGlobalFilters` as shown below:
````csharp
public abstract class MyMongoRepository<TMongoDbContext, TEntity, TKey> : MongoDbRepository<TMongoDbContext, TEntity, TKey>
@ -271,6 +281,8 @@ public abstract class MyMongoRepository<TMongoDbContext, TEntity, TKey> : MongoD
protected override void AddGlobalFilters(List<FilterDefinition<TEntity>> filters)
{
base.AddGlobalFilters(filters);
if (typeof(IIsActive).IsAssignableFrom(typeof(TEntity))
&& DataFilter.IsEnabled<IIsActive>())
{
@ -278,6 +290,15 @@ public abstract class MyMongoRepository<TMongoDbContext, TEntity, TKey> : MongoD
}
}
}
````
> See "Set Default Repository Classes" section of the [MongoDb Integration document](MongoDB.md) to learn how to replace default repository base with your custom class.
public class MyMongoDbModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
//.......
context.Services
.Replace(ServiceDescriptor.Transient(typeof(IMongoDbRepositoryFilterer<,>),typeof(MyMongoDbRepositoryFilterer<,>)));
}
}
````

8
docs/en/Data-Transfer-Objects.md

@ -210,15 +210,15 @@ namespace AbpDemo
{
//Create the query
var query = _productRepository
.OrderBy(input.Sorting)
.Skip(input.SkipCount)
.Take(input.MaxResultCount);
.OrderBy(input.Sorting);
//Get total count from the repository
var totalCount = await query.CountAsync();
//Get entities from the repository
List<Product> products = await query.ToListAsync();
List<Product> products = await query
.Skip(input.SkipCount)
.Take(input.MaxResultCount).ToListAsync();
//Map entities to DTOs
List<ProductDto> productDtos =

7
docs/en/Modules/Docs.md

@ -185,10 +185,11 @@ Open `package.json` and add `@abp/docs": "^2.9.0` as shown below:
}
```
Then open the command line terminal in the `Acme.MyProject.Web` project folder and run the following command:
Then open the command line terminal in the `Acme.MyProject.Web` project folder and run the following command:
1. `yarn`
2. `abp install-libs`
````bash
abp install-libs
````
### 4- Database Integration

5
docs/en/Modules/Virtual-File-Explorer.md

@ -60,8 +60,9 @@ Or you can also manually install nuget package to `Acme.MyProject.Web` project:
Then open the command line terminal in the `Acme.MyProject.Web` project folder and run the following command:
1. `yarn`
2. `abp install-libs`
````bash
abp install-libs
````
That's all,Now run the application and Navigate to `/VirtualFileExplorer`. You will see virtual file explorer page:

2
docs/en/SignalR-Integration.md

@ -70,7 +70,7 @@ This will add the `@abp/signalr` to the dependencies in the `package.json` of yo
}
````
Run `abp install-libs` command in the root folder of your web project:
Run the following [ABP CLI](CLI.md) command in the root folder of your web project:
````bash
abp install-libs

2
docs/en/Text-Templating-Scriban.md

@ -1,4 +1,4 @@
# Razor Integration
# Scriban Integration
## Installation

18
docs/en/UI/AspNetCore/Client-Side-Package-Management.md

@ -18,7 +18,7 @@ To solve the versioning problem, we created a **standard set of packages** those
The benefit of a **standard package** is:
* It depends on a **standard version** of a package. Depending on this package is **safe** because all modules depend on the same version.
* It contains the necessary mapping configuration to copy library resources (js, css, img... files) from the **node_modules** folder to **wwwroot/libs** folder. See the *Mapping The Library Resources* section for more.
* It contains the mappings copy library resources (js, css, img... files) from the **node_modules** folder to **wwwroot/libs** folder. See the *Mapping The Library Resources* section for more.
Depending on a standard package is easy. Just add it to your **package.json** file like you normally do. Example:
@ -61,13 +61,7 @@ Using NPM packages and NPM/Yarn tool is the de facto standard for client side li
Next challenge is copying needed resources (js, css, img... files) from the `node_modules` into a folder inside the **wwwroot** folder to make it accessible to the clients/browsers.
[ABP CLI](../../CLI.md) offers the command below to **copy resources** from **node_modules** to **wwwroot/libs** folder. You have to run it in the root folder of your web project:
````bash
abp install-libs
````
Each **standard package** (see the *@ABP NPM Packages* section) defines the mapping for its own files. So, most of the time, you only configure dependencies.
ABP CLI's `abp install-libs` command **copies resources** from **node_modules** to **wwwroot/libs** folder. Each **standard package** (see the *@ABP NPM Packages* section) defines the mapping for its own files. So, most of the time, you only configure dependencies.
The **startup templates** are already configured to work all these out of the box. This section will explain the configuration options.
@ -106,17 +100,15 @@ mappings: {
}
````
#### Using ABP CLI To Copy Resources
#### install-libs Command
Once you properly configure the `abp.resourcemapping.js` file, you can run the [ABP CLI](../../CLI.md) command from the command line:
Once you properly configure the `abp.resourcemapping.js` file, you can run the following ABP CLI command from the command line:
````bash
abp install-libs
````
When you run this command, all packages will copy their own resources into the **wwwroot/libs** folder. Running `yarn` & `abp install-libs` are only necessary if you make a change in your dependencies in the **package.json** file.
> When you run the `abp install-libs` command, dependencies of the application are resolved using the package.json file. [ABP CLI](../../CLI.md) automatically discovers and maps all resources from all dependencies (recursively).
When you run this command, all packages will copy their own resources into the **wwwroot/libs** folder. Running `abp install-libs` is only necessary if you make a change in your dependencies in the **package.json** file.
#### See Also

33
docs/zh-Hans/Data-Filtering.md

@ -188,15 +188,25 @@ protected override Expression<Func<TEntity, bool>> CreateFilterExpression<TEntit
### MongoDB
ABP直接在[仓储](Repositories.md)级别实现数据过滤用于[MongoDB 集成](MongoDB.md). 所以只有正确的使用仓储,它才会工作. 否则你需要手动过滤数据.
ABP抽象了 `IMongoDbRepositoryFilterer` 接口为[MongoDB 集成](MongoDB.md)实现数据过滤, 只有正确的使用仓储,它才会工作. 否则你需要手动过滤数据.
目前为MongoDB集成实现数据过滤的最佳方法是重写派生自 `MongoDbRepository` 仓储`AddGlobalFilters` 方法:
目前为MongoDB集成实现数据过滤的最佳方法是重写派生自 `MongoDbRepositoryFilterer` 基类`AddGlobalFilters` 方法:
````csharp
public class BookRepository : MongoDbRepository<BookStoreMongoDbContext, Book, Guid>
[ExposeServices(typeof(IMongoDbRepositoryFilterer<Book, Guid>))]
public class BookMongoDbRepositoryFilterer : MongoDbRepositoryFilterer<Book, Guid> , ITransientDependency
{
protected override void AddGlobalFilters(List<FilterDefinition<Book>> filters)
public BookMongoDbRepositoryFilterer(
IDataFilter dataFilter,
ICurrentTenant currentTenant) :
base(dataFilter, currentTenant)
{
}
public override void AddGlobalFilters(List<FilterDefinition<Book>> filters)
{
base.AddGlobalFilters(filters);
if (DataFilter.IsEnabled<IIsActive>())
{
filters.Add(Builders<Book>.Filter.Eq(e => ((IIsActive)e).IsActive, true));
@ -205,7 +215,7 @@ public class BookRepository : MongoDbRepository<BookStoreMongoDbContext, Book, G
}
````
示例中仅为 `Book` 实体实现了过滤. 如果你想要为所有的实体实现过滤 (实现了 `IIsActive` 接口的实体),可以创建自己的MongoDB仓储基类并重 写 `AddGlobalFilters` 方法. 如下所示:
示例中仅为 `Book` 实体实现了过滤. 如果你想要为所有的实体实现过滤 (实现了 `IIsActive` 接口的实体),可以创建自己的 `MongoDbRepositoryFilterer` 基类并重 写 `AddGlobalFilters` 方法. 如下所示:
````csharp
public abstract class MyMongoRepository<TMongoDbContext, TEntity, TKey> : MongoDbRepository<TMongoDbContext, TEntity, TKey>
@ -220,6 +230,8 @@ public abstract class MyMongoRepository<TMongoDbContext, TEntity, TKey> : MongoD
protected override void AddGlobalFilters(List<FilterDefinition<TEntity>> filters)
{
base.AddGlobalFilters(filters);
if (typeof(IIsActive).IsAssignableFrom(typeof(TEntity))
&& DataFilter.IsEnabled<IIsActive>())
{
@ -227,6 +239,17 @@ public abstract class MyMongoRepository<TMongoDbContext, TEntity, TKey> : MongoD
}
}
}
public class MyMongoDbModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
//.......
context.Services
.Replace(ServiceDescriptor.Transient(typeof(IMongoDbRepositoryFilterer<,>),typeof(MyMongoDbRepositoryFilterer<,>)));
}
}
````
> 参阅[MongoDb集成文档](MongoDB.md)的 "设置默认仓储" 部分了解如何使用自定义类替换默认仓储.

8
docs/zh-Hans/Data-Transfer-Objects.md

@ -210,15 +210,15 @@ namespace AbpDemo
{
//Create the query
var query = _productRepository
.OrderBy(input.Sorting)
.Skip(input.SkipCount)
.Take(input.MaxResultCount);
.OrderBy(input.Sorting);
//Get total count from the repository
var totalCount = await query.CountAsync();
//Get entities from the repository
List<Product> products = await query.ToListAsync();
List<Product> products = await query
.Skip(input.SkipCount)
.Take(input.MaxResultCount);.ToListAsync();
//Map entities to DTOs
List<ProductDto> productDtos =

5
docs/zh-Hans/Modules/Docs.md

@ -186,8 +186,9 @@ ABP框架的[文档](docs.abp.io)也是使用的此模块.
然后在 `Acme.MyProject.Web` 项目目录打开命令行终端运行以下命令:
1. `yarn`
2. `gulp`
````bash
abp install-libs
````
### 4- 数据库集成

5
docs/zh-Hans/Modules/Virtual-File-Explorer.md

@ -60,8 +60,9 @@
然后在 `Acme.MyProject.Web` 项目目录打开命令行终端运行以下命令:
1. `yarn`
2. `gulp`
````bash
abp install-libs
````
这就是全部,运行应用程序导航到 `/VirtualFileExplorer`. 你会看到虚拟文件浏览器页面:

4
docs/zh-Hans/SignalR-Integration.md

@ -70,10 +70,10 @@ yarn add @abp/signalr
}
````
在你的Web项目的根文件夹中运行 `gulp`:
在你的Web项目的根文件夹中运行 `abp install-libs`:
````bash
gulp
abp install-libs
````
它会将SignalR JavaScript文件拷贝到你的项目:

16
docs/zh-Hans/UI/AspNetCore/Client-Side-Package-Management.md

@ -18,7 +18,7 @@ ABP是一个模块化平台. 每个开发人员都可以创建模块, 模块应
**标准包**的好处是:
* 它取决于包装的**标准版本**. 取决于此包是**安全**,因为所有模块都依赖于相同的版本.
* 它包含将库资源(js,css,img...文件)从**node_modules**文件夹复制到**wwwroot/libs**文件夹的gulp任务. 有关更多信息, 请参阅 *映射库资源* 部分.
* 它包含将库资源(js,css,img...文件)从**node_modules**文件夹复制到**wwwroot/libs**文件夹. 有关更多信息, 请参阅 *映射库资源* 部分.
依赖标准包装很容易. 只需像往常一样将它添加到**package.json**文件中. 例如:
@ -61,7 +61,7 @@ yarn
下一个挑战是将所需的资源(js,css,img ...文件)从`node_modules`复制到**wwwroot**文件夹内的文件夹中,以使其可供客户端/浏览器访问.
ABP将基于[Gulp](https://gulpjs.com/)的任务定义为**将资源**从**node_modules**复制到**wwwroot/libs**文件夹. 每个**标准包**(参见*@ABP NPM Packages*部分)定义了自己文件的映射. 因此, 大多数情况你只配置依赖项.
ABP`install-libs` 命令**将资源**从**node_modules**复制到**wwwroot/libs**文件夹. 每个**标准包**(参见*@ABP NPM Packages*部分)定义了自己文件的映射. 因此, 大多数情况你只配置依赖项.
**启动模板**已经配置为开箱即用的所有这些. 本节将介绍配置选项.
@ -97,17 +97,15 @@ mappings: {
}
````
#### 使用 Gulp
#### install-libs 命令
正确配置`abp.resourcemapping.js`文件后, 可以从命令行运行gulp命令:
正确配置`abp.resourcemapping.js`文件后, 可以从命令行运行ABP CLI命令:
````bash
abp install-libs
````
gulp
````
当你运行`gulp`时,所有包都会将自己的资源复制到**wwwroot/libs**文件夹中. 只有在**package.json**文件中对依赖项进行更改时, 才需要运行`yarn&gulp`.
> 运行Gulp命令时, 使用package.json文件解析应用程序的依赖关系. Gulp任务自动发现并映射来自所有依赖项的所有资源(递归).
当你运行这个命令时,所有包都会将自己的资源复制到**wwwroot/libs**文件夹中. 只有在**package.json**文件中对依赖项进行更改时, 才需要运行`abp install-libs`.
#### 参见

3
npm/ng-packs/.eslintrc.json

@ -26,7 +26,8 @@
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-empty-function": ["warn"]
"@typescript-eslint/no-empty-function": ["warn"],
"@typescript-eslint/no-empty-interface": ["warn"]
}
},
{

13
npm/ng-packs/package.json

@ -118,18 +118,5 @@
"tslint": "~6.1.0",
"typescript": "~4.3.5",
"zone.js": "~0.11.4"
},
"dependencies": {
"@angular/animations": "^12.1.0",
"@angular/common": "^12.1.0",
"@angular/compiler": "^12.1.0",
"@angular/core": "^12.1.0",
"@angular/forms": "^12.1.0",
"@angular/platform-browser": "^12.1.0",
"@angular/platform-browser-dynamic": "^12.1.0",
"@angular/router": "^12.1.0",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
}
}

10
npm/ng-packs/packages/core/src/lib/tests/initial-utils.spec.ts

@ -54,7 +54,6 @@ describe('InitialUtils', () => {
const environmentService = spectator.inject(EnvironmentService);
const configStateService = spectator.inject(ConfigStateService);
const sessionStateService = spectator.inject(SessionStateService);
const applicationConfigurationService = spectator.inject(AbpApplicationConfigurationService);
const parseTenantFromUrlSpy = jest.spyOn(multiTenancyUtils, 'parseTenantFromUrl');
const getRemoteEnvSpy = jest.spyOn(environmentUtils, 'getRemoteEnv');
parseTenantFromUrlSpy.mockReturnValue(Promise.resolve());
@ -64,11 +63,9 @@ describe('InitialUtils', () => {
currentTenant: { id: 'test', name: 'testing' },
} as ApplicationConfigurationDto;
const getConfigurationSpy = jest.spyOn(applicationConfigurationService, 'get');
getConfigurationSpy.mockReturnValue(of(appConfigRes));
const environmentSetStateSpy = jest.spyOn(environmentService, 'setState');
const configSetStateSpy = jest.spyOn(configStateService, 'setState');
const configRefreshAppStateSpy = jest.spyOn(configStateService, 'refreshAppState');
configRefreshAppStateSpy.mockReturnValue(of(appConfigRes));
const sessionSetTenantSpy = jest.spyOn(sessionStateService, 'setTenant');
const configStateGetOneSpy = jest.spyOn(configStateService, 'getOne');
@ -81,9 +78,8 @@ describe('InitialUtils', () => {
await getInitialData(mockInjector)();
expect(typeof getInitialData(mockInjector)).toBe('function');
expect(configRefreshAppStateSpy).toHaveBeenCalled();
expect(environmentSetStateSpy).toHaveBeenCalledWith(environment);
expect(getConfigurationSpy).toHaveBeenCalled();
expect(configSetStateSpy).toHaveBeenCalledWith(appConfigRes);
expect(sessionSetTenantSpy).toHaveBeenCalledWith(appConfigRes.currentTenant);
});
});

1
npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts

@ -74,7 +74,6 @@ describe('LocalizationService', () => {
spectator.inject(Injector),
null,
null,
{} as any,
);
} catch (error) {
expect((error as Error).message).toBe('LocalizationService should have only one instance.');

2
npm/ng-packs/packages/theme-shared/extensions/src/tests/enum.util.spec.ts

@ -112,5 +112,5 @@ function createMockLocalizationService() {
const configState = new ConfigStateService(null);
configState.setState({ localization: mockL10n } as any);
return new LocalizationService(mockSessionState, null, null, configState, null);
return new LocalizationService(mockSessionState, null, null, configState);
}

2
npm/ng-packs/scripts/build-schematics.ts

@ -56,7 +56,7 @@ async function* copyPackageFiles(packageName: string) {
try {
await fse.remove(`../dist/packages/${PACKAGE_TO_BUILD}`);
await execa('yarn', ['install'], { cwd: '../packages/schematics' });
await execa('yarn', ['install'], { stdout: 'inherit', cwd: `../packages/${PACKAGE_TO_BUILD}` });
await execa(
'tsc',

3
npm/ng-packs/scripts/build.ts

@ -1,5 +1,6 @@
import program from 'commander';
import execa from 'execa';
import fse from 'fs-extra';
(async () => {
program.option('-i, --noInstall', 'skip updating package.json and installation', false);
@ -12,6 +13,8 @@ import execa from 'execa';
await execa('yarn', ['install'], { stdout: 'inherit', cwd: '../' });
}
await fse.remove('../dist');
await execa(
'yarn',
[

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj

@ -5,8 +5,6 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
<BlazorWebAssemblyEnableLinking>false</BlazorWebAssemblyEnableLinking>
<PublishTrimmed>false</PublishTrimmed>
</PropertyGroup>
<ItemGroup>

Loading…
Cancel
Save