From f6483b2f29532adeb938945213e4604fb1d55551 Mon Sep 17 00:00:00 2001 From: Mahmut Gundogdu Date: Mon, 16 Oct 2023 14:16:35 +0000 Subject: [PATCH 1/3] Add a section for @abp/nx.generators --- docs/en/UI/Angular/Service-Proxies.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/en/UI/Angular/Service-Proxies.md b/docs/en/UI/Angular/Service-Proxies.md index dc8433f7de..c683f7e22b 100644 --- a/docs/en/UI/Angular/Service-Proxies.md +++ b/docs/en/UI/Angular/Service-Proxies.md @@ -18,7 +18,8 @@ Run the following command in the **root folder** of the angular application: abp generate-proxy -t ng ``` -The command without any parameters creates proxies only for your own application's services and places them in your default Angular application. There are several parameters you may use to modify this behavior. See the [CLI documentation](../../CLI) for details. +Note: If you're utilizing NX, be aware that the Angular schematics-based ABP package may not work as expected. Instead, there's a specialized package for NX-based repositories named @abp/nx.generators. We recommend using this generator for your package. For detailed instructions and more information, refer to this section. +The command without any parameters creates proxies only for your own application's services and places them in your default Angular application. There are several parameters you may use to modify this behavior. See the [Details](#abp-nx-proxy-generator). The generated files will be placed in a folder called `proxy` at the root of the target project. @@ -140,6 +141,24 @@ export class BookComponent implements OnInit { > Please [see this article](https://github.com/abpframework/abp/blob/dev/docs/en/Blog-Posts/2020-09-07%20Angular-Service-Proxies/POST.md) to learn more about service proxies. + +### ABP NX Proxy Generator + For projects that utilize NX, the @abp/nx.generators package offers seamless integration. Essentially, this package serves as a wrapper specifically tailored for NX-based repositories + ** Installation ** +To incorporate this package into your project, run the following command: +```bash +yarn add @abp/nx.generators +``` +** Usage ** +To use the generator, execute the following command: +```bash +nx generate @abp/nx.generators:generate-proxy +// or nx g @abp/nx.generators:generate-proxy +``` + +Note: The parameters you'd use with this generator are consistent with the standard ABP proxy generator. + + ### Known Limitations When you run a project on Visual Studio using IIS Express as the web server, there will be no remote access to your endpoints. This is the default behavior of IIS Express since it explicitly protects you from the security risks of running over the network. However, that will cause the proxy generator to fail because it needs a response from the `/api/abp/api-definition` endpoint. You may serve your endpoints via Kestrel to avoid this. Running `dotnet run` in your command line (at your project folder) will do that for you. From a7c142dac128eff273a5f153a69e29cb28b89b93 Mon Sep 17 00:00:00 2001 From: Masum ULU <49063256+masumulu28@users.noreply.github.com> Date: Mon, 16 Oct 2023 17:26:24 +0300 Subject: [PATCH 2/3] Format NX descriptions --- docs/en/UI/Angular/Service-Proxies.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/en/UI/Angular/Service-Proxies.md b/docs/en/UI/Angular/Service-Proxies.md index c683f7e22b..71ba09df95 100644 --- a/docs/en/UI/Angular/Service-Proxies.md +++ b/docs/en/UI/Angular/Service-Proxies.md @@ -18,8 +18,9 @@ Run the following command in the **root folder** of the angular application: abp generate-proxy -t ng ``` -Note: If you're utilizing NX, be aware that the Angular schematics-based ABP package may not work as expected. Instead, there's a specialized package for NX-based repositories named @abp/nx.generators. We recommend using this generator for your package. For detailed instructions and more information, refer to this section. -The command without any parameters creates proxies only for your own application's services and places them in your default Angular application. There are several parameters you may use to modify this behavior. See the [Details](#abp-nx-proxy-generator). +### Note +- If you're utilizing NX, be aware that the Angular schematics-based ABP package may not work as expected. Instead, there's a specialized package for NX-based repositories named @abp/nx.generators. We recommend using this generator for your package. For detailed instructions and more information, refer to this section. +- The command without any parameters creates proxies only for your own application's services and places them in your default Angular application. There are several parameters you may use to modify this behavior. See the [Details](#abp-nx-proxy-generator). The generated files will be placed in a folder called `proxy` at the root of the target project. @@ -144,19 +145,21 @@ export class BookComponent implements OnInit { ### ABP NX Proxy Generator For projects that utilize NX, the @abp/nx.generators package offers seamless integration. Essentially, this package serves as a wrapper specifically tailored for NX-based repositories - ** Installation ** + **Installation** To incorporate this package into your project, run the following command: ```bash yarn add @abp/nx.generators ``` -** Usage ** +### Usage To use the generator, execute the following command: + ```bash -nx generate @abp/nx.generators:generate-proxy -// or nx g @abp/nx.generators:generate-proxy +yarn nx generate @abp/nx.generators:generate-proxy +// or +yarn nx g @abp/nx.generators:generate-proxy ``` -Note: The parameters you'd use with this generator are consistent with the standard ABP proxy generator. +**Note:** The parameters you'd use with this generator are consistent with the standard ABP proxy generator. ### Known Limitations From d651a2abe217e0f6c6a9c28c44e24a3f74c21e41 Mon Sep 17 00:00:00 2001 From: Hamza Albreem <94292623+braim23@users.noreply.github.com> Date: Tue, 17 Oct 2023 09:30:43 +0300 Subject: [PATCH 3/3] Update Service-Proxies.md --- docs/en/UI/Angular/Service-Proxies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/UI/Angular/Service-Proxies.md b/docs/en/UI/Angular/Service-Proxies.md index 71ba09df95..6cd79505c2 100644 --- a/docs/en/UI/Angular/Service-Proxies.md +++ b/docs/en/UI/Angular/Service-Proxies.md @@ -20,7 +20,7 @@ abp generate-proxy -t ng ### Note - If you're utilizing NX, be aware that the Angular schematics-based ABP package may not work as expected. Instead, there's a specialized package for NX-based repositories named @abp/nx.generators. We recommend using this generator for your package. For detailed instructions and more information, refer to this section. -- The command without any parameters creates proxies only for your own application's services and places them in your default Angular application. There are several parameters you may use to modify this behavior. See the [Details](#abp-nx-proxy-generator). +- The command without any parameters creates proxies for your own application's services only and places them in your default Angular application. There are several parameters you may use to modify this behavior. See the [Details](#abp-nx-proxy-generator). The generated files will be placed in a folder called `proxy` at the root of the target project.