diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ae5d4fdacc..7aaad739e9 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-*] + 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: 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 +} 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") 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..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,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`: 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) 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 diff --git a/docs/en/Data-Filtering.md b/docs/en/Data-Filtering.md index 6df738cf18..dc237f6151 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/en/Modules/Docs.md b/docs/en/Modules/Docs.md index 3894e29d20..f848789176 100644 --- a/docs/en/Modules/Docs.md +++ b/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 diff --git a/docs/en/Modules/Virtual-File-Explorer.md b/docs/en/Modules/Virtual-File-Explorer.md index b0e25a2d65..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. `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: diff --git a/docs/en/SignalR-Integration.md b/docs/en/SignalR-Integration.md index c8a25215de..7ebf4f6539 100644 --- a/docs/en/SignalR-Integration.md +++ b/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 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 diff --git a/docs/en/UI/AspNetCore/Client-Side-Package-Management.md b/docs/en/UI/AspNetCore/Client-Side-Package-Management.md index 259461adf3..eaccc39119 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 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 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 = 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`. #### 参见 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/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); } 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', [ 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