From 13da66baa48f30d134e3013b1dd30ae889bf10dd Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 20 Aug 2021 20:57:19 +0800 Subject: [PATCH 01/15] Enabled PublishTrimmed for Blazor wasm project --- .../MyCompanyName.MyProjectName.Blazor.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj index 0bde45f899..0f724efbc0 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj @@ -5,8 +5,6 @@ net5.0 true - false - false From e6fc98046ccb871ce9c5d8f1557760e95813b40e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sun, 22 Aug 2021 18:44:18 +0300 Subject: [PATCH 02/15] Created empty document: Concurrency-Check --- docs/en/Concurrency-Check.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/en/Concurrency-Check.md diff --git a/docs/en/Concurrency-Check.md b/docs/en/Concurrency-Check.md new file mode 100644 index 0000000000..e22afe82b8 --- /dev/null +++ b/docs/en/Concurrency-Check.md @@ -0,0 +1,3 @@ +## Concurrency Check + +TODO \ No newline at end of file From df9d61745ea587e8e17c2dc0df1892c4a4a3f7c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 23 Aug 2021 10:35:10 +0300 Subject: [PATCH 03/15] Replace gulp usage by install-libs. --- docs/en/Modules/Virtual-File-Explorer.md | 5 +++-- docs/en/SignalR-Integration.md | 4 ++-- docs/en/UI/AspNetCore/Basic-Theme.md | 2 +- .../AspNetCore/Client-Side-Package-Management.md | 14 ++++++-------- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/en/Modules/Virtual-File-Explorer.md b/docs/en/Modules/Virtual-File-Explorer.md index bae87ba95a..1a22418937 100644 --- a/docs/en/Modules/Virtual-File-Explorer.md +++ b/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. `gulp` +````bash +abp install-libs +```` That's all,Now run the application and Navigate to `/VirtualFileExplorer`. You will see virtual file explorer page: diff --git a/docs/en/SignalR-Integration.md b/docs/en/SignalR-Integration.md index 29c37e30b2..7ebf4f6539 100644 --- a/docs/en/SignalR-Integration.md +++ b/docs/en/SignalR-Integration.md @@ -70,10 +70,10 @@ This will add the `@abp/signalr` to the dependencies in the `package.json` of yo } ```` -Run the `gulp` 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 -gulp +abp install-libs ```` This will copy the SignalR JavaScript files into your project: diff --git a/docs/en/UI/AspNetCore/Basic-Theme.md b/docs/en/UI/AspNetCore/Basic-Theme.md index 34ea9ac849..e74799a423 100644 --- a/docs/en/UI/AspNetCore/Basic-Theme.md +++ b/docs/en/UI/AspNetCore/Basic-Theme.md @@ -15,7 +15,7 @@ The Basic Theme has RTL (Right-to-Left language) support. * Install the [Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic](https://www.nuget.org/packages/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic) NuGet package to your web project. * Add `AbpAspNetCoreMvcUiBasicThemeModule` into the `[DependsOn(...)]` attribute for your [module class](../../Module-Development-Basics.md) in the web project. * Install the [@abp/aspnetcore.mvc.ui.theme.basic](https://www.npmjs.com/package/@abp/aspnetcore.mvc.ui.theme.basic) NPM package to your web project (e.g. `npm install @abp/aspnetcore.mvc.ui.theme.basic` or `yarn add @abp/aspnetcore.mvc.ui.theme.basic`). -* Run `gulp` command in a command line terminal in the web project's folder. +* Run `abp install-libs` command in a command line terminal in the web project's folder. ## Layouts diff --git a/docs/en/UI/AspNetCore/Client-Side-Package-Management.md b/docs/en/UI/AspNetCore/Client-Side-Package-Management.md index 645200a363..cf23b25e15 100644 --- a/docs/en/UI/AspNetCore/Client-Side-Package-Management.md +++ b/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 gulp task 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,7 +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 defines a [Gulp](https://gulpjs.com/) based task to **copy 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. +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. @@ -100,17 +100,15 @@ mappings: { } ```` -#### Using The Gulp +#### install-libs Command -Once you properly configure the `abp.resourcemapping.js` file, you can run the gulp 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: ```` -gulp +abp install-libs ```` -When you run the `gulp`, all packages will copy their own resources into the **wwwroot/libs** folder. Running `yarn & gulp` is only necessary if you make a change in your dependencies in the **package.json** file. - -> When you run the Gulp command, dependencies of the application are resolved using the package.json file. The Gulp task 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 From ad0bd8f5c182472d828fbcc3d9160d0019329c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 23 Aug 2021 10:38:54 +0300 Subject: [PATCH 04/15] Use abp install-libs command in docs. --- .../POST.md | 2 +- .../Using-DevExtreme-Components-With-The-ABP-Framework.md | 4 +++- .../2021-03-12-Simple-SignalR-Notification/POST.md | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/en/Community-Articles/2020-05-29-Real-Time-Messaging-In-A-Distributed-Architecture-Using-Abp-Framework-SingalR-RabbitMQ/POST.md b/docs/en/Community-Articles/2020-05-29-Real-Time-Messaging-In-A-Distributed-Architecture-Using-Abp-Framework-SingalR-RabbitMQ/POST.md index 915d4ef5c1..eea0eaae46 100644 --- a/docs/en/Community-Articles/2020-05-29-Real-Time-Messaging-In-A-Distributed-Architecture-Using-Abp-Framework-SingalR-RabbitMQ/POST.md +++ b/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 { diff --git a/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md index 93ed01d05c..3a50b987f7 100644 --- a/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md +++ b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md @@ -79,7 +79,9 @@ 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. -![gulp](gulp.png) +````bash +abp install-libs +```` You can see `devextreme` folder inside the `wwwroot/libs`: diff --git a/docs/en/Community-Articles/2021-03-12-Simple-SignalR-Notification/POST.md b/docs/en/Community-Articles/2021-03-12-Simple-SignalR-Notification/POST.md index 8aeff16612..a53fec2e48 100644 --- a/docs/en/Community-Articles/2021-03-12-Simple-SignalR-Notification/POST.md +++ b/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) From 21bfb9d26245ec95db84fc72595e301b0adbe635 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 23 Aug 2021 16:00:38 +0800 Subject: [PATCH 05/15] Improved --- ...vExtreme-Components-With-The-ABP-Framework.md | 2 +- docs/en/Modules/Docs.md | 5 +++-- docs/zh-Hans/Modules/Docs.md | 5 +++-- docs/zh-Hans/Modules/Virtual-File-Explorer.md | 5 +++-- docs/zh-Hans/SignalR-Integration.md | 4 ++-- .../AspNetCore/Client-Side-Package-Management.md | 16 +++++++--------- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md index 3a50b987f7..3858b8c7a0 100644 --- a/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md +++ b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md @@ -77,7 +77,7 @@ 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. ````bash abp install-libs diff --git a/docs/en/Modules/Docs.md b/docs/en/Modules/Docs.md index 4c764ee2c6..706e5f6142 100644 --- a/docs/en/Modules/Docs.md +++ b/docs/en/Modules/Docs.md @@ -187,8 +187,9 @@ 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: - 1. `yarn` - 2. `gulp` +````bash +abp install-libs +```` ### 4- Database Integration diff --git a/docs/zh-Hans/Modules/Docs.md b/docs/zh-Hans/Modules/Docs.md index 1d09552e50..7b651fd821 100644 --- a/docs/zh-Hans/Modules/Docs.md +++ b/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- 数据库集成 diff --git a/docs/zh-Hans/Modules/Virtual-File-Explorer.md b/docs/zh-Hans/Modules/Virtual-File-Explorer.md index 024b3d23df..e70306f13c 100644 --- a/docs/zh-Hans/Modules/Virtual-File-Explorer.md +++ b/docs/zh-Hans/Modules/Virtual-File-Explorer.md @@ -60,8 +60,9 @@ 然后在 `Acme.MyProject.Web` 项目目录打开命令行终端运行以下命令: - 1. `yarn` - 2. `gulp` +````bash +abp install-libs +```` 这就是全部,运行应用程序导航到 `/VirtualFileExplorer`. 你会看到虚拟文件浏览器页面: diff --git a/docs/zh-Hans/SignalR-Integration.md b/docs/zh-Hans/SignalR-Integration.md index bdf4a7a786..7adc75daa4 100644 --- a/docs/zh-Hans/SignalR-Integration.md +++ b/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文件拷贝到你的项目: diff --git a/docs/zh-Hans/UI/AspNetCore/Client-Side-Package-Management.md b/docs/zh-Hans/UI/AspNetCore/Client-Side-Package-Management.md index 2c50064be0..f11866404b 100644 --- a/docs/zh-Hans/UI/AspNetCore/Client-Side-Package-Management.md +++ b/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`. #### 参见 From 430bb7cda905a7735883a2cc101049e3a9a5a8f3 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 23 Aug 2021 16:22:10 +0800 Subject: [PATCH 06/15] Update Using-DevExtreme-Components-With-The-ABP-Framework.md --- .../Using-DevExtreme-Components-With-The-ABP-Framework.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md index 3858b8c7a0..fdaaefbea1 100644 --- a/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md +++ b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Framework/Using-DevExtreme-Components-With-The-ABP-Framework.md @@ -77,7 +77,7 @@ module.exports = { }; ``` -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. +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. ````bash abp install-libs From 8ea9ea0177bae5569b9266910727a4bcfd6c059e Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Mon, 23 Aug 2021 12:33:04 +0300 Subject: [PATCH 07/15] improve build script --- npm/ng-packs/.eslintrc.json | 3 ++- npm/ng-packs/package.json | 13 ------------- npm/ng-packs/scripts/build-schematics.ts | 2 +- npm/ng-packs/scripts/build.ts | 3 +++ 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/npm/ng-packs/.eslintrc.json b/npm/ng-packs/.eslintrc.json index 873a32dce0..a3173a8a48 100644 --- a/npm/ng-packs/.eslintrc.json +++ b/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"] } }, { diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index aa92664dc9..ea80d0d170 100644 --- a/npm/ng-packs/package.json +++ b/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" } } diff --git a/npm/ng-packs/scripts/build-schematics.ts b/npm/ng-packs/scripts/build-schematics.ts index d5052b51fe..64da4ac856 100644 --- a/npm/ng-packs/scripts/build-schematics.ts +++ b/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', diff --git a/npm/ng-packs/scripts/build.ts b/npm/ng-packs/scripts/build.ts index f27dc01782..237850ece0 100644 --- a/npm/ng-packs/scripts/build.ts +++ b/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', [ From 7e636a493745477c7b60a280094df2a5e23f0a5c Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Mon, 23 Aug 2021 12:59:48 +0300 Subject: [PATCH 08/15] fix testing errors --- .../packages/core/src/lib/tests/initial-utils.spec.ts | 10 +++------- .../core/src/lib/tests/localization.service.spec.ts | 1 - .../extensions/src/tests/enum.util.spec.ts | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/tests/initial-utils.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/initial-utils.spec.ts index 60569180d1..49efd0141e 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/initial-utils.spec.ts +++ b/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); }); }); diff --git a/npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts index b130afcc23..c8d89f54e4 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts +++ b/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.'); diff --git a/npm/ng-packs/packages/theme-shared/extensions/src/tests/enum.util.spec.ts b/npm/ng-packs/packages/theme-shared/extensions/src/tests/enum.util.spec.ts index e89efb5467..ffdc6224a5 100644 --- a/npm/ng-packs/packages/theme-shared/extensions/src/tests/enum.util.spec.ts +++ b/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); } From e49004a78a61cb55ce73d32980f81f3071d98509 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 24 Aug 2021 10:29:50 +0800 Subject: [PATCH 09/15] Update codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ae5d4fdacc..2db1624447 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.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-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, rel-4.4] + 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: From 2d9de8f2ca49fd591c179261b966fe45b04d125b Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 24 Aug 2021 14:31:22 +0800 Subject: [PATCH 10/15] Update codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2db1624447..7aaad739e9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -7,7 +7,7 @@ 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, rel-4.4] + branches: [dev, rel-*] paths: - 'abp/**/*.js' - 'abp/**/*.cs' From 02d3523e62ba52e75ed2fd24078b2cb84b58706e Mon Sep 17 00:00:00 2001 From: MaxRiz <10518283+maxrizwork@users.noreply.github.com> Date: Tue, 24 Aug 2021 18:16:06 +0200 Subject: [PATCH 11/15] Italian translation Italian translation --- .../Commercial/Localization/Resources/it.json | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/it.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/it.json index 2031279d6d..ccb9f5ecd1 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/it.json +++ b/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}.
Controlla nella posta in arrivo / indesiderata / spam!", "InvalidFormInputs": "Per favore, digita le informazioni valide specificate nel modulo", "DDDBookEmailBody": "Grazie.
Per scaricare il tuo libro, clicca qui.", - "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.
Abbiamo inviato un'email a {0} 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." } -} \ No newline at end of file +} From 5f2c84115659b5fb4d0c1226bf03707d3adb9e70 Mon Sep 17 00:00:00 2001 From: quan-zhan <46584369+quan-zhan@users.noreply.github.com> Date: Wed, 25 Aug 2021 14:58:03 +0800 Subject: [PATCH 12/15] Update Authorization.md modify the description --- docs/en/Authorization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Authorization.md b/docs/en/Authorization.md index 6b906fe194..66fded1a29 100644 --- a/docs/en/Authorization.md +++ b/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") From 92798bc1ee430521c32514af43582c15a3df9e27 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Thu, 26 Aug 2021 12:04:05 +0800 Subject: [PATCH 13/15] Update document --- docs/en/Data-Filtering.md | 35 +++++++++++++++++++++------ docs/en/Data-Transfer-Objects.md | 8 +++--- docs/zh-Hans/Data-Filtering.md | 33 +++++++++++++++++++++---- docs/zh-Hans/Data-Transfer-Objects.md | 8 +++--- 4 files changed, 64 insertions(+), 20 deletions(-) diff --git a/docs/en/Data-Filtering.md b/docs/en/Data-Filtering.md index 6df738cf18..430fdc8379 100644 --- a/docs/en/Data-Filtering.md +++ b/docs/en/Data-Filtering.md @@ -239,15 +239,25 @@ protected override Expression> CreateFilterExpression +[ExposeServices(typeof(IMongoDbRepositoryFilterer))] +public class BookMongoDbRepositoryFilterer : MongoDbRepositoryFilterer , ITransientDependency { - protected override void AddGlobalFilters(List> filters) + public BookMongoDbRepositoryFilterer( + IDataFilter dataFilter, + ICurrentTenant currentTenant) : + base(dataFilter, currentTenant) { + } + + public override void AddGlobalFilters(List> filters) + { + base.AddGlobalFilters(filters); + if (DataFilter.IsEnabled()) { filters.Add(Builders.Filter.Eq(e => ((IIsActive)e).IsActive, true)); @@ -256,7 +266,7 @@ public class BookRepository : MongoDbRepository : MongoDbRepository @@ -271,6 +281,8 @@ public abstract class MyMongoRepository : MongoD protected override void AddGlobalFilters(List> filters) { + base.AddGlobalFilters(filters); + if (typeof(IIsActive).IsAssignableFrom(typeof(TEntity)) && DataFilter.IsEnabled()) { @@ -278,6 +290,15 @@ public abstract class MyMongoRepository : 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. \ No newline at end of file + +public class MyMongoDbModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + //....... + context.Services + .Replace(ServiceDescriptor.Transient(typeof(IMongoDbRepositoryFilterer<,>),typeof(MyMongoDbRepositoryFilterer<,>))); + } +} +```` \ No newline at end of file diff --git a/docs/en/Data-Transfer-Objects.md b/docs/en/Data-Transfer-Objects.md index bc81205b66..4d45570c1d 100644 --- a/docs/en/Data-Transfer-Objects.md +++ b/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 products = await query.ToListAsync(); + List products = await query + .Skip(input.SkipCount) + .Take(input.MaxResultCount).ToListAsync(); //Map entities to DTOs List productDtos = diff --git a/docs/zh-Hans/Data-Filtering.md b/docs/zh-Hans/Data-Filtering.md index 45adcb6b05..74192cf426 100644 --- a/docs/zh-Hans/Data-Filtering.md +++ b/docs/zh-Hans/Data-Filtering.md @@ -188,15 +188,25 @@ protected override Expression> CreateFilterExpression +[ExposeServices(typeof(IMongoDbRepositoryFilterer))] +public class BookMongoDbRepositoryFilterer : MongoDbRepositoryFilterer , ITransientDependency { - protected override void AddGlobalFilters(List> filters) + public BookMongoDbRepositoryFilterer( + IDataFilter dataFilter, + ICurrentTenant currentTenant) : + base(dataFilter, currentTenant) { + } + + public override void AddGlobalFilters(List> filters) + { + base.AddGlobalFilters(filters); + if (DataFilter.IsEnabled()) { filters.Add(Builders.Filter.Eq(e => ((IIsActive)e).IsActive, true)); @@ -205,7 +215,7 @@ public class BookRepository : MongoDbRepository : MongoDbRepository @@ -220,6 +230,8 @@ public abstract class MyMongoRepository : MongoD protected override void AddGlobalFilters(List> filters) { + base.AddGlobalFilters(filters); + if (typeof(IIsActive).IsAssignableFrom(typeof(TEntity)) && DataFilter.IsEnabled()) { @@ -227,6 +239,17 @@ public abstract class MyMongoRepository : MongoD } } } + + +public class MyMongoDbModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + //....... + context.Services + .Replace(ServiceDescriptor.Transient(typeof(IMongoDbRepositoryFilterer<,>),typeof(MyMongoDbRepositoryFilterer<,>))); + } +} ```` > 参阅[MongoDb集成文档](MongoDB.md)的 "设置默认仓储" 部分了解如何使用自定义类替换默认仓储. \ No newline at end of file diff --git a/docs/zh-Hans/Data-Transfer-Objects.md b/docs/zh-Hans/Data-Transfer-Objects.md index eb844e7ea7..5f8a1bc527 100644 --- a/docs/zh-Hans/Data-Transfer-Objects.md +++ b/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 products = await query.ToListAsync(); + List products = await query + .Skip(input.SkipCount) + .Take(input.MaxResultCount);.ToListAsync(); //Map entities to DTOs List productDtos = From 02207352905c4003fdb8572e57ee7b9cd3f5aad5 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Thu, 26 Aug 2021 12:10:14 +0800 Subject: [PATCH 14/15] Update Data-Filtering.md --- docs/en/Data-Filtering.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Data-Filtering.md b/docs/en/Data-Filtering.md index 430fdc8379..dc237f6151 100644 --- a/docs/en/Data-Filtering.md +++ b/docs/en/Data-Filtering.md @@ -241,7 +241,7 @@ protected override Expression> CreateFilterExpression))] From 766affd1c4cf43b71a0441ca52b70a4f6df96b90 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Thu, 26 Aug 2021 14:49:51 +0800 Subject: [PATCH 15/15] Update Text-Templating-Scriban --- docs/en/Text-Templating-Scriban.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Text-Templating-Scriban.md b/docs/en/Text-Templating-Scriban.md index 51b6c50f88..324fed7b14 100644 --- a/docs/en/Text-Templating-Scriban.md +++ b/docs/en/Text-Templating-Scriban.md @@ -1,4 +1,4 @@ -# Razor Integration +# Scriban Integration ## Installation