diff --git a/Directory.Packages.props b/Directory.Packages.props index 6bb24e88ad..67953c873c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -122,11 +122,11 @@ - + - + @@ -168,7 +168,7 @@ - + diff --git a/README.md b/README.md index fa6632daa8..4ef4bfab56 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ - [Quick Start](https://abp.io/docs/latest/tutorials/todo) is a single-part, quick-start tutorial to build a simple application with the ABP Framework. Start with this tutorial if you want to understand how ABP works quickly. - [Web Application Development Tutorial](https://abp.io/docs/latest/tutorials/book-store) is a complete tutorial on developing a full-stack web application with all aspects of a real-life solution. - [Modular Monolith Application](https://abp.io/docs/latest/tutorials/modular-crm/index): A multi-part tutorial that demonstrates how to create application modules, compose and communicate them to build a monolith modular web application. +- [Microservice Tutorial](https://abp.io/docs/latest/tutorials/microservice/index): A multi-part guide that walks you through building a microservice solution with ABP, from creating independent services and enabling inter-service communication to exposing them through an API Gateway and generating CRUD pages with ABP Suite. ## What ABP Provides? diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json index 7a9687e6d0..7f9b928749 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json @@ -672,6 +672,7 @@ "SupportQuestionCountPerDeveloperOnRenewLicense": "Support Question Count Per Developer for License Renewal", "SupportQuestionCountPerDeveloperOnNewLicense": "Support Question Count Per Developer for New License", "IncludedDeveloperCount": "Included Developer Count", + "AiTokenCountPerDeveloper": "AI Token Count Per Developer", "CanBuyAdditionalDevelopers": "Can Buy Additional Developers", "HasEmailSupport": "Has Email Support", "IsSupportPrivateQuestion": "Can Open Private Support Question", diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json index 18730b51d6..981500451a 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json @@ -1553,6 +1553,15 @@ "IntegrateToYourKubernetesCluster_Description1": "Connect your local development environment to a local or remote Kubernetes cluster, where that cluster already runs your microservice solution.", "IntegrateToYourKubernetesCluster_Description2": "Access any service in Kubernetes with their service name as DNS, just like they are running in your local computer.", "IntegrateToYourKubernetesCluster_Description3": "Intercept any service in that cluster, so all the traffic to the intercepted service is automatically redirected to your service that is running in your local machine. When your service needs to use any service in Kubernetes, the traffic is redirected back to the cluster, just like your local service is running inside the Kubernetes.", + "AskOurAiAssistant": "Ask Our AI Assistant", + "AskOurAiAssistant_Description1": "Build faster with an AI that actually understands your ABP project. The ABP AI Assistant answers your technical questions, explains your code, and helps you solve problems directly inside ABP Studio — with full awareness of your project’s structure. You can even send screenshots or code files to get precise, context-based guidance.", + "AskOurAiAssistant_Description2": "What It Helps You Do", + "AskOurAiAssistant_Description3": "Ask anything about your ABP project — domain layer, modules, configuration, entities, services, or UI.", + "AskOurAiAssistant_Description4": "Get smart, code-aware explanations tailored to your solution.", + "AskOurAiAssistant_Description5": "Generate snippets and scaffolding suggestions instantly.", + "AskOurAiAssistant_Description6": "Fix errors faster with context-aware debugging support.", + "AskOurAiAssistant_Description7": "Learn ABP best practices as you build.", + "AskOurAiAssistant_Description8": "Whether you're generating new features, debugging an issue, or exploring a module, the AI Assistant gives you actionable, project-specific answers — right when you need them.", "GetInformed": "Get Informed", "Studio_GetInformed_Description1": "Leave your contact information to get informed and try it first when ABP Studio has been launched.", "Studio_GetInformed_Description2": "Planned preview release date: Q3 of 2023.", diff --git a/docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/POST.md b/docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/POST.md new file mode 100644 index 0000000000..32647b5b6c --- /dev/null +++ b/docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/POST.md @@ -0,0 +1,89 @@ +# ABP.IO Platform 10.0 Final Has Been Released! + +We are glad to announce that [ABP](https://abp.io/) 10.0 stable version has been released today. + +## What's New With Version 10.0? + +All the new features were explained in detail in the [10.0 RC Announcement Post](https://abp.io/community/announcements/announcing-abp-10-0-release-candidate-86lrnyox), so there is no need to review them again. You can check it out for more details. + +## Getting Started with 10.0 + +### How to Upgrade an Existing Solution + +You can upgrade your existing solutions with either ABP Studio or ABP CLI. In the following sections, both approaches are explained: + +### Upgrading via ABP Studio + +If you are already using the ABP Studio, you can upgrade it to the latest version. ABP Studio periodically checks for updates in the background, and when a new version of ABP Studio is available, you will be notified through a modal. Then, you can update it by confirming the opened modal. See [the documentation](https://abp.io/docs/latest/studio/installation#upgrading) for more info. + +After upgrading the ABP Studio, then you can open your solution in the application, and simply click the **Upgrade ABP Packages** action button to instantly upgrade your solution: + +![](upgrade-abp-packages.png) + +### Upgrading via ABP CLI + +Alternatively, you can upgrade your existing solution via ABP CLI. First, you need to install the ABP CLI or upgrade it to the latest version. + +If you haven't installed it yet, you can run the following command: + +```bash +dotnet tool install -g Volo.Abp.Studio.Cli +``` + +Or to update the existing CLI, you can run the following command: + +```bash +dotnet tool update -g Volo.Abp.Studio.Cli +``` + +After installing/updating the ABP CLI, you can use the [`update` command](https://abp.io/docs/latest/CLI#update) to update all the ABP related NuGet and NPM packages in your solution as follows: + +```bash +abp update +``` + +You can run this command in the root folder of your solution to update all ABP related packages. + +## Migration Guides + +There are a few breaking changes in this version that may affect your application. Please read the migration guide carefully, if you are upgrading from v9.x: [ABP Version 10.0 Migration Guide](https://abp.io/docs/10.0/release-info/migration-guides/abp-10-0) + +## Community News + +### New ABP Community Articles + +As always, exciting articles have been contributed by the ABP community. I will highlight some of them here: + +* [Alper Ebiçoğlu](https://abp.io/community/members/alper) + * [Optimize your .NET app for production Part 1](https://abp.io/community/articles/optimize-your-dotnet-app-for-production-for-any-.net-app-wa24j28e) + * [Optimize your .NET app for production Part 2](https://abp.io/community/articles/optimize-your-dotnet-app-for-production-for-any-.net-app-2-78xgncpi) + * [Return Code vs Exceptions: Which One is Better?](https://abp.io/community/articles/return-code-vs-exceptions-which-one-is-better-1rwcu9yi) +* [Sumeyye Kurtulus](https://abp.io/community/members/sumeyye.kurtulus) + * [Building Scalable Angular Apps with Reusable UI Components](https://abp.io/community/articles/building-scalable-angular-apps-with-reusable-ui-components-b9npiff3) + * [Angular Library Linking Made Easy: Paths, Workspaces and Symlinks](https://abp.io/community/articles/angular-library-linking-made-easy-paths-workspaces-and-5z2ate6e) +* [erdem çaygör](https://abp.io/community/members/erdem.caygor) + * [Building Dynamic Forms in Angular for Enterprise](https://abp.io/community/articles/building-dynamic-forms-in-angular-for-enterprise-6r3ewpxt) + * [From Server to Browser: Angular TransferState Explained](https://abp.io/community/articles/from-server-to-browser-angular-transferstate-explained-m99zf8oh) +* [Mansur Besleney](https://abp.io/community/members/mansur.besleney) + * [Top 10 Exception Handling Mistakes in .NET](https://abp.io/community/articles/top-10-exception-handling-mistakes-in-net-jhm8wzvg) +* [Berkan Şaşmaz](https://abp.io/community/members/berkansasmaz) + * [How to Dynamically Set the Connection String in EF Core](https://abp.io/community/articles/how-to-dynamically-set-the-connection-string-in-ef-core-30k87fpj) +* [Oğuzhan Ağır](https://abp.io/community/members/oguzhan.agir) + * [The ASP.NET Core Dependency Injection System](https://abp.io/community/articles/the-asp.net-core-dependency-injection-system-3vbsdhq8) +* [Selman Koç](https://abp.io/community/members/selmankoc) + * [5 Things Keep in Mind When Deploying Clustered Environment](https://abp.io/community/articles/5-things-keep-in-mind-when-deploying-clustered-environment-i9byusnv) +* [Muhammet Ali ÖZKAYA](https://abp.io/community/members/m.aliozkaya) + * [Repository Pattern in ASP.NET Core](https://abp.io/community/articles/repository-pattern-in-asp.net-core-2dudlg3j) +* [Armağan Ünlü](https://abp.io/community/members/armagan) + * [UI/UX Trends That Will Shape 2026](https://abp.io/community/articles/UI-UX-Trends-That-Will-Shape-2026-bx4c2kow) +* [Salih](https://abp.io/community/members/salih) + * [What is That Domain Service in DDD for .NET Developers?](https://abp.io/community/articles/what-is-that-domain-service-in-ddd-for-.net-developers-uqnpwjja) + * [Building an API Key Management System with ABP Framework](https://abp.io/community/articles/building-an-api-key-management-system-with-abp-framework-28gn4efw) +* [Fahri Gedik](https://abp.io/community/members/fahrigedik) + * [Signal-Based Forms in Angular](https://abp.io/community/articles/signal-based-forms-in-angular-21-9qentsqs) + +Thanks to the ABP Community for all the content they have published. You can also [post your ABP related (text or video) content](https://abp.io/community/posts/create) to the ABP Community. + +## About the Next Version + +The next feature version will be 10.1. You can follow the [release planning here](https://github.com/abpframework/abp/milestones). Please [submit an issue](https://github.com/abpframework/abp/issues/new) if you have any problems with this version. diff --git a/docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/cover-image.png b/docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/cover-image.png new file mode 100644 index 0000000000..5453dcd4e8 Binary files /dev/null and b/docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/cover-image.png differ diff --git a/docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/upgrade-abp-packages.png b/docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/upgrade-abp-packages.png new file mode 100644 index 0000000000..4ec1d19589 Binary files /dev/null and b/docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/upgrade-abp-packages.png differ diff --git a/docs/en/Community-Articles/2025-11-15-Announcing-SSR-Support/article.md b/docs/en/Community-Articles/2025-11-15-Announcing-SSR-Support/article.md index 51688dc5a7..51b28ef18c 100644 --- a/docs/en/Community-Articles/2025-11-15-Announcing-SSR-Support/article.md +++ b/docs/en/Community-Articles/2025-11-15-Announcing-SSR-Support/article.md @@ -29,14 +29,14 @@ Server-Side Rendering refers to an approach which renders your Angular applicati You can easily add SSR support to your existing ABP Angular application using the Angular CLI with ABP schematics: +> Adds SSR configuration to your project ```bash -# Generate SSR configuration for your project ng generate @abp/ng.schematics:ssr-add - -# Or using the short form +``` +> Short form +```bash ng g @abp/ng.schematics:ssr-add ``` - If you have multiple projects in your workspace, you can specify which project to add SSR to: ```bash diff --git a/docs/en/Community-Articles/2025-11-19-ABP-BLACK-FRIDAY-BLOG/post.md b/docs/en/Community-Articles/2025-11-19-ABP-BLACK-FRIDAY-BLOG/post.md new file mode 100644 index 0000000000..153470666f --- /dev/null +++ b/docs/en/Community-Articles/2025-11-19-ABP-BLACK-FRIDAY-BLOG/post.md @@ -0,0 +1,25 @@ +**ABP Black Friday Deals are Almost Here\!** + +The season of huge savings is back\! We are happy to announce **ABP Black Friday Campaign**, packed with exclusive deals that you simply won't want to miss. Whether you are ready to start building with ABP or looking to expand your existing license, this is your chance to maximize your savings\! + +**Campaign Dates: Mark Your Calendar** + +Black Friday campaign is live for one week only\! Our deals run from: **November 24th \- December 1st.** + +Don't miss this limited-time opportunity to **save up to $3,000** and take your software development to the next level. + +**What's Included in the ABP Black Friday Campaign?** + +Here’s why this campaign is the best time to buy or upgrade: + +* Open to Everyone: This campaign is available for both new and existing customers. +* Stack Your Savings: You can combine this Black Friday offer with our multi-year discounts for the greatest possible value. +* Flexible Upgrades: Planning to upgrade to a higher package? Now is the perfect time to make that move at a lower cost. +* More Developer Seats? No Problem\! Additional developer seats are also eligible under this campaign, allowing you to grow your team effortlessly and affordably. + +**Save Money Now\!** + +This campaign is your best opportunity all year to unlock advanced features, scale your team, or upgrade your plan while **saving up to $3,000.** Secure your savings before the campaign ends on December 1st\! + +[**Visit Pricing Page to Explore Offers\!**](https://abp.io/pricing) + diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/Post.md b/docs/en/Community-Articles/2025-11-21-AntiGravity/Post.md new file mode 100644 index 0000000000..d5e34e7892 --- /dev/null +++ b/docs/en/Community-Articles/2025-11-21-AntiGravity/Post.md @@ -0,0 +1,158 @@ +# My First Look and Experience with Google AntiGravity + +## Is Google AntiGravity Going to Replace Your Main Code Editor? + +Today, I tried the new code-editor AntiGravity by Google. *"It's beyond a code-editor*" by Google 🙄 +When I first launch it, I see the UI is almost same as Cursor. They're both based on Visual Studio Code. +That's why it was not hard to find what I'm looking for. + +First of all, the main difference as I see from the Cursor is; when I type a prompt in the agent section **AntiGravity first creates a Task List** (like a road-map) and whenever it finishes a task, it checks the corresponding task. Actually Cursor has a similar functionality but AntiGravity took it one step further. + +Second thing which was good to me; AntiGravity uses [Nano Banana 🍌](https://gemini.google/tr/overview/image-generation/). This is Google's AI image generation model... Why it's important because when you create an app, you don't need to search for graphics, deal with image licenses. **AntiGravity generates images automatically and no license is required!** + +Third exciting feature for me; **AntiGravity is integrated with Google Chrome and can communicate with the running website**. When I first run my web project, it installed a browser extension which can see and interact with my website. It can see the results, click somewhere else on the page, scroll, fill up the forms, amazing 😵 + +Another feature I loved is that **you can enter a new prompt even while AntiGravity is still generating a response** 🧐. It instantly prioritizes the latest input and adjusts the ongoing process if needed. But in Cursor, if you add a prompt before the cursor finishes, it simply queues it and runs it later 😔. + +And lastly, **AntiGravity is working very good with Gemini 3**. + +Well, everything was not so perfect 😥 When I tried AntiGravity, couple of times it stucked AI generation and Agent stopped. I faced errors like this 👇 + +![Errors](errors.png) + + + +## Debugging .NET Projects via AntiGravity + +⚠ There's a crucial development issue with AntiGravity (and also for Cursor, Windsurf etc...) 🤕 you **cannot debug your .NET application with AntiGravity 🥺.** *This is Microsoft's policy!* Microsoft doesn't allow debugging for 3rd party IDEs and shows the below error... That's why I cannot say it's a downside of AntiGravity. You need to use Microsft's original VS Code, Visual Studio or Rider for debugging. But wait a while there's a workaround for this, I'll let you know in the next section. + + + +![Debugging](debug.png) + +### What does this error mean? + +AntiGravity, Cursor, Windsurf etc... are using Visual Studio Code and the C# extension for VS Code includes the Microsoft .NET Core Debugger "*vsdbg*". +VS Code is open-source but "*vsdbg*" is not open-source! It's working only with Visual Studio Code, Visual Studio and Visual Studio for Mac. This is clearly stated at [Microsoft's this link](https://github.com/dotnet/vscode-csharp/blob/main/docs/debugger/Microsoft-.NET-Core-Debugger-licensing-and-Microsoft-Visual-Studio-Code.md). + +### Ok! How to resolve debugging issue with AntiGravity? and Cursor and Windsurf... + +There's a free C# debugger extension for Visual Studio Code based IDEs that supports AntiGravity, Cursor and Windsurf. The extension name is **C#**. +You can download this free C# debugger extension at 👉 [open-vsx.org/extension/muhammad-sammy/csharp/](https://open-vsx.org/extension/muhammad-sammy/csharp/). +For AntiGravity open Extension window (*Ctrl + Shift + X*) and search for `C#`, there you'll see this extension. + +![C# Debugging Extension](csharp-debug-extension.png) + +After installing, I restarted AntiGravity and now I can see the red circle which allows me to add breakpoint on C# code. + +![Add C# Breakpoint](breakpoint.png) + +### Another Extension For Debugging .NET Apps on VS Code + +Recently I heard about DotRush extension from the folks. As they say DotRush works slightly faster and support Razor pages (.cshtml files). +Here's the link for DotRush https://github.com/JaneySprings/DotRush + +### Finding Website Running Port + +When you run the web project via C# debugger extension, normally it's not using the `launch.json` therefore the website port is not the one when you start from Visual Studio / Rider... So what's my website's port which I just run now? Normally for ASP.NET Core **the default port is 5000**. You can try navigating to http://localhost:5000/. +Alternatively you can write the below code in `Program.cs` which prints the full address of your website in the logs. +If you do the steps which I showed you, you can debug your C# application via AntiGravity and other VS Code derivatives. + +![Find Website Port](find-website-port.png) + +## How Much is AntiGravity? 💲 + +Currently there's only individual plan is available for personal accounts and that's free 👏! The contents of Team and Enterprise plans and prices are not announced yet. But **Gemini 3 is not free**! I used it with my company's Google Workspace account which we normally pay for Gemini. + +![Pricing](pricing.png) + +## More About AntiGravity + +There have been many AI assisted IDEs like [Windsurf](https://windsurf.com/), [Cursor](https://cursor.com/), [Zed](https://zed.dev/), [Replit](https://replit.com/) and [Fleet](https://www.jetbrains.com/fleet/). But this time it's different, this is backed by Google. +As you see from the below image AntiGravity, uses a standard grid layout as others based on VS Code editor. +It's very similar to Cursor, Visual Studio, Rider. + +![AntiGravity UI](anti-gravity-ui.png) + +## Supported LLMs 🧠 + +Antigravity offers the below models which supports reasoning: Gemini 3 Pro, Claude Sonnet 4.5, GPT-OSS + +![LLMs](llms.png) + +Antigravity uses other models for supportive tasks in the background: + +- **Nano banana**: This is used to generate images. +- **Gemini 2.5 Pro UI Checkpoint**: It's for the browser subagent to trigger browser action such as clicking, scrolling, or filling in input. +- **Gemini 2.5 Flash**: For checkpointing and context summarization, this is used. +- **Gemini 2.5 Flash Lite**: And when it's need to make a semantic search in your code-base, this is used. + +## AntiGravity Can See Your Website + +This makes a big difference from traditional IDEs. AntiGravity's browser agent is taking screenshots of your pages when it needs to check. This is achieved by a Chrome Extension as a tool to the agent, and you can also prompt the agent to take a screenshot of a page. It can iterate on website designs and implementations, it can perform UI Testing, it can monitor dashboards, it can automate routine tasks like rerunning CI. +This is the link for the extension 👉 [chromewebstore.google.com/detail/antigravity-browser-exten/eeijfnjmjelapkebgockoeaadonbchdd](https://chromewebstore.google.com/detail/antigravity-browser-exten/eeijfnjmjelapkebgockoeaadonbchdd). AntiGravity will install this extension automatically on the first run. + +![Browser Extension](extension.png) + +![Extension Features](extension-features.png) + +## MCP Integration + +### When Do We Need MCP in a Code Editor? + +Simply if we want to connect to a 3rd party service to complete our task we need MCP. So AntiGravity can connect to your DB and write proper SQL queries or it can pull in recent build logs from Netlify or Heroku. Also you can ask AntiGravity to to connect GitHub for finding the best authentication pattern. + +### AntiGravity Supports These MCP Servers + +Airweave, AlloyDB for PostgreSQL, Atlassian, BigQuery, Cloud SQL for PostgreSQL, Cloud SQL for MySQL, Cloud SQL for SQL Server, Dart, Dataplex, Figma Dev Mode MCP, Firebase, GitHub, Harness, Heroku, Linear, Locofy, Looker, MCP Toolbox for Databases, MongoDB, Neon, Netlify, Notion, PayPal, Perplexity Ask, Pinecone, Prisma, Redis, Sequential Thinking, SonarQube, Spanner, Stripe and Supabase. + +![MCP](mcp.png) + +## Agent Settings ⚙️ + +The major settings of Agent are: + +- **Agent Auto Fix Lints**: I enabled this setting because I want the Agent automatically fixes its own mistakes for invalid syntax, bad formatting, unused variables, unreachable code or following coding standards... It makes extra tool calls that's why little bit expensive 🥴. +- **Auto Execution**: Sometimes Agent tries to build application or writing test code and running it, in these cases it executes command. I choose "Turbo" 🤜 With this option, Agent always runs the terminal command and controls my browser. +- **Review Policy**: How much control you are giving to agent 🙎. I choose "Always Proceed" 👌 because I mostly trust AI 😀. The Agent will never ask for review. + +![Agent Settings](agent-settings.png) + +## Differences Between Cursor and AntiGravity + +While Cursor was the champion of AI code editors, **Antigravity brings a different philosophy**. + +### 1. "Agent-First 🤖" vs "You-First 🤠" + +- **Cursor:** It acts like an assistant; it predicts your next move, auto-completes your thoughts, and helps you refactor while you type. You are still the driver; Cursor just drives the car at 200 km/h. +- **Antigravity:** Antigravity is built to let you manage coding tasks. It is "Agent-First." You don't just type code; you assign tasks to autonomous agents (e.g., "Fix the bug in the login flow and verify it in the browser"). It behaves more like a junior developer that you supervise. + +### 2. The Interface + +- **Cursor:** Looks and feels exactly like **VS Code**. If you know VS Code, you know Cursor. + +- **Antigravity:** Introduces 2 major layouts: + - **Editor View:** Similar to a standard IDE + - **Manager View:** A dashboard where you see multiple "Agents" working in parallel. You can watch them plan, execute, and test tasks asynchronously. + +### 3. Verification & Trust + +- **Cursor:** You verify by reading the code diffs it suggests. +- **Antigravity:** Introduces **Artifacts**... Since the agents work autonomously, they generate proof-of-work documents, screenshots of the app running, browser logs and execution plans. So you can verify what they did without necessarily reading every line of code immediately. + +### 4. Capabilities + +- **Cursor:** Best-in-class **Autocomplete** ("Tab" feature) and **Composer** (multi-file editing). It excels at "Vibe Coding". It's getting into a flow state where the AI writes the boilerplate and you direct the logic. +- **Antigravity:** Is good at **Autonomous Execution**. It has a built-in browser and terminal that the *Agent* controls. The Agent can write code, run the server, open the browser, see the error, and fix it 😎 + +### 5. AI Models (Brains 🧠) + +- **Cursor:** Model Agnostic. You can switch between **Claude 3.5 Sonnet** *-mostly the community uses this-*, GPT-4o, and others. +- **Antigravity:** Built deeply around **Gemini 3 Pro**. It leverages Gemini's massive context window (1M+ tokens) to understand huge mono repos without needing as much "RAG" as Cursor. + + + +## Try It Yourself Now 🤝 + +If you are ready to experience the new AI code editor by Google, download and use 👇 +[**Launch Google AntiGravity**](https://antigravity.google/) \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/agent-settings.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/agent-settings.png new file mode 100644 index 0000000000..a659c244c5 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/agent-settings.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/anti-gravity-ui.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/anti-gravity-ui.png new file mode 100644 index 0000000000..885284dd56 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/anti-gravity-ui.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/breakpoint.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/breakpoint.png new file mode 100644 index 0000000000..0ef01d71a3 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/breakpoint.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/cover.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/cover.png new file mode 100644 index 0000000000..b2ec245a2f Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/cover.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/csharp-debug-extension.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/csharp-debug-extension.png new file mode 100644 index 0000000000..6807c3f6bc Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/csharp-debug-extension.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/debug.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/debug.png new file mode 100644 index 0000000000..c4674a89f3 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/debug.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/errors.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/errors.png new file mode 100644 index 0000000000..f8c2e43dac Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/errors.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/extension-features.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/extension-features.png new file mode 100644 index 0000000000..cd0b07cabf Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/extension-features.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/extension.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/extension.png new file mode 100644 index 0000000000..601a28849a Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/extension.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/find-website-port.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/find-website-port.png new file mode 100644 index 0000000000..183e8c6f5b Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/find-website-port.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/image-20251123185724281.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/image-20251123185724281.png new file mode 100644 index 0000000000..82b8f478e1 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/image-20251123185724281.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/llms.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/llms.png new file mode 100644 index 0000000000..82b8f478e1 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/llms.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/mcp.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/mcp.png new file mode 100644 index 0000000000..06a343f068 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/mcp.png differ diff --git a/docs/en/Community-Articles/2025-11-21-AntiGravity/pricing.png b/docs/en/Community-Articles/2025-11-21-AntiGravity/pricing.png new file mode 100644 index 0000000000..0b552352e3 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-21-AntiGravity/pricing.png differ diff --git a/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/coverimage.png b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/coverimage.png new file mode 100644 index 0000000000..b264e259e9 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/coverimage.png differ diff --git a/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/chat-history-hybrid.svg b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/chat-history-hybrid.svg new file mode 100644 index 0000000000..ab1bb36114 --- /dev/null +++ b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/chat-history-hybrid.svg @@ -0,0 +1,114 @@ + + + + + + + Hybrid Chat History: Truncation + RAG on History + + + + + + Full Chat History + + + (100 messages, 20K tokens) + + + + + Messages 1-10 (1 day ago) + + + Messages 11-20 (12 hours ago) + + ... + + + Messages 81-90 + + + Messages 91-100 (Last 10) + + + + + + + + + + + + Old Messages + Recent Messages + + + + + Vector DB + + + (Long-term Memory) + + + Messages 1-90 with embeddings + + + Tool: SearchChatHistory() + + + + + + Prompt (Short-term) + + + Messages 91-100 + + + Truncation (Last 10 messages) + + + Low tokens, fast + + + + + + + + + LLM + + + Short-term context + + + + Long-term memory via tool + + + access when needed + + + + + + ✅ Hybrid Approach Benefits + + + + + + Low Cost: Only last 10 messages in prompt per request (truncation) + + + + + + + High Fidelity: LLM can access old messages via SearchChatHistory tool when needed + + + \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/mcp-architecture.svg b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/mcp-architecture.svg new file mode 100644 index 0000000000..ee590d27eb --- /dev/null +++ b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/mcp-architecture.svg @@ -0,0 +1,150 @@ + + + + + + + Model Context Protocol (MCP): Out-of-Process Tools + + + + + MCP Hosts (Clients) + + + + + + Semantic Kernel + + + (.NET Agent) + + + + + + + VS Code Copilot + + + (.vscode/mcp.json) + + + + + + + Claude Desktop + + + (Anthropic) + + + + + + + + + + + + + + + + stdio/http + + + JSON-RPC + + + + + + MCP Protocol + + + (Standardized Interface) + + + ModelContextProtocol SDK + + + + + + + + + + MCP Servers (Tools) + + + + + + filesystem.mcp.exe + + + ReadFile(), ListFiles() + + + (.NET Console App) + + + + + + + sqlserver.mcp.exe + + + ExecuteQuery(), GetSchema() + + + (.NET Console App) + + + + + + + github.mcp.js + + + CreateIssue(), GetPR() + + + (Node.js / TypeScript) + + + + + + + ✅ MCP Benefits + + + + + + Reusability: Write once, use everywhere (SK, VS Code, Claude) + + + + + + + Independence: MCP server runs separately, doesn't affect main app (out-of-process) + + + + + + + Language Agnostic: Can be written in C#, Python, Node.js, everyone speaks same protocol + + + \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/multilingual-rag.svg b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/multilingual-rag.svg new file mode 100644 index 0000000000..81173091f0 --- /dev/null +++ b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/multilingual-rag.svg @@ -0,0 +1,135 @@ + + + + + + + Multilingual RAG: Query Translation Pattern + + + + + + User Query + + + 🇹🇷 "Yazıcıyı ağa + + + nasıl bağlarım?" + + + + + + + + + + + + Tool 1 + + + + + + TranslationPlugin + + + TranslateText() + + + Target: English + + + + + + Tool 2 + + + + + RAGPlugin + + + 🇬🇧 "How do I connect + + + the printer to network?" + + + + + + Vector Search + + + + + Vector DB + + + (English Docs) + + + "Navigate to Settings + + + > Network > Wi-Fi..." + + + + + + + + Retrieved Context + + + 🇬🇧 English text + + + (Manual excerpt) + + + + + + + + + LLM (GPT-5) + + + Context: [English] + + + Generates: [Turkish Response] + + + + + + + + + Response to User + + + 🇹🇷 "Ayarlar > Ağ > + + + Wi-Fi bölümüne gidin..." + + + + + + ✅ Benefit: Single language (English) docs, multi-language query support + + + Tool Chain: TranslationPlugin → RAGPlugin → LLM Final Generation (Original language) + + \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/pgvector-integration.svg b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/pgvector-integration.svg new file mode 100644 index 0000000000..2903740e57 --- /dev/null +++ b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/pgvector-integration.svg @@ -0,0 +1,112 @@ + + + + + + + PostgreSQL + pgvector: Integrated RAG with EF Core + + + + + + .NET Application + + + (EF Core DbContext) + + + + + + + + + + + + LINQ Query + + + + + + Pgvector.EntityFrameworkCore + + + CosineDistance(), L2Distance() + + + EF Core Extensions + + + + + + SQL Query + + + + + + PostgreSQL + pgvector + + + + + + + + id + content + embedding + + + + + 1 + Contoso... + [0.2, -0.1,...] + + 2 + Revenue... + [0.5, 0.3,...] + + + + + + ✅ Benefits + + + + + + Existing SQL Knowledge: PostgreSQL is already a familiar database + + + + + + + EF Core Integration: Vector queries with LINQ (.OrderBy(), .Where()) + + + + + + + Metadata JOIN: Vector + Relational data in same query (tenant_id, user_id...) + + + + + + + ACID Compliant: Transaction support (rollback, commit) + + + + + + \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/rag-parent-child.svg b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/rag-parent-child.svg new file mode 100644 index 0000000000..752c2c42b1 --- /dev/null +++ b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/rag-parent-child.svg @@ -0,0 +1,118 @@ + + + + + + + Parent-Child RAG Pattern: Search Small, Respond Large + + + + + Original Document + + + + Parent 1 (800 token) + + + Parent 2 (800 token) + + + Parent 3... + + + + + + + + + + + + + + + + + + + Child Chunks + (In Vector DB) + + + + + Child 1.1 (100 token) [ParentID=1] + + + + + Child 1.2 (100 token) [ParentID=1] + + + + + Child 1.3 (100 token) [ParentID=1] + + + + + Child 2.1 (100 token) [ParentID=2] + + + + + Child 2.2... + + + + + User Query + "What was Contoso's + 2024 revenue?" + + + + 1. Vector Search + (On Child chunks) + + + + Best Match + Child 1.2 (Score: 0.95) + + + + + + 2. Fetch Parent via + ParentID + + + + Retrieved Parent Chunk + Parent 1 (800 tokens) + Full context + details + + + + 3. Send to LLM + + + + LLM Response + "Contoso's 2024 + revenue was $2.5 billion + as reported." + + + + + ✅ Benefit: Precise search (Child) + Rich context (Parent) = Optimal quality + + + Alternative: Only large chunks → Lower precision | Only small chunks → Insufficient context + + \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/reasoning-effort-diagram.svg b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/reasoning-effort-diagram.svg new file mode 100644 index 0000000000..fc6a18d68d --- /dev/null +++ b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/reasoning-effort-diagram.svg @@ -0,0 +1,60 @@ + + + + + + + ReasoningEffortLevel: Cost vs Quality + + + + + + + + High + Medium + Low + + + + Quality / Cost + + + + + + Minimal + Fast + Cheap + + + + + Low + Simple Queries + + + + + Medium + Standard + + + + + High + Complex + Coding + + + + + + + + + + + Increasing Cost (Reasoning Tokens ↑) + + \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/svg-diagram-example.svg b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/svg-diagram-example.svg new file mode 100644 index 0000000000..6087893702 --- /dev/null +++ b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/svg-diagram-example.svg @@ -0,0 +1,149 @@ + + + + + + + PostgreSQL + pgvector Architecture + + + + + + + .NET Application + + + + + + Web API / + + + Controllers + + + + + + Business Logic / + + + Services + + + + + + Data Access + + + Layer + + + + + + + + + + + + ORM + + + + + + Entity Framework + + + Core + + + DbContext + + + LINQ Queries + + + + + + Npgsql + + + + + + PostgreSQL + + + + + + Relational Tables + + + (Standard Data) + + + + + + pgvector + + + Vector Storage + + + + + + Vector Search + + + Similarity Queries + + + (<=>, <->, <#>) + + + + + + + + + + + Search Results + + + • Embeddings + + + • Similarity Score + + + • Ranked Results + + + + + + + + + + Data Flow: + + + 1. .NET → EF Core → PostgreSQL (Data Operations) + + + 2. Vector Similarity Search with pgvector + + + \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/post.md b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/post.md new file mode 100644 index 0000000000..8fa2067d01 --- /dev/null +++ b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/post.md @@ -0,0 +1,414 @@ +# Building Production-Ready LLM Applications with .NET: A Practical Guide + +Large Language Models (LLMs) have evolved rapidly, and integrating them into production .NET applications requires staying current with the latest approaches. In this article, I'll share practical tips and patterns I've learned while building LLM-powered systems, covering everything from API changes in GPT-5 to implementing efficient RAG (Retrieval Augmented Generation) architectures. + +Whether you're building a chatbot, a knowledge base assistant, or integrating AI into your enterprise applications, these production-tested insights will help you avoid common pitfalls and build more reliable systems. + +## The Temperature Paradigm Shift: GPT-5 Changes Everything + +If you've been working with GPT-4 or earlier models, you're familiar with the `temperature` and `top_p` parameters for controlling response randomness. **Here's the critical update**: GPT-5 no longer supports these parameters! + +### The Old Way (GPT-4) +```csharp +var chatRequest = new ChatOptions +{ + Temperature = 0.7, // ✅ Worked with GPT-4 + TopP = 0.9 // ✅ Worked with GPT-4 +}; +``` + +### The New Way (GPT-5) +```csharp +var chatRequest = new ChatOptions +{ + RawRepresentationFactory = (client => new ChatCompletionOptions() + { +#pragma warning disable OPENAI001 + ReasoningEffortLevel = "minimal", +#pragma warning restore OPENAI001 + }) +}; +``` + +**Why the change?** GPT-5 incorporates an internal reasoning and verification process. Instead of controlling randomness, you now specify how much computational effort the model should invest in reasoning through the problem. + +![Reasoning Effort Levels](images/reasoning-effort-diagram.svg) + +### Choosing the Right Reasoning Level + +- **Low**: Quick responses for simple queries (e.g., "What's the capital of France?") +- **Medium**: Balanced approach for most use cases +- **High**: Complex reasoning tasks (e.g., code generation, multi-step problem solving) + +> **Pro Tip**: Reasoning tokens are included in your API costs. Use "High" only when necessary to optimize your budget. + +## System Prompts: The "Lost in the Middle" Problem + +Here's a critical insight that can save you hours of debugging: **Important rules must be repeated at the END of your prompt!** + +### ❌ What Doesn't Work +``` +You are a helpful assistant. +RULE: Never share passwords or sensitive information. + +[User Input] +``` + +### ✅ What Actually Works +``` +You are a helpful assistant. +RULE: Never share passwords or sensitive information. + +[User Input] + +⚠️ REMINDER: Apply the rules above strictly, ESPECIALLY regarding passwords. +``` + +**Why?** LLMs suffer from the "Lost in the Middle" phenomenon—they pay more attention to the beginning and end of the context window. Critical instructions buried in the middle are often ignored. + +## RAG Architecture: The Parent-Child Pattern + +Retrieval Augmented Generation (RAG) is essential for grounding LLM responses in your own data. The most effective pattern I've found is the **Parent-Child approach**. + +![RAG Parent-Child Architecture](images/rag-parent-child.svg) + +### How It Works + +1. **Split documents into hierarchies**: + - **Parent chunks**: Large sections (1000-2000 tokens) for context + - **Child chunks**: Small segments (200-500 tokens) for precise retrieval + +2. **Store both in vector database** with references + +3. **Query flow**: + - Search using child chunks (higher precision) + - Return parent chunks to LLM (richer context) + +### The Overlap Strategy + +Always use overlapping chunks to prevent information loss at boundaries! + +``` +Chunk 1: Token 0-500 +Chunk 2: Token 400-900 ← 100 token overlap +Chunk 3: Token 800-1300 ← 100 token overlap +``` + +**Standard recommendation**: 10-20% overlap (for 500 tokens, use 50-100 token overlap) + +### Implementation with Semantic Kernel + +```csharp +using Microsoft.SemanticKernel.Text; + +var chunks = TextChunker.SplitPlainTextParagraphs( + documentText, + maxTokensPerParagraph: 500, + overlapTokens: 50 +); + +foreach (var chunk in chunks) +{ + var embedding = await embeddingService.GenerateEmbeddingAsync(chunk); + await vectorDb.StoreAsync(chunk, embedding); +} +``` + +## PostgreSQL + pgvector: The Pragmatic Choice + +For .NET developers, choosing a vector database can be overwhelming. After evaluating multiple options, **PostgreSQL with pgvector** is the most practical choice for most scenarios. + +![pgvector Integration](images/pgvector-integration.svg) + +### Why pgvector? + +✅ **Use existing SQL knowledge** - No new query language to learn +✅ **EF Core integration** - Works with your existing data access layer +✅ **JOIN with metadata** - Combine vector search with traditional queries +✅ **WHERE clause filtering** - Filter by tenant, user, date, etc. +✅ **ACID compliance** - Transaction support for data consistency +✅ **No separate infrastructure** - One database for everything + +### Setting Up pgvector with EF Core + +First, install the NuGet package: + +```bash +dotnet add package Pgvector.EntityFrameworkCore +``` + +Define your entity: + +```csharp +using Pgvector; +using Pgvector.EntityFrameworkCore; + +public class DocumentChunk +{ + public Guid Id { get; set; } + public string Content { get; set; } + public Vector Embedding { get; set; } // 👈 pgvector type + public Guid ParentChunkId { get; set; } + public DateTime CreatedAt { get; set; } +} +``` + +Configure in DbContext: + +```csharp +protected override void OnModelCreating(ModelBuilder builder) +{ + builder.HasPostgresExtension("vector"); + + builder.Entity() + .Property(e => e.Embedding) + .HasColumnType("vector(1536)"); // 👈 OpenAI embedding dimension + + builder.Entity() + .HasIndex(e => e.Embedding) + .HasMethod("hnsw") // 👈 Fast approximate search + .HasOperators("vector_cosine_ops"); +} +``` + +### Performing Vector Search + +```csharp +using Pgvector.EntityFrameworkCore; + +public async Task> SearchAsync(string query) +{ + // 1. Convert query to embedding + var queryVector = await _embeddingService.GetEmbeddingAsync(query); + + // 2. Search + return await _context.DocumentChunks + .OrderBy(c => c.Embedding.L2Distance(queryVector)) // 👈 Lower is better + .Take(5) + .ToListAsync(); +} +``` + +**Source**: [Pgvector.NET on GitHub](https://github.com/pgvector/pgvector-dotnet?tab=readme-ov-file#entity-framework-core) + +## Smart Tool Usage: Make RAG a Tool, Not a Tax + +A common mistake is calling RAG on every single user message. This wastes tokens and money. Instead, **make RAG a tool** and let the LLM decide when to use it. + +### ❌ Expensive Approach +```csharp +// Always call RAG, even for "Hello" +var context = await PerformRAG(userMessage); +var response = await chatClient.CompleteAsync($"{context}\n\n{userMessage}"); +``` + +### ✅ Smart Approach +```csharp +[KernelFunction] +[Description("Search the company knowledge base for information")] +public async Task SearchKnowledgeBase( + [Description("The search query")] string query) +{ + var results = await _vectorDb.SearchAsync(query); + return string.Join("\n---\n", results.Select(r => r.Content)); +} +``` + +The LLM will call `SearchKnowledgeBase` only when needed: +- "Hello" → No tool call +- "What was our 2024 revenue?" → Calls tool +- "Tell me a joke" → No tool call + +## Multilingual RAG: Query Translation Strategy + +When your documents are in one language (e.g., English) but users query in another (e.g., Turkish), you need a translation strategy. + +![Multilingual RAG Architecture](images/multilingual-rag.svg) + +### Solution Options + +**Option 1**: Use an LLM that automatically calls tools in English +- Many modern LLMs can do this if properly instructed + +**Option 2**: Tool chain approach +```csharp +[KernelFunction] +[Description("Translate text to English")] +public async Task TranslateToEnglish(string text) +{ + // Translation logic +} + +[KernelFunction] +[Description("Search knowledge base (English only)")] +public async Task SearchKnowledgeBase(string englishQuery) +{ + // Search logic +} +``` + +The LLM will: +1. Call `TranslateToEnglish("2024 geliri nedir?")` +2. Get "What was 2024 revenue?" +3. Call `SearchKnowledgeBase("What was 2024 revenue?")` +4. Return results and respond in Turkish + +## Model Context Protocol (MCP): Beyond In-Process Tools + +Microsoft and Anthropic recently released official C# SDKs for the Model Context Protocol (MCP). This is a game-changer for tool reusability. + +![MCP Architecture](images/mcp-architecture.svg) + +### MCP vs. Semantic Kernel Plugins + +| Feature | SK Plugins | MCP Servers | +|---------|-----------|-------------| +| **Process** | In-process | Out-of-process (stdio/http) | +| **Reusability** | Application-specific | Cross-application | +| **Examples** | Used within your app | VS Code Copilot, Claude Desktop | + +### Creating an MCP Server + +```csharp +using Microsoft.Extensions.Hosting; +using ModelContextProtocol.Extensions.Hosting; + +var builder = Host.CreateEmptyApplicationBuilder(settings: null); + +builder.Services.AddMcpServer() +.WithStdioServerTransport() +.WithToolsFromAssembly(); + +await builder.Build().RunAsync(); +``` + +Define your tools: + +```csharp +[McpServerToolType] +public static class FileSystemTools +{ + [McpServerTool, Description("Read a file from the file system")] + public static async Task ReadFile(string path) + { + // ⚠️ SECURITY: Always validate paths! + if (!IsPathSafe(path)) + throw new SecurityException("Invalid path"); + + return await File.ReadAllTextAsync(path); + } + + private static bool IsPathSafe(string path) + { + // Implement path traversal prevention + var fullPath = Path.GetFullPath(path); + return fullPath.StartsWith(AllowedDirectory); + } +} +``` + +Your MCP server can now be used by VS Code Copilot, Claude Desktop, or any other MCP client! + +## Chat History Management: Truncation + RAG Hybrid + +For long conversations, storing all history in the context window becomes impractical. Here's the pattern that works: + +![Chat History Hybrid Strategy](images/chat-history-hybrid.svg) + +### ❌ Lossy Approach +``` +First 50 messages → Summarize with LLM → Single summary message +``` +**Problem**: Detail loss (fidelity loss) + +### ✅ Hybrid Approach +1. **Recent messages** (last 5-10): Keep in prompt for immediate context +2. **Older messages**: Store in vector database as a tool + +```csharp +[KernelFunction] +[Description("Search conversation history for past discussions")] +public async Task SearchChatHistory( + [Description("What to search for")] string query) +{ + var relevantMessages = await _vectorDb.SearchAsync(query); + return string.Join("\n", relevantMessages.Select(m => + $"[{m.Timestamp}] {m.Role}: {m.Content}")); +} +``` + +The LLM retrieves only relevant past context when needed, avoiding summary-induced information loss. + +## RAG vs. Fine-Tuning: Choose Wisely + +A common misconception is using fine-tuning for knowledge injection. Here's when to use each: + +| Purpose | RAG | Fine-Tuning | +|---------|-----|-------------| +| **Goal** | Memory (provide facts) | Behavior (teach style) | +| **Updates** | Dynamic (add docs anytime) | Static (requires retraining) | +| **Cost** | Low dev, higher inference | High dev, lower inference | +| **Hallucination** | Reduces | Doesn't reduce | +| **Use Case** | Company docs, FAQs | Brand voice, specific format | + +**Common mistake**: "Let's fine-tune on our company documents" ❌ +**Better approach**: Use RAG! ✅ + +Fine-tuning is for teaching the model *how* to respond, not *what* to know. + +**Source**: [Oracle - RAG vs Fine-Tuning](https://www.oracle.com/artificial-intelligence/generative-ai/retrieval-augmented-generation-rag/rag-fine-tuning/) + +## Bonus: Why SVG is Superior for LLM-Generated Images + +When using LLMs to generate diagrams and visualizations, always request SVG format instead of PNG or JPG. + +### Why SVG? + +✅ **Text-based** → LLMs produce better results +✅ **Lower cost** → Fewer tokens than base64-encoded images +✅ **Editable** → Easy to modify after generation +✅ **Scalable** → Perfect quality at any size +✅ **Version control friendly** → Works great in Git + +### Example Prompt + +``` +Create an architecture diagram showing PostgreSQL with pgvector integration. +Format: SVG, 800x400 pixels. Show: .NET Application → EF Core → PostgreSQL → Vector Search. +Use arrows to connect stages. Color scheme: Blue tones. +``` + +![SVG Diagram Example](images/svg-diagram-example.svg) + +All diagrams in this article were generated as SVG, resulting in excellent quality and lower token costs! + +> **Pro Tip**: If you don't need photographs or complex renders, always choose SVG. + +## Architecture Roadmap: Putting It All Together + +Here's the recommended stack for building production LLM applications with .NET: + +1. **Orchestration**: Microsoft.Extensions.AI + Semantic Kernel (when needed) +2. **Vector Database**: PostgreSQL + Pgvector.EntityFrameworkCore +3. **RAG Pattern**: Parent-Child chunks with 10-20% overlap +4. **Tools**: MCP servers for reusability +5. **Reasoning**: ReasoningEffortLevel instead of temperature +6. **Prompting**: Critical rules at the end +7. **Cost Optimization**: Make RAG a tool, not automatic + +## Key Takeaways + +Let me summarize the most important production tips: + +1. **Temperature is gone** → Use `ReasoningEffortLevel` with GPT-5 +2. **Rules at the end** → Combat "Lost in the Middle" +3. **RAG as a tool** → Reduce costs significantly +4. **Parent-Child pattern** → Search small, respond with large +5. **Always use overlap** → 10-20% is the standard +6. **pgvector for most cases** → Unless you have billions of vectors +7. **MCP for reusability** → One codebase, works everywhere +8. **SVG for diagrams** → Better results, lower cost +9. **Hybrid chat history** → Recent in prompt, old in vector DB +10. **RAG > Fine-tuning** → For knowledge, not behavior + +Happy coding! 🚀 \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/summary.md b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/summary.md new file mode 100644 index 0000000000..fb1d41af5c --- /dev/null +++ b/docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/summary.md @@ -0,0 +1 @@ +Learn how to build production-ready LLM applications with .NET. This comprehensive guide covers GPT-5 API changes, advanced RAG architectures with parent-child patterns, PostgreSQL pgvector integration, smart tool usage strategies, multilingual query handling, Model Context Protocol (MCP) for cross-application tool reusability, and chat history management techniques for enterprise applications. diff --git a/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/POST.md b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/POST.md new file mode 100644 index 0000000000..6f8dfb96a1 --- /dev/null +++ b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/POST.md @@ -0,0 +1,60 @@ +# .NET Conf China 2025: Changing the World, Changing Ourselves - See You Again in Shanghai + +![](./images/1.png) + +.NET Conf China 2025 is an annual community event for developers, celebrating the release of .NET 10 (LTS) and the achievements of the past year in China. As an extension of .NET Conf 2025, this event brings together local tech communities, well-known companies, and open-source organizations. It has become the largest .NET online and offline conference in China, dedicated to spreading .NET technology in Chinese and fostering collaboration and exchange. + +## Event Highlights: Key Topics and Takeaways + +This year’s conference focused on three main themes: performance improvements, AI integration, and cross-platform development. Topics covered how to achieve performance gains while maintaining engineering quality, balancing between multi-platform consistency and native capabilities, and taking generative AI from “demo-level” to “production-ready.” On the community and ecosystem side, the event showcased the .NET Foundation’s and domestic and international companies’ progress in supporting architectures like ARM, LoongArch, and RISC-V. It also highlighted best practices in DevOps, observability, and engineering toolchains, creating a complete path from ideas to implementation. + +### Opening Keynote + +Scott Hanselman kicked off .NET Conf China 2025 with a video keynote, announcing that .NET 10 is now available on the official website. He framed the release around four pillars—AI, cloud-native, cross-platform, and performance—including integration with the Microsoft Agent Framework for building and orchestrating multi-agent systems in .NET/C#, industry-leading container and Kubernetes support with .NET Aspire simplifying local containerized development, a richer cross-platform desktop ecosystem (.NET MAUI, Avalonia, Uno Platform), and major performance gains such as Native AOT and single-file publishing for faster startup and easier distribution across platforms. + +He underscored China’s importance as .NET’s second-largest market, with roughly 13% of users, and noted that generative AI usage in China has doubled in 2025. The local community is seeing strong momentum around ML.NET, .NET Aspire, and the C# Dev Kit in VS Code. Reflecting on his Baby Smash game written 20 years ago, which now runs cross-platform on .NET 10, he called on developers to modernize: move existing Web, WinForms, and WPF apps to the cloud, improve performance, ship as a single executable, and weave in AI capabilities. + +On AI, he emphasized a human-centered stance: AI and agents should augment, not replace, developers. In the future, developers will orchestrate and govern agents, and human judgment will matter more than ever. He closed by thanking the open-source community for its many proposals and pull requests, stressing that .NET is an open-source platform built together by Microsoft and the community, and wishing everyone an inspiring conference and a joyful journey with .NET 10. + +![2](./images/2.png) + +### Roundtable Discussion + +The roundtable discussion, titled “Empowering with AI, Breaking Through Cross-Platform Barriers, and Ecosystem Innovation,” focused on practical implementation. It explored typical paths for large models and intelligent agents in enterprises, key considerations for choosing cross-platform UI frameworks, and the evolution of these frameworks. Panelists discussed questions like: How can AI capabilities be integrated into existing business processes instead of creating an “experimental” pipeline? How should cross-platform solutions be evaluated in terms of performance, ecosystem, and team skillsets? What are the unique opportunities for domestic ecosystems in the global tech landscape? And how can community collaboration help developers quickly adopt best practices? A shared consensus emerged: in the short term, focus on running scenarios; in the long term, return to engineering fundamentals. Both toolchains and methodologies are equally important. + +![](./images/21.png) + +### In-Depth Sessions + +The afternoon featured four breakout sessions, covering a wide range of topics with deep dives into both foundational technologies and real-world project reviews: + +- **Frontend and Cross-Platform:** Focused on the progress of Avalonia, Blazor, and WebAssembly, as well as the integrated experience of .NET Aspire in multi-service applications. Speakers shared insights on reusing core logic between desktop and web, shortening cold start times with incremental compilation and resource trimming, and performance profiling and optimization in WASM scenarios. +- **AI Agents and Enterprise Adoption:** Discussed multi-agent orchestration, the MCP plugin ecosystem, and enterprise data compliance. From common pitfalls of “demo-level” AI to the “five-step method” for moving from POC to production, the session covered use cases like knowledge retrieval, process automation, intelligent customer service, and developer assistants, emphasizing evaluation metrics, prompt engineering, and monitoring governance. +- **.NET Practices and Engineering:** Focused on the latest capabilities and performance practices of EF Core, the boundaries of NativeAOT, automated testing strategies, and observability implementation. Discussions included database migration strategies, caching and concurrency control for hot paths, end-to-end tracing, and structured logging. +- **Solutions and Case Studies:** From Clean Architecture/DDD to AI-powered business evolution, topics included application modernization, SaaS transformation, and edge-cloud collaboration in AIoT. Speakers broke down modular governance, team collaboration, and release strategies for complex systems, putting “delivering value continuously” at the center stage. + +![](./images/3.png) + +## ABP Booth Highlights: Showcases, Conversations, and Fun + +The story of ABP began with a promise to create a better starting point. From the frustration of “copy-pasting boilerplate code,” we crafted a modular, opinionated framework. We chose open source and community collaboration. We founded Volosoft to turn our vision into reality with professional tools. Today, tens of thousands of developers explore the ABP framework, and thousands of teams rely on the ABP platform to deliver production-grade .NET applications faster and more securely. + +![](./images/4.png) + +At .NET Conf China 2025, we brought our “developer platform built for developers” to every visitor. Our booth demonstrations started with “a production-ready skeleton from the start”: modular layered architecture, built-in authentication and authorization systems, multi-tenancy support, audit logging, and localization—all out of the box. On the frontend and backend, ABP offers diverse options like MVC, Blazor, and Angular, enabling teams to quickly implement solutions on familiar stacks while maintaining flexibility for future evolution. We also showcased how ABP integrates with containerization, CI/CD, and observability, emphasizing “engineering built into the framework, not reinvented by every team.” + +![](./images/42.png) + +**Interaction and Prizes:** Sharing technology should also be warm and engaging. We hosted a QR code raffle at the booth, with prizes including ABP stickers, the book *Mastering ABP Framework*, and Bluetooth headphones. Multiple rounds of raffles and group photos made the interactions more memorable. Many developers shared their ABP experiences and plans for improvement right at the booth, and a few impromptu “code walkthroughs” naturally happened. The love and joy for technology were captured in every handshake and discussion. + +![](./images/41.png) + +## Looking Ahead: Building the Ecosystem Together + +From an open-source journey to a complete development platform for the future, we’ve always believed that developers deserve a better starting point. Around performance, intelligence, and cross-platform capabilities, we will continue investing in engineering, ecosystem collaboration, and best practice sharing. We also welcome more partners to contribute through documentation and examples, share your experiences, and submit your ideas. Together, let’s make “useful infrastructure” more stable, efficient, and business-friendly. + +We look forward to exchanging ideas, sharing practices, and building the ecosystem together at the next gathering. Technology meets creativity, and the possibilities are endless. We’re on the road and waiting for you at the next event. + +See you next year at .NET Conf China 2026! + +![](./images/5.png) \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/1.png b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/1.png new file mode 100644 index 0000000000..beaf49b86e Binary files /dev/null and b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/1.png differ diff --git a/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/2.png b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/2.png new file mode 100644 index 0000000000..a081bf99e3 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/2.png differ diff --git a/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/21.png b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/21.png new file mode 100644 index 0000000000..345452360a Binary files /dev/null and b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/21.png differ diff --git a/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/3.png b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/3.png new file mode 100644 index 0000000000..b69f36ef66 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/3.png differ diff --git a/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/4.png b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/4.png new file mode 100644 index 0000000000..a3a2ece3e9 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/4.png differ diff --git a/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/41.png b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/41.png new file mode 100644 index 0000000000..19143279aa Binary files /dev/null and b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/41.png differ diff --git a/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/42.png b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/42.png new file mode 100644 index 0000000000..730969eb8e Binary files /dev/null and b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/42.png differ diff --git a/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/5.png b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/5.png new file mode 100644 index 0000000000..f1a2a437a0 Binary files /dev/null and b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/5.png differ diff --git a/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/cover.png b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/cover.png new file mode 100644 index 0000000000..f0eb6cea5f Binary files /dev/null and b/docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/cover.png differ diff --git a/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/cover.png b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/cover.png new file mode 100644 index 0000000000..9eee8f6d07 Binary files /dev/null and b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/cover.png differ diff --git a/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/architecture-diagram.svg b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/architecture-diagram.svg new file mode 100644 index 0000000000..d0c5fd900a --- /dev/null +++ b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/architecture-diagram.svg @@ -0,0 +1,145 @@ + + + + + + + + + + AutoCache Architecture + + + + Application Service + + + BookAppService + + [Cache(typeof(Book))] + public Task<BookDto> GetAsync() + + + + Cache Interceptor + + + AutoCacheInterceptor + + • Detect [Cache] attribute + • Intercept method calls + + + + Cache Manager + + + AutoCacheManager + + • Generate cache keys + • Store/Retrieve data + + + + + + + + Distributed Cache + + + Redis / Memory + + + + Get/Set + + + + Domain Layer + + + Book Entity + + + + Event Bus + + + EntityChangedEvent + + + + Invalidation Handler + + + Clear Related Caches + + + + Cache Key Manager + + + IAutoCacheKeyManager + + + + Publish + + + Handle + + + Invalidate + + + Remove keys + + + + Cache Scopes + + • Global - Shared by all users + • CurrentUser - Per user ID + • AuthenticatedUser - Auth status + + + ① Method Call + Application service method is called + + ② Intercept + Interceptor detects [Cache] attribute + + ③ Check Cache + Manager checks distributed cache + + ④ Invalidate + Entity changes clear related caches + + + + + + Application Layer + + + Cache Components + + + Storage Layer + + + Event Handling + \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/automatic-caching-flow.svg b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/automatic-caching-flow.svg new file mode 100644 index 0000000000..9ea54b1f46 --- /dev/null +++ b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/automatic-caching-flow.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + Automatic Caching Flow + + + + Client Call + GetAsync(bookId) + + + + AutoCache + Interceptor + [Cache] detected + + + + Cache + Hit? + + + + + + + + ✓ HIT + Return cached result (Fast!) + + + + ✗ MISS + + + + Execute + Actual Method + Query Database + + + + Store Result + in Cache + For future use + + + Return result + + + + + + + + Cache Hit (5-10ms) + + + Cache Miss (100-500ms) + \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/cache-invalidation-flow.svg b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/cache-invalidation-flow.svg new file mode 100644 index 0000000000..d0281902d8 --- /dev/null +++ b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/cache-invalidation-flow.svg @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + Cache Invalidation Workflow + + + + 1 + + + User Action + UpdateAsync(bookId) + + + + 2 + + + Update Database + Repository.UpdateAsync() + + + + 3 + + + Publish Event + EntityChangedEvent + + + + + + + + 4 + + + Invalidation + Handler + Listen for changes + + + + Event Bus + + + + 5 + + + Wait for UoW + OnCompleted() callback + + + + + + + 6 + + + Clear Cache + + + + ✗ GetAsync(id) + ✗ GetListAsync() + ✗ Related queries + + + + INVALIDATE + + + + Redis / Distributed Cache + + + Before: + + Book:Get:123 ✓ + + + Book:List ✓ + + + After: + + Book:Get:123 + + + Book:List + + + + CLEARED + + + + Timeline + + + + Why Wait for UoW? + • Ensures transaction completes + • Prevents cache-DB inconsistency + • Handles rollback scenarios + + + Invalidation Scope + • All caches with [Cache(Book)] + • Across all scopes (Global, User) + • Entity-specific keys by ID + \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/cache-scoping-diagram.svg b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/cache-scoping-diagram.svg new file mode 100644 index 0000000000..848d9d0c51 --- /dev/null +++ b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/cache-scoping-diagram.svg @@ -0,0 +1,135 @@ + + + + + + + Cache Scoping Strategies + + + + Global + + + 🌍 + + Shared by all users + Ideal for public data + + + [Cache(typeof(Book), + Scope = Global)] + + + + CurrentUser + + + 👤 + + 👤 + + Per user (by ID) + User-specific data + + + [Cache(typeof(Order), + Scope = CurrentUser)] + + + + AuthenticatedUser + + + 🔐 Auth + + + Anonymous + + Auth vs Anonymous + + + Scope = + AuthenticatedUser + + + + Entity + + + ID: 1 + + + ID: 2 + + + ID: 3 + + Per entity instance + By primary key + + + [Cache(typeof(Book), + Scope = Entity)] + + + + Common Use Cases + + + + Global Scope + ✓ Product catalog + ✓ Configuration settings + ✓ Public announcements + + + + CurrentUser Scope + ✓ User profile + ✓ Shopping cart + ✓ User's order history + + + + Auth Scope + ✓ Member-only content + ✓ Navigation menus + ✓ Feature availability + + + + Entity Scope + ✓ Book details by ID + ✓ Product info by SKU + ✓ Invoice by number + + + Cache Key Structure + + + + Global: + BookService:GetList:page1:size10 + + CurrentUser: + OrderService:GetMyOrders:user:12345 + + Auth: + MenuService:GetNav:auth:true + + Entity: + BookService:Get:entity:book-guid-123 + \ No newline at end of file diff --git a/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/post.md b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/post.md new file mode 100644 index 0000000000..50a4aba33e --- /dev/null +++ b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/post.md @@ -0,0 +1,797 @@ +# Implement Automatic Method-Level Caching in ABP Framework + +Caching is one of the most effective ways to improve application performance, but implementing it manually for every method can be tedious and error-prone. What if you could cache method results automatically with just an attribute? In this article, we'll explore how to build an automatic method-level caching system in ABP Framework that handles cache invalidation, supports multiple scopes, and integrates seamlessly with your existing application. + +By the end of this guide, you'll understand how to implement attribute-based caching that automatically invalidates when entities change, supports user-specific and global caching scopes, and provides built-in metrics for monitoring cache performance. + +> 💡 **Complete Implementation Available**: This article is based on a working demo project. You can find the complete implementation in the [AbpAutoCacheDemo repository](https://github.com/salihozkara/AbpAutoCacheDemo), with the core AutoCache library implementation available in [this commit](https://github.com/salihozkara/AbpAutoCacheDemo/commit/946df1fc07de6eddd26eb14013a09968cd59329b). + +## What is Automatic Method-Level Caching? + +Automatic method-level caching is a technique that intercepts method calls and caches their results without requiring manual cache management code. Instead of writing cache logic in every method, you simply decorate methods with attributes that define caching behavior. + +![Automatic Caching Flow](./images/automatic-caching-flow.svg) + +The key benefits include: + +- **Reduced Boilerplate:** No repetitive cache management code in your business logic +- **Consistent Caching Strategy:** Centralized cache configuration and behavior +- **Smart Invalidation:** Automatic cache clearing when related entities change +- **Multiple Scopes:** Support for global, user-specific, and entity-specific caching +- **Built-in Monitoring:** Track cache hits, misses, and performance metrics + +## Architecture Overview + +The automatic caching system consists of several key components working together: + +![Architecture Diagram](./images/architecture-diagram.svg) + +**Core Components:** + +1. **CacheAttribute:** The attribute you apply to methods to enable automatic caching +2. **AutoCacheInterceptor:** Intercepts method calls and handles cache operations +3. **AutoCacheManager:** Manages cache storage, retrieval, and key generation +4. **IAutoCacheKeyManager:** Handles cache key mapping and invalidation +5. **AutoCacheInvalidationHandler:** Listens to entity changes and clears related caches + +This architecture leverages ABP's dynamic proxy system and event bus to provide seamless caching without modifying your business logic. + +## Prerequisites + +Before implementing automatic caching, ensure you have: + +- ABP Framework 10.0 or later +## Implementation + +> 📦 **Repository Structure**: The complete implementation is available in the [AbpAutoCacheDemo repository](https://github.com/salihozkara/AbpAutoCacheDemo). The AutoCache library is located in the `src/AutoCache` folder, making it easy to extract and reuse in your own projects. + +### Step - 1: Create the AutoCache Module + +First, let's create a separate module for our caching infrastructure. This makes it reusable across projects. + +### Step - 1: Create the AutoCache Module + +First, let's create a separate module for our caching infrastructure. This makes it reusable across projects. + +Create `AutoCache.csproj`: + +```xml + + + net10.0 + enable + + + + + + + + +``` + +Create the module class `AutoCacheModule.cs`: + +```csharp +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Caching.StackExchangeRedis; +using Volo.Abp.Domain; +using Volo.Abp.Modularity; + +namespace AutoCache; + +[DependsOn(typeof(AbpDddDomainModule), typeof(AbpCachingStackExchangeRedisModule))] +public class AutoCacheModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + context.Services.OnRegistered(AutoCacheRegister.RegisterInterceptorIfNeeded); // 👈 Register interceptor + } +} +``` + +This module automatically registers the cache interceptor for any class that uses the `CacheAttribute`. + +### Step - 2: Define the Cache Attribute + +The `CacheAttribute` is the core of our automatic caching system. It specifies which entities affect the cache and what scope to use. + +Create `CacheAttribute.cs`: + +```csharp +using System; +using Volo.Abp.Domain.Entities; + +namespace AutoCache; + +[AttributeUsage(AttributeTargets.Method)] +public class CacheAttribute : Attribute +{ + /// + /// Entity types that affect this cache. When these entities change, the cache will be invalidated. + /// + public Type[] InvalidateOnEntities { get; set; } + + /// + /// Scope of the cache (Global, CurrentUser, AuthenticatedUser, or Entity) + /// + public AutoCacheScope Scope { get; set; } = AutoCacheScope.Global; + + /// + /// Absolute expiration time relative to now in milliseconds (0 = use default, -1 = disabled) + /// + public long AbsoluteExpirationRelativeToNow { get; set; } + + /// + /// Sliding expiration time in milliseconds (0 = use default, -1 = disabled) + /// + public long SlidingExpiration { get; set; } + + public bool ConsiderUow { get; set; } + + public string AdditionalCacheKey { get; set; } + + public CacheAttribute(params Type[] invalidateOnEntities) // 👈 Specify entities that trigger cache invalidation + { + foreach (var entityType in invalidateOnEntities) + { + ArgumentNullException.ThrowIfNull(entityType); + if (!typeof(IEntity).IsAssignableFrom(entityType)) + { + throw new ArgumentException($"Type {entityType.FullName} must implement IEntity interface."); + } + } + InvalidateOnEntities = invalidateOnEntities; + } +} +``` + +**Key Properties:** + +- **InvalidateOnEntities:** Array of entity types that, when modified, will clear this cache +- **Scope:** Determines cache visibility (Global, CurrentUser, AuthenticatedUser, Entity) +- **AbsoluteExpirationRelativeToNow / SlidingExpiration:** Control cache lifetime + +### Step - 3: Define Cache Scopes + +Cache scopes determine how cache entries are partitioned. Create `AutoCacheScope.cs`: + +```csharp +using System; + +namespace AutoCache; + +[Flags] +public enum AutoCacheScope +{ + /// + /// Cache is shared globally across all users + /// + Global, + + /// + /// Cache is scoped to the current user (based on user ID) + /// + CurrentUser, + + /// + /// Cache is scoped to authenticated vs unauthenticated users + /// + AuthenticatedUser, + + /// + /// Cache is scoped to the primary key of the entity involved + /// + Entity +} +``` + +![Cache Scoping Strategy](./images/cache-scoping-diagram.svg) + +**When to Use Each Scope:** + +- **Global:** For data that's the same for all users (e.g., configuration, public lists) +- **CurrentUser:** For user-specific data (e.g., user profile, user's orders) +- **AuthenticatedUser:** For data that differs between authenticated and anonymous users +- **Entity:** For data tied to a specific entity instance (e.g., book details by ID) + +### Step - 4: Implement the Cache Interceptor + +The interceptor is the heart of automatic caching. It intercepts method calls, checks the cache, and stores results. Create `AutoCacheInterceptor.cs`: + +```csharp +using System; +using System.Collections.Concurrent; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; +using Microsoft.Extensions.Caching.Distributed; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DynamicProxy; + +namespace AutoCache; + +public class AutoCacheInterceptor : AbpInterceptor, ITransientDependency +{ + private readonly ILogger _logger; + private readonly AutoCacheOptions _options; + private static readonly MethodInfo GetOrAddCacheAsyncMethod; + private readonly AutoCacheManager _autoCacheManager; + private static readonly ConcurrentDictionary MethodCache = new(); + + static AutoCacheInterceptor() + { + GetOrAddCacheAsyncMethod = typeof(AutoCacheInterceptor).GetMethod( + nameof(GetOrAddCacheAsync), + BindingFlags.NonPublic | BindingFlags.Instance + )!; + } + + public AutoCacheInterceptor( + ILogger logger, + IOptions options, + AutoCacheManager autoCacheManager) + { + _logger = logger; + _autoCacheManager = autoCacheManager; + _options = options.Value; + } + + public override async Task InterceptAsync(IAbpMethodInvocation invocation) + { + // Check if caching is enabled and method has [Cache] attribute + if(!_options.Enabled || + invocation.Method.GetCustomAttributes(typeof(CacheAttribute), true).FirstOrDefault() + is not CacheAttribute attribute) + { + await invocation.ProceedAsync(); // 👈 No caching, proceed normally + return; + } + + var proceeded = false; + + try + { + // Create generic method based on return type + var genericMethod = MethodCache.GetOrAdd(invocation.Method.ReturnType, t => + { + var isGenericTask = t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Task<>); + var resultType = isGenericTask ? t.GetGenericArguments()[0] : t; + return GetOrAddCacheAsyncMethod.MakeGenericMethod(resultType); + }); + + // Execute cache logic + (var result, proceeded) = await (Task<(object, bool)>)genericMethod.Invoke(this, [invocation, attribute])!; + invocation.ReturnValue = result; // 👈 Set cached or fresh result + } + catch (Exception e) + { + _logger.LogError(e, "Error occurred while caching method {MethodName}", invocation.Method.Name); + + if(e is AutoCacheExceptionWrapper exceptionWrapper) + { + if (_options.ThrowOnError) + { + throw exceptionWrapper.OriginalException; + } + + _logger.LogWarning( + "Cache operation failed, falling back to method execution for {MethodName}", + invocation.Method.Name + ); + } + + if (!proceeded && invocation.ReturnValue == null) + { + await invocation.ProceedAsync(); // 👈 Fallback to actual method execution + } + } + } + + private async Task<(object?, bool)> GetOrAddCacheAsync( + IAbpMethodInvocation invocation, + CacheAttribute attribute) + { + var proceeded = false; + var result = await _autoCacheManager.GetOrAddAsync( + invocation.TargetObject, + Factory, + invocation.Arguments, + () => new DistributedCacheEntryOptions + { + AbsoluteExpirationRelativeToNow = GetExpiration( + attribute.AbsoluteExpirationRelativeToNow, + _options.DefaultAbsoluteExpirationRelativeToNow), + SlidingExpiration = GetExpiration( + attribute.SlidingExpiration, + _options.DefaultSlidingExpiration) + }, + attribute.InvalidateOnEntities, + attribute.Scope, + attribute.ConsiderUow, + attribute.AdditionalCacheKey, + invocation.Method.Name); + + return (result, proceeded); + + async Task Factory() + { + await invocation.ProceedAsync(); // 👈 Execute actual method on cache miss + proceeded = true; + return (TResult)invocation.ReturnValue; + } + } + + private static TimeSpan? GetExpiration(long milliseconds, long defaultValue) + { + return milliseconds switch + { + 0 => defaultValue > 0 ? TimeSpan.FromMilliseconds(defaultValue) : null, + < 0 => null, + _ => TimeSpan.FromMilliseconds(milliseconds) + }; + } +} +``` + +The interceptor intelligently determines whether to serve cached data or execute the actual method. + +### Step - 5: Implement the Cache Manager + +The `AutoCacheManager` handles the actual cache operations. Create a simplified version: + +```csharp +using System; +using System.Runtime.CompilerServices; +using System.Threading.Tasks; +using Microsoft.Extensions.Caching.Distributed; +using Microsoft.Extensions.Logging; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DynamicProxy; +using Volo.Abp.Users; + +namespace AutoCache; + +public class AutoCacheManager : IScopedDependency +{ + private readonly IAutoCacheKeyManager _autoCacheKeyManager; + private readonly ICurrentUser _currentUser; + private readonly ILogger _logger; + private readonly IAutoCacheMetrics _metrics; + private readonly AutoCacheOptions _options; + + public AutoCacheManager( + IAutoCacheKeyManager autoCacheKeyManager, + ICurrentUser currentUser, + ILogger logger, + IAutoCacheMetrics metrics, + IOptions options) + { + _autoCacheKeyManager = autoCacheKeyManager; + _currentUser = currentUser; + _logger = logger; + _metrics = metrics; + _options = options.Value; + } + + public async Task GetOrAddAsync( + object? caller, + Func> func, + object?[]? parameters = null, + Func? optionsFactory = null, + Type[]? invalidateOnEntities = null, + AutoCacheScope scope = AutoCacheScope.Global, + bool considerUow = false, + string? additionalCacheKey = null, + [CallerMemberName] string methodName = "") + { + if (!_options.Enabled) + { + return await func(); // 👈 Caching disabled, execute directly + } + + var callerType = caller != null ? ProxyHelper.GetUnProxiedType(caller) : GetType(); + parameters ??= []; + + // Generate unique cache key based on method, parameters, and scope + var cacheKey = GenerateCacheKey( + callerType.Name, + additionalCacheKey, + methodName, + parameters, + scope); + + var (cachedResult, exception, wasHit) = await GetOrAddCacheAsync( + cacheKey, + func, + optionsFactory, + considerUow + ); + + // Record metrics + if (wasHit) + { + _metrics.RecordHit(cacheKey); + } + else + { + _metrics.RecordMiss(cacheKey); + } + + if (exception != null) + { + _metrics.RecordError(cacheKey, exception); + + if (_options.ThrowOnError) + { + throw exception; + } + } + + return cachedResult; + } + + private string GenerateCacheKey( + string callerTypeName, + string? additionalCacheKey, + string methodName, + object?[] parameters, + AutoCacheScope scope) + { + var keyBuilder = new StringBuilder(); + keyBuilder.Append($"{callerTypeName}:{methodName}"); + + // Add parameters to key + foreach (var param in parameters) + { + keyBuilder.Append($":{param}"); + } + + // Add scope-specific segments + if (scope.HasFlag(AutoCacheScope.CurrentUser) && _currentUser.Id.HasValue) + { + keyBuilder.Append($":user:{_currentUser.Id}"); // 👈 User-specific cache key + } + + if (scope.HasFlag(AutoCacheScope.AuthenticatedUser)) + { + keyBuilder.Append($":auth:{_currentUser.IsAuthenticated}"); + } + + if (!string.IsNullOrEmpty(additionalCacheKey)) + { + keyBuilder.Append($":{additionalCacheKey}"); + } + + return keyBuilder.ToString(); + } + + // Additional methods for cache retrieval and storage... +} +``` + +The manager generates unique cache keys based on method signatures, parameters, and scope settings. + +### Step - 6: Implement Cache Invalidation + +When entities change, related caches must be cleared. Create `AutoCacheInvalidationHandler.cs`: + +```csharp +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Entities.Events; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; + +namespace AutoCache; + +public class AutoCacheInvalidationHandler : + ILocalEventHandler> + where TEntity : class, IEntity +{ + private readonly IAutoCacheKeyManager _autoCacheKeyManager; + private readonly ILogger> _logger; + private readonly IUnitOfWorkManager _unitOfWorkManager; + + public AutoCacheInvalidationHandler( + IAutoCacheKeyManager autoCacheKeyManager, + ILogger> logger, + IUnitOfWorkManager unitOfWorkManager) + { + _autoCacheKeyManager = autoCacheKeyManager; + _logger = logger; + _unitOfWorkManager = unitOfWorkManager; + } + + public async Task HandleEventAsync(EntityChangedEventData eventData) + { + try + { + var entityType = typeof(TEntity); + var context = new RemoveCacheKeyContext + { + Keys = eventData.Entity.GetKeys()! + }; + + // Clear cache after unit of work completes + if(_unitOfWorkManager.Current != null) + { + _unitOfWorkManager.Current.OnCompleted(async () => + { + await _autoCacheKeyManager.RemoveCacheAndCacheKeys(entityType, context); // 👈 Invalidate cache + }); + } + else + { + await _autoCacheKeyManager.RemoveCacheAndCacheKeys(entityType, context); + } + } + catch (Exception e) + { + _logger.LogError( + e, + "Error occurred while clearing cache for entity type {EntityType}", + typeof(TEntity).FullName + ); + } + } +} +``` + +![Cache Invalidation Flow](./images/cache-invalidation-flow.svg) + +This handler listens to entity change events and automatically clears related caches. The invalidation happens after the unit of work completes to ensure data consistency. + +### Step - 7: Configure AutoCache in Your Application + +Add the `AutoCacheModule` to your application module dependencies: + +```csharp +[DependsOn( + typeof(AutoCacheModule), // 👈 Add AutoCache module + typeof(AbpCachingStackExchangeRedisModule), + // ... other modules +)] +public class YourApplicationModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Enabled = true; // 👈 Enable caching + options.DefaultAbsoluteExpirationRelativeToNow = 3600000; // 1 hour + options.DefaultSlidingExpiration = 600000; // 10 minutes + options.ThrowOnError = false; // Fallback to method execution on cache errors + }); + + // Configure Redis (if using distributed cache) + Configure(options => + { + options.KeyPrefix = "YourApp:"; + }); + } +} +``` + +### Step - 8: Use Automatic Caching in Application Services + +Now comes the easy part - using automatic caching! Simply add the `[Cache]` attribute to your methods: + +```csharp +using AutoCache; + +[Authorize(AutoCacheDemoPermissions.Books.Default)] +public class BookAppService : ApplicationService, IBookAppService +{ + private readonly IRepository _repository; + private readonly AutoCacheManager _autoCacheManager; + + public BookAppService(IRepository repository, AutoCacheManager autoCacheManager) + { + _repository = repository; + _autoCacheManager = autoCacheManager; + } + + // Cache this method, invalidate when Book entity changes + [Cache(typeof(Book), Scope = AutoCacheScope.Global)] + public virtual async Task GetAsync(Guid id) + { + // You can also use AutoCacheManager directly for nested caching + var book = await _autoCacheManager.GetOrAddAsync( + this, + async () => await _repository.GetAsync(id), + [id], // 👈 Method parameters + invalidateOnEntities: [typeof(Book)], + scope: AutoCacheScope.Entity); + + return ObjectMapper.Map(book!); + } + + // Cache book list, invalidate when any Book changes + [Cache(typeof(Book))] + public virtual async Task> GetListAsync(PagedAndSortedResultRequestDto input) + { + var queryable = await _repository.GetQueryableAsync(); + var query = queryable + .OrderBy(input.Sorting.IsNullOrWhiteSpace() ? "Name" : input.Sorting) + .Skip(input.SkipCount) + .Take(input.MaxResultCount); + + var books = await AsyncExecuter.ToListAsync(query); + var totalCount = await AsyncExecuter.CountAsync(queryable); + + return new PagedResultDto( + totalCount, + ObjectMapper.Map, List>(books) + ); + } + + // No caching on write operations + [Authorize(AutoCacheDemoPermissions.Books.Create)] + public async Task CreateAsync(CreateUpdateBookDto input) + { + var book = ObjectMapper.Map(input); + await _repository.InsertAsync(book); // 👈 This will trigger cache invalidation + return ObjectMapper.Map(book); + } +} +``` + +**What Happens Here:** + +1. When `GetAsync` is called, the interceptor checks the cache +2. On cache miss, the actual method executes and the result is cached +3. When `CreateAsync` inserts a `Book`, the invalidation handler clears all caches related to `Book` +4. Next call to `GetAsync` will fetch fresh data + +## Advanced Features + +### User-Specific Caching + +For user-specific data, use `AutoCacheScope.CurrentUser`: + +```csharp +[Cache(typeof(Order), Scope = AutoCacheScope.CurrentUser)] +public virtual async Task> GetMyOrdersAsync() +{ + var orders = await _orderRepository.GetListAsync(x => x.UserId == CurrentUser.Id); + return ObjectMapper.Map, List>(orders); +} +``` + +Each user gets their own cache entry, automatically invalidated when their orders change. + +### Custom Cache Keys + +For fine-grained control, add custom cache key segments: + +```csharp +[Cache( + typeof(Product), + Scope = AutoCacheScope.Global, + AdditionalCacheKey = "featured" +)] +public virtual async Task> GetFeaturedProductsAsync() +{ + // Only featured products are cached separately + return await GetProductsByCategoryAsync("Featured"); +} +``` + +### Performance Metrics + +Monitor cache performance using `IAutoCacheMetrics`: + +```csharp +public class CacheMonitoringService : ITransientDependency +{ + private readonly IAutoCacheMetrics _metrics; + + public CacheMonitoringService(IAutoCacheMetrics metrics) + { + _metrics = metrics; + } + + public AutoCacheStatistics GetStatistics() + { + return _metrics.GetStatistics(); // 👈 Get hit rate, miss count, error count + } +} +``` + +## Testing the Application + +### 1. Run the Application + +```bash +abp new BookStore -u mvc -d ef +cd BookStore +dotnet run --project src/BookStore.Web +``` + +### 2. Test Cache Behavior + +Create a simple test to verify caching: + +```csharp +[Fact] +public async Task Should_Cache_Book_Results() +{ + // First call - cache miss + var book1 = await _bookAppService.GetAsync(testBookId); + + // Second call - cache hit (should be faster) + var book2 = await _bookAppService.GetAsync(testBookId); + + book1.Name.ShouldBe(book2.Name); +} + +[Fact] +public async Task Should_Invalidate_Cache_On_Update() +{ + // Cache the book + var book1 = await _bookAppService.GetAsync(testBookId); + + // Update the book + await _bookAppService.UpdateAsync(testBookId, new CreateUpdateBookDto + { + Name = "Updated Name" + }); + + // Fetch again - should get updated data (cache was invalidated) + var book2 = await _bookAppService.GetAsync(testBookId); + + book2.Name.ShouldBe("Updated Name"); +} +``` + +### 3. Monitor Cache Performance + +Check your application logs for cache metrics: + +``` +[INF] Cache Hit: BookAppService:GetAsync:book-id-123 (Response Time: 5ms) +[INF] Cache Miss: BookAppService:GetListAsync (Response Time: 156ms) +[INF] Cache Invalidation: Book entity changed, cleared 3 cache entries +``` + +## Key Takeaways + +✅ **Automatic caching reduces boilerplate code** - Just add `[Cache]` attribute to methods instead of manual cache management + +✅ **Smart invalidation keeps data fresh** - Entity changes automatically clear related caches without manual intervention + +✅ **Multiple scoping options** - Support for global, user-specific, authenticated, and entity-level caching strategies + +✅ **Built-in fallback handling** - Gracefully falls back to method execution if caching fails + +✅ **Performance monitoring** - Track cache hits, misses, and errors for optimization + +## Conclusion + +Automatic method-level caching dramatically simplifies performance optimization in ABP Framework applications. By using attributes and interceptors, you can add sophisticated caching behavior without cluttering your business logic with cache management code. + +The system we've built provides intelligent cache invalidation, multiple scoping strategies, and built-in monitoring - all while maintaining clean, readable code. Whether you're building a small application or an enterprise system, this approach scales elegantly and integrates seamlessly with ABP's architecture. + +Ready to implement this in your project? The complete working implementation is available in the [AbpAutoCacheDemo repository](https://github.com/salihozkara/AbpAutoCacheDemo). You can clone the repository, explore the code, and even extract the `src/AutoCache` folder to use it as a standalone library in your own ABP applications. The [main implementation commit](https://github.com/salihozkara/AbpAutoCacheDemo/commit/946df1fc07de6eddd26eb14013a09968cd59329b) shows all the components working together, including interceptor registration, cache key management, and automatic invalidation handlers.r you're building a small application or an enterprise system, this approach scales elegantly and integrates seamlessly with ABP's architecture. + +Ready to implement this in your project? Check out the complete working example in the repository linked below, and start improving your application's performance today! + +### See Also + +- [ABP Caching Documentation](https://abp.io/docs/latest/framework/fundamentals/caching) +- [Interceptors in ABP](https://abp.io/docs/latest/framework/infrastructure/interceptors) +- [Event Bus Documentation](https://abp.io/docs/latest/framework/infrastructure/event-bus) +- [Sample Project on GitHub](https://github.com/salihozkara/AbpAutoCacheDemo) + +--- + +## References + +- [ABP Framework Documentation](https://docs.abp.io) +- [Redis Distributed Caching](https://redis.io/docs/) +- [Aspect-Oriented Programming Patterns](https://en.wikipedia.org/wiki/Aspect-oriented_programming) diff --git a/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/summary.md b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/summary.md new file mode 100644 index 0000000000..a27494cd8a --- /dev/null +++ b/docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/summary.md @@ -0,0 +1 @@ +Learn how to implement automatic method-level caching in ABP Framework using attributes and interceptors. This comprehensive guide covers building a reusable cache infrastructure with attribute-based caching, intelligent cache invalidation when entities change, support for multiple cache scopes (Global, CurrentUser, AuthenticatedUser, and Entity), seamless integration with ABP's dynamic proxy system and event bus, and built-in performance metrics for monitoring cache effectiveness in production applications. diff --git a/docs/en/cli/index.md b/docs/en/cli/index.md index 7decaa658c..3a3d0c2304 100644 --- a/docs/en/cli/index.md +++ b/docs/en/cli/index.md @@ -7,11 +7,7 @@ # ABP CLI -ABP CLI (Command Line Interface) is a command line tool to perform some common operations for ABP based solutions or ABP Studio features. - -> With **v8.2+**, the old/legacy ABP CLI has been replaced with a new CLI system to align with the new templating system and [ABP Studio](../studio/index.md). The new ABP CLI commands are explained in this documentation. However, if you want to learn more about the differences between the old and new CLIs, want to learn the reason for the change, or need guidance to use the old ABP CLI, please refer to the [Old vs New CLI](differences-between-old-and-new-cli.md) documentation. -> -> You may need to remove the Old CLI before installing the New CLI, by running the following command: `dotnet tool uninstall -g Volo.Abp.Cli` +ABP CLI (Command Line Interface) is a command line tool to perform some common operations for ABP based solutions or [ABP Studio](../studio/index.md) features. ## Installation @@ -29,16 +25,16 @@ dotnet tool update -g Volo.Abp.Studio.Cli ## Global Options -While each command may have a set of options, there are some global options that can be used with any command; +While each command may have a set of options, there are some global options that can be used with any command: -* `--skip-cli-version-check` or `-scvc`: Skips to check the latest version of the ABP CLI. If you don't specify, it will check the latest version and shows a warning message if there is a newer version of the ABP CLI. -- `--skip-extension-version-check` or `-sevc`: Skips to check the latest version of the ABP CLI extensions. If you don't specify, it will check the latest version and download the latest version if there is a newer version of the ABP CLI extensions. +* `--skip-cli-version-check` or `-scvc`: Skips checking the latest version of the ABP CLI. If you don't specify, it will check the latest version and shows a warning message if there is a newer version of the ABP CLI. +- `--skip-extension-version-check` or `-sevc`: Skips checking the latest version of the ABP CLI extensions. If you don't specify, it will check the latest version and download the latest version if there is a newer version of the ABP CLI extensions. * `--old`: ABP CLI has two variations: `Volo.Abp.Studio.Cli` and `Volo.Abp.Cli`. New features/templates are added to the `Volo.Abp.Studio.Cli`. But if you want to use the old version, you can use this option **at the end of your commands**. For example, `abp new Acme.BookStore --old`. * `--help` or `-h`: Shows help for the specified command. ## Commands -Here, is the list of all available commands before explaining their details: +Here is the list of all available commands before explaining their details: * **[`help`](../cli#help)**: Shows help on the usage of the ABP CLI. * **[`cli`](../cli#cli)**: Update or remove ABP CLI. diff --git a/docs/en/contribution/angular-ui.md b/docs/en/contribution/angular-ui.md index 6aefa43fa8..e3445b12bd 100644 --- a/docs/en/contribution/angular-ui.md +++ b/docs/en/contribution/angular-ui.md @@ -12,7 +12,7 @@ - Dotnet core SDK https://dotnet.microsoft.com/en-us/download - Nodejs LTS https://nodejs.org/en/ - Docker https://docs.docker.com/engine/install -- Angular CLI. https://angular.io/guide/what-is-angular#angular-cli +- Angular CLI. https://angular.dev/tools/cli - Abp CLI https://docs.abp.io/en/abp/latest/cli - A code editor diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 6fa1f5e620..08b4553d64 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -552,6 +552,24 @@ "text": "Audit Logging", "path": "framework/infrastructure/audit-logging.md" }, + { + "text": "Artificial Intelligence", + "items":[ + { + "text": "Overview", + "path": "framework/infrastructure/artificial-intelligence/index.md", + "isIndex": true + }, + { + "text": "Microsoft.Extensions.AI", + "path": "framework/infrastructure/artificial-intelligence/microsoft-extensions-ai.md" + }, + { + "text": "Semantic Kernel", + "path": "framework/infrastructure/artificial-intelligence/microsoft-semantic-kernel.md" + } + ] + }, { "text": "Background Jobs", "items": [ @@ -1539,6 +1557,10 @@ "text": "Service Proxies", "path": "framework/ui/angular/service-proxies.md" }, + { + "text": "SSR Configuration", + "path": "framework/ui/angular/ssr-configuration.md" + }, { "text": "PWA Configuration", "path": "framework/ui/angular/pwa-configuration.md" @@ -1623,7 +1645,7 @@ "path": "framework/ui/angular/list-service.md" }, { - "text": "Easy *ngFor trackBy", + "text": "Easy @for() track", "path": "framework/ui/angular/track-by-service.md" }, { diff --git a/docs/en/framework/infrastructure/artificial-intelligence.md b/docs/en/framework/infrastructure/artificial-intelligence.md deleted file mode 100644 index 652c7c8233..0000000000 --- a/docs/en/framework/infrastructure/artificial-intelligence.md +++ /dev/null @@ -1,307 +0,0 @@ -# Artificial Intelligence - -ABP provides a simple way to integrate AI capabilities into your applications by unifying two popular .NET AI stacks under a common concept called a "workspace": - -- Microsoft.Extensions.AI `IChatClient` -- Microsoft.SemanticKernel `Kernel` - -A workspace is just a named scope. You configure providers per workspace and then resolve either default services (for the "Default" workspace) or workspace-scoped services. - -## Installation - -> This package is not included by default. Install it to enable AI features. - -It is suggested to use the ABP CLI to install the package. Open a command line window in the folder of the project (.csproj file) and type the following command: - -```bash -abp add-package Volo.Abp.AI -``` - -### Manual Installation - -Add nuget package to your project: - -```bash -dotnet add package Volo.Abp.AI -``` - -Then add the module dependency to your module class: - -```csharp -using Volo.Abp.AI; -using Volo.Abp.Modularity; - -[DependsOn(typeof(AbpAIModule))] -public class MyProjectModule : AbpModule -{ -} -``` - -## Usage - -### Chat Client - -#### Default configuration (quick start) - -Configure the default workspace to inject `IChatClient` directly. - -```csharp -using Microsoft.Extensions.AI; -using Microsoft.SemanticKernel; -using Volo.Abp.AI; -using Volo.Abp.Modularity; - -public class MyProjectModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.PreConfigure(options => - { - options.Workspaces.ConfigureDefault(configuration => - { - configuration.ConfigureChatClient(chatClientConfiguration => - { - chatClientConfiguration.Builder = new ChatClientBuilder( - sp => new OllamaApiClient("http://localhost:11434", "mistral") - ); - }); - - // Chat client only in this quick start - }); - }); - } -} -``` - -Once configured, inject the default chat client: - -```csharp -using Microsoft.Extensions.AI; - -public class MyService -{ - private readonly IChatClient _chatClient; // default chat client - - public MyService(IChatClient chatClient) - { - _chatClient = chatClient; - } -} -``` - -#### Workspace configuration - -Workspaces allow multiple, isolated AI configurations. Define workspace types (optionally decorated with `WorkspaceNameAttribute`). If omitted, the type’s full name is used. - -```csharp -using Volo.Abp.AI; - -[WorkspaceName("GreetingAssistant")] -public class GreetingAssistant // ChatClient-only workspace -{ -} -``` - -Configure a ChatClient workspace: - -```csharp -public class MyProjectModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.PreConfigure(options => - { - options.Workspaces.Configure(configuration => - { - configuration.ConfigureChatClient(chatClientConfiguration => - { - chatClientConfiguration.Builder = new ChatClientBuilder( - sp => new OllamaApiClient("http://localhost:11434", "mistral") - ); - - chatClientConfiguration.BuilderConfigurers.Add(builder => - { - // Anything you want to do with the builder: - // builder.UseFunctionInvocation().UseLogging(); // For example - }); - }); - }); - }); - } -} -``` - -### Semantic Kernel - -#### Default configuration - - -```csharp -public class MyProjectModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.PreConfigure(options => - { - options.Workspaces.ConfigureDefault(configuration => - { - configuration.ConfigureKernel(kernelConfiguration => - { - kernelConfiguration.Builder = Kernel.CreateBuilder() - .AddAzureOpenAIChatClient("...", "..."); - }); - // Note: Chat client is not configured here - }); - }); - } -} -``` - -Once configured, inject the default kernel: - -```csharp -using System.Threading.Tasks; -using Volo.Abp.AI; - -public class MyService -{ - private readonly IKernelAccessor _kernelAccessor; - public MyService(IKernelAccessor kernelAccessor) - { - _kernelAccessor = kernelAccessor; - } - - public async Task DoSomethingAsync() - { - var kernel = _kernelAccessor.Kernel; // Kernel might be null if no workspace is configured. - - var result = await kernel.InvokeAsync(/*... */); - } -} -``` - -#### Workspace configuration - -```csharp -public class MyProjectModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.PreConfigure(options => - { - options.Workspaces.Configure(configuration => - { - configuration.ConfigureKernel(kernelConfiguration => - { - kernelConfiguration.Builder = Kernel.CreateBuilder() - .AddOpenAIChatCompletion("...", "..."); - }); - }); - }); - } -} -``` - -#### Workspace usage - -```csharp -using Microsoft.Extensions.AI; -using Volo.Abp.AI; -using Microsoft.SemanticKernel; - -public class PlanningService -{ - private readonly IKernelAccessor _kernelAccessor; - private readonly IChatClient _chatClient; // available even if only Kernel is configured - - public PlanningService( - IKernelAccessor kernelAccessor, - IChatClient chatClient) - { - _kernelAccessor = kernelAccessor; - _chatClient = chatClient; - } - - public async Task PlanAsync(string topic) - { - var kernel = _kernelAccessor.Kernel; // Microsoft.SemanticKernel.Kernel - // Use Semantic Kernel APIs if needed... - - var response = await _chatClient.GetResponseAsync( - [new ChatMessage(ChatRole.User, $"Create a content plan for: {topic}")] - ); - return response?.Message?.Text ?? string.Empty; - } -} -``` - -## Options - -`AbpAIOptions` configuration pattern offers `ConfigureChatClient(...)` and `ConfigureKernel(...)` methods for configuration. These methods are defined in the `WorkspaceConfiguration` class. They are used to configure the `ChatClient` and `Kernel` respectively. - -`Builder` is set once and is used to build the `ChatClient` or `Kernel` instance. `BuilderConfigurers` is a list of actions that are applied to the `Builder` instance for incremental changes. These actions are executed in the order they are added. - -If a workspace configures only the Kernel, a chat client may still be exposed for that workspace through the Kernel’s service provider (when available). - - -## Advanced Usage and Customizations - -### Addding Your Own DelegatingChatClient - -If you want to build your own decorator, implement a `DelegatingChatClient` derivative and provide an extension method that adds it to the `ChatClientBuilder` using `builder.Use(...)`. - -Example sketch: - -```csharp -using Microsoft.Extensions.AI; - -public class SystemMessageChatClient : DelegatingChatClient -{ - public SystemMessageChatClient(IChatClient inner, string systemMessage) : base(inner) - { - SystemMessage = systemMessage; - } - - public string SystemMessage { get; set; } - - public override Task GetResponseAsync(IEnumerable messages, ChatOptions? options = null, CancellationToken cancellationToken = default) - { - // Mutate messages/options as needed, then call base - return base.GetResponseAsync(messages, options, cancellationToken); - } -} - -public static class SystemMessageChatClientExtensions -{ - public static ChatClientBuilder UseSystemMessage(this ChatClientBuilder builder, string systemMessage) - { - return builder.Use(client => new SystemMessageChatClient(client, systemMessage)); - } -} -``` - - -```cs -chatClientConfiguration.BuilderConfigurers.Add(builder => -{ - builder.UseSystemMessage("You are a helpful assistant that greets users in a friendly manner with their names."); -}); -``` - -## Technical Anatomy - -- `AbpAIModule`: Wires up configured workspaces, registers keyed services and default services for the `"Default"` workspace. -- `AbpAIOptions`: Holds `Workspaces` and provides helper methods for internal keyed service naming. -- `WorkspaceConfigurationDictionary` and `WorkspaceConfiguration`: Configure per-workspace Chat Client and Kernel. -- `ChatClientConfiguration` and `KernelConfiguration`: Hold builders and a list of ordered builder configurers. -- `WorkspaceNameAttribute`: Names a workspace; falls back to the type’s full name if not specified. -- `IChatClient`: Typed chat client for a workspace. -- `IKernelAccessor`: Provides access to the workspace’s `Kernel` instance if configured. -- `AbpAIWorkspaceOptions`: Exposes `ConfiguredWorkspaceNames` for diagnostics. - -There are no database tables for this feature; it is a pure configuration and DI integration layer. - -## See Also - -- Microsoft.Extensions.AI (Chat Client) -- Microsoft Semantic Kernel \ No newline at end of file diff --git a/docs/en/framework/infrastructure/artificial-intelligence/index.md b/docs/en/framework/infrastructure/artificial-intelligence/index.md new file mode 100644 index 0000000000..bdd1125e9d --- /dev/null +++ b/docs/en/framework/infrastructure/artificial-intelligence/index.md @@ -0,0 +1,38 @@ +```json +//[doc-seo] +{ + "Description": "Explore ABP Framework's AI integration, enabling seamless AI capabilities, workspace management, and reusable modules for .NET developers." +} +``` + +# Artificial Intelligence (AI) +ABP Framework provides integration for AI capabilities to your application by using Microsoft's popular AI libraries. The main purpose of this integration is to provide a consistent and easy way to use AI capabilities and manage different AI providers, models and configurations in a single application. + +ABP introduces a concept called **AI Workspace**. A workspace allows you to configure isolated AI configurations for a named scope. You can then resolve AI services for a specific workspace when you need to use them. + +> ABP Framework can work with any AI library or framework that supports .NET development. However, the AI integration features explained in the following documents provide a modular and standard way to work with AI, which allows ABP developers to create reusable modules and components with AI capabilities in a standard way. + +## Installation + +Use the [ABP CLI](../../../cli/index.md) to install the [Volo.Abp.AI](https://www.nuget.org/packages/Volo.Abp.AI) NuGet package into your project. Open a command line window in the root directory of your project (`.csproj` file) and type the following command: + +```bash +abp add-package Volo.Abp.AI +``` + +*For different installation options, check [the package definition page](https://abp.io/package-detail/Volo.Abp.AI).* + +## Usage + +The `Volo.Abp.AI` package provides integration with the following libraries: + +* [Microsoft.Extensions.AI](https://learn.microsoft.com/en-us/dotnet/ai/microsoft-extensions-ai) +* [Microsoft.SemanticKernel](https://learn.microsoft.com/en-us/semantic-kernel/overview/) + +The Microsoft.Extensions.AI library is suggested for library developers to keep the library dependency minimum and simple (since it provides basic abstractions and fundamental AI provider integrations), while Semantic Kernel is suggested for applications that need rich and advanced AI integration features. + +Check the following documentation to learn how to use these libraries with the ABP integration: + +- [ABP Microsoft.Extensions.AI integration](./microsoft-extensions-ai.md) +- [ABP Microsoft.SemanticKernel integration](./microsoft-semantic-kernel.md) + diff --git a/docs/en/framework/infrastructure/artificial-intelligence/microsoft-extensions-ai.md b/docs/en/framework/infrastructure/artificial-intelligence/microsoft-extensions-ai.md new file mode 100644 index 0000000000..35b370585e --- /dev/null +++ b/docs/en/framework/infrastructure/artificial-intelligence/microsoft-extensions-ai.md @@ -0,0 +1,176 @@ +# Microsoft.Extensions.AI +[Microsoft.Extensions.AI](https://learn.microsoft.com/en-us/dotnet/ai/microsoft-extensions-ai) is a library that provides a unified API for integrating AI services. It is a part of the Microsoft AI Extensions Library. It is used to integrate AI services into your application. This documentation is about the usage of this library with ABP Framework. Make sure you have read the [Artificial Intelligence](./index.md) documentation before reading this documentation. + +## Usage + +You can resolve `IChatClient` to access configured chat client from your service and use it directly. + +```csharp +public class MyService +{ + private readonly IChatClient _chatClient; + public MyService(IChatClient chatClient) + { + _chatClient = chatClient; + } + + public async Task GetResponseAsync(string prompt) + { + return await _chatClient.GetResponseAsync(prompt); + } +} +``` + +You can also resolve `IChatClientAccessor` to access the `IChatClient` optionally configured scenarios such as developing a module or a service that may use AI capabilities **optionally**. + + +```csharp +public class MyService +{ + private readonly IChatClientAccessor _chatClientAccessor; + public MyService(IChatClientAccessor chatClientAccessor) + { + _chatClientAccessor = chatClientAccessor; + } + + public async Task GetResponseAsync(string prompt) + { + var chatClient = _chatClientAccessor.ChatClient; + if (chatClient is null) + { + return "No chat client configured"; + } + return await chatClient.GetResponseAsync(prompt); + } +} +``` + +### Workspaces + +Workspaces are a way to configure isolated AI configurations for a named scope. You can define a workspace by decorating a class with the `WorkspaceNameAttribute` attribute that carries the workspace name. +- Workspace names must be unique. +- Workspace names cannot contain spaces _(use underscores or camelCase)_. +- Workspace names are case-sensitive. + +```csharp +using Volo.Abp.AI; + +[WorkspaceName("CommentSummarization")] +public class CommentSummarization +{ +} +``` + +> [!NOTE] +> If you don't specify the workspace name, the full name of the class will be used as the workspace name. + +You can resolve generic versions of `IChatClient` and `IChatClientAccessor` services for a specific workspace as generic arguments. If Chat Client is not configured for a workspace, you will get `null` from the accessor services. You should check the accessor before using it. This applies only for specified workspaces. Another workspace may have a configured Chat Client. + +`IChatClient` or `IChatClientAccessor` can be resolved to access a specific workspace's chat client. This is a typed chat client and can be configured separately from the default chat client. + + +Example of resolving a typed chat client: +```csharp +public class MyService +{ + private readonly IChatClient _chatClient; + + public MyService(IChatClient chatClient) + { + _chatClient = chatClient; + } + + public async Task GetResponseAsync(string prompt) + { + return await _chatClient.GetResponseAsync(prompt); + } +} +``` + +Example of resolving a typed chat client accessor: +```csharp +public class MyService +{ + private readonly IChatClientAccessor _chatClientAccessor; +} + public async Task GetResponseAsync(string prompt) + { + var chatClient = _chatClientAccessor.ChatClient; + if (chatClient is null) + { + return "No chat client configured"; + } + return await chatClient.GetResponseAsync(prompt); + } +} +``` + +## Configuration + +`AbpAIWorkspaceOptions` configuration is used to configure AI workspaces and their configurations. You can configure the default workspace and also configure isolated workspaces by using the this options class.It has to be configured **before the services are configured** in the `PreConfigure` method of your module class. It is important since the services are registered after the configuration is applied. + +- `AbpAIWorkspaceOptions` has a `Workspaces` property that is type of `WorkspaceConfigurationDictionary` which is a dictionary of workspace names and their configurations. It provides `Configure` and `ConfigureDefault` methods to configure the default workspace and also configure isolated workspaces by using the workspace type. + +- Configure method passes `WorkspaceConfiguration` object to the configure action. You can configure the `ChatClient` by using the `ConfigureChatClient` method. + +- `ConfigureChatClient()` method passes `ChatClientConfiguration` parameter to the configure action. You can configure the `Builder` and `BuilderConfigurers` by using the `ConfigureBuilder` method. + - `Builder` is set once and is used to build the `ChatClient` instance. + - `BuilderConfigurers` is a list of actions that are applied to the `Builder` instance for incremental changes.These actions are executed in the order they are added. + +To configure a chat client, you'll need a LLM provider package such as [Microsoft.Extensions.AI.OpenAI](https://www.nuget.org/packages/Microsoft.Extensions.AI.OpenAI) or [OllamaSharp](https://www.nuget.org/packages/OllamaSharp/) to configure a chat client. + +_The following example requires [OllamaSharp](https://www.nuget.org/packages/OllamaSharp/) package to be installed._ + + +Demonstration of the default workspace configuration: +```csharp +[DependsOn(typeof(AbpAIModule))] +public class MyProjectModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(options => + { + options.Workspaces.ConfigureDefault(configuration => + { + configuration.ConfigureChatClient(chatClientConfiguration => + { + chatClientConfiguration.Builder = new ChatClientBuilder( + sp => new OllamaApiClient("http://localhost:11434", "mistral") + ); + }); + }); + }); + } +} +``` + + +Demonstration of the isolated workspace configuration: +```csharp +[DependsOn(typeof(AbpAIModule))] +public class MyProjectModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(options => + { + options.Workspaces.Configure(configuration => + { + configuration.ConfigureChatClient(chatClientConfiguration => + { + chatClientConfiguration.Builder = new ChatClientBuilder( + sp => new OllamaApiClient("http://localhost:11434", "mistral") + ); + }); + }); + }); + } +} +``` + + +## See Also + +- [Usage of Semantic Kernel](./microsoft-semantic-kernel.md) +- [AI Samples for .NET](https://learn.microsoft.com/en-us/samples/dotnet/ai-samples/ai-samples/) \ No newline at end of file diff --git a/docs/en/framework/infrastructure/artificial-intelligence/microsoft-semantic-kernel.md b/docs/en/framework/infrastructure/artificial-intelligence/microsoft-semantic-kernel.md new file mode 100644 index 0000000000..07622391bd --- /dev/null +++ b/docs/en/framework/infrastructure/artificial-intelligence/microsoft-semantic-kernel.md @@ -0,0 +1,135 @@ +# Microsoft.SemanticKernel +[Microsoft.SemanticKernel](https://learn.microsoft.com/en-us/semantic-kernel/overview/) is a library that provides a unified SDK for integrating AI services. This documentation is about the usage of this library with ABP Framework. Make sure you have read the [Artificial Intelligence](./index.md) documentation before reading this documentation. + +## Usage + +Semantic Kernel can be used by resolving `IKernelAccessor` service that carries the `Kernel` instance. Kernel might be `null` if no workspace is configured. You should check the kernel before using it. + +```csharp +public class MyService +{ + private readonly IKernelAccessor _kernelAccessor; + public MyService(IKernelAccessor kernelAccessor) + { + _kernelAccessor = kernelAccessor; + } + + public async Task GetResponseAsync(string prompt) + { + var kernel = _kernelAccessor.Kernel; + if (kernel is null) + { + return "No kernel configured"; + } + return await kernel.InvokeAsync(prompt); + } +} +``` + +### Workspaces + +Workspaces are a way to configure isolated AI configurations for a named scope. You can define a workspace by decorating a class with the `WorkspaceNameAttribute` attribute that carries the workspace name. +- Workspace names must be unique. +- Workspace names cannot contain spaces _(use underscores or camelCase)_. +- Workspace names are case-sensitive. + +```csharp +using Volo.Abp.AI; + +[WorkspaceName("CommentSummarization")] +public class CommentSummarization +{ +} +``` + +> [!NOTE] +> If you don't specify the workspace name, the full name of the class will be used as the workspace name. + +You can resolve generic versions of `IKernelAccessor` service for a specific workspace as generic arguments. If Kernel is not configured for a workspace, you will get `null` from the accessor service. You should check the accessor before using it. This applies only for specified workspaces. Another workspace may have a configured Kernel. + + +`IKernelAccessor` can be resolved to access a specific workspace's kernel. This is a typed kernel accessor and each workspace can have its own kernel configuration. + +Example of resolving a typed kernel accessor: +```csharp +public class MyService +{ + private readonly IKernelAccessor _kernelAccessor; +} + public async Task GetResponseAsync(string prompt) + { + var kernel = _kernelAccessor.Kernel; + if (kernel is null) + { + return "No kernel configured"; + } + return await kernel.InvokeAsync(prompt); + } +} +``` + +## Configuration + +`AbpAIWorkspaceOptions` configuration is used to configure AI workspaces and their configurations. You can configure the default workspace and also configure isolated workspaces by using the this options class.It has to be configured **before the services are configured** in the `PreConfigure` method of your module class. It is important since the services are registered after the configuration is applied. + +- `AbpAIWorkspaceOptions` has a `Workspaces` property that is type of `WorkspaceConfigurationDictionary` which is a dictionary of workspace names and their configurations. It provides `Configure` and `ConfigureDefault` methods to configure the default workspace and also configure isolated workspaces by using the workspace type. + +- Configure method passes `WorkspaceConfiguration` object to the configure action. You can configure the `Kernel` by using the `ConfigureKernel` method. + +- `ConfigureKernel()` method passes `KernelConfiguration` parameter to the configure action. You can configure the `Builder` and `BuilderConfigurers` by using the `ConfigureBuilder` method. + - `Builder` is set once and is used to build the `Kernel` instance. + - `BuilderConfigurers` is a list of actions that are applied to the `Builder` instance for incremental changes.These actions are executed in the order they are added. + +To configure a kernel, you'll need a kernel connector package such as [Microsoft.SemanticKernel.Connectors.OpenAI](Microsoft.SemanticKernel.Connectors.OpenAI) to configure a kernel to use a specific LLM provider. + +_The following example requires [Microsoft.SemanticKernel.Connectors.AzureOpenAI](Microsoft.SemanticKernel.Connectors.AzureOpenAI) package to be installed._ + +Demonstration of the default workspace configuration: +```csharp +[DependsOn(typeof(AbpAIModule))] +public class MyProjectModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(options => + { + options.Workspaces.ConfigureDefault(configuration => + { + configuration.ConfigureKernel(kernelConfiguration => + { + kernelConfiguration.Builder = Kernel.CreateBuilder() + .AddAzureOpenAIChatClient("...", "..."); + }); + // Note: Chat client is not configured here + }); + }); + } +} +``` + +Demonstration of the isolated workspace configuration: +```csharp +[DependsOn(typeof(AbpAIModule))] +public class MyProjectModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(options => + { + options.Workspaces.Configure(configuration => + { + configuration.ConfigureKernel(kernelConfiguration => + { + kernelConfiguration.Builder = Kernel.CreateBuilder() + .AddAzureOpenAIChatClient("...", "..."); + }); + }); + }); + } +} +``` + +## See Also + +- [Usage of Microsoft.Extensions.AI](./microsoft-extensions-ai.md) +- [AI Samples for .NET](https://learn.microsoft.com/en-us/samples/dotnet/ai-samples/ai-samples/) \ No newline at end of file diff --git a/docs/en/framework/infrastructure/index.md b/docs/en/framework/infrastructure/index.md index a242c8b4fa..ec6377d757 100644 --- a/docs/en/framework/infrastructure/index.md +++ b/docs/en/framework/infrastructure/index.md @@ -10,7 +10,7 @@ ABP provides a complete infrastructure for creating real world software solutions with modern architectures based on the .NET platform. Each of the following documents explains an infrastructure feature: * [Audit Logging](./audit-logging.md) -* [Artificial Intelligence](./artificial-intelligence.md) +* [Artificial Intelligence](./artificial-intelligence/index.md) * [Background Jobs](./background-jobs/index.md) * [Background Workers](./background-workers/index.md) * [BLOB Storing](./blob-storing/index.md) diff --git a/docs/en/framework/ui/angular/component-replacement.md b/docs/en/framework/ui/angular/component-replacement.md index 6feebfc409..ec1102f893 100644 --- a/docs/en/framework/ui/angular/component-replacement.md +++ b/docs/en/framework/ui/angular/component-replacement.md @@ -584,8 +584,8 @@ Open the generated `nav-items.component.html` in `src/app/nav-items` folder and class="bg-transparent border-0 text-white" /> ``` diff --git a/docs/en/framework/ui/angular/data-table-column-extensions.md b/docs/en/framework/ui/angular/data-table-column-extensions.md index 30b9facf0d..0365336d81 100644 --- a/docs/en/framework/ui/angular/data-table-column-extensions.md +++ b/docs/en/framework/ui/angular/data-table-column-extensions.md @@ -171,7 +171,7 @@ It has the following properties: - **index** is the table index where the record is at. -- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `ExtensibleTableComponent`, including, but not limited to, its parent component. +- **getInjected** is the equivalent of [Injector.get](https://angular.dev/api/core/Injector). You can use it to reach injected dependencies of `ExtensibleTableComponent`, including, but not limited to, its parent component. ```js { diff --git a/docs/en/framework/ui/angular/dynamic-form-extensions.md b/docs/en/framework/ui/angular/dynamic-form-extensions.md index ee7af81397..a92a06d609 100644 --- a/docs/en/framework/ui/angular/dynamic-form-extensions.md +++ b/docs/en/framework/ui/angular/dynamic-form-extensions.md @@ -107,7 +107,7 @@ Extra properties defined on an existing entity will be included in the create an It has the following properties: -- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `ExtensibleFormPropComponent`, including, but not limited to, its parent components. +- **getInjected** is the equivalent of [Injector.get](https://angular.dev/api/core/Injector). You can use it to reach injected dependencies of `ExtensibleFormPropComponent`, including, but not limited to, its parent components. ```js { diff --git a/docs/en/framework/ui/angular/entity-action-extensions.md b/docs/en/framework/ui/angular/entity-action-extensions.md index 152ff6636d..5a8e74a2f9 100644 --- a/docs/en/framework/ui/angular/entity-action-extensions.md +++ b/docs/en/framework/ui/angular/entity-action-extensions.md @@ -272,7 +272,7 @@ It has the following properties: - **index** is the table index where the record is at. -- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `GridActionsComponent`, including, but not limited to, its parent component. +- **getInjected** is the equivalent of [Injector.get](https://angular.dev/api/core/Injector). You can use it to reach injected dependencies of `GridActionsComponent`, including, but not limited to, its parent component. ```js { diff --git a/docs/en/framework/ui/angular/form-validation.md b/docs/en/framework/ui/angular/form-validation.md index 35a54549af..b4ed31842d 100644 --- a/docs/en/framework/ui/angular/form-validation.md +++ b/docs/en/framework/ui/angular/form-validation.md @@ -52,7 +52,7 @@ export const appConfig: ApplicationConfig = { }; ``` -When a [validator](https://angular.io/guide/form-validation#defining-custom-validators) or an [async validator](https://angular.io/guide/form-validation#creating-asynchronous-validators) returns an error with the key given to the error blueprints (`uniqueUsername` here), the validation library will be able to display an error message after localizing according to the given key and interpolation params. The result will look like this: +When a [validator](https://angular.dev/guide/forms/form-validation) or an [async validator](https://angular.dev/guide/forms/form-validation) returns an error with the key given to the error blueprints (`uniqueUsername` here), the validation library will be able to display an error message after localizing according to the given key and interpolation params. The result will look like this: An already taken username is entered while creating new user and a custom error message appears under the input after validation. @@ -146,12 +146,13 @@ import { ChangeDetectionStrategy, Component } from "@angular/core"; selector: "app-validation-error", imports:[CommonModule, LocalizationPipe], template: ` -
- {%{{{ error.message | abpLocalization: error.interpoliteParams }}}%} -
+ @for (error of abpErrors; track $index){ +
+ {%{{{ error.message | abpLocalization: error.interpoliteParams }}}%} +
+ } `, changeDetection: ChangeDetectionStrategy.OnPush, }) @@ -250,7 +251,7 @@ buildForm() { {%{{ 'AbpIdentity::UserInformations' | abpLocalization }}%} - + @@ -263,7 +264,7 @@ buildForm() { + /> } diff --git a/docs/en/framework/ui/angular/http-requests.md b/docs/en/framework/ui/angular/http-requests.md index 5cb217540d..a5ca0dec66 100644 --- a/docs/en/framework/ui/angular/http-requests.md +++ b/docs/en/framework/ui/angular/http-requests.md @@ -9,7 +9,7 @@ ## About HttpClient -Angular has the amazing [HttpClient](https://angular.io/guide/http) for communication with backend services. It is a layer on top and a simplified representation of [XMLHttpRequest Web API](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest). It also is the recommended agent by Angular for any HTTP request. There is nothing wrong with using the `HttpClient` in your ABP project. +Angular has the amazing [HttpClient](https://angular.dev/guide/http/making-requests) for communication with backend services. It is a layer on top and a simplified representation of [XMLHttpRequest Web API](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest). It also is the recommended agent by Angular for any HTTP request. There is nothing wrong with using the `HttpClient` in your ABP project. However, `HttpClient` leaves error handling to the caller (method). In other words, HTTP errors are handled manually and by hooking into the observer of the `Observable` returned. @@ -93,7 +93,7 @@ postFoo(body: Foo) { } ``` -You may [check here](https://github.com/abpframework/abp/blob/dev/npm/ng-packs/packages/core/src/lib/models/rest.ts#L23) for complete `Rest.Request` type, which has only a few changes compared to [HttpRequest](https://angular.io/api/common/http/HttpRequest) class in Angular. +You may [check here](https://github.com/abpframework/abp/blob/dev/npm/ng-packs/packages/core/src/lib/models/rest.ts#L23) for complete `Rest.Request` type, which has only a few changes compared to [HttpRequest](https://angular.dev/api/common/http/HttpRequest) class in Angular. ### How to Disable Default Error Handler of RestService diff --git a/docs/en/framework/ui/angular/lazy-load-service.md b/docs/en/framework/ui/angular/lazy-load-service.md index e0942a15f0..9eb1113899 100644 --- a/docs/en/framework/ui/angular/lazy-load-service.md +++ b/docs/en/framework/ui/angular/lazy-load-service.md @@ -44,10 +44,13 @@ The first parameter of `load` method expects a `LoadingStrategy`. If you pass a ```js import { LazyLoadService, LOADING_STRATEGY } from '@abp/ng.core'; import { inject } from '@angular/core'; +import { AsyncPipe } from '@angular/common'; @Component({ template: ` - + @if (libraryLoaded$ | async) { + + } ` }) class DemoComponent { @@ -59,7 +62,7 @@ class DemoComponent { } ``` -The `load` method returns an observable to which you can subscibe in your component or with an `async` pipe. In the example above, the `NgIf` directive will render `` only **if the script gets successfully loaded or is already loaded before**. +The `load` method returns an observable to which you can subscibe in your component or with an `async` pipe. In the example above, the `@if(...)` directive will render `` only **if the script gets successfully loaded or is already loaded before**. > You can subscribe multiple times in your template with `async` pipe. The Scripts will only be loaded once. @@ -74,10 +77,13 @@ If you pass a `StyleLoadingStrategy` instance as the first parameter of `load` m ```js import { LazyLoadService, LOADING_STRATEGY } from '@abp/ng.core'; import { inject } from '@angular/core'; +import { AsyncPipe } from '@angular/common'; @Component({ template: ` - + @if (stylesLoaded$ | async) { + + } ` }) class DemoComponent { @@ -89,7 +95,7 @@ class DemoComponent { } ``` -The `load` method returns an observable to which you can subscibe in your component or with an `AsyncPipe`. In the example above, the `NgIf` directive will render `` only **if the style gets successfully loaded or is already loaded before**. +The `load` method returns an observable to which you can subscibe in your component or with an `AsyncPipe`. In the example above, the `@if(...)` directive will render `` only **if the style gets successfully loaded or is already loaded before**. > You can subscribe multiple times in your template with `async` pipe. The styles will only be loaded once. @@ -126,10 +132,13 @@ A common usecase is **loading multiple scripts and/or styles before using a feat import { LazyLoadService, LOADING_STRATEGY } from '@abp/ng.core'; import { forkJoin } from 'rxjs'; import { inject } from '@angular/core'; +import { AsyncPipe } from '@angular/common'; @Component({ template: ` - + @if (scriptsAndStylesLoaded$ | async) { + + } ` }) class DemoComponent { @@ -168,10 +177,13 @@ Another frequent usecase is **loading dependent scripts in order**: import { LazyLoadService, LOADING_STRATEGY } from '@abp/ng.core'; import { concat } from 'rxjs'; import { inject } from '@angular/core'; +import { AsyncPipe } from '@angular/common'; @Component({ template: ` - + @if (scriptsLoaded$ | async) { + + } ` }) class DemoComponent { diff --git a/docs/en/framework/ui/angular/list-service.md b/docs/en/framework/ui/angular/list-service.md index f8b0a42249..dab58d0e33 100644 --- a/docs/en/framework/ui/angular/list-service.md +++ b/docs/en/framework/ui/angular/list-service.md @@ -126,7 +126,7 @@ Then you can place inputs to the HTML: ## Usage with Observables -You may use observables in combination with [AsyncPipe](https://angular.io/guide/observables-in-angular#async-pipe) of Angular instead. Here are some possibilities: +You may use observables in combination with [AsyncPipe](https://angular.dev/ecosystem/rxjs-interop) of Angular instead. Here are some possibilities: ```js book$ = this.list.hookToQuery(query => this.bookService.getListByInput(query)); diff --git a/docs/en/framework/ui/angular/localization.md b/docs/en/framework/ui/angular/localization.md index 034e77abf0..9f3122529c 100644 --- a/docs/en/framework/ui/angular/localization.md +++ b/docs/en/framework/ui/angular/localization.md @@ -220,7 +220,7 @@ As of v2.9 ABP supports RTL. If you are generating a new project with v2.9 and a ### Step 1. Create Chunks for Bootstrap LTR and RTL -Find [styles configuration in angular.json](https://angular.io/guide/workspace-config#style-script-config) and make sure the chunks in your project has `bootstrap-rtl.min` and `bootstrap-ltr.min` as shown below. +Find [styles configuration in angular.json](https://angular.dev/reference/configs/workspace-config) and make sure the chunks in your project has `bootstrap-rtl.min` and `bootstrap-ltr.min` as shown below. ```json { @@ -279,7 +279,7 @@ export class AppComponent {} ## Registering a New Locale -Since ABP has more than one language, Angular locale files load lazily using [Webpack's import function](https://webpack.js.org/api/module-methods/#import-1) to avoid increasing the bundle size and to register the Angular core using the [`registerLocaleData`](https://angular.io/api/common/registerLocaleData) function. The chunks to be included in the bundle are specified by the [Webpack's magic comments](https://webpack.js.org/api/module-methods/#magic-comments) as hard-coded. Therefore a `registerLocale` function that returns Webpack `import` function must be passed to `provideAbpCore(withOptions({...}))`. +Since ABP has more than one language, Angular locale files load lazily using [Webpack's import function](https://webpack.js.org/api/module-methods/#import-1) to avoid increasing the bundle size and to register the Angular core using the [`registerLocaleData`](https://angular.dev/api/common/registerLocaleData) function. The chunks to be included in the bundle are specified by the [Webpack's magic comments](https://webpack.js.org/api/module-methods/#magic-comments) as hard-coded. Therefore a `registerLocale` function that returns Webpack `import` function must be passed to `provideAbpCore(withOptions({...}))`. ### registerLocaleFn diff --git a/docs/en/framework/ui/angular/modifying-the-menu.md b/docs/en/framework/ui/angular/modifying-the-menu.md index 75da5169cb..eec9e79ba0 100644 --- a/docs/en/framework/ui/angular/modifying-the-menu.md +++ b/docs/en/framework/ui/angular/modifying-the-menu.md @@ -44,7 +44,29 @@ export const appConfig: ApplicationConfig = { Notes - This approach works across themes. If you are using LeptonX, the brand logo component reads these values automatically; you don't need any theme-specific code. -- You can still override visuals with CSS variables if desired. See the LeptonX section for CSS overrides. +- You can still override visuals with CSS variables if desired. See the alternative approach below. + +### Alternative: Using CSS Variables (LeptonX Theme) + +If you're using the LeptonX theme, you can also configure the logo using CSS variables in your `styles.scss` file. This approach is specific to LeptonX and provides direct control over the logo styling. + +Add the following to your `src/styles.scss`: + +```scss +:root { + --lpx-logo: url('/assets/images/logo/logo-light.png'); + --lpx-logo-icon: url('/assets/images/logo/logo-light-thumbnail.png'); +} +``` + +**When to use each approach:** + +| Approach | Use Case | Theme Support | +|----------|----------|-------------| +| **provideLogo** (recommended) | Cross-theme compatibility, environment-based configuration | All themes | +| **CSS Variables** | LeptonX-specific styling, fine-grained CSS control | LeptonX only | + +**Recommendation:** Use the `provideLogo` approach for most cases as it's theme-independent and follows ABP's standard configuration pattern. Use CSS variables only when you need LeptonX-specific styling control or have existing CSS-based theme customizations. ## How to Add a Navigation Element diff --git a/docs/en/framework/ui/angular/page-toolbar-extensions.md b/docs/en/framework/ui/angular/page-toolbar-extensions.md index 8214c19889..30c5c9813d 100644 --- a/docs/en/framework/ui/angular/page-toolbar-extensions.md +++ b/docs/en/framework/ui/angular/page-toolbar-extensions.md @@ -215,7 +215,7 @@ It has the following properties: } ``` -- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `PageToolbarComponent`, including, but not limited to, its parent component. +- **getInjected** is the equivalent of [Injector.get](https://angular.dev/api/core/Injector). You can use it to reach injected dependencies of `PageToolbarComponent`, including, but not limited to, its parent component. ```js { diff --git a/docs/en/framework/ui/angular/permission-management-component-replacement.md b/docs/en/framework/ui/angular/permission-management-component-replacement.md index f91fbb42d9..7ee3022b80 100644 --- a/docs/en/framework/ui/angular/permission-management-component-replacement.md +++ b/docs/en/framework/ui/angular/permission-management-component-replacement.md @@ -334,7 +334,7 @@ Open the generated `permission-management.component.html` in `src/app/permission ```html - + @if (data.entityDisplayName) {

{%{{{ 'AbpPermissionManagement::Permissions' | abpLocalization }}}%} - @@ -360,19 +360,22 @@ Open the generated `permission-management.component.html` in `src/app/permission
@@ -393,34 +396,36 @@ Open the generated `permission-management.component.html` in `src/app/permission }}}%}

-
- - -
+ @for (permission of selectedGroupPermissions; track permission.name; let i = $index) { +
+ + +
+ }
@@ -433,7 +438,7 @@ Open the generated `permission-management.component.html` in `src/app/permission 'AbpIdentity::Save' | abpLocalization }}}%} - + } ``` diff --git a/docs/en/framework/ui/angular/pwa-configuration.md b/docs/en/framework/ui/angular/pwa-configuration.md index 2c042e9d77..ea63f60b96 100644 --- a/docs/en/framework/ui/angular/pwa-configuration.md +++ b/docs/en/framework/ui/angular/pwa-configuration.md @@ -37,7 +37,7 @@ Here is the output of the command: So, Angular CLI updates some files and add a few others: -- **ngsw-config.json** is where the [service worker configuration](https://angular.io/guide/service-worker-config) is placed. Not all PWAs have this file. It is specific to Angular. +- **ngsw-config.json** is where the [service worker configuration](https://angular.dev/ecosystem/service-workers/config) is placed. Not all PWAs have this file. It is specific to Angular. - **manifest.webmanifest** is a [web app manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) and provides information about your app in JSON format. - **icons** are placeholder icons that are referred to in your web app manifest. We will replace these in a minute. - **angular.json** has following modifications: @@ -45,7 +45,7 @@ So, Angular CLI updates some files and add a few others: - `serviceWorker` is `true` in production build. - `ngswConfigPath` refers to _ngsw-config.json_. - **package.json** has _@angular/service-worker_ as a new dependency. -- **app.config.ts** imports `ServiceWorkerModule` and registers a service worker filename. +- **app.config.ts** The `provideServiceWorker` provider is imported to register the service worker script. - **index.html** has following modifications: - A `` element that refers to _manifest.webmanifest_. - A `` tag that sets a theme color. @@ -342,8 +342,8 @@ Open _ngsw-config.json_ file and replace its content with this: } ``` -In case you want to cache other static files, please refer to the [service worker configuration document](https://angular.io/guide/service-worker-config#assetgroups) on Angular.io. +In case you want to cache other static files, please refer to the [service worker configuration document](https://angular.dev/ecosystem/service-workers/config) on Angular.dev. ### 3.2 Set Data Groups -This part is unique to your project. We recommend being very careful about which endpoints to cache. Please refer to [service worker configuration document](https://angular.io/guide/service-worker-config#datagroups) on Angular.io for details. +This part is unique to your project. We recommend being very careful about which endpoints to cache. Please refer to [service worker configuration document](https://angular.dev/ecosystem/service-workers/config) on Angular.dev for details. diff --git a/docs/en/framework/ui/angular/quick-start.md b/docs/en/framework/ui/angular/quick-start.md index f5bc88329f..0e48f0190e 100644 --- a/docs/en/framework/ui/angular/quick-start.md +++ b/docs/en/framework/ui/angular/quick-start.md @@ -84,10 +84,10 @@ Now let us take a look at the contents of the source folder. - **app.config.ts** is the [root configuration](https://angular.dev/api/platform-browser/bootstrapApplication) that includes information about how parts of your application are related and what to run at the initiation of your application. - **route.provider.ts** is used for [modifying the menu](../angular/modifying-the-menu.md). - **assets** is for static files. A file (e.g. an image) placed in this folder will be available as is when the application is served. -- **environments** includes one file per environment configuration. There are two configurations by default, but you may always introduce another one. These files are directly referred to in _angular.json_ and help you have different builds and application variables. Please refer to [configuring Angular application environments](https://angular.io/guide/build#configuring-application-environments) for details. +- **environments** includes one file per environment configuration. There are two configurations by default, but you may always introduce another one. These files are directly referred to in _angular.json_ and help you have different builds and application variables. Please refer to [configuring Angular application environments](https://angular.dev/tools/cli/environments) for details. - **index.html** is the HTML page served to visitors and will contain everything required to run your application. Servers should be configured to redirect every request to this page so that the Angular router can take over. Do not worry about how to add JavaScript and CSS files to it, because Angular CLI will do it automatically. - **main.ts** bootstraps and configures Angular application to run in the browser. It is production-ready, so forget about it. -- **polyfill.ts** is where you can add polyfills if you want to [support legacy browsers](https://angular.io/guide/browser-support). +- **polyfill.ts** is where you can add polyfills if you want to [support legacy browsers](https://angular.dev/reference/versions). - **style.scss** is the default entry point for application styles. You can change this or add new entry points in _angular.json_. - **test.ts** helps the unit test runner discover and bootstrap spec files. @@ -106,11 +106,11 @@ Now that you know about the files and folders, we can get the application up and New ABP Angular project home page -You may modify the behavior of the **start script** (in the package.json file) by changing the parameters passed to the `ng serve` command. For instance, if you do not want a browser window to open next time you run the script, remove `--open` from the end of it. Please check [ng serve documentation](https://angular.io/cli/serve) for all available options. +You may modify the behavior of the **start script** (in the package.json file) by changing the parameters passed to the `ng serve` command. For instance, if you do not want a browser window to open next time you run the script, remove `--open` from the end of it. Please check [ng serve documentation](https://angular.dev/cli/serve) for all available options. ### Angular Live Development Server -The development server of Angular is based on [Webpack DevServer](https://webpack.js.org/configuration/dev-server/). It tracks changes to source files and syncs the browser window after an incremental re-compilation every time [2](#f-dev-server) you make one. Your experience will be like this: +The development server runs via Angular's Application Builder and uses a fast, modern dev server under the hood. It tracks changes to source files and refreshes the browser after an incremental compilation every time [2](#f-dev-server) you make one. Your experience will be like this: Angular Live Development Server compiles again on template change and removes a button from the page displayed by the browser. @@ -122,13 +122,13 @@ Please keep in mind that you should not use this server in production. To provid 1 _If you see the error above when you run the Angular app, your browser might be blocking access to the API because of the self-signed certificate. Visit that address and allow access to it (once). When you see the Swagger interface, you are good to go._ [↩](#a-certificate-error) -2 _Sometimes, depending on the file changed, Webpack may miss the change and cannot reflect it in the browser. For example, tsconfig files are not being tracked. In such a case, please restart the development server._ [↩](#a-dev-server) +2 _Sometimes, depending on the file changed, the development server may not pick up the change (for example, certain configuration files like tsconfig are not watched). In such a case, please restart the development server._ [↩](#a-dev-server) --- ## How to Build the Angular Application -An Angular application can have multiple [build targets](https://angular.io/guide/glossary#target), i.e. **configurations in angular.json** which define how [Architect](https://angular.io/guide/glossary#architect) will build applications and libraries. Usually, each build configuration has a separate environment variable file. Currently, the project has two: One for development and one for production. +An Angular application can have multiple build targets, i.e. **configurations in angular.json** which define how [Architect](https://angular.dev/reference/configs/workspace-config) will build applications and libraries. Usually, each build configuration has a separate environment variable file. Currently, the project has two: One for development and one for production. ```js // this is what environment variables look like @@ -161,7 +161,7 @@ export const environment = { } as Config.Environment; ``` -When you run the development server, variables defined in _environment.ts_ take effect. Similarly, in production mode, the default environment is replaced by _environment.prod.ts_ and completely different variables become effective. You may even [create a new build configuration](https://angular.dev/reference/configs/workspace-config#alternate-build-configurations) and set [file replacements](https://angular.io/guide/build#configure-target-specific-file-replacements) to use a completely new environment. For now, we will start a production build: +When you run the development server, variables defined in _environment.ts_ take effect. Similarly, in production mode, the default environment is replaced by _environment.prod.ts_ and completely different variables become effective. You may even [create a new build configuration](https://angular.dev/reference/configs/workspace-config#alternate-build-configurations) and set [file replacements](https://angular.dev/tools/cli/environments) to use a completely new environment. For now, we will start a production build: 1. Open your terminal and navigate to the root Angular folder. 2. Run `yarn` or `npm install` if you have not installed dependencies already. @@ -180,18 +180,18 @@ Angular web applications run on the browser and require no server except for a [ ```shell # please replace MyProjectName with your project name -npx servor dist/MyProjectName index.html 4200 --browse +npx servor dist/MyProjectName/browser index.html 4200 --browse ``` This command will download and start a simple static server, a browser window at `http://localhost:4200` will open, and the compiled output of your project will be served. Of course, you need your application to run on an optimized web server and become available to everyone. This is quite straight-forward: -1. Create a new static web server instance. You can use a service like [Azure App Service](https://azure.microsoft.com/en-us/services/app-service/web/), [Firebase](https://firebase.google.com/docs/hosting), [Netlify](https://www.netlify.com/), [Vercel](https://vercel.com/), or even [GitHub Pages](https://angular.io/guide/deployment#deploy-to-github-pages). Another option is maintaining own web server with [NGINX](https://www.nginx.com/), [IIS](https://www.iis.net/), [Apache HTTP Server](https://httpd.apache.org/), or equivalent. +1. Create a new static web server instance. You can use a service like [Azure App Service](https://azure.microsoft.com/en-us/services/app-service/web/), [Firebase](https://firebase.google.com/docs/hosting), [Netlify](https://www.netlify.com/), [Vercel](https://vercel.com/), or even [GitHub Pages](https://angular.dev/tools/cli/deployment). Another option is maintaining own web server with [NGINX](https://www.nginx.com/), [IIS](https://www.iis.net/), [Apache HTTP Server](https://httpd.apache.org/), or equivalent. 2. Copy the files from `dist/MyProjectName` [1](#f-dist-folder-name) to a publicly served destination on the server via CLI of the service provider, SSH, or FTP (whichever is available). This step would be defined as a job if you have a CI/CD flow. -3. [Configure the server](https://angular.io/guide/deployment#server-configuration) to redirect all requests to the _index.html_ file. Some services do that automatically. Others require you [to add a file to the bundle via assets](https://angular.io/guide/workspace-config#assets-configuration) which describes the server how to do the redirections. Occasionally, you may need to do manual configuration. +3. [Configure the server](https://angular.dev/tools/cli/deployment#server-configuration) to redirect all requests to the _index.html_ file. Some services do that automatically. Others require you [to add a file to the bundle via assets](https://angular.dev/reference/configs/workspace-config) which describes the server how to do the redirections. Occasionally, you may need to do manual configuration. -In addition, you can [deploy your application to certain targets using the Angular CLI](https://angular.io/guide/deployment#automatic-deployment-with-the-cli). Here are some deploy targets: +In addition, you can [deploy your application to certain targets using the Angular CLI](https://angular.dev/tools/cli/deployment#automatic-deployment-with-the-cli). Here are some deploy targets: - [Azure](https://github.com/Azure/ng-deploy-azure#readme) - [Firebase](https://github.com/angular/angularfire#readme) diff --git a/docs/en/framework/ui/angular/router-events.md b/docs/en/framework/ui/angular/router-events.md index b7b760ae3f..5185c9c922 100644 --- a/docs/en/framework/ui/angular/router-events.md +++ b/docs/en/framework/ui/angular/router-events.md @@ -7,7 +7,7 @@ # Router Events Simplified -`RouterEvents` is a utility service for filtering specific router events and reacting to them. Please see [this page in Angular docs](https://angular.io/api/router/Event) for available router events. +`RouterEvents` is a utility service for filtering specific router events and reacting to them. Please see [this page in Angular docs](https://angular.dev/api/router/Event) for available router events. ## Benefit diff --git a/docs/en/framework/ui/angular/service-proxies.md b/docs/en/framework/ui/angular/service-proxies.md index 51a6c4f5b4..c816158f77 100644 --- a/docs/en/framework/ui/angular/service-proxies.md +++ b/docs/en/framework/ui/angular/service-proxies.md @@ -114,7 +114,7 @@ export class BookComponent implements OnInit { } ``` -The Angular compiler removes the services that have not been injected anywhere from the final output. See the [tree-shakable providers documentation](https://angular.io/guide/dependency-injection-providers#tree-shakable-providers). +The Angular compiler removes the services that have not been injected anywhere from the final output. See the [tree-shakable providers documentation](https://angular.dev/guide/di/defining-dependency-providers). ### Models @@ -152,9 +152,11 @@ export class BookComponent implements OnInit { ``` diff --git a/docs/en/framework/ui/angular/ssr-configuration.md b/docs/en/framework/ui/angular/ssr-configuration.md new file mode 100644 index 0000000000..258fce99b4 --- /dev/null +++ b/docs/en/framework/ui/angular/ssr-configuration.md @@ -0,0 +1,280 @@ +```json +//[doc-seo] +{ + "Description": "Learn how to configure Server-Side Rendering (SSR) for your Angular application in the ABP Framework to improve performance and SEO." +} +``` + +# SSR Configuration + +[Server-Side Rendering (SSR)](https://angular.io/guide/ssr) is a process that involves rendering pages on the server, resulting in initial HTML content that contains the page state. This allows the browser to show the page to the user immediately, before the JavaScript bundles are downloaded and executed. + +SSR improves the **performance** (First Contentful Paint) and **SEO** (Search Engine Optimization) of your application. + +## 1. Install ABP Angular SSR + +The ABP Framework provides a schematic to easily add SSR support to your Angular application. + +Run the following command in the root folder of your Angular application: + +```shell +yarn ng generate @abp/ng.schematics:ssr-add +``` + +Alternatively, you can specify the project name if you have a multi-project workspace: + +```shell +yarn ng generate @abp/ng.schematics:ssr-add --project MyProjectName +``` + +This command automates the setup process by installing necessary dependencies, creating server-side entry points, and updating your configuration files. + +## 2. What Changes? + +When you run the schematic, it performs the following actions: + +### 2.1. Dependencies + +It adds the following packages to your `package.json`: + +- **express**: A minimal and flexible Node.js web application framework. +- **@types/express**: Type definitions for Express. +- **openid-client**: A library for OpenID Connect (OIDC) relying party (RP) implementation, used for authentication on the server. + +```json +{ + "dependencies": { + "express": "^4.18.2", + "openid-client": "^5.6.4" + }, + "devDependencies": { + "@types/express": "^4.17.17" + } +} +``` + +**For Webpack projects only:** +- **browser-sync** (Dev dependency): Used for live reloading during development. + +### 2.2. Scripts & Configuration + +The changes depend on the builder used in your project (Application Builder or Webpack). + +#### Application Builder (esbuild) + +If your project uses the **Application Builder** (`@angular/build:application`), the schematic: + +- **Scripts**: Adds `serve:ssr:project-name` to serve the SSR application. +- **angular.json**: Updates the `build` target to enable SSR (`outputMode: 'server'`) and sets the SSR entry point. + +```json +{ + "projects": { + "MyProjectName": { + "architect": { + "build": { + "options": { + "outputPath": "dist/MyProjectName", + "outputMode": "server", + "ssr": { + "entry": "src/server.ts" + } + } + } + } + } + } +} +``` + +- **tsconfig**: Updates the application's `tsconfig` to include `server.ts`. + +#### Webpack Builder + +If your project uses the **Webpack Builder** (`@angular-devkit/build-angular:browser`), the schematic: + +- **Scripts**: Adds `dev:ssr`, `serve:ssr`, `build:ssr`, and `prerender` scripts. +- **angular.json**: Adds new targets: `server`, `serve-ssr`, and `prerender`. +- **tsconfig**: Updates the server's `tsconfig` to include `server.ts`. + +### 2.3. Files + +- **server.ts**: This file is the main entry point for the server-side application. + - **Standalone Projects**: Generates a server entry point compatible with `bootstrapApplication`. + - **NgModule Projects**: Generates a server entry point compatible with `platformBrowserDynamic`. + +```typescript +import { + AngularNodeAppEngine, + createNodeRequestHandler, + isMainModule, + writeResponseToNodeResponse, +} from '@angular/ssr/node'; +import express from 'express'; +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { environment } from './environments/environment'; +import { ServerCookieParser } from '@abp/ng.core'; +import * as oidc from 'openid-client'; + +// ... (OIDC configuration and setup) + +const app = express(); +const angularApp = new AngularNodeAppEngine(); + +// ... (OIDC routes: /authorize, /logout, /) + +/** + * Serve static files from /browser + */ +app.use( + express.static(browserDistFolder, { + maxAge: '1y', + index: false, + redirect: false, + }), +); + +/** + * Handle all other requests by rendering the Angular application. + */ +app.use((req, res, next) => { + angularApp + .handle(req) + .then(response => { + if (response) { + res.cookie('ssr-init', 'true', {...secureCookie, httpOnly: false}); + return writeResponseToNodeResponse(response, res); + } else { + return next() + } + }) + .catch(next); +}); + +// ... (Start server logic) + +export const reqHandler = createNodeRequestHandler(app); +``` +- **app.routes.server.ts**: Defines server-side routes and render modes (e.g., Prerender, Server, Client). This allows fine-grained control over how each route is rendered. + +```typescript +import { RenderMode, ServerRoute } from '@angular/ssr'; + +export const serverRoutes: ServerRoute[] = [ + { + path: '**', + renderMode: RenderMode.Server + } +]; +``` + +- **app.config.server.ts**: Merges the application configuration with server-specific providers. + +```typescript +import { mergeApplicationConfig, ApplicationConfig, provideAppInitializer, inject, PLATFORM_ID, TransferState } from '@angular/core'; +import { isPlatformServer } from '@angular/common'; +import { provideServerRendering, withRoutes } from '@angular/ssr'; +import { appConfig } from './app.config'; +import { serverRoutes } from './app.routes.server'; +import { SSR_FLAG } from '@abp/ng.core'; + +const serverConfig: ApplicationConfig = { + providers: [ + provideAppInitializer(() => { + const platformId = inject(PLATFORM_ID); + const transferState = inject(TransferState); + if (isPlatformServer(platformId)) { + transferState.set(SSR_FLAG, true); + } + }), + provideServerRendering(withRoutes(serverRoutes)), + ], +}; + +export const config = mergeApplicationConfig(appConfig, serverConfig); +``` +- **index.html**: Removes the loading spinner (`
`) to prevent hydration mismatches. + +## 3. Running the Application + +After the installation is complete, you can run your application with SSR support. + +### Application Builder + +To serve the application with SSR in development: + +```shell +yarn start +# or +yarn ng serve +``` + +To serve the built application (production): + +```shell +yarn run serve:ssr:project-name +``` + +### Webpack Builder + +**Development:** + +```shell +yarn run dev:ssr +``` + +**Production:** + +```shell +yarn run build:ssr +yarn run serve:ssr +``` + +## 4. Authentication & SSR + +The schematic installs `openid-client` to handle authentication on the server side. This ensures that when a user accesses a protected route, the server can validate their session or redirect them to the login page before rendering the content. + +> Ensure your OpenID Connect configuration (in `environment.ts` or `app.config.ts`) is compatible with the server environment. + +## 5. Deployment + +To deploy your Angular SSR application to a production server, follow these steps: + +### 5.1. Build the Application + +Run the build command to generate the production artifacts: + +```shell +yarn build +# or if using Webpack builder +yarn run build:ssr +``` + +### 5.2. Prepare Artifacts + +After the build is complete, you will find the output in the `dist` folder. +For the **Application Builder**, the output structure typically looks like this: + +``` +dist/MyProjectName/ +├── browser/ # Client-side bundles +└── server/ # Server-side bundles and entry point (server.mjs) +``` + +You need to copy the entire `dist/MyProjectName` folder to your server. + +### 5.3. Run the Server + +On your server, navigate to the folder where you copied the artifacts and run the server using Node.js: + +```shell +node server/server.mjs +``` + +> [!TIP] +> It is recommended to use a process manager like [PM2](https://pm2.keymetrics.io/) to keep your application alive and handle restarts. + +```shell +pm2 start server/server.mjs --name "my-app" +``` diff --git a/docs/en/framework/ui/angular/subscription-service.md b/docs/en/framework/ui/angular/subscription-service.md index b04a3dbf58..c64edb9fe0 100644 --- a/docs/en/framework/ui/angular/subscription-service.md +++ b/docs/en/framework/ui/angular/subscription-service.md @@ -7,7 +7,7 @@ # Managing RxJS Subscriptions -`SubscriptionService` is a utility service to provide an easy unsubscription from RxJS observables in Angular components and directives. Please see [why you should unsubscribe from observables on instance destruction](https://angular.io/guide/lifecycle-hooks#cleaning-up-on-instance-destruction). +`SubscriptionService` is a utility service to provide an easy unsubscription from RxJS observables in Angular components and directives. Please see [why you should unsubscribe from observables on instance destruction](https://angular.dev/guide/components/lifecycle). ## Getting Started diff --git a/docs/en/framework/ui/angular/testing.md b/docs/en/framework/ui/angular/testing.md index c0d5ff312c..ab215f7eba 100644 --- a/docs/en/framework/ui/angular/testing.md +++ b/docs/en/framework/ui/angular/testing.md @@ -7,7 +7,7 @@ # Unit Testing Angular UI -ABP Angular UI is tested like any other Angular application. So, [the guide here](https://angular.io/guide/testing) applies to ABP too. That said, we would like to point out some **unit testing topics specific to ABP Angular applications**. +ABP Angular UI is tested like any other Angular application. So, [the guide here](https://angular.dev/guide/testing) applies to ABP too. That said, we would like to point out some **unit testing topics specific to ABP Angular applications**. ## Setup diff --git a/docs/en/framework/ui/angular/theming.md b/docs/en/framework/ui/angular/theming.md index cb6f8fe8b0..1351a02f33 100644 --- a/docs/en/framework/ui/angular/theming.md +++ b/docs/en/framework/ui/angular/theming.md @@ -81,8 +81,8 @@ You can run the following command in **Angular** project directory to copy the s ### Global/Component Styles -Angular can bundle global style files and component styles with components. -See the [component styles](https://angular.io/guide/component-styles) guide on Angular documentation for more information. +Angular can bundle global style files and component styles with components. +See the [component styles](https://angular.dev/guide/components/styling) guide on Angular documentation for more information. ### Layout Parts @@ -238,8 +238,10 @@ import { Router } from '@angular/router'; selector: 'abp-current-user-test', template: ` - + @if (data.textTemplate.icon){ + {%{{{ data.textTemplate.text | abpLocalization }}}%} + } `, }) diff --git a/docs/en/framework/ui/angular/track-by-service.md b/docs/en/framework/ui/angular/track-by-service.md index 046935e5b6..15cdd9577f 100644 --- a/docs/en/framework/ui/angular/track-by-service.md +++ b/docs/en/framework/ui/angular/track-by-service.md @@ -5,9 +5,9 @@ } ``` -# Easy *ngFor trackBy +# Easy @for() track -`TrackByService` is a utility service to provide an easy implementation for one of the most frequent needs in Angular templates: `TrackByFunction`. Please see [this page in Angular docs](https://angular.io/guide/template-syntax#ngfor-with-trackby) for its purpose. +`TrackByService` is a utility service to provide an easy implementation for one of the most frequent needs in Angular templates: `TrackByFunction`. Please see [this page in Angular docs](https://angular.dev/guide/templates/control-flow) for its purpose. @@ -54,8 +54,9 @@ You can use `by` to get a `TrackByFunction` that tracks the iterated object base ```html - -
{%{{{ item.name }}}%}
+@for (item of list; track: track.by('id')) { +
{%{{{ item.name }}}%}
+} ``` @@ -67,11 +68,11 @@ import { trackBy } from "@abp/ng.core"; @Component({ template: ` -
- {%{{{ item.name }}}%} -
+ @for (item of list; track: trackById) { +
+ {%{{{ item.name }}}%} +
+ } `, }) class DemoComponent { @@ -89,12 +90,11 @@ You can use `byDeep` to get a `TrackByFunction` that tracks the iterated object ```html - -
- {%{{{ item.tenant.name }}}%} -
+@for (item of list; track: track.byDeep('tenant', 'account', 'id')) { +
+ {%{{{ item.tenant.name }}}%} +
+} ``` @@ -106,11 +106,11 @@ import { trackByDeep } from "@abp/ng.core"; @Component({ template: ` -
- {%{{{ item.name }}}%} + @for (item of list; track: trackByTenantAccountId) { +
+ {%{{{ item.name }}}%}
+ } `, }) class DemoComponent { diff --git a/docs/en/get-started/empty-aspnet-core-application.md b/docs/en/get-started/empty-aspnet-core-application.md index 78eb744eda..5bcec4ebb6 100644 --- a/docs/en/get-started/empty-aspnet-core-application.md +++ b/docs/en/get-started/empty-aspnet-core-application.md @@ -11,7 +11,7 @@ This tutorial explains how to start ABP from scratch with minimal dependencies. ## Create a New Project -1. Create a new AspNet Core Web Application with Visual Studio 2022 (17.0.0+): +1. Create a new AspNet Core Web Application with Visual Studio 2026 (18.0.0+): ![](../images/create-new-aspnet-core-application-v2.png) diff --git a/docs/en/get-started/layered-web-application.md b/docs/en/get-started/layered-web-application.md index dc65e45829..b2bd05454a 100644 --- a/docs/en/get-started/layered-web-application.md +++ b/docs/en/get-started/layered-web-application.md @@ -22,8 +22,8 @@ In this quick start guide, you will learn how to create and run a layered (and p First things first! Let's setup your development environment before creating the first project. The following tools should be installed on your development machine: -* [Visual Studio 2022](https://visualstudio.microsoft.com/) or another IDE that supports [.NET 9.0+](https://dotnet.microsoft.com/download/dotnet) development. -* [.NET 9.0+](https://dotnet.microsoft.com/en-us/download/dotnet){{ if UI != "Blazor" }} +* [Visual Studio 2026](https://visualstudio.microsoft.com/) or another IDE that supports [.NET 10.0+](https://dotnet.microsoft.com/download/dotnet) development. +* [.NET 10.0+](https://dotnet.microsoft.com/en-us/download/dotnet){{ if UI != "Blazor" }} * [Node v22.11+](https://nodejs.org/){{ end }}{{ if UI == "NG" }} * [Yarn v1.22+ (not v2+)](https://classic.yarnpkg.com/en/docs/install) or npm v10+ (already installed with Node){{ end }} * [Docker Desktop](https://www.docker.com/products/docker-desktop/) @@ -276,4 +276,9 @@ You can start the following application(s): > For example in non-tiered MVC with public website application: -![solution-runner-public-website](images/solution-runner-public-website.png) \ No newline at end of file +![solution-runner-public-website](images/solution-runner-public-website.png) + +## What's next? + +- [TODO Application Tutorial with Layered Solution](../tutorials/todo/layered/index.md) +- [Web Application Development Tutorial](../tutorials/book-store/index.md) \ No newline at end of file diff --git a/docs/en/get-started/microservice.md b/docs/en/get-started/microservice.md index fb8626baef..d57c652b8e 100644 --- a/docs/en/get-started/microservice.md +++ b/docs/en/get-started/microservice.md @@ -15,8 +15,8 @@ In this quick start guide, you will learn how to create and run a microservice s First things first! Let's setup your development environment before creating the first project. The following tools should be installed on your development machine: -* [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) or another IDE that supports .NET development -* [.NET 9.0+](https://dotnet.microsoft.com/en-us/download/dotnet) +* [Visual Studio 2026](https://visualstudio.microsoft.com/vs/) or another IDE that supports .NET development +* [.NET 10.0+](https://dotnet.microsoft.com/en-us/download/dotnet) * [Node v22.11+](https://nodejs.org/) * [Yarn v1.22+ (not v2+)](https://classic.yarnpkg.com/en/docs/install) or npm v10+ (already installed with Node), **This is required for the Angular applications.** * [Docker Desktop (with Kubernetes enabled)](https://www.docker.com/products/docker-desktop/) diff --git a/docs/en/get-started/single-layer-web-application.md b/docs/en/get-started/single-layer-web-application.md index 06c5ed90f9..9ee87fd439 100644 --- a/docs/en/get-started/single-layer-web-application.md +++ b/docs/en/get-started/single-layer-web-application.md @@ -21,8 +21,8 @@ In this quick start guide, you will learn how to create and run a single layer w First things first! Let's setup your development environment before creating the first project. The following tools should be installed on your development machine: -* [Visual Studio 2022](https://visualstudio.microsoft.com/) or another IDE that supports [.NET 9.0+](https://dotnet.microsoft.com/download/dotnet) development. -* [.NET 9.0+](https://dotnet.microsoft.com/en-us/download/dotnet){{ if UI != "Blazor" }} +* [Visual Studio 2026](https://visualstudio.microsoft.com/) or another IDE that supports [.NET 10.0+](https://dotnet.microsoft.com/download/dotnet) development. +* [.NET 10.0+](https://dotnet.microsoft.com/en-us/download/dotnet){{ if UI != "Blazor" }} * [Node v22.11+](https://nodejs.org/){{ end }}{{ if UI == "NG" }} * [Yarn v1.22+ (not v2+)](https://classic.yarnpkg.com/en/docs/install) or npm v10+ (already installed with Node){{ end }} @@ -185,3 +185,7 @@ You can then hit *F5* or *Ctrl + F5* to run the web application. It will run and ![bookstore-browser-users-page](images/no-layers-bookstore-browser-users-page_dark.png) You can use `admin` as username and `1q2w3E*` as default password to login to the application. + +## What's next? + +- [TODO Application Tutorial with Single-Layer Solution](../tutorials/todo/single-layer/index.md) \ No newline at end of file diff --git a/docs/en/images/abp-overall-diagram-1600.png b/docs/en/images/abp-overall-diagram-1600.png index 16d397466a..3b02dd66dc 100644 Binary files a/docs/en/images/abp-overall-diagram-1600.png and b/docs/en/images/abp-overall-diagram-1600.png differ diff --git a/docs/en/images/db-options.png b/docs/en/images/db-options.png index 91d2b51ce7..d25811c49b 100644 Binary files a/docs/en/images/db-options.png and b/docs/en/images/db-options.png differ diff --git a/docs/en/images/elsa-studio-wasm.png b/docs/en/images/elsa-studio-wasm.png new file mode 100644 index 0000000000..9365ef6a4c Binary files /dev/null and b/docs/en/images/elsa-studio-wasm.png differ diff --git a/docs/en/images/ui-options.png b/docs/en/images/ui-options.png index 6affab9d21..3c30cd16d7 100644 Binary files a/docs/en/images/ui-options.png and b/docs/en/images/ui-options.png differ diff --git a/docs/en/modules/ai-management/index.md b/docs/en/modules/ai-management/index.md index c114edfdd2..f60044fb56 100644 --- a/docs/en/modules/ai-management/index.md +++ b/docs/en/modules/ai-management/index.md @@ -9,8 +9,11 @@ > You must have an ABP Team or a higher license to use this module. -This module implements AI (Artificial Intelligence) management capabilities on top of the [Artificial Intelligence Workspaces](../../framework/infrastructure/artificial-intelligence.md) feature of the ABP Framework and allows to manage workspaces dynamically from the application including UI components and API endpoints. +> **⚠️ Important Notice** +> The **AI Management Module** is currently in **preview** and not yet production-ready. The documentation and implementation are subject to change. +> We recommend using this module for **evaluation and experimentation** only, not in production environments for now. +This module implements AI (Artificial Intelligence) management capabilities on top of the [Artificial Intelligence Workspaces](../../framework/infrastructure/artificial-intelligence/index.md) feature of the ABP Framework and allows to manage workspaces dynamically from the application including UI components and API endpoints. ## How to Install @@ -75,7 +78,7 @@ The AI Management module includes a built-in chat interface for testing workspac * Test streaming responses * Verify workspace configuration before using in production -> Access the chat interface at: `/AIManagement/Chat` +> Access the chat interface at: `/AIManagement/Workspaces/{WorkspaceName}` ## Workspace Configuration @@ -134,7 +137,7 @@ PreConfigure(options => #### Dynamic Workspaces -* **Created through the UI** or programmatically via `IWorkspaceRepository` +* **Created through the UI** or programmatically via `ApplicationWorkspaceManager` and `IWorkspaceRepository` * **Fully manageable** - can be created, updated, activated/deactivated, and deleted * **Stored in database** with all configuration * **Ideal for** user-customizable AI features @@ -142,15 +145,30 @@ PreConfigure(options => Example (data seeding): ```csharp -var workspace = new Workspace( - name: "CustomerSupportWorkspace", - provider: "OpenAI", - modelName: "gpt-4", - apiKey: "your-api-key" -); -workspace.ApplicationName = ApplicationInfoAccessor.ApplicationName; -workspace.SystemPrompt = "You are a helpful customer support assistant."; -await _workspaceRepository.InsertAsync(workspace); +public class WorkspaceDataSeederContributor : IDataSeedContributor, ITransientDependency +{ + private readonly IWorkspaceRepository _workspaceRepository; + private readonly ApplicationWorkspaceManager _applicationWorkspaceManager; + public WorkspaceDataSeederContributor( + IWorkspaceRepository workspaceRepository, + ApplicationWorkspaceManager applicationWorkspaceManager) + { + _workspaceRepository = workspaceRepository; + _applicationWorkspaceManager = applicationWorkspaceManager; + } + + public async Task SeedAsync(DataSeedContext context) + { + var workspace = await _applicationWorkspaceManager.CreateAsync( + name: "CustomerSupportWorkspace", + provider: "OpenAI", + modelName: "gpt-4"); + + workspace.ApiKey = "your-api-key"; + workspace.SystemPrompt = "You are a helpful customer support assistant."; + + await _workspaceRepository.InsertAsync(workspace); + } ``` ### Workspace Naming Rules @@ -176,12 +194,13 @@ The AI Management module defines the following permissions: In addition to module-level permissions, you can restrict access to individual workspaces by setting the `RequiredPermissionName` property: ```csharp -var workspace = new Workspace( +var workspace = await _applicationWorkspaceManager.CreateAsync( name: "PremiumWorkspace", provider: "OpenAI", - modelName: "gpt-4", - requiredPermissionName: "MyApp.PremiumFeatures" + modelName: "gpt-4" ); +// Set a specific permission for the workspace +workspace.RequiredPermissionName = MyAppPermissions.AccessPremiumWorkspaces; ``` When a workspace has a required permission: @@ -248,7 +267,7 @@ public class MyService } ``` -> See [Artificial Intelligence](../../framework/infrastructure/artificial-intelligence.md) documentation for more details about workspace configuration. +> See [Artificial Intelligence](../../framework/infrastructure/artificial-intelligence/index.md) documentation for more details about workspace configuration. ### Scenario 2: AI Management with Domain Layer Dependency (Local Execution) @@ -562,14 +581,14 @@ After implementing and registering your factory: 2. **Through Code** (data seeding): ```csharp -await _workspaceRepository.InsertAsync(new Workspace( - GuidGenerator.Create(), - "MyOllamaWorkspace", - provider: "Ollama", - modelName: "mistral", - apiBaseUrl: "http://localhost:11434", - description: "Local Ollama workspace" -)); +var workspace = await _applicationWorkspaceManager.CreateAsync( + name: "MyOllamaWorkspace", + provider: "Ollama", + modelName: "mistral" +); +workspace.ApiBaseUrl = "http://localhost:11434"; +workspace.Description = "Local Ollama workspace"; +await _workspaceRepository.InsertAsync(workspace); ``` > **Tip**: The provider name you use in `AddFactory("ProviderName")` must match the provider name stored in the workspace configuration in the database. @@ -626,6 +645,6 @@ The cache is automatically invalidated when workspaces are created, updated, or ## See Also -- [Artificial Intelligence Infrastructure](../../framework/infrastructure/artificial-intelligence.md): Learn about the underlying AI workspace infrastructure +- [Artificial Intelligence Infrastructure](../../framework/infrastructure/artificial-intelligence/index.md): Learn about the underlying AI workspace infrastructure - [Microsoft.Extensions.AI](https://learn.microsoft.com/en-us/dotnet/ai/): Microsoft's unified AI abstractions -- [Semantic Kernel](https://learn.microsoft.com/en-us/semantic-kernel/): Microsoft's Semantic Kernel integration \ No newline at end of file +- [Semantic Kernel](https://learn.microsoft.com/en-us/semantic-kernel/): Microsoft's Semantic Kernel integration diff --git a/docs/en/modules/elsa-pro.md b/docs/en/modules/elsa-pro.md index 3a6ec4533b..6b93e42368 100644 --- a/docs/en/modules/elsa-pro.md +++ b/docs/en/modules/elsa-pro.md @@ -1,10 +1,17 @@ +```json +//[doc-seo] +{ + "Description": "Integrate Elsa Workflows into your ABP applications with this Pro module. Learn installation and setup for seamless workflow management." +} +``` + # Elsa Module (Pro) > You must have an ABP Team or a higher license to use this module. This module integrates [Elsa Workflows](https://docs.elsaworkflows.io/) into ABP Framework applications and is designed to make it easy for developers to use Elsa's capabilities within their ABP-based projects. For creating, managing, and customizing workflows themselves, please refer to [the official Elsa documentation](https://docs.elsaworkflows.io/). -## How to install +## How to Install The Elsa module is not installed in [the startup templates](../solution-templates/layered-web-application) by default and must be installed manually. There are two ways of installing a module into your application and each one of these approaches is explained in the next sections. @@ -37,6 +44,23 @@ After adding the package references, open the module class of the project (e.g.: > If you are using Blazor Web App, you need to add the `Volo.Elsa.Admin.Blazor.WebAssembly` package to the **{ProjectName}.Blazor.Client.csproj** project and add the `Volo.Elsa.Admin.Blazor.Server` package to the **{ProjectName}.Blazor.csproj** project. +### `AbpElsaAspNetCoreModule` and `AbpElsaIdentityModule` + +These two modules generally will be added to your authentication project. Please add `Volo.Elsa.Abp.AspNetCore` and `Volo.Elsa.Abp.Identity` packages to your project and add the `AbpElsaAspNetCoreModule` and `AbpElsaIdentityModule` to the `DependsOn` attribute of your module class based on your project structure: + +```xml + + +``` + +```csharp +[DependsOn( + //... + typeof(AbpElsaAspNetCoreModule), + typeof(AbpElsaIdentityModule) +)] +``` + ## The Elsa Module The Elsa Workflows has its own database provider, and also has a Tenant/Role/User system. They are under active development, so the ABP Elsa module is not yet fully integrated. Below is the current status of each module in the ABP's Elsa Module: @@ -56,6 +80,49 @@ The rest of the projects/modules are basically empty and will be implemented in - `AbpElsaBlazorWebAssemblyModule(Volo.Elsa.Abp.Blazor.WebAssembly)` - `AbpElsaWebModule(Volo.Elsa.Abp.Web)` +## Configure the Elsa Server + +You need to configure Elsa in your ABP application to use its features. You can do that in the `ConfigureServices` method of your `YourElsaAppModule` class as shown below: + +> For more information about configuring Elsa, please refer to [the official Elsa documentation](https://docs.elsaworkflows.io/). + +```cs +private void ConfigureElsa(ServiceConfigurationContext context, IConfiguration configuration) +{ + var connectionString = configuration.GetConnectionString("Default")!; + context.Services + .AddElsa(elsa => elsa + .UseAbpIdentity(identity => // Use UseAbpIdentity instead of UseIdentity to integrate with ABP Identity module + { + identity.TokenOptions = options => options.SigningKey = "large-signing-key-for-signing-JWT-tokens"; + }) + .UseWorkflowManagement(management => management.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString))) + .UseWorkflowRuntime(runtime => runtime.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString))) + .UseScheduling() + .UseJavaScript() + .UseLiquid() + .UseCSharp() + .UseHttp(http => http.ConfigureHttpOptions = options => configuration.GetSection("Http").Bind(options)) + .UseWorkflowsApi() + .AddActivitiesFrom() + .AddWorkflowsFrom() + ); +} +``` + +## Elsa Database Migration + +Elsa module uses its own database context and migration system, ABP Elsa module doesn't contain any `aggregate root/entity` at the moment. So, **you don't need to create any initial migration for Elsa module**. You just need to configure the Elsa Services as follows: + +```cs +.UseWorkflowManagement(management => management.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString))) +.UseWorkflowRuntime(runtime => runtime.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString))) +``` + +When you run your application, Elsa will create its own database tables if they do not exist. + +> See [how to configure Elsa Workflows to use different database providers for persistence, including SQL Server, PostgreSQL, and MongoDB](https://docs.elsaworkflows.io/getting-started/database-configuration) for more information. + ### Elsa Module Permissions The Elsa Workflow API endpoints check permissions. Also, it has a `*` wildcard permission to allow all permissions. @@ -72,14 +139,24 @@ You can also grant parts of the permissions to a role or user. It will add the ` ### Elsa Studio -Elsa Studio is an **independent** web application that allows you to design, manage, and execute workflows. It is built using **Blazor Server/WebAssembly**. +[Elsa Studio](https://docs.elsaworkflows.io/application-types/elsa-studio) is a **standalone** web application that allows you to design, manage, and execute workflows. It is built using **Blazor Server/WebAssembly**. + +`ElsaDemoApp.Studio.WASM` is a sample Blazor WebAssembly project that demonstrates how to use Elsa Studio with ELSA Server with ABP Framework. + +> Elsa Studio has its own layout and theme, and you can't integrate it into an ABP Blazor project for now. + +![Elsa Studio](../images/elsa-studio-wasm.png) + +Please check the [Elsa Workflows - Sample Workflow Demo](../samples/elsa-workflows-demo.md) document to download its source code for review. + +#### Elsa Studio Authentication Elsa Studio requires authentication and there are two ways to authenticate Elsa Studio: * Password Flow Authentication * Code Flow Authentication -#### Elsa Studio - Password Flow Authentication +##### Elsa Studio - Password Flow Authentication The `AbpElsaIdentityModule(Volo.Elsa.Abp.Identity)` module is used to integrate with [ABP Identity module](./identity-pro.md) to check Elsa Studio *username* and *password* against ABP Identity. @@ -109,7 +186,7 @@ Once, you logged in to the application, you can start defining workflows, manage ![elsa-main](../images/elsa-main-page.png) -#### Elsa Studio - Code Flow Authentication +##### Elsa Studio - Code Flow Authentication ABP applications use [OpenIddict](./openiddict-pro.md) for authentication. So, you can use the [Authorization Code Flow](https://oauth.net/2/grant-types/authorization-code/) to authenticate Elsa Studio. diff --git a/docs/en/modules/file-management.md b/docs/en/modules/file-management.md index e0cb3225f1..8a5f7aae29 100644 --- a/docs/en/modules/file-management.md +++ b/docs/en/modules/file-management.md @@ -144,6 +144,12 @@ You can move files by clicking `Actions -> Move` on the table. You can rename a file by clicking `Actions -> Rename` on the table. +###### File Sharing + +To share a file, click `Actions -> Share` in the table. Once sharing is enabled, you can copy the shared link directly from the table. + +> Anyone with the shared link will be able to access the file while sharing is enabled. + ## Data Seed This module doesn't seed any data. diff --git a/docs/en/modules/identity-pro.md b/docs/en/modules/identity-pro.md index 17c077c5c4..0d26154932 100644 --- a/docs/en/modules/identity-pro.md +++ b/docs/en/modules/identity-pro.md @@ -434,9 +434,10 @@ This module doesn't define any additional distributed event. See the [standard d ## See Also * [Import External Users](./identity/import-external-users.md) -* [LDAP Login](./identity/idap.md) +* [LDAP Login](./identity/ldap.md) * [OAuth Login](./identity/oauth-login.md) * [Periodic Password Change (Password Aging)](./identity/periodic-password-change.md) * [Two Factor Authentication](./identity/two-factor-authentication.md) * [Session Management](./identity/session-management.md) * [Password History](./identity/password-history.md) + diff --git a/docs/en/modules/identity/idap.md b/docs/en/modules/identity/ldap.md similarity index 100% rename from docs/en/modules/identity/idap.md rename to docs/en/modules/identity/ldap.md diff --git a/docs/en/release-info/migration-guides/abp-10-0.md b/docs/en/release-info/migration-guides/abp-10-0.md index b5fb4e0ed9..334adb2f4f 100644 --- a/docs/en/release-info/migration-guides/abp-10-0.md +++ b/docs/en/release-info/migration-guides/abp-10-0.md @@ -15,6 +15,24 @@ This document is a guide for upgrading ABP v9.x solutions to ABP v10.0. There ar We've upgraded ABP to .NET 10.0, so you need to move your solutions to .NET 10.0 if you want to use ABP 10.0. You can check Microsoft’s [Migrate from ASP.NET Core 9.0 to 10.0](https://learn.microsoft.com/en-us/aspnet/core/migration/90-to-100) documentation to see how to update an existing ASP.NET Core 9.0 project to ASP.NET Core 10.0. +### MySQL Support for .NET 10.0 + +**If you are using MySQL as your database provider, please be aware of the following compatibility issues before upgrading to ABP 10.0!** + +The MySQL Entity Framework Core providers currently have limited support for .NET 10.0: + +* **Pomelo.EntityFrameworkCore.MySql**: Does not yet support .NET 10.0. The team is actively working on adding support. +* **MySql.EntityFrameworkCore**: Currently in Release Candidate (RC) status with known bugs that may affect production applications. + +**Recommendation**: If you are using MySQL, we recommend waiting to upgrade to ABP 10.0 until the MySQL providers release stable versions with full .NET 10.0 support. + +**Track Progress**: + +* [Pomelo Provider - EF Core 10 Support](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/2007) +* [MySql.EntityFrameworkCore NuGet Package](https://www.nuget.org/packages/MySql.EntityFrameworkCore/#versions-body-tab) + +We will update to support the latest stable MySQL providers as soon as they become available. + ### Add New EF Core Migrations Some entities in certain modules have been modified. If you are using Entity Framework Core, please create a new EF Core migration in your project after upgrading to ABP 10.0. @@ -27,6 +45,8 @@ We removed the Razor Runtime Compilation support since it is obsolete and replac If you want to keep using it, you can add [Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation](https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation) package to your project and configure it manually. +> If the referenced project also contains Razor Pages that require this feature, add the package to that project as well. + ```csharp using Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation; using Volo.Abp.DependencyInjection; diff --git a/docs/en/release-info/migration-guides/abp-5-0-angular.md b/docs/en/release-info/migration-guides/abp-5-0-angular.md index f6abcf10f6..66627b1e8a 100644 --- a/docs/en/release-info/migration-guides/abp-5-0-angular.md +++ b/docs/en/release-info/migration-guides/abp-5-0-angular.md @@ -104,7 +104,7 @@ If you don't want to use the NGXS, you should remove all NGXS related imports, i ## @angular/localize package -[`@angular/localize`](https://angular.io/api/localize) dependency has been removed from `@abp/ng.core` package. The package must be installed in your app. Run the following command to install: +[`@angular/localize`](https://angular.dev/guide/i18n/add-package) dependency has been removed from `@abp/ng.core` package. The package must be installed in your app. Run the following command to install: ```bash npm install @angular/localize@12 diff --git a/docs/en/release-info/release-notes.md b/docs/en/release-info/release-notes.md index f0c58f0013..bf335fa7a2 100644 --- a/docs/en/release-info/release-notes.md +++ b/docs/en/release-info/release-notes.md @@ -14,9 +14,9 @@ Also see the following notes about ABP releases: * [ABP Studio release notes](../studio/release-notes.md) * [Change logs for ABP pro packages](https://abp.io/pro-releases) -## 10.0 (2025-10-01) +## 10.0 (2025-11-18) -This is currently a RC (release-candidate) and you can see the detailed **[blog post / announcement](https://abp.io/community/announcements/announcing-abp-10-0-release-candidate-86lrnyox)** for the v10.0 release. +See the detailed **[blog post / announcement](https://abp.io/community/announcements/abp.io-platform-10.0-final-has-been-released-spknn925)** for the v10.0 release. * Upgraded to .NET 10.0 * Upgraded to `Blazorise` **v1.8.6** diff --git a/docs/en/samples/easy-crm.md b/docs/en/samples/easy-crm.md index eb959a38c8..7aee565171 100644 --- a/docs/en/samples/easy-crm.md +++ b/docs/en/samples/easy-crm.md @@ -30,7 +30,7 @@ When you download and open the zip file, you will see two folders: ### Server Side / MVC (Razor Pages) Application -* Open the solution (inside the aspnet-core folder) in **Visual Studio 2019** or later (or with another IDE that supports ASP.NET Core). +* Open the solution (inside the aspnet-core folder) in **Visual Studio 2026** or later (or with another IDE that supports ASP.NET Core). * This project use `Sqlite`, the default database folder is located at appsettings (`"SqliteDbFolder": "sqliteDbs"`, this folder is located in the MVC project). * Open the `appsettings.json` file in the `Volo.EasyCrm.Web` application and set `"UseDynamicDatabase": "false"`. > The MVC project is creating new database for each unique visitor. And the visitor id is stored at cookies. When you set `UseDynamicDatabase` as a `true`, you cannot run Blazor & Angular projects because they have no cookie implementation. Be aware it is set as `false` for running Blazor & Angular applications. diff --git a/docs/en/samples/microservice-demo.md b/docs/en/samples/microservice-demo.md index 31516b2a55..c31959f6b0 100644 --- a/docs/en/samples/microservice-demo.md +++ b/docs/en/samples/microservice-demo.md @@ -60,7 +60,7 @@ To be able to run the solution from source code, following tools should be insta ### Open & Build the Visual Studio Solution -* Open the `samples\MicroserviceDemo\MicroserviceDemo.sln` in Visual Studio 2017 (15.9.0+). +* Open the `samples\MicroserviceDemo\MicroserviceDemo.sln` in Visual Studio 2026 (18.0.0+). * Run `dotnet restore` from the command line inside the `samples\MicroserviceDemo` folder. * Build the solution in Visual Studio. diff --git a/docs/en/solution-templates/layered-web-application/web-applications.md b/docs/en/solution-templates/layered-web-application/web-applications.md index 58cc3af078..8400a6dfbe 100644 --- a/docs/en/solution-templates/layered-web-application/web-applications.md +++ b/docs/en/solution-templates/layered-web-application/web-applications.md @@ -120,7 +120,7 @@ The required style files are added to the `styles` array in `angular.json`. `App You should create your tests in the same folder as the file you want to test. -See the [testing document](https://angular.io/guide/testing). +See the [testing document](https://angular.dev/guide/testing). ### Depended Packages diff --git a/docs/en/suite/editing-templates.md b/docs/en/suite/editing-templates.md index 9c859ba0de..354adc8ead 100644 --- a/docs/en/suite/editing-templates.md +++ b/docs/en/suite/editing-templates.md @@ -27,7 +27,7 @@ There's a search box on the templates page. To find the related template, pick a There's a naming convention for the template files. * If the template name has `Server` prefix, it's used for backend code like repositories, application services, localizations, controllers, permissions, mappings, unit tests. -* If the template name has `Frontend.Angular` prefix, it's used for Angular code generation. The Angular code is being generated via [Angular Schematics](https://angular.io/guide/schematics). +* If the template name has `Frontend.Angular` prefix, it's used for Angular code generation. The Angular code is being generated via [Angular Schematics](https://angular.dev/tools/cli/schematics). * If the template name has `Frontend.Mvc` prefix, it's used for razor pages, menus, JavaScript, CSS files. * If the template name has `Frontend.Blazor` prefix, it's used for razor components. diff --git a/docs/en/suite/generating-crud-page.md b/docs/en/suite/generating-crud-page.md index cc9df3ee32..afc2536709 100644 --- a/docs/en/suite/generating-crud-page.md +++ b/docs/en/suite/generating-crud-page.md @@ -294,7 +294,7 @@ There are some adjustments you may need to make before generating CRUD pages for - Check if your environment variables have `rootNamespace` defined as explained [here](../framework/ui/angular/service-proxies.md#angular-project-configuration). -- Check if your [workspace configuration](https://angular.io/guide/workspace-config) satisfies one of the following. Examples assume your solution namespace is `BookStore`, `Acme.BookStore`, or `Acme.Retail.BookStore`. +- Check if your [workspace configuration](https://angular.dev/reference/configs/workspace-config) satisfies one of the following. Examples assume your solution namespace is `BookStore`, `Acme.BookStore`, or `Acme.Retail.BookStore`. - Project key is in pascal case. E.g. `BookStore`. - Project key is in camel case. E.g. `bookStore`. - Project key is in kebab case. E.g. `book-store`. diff --git a/docs/en/suite/solution-structure.md b/docs/en/suite/solution-structure.md index d36ea35e7f..4b15be2f07 100644 --- a/docs/en/suite/solution-structure.md +++ b/docs/en/suite/solution-structure.md @@ -303,7 +303,7 @@ Lepton theme uses two logos for each style. You can change these logos with your You should create your tests in the same folder as the file file you want to test. -See the [testing document](https://angular.io/guide/testing). +See the [testing document](https://angular.dev/guide/testing). ### Depended Packages diff --git a/docs/en/tutorials/book-store-with-abp-suite/index.md b/docs/en/tutorials/book-store-with-abp-suite/index.md index 9a2f9372b7..204380bdf0 100644 --- a/docs/en/tutorials/book-store-with-abp-suite/index.md +++ b/docs/en/tutorials/book-store-with-abp-suite/index.md @@ -46,4 +46,4 @@ This tutorial is organized as the following parts: ### Download the Source Code -After logging in to the ABP website, you can download the source code from [here](https://abp.io/api/download/samples/suite-bookstore-mvc-ef). \ No newline at end of file +After logging in to the ABP website, you can download the source code from [here](https://abp.io/api/download/samples/bookstore-mvc-ef). diff --git a/docs/en/tutorials/book-store/part-02.md b/docs/en/tutorials/book-store/part-02.md index 750808fe4d..1fe21c2848 100644 --- a/docs/en/tutorials/book-store/part-02.md +++ b/docs/en/tutorials/book-store/part-02.md @@ -315,7 +315,7 @@ This is a fully working, server side paged, sorted and localized table of books. ## Install NPM packages -> Notice: This tutorial is based on the ABP v3.1.0+ If your project version is older, then please upgrade your solution. Check the [migration guide](../../framework/ui/angular/migration-guide-v3.md) if you are upgrading an existing project with v2.x. +> Notice: This tutorial is based on the ABP v9.3.0+ If your project version is older, then please upgrade your solution. Check the [migration guide](../../framework/ui/angular/migration-guide-v3.md) if you are upgrading an existing project with v2.x. If you haven't done it before, open a new command line interface (terminal window) and go to your `angular` folder and then run the `yarn` command to install the NPM packages: @@ -330,69 +330,42 @@ It's time to create something visible and usable! There are some tools that we w - [Ng Bootstrap](https://ng-bootstrap.github.io/#/home) will be used as the UI component library. - [Ngx-Datatable](https://swimlane.gitbook.io/ngx-datatable/) will be used as the datatable library. -Run the following command line to create a new module, named `BookModule` in the root folder of the angular application: +Run the following command line to create a new component, named `BookComponent` in the root folder of the angular application: ```bash -yarn ng generate module book --module app --routing --route books +yarn ng generate component book ``` This command should produce the following output: ````bash -> yarn ng generate module book --module app --routing --route books - -yarn run v1.19.1 -$ ng generate module book --module app --routing --route books -CREATE src/app/book/book-routing.module.ts (336 bytes) -CREATE src/app/book/book.module.ts (335 bytes) -CREATE src/app/book/book.component.html (19 bytes) -CREATE src/app/book/book.component.spec.ts (614 bytes) -CREATE src/app/book/book.component.ts (268 bytes) +> yarn ng generate component book + +yarn run v1.22.22 +$ ng generate component book +CREATE src/app/book/book.component.spec.ts (537 bytes) +CREATE src/app/book/book.component.ts (189 bytes) CREATE src/app/book/book.component.scss (0 bytes) -UPDATE src/app/app-routing.module.ts (1289 bytes) +CREATE src/app/book/book.component.html (20 bytes) Done in 3.88s. ```` -### BookModule - -Open the `/src/app/book/book.module.ts` and replace the content as shown below: - -````js -import { NgModule } from '@angular/core'; -import { SharedModule } from '../shared/shared.module'; -import { BookRoutingModule } from './book-routing.module'; -import { BookComponent } from './book.component'; - -@NgModule({ - declarations: [BookComponent], - imports: [ - BookRoutingModule, - SharedModule - ] -}) -export class BookModule { } - -```` - -* Added the `SharedModule`. `SharedModule` exports some common modules needed to create user interfaces. -* `SharedModule` already exports the `CommonModule`, so we've removed the `CommonModule`. - ### Routing -The generated code places the new route definition to the `src/app/app-routing.module.ts` file as shown below: +The generated code places the new route definition to the `src/app/app.routes.ts` file as shown below: ````js -const routes: Routes = [ +export const routes: Routes = [ // other route definitions... - { path: 'books', loadChildren: () => import('./book/book.module').then(m => m.BookModule) }, + { path : 'books', loadComponent: () => import('./book/book.component').then(c => c.BookComponent) }, ]; ```` Now, open the `src/app/route.provider.ts` file and replace the `configureRoutes` function declaration as shown below: ```js -function configureRoutes(routes: RoutesService) { - return () => { +function configureRoutes() { + const routes = inject(RoutesService); routes.add([ { path: '/', @@ -416,7 +389,6 @@ function configureRoutes(routes: RoutesService) { }, ]); }; -} ``` `RoutesService` is a service provided by the ABP to configure the main menu and the routes. @@ -497,7 +469,7 @@ Open the `/src/app/book/book.component.html` and replace the content as shown be
- + {%{{{ '::Enum:BookType.' + row.type | abpLocalization }}}%} diff --git a/docs/en/tutorials/book-store/part-03.md b/docs/en/tutorials/book-store/part-03.md index 546b4a743d..73b2daea4e 100644 --- a/docs/en/tutorials/book-store/part-03.md +++ b/docs/en/tutorials/book-store/part-03.md @@ -670,7 +670,7 @@ You can open your browser and click the **New book** button to see the new modal ### Create a Reactive Form -[Reactive forms](https://angular.io/guide/reactive-forms) provide a model-driven approach to handling form inputs whose values change over time. +[Reactive forms](https://angular.dev/guide/forms/reactive-forms) provide a model-driven approach to handling form inputs whose values change over time. Open `/src/app/book/book.component.ts` and replace the content as below: @@ -742,8 +742,8 @@ export class BookComponent implements OnInit { * Imported `FormGroup`, `FormBuilder` and `Validators` from `@angular/forms`. * Added a `form: FormGroup` property. * Added a `bookTypes` property as a list of `BookType` enum members. That will be used in form options. -* Injected with the `FormBuilder` inject function.. [FormBuilder](https://angular.io/api/forms/FormBuilder) provides convenient methods for generating form controls. It reduces the amount of boilerplate needed to build complex forms. -* Added a `buildForm` method to the end of the file and executed the `buildForm()` in the `createBook` method. +* Injected the `FormBuilder` with the inject function. [FormBuilder](https://angular.dev/api/forms/FormBuilder) provides convenient methods for generating form controls. It reduces the amount of boilerplate that is needed to build complex forms. +* Added a `buildForm` method at the end of the file and executed the `buildForm()` in the `createBook` method. * Added a `save` method. Open `/src/app/book/book.component.html` and replace ` ` with the following code part: @@ -765,7 +765,11 @@ Open `/src/app/book/book.component.html` and replace ` Type *
@@ -804,46 +808,24 @@ Also replace ` ` with the following code p We've used [NgBootstrap datepicker](https://ng-bootstrap.github.io/#/components/datepicker/overview) in this component. So, we need to arrange the dependencies related to this component. -Open `/src/app/book/book.module.ts` and replace the content as below: - -```js -import { NgModule } from '@angular/core'; -import { SharedModule } from '../shared/shared.module'; -import { BookRoutingModule } from './book-routing.module'; -import { BookComponent } from './book.component'; -import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap'; // add this line - -@NgModule({ - declarations: [BookComponent], - imports: [ - BookRoutingModule, - SharedModule, - NgbDatepickerModule, // add this line - ] -}) -export class BookModule { } -``` - -* We imported `NgbDatepickerModule` to be able to use the date picker. - Open `/src/app/book/book.component.ts` and replace the content as below: ```js import { ListService, PagedResultDto } from '@abp/ng.core'; import { Component, OnInit, inject } from '@angular/core'; import { BookService, BookDto, bookTypeOptions } from '@proxy/books'; -import { FormGroup, FormBuilder, Validators } from '@angular/forms'; - -// added this line -import { NgbDateNativeAdapter, NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap'; +import { FormGroup, FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { NgbDateNativeAdapter, NgbDateAdapter, NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap'; +import { ThemeSharedModule } from '@abp/ng.theme.shared'; @Component({ selector: 'app-book', templateUrl: './book.component.html', styleUrls: ['./book.component.scss'], + imports: [ThemeSharedModule, ReactiveFormsModule, NgbDatepickerModule], providers: [ ListService, - { provide: NgbDateAdapter, useClass: NgbDateNativeAdapter } // add this line + { provide: NgbDateAdapter, useClass: NgbDateNativeAdapter } ], }) export class BookComponent implements OnInit { diff --git a/docs/en/tutorials/book-store/part-05.md b/docs/en/tutorials/book-store/part-05.md index b7b05103c9..3db00ea423 100644 --- a/docs/en/tutorials/book-store/part-05.md +++ b/docs/en/tutorials/book-store/part-05.md @@ -311,23 +311,19 @@ We've only added the `.RequirePermissions(BookStorePermissions.Books.Default)` e First step of the UI is to prevent unauthorized users to see the "Books" menu item and enter to the book management page. -Open the `/src/app/book/book-routing.module.ts` and replace with the following content: +Open the `/src/app/app.routes.ts` and replace with the following content: ````js -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; import { authGuard, permissionGuard } from '@abp/ng.core'; import { BookComponent } from './book.component'; const routes: Routes = [ - { path: '', component: BookComponent, canActivate: [authGuard, permissionGuard] }, +{ + path: 'books', + loadComponent: () => import('./book/book.component').then(c => BookComponent), + canActivate: [authGuard, permissionGuard], +}, ]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class BookRoutingModule {} ```` * Imported `authGuard` and `permissionGuard` from the `@abp/ng.core`. diff --git a/docs/en/tutorials/book-store/part-09.md b/docs/en/tutorials/book-store/part-09.md index c30b018494..b70fd3e875 100644 --- a/docs/en/tutorials/book-store/part-09.md +++ b/docs/en/tutorials/book-store/part-09.md @@ -477,49 +477,43 @@ That's all! You can run the application and try to edit an author. ## The Author Management Page -Run the following command line to create a new module, named `AuthorModule` in the root folder of the angular application: +Run the following command line to create a new component, named `AuthorComponent` in the root folder of the angular application: ```bash -yarn ng generate module author --module app --routing --route authors +yarn ng generate component author ``` This command should produce the following output: ```bash -> yarn ng generate module author --module app --routing --route authors +> yarn ng generate component author yarn run v1.19.1 -$ ng generate module author --module app --routing --route authors -CREATE src/app/author/author-routing.module.ts (344 bytes) -CREATE src/app/author/author.module.ts (349 bytes) +$ yarn ng generate component author CREATE src/app/author/author.component.html (21 bytes) CREATE src/app/author/author.component.spec.ts (628 bytes) CREATE src/app/author/author.component.ts (276 bytes) CREATE src/app/author/author.component.scss (0 bytes) -UPDATE src/app/app-routing.module.ts (1396 bytes) Done in 2.22s. ``` -### AuthorModule +### Author Component -Open the `/src/app/author/author.module.ts` and replace the content as shown below: +Open the `/src/app/author/author.component.ts` and replace the content as shown below: ```js -import { NgModule } from '@angular/core'; -import { SharedModule } from '../shared/shared.module'; -import { AuthorRoutingModule } from './author-routing.module'; -import { AuthorComponent } from './author.component'; +import { Component } from '@angular/core'; import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap'; -@NgModule({ - declarations: [AuthorComponent], - imports: [SharedModule, AuthorRoutingModule, NgbDatepickerModule], +@Component({ + selector: 'app-author', + templateUrl: './author.component.html', + styleUrls: ['./author.component.scss'], + imports: [NgbDatepickerModule], }) -export class AuthorModule {} +export class AuthorComponent {} ``` -- Added the `SharedModule`. `SharedModule` exports some common modules needed to create user interfaces. -- `SharedModule` already exports the `CommonModule`, so we've removed the `CommonModule`. - Added `NgbDatepickerModule` that will be used later on the author create and edit forms. ### Menu Definition @@ -753,13 +747,13 @@ Open the `/src/app/author/author.component.html` and replace the content as belo - + {%{{{ row.birthDate | date }}}%} - + diff --git a/docs/en/tutorials/book-store/part-10.md b/docs/en/tutorials/book-store/part-10.md index 5e0235ad14..e03ada5a96 100644 --- a/docs/en/tutorials/book-store/part-10.md +++ b/docs/en/tutorials/book-store/part-10.md @@ -970,7 +970,7 @@ Book list page change is trivial. Open the `/src/app/book/book.component.html` a [name]="'::Author' | abpLocalization" prop="authorName" [sortable]="false" -> +/> ```` When you run the application, you can see the *Author* column on the table: @@ -1098,9 +1098,11 @@ Open the `/src/app/book/book.component.html` and add the following form group ju * ```` diff --git a/docs/en/tutorials/microservice/index.md b/docs/en/tutorials/microservice/index.md index 938d9b9108..7f6dc734f3 100644 --- a/docs/en/tutorials/microservice/index.md +++ b/docs/en/tutorials/microservice/index.md @@ -45,7 +45,7 @@ This tutorial is organized as the following parts: ## Download the Source Code -After logging in to the ABP website, you can download the source code from {{if UI == "MVC"}} [here](https://abp.io/api/download/samples/cloud-crm-mvc-ef) {{else if UI == "NG"}} [here](https://abp.io/api/download/samples/cloud-crm-ng-ef) {{else if UI == "Blazor"}} [here](https://abp.io/api/download/samples/cloud-crm-blazor-wasm-ef) {{else if UI == "BlazorServer"}} [here](https://abp.io/api/download/samples/cloud-crm-blazor-server-ef) {{else if UI == "BlazorWebApp"}} [here](https://abp.io/api/download/samples/cloud-crm-blazor-webapp-ef) {{end}}. +After logging in to the ABP website, you can download the source code from {{if UI == "MVC"}} [here](https://abp.io/api/download/samples/cloud-crm-mvc-ef) {{else if UI == "NG"}} [here](https://abp.io/api/download/samples/cloud-crm-angular-ef) {{else if UI == "Blazor"}} [here](https://abp.io/api/download/samples/cloud-crm-blazor-wasm-ef) {{else if UI == "BlazorServer"}} [here](https://abp.io/api/download/samples/cloud-crm-blazor-server-ef) {{else if UI == "BlazorWebApp"}} [here](https://abp.io/api/download/samples/cloud-crm-blazor-webapp-ef) {{end}}. ## See Also diff --git a/docs/en/tutorials/microservice/part-01.md b/docs/en/tutorials/microservice/part-01.md index a3529019a5..7006226e21 100644 --- a/docs/en/tutorials/microservice/part-01.md +++ b/docs/en/tutorials/microservice/part-01.md @@ -25,7 +25,7 @@ } ```` -Follow the *[Get Started](../../get-started/microservice.md)* guide to create a new layered web application with the following configurations: +Follow the *[Get Started](../../get-started/microservice.md)* guide to create a new microservice solution with the following configurations: * **Solution name**: `CloudCrm` {{if DB == "EF"}} @@ -82,4 +82,4 @@ You can see the *[Microservice Solution Template](../../solution-templates/micro ## Summary -In this part, you've created the initial microservice solution, which already contains a few infrastructure services. We will create our first business service in the [next part](part-02.md). \ No newline at end of file +In this part, you've created the initial microservice solution, which already contains a few infrastructure services. We will create our first business service in the [next part](part-02.md). diff --git a/docs/en/tutorials/microservice/part-05.md b/docs/en/tutorials/microservice/part-05.md index 24da71a716..29727700e8 100644 --- a/docs/en/tutorials/microservice/part-05.md +++ b/docs/en/tutorials/microservice/part-05.md @@ -628,7 +628,7 @@ export const APP_ROUTES: Routes = [ // ... { path: 'order-service', - children: ORDER_SERVICE_ROUTES, + loadChildren: () => import('ordering-service').then(c =>c.ORDER_SERVICE_ROUTES), }, ]; ``` @@ -636,12 +636,8 @@ export const APP_ROUTES: Routes = [ ```typescript // order-service.routes.ts export const ORDER_SERVICE_ROUTES: Routes = [ - { - path: '', - pathMatch: 'full', - component: RouterOutletComponent, - }, - { path: 'orders', children: ORDER_ROUTES }, + { path: 'orders', loadComponent: () => import('./order/order.component').then(c => c.OrderComponent) }, + { path: '**', redirectTo: 'orders' } ]; ``` @@ -657,17 +653,16 @@ import { OrderDto, OrderService } from './proxy/ordering-service/services'; @Component({ selector: 'lib-order', templateUrl: './order.component.html', - styleUrl: './order.component.css' + styleUrl: './order.component.css', imports: [CommonModule] }) export class OrderComponent { items: OrderDto[] = []; - - private readonly proxy = inject(OrderService); + private readonly orderService = inject(OrderService); constructor() { - this.proxy.getList().subscribe((res) => { + this.orderService.getList().subscribe((res) => { this.items = res; }); } @@ -686,11 +681,13 @@ export class OrderComponent { Product Id Customer Name - - {%{{{item.id}}}%} - {%{{{item.productId}}}%} - {%{{{item.customerName}}}%} - + @for (item of items; track item.id) { + + {%{{{item.id}}}%} + {%{{{item.productId}}}%} + {%{{{item.customerName}}}%} + + } diff --git a/docs/en/tutorials/microservice/part-06.md b/docs/en/tutorials/microservice/part-06.md index bf54602936..a694631979 100644 --- a/docs/en/tutorials/microservice/part-06.md +++ b/docs/en/tutorials/microservice/part-06.md @@ -314,11 +314,13 @@ Open the `order.component.html` file (the `order.component.html` file under the Product Name Customer Name - - {%{{{item.id}}}%} - {%{{{item.productName}}}%} - {%{{{item.customerName}}}%} - + @for (item of items; track item.id) { + + {%{{{item.id}}}%} + {%{{{item.productName}}}%} + {%{{{item.customerName}}}%} + + } diff --git a/docs/en/tutorials/todo/layered/index.md b/docs/en/tutorials/todo/layered/index.md index 1cc2f9030c..c8d95b627c 100644 --- a/docs/en/tutorials/todo/layered/index.md +++ b/docs/en/tutorials/todo/layered/index.md @@ -59,7 +59,7 @@ This documentation has a video tutorial on **YouTube**!! You can watch it here: ## Pre-Requirements -* An IDE (e.g. [Visual Studio](https://visualstudio.microsoft.com/vs/)) that supports [.NET 9.0+](https://dotnet.microsoft.com/download/dotnet) development. +* An IDE (e.g. [Visual Studio](https://visualstudio.microsoft.com/vs/)) that supports [.NET 10.0+](https://dotnet.microsoft.com/download/dotnet) development. * [Node v20.11+](https://nodejs.org/) {{if DB=="EF"}} * [SQL Server Express LocalDB](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb) @@ -139,7 +139,7 @@ Ensure the `TodoApp.HttpApi.Host` project is the startup project, then run the a ![todo-swagger-ui-initial](../images/todo-swagger-ui-initial.png) -You can explore and test your HTTP API with this UI. Now, we can set the `TodoApp.Blazor` as the startup project and run it to open the actual Blazor application UI: +You can explore and test your HTTP API with this UI. Now, we can set the {{if UI=="Blazor"}}`TodoApp.Blazor`{{else if UI=="MAUIBlazor"}}`TodoApp.MauiBlazor`{{end}} as the startup project and run it to open the actual Blazor application UI: {{else if UI=="NG"}} @@ -577,7 +577,11 @@ If you open the [Swagger UI](https://swagger.io/tools/swagger-ui/) by entering t ### Index.razor.cs -Open the `Index.razor.cs` file in the `Pages` folder of the {{if UI=="Blazor" || UI=="BlazorWebApp"}} *TodoApp.Blazor.Client* {{else if UI=="BlazorServer"}} *TodoApp.Blazor* {{else if UI=="MAUIBlazor"}} *TodoApp.MauiBlazor* {{end}} project and replace the content with the following code block: +Open the `Index.razor.cs` file in the `Pages` folder of the {{if UI=="Blazor" || UI=="BlazorWebApp"}} `TodoApp.Blazor.Client` {{else if UI=="BlazorServer"}} `TodoApp.Blazor` {{else if UI=="MAUIBlazor"}} `TodoApp.MauiBlazor` {{end}} project and replace the content with the following code block: + +{{if UI=="MAUIBlazor"}} +_(Create this file if it doesn't exist)_ +{{end}} ```csharp using Microsoft.AspNetCore.Components; diff --git a/docs/en/tutorials/todo/single-layer/index.md b/docs/en/tutorials/todo/single-layer/index.md index b236196663..6a7f45ce62 100644 --- a/docs/en/tutorials/todo/single-layer/index.md +++ b/docs/en/tutorials/todo/single-layer/index.md @@ -55,7 +55,7 @@ This documentation has a video tutorial on **YouTube**!! You can watch it here: ## Pre-Requirements -* An IDE (e.g. [Visual Studio](https://visualstudio.microsoft.com/vs/)) that supports [.NET 9.0+](https://dotnet.microsoft.com/download/dotnet) development. +* An IDE (e.g. [Visual Studio](https://visualstudio.microsoft.com/vs/)) that supports [.NET 10.0+](https://dotnet.microsoft.com/download/dotnet) development. * [Node v20.11+](https://nodejs.org/) {{if DB=="EF"}} * [SQL Server Express LocalDB](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb) @@ -567,7 +567,7 @@ If you open [Swagger UI](https://swagger.io/tools/swagger-ui/) by entering the ` ### Index.razor.cs -Open the `Index.razor.cs` file in the `Pages` folder{{if UI=="Blazor"}} in your `Todo.Blazor` project{{end}} and replace the content with the following code block: +Open the `Index.razor.cs` file in the {{if UI=="BlazorServer"}}`Components/Pages` {{else}} `Pages` {{end}} folder{{if UI=="Blazor"}} in your `Todo.Blazor` project{{end}} and replace the content with the following code block: ```csharp {{if UI=="Blazor"}} @@ -580,7 +580,11 @@ using TodoApp.Services; using TodoApp.Services.Dtos; {{end}} +{{if UI=="Blazor"}} namespace TodoApp.Pages; +{{else}} +namespace TodoApp.Components.Pages; +{{end}} public partial class Index { @@ -615,7 +619,7 @@ This class uses the {{if UI=="Blazor"}}`ITodoAppService`{{else}}`TodoAppService` ### Index.razor -Open the `Index.razor` file in the `Pages` folder and replace the content with the following code block: +Open the `Index.razor` file in the {{if UI=="BlazorServer"}}`Components/Pages`{{else}}`Pages`{{end}} folder and replace the content with the following code block: ```xml @page "/" @@ -658,7 +662,7 @@ Open the `Index.razor` file in the `Pages` folder and replace the content with t ### Index.razor.css -As the final touch, open the `Index.razor.css` file in the `Pages` folder and add the following code block at the end of the file: +As the final touch, open the `Index.razor.css` file in the {{if UI=="BlazorServer"}}`Components/Pages`{{else}}`Pages`{{end}} folder and add the following code block at the end of the file: ````css #TodoList{ diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson/Volo/Abp/AspNetCore/Mvc/NewtonsoftJson/AbpAspNetCoreMvcNewtonsoftModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson/Volo/Abp/AspNetCore/Mvc/NewtonsoftJson/AbpAspNetCoreMvcNewtonsoftModule.cs index 95e07a06e0..214b866197 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson/Volo/Abp/AspNetCore/Mvc/NewtonsoftJson/AbpAspNetCoreMvcNewtonsoftModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson/Volo/Abp/AspNetCore/Mvc/NewtonsoftJson/AbpAspNetCoreMvcNewtonsoftModule.cs @@ -13,7 +13,7 @@ public class AbpAspNetCoreMvcNewtonsoftModule : AbpModule { context.Services.AddMvcCore().AddNewtonsoftJson(); - context.Services.AddOptions() + context.Services.AddAbpOptions() .Configure((options, rootServiceProvider) => { options.SerializerSettings.ContractResolver = diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelper.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelper.cs index dbcf84437f..d129007d50 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelper.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelper.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Razor.TagHelpers; @@ -14,6 +15,8 @@ public class AbpSelectTagHelper : AbpTagHelper? AspItems { get; set; } public AbpFormControlSize Size { get; set; } = AbpFormControlSize.Default; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs index 248a217495..eab2944002 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs @@ -12,6 +12,7 @@ using Microsoft.Extensions.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Microsoft.AspNetCore.Razor.TagHelpers; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Extensions; using Volo.Abp.Localization; +using Volo.Abp.Reflection; namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; @@ -169,7 +170,9 @@ public class AbpSelectTagHelperService : AbpTagHelperService private bool IsEnum() { var value = TagHelper.AspFor.Model; - return (value != null && value.GetType().IsEnum) || TagHelper.AspFor.ModelExplorer.Metadata.IsEnum; + return (value != null && value.GetType().IsEnum) || + TagHelper.AspFor.ModelExplorer.Metadata.IsEnum || + (TagHelper.EnumType != null && TypeHelper.IsNullableEnum(TagHelper.EnumType)); } protected virtual async Task GetLabelAsHtmlAsync(TagHelperContext context, TagHelperOutput output, TagHelperOutput selectTag) @@ -258,19 +261,20 @@ public class AbpSelectTagHelperService : AbpTagHelperService protected virtual List GetSelectItemsFromEnum(TagHelperContext context, TagHelperOutput output, ModelExplorer explorer) { + var enumType = TagHelper.EnumType ?? explorer.ModelType; + var selectItems = new List(); - var isNullableType = Nullable.GetUnderlyingType(explorer.ModelType) != null; - var enumType = explorer.ModelType; + var isNullableType = Nullable.GetUnderlyingType(enumType!) != null; if (isNullableType) { - enumType = Nullable.GetUnderlyingType(explorer.ModelType)!; + enumType = Nullable.GetUnderlyingType(enumType!)!; selectItems.Add(new SelectListItem()); } var containerLocalizer = _tagHelperLocalizer.GetLocalizerOrNull(explorer.Container.ModelType.Assembly); - foreach (var enumValue in enumType.GetEnumValuesAsUnderlyingType()) + foreach (var enumValue in enumType!.GetEnumValuesAsUnderlyingType()) { var localizedMemberName = _abpEnumLocalizer.GetString(enumType, enumValue, new[] @@ -306,7 +310,7 @@ public class AbpSelectTagHelperService : AbpTagHelperService }; var innerOutput = await labelTagHelper.ProcessAndGetOutputAsync(new TagHelperAttributeList { { "class", "form-label" } }, context, "label", TagMode.StartTagAndEndTag); - + innerOutput.Content.AppendHtml(GetRequiredSymbol(context, output)); return innerOutput.Render(_encoder); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/ObjectExtending/MvcUiObjectExtensionPropertyInfoExtensions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/ObjectExtending/MvcUiObjectExtensionPropertyInfoExtensions.cs index d4d1b796ee..62b86bc1c5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/ObjectExtending/MvcUiObjectExtensionPropertyInfoExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/ObjectExtending/MvcUiObjectExtensionPropertyInfoExtensions.cs @@ -88,6 +88,16 @@ public static class MvcUiObjectExtensionPropertyInfoExtensions ?? "text"; //default } + public static bool IsEnum(this ObjectExtensionPropertyInfo propertyInfo) + { + return propertyInfo.Type.IsEnum || TypeHelper.IsNullableEnum(propertyInfo.Type); + } + + public static bool IsNullableEnum(this ObjectExtensionPropertyInfo propertyInfo) + { + return TypeHelper.IsNullableEnum(propertyInfo.Type); + } + private static string? GetInputTypeFromAttributeOrNull(Attribute attribute) { if (attribute is EmailAddressAttribute) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs index c3fc470ed8..ad8d8c1c28 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs @@ -165,7 +165,7 @@ public class AbpAspNetCoreMvcModule : AbpModule context.Services.AddSingleton(); context.Services.TryAddEnumerable(ServiceDescriptor.Transient()); - context.Services.AddOptions() + context.Services.AddAbpOptions() .Configure((mvcOptions, serviceProvider) => { mvcOptions.AddAbp(context.Services); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationPartSorter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationPartSorter.cs index d0ba8b98c0..554ec424bd 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationPartSorter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationPartSorter.cs @@ -15,7 +15,8 @@ public static class ApplicationPartSorter { var orderedModuleAssemblies = moduleContainer.Modules .Select((moduleDescriptor, index) => new { moduleDescriptor.Assembly, index }) - .ToDictionary(x => x.Assembly, x => x.index); + .GroupBy(x => x.Assembly) + .ToDictionary(g => g.Key, g => g.First().index); var modulesAssemblies = moduleContainer.Modules.Select(x => x.Assembly).ToList(); var sortedTypes = partManager.ApplicationParts diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/MvcCoreBuilderExtensions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/MvcCoreBuilderExtensions.cs index f2bac81316..89af08fd43 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/MvcCoreBuilderExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/MvcCoreBuilderExtensions.cs @@ -13,7 +13,7 @@ public static class MvcCoreBuilderExtensions { public static IMvcCoreBuilder AddAbpJson(this IMvcCoreBuilder builder) { - builder.Services.AddOptions() + builder.Services.AddAbpOptions() .Configure((options, rootServiceProvider) => { options.JsonSerializerOptions.ReadCommentHandling = JsonCommentHandling.Skip; diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionChecker.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionChecker.cs index 7e7457b753..4a5e48c220 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionChecker.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionChecker.cs @@ -48,7 +48,7 @@ public class PermissionChecker : IPermissionChecker, ITransientDependency { return false; } - + if (!permission.IsEnabled) { return false; @@ -92,12 +92,12 @@ public class PermissionChecker : IPermissionChecker, ITransientDependency return isGranted; } - public async Task IsGrantedAsync(string[] names) + public virtual async Task IsGrantedAsync(string[] names) { return await IsGrantedAsync(PrincipalAccessor.Principal, names); } - public async Task IsGrantedAsync(ClaimsPrincipal? claimsPrincipal, string[] names) + public virtual async Task IsGrantedAsync(ClaimsPrincipal? claimsPrincipal, string[] names) { Check.NotNull(names, nameof(names)); @@ -146,16 +146,27 @@ public class PermissionChecker : IPermissionChecker, ITransientDependency claimsPrincipal); var multipleResult = await provider.CheckAsync(context); - foreach (var grantResult in multipleResult.Result.Where(grantResult => - result.Result.ContainsKey(grantResult.Key) && - result.Result[grantResult.Key] == PermissionGrantResult.Undefined && - grantResult.Value != PermissionGrantResult.Undefined)) + + foreach (var grantResult in multipleResult.Result.Where(x => result.Result.ContainsKey(x.Key))) { - result.Result[grantResult.Key] = grantResult.Value; - permissionDefinitions.RemoveAll(x => x.Name == grantResult.Key); + switch (grantResult.Value) + { + case PermissionGrantResult.Granted: + { + if (result.Result[grantResult.Key] != PermissionGrantResult.Prohibited) + { + result.Result[grantResult.Key] = PermissionGrantResult.Granted; + } + break; + } + case PermissionGrantResult.Prohibited: + result.Result[grantResult.Key] = PermissionGrantResult.Prohibited; + permissionDefinitions.RemoveAll(x => x.Name == grantResult.Key); + break; + } } - if (result.AllGranted || result.AllProhibited) + if (result.AllProhibited) { break; } diff --git a/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiObjectExtensionPropertyInfoExtensions.cs b/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiObjectExtensionPropertyInfoExtensions.cs index fa4994e2f9..3026682f62 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiObjectExtensionPropertyInfoExtensions.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiObjectExtensionPropertyInfoExtensions.cs @@ -218,6 +218,11 @@ public static class BlazoriseUiObjectExtensionPropertyInfoExtensions ?? typeof(TextExtensionProperty<,>); //default } + public static bool IsEnum(this ObjectExtensionPropertyInfo propertyInfo) + { + return propertyInfo.Type.IsEnum || TypeHelper.IsNullableEnum(propertyInfo.Type); + } + private static Type? GetInputTypeFromAttributeOrNull(Attribute attribute) { var hasTextEditSupport = TextEditSupportedAttributeTypes.Any(t => t == attribute.GetType()); diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionProperties.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionProperties.razor index f97b8bac0b..b483288b2e 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionProperties.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionProperties.razor @@ -9,7 +9,7 @@ { if (!propertyInfo.Name.EndsWith("_Text")) { - if (propertyInfo.Type.IsEnum) + if (propertyInfo.IsEnum()) { } diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionProperties.razor.cs b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionProperties.razor.cs index 27f69f3ba4..b840119d18 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionProperties.razor.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionProperties.razor.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Immutable; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Components; using Microsoft.Extensions.Localization; @@ -29,8 +30,13 @@ public partial class ExtensionProperties : Component public ImmutableList Properties { get; set; } = ImmutableList.Empty; - protected async override Task OnInitializedAsync() + protected override async Task OnInitializedAsync() { - Properties = await ObjectExtensionManager.Instance.GetPropertiesAndCheckPolicyAsync(ServiceProvider); + Properties = + (await ObjectExtensionManager.Instance.GetPropertiesAndCheckPolicyAsync(ServiceProvider)) + .Where(p => ModalType == ExtensionPropertyModalType.CreateModal + ? p.UI.CreateModal.IsVisible + : p.UI.EditModal.IsVisible) + .ToImmutableList(); } } diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/SelectExtensionProperty.razor.cs b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/SelectExtensionProperty.razor.cs index 0dedaf3486..dec24710ec 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/SelectExtensionProperty.razor.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/SelectExtensionProperty.razor.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.Localization; +using System; +using Microsoft.Extensions.Localization; using System.Collections.Generic; using Volo.Abp.Data; @@ -7,23 +8,35 @@ namespace Volo.Abp.BlazoriseUI.Components.ObjectExtending; public partial class SelectExtensionProperty where TEntity : IHasExtraProperties { - protected List> SelectItems = new(); + protected List> SelectItems = new(); - public int SelectedValue { - get { return Entity.GetProperty(PropertyInfo.Name); } + public int? SelectedValue { + get + { + return Entity.GetProperty(PropertyInfo.Name, Nullable.GetUnderlyingType(PropertyInfo.Type!) != null ? null : 0); + } set { Entity.SetProperty(PropertyInfo.Name, value, false); } } - protected virtual List> GetSelectItemsFromEnum() + protected virtual List> GetSelectItemsFromEnum() { - var selectItems = new List>(); + var selectItems = new List>(); + + var isNullableType = Nullable.GetUnderlyingType(PropertyInfo.Type!) != null; + var enumType = isNullableType + ? Nullable.GetUnderlyingType(PropertyInfo.Type)! + : PropertyInfo.Type; - foreach (var enumValue in PropertyInfo.Type.GetEnumValues()) + if (isNullableType) { - selectItems.Add(new SelectItem + selectItems.Add(new SelectItem()); + } + foreach (var enumValue in enumType.GetEnumValues()) + { + selectItems.Add(new SelectItem { Value = (int)enumValue, - Text = AbpEnumLocalizer.GetString(PropertyInfo.Type, enumValue, new []{ StringLocalizerFactory.CreateDefaultOrNull() }) + Text = AbpEnumLocalizer.GetString(enumType, enumValue, new []{ StringLocalizerFactory.CreateDefaultOrNull() }) }); } @@ -37,7 +50,14 @@ public partial class SelectExtensionProperty if (!Entity.HasProperty(PropertyInfo.Name)) { - SelectedValue = (int)PropertyInfo.Type.GetEnumValues().GetValue(0)!; + var isNullableType = Nullable.GetUnderlyingType(PropertyInfo.Type!) != null; + if (!isNullableType) + { + var enumType = isNullableType + ? Nullable.GetUnderlyingType(PropertyInfo.Type)! + : PropertyInfo.Type; + SelectedValue = (int)enumType.GetEnumValues().GetValue(0)!; + } } } } diff --git a/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionOptionsExtensions.cs b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionOptionsExtensions.cs new file mode 100644 index 0000000000..43230c4dbb --- /dev/null +++ b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionOptionsExtensions.cs @@ -0,0 +1,22 @@ +using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Options; +using Volo.Abp.Options; + +namespace Microsoft.Extensions.DependencyInjection; + +public static class ServiceCollectionOptionsExtensions +{ + /// + /// You should only use this method to register options if you need to continue using the ServiceProvider to get other options in your Options configuration method. + /// Otherwise, please use the default AddOptions method for better performance. + /// + /// + /// + /// + public static OptionsBuilder AddAbpOptions(this IServiceCollection services) + where TOptions : class + { + services.TryAddSingleton, AbpUnnamedOptionsManager>(); + return services.AddOptions(); + } +} diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs index 04ea98644e..4ec967ed01 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using System.Runtime.InteropServices; using System.Threading.Tasks; using JetBrains.Annotations; using Microsoft.Extensions.Configuration; @@ -200,7 +201,13 @@ public abstract class AbpApplicationBase : IAbpApplication using var scope = ServiceProvider.CreateScope(); var abpHostEnvironment = scope.ServiceProvider.GetRequiredService(); var configuration = scope.ServiceProvider.GetRequiredService(); - return abpHostEnvironment.IsDevelopment() && configuration.GetValue("Abp:Telemetry:IsEnabled") != false; + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + return abpHostEnvironment.IsDevelopment() && configuration.GetValue("Abp:Telemetry:IsEnabled") != false; + } + + return false; } //TODO: We can extract a new class for this diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetrySolutionInfoEnricher.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetrySolutionInfoEnricher.cs index e01768c418..c57d51e6f2 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetrySolutionInfoEnricher.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetrySolutionInfoEnricher.cs @@ -114,7 +114,10 @@ internal sealed class TelemetrySolutionInfoEnricher : TelemetryActivityEventEnri } var moduleJsonFileContent = File.ReadAllText(modulePath); - using var moduleDoc = JsonDocument.Parse(moduleJsonFileContent); + using var moduleDoc = JsonDocument.Parse(moduleJsonFileContent, new JsonDocumentOptions + { + AllowTrailingCommas = true + }); if (!moduleDoc.RootElement.TryGetProperty("imports", out var imports)) { diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryActivityStorage.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryActivityStorage.cs index 6796af7179..b37ec15d71 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryActivityStorage.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryActivityStorage.cs @@ -25,6 +25,8 @@ public class TelemetryActivityStorage : ITelemetryActivityStorage, ISingletonDep public TelemetryActivityStorage() { CreateDirectoryIfNotExist(); + + DeleteExistingOldInformation(); State = LoadState(); } @@ -166,6 +168,22 @@ public class TelemetryActivityStorage : ITelemetryActivityStorage, ISingletonDep } } + private static void DeleteExistingOldInformation() + { + try + { + var file = new FileInfo(TelemetryPaths.ActivityStorage); + if (file.Exists && file.CreationTime < new DateTime(2025, 12, 01)) + { + file.Delete(); + } + } + catch + { + // Ignored + } + } + private static TelemetryActivityStorageState LoadState() { try diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/ActivityPropertyNames.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/ActivityPropertyNames.cs index 924cd1dd7d..0157c61bb8 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/ActivityPropertyNames.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/ActivityPropertyNames.cs @@ -12,6 +12,7 @@ public static class ActivityPropertyNames public const string IpAddress = "IpAddress"; public const string IsFirstSession = "IsFirstSession"; public const string DeviceId = "DeviceId"; + public const string UserDeviceId = "UserDeviceId"; public const string DeviceLanguage = "DeviceLanguage"; public const string OperatingSystem = "OperatingSystem"; public const string CountryIsoCode = "CountryIsoCode"; diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/DeviceManager.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/DeviceManager.cs index e3993886a0..393f974e98 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/DeviceManager.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/DeviceManager.cs @@ -133,7 +133,7 @@ static internal class DeviceManager { try { - return GetProcessorIdForWindows(); + return GetBaseBoardSerialNumberForWindows(); } catch { @@ -142,10 +142,10 @@ static internal class DeviceManager return GetWindowsMachineUniqueId(); } - private static string GetProcessorIdForWindows() + private static string GetBaseBoardSerialNumberForWindows() { using (var managementObjectSearcher = - new System.Management.ManagementObjectSearcher("SELECT ProcessorId FROM Win32_Processor")) + new System.Management.ManagementObjectSearcher("SELECT SerialNumber FROM Win32_BaseBoard")) { using (var searcherObj = managementObjectSearcher.Get()) { @@ -156,7 +156,7 @@ static internal class DeviceManager var managementObjectEnumerator = searcherObj.GetEnumerator(); managementObjectEnumerator.MoveNext(); - return managementObjectEnumerator.Current.GetPropertyValue("ProcessorId").ToString()!; + return managementObjectEnumerator.Current.GetPropertyValue("SerialNumber").ToString()!; } } } diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/AbpStudioDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/AbpStudioDetector.cs index 3d35c7192a..b37760cb04 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/AbpStudioDetector.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/AbpStudioDetector.cs @@ -40,7 +40,10 @@ internal sealed class AbpStudioDetector : SoftwareDetector return null; } using var fs = new FileStream(ideStateJsonPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); - using var doc = JsonDocument.Parse(fs); + using var doc = JsonDocument.Parse(fs, new JsonDocumentOptions + { + AllowTrailingCommas = true + }); return doc.RootElement.TryGetProperty("theme", out var themeElement) ? themeElement.GetString() : null; } @@ -55,7 +58,10 @@ internal sealed class AbpStudioDetector : SoftwareDetector } using var fs = new FileStream(extensionsFilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); - using var doc = JsonDocument.Parse(fs); + using var doc = JsonDocument.Parse(fs, new JsonDocumentOptions + { + AllowTrailingCommas = true + }); if (doc.RootElement.TryGetProperty("Extensions", out var extensionsElement) && extensionsElement.ValueKind == JsonValueKind.Array) diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/VisualStudioCodeDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/VisualStudioCodeDetector.cs index 72fda0f500..52559663c2 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/VisualStudioCodeDetector.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/VisualStudioCodeDetector.cs @@ -77,7 +77,10 @@ internal sealed class VisualStudioCodeDetector : SoftwareDetector { try { - using var jsonDoc = JsonDocument.Parse(File.ReadAllText(productJson)); + using var jsonDoc = JsonDocument.Parse(File.ReadAllText(productJson), new JsonDocumentOptions + { + AllowTrailingCommas = true + }); var root = jsonDoc.RootElement; if (root.TryGetProperty("version", out var versionProp)) { @@ -105,7 +108,10 @@ internal sealed class VisualStudioCodeDetector : SoftwareDetector { try { - using var json = JsonDocument.Parse( File.ReadAllText(settingsPath)); + using var json = JsonDocument.Parse( File.ReadAllText(settingsPath), new JsonDocumentOptions + { + AllowTrailingCommas = true + }); var root = json.RootElement; if (root.TryGetProperty("theme", out var themeProp)) { diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/AbpPackageMetadataReader.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/AbpPackageMetadataReader.cs index f9ce98a2e5..446462c527 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/AbpPackageMetadataReader.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/AbpPackageMetadataReader.cs @@ -49,11 +49,13 @@ static internal class AbpProjectMetadataReader private static AbpProjectMetaData ReadOrCreateMetadata(string packagePath) { - var fileContent = File.ReadAllText(packagePath); var metadata = new AbpProjectMetaData(); - using var document = JsonDocument.Parse(fileContent); + using var document = JsonDocument.Parse(fileContent, new JsonDocumentOptions + { + AllowTrailingCommas = true + }); var root = document.RootElement; if (TryGetProjectId(root,out var projectId)) diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/TelemetryService.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/TelemetryService.cs index 8a2e3b4382..2f684acd29 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/TelemetryService.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/TelemetryService.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.DependencyInjection; using Volo.Abp.Internal.Telemetry.Activity.Contracts; using Volo.Abp.Internal.Telemetry.Constants; @@ -11,17 +12,11 @@ namespace Volo.Abp.Internal.Telemetry; public class TelemetryService : ITelemetryService, IScopedDependency { - private readonly ITelemetryActivitySender _telemetryActivitySender; - private readonly ITelemetryActivityEventBuilder _telemetryActivityEventBuilder; - private readonly ITelemetryActivityStorage _telemetryActivityStorage; + private readonly IServiceScopeFactory _serviceScopeFactory; - public TelemetryService(ITelemetryActivitySender telemetryActivitySender, - ITelemetryActivityEventBuilder telemetryActivityEventBuilder, - ITelemetryActivityStorage telemetryActivityStorage) + public TelemetryService(IServiceScopeFactory serviceScopeFactory) { - _telemetryActivitySender = telemetryActivitySender; - _telemetryActivityEventBuilder = telemetryActivityEventBuilder; - _telemetryActivityStorage = telemetryActivityStorage; + _serviceScopeFactory = serviceScopeFactory; } @@ -74,24 +69,37 @@ public class TelemetryService : ITelemetryService, IScopedDependency { _ = Task.Run(async () => { - await BuildAndSendActivityAsync(context); + using var scope = _serviceScopeFactory.CreateScope(); + + var telemetryActivityEventBuilder = scope.ServiceProvider.GetRequiredService(); + var telemetryActivityStorage = scope.ServiceProvider.GetRequiredService(); + var telemetryActivitySender = scope.ServiceProvider.GetRequiredService(); + + await BuildAndSendActivityAsync(context, + telemetryActivityEventBuilder, + telemetryActivityStorage, + telemetryActivitySender); }); return Task.CompletedTask; } - private async Task BuildAndSendActivityAsync(ActivityContext context) + private static async Task BuildAndSendActivityAsync( + ActivityContext context, + ITelemetryActivityEventBuilder telemetryActivityEventBuilder, + ITelemetryActivityStorage telemetryActivityStorage, + ITelemetryActivitySender telemetryActivitySender) { try { - var activityEvent = await _telemetryActivityEventBuilder.BuildAsync(context); + var activityEvent = await telemetryActivityEventBuilder.BuildAsync(context); if (activityEvent is null) { return; } - _telemetryActivityStorage.SaveActivity(activityEvent); - await _telemetryActivitySender.TrySendQueuedActivitiesAsync(); + telemetryActivityStorage.SaveActivity(activityEvent); + await telemetryActivitySender.TrySendQueuedActivitiesAsync(); } catch { diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Options/AbpUnnamedOptionsManager.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Options/AbpUnnamedOptionsManager.cs new file mode 100644 index 0000000000..894df70e75 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Options/AbpUnnamedOptionsManager.cs @@ -0,0 +1,34 @@ +using Microsoft.Extensions.Options; + +namespace Volo.Abp.Options; + +/// +/// This Options manager is similar to Microsoft UnnamedOptionsManager but without the locking mechanism. +/// Prevent deadlocks when accessing options in multiple threads. +/// +/// +public class AbpUnnamedOptionsManager : IOptions + where TOptions : class +{ + private readonly IOptionsFactory _factory; + private TOptions? _value; + + public AbpUnnamedOptionsManager(IOptionsFactory factory) + { + _factory = factory; + } + + public TOptions Value + { + get + { + if (_value is { } value) + { + return value; + } + + _value = _factory.Create(Microsoft.Extensions.Options.Options.DefaultName); + return _value; + } + } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj index a4b84d8d90..063f956379 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj @@ -22,8 +22,6 @@ - - diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpSqliteOptions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpSqliteOptions.cs new file mode 100644 index 0000000000..2d94b2864a --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpSqliteOptions.cs @@ -0,0 +1,6 @@ +namespace Volo.Abp.EntityFrameworkCore; + +public class AbpSqliteOptions +{ + public int? BusyTimeout { get; set; } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Interceptors/SqliteBusyTimeoutSaveChangesInterceptor.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Interceptors/SqliteBusyTimeoutSaveChangesInterceptor.cs new file mode 100644 index 0000000000..32b4859bbb --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Interceptors/SqliteBusyTimeoutSaveChangesInterceptor.cs @@ -0,0 +1,39 @@ +using System.Threading; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Diagnostics; + +namespace Volo.Abp.EntityFrameworkCore.Interceptors; + +/// +/// https://github.com/dotnet/efcore/issues/29514 +/// +public class SqliteBusyTimeoutSaveChangesInterceptor : SaveChangesInterceptor +{ + private readonly string _pragmaCommand; + + public SqliteBusyTimeoutSaveChangesInterceptor(int timeoutMilliseconds) + { + _pragmaCommand = $"PRAGMA busy_timeout={timeoutMilliseconds};"; + } + + public override InterceptionResult SavingChanges(DbContextEventData eventData, InterceptionResult result) + { + if (eventData.Context != null) + { + eventData.Context.Database.ExecuteSqlRaw(_pragmaCommand); + } + + return result; + } + + public override async ValueTask> SavingChangesAsync(DbContextEventData eventData, InterceptionResult result, CancellationToken cancellationToken = default) + { + if (eventData.Context != null) + { + await eventData.Context.Database.ExecuteSqlRawAsync(_pragmaCommand, cancellationToken: cancellationToken); + } + + return await base.SavingChangesAsync(eventData, result, cancellationToken); + } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs index 52415d73b1..6b767ceee4 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs @@ -1,4 +1,6 @@ +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore.GlobalFilters; +using Volo.Abp.EntityFrameworkCore.Interceptors; using Volo.Abp.Modularity; namespace Volo.Abp.EntityFrameworkCore.Sqlite; @@ -8,11 +10,31 @@ namespace Volo.Abp.EntityFrameworkCore.Sqlite; )] public class AbpEntityFrameworkCoreSqliteModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(options => + { + options.BusyTimeout = 5000; + }); + } + public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => { options.UseDbFunction = true; }); + + var sqliteOptions = context.Services.ExecutePreConfiguredActions(); + if (sqliteOptions.BusyTimeout.HasValue) + { + Configure(options => + { + options.ConfigureDefaultOnConfiguring((dbContext, dbContextOptionsBuilder) => + { + dbContextOptionsBuilder.AddInterceptors(new SqliteBusyTimeoutSaveChangesInterceptor(sqliteOptions.BusyTimeout.Value)); + }, overrideExisting: false); + }); + } } } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContextOptions.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContextOptions.cs index a179bb3ee8..b87e9501d7 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContextOptions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContextOptions.cs @@ -26,11 +26,11 @@ public class AbpDbContextOptions internal Dictionary> ConventionActions { get; } internal Action? DefaultOnModelCreatingAction { get; set; } - - internal Action? DefaultOnConfiguringAction { get; set; } internal Dictionary> OnModelCreatingActions { get; } - + + internal Action? DefaultOnConfiguringAction { get; set; } + internal Dictionary> OnConfiguringActions { get; } public AbpDbContextOptions() @@ -58,11 +58,18 @@ public class AbpDbContextOptions DefaultConfigureAction = action; } - public void ConfigureDefaultConvention([NotNull] Action action) + public void ConfigureDefaultConvention([NotNull] Action action, bool overrideExisting = false) { Check.NotNull(action, nameof(action)); - DefaultConventionAction = action; + if (overrideExisting) + { + DefaultConventionAction = action; + } + else + { + DefaultConventionAction += action; + } } public void ConfigureConventions([NotNull] Action action) @@ -83,18 +90,18 @@ public class AbpDbContextOptions actions.Add(action); } - public void ConfigureDefaultOnModelCreating([NotNull] Action action) - { - Check.NotNull(action, nameof(action)); - - DefaultOnModelCreatingAction = action; - } - - public void ConfigureDefaultOnConfiguring([NotNull] Action action) + public void ConfigureDefaultOnModelCreating([NotNull] Action action, bool overrideExisting = false) { Check.NotNull(action, nameof(action)); - DefaultOnConfiguringAction = action; + if (overrideExisting) + { + DefaultOnModelCreatingAction = action; + } + else + { + DefaultOnModelCreatingAction += action; + } } public void ConfigureOnModelCreating([NotNull] Action action) @@ -114,7 +121,21 @@ public class AbpDbContextOptions actions.Add(action); } - + + public void ConfigureDefaultOnConfiguring([NotNull] Action action, bool overrideExisting = false) + { + Check.NotNull(action, nameof(action)); + + if (overrideExisting) + { + DefaultOnConfiguringAction = action; + } + else + { + DefaultOnConfiguringAction += action; + } + } + public void ConfigureOnConfiguring([NotNull] Action action) where TDbContext : AbpDbContext { diff --git a/framework/src/Volo.Abp.EventBus.Kafka/Volo/Abp/EventBus/Kafka/KafkaDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.Kafka/Volo/Abp/EventBus/Kafka/KafkaDistributedEventBus.cs index 4bdf6a2782..a3376d9429 100644 --- a/framework/src/Volo.Abp.EventBus.Kafka/Volo/Abp/EventBus/Kafka/KafkaDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.Kafka/Volo/Abp/EventBus/Kafka/KafkaDistributedEventBus.cs @@ -168,7 +168,7 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen GetOrCreateHandlerFactories(eventType).Locking(factories => factories.Clear()); } - protected async override Task PublishToEventBusAsync(Type eventType, object eventData) + protected override async Task PublishToEventBusAsync(Type eventType, object eventData) { var headers = new Headers { @@ -193,7 +193,7 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen unitOfWork.AddOrReplaceDistributedEvent(eventRecord); } - public async override Task PublishFromOutboxAsync( + public override async Task PublishFromOutboxAsync( OutgoingEventInfo outgoingEvent, OutboxConfig outboxConfig) { @@ -206,13 +206,18 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen headers.Add(EventBusConsts.CorrelationIdHeaderName, System.Text.Encoding.UTF8.GetBytes(outgoingEvent.GetCorrelationId()!)); } - await PublishAsync( + var result = await PublishAsync( AbpKafkaEventBusOptions.TopicName, outgoingEvent.EventName, outgoingEvent.EventData, headers ); + if (result.Status != PersistenceStatus.Persisted) + { + throw new AbpException($"Failed to publish event '{outgoingEvent.EventName}' to topic '{AbpKafkaEventBusOptions.TopicName}'. Status: {result.Status}"); + } + using (CorrelationIdProvider.Change(outgoingEvent.GetCorrelationId())) { await TriggerDistributedEventSentAsync(new DistributedEventSent() @@ -224,7 +229,7 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen } } - public async override Task PublishManyFromOutboxAsync(IEnumerable outgoingEvents, OutboxConfig outboxConfig) + public override async Task PublishManyFromOutboxAsync(IEnumerable outgoingEvents, OutboxConfig outboxConfig) { var producer = ProducerPool.Get(AbpKafkaEventBusOptions.ConnectionName); var outgoingEventArray = outgoingEvents.ToArray(); @@ -242,7 +247,7 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen headers.Add(EventBusConsts.CorrelationIdHeaderName, System.Text.Encoding.UTF8.GetBytes(outgoingEvent.GetCorrelationId()!)); } - producer.Produce( + var result = await producer.ProduceAsync( AbpKafkaEventBusOptions.TopicName, new Message { @@ -251,6 +256,11 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen Headers = headers }); + if (result.Status != PersistenceStatus.Persisted) + { + throw new AbpException($"Failed to publish event '{outgoingEvent.EventName}' to topic '{AbpKafkaEventBusOptions.TopicName}'. Status: {result.Status}"); + } + using (CorrelationIdProvider.Change(outgoingEvent.GetCorrelationId())) { await TriggerDistributedEventSentAsync(new DistributedEventSent() @@ -263,7 +273,7 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen } } - public async override Task ProcessFromInboxAsync( + public override async Task ProcessFromInboxAsync( IncomingEventInfo incomingEvent, InboxConfig inboxConfig) { @@ -290,12 +300,16 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen return Serializer.Serialize(eventData); } - private Task PublishAsync(string topicName, Type eventType, object eventData, Headers headers) + private async Task PublishAsync(string topicName, Type eventType, object eventData, Headers headers) { var eventName = EventNameAttribute.GetNameOrDefault(eventType); var body = Serializer.Serialize(eventData); - return PublishAsync(topicName, eventName, body, headers); + var result = await PublishAsync(topicName, eventName, body, headers); + if (result.Status != PersistenceStatus.Persisted) + { + throw new AbpException($"Failed to publish event '{eventName}' to topic '{topicName}'. Status: {result.Status}"); + } } private Task> PublishAsync( diff --git a/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs index 518de26437..8092107395 100644 --- a/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs +++ b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs @@ -21,17 +21,20 @@ namespace Volo.Abp.AspNetCore.ExceptionHandling; public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConverter, ITransientDependency { + protected AbpExceptionHandlingOptions ExceptionHandlingOptions { get; } protected AbpExceptionLocalizationOptions LocalizationOptions { get; } protected IStringLocalizerFactory StringLocalizerFactory { get; } protected IStringLocalizer L { get; } protected IServiceProvider ServiceProvider { get; } public DefaultExceptionToErrorInfoConverter( + IOptions exceptionHandlingOptions, IOptions localizationOptions, IStringLocalizerFactory stringLocalizerFactory, IStringLocalizer stringLocalizer, IServiceProvider serviceProvider) { + ExceptionHandlingOptions = exceptionHandlingOptions.Value; ServiceProvider = serviceProvider; StringLocalizerFactory = stringLocalizerFactory; L = stringLocalizer; @@ -327,8 +330,8 @@ public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConvert { return new AbpExceptionHandlingOptions { - SendExceptionsDetailsToClients = false, - SendStackTraceToClients = true + SendExceptionsDetailsToClients = ExceptionHandlingOptions.SendExceptionsDetailsToClients, + SendStackTraceToClients = ExceptionHandlingOptions.SendStackTraceToClients }; } } diff --git a/framework/src/Volo.Abp.Json.Newtonsoft/Volo/Abp/Json/Newtonsoft/AbpJsonNewtonsoftModule.cs b/framework/src/Volo.Abp.Json.Newtonsoft/Volo/Abp/Json/Newtonsoft/AbpJsonNewtonsoftModule.cs index ea35831d86..4b35ee5f25 100644 --- a/framework/src/Volo.Abp.Json.Newtonsoft/Volo/Abp/Json/Newtonsoft/AbpJsonNewtonsoftModule.cs +++ b/framework/src/Volo.Abp.Json.Newtonsoft/Volo/Abp/Json/Newtonsoft/AbpJsonNewtonsoftModule.cs @@ -10,7 +10,7 @@ public class AbpJsonNewtonsoftModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddOptions() + context.Services.AddAbpOptions() .Configure((options, rootServiceProvider) => { options.JsonSerializerSettings.ContractResolver = new AbpCamelCasePropertyNamesContractResolver( diff --git a/framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/AbpJsonSystemTextJsonModule.cs b/framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/AbpJsonSystemTextJsonModule.cs index 0a5066cec1..2679cca96c 100644 --- a/framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/AbpJsonSystemTextJsonModule.cs +++ b/framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/AbpJsonSystemTextJsonModule.cs @@ -15,7 +15,7 @@ public class AbpJsonSystemTextJsonModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddOptions() + context.Services.AddAbpOptions() .Configure((options, rootServiceProvider) => { // If the user hasn't explicitly configured the encoder, use the less strict encoder that does not encode all non-ASCII characters. diff --git a/framework/src/Volo.Abp.Kafka/Volo/Abp/Kafka/ProducerPool.cs b/framework/src/Volo.Abp.Kafka/Volo/Abp/Kafka/ProducerPool.cs index 23b9b71a57..a22f5970a2 100644 --- a/framework/src/Volo.Abp.Kafka/Volo/Abp/Kafka/ProducerPool.cs +++ b/framework/src/Volo.Abp.Kafka/Volo/Abp/Kafka/ProducerPool.cs @@ -17,7 +17,7 @@ public class ProducerPool : IProducerPool, ISingletonDependency protected ConcurrentDictionary>> Producers { get; } protected TimeSpan TotalDisposeWaitDuration { get; set; } = TimeSpan.FromSeconds(10); - + protected TimeSpan DefaultTransactionsWaitDuration { get; set; } = TimeSpan.FromSeconds(30); public ILogger Logger { get; set; } @@ -41,8 +41,10 @@ public class ProducerPool : IProducerPool, ISingletonDependency { var producerConfig = new ProducerConfig(Options.Connections.GetOrDefault(connection).ToDictionary(k => k.Key, v => v.Value)); Options.ConfigureProducer?.Invoke(producerConfig); + producerConfig.Acks ??= Acks.All; + producerConfig.EnableIdempotence ??= true; return new ProducerBuilder(producerConfig).Build(); - + })).Value; } @@ -70,7 +72,7 @@ public class ProducerPool : IProducerPool, ISingletonDependency foreach (var producer in Producers.Values) { var poolItemDisposeStopwatch = Stopwatch.StartNew(); - + try { producer.Value.Dispose(); @@ -78,19 +80,19 @@ public class ProducerPool : IProducerPool, ISingletonDependency catch { } - + poolItemDisposeStopwatch.Stop(); - + remainingWaitDuration = remainingWaitDuration > poolItemDisposeStopwatch.Elapsed ? remainingWaitDuration.Subtract(poolItemDisposeStopwatch.Elapsed) : TimeSpan.Zero; } - + poolDisposeStopwatch.Stop(); - + Logger.LogInformation( $"Disposed Kafka Producer Pool ({Producers.Count} producers in {poolDisposeStopwatch.Elapsed.TotalMilliseconds:0.00} ms)."); - + if (poolDisposeStopwatch.Elapsed.TotalSeconds > 5.0) { Logger.LogWarning( diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/ExtensionPropertyUiFormConfiguration.cs b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/ExtensionPropertyUiFormConfiguration.cs index d1d041a9b1..9a95cd6481 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/ExtensionPropertyUiFormConfiguration.cs +++ b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/ExtensionPropertyUiFormConfiguration.cs @@ -6,4 +6,9 @@ public class ExtensionPropertyUiFormConfiguration /// Default: true. /// public bool IsVisible { get; set; } = true; + + /// + /// Default: false. + /// + public bool IsReadOnly { get; set; } = false; } diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/ModuleExtensionConfigurationHelper.cs b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/ModuleExtensionConfigurationHelper.cs index 9a13b17028..40b9e8feb6 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/ModuleExtensionConfigurationHelper.cs +++ b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/ModuleExtensionConfigurationHelper.cs @@ -175,6 +175,10 @@ public static class ModuleExtensionConfigurationHelper property.DefaultValueFactory = propertyConfig.DefaultValueFactory; property.Lookup = propertyConfig.UI.Lookup; property.UI.Order = propertyConfig.UI.Order; + property.UI.CreateModal.IsVisible = propertyConfig.UI.OnCreateForm.IsVisible; + property.UI.CreateModal.IsReadOnly = propertyConfig.UI.OnCreateForm.IsReadOnly; + property.UI.EditModal.IsVisible = propertyConfig.UI.OnEditForm.IsVisible; + property.UI.EditModal.IsReadOnly = propertyConfig.UI.OnEditForm.IsReadOnly; property.Policy = propertyConfig.Policy; foreach (var configuration in propertyConfig.Configuration) { diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ObjectExtensionPropertyInfo.cs b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ObjectExtensionPropertyInfo.cs index e5ed79b99e..35c40e8043 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ObjectExtensionPropertyInfo.cs +++ b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ObjectExtensionPropertyInfo.cs @@ -90,16 +90,34 @@ public class ObjectExtensionPropertyInfo : IHasNameWithLocalizableDisplayName, I { public int Order { get; set; } + public ExtensionPropertyUICreateModal CreateModal { get; set; } + public ExtensionPropertyUIEditModal EditModal { get; set; } public ExtensionPropertyUI() { + CreateModal = new ExtensionPropertyUICreateModal(); EditModal = new ExtensionPropertyUIEditModal(); } } + public class ExtensionPropertyUICreateModal + { + /// + /// Default: true. + /// + public bool IsVisible { get; set; } = true; + + public bool IsReadOnly { get; set; } + } + public class ExtensionPropertyUIEditModal { + /// + /// Default: true. + /// + public bool IsVisible { get; set; } = true; + public bool IsReadOnly { get; set; } } } diff --git a/framework/src/Volo.Abp.Swashbuckle/Microsoft/Extensions/DependencyInjection/AbpSwaggerGenServiceCollectionExtensions.cs b/framework/src/Volo.Abp.Swashbuckle/Microsoft/Extensions/DependencyInjection/AbpSwaggerGenServiceCollectionExtensions.cs index 1238d766be..d63ca833eb 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Microsoft/Extensions/DependencyInjection/AbpSwaggerGenServiceCollectionExtensions.cs +++ b/framework/src/Volo.Abp.Swashbuckle/Microsoft/Extensions/DependencyInjection/AbpSwaggerGenServiceCollectionExtensions.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using JetBrains.Annotations; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; using Swashbuckle.AspNetCore.SwaggerGen; using Swashbuckle.AspNetCore.SwaggerUI; using Volo.Abp.Content; @@ -21,7 +21,7 @@ public static class AbpSwaggerGenServiceCollectionExtensions { Func remoteStreamContentSchemaFactory = () => new OpenApiSchema() { - Type = "string", + Type = JsonSchemaType.String, Format = "binary" }; @@ -42,7 +42,7 @@ public static class AbpSwaggerGenServiceCollectionExtensions { var authorizationUrl = new Uri($"{authority.TrimEnd('/')}{authorizationEndpoint.EnsureStartsWith('/')}"); var tokenUrl = new Uri($"{authority.TrimEnd('/')}{tokenEndpoint.EnsureStartsWith('/')}"); - + return services .AddAbpSwaggerGen() .AddSwaggerGen( @@ -62,19 +62,9 @@ public static class AbpSwaggerGenServiceCollectionExtensions } }); - options.AddSecurityRequirement(new OpenApiSecurityRequirement + options.AddSecurityRequirement(document => new OpenApiSecurityRequirement() { - { - new OpenApiSecurityScheme - { - Reference = new OpenApiReference - { - Type = ReferenceType.SecurityScheme, - Id = "oauth2" - } - }, - Array.Empty() - } + [new OpenApiSecuritySchemeReference("oauth2", document)] = [] }); setupAction?.Invoke(options); @@ -100,7 +90,7 @@ public static class AbpSwaggerGenServiceCollectionExtensions swaggerUiOptions.ConfigObject.AdditionalItems["oidcSupportedScopes"] = scopes; swaggerUiOptions.ConfigObject.AdditionalItems["oidcDiscoveryEndpoint"] = discoveryUrl; }); - + return services .AddAbpSwaggerGen() .AddSwaggerGen( @@ -112,24 +102,15 @@ public static class AbpSwaggerGenServiceCollectionExtensions OpenIdConnectUrl = new Uri(RemoveTenantPlaceholders(discoveryUrl)) }); - options.AddSecurityRequirement(new OpenApiSecurityRequirement + options.AddSecurityRequirement(document => new OpenApiSecurityRequirement() { - { - new OpenApiSecurityScheme - { - Reference = new OpenApiReference - { - Type = ReferenceType.SecurityScheme, - Id = "oidc" - } - }, - Array.Empty() - } + [new OpenApiSecuritySchemeReference("oauth2", document)] = [] }); + setupAction?.Invoke(options); }); } - + private static string RemoveTenantPlaceholders(string url) { return url diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs index b6dc661410..8c4f06d786 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs +++ b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; using Swashbuckle.AspNetCore.SwaggerGen; namespace Volo.Abp.Swashbuckle; @@ -13,7 +13,7 @@ public class AbpSwashbuckleDocumentFilter : IDocumentFilter protected virtual string[] ActionUrlPrefixes { get; set; } = new[] { "Volo." }; protected virtual string RegexConstraintPattern => @":regex\(([^()]*)\)"; - + public virtual void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) { var actionUrls = context.ApiDescriptions @@ -28,6 +28,20 @@ public class AbpSwashbuckleDocumentFilter : IDocumentFilter swaggerDoc .Paths .RemoveAll(path => !actionUrls.Contains(path.Key)); + + var tags = new List(); + foreach (var path in swaggerDoc.Paths) + { + if (path.Value.Operations != null) + { + tags.AddRange(path.Value.Operations.SelectMany(x => + { + return x.Value.Tags?.Select(t => t.Name ?? string.Empty) ?? Array.Empty(); + })); + } + } + tags = tags.Distinct().ToList(); + swaggerDoc.Tags?.RemoveAll(tag => tag.Name == null || !tags.Contains(tag.Name)); } protected virtual string? RemoveRouteParameterConstraints(ActionDescriptor actionDescriptor) @@ -49,7 +63,7 @@ public class AbpSwashbuckleDocumentFilter : IDocumentFilter { break; } - + route = route.Remove(startIndex, (endIndex - startIndex)); } diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleEnumSchemaFilter.cs b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleEnumSchemaFilter.cs index b6a20d2ad2..afd6a141dc 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleEnumSchemaFilter.cs +++ b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleEnumSchemaFilter.cs @@ -1,22 +1,22 @@ -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Models; +using System; +using System.Text.Json.Nodes; +using Microsoft.OpenApi; using Swashbuckle.AspNetCore.SwaggerGen; -using System; namespace Volo.Abp.Swashbuckle; public class AbpSwashbuckleEnumSchemaFilter : ISchemaFilter { - public void Apply(OpenApiSchema schema, SchemaFilterContext context) + public void Apply(IOpenApiSchema schema, SchemaFilterContext context) { - if (context.Type.IsEnum) + if (schema is OpenApiSchema openApiScheme && context.Type.IsEnum) { - schema.Enum.Clear(); - schema.Type = "string"; - schema.Format = null; + openApiScheme.Enum?.Clear(); + openApiScheme.Type = JsonSchemaType.String; + openApiScheme.Format = null; foreach (var name in Enum.GetNames(context.Type)) { - schema.Enum.Add(new OpenApiString($"{name}")); + openApiScheme.Enum?.Add(JsonNode.Parse($"\"{name}\"")!); } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApplicationPart/ApplicationPartSorter_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApplicationPart/ApplicationPartSorter_Tests.cs index 829aa23527..c8324e466a 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApplicationPart/ApplicationPartSorter_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApplicationPart/ApplicationPartSorter_Tests.cs @@ -26,6 +26,13 @@ public class ApplicationPartSorter_Tests partManager.ApplicationParts.Add(new AssemblyPart(assembly)); moduleDescriptors.Add(CreateModuleDescriptor(assembly)); } + + var dumplicateAssembly = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName($"ModuleB.dll"), AssemblyBuilderAccess.Run); + partManager.ApplicationParts.Add(new AssemblyPart(dumplicateAssembly)); + partManager.ApplicationParts.Add(new AssemblyPart(dumplicateAssembly)); + moduleDescriptors.Add(CreateModuleDescriptor(dumplicateAssembly)); + moduleDescriptors.Add(CreateModuleDescriptor(dumplicateAssembly)); + var randomApplicationParts = partManager.ApplicationParts.OrderBy(x => Guid.NewGuid()).ToList(); // Shuffle the parts // Additional part @@ -44,7 +51,7 @@ public class ApplicationPartSorter_Tests ApplicationPartSorter.Sort(partManager, moduleContainer); // Act - partManager.ApplicationParts.Count.ShouldBe(13); // 10 modules + 3 additional parts + partManager.ApplicationParts.Count.ShouldBe(15); // 10 modules + 3 additional parts + 2 duplicate parts var applicationParts = partManager.ApplicationParts.Reverse().ToList(); // Reverse the order to match the expected output @@ -60,7 +67,9 @@ public class ApplicationPartSorter_Tests applicationParts[9].ShouldBeOfType().Assembly.GetName().Name.ShouldStartWith("ModuleA7"); applicationParts[10].ShouldBeOfType().Assembly.GetName().Name.ShouldStartWith("ModuleA8"); applicationParts[11].ShouldBeOfType().Assembly.GetName().Name.ShouldStartWith("ModuleA9"); - applicationParts[12].ShouldBeOfType().Assembly.ShouldBe(typeof(AbpVirtualFileSystemModule).Assembly); + applicationParts[12].ShouldBeOfType().Assembly.GetName().Name.ShouldStartWith("ModuleB"); + applicationParts[13].ShouldBeOfType().Assembly.GetName().Name.ShouldStartWith("ModuleB"); + applicationParts[14].ShouldBeOfType().Assembly.ShouldBe(typeof(AbpVirtualFileSystemModule).Assembly); } private static IModuleContainer CreateFakeModuleContainer(List moduleDescriptors) diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/AbpAuthorizationTestModule.cs b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/AbpAuthorizationTestModule.cs index a4980a58ec..fca3d209b0 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/AbpAuthorizationTestModule.cs +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/AbpAuthorizationTestModule.cs @@ -31,6 +31,8 @@ public class AbpAuthorizationTestModule : AbpModule { options.ValueProviders.Add(); options.ValueProviders.Add(); + options.ValueProviders.Add(); + options.ValueProviders.Add(); }); } } diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/PermissionChecker_Tests.cs b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/PermissionChecker_Tests.cs index f39c48e435..c641f21e92 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/PermissionChecker_Tests.cs +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/PermissionChecker_Tests.cs @@ -8,7 +8,7 @@ namespace Volo.Abp.Authorization; public class PermissionChecker_Tests: AuthorizationTestBase { private readonly IPermissionChecker _permissionChecker; - + public PermissionChecker_Tests() { _permissionChecker = GetRequiredService(); @@ -21,6 +21,13 @@ public class PermissionChecker_Tests: AuthorizationTestBase (await _permissionChecker.IsGrantedAsync("UndefinedPermission")).ShouldBe(false); } + [Fact] + public async Task IsGranted_ProhibitedAsync() + { + (await _permissionChecker.IsGrantedAsync("MyPermission8")).ShouldBe(false); + (await _permissionChecker.IsGrantedAsync("MyPermission9")).ShouldBe(false); + } + [Fact] public async Task IsGranted_Multiple_Result_Async() { @@ -35,7 +42,7 @@ public class PermissionChecker_Tests: AuthorizationTestBase "MyPermission6", "MyPermission7" }); - + result.Result["MyPermission1"].ShouldBe(PermissionGrantResult.Undefined); result.Result["MyPermission2"].ShouldBe(PermissionGrantResult.Prohibited); result.Result["UndefinedPermission"].ShouldBe(PermissionGrantResult.Prohibited); @@ -44,6 +51,18 @@ public class PermissionChecker_Tests: AuthorizationTestBase result.Result["MyPermission5"].ShouldBe(PermissionGrantResult.Granted); result.Result["MyPermission6"].ShouldBe(PermissionGrantResult.Granted); result.Result["MyPermission7"].ShouldBe(PermissionGrantResult.Granted); - } -} \ No newline at end of file + + [Fact] + public async Task IsGranted_Multiple_Result_ProhibitedAsync() + { + var result = await _permissionChecker.IsGrantedAsync(new [] + { + "MyPermission8", + "MyPermission9" + }); + + result.Result["MyPermission8"].ShouldBe(PermissionGrantResult.Prohibited); + result.Result["MyPermission9"].ShouldBe(PermissionGrantResult.Prohibited); + } +} diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/AuthorizationTestPermissionDefinitionProvider.cs b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/AuthorizationTestPermissionDefinitionProvider.cs index b2a9179415..7e8ed5e949 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/AuthorizationTestPermissionDefinitionProvider.cs +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/AuthorizationTestPermissionDefinitionProvider.cs @@ -16,11 +16,11 @@ public class AuthorizationTestPermissionDefinitionProvider : PermissionDefinitio var group = context.AddGroup("TestGroup"); group[PermissionDefinitionContext.KnownPropertyNames.CurrentProviderName].ShouldBe(typeof(AuthorizationTestPermissionDefinitionProvider).FullName); - + var permission1 = group.AddPermission("MyAuthorizedService1"); permission1[PermissionDefinitionContext.KnownPropertyNames.CurrentProviderName].ShouldBe(typeof(AuthorizationTestPermissionDefinitionProvider).FullName); - + group.AddPermission("MyPermission1").StateCheckers.Add(new TestRequireEditionPermissionSimpleStateChecker()); group.AddPermission("MyPermission2"); group.AddPermission("MyPermission3"); @@ -28,6 +28,8 @@ public class AuthorizationTestPermissionDefinitionProvider : PermissionDefinitio group.AddPermission("MyPermission5"); group.AddPermission("MyPermission6").WithProviders(nameof(TestPermissionValueProvider1)); group.AddPermission("MyPermission7").WithProviders(nameof(TestPermissionValueProvider2)); + group.AddPermission("MyPermission8"); + group.AddPermission("MyPermission9"); group.GetPermissionOrNull("MyAuthorizedService1").ShouldNotBeNull(); diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/TestProhibitedPermissionValueProvider1.cs b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/TestProhibitedPermissionValueProvider1.cs new file mode 100644 index 0000000000..2f667cb791 --- /dev/null +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/TestProhibitedPermissionValueProvider1.cs @@ -0,0 +1,38 @@ +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Authorization.Permissions; + +namespace Volo.Abp.Authorization.TestServices; + +public class TestProhibitedPermissionValueProvider1 : PermissionValueProvider +{ + public TestProhibitedPermissionValueProvider1(IPermissionStore permissionStore) : base(permissionStore) + { + } + + public override string Name => "TestProhibitedPermissionValueProvider1"; + + public override Task CheckAsync(PermissionValueCheckContext context) + { + var result = PermissionGrantResult.Undefined; + if (context.Permission.Name == "MyPermission8" || context.Permission.Name == "MyPermission9") + { + result = PermissionGrantResult.Granted; + } + + return Task.FromResult(result); + } + + public override Task CheckAsync(PermissionValuesCheckContext context) + { + var result = new MultiplePermissionGrantResult(); + foreach (var name in context.Permissions.Select(x => x.Name)) + { + result.Result.Add(name, name == "MyPermission8" || name == "MyPermission9" + ? PermissionGrantResult.Granted + : PermissionGrantResult.Undefined); + } + + return Task.FromResult(result); + } +} diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/TestProhibitedPermissionValueProvider2.cs b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/TestProhibitedPermissionValueProvider2.cs new file mode 100644 index 0000000000..0311c19a65 --- /dev/null +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/TestProhibitedPermissionValueProvider2.cs @@ -0,0 +1,38 @@ +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Authorization.Permissions; + +namespace Volo.Abp.Authorization.TestServices; + +public class TestProhibitedPermissionValueProvider2 : PermissionValueProvider +{ + public TestProhibitedPermissionValueProvider2(IPermissionStore permissionStore) : base(permissionStore) + { + } + + public override string Name => "TestProhibitedPermissionValueProvider2"; + + public override Task CheckAsync(PermissionValueCheckContext context) + { + var result = PermissionGrantResult.Undefined; + if (context.Permission.Name == "MyPermission8" || context.Permission.Name == "MyPermission9") + { + result = PermissionGrantResult.Prohibited; + } + + return Task.FromResult(result); + } + + public override Task CheckAsync(PermissionValuesCheckContext context) + { + var result = new MultiplePermissionGrantResult(); + foreach (var name in context.Permissions.Select(x => x.Name)) + { + result.Result.Add(name, name == "MyPermission8" || name == "MyPermission9" + ? PermissionGrantResult.Prohibited + : PermissionGrantResult.Undefined); + } + + return Task.FromResult(result); + } +} diff --git a/framework/test/Volo.Abp.Json.Tests/Volo/Abp/Json/AbpJsonTestModule.cs b/framework/test/Volo.Abp.Json.Tests/Volo/Abp/Json/AbpJsonTestModule.cs index 121ec62a85..5382d3db46 100644 --- a/framework/test/Volo.Abp.Json.Tests/Volo/Abp/Json/AbpJsonTestModule.cs +++ b/framework/test/Volo.Abp.Json.Tests/Volo/Abp/Json/AbpJsonTestModule.cs @@ -19,7 +19,7 @@ public class AbpJsonSystemTextJsonTestModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddOptions() + context.Services.AddAbpOptions() .Configure((options, rootServiceProvider) => { if (options.JsonSerializerOptions.TypeInfoResolver != null) @@ -43,7 +43,7 @@ public class AbpJsonNewtonsoftTestModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddOptions() + context.Services.AddAbpOptions() .Configure((options, rootServiceProvider) => { options.JsonSerializerSettings.ContractResolver = new AbpCamelCasePropertyNamesContractResolver( diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs index 4435f1dcf0..a2234aa14a 100644 --- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs +++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs @@ -34,7 +34,7 @@ public class AbpMemoryDbTestModule : AbpModule options.AddRepository(); }); - context.Services.AddOptions() + context.Services.AddAbpOptions() .Configure((options, rootServiceProvider) => { options.JsonSerializerOptions.Converters.Add(new EntityJsonConverter()); diff --git a/latest-versions.json b/latest-versions.json index a39a43d36b..56a156bb81 100644 --- a/latest-versions.json +++ b/latest-versions.json @@ -1,4 +1,22 @@ [ + { + "version": "10.0.1", + "releaseDate": "", + "type": "stable", + "message": "", + "leptonx": { + "version": "5.0.1" + } + }, + { + "version": "10.0.0", + "releaseDate": "", + "type": "stable", + "message": "", + "leptonx": { + "version": "5.0.0" + } + }, { "version": "9.3.6", "releaseDate": "", diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.abppkg.analyze.json b/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.abppkg.analyze.json index d02c89e745..92c808c088 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.abppkg.analyze.json +++ b/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.abppkg.analyze.json @@ -24,6 +24,11 @@ "declaringAssemblyName": "Volo.Abp.Emailing", "namespace": "Volo.Abp.Emailing", "name": "AbpEmailingModule" + }, + { + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" } ], "implementingInterfaces": [ diff --git a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor index ea42414679..47ffa4cc48 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor +++ b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor @@ -78,7 +78,7 @@ if (!propertyInfo.Name.EndsWith("_Text")) { - if (propertyInfo.Type.IsEnum) + if (propertyInfo.IsEnum()) { } diff --git a/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.abppkg.analyze.json b/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.abppkg.analyze.json index cba964b090..843097ac3d 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.abppkg.analyze.json +++ b/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.abppkg.analyze.json @@ -11,9 +11,9 @@ "name": "AbpAspNetCoreComponentsWebThemingModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" }, { "declaringAssemblyName": "Volo.Abp.Account.Application.Contracts", diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.cshtml b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.cshtml index 025aa11142..aab9048d96 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.cshtml +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.cshtml @@ -60,13 +60,14 @@ if (!propertyInfo.Name.EndsWith("_Text")) { - if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + if (propertyInfo.IsEnum() || !propertyInfo.Lookup.Url.IsNullOrEmpty()) { - if (propertyInfo.Type.IsEnum) + if (propertyInfo.IsEnum()) { Model.ExtraProperties.ToEnum(propertyInfo.Name, propertyInfo.Type); } =10.0.0-rc.3", - "@abp/ng.theme.shared": ">=10.0.0-rc.3" + "@abp/ng.core": ">=10.0.1", + "@abp/ng.theme.shared": ">=10.0.1" }, "dependencies": { "tslib": "^2.0.0" diff --git a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs index 1f451f58d9..bfc910c7c6 100644 --- a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs @@ -13,7 +13,7 @@ using Microsoft.Extensions.Hosting; using Volo.CmsKit.EntityFrameworkCore; using Volo.CmsKit.MultiTenancy; using StackExchange.Redis; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; using Swashbuckle.AspNetCore.Swagger; using Volo.Abp; using Volo.Abp.AspNetCore.MultiTenancy; diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs index 623b417bc7..933dc8f50b 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs @@ -8,7 +8,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Volo.CmsKit.MultiTenancy; using StackExchange.Redis; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; using Swashbuckle.AspNetCore.Swagger; using Volo.Abp; using Volo.Abp.Account; diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json index 3fa8f57443..587b80af76 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json @@ -3,6 +3,6 @@ "name": "my-app-identityserver", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~10.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.basic": "~10.0.1" } } diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock index 2de8821c44..bbe4b5c934 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock @@ -2,185 +2,185 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.0.0-rc.3.tgz#d2784a3779500b0f22149a35eb81f0456b732239" - integrity sha512-6fYmDHPbaZGzDZgNz6/UzStP3DM4icxscY/IrqyJ0Mhzq00j/4nuG7zuc9hogUxqifwrBAa/oiiUtdkG1tr4uQ== +"@abp/aspnetcore.mvc.ui.theme.basic@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.0.1.tgz#3db3ac9291915c0b129fe90fd9a72ef1703c4b4d" + integrity sha512-D0Nv7VjNk03xF2Ii7pFEKSGzrggS5Y7NVApgOeFXbLhU/XZSfbR1A2wocLy6K+cKInH6+xhEyMdwTjwlUMx/Vw== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~10.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.shared" "~10.0.1" -"@abp/aspnetcore.mvc.ui.theme.shared@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.0.0-rc.3.tgz#a68d95a189e79dccb7bc50460565e03777e3823c" - integrity sha512-QvMZy5gVSksLYiGE8VvDQ7n5GKWCyuJF9Y7Kx6/bw+weWKvEk6kiqw5glTMzUOnpkM4kH7bIb8PoJSAycDlvRg== +"@abp/aspnetcore.mvc.ui.theme.shared@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.0.1.tgz#3c525bbc0da2b4e603b609289af623a030953f6d" + integrity sha512-euCjtPG2AjZ9AFbRQNh9649f40rQRfq58ZLvjUCfCvotbe7Fl+FaZgyIukpxXqKgd14NtCd2xPbvRM6/3Wj6IQ== dependencies: - "@abp/aspnetcore.mvc.ui" "~10.0.0-rc.3" - "@abp/bootstrap" "~10.0.0-rc.3" - "@abp/bootstrap-datepicker" "~10.0.0-rc.3" - "@abp/bootstrap-daterangepicker" "~10.0.0-rc.3" - "@abp/datatables.net-bs5" "~10.0.0-rc.3" - "@abp/font-awesome" "~10.0.0-rc.3" - "@abp/jquery-form" "~10.0.0-rc.3" - "@abp/jquery-validation-unobtrusive" "~10.0.0-rc.3" - "@abp/lodash" "~10.0.0-rc.3" - "@abp/luxon" "~10.0.0-rc.3" - "@abp/malihu-custom-scrollbar-plugin" "~10.0.0-rc.3" - "@abp/moment" "~10.0.0-rc.3" - "@abp/select2" "~10.0.0-rc.3" - "@abp/sweetalert2" "~10.0.0-rc.3" - "@abp/timeago" "~10.0.0-rc.3" - -"@abp/aspnetcore.mvc.ui@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.0.0-rc.3.tgz#8d3cbec33ff9efe7789e5cafb86c39e2488304ca" - integrity sha512-HqbleKwVFVRK0Xxd0XkeyCfX4+JPouEMYvQCL+zo0RDOMfPViPua5ketfU9DDhCCyMfCwy7iW0GeX9NuqEjXwg== + "@abp/aspnetcore.mvc.ui" "~10.0.1" + "@abp/bootstrap" "~10.0.1" + "@abp/bootstrap-datepicker" "~10.0.1" + "@abp/bootstrap-daterangepicker" "~10.0.1" + "@abp/datatables.net-bs5" "~10.0.1" + "@abp/font-awesome" "~10.0.1" + "@abp/jquery-form" "~10.0.1" + "@abp/jquery-validation-unobtrusive" "~10.0.1" + "@abp/lodash" "~10.0.1" + "@abp/luxon" "~10.0.1" + "@abp/malihu-custom-scrollbar-plugin" "~10.0.1" + "@abp/moment" "~10.0.1" + "@abp/select2" "~10.0.1" + "@abp/sweetalert2" "~10.0.1" + "@abp/timeago" "~10.0.1" + +"@abp/aspnetcore.mvc.ui@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.0.1.tgz#b004dc6313b9320b05f465eeb9e74877766ea0f0" + integrity sha512-IEiLfdpDwtrGek/z7iBlgKlZdCvgaL2q9/GGLySrLknnVtv/qONzYburveZsKw8LT7PbZWRQRBh2n7v6TT7M9w== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.0.0-rc.3.tgz#6d7528d9275cede4bf91b929dd407c744e513014" - integrity sha512-zBLJ9hQXucXOM0GpRyJCMHxdi+C5gaGQtYzguFFGDw+jW5Ht7paoAU+HYS8Dy29zHJHMk+VdO5vJovVIXhfuPg== +"@abp/bootstrap-datepicker@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.0.1.tgz#5d58e5039e39d84b179a0c343d616ab0fc7c38d4" + integrity sha512-hwpSDUTM/A/Rn+3Hjjt3xG7QdhmFruM7fGEEU8kd7Qowimx2XVNIM5Ua5obt5bGTyBmsaAx4HnurjJJn1oh4ng== dependencies: bootstrap-datepicker "^1.10.1" -"@abp/bootstrap-daterangepicker@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.0.0-rc.3.tgz#85b09ce28da96e84a9ad448cee5b73d581056041" - integrity sha512-VyAZqPZyx/sjGcYYqDPStwUMeQ+nMwud1pEmDgpPWWsRoQBPOVB3PS8KGgW4Fb2oax9i2v6wF5qqLEQkD3CDmA== +"@abp/bootstrap-daterangepicker@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.0.1.tgz#8ff88aed898e46c36a3e9601a791cb0fa1134f28" + integrity sha512-a1hhaSk+SffutUI0CxUgAG6Zmx/Y4L7i1LEsQff4OEq0j8ipaHT+5UHMXf2DbCMo7yoZh2yUXQAATO0A/O2V+A== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.0.0-rc.3.tgz#9daacf0ab7b3967dedad7f8792b9125c439f9022" - integrity sha512-Rl5DFxazgWZrioVjO6MLgnZW9YBsXN0DoWX3rprBp6qsLdBSNduIdM6J8DqB2y/UadoJwZRduykRZRVPgka3HQ== +"@abp/bootstrap@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.0.1.tgz#cb857f21814097522fbd7e5c1a36cb22182e9f3e" + integrity sha512-AK/8ykw4SYjLgFgJE1zb2Mevn6ypqXqETbndN887JSny1QRrLUBVOKy6g+pnPUqI45/4wPfas7H9WgjFINiK2g== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" bootstrap "^5.3.8" -"@abp/core@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.0.0-rc.3.tgz#7c74ed023ee91fa18d92dc33a64c11d279eb2414" - integrity sha512-z6QKxlAsiXcCwvn3BvNouLa7UsxQmQSlZ2yleTcJ7uEDSwUzbhzCiUQ5WwHTqoOACPQ71/wasSaxEyeRQBcE8w== +"@abp/core@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.0.1.tgz#c96563310d28137b0ac24efff74a969fa13aa7bb" + integrity sha512-mc/Wve/fl/B3cLqQ18IXO0lw1QCi3kCbi8PxRoLowD8NZEguezNglFjNqdvHNvBaWpZpMgJc2U+B15giB0946w== dependencies: - "@abp/utils" "~10.0.0-rc.3" + "@abp/utils" "~10.0.1" -"@abp/datatables.net-bs5@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.0.0-rc.3.tgz#13a533e454c60702ab10eb41faa5643a7d6f6cce" - integrity sha512-a6O+iLX/LdLZTCbLfR7HJlr+z8KlIxih/PFBqaf5lLmTnyS0aJii+KMHjD7nRJy5/TWI+ALiT7gWRbjiHxOuFQ== +"@abp/datatables.net-bs5@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.0.1.tgz#1b33c14e9dabd0b29cc4d6f05120607a14313d55" + integrity sha512-0ww7HZ9m/OZWRQ2/9gNNgd59FpfvWSdw21onCBgJ7eaLd6KQeeFqbXm4eYjHoLgyRwk8c6u/F9ciir3EeTivhw== dependencies: - "@abp/datatables.net" "~10.0.0-rc.3" + "@abp/datatables.net" "~10.0.1" datatables.net-bs5 "^2.3.4" -"@abp/datatables.net@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.0.0-rc.3.tgz#ae97a33f1695b6cab1658ff476a984c7ab9d51a6" - integrity sha512-1gHnOKNJxELYHY7eeO32aFm5+YA2YSEeOO6HrY4HZLRDr5rOHDAswH2OwFtn/qVPGR1fVbUr1TA9uqPOtxsJXA== +"@abp/datatables.net@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.0.1.tgz#ed45edcb4ee6832f38d4f1a56b5c0e1b126e8b82" + integrity sha512-DR53PGhHbW0ZdzeT7PWvBSfZrSyF2eWo1zAzCXsG+MsVRIiNzUNjipeq1igmd0PtXi2FHb76xS2utgAfgZEZ1A== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" datatables.net "^2.3.4" -"@abp/font-awesome@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.0.0-rc.3.tgz#a5b619452416af76203ef1bab18399abf8b8fa96" - integrity sha512-6FoA/2odS1kdV1EJ91YgIjMQiQdblUfqtDx72fDG7+qnqRyZ+Df/KWOqramEe9791zbXByZL4SjpqoisZgFNzQ== +"@abp/font-awesome@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.0.1.tgz#8c75feda6e394143f7e1cbe1ac8fc12b275bafed" + integrity sha512-2DDjc+EJcHDPUm/LHzbVjVMmChIaiEqMasKQ7qhxDq6yL102wMibPz0JR6Q9EYmYWro+Blf3Q0/0ECYLa8BgnQ== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" "@fortawesome/fontawesome-free" "^7.0.1" -"@abp/jquery-form@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-10.0.0-rc.3.tgz#24eefc512942dca37bdeb3fc1753cc3651e2872a" - integrity sha512-RRcGjt3blqH2R4uwrbrO+p1Kv6e7i1oJ9Wf6xrZK2upVfUvToUbif15HlC24FhNPX3BEUyL52s5HKcVBU5/1iw== +"@abp/jquery-form@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-10.0.1.tgz#e19c89863e2175a5e5db638ab95f648d2ee18ab3" + integrity sha512-nVZwEv0VeIP+xQZk7bz8S2RbKhkOUTKSf6mkdkLlna+8TNW0Ry8tBns79n/I0wYUh5007hxQbqb3L5TG4kq4+Q== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.0.0-rc.3.tgz#20c8647e006954887eebe86e17ef39a336f47a30" - integrity sha512-6DVIIEVyqyeKMrZHNOTfW3/xuw7rkjqTMKXT6Z1wrDpt9Erseuz8CjbPpcS+RwpXn6va5ShrkJlwwyScFOKvkQ== +"@abp/jquery-validation-unobtrusive@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.0.1.tgz#35d43938c05ed3f6aab67bfd574c82f5e83a277f" + integrity sha512-jch+haMxPqMcN7CrFoEnULXHSdP43E+CdwDkCYJnTjEydISMyr2CwW4cIA/ab4kjNXs1DloW+r8+unRnOzClWQ== dependencies: - "@abp/jquery-validation" "~10.0.0-rc.3" + "@abp/jquery-validation" "~10.0.1" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.0.0-rc.3.tgz#2e562ad5ca7c5bef389a0b24293a3193fa9823ef" - integrity sha512-xLJVvCkUrNnVeQbdsKfBj7zh3cSaPJC3eWKm2NoVy9KimEhF4zeSJEkciFmS0cckSal+AO2xC8W8ot3FqpkCHQ== +"@abp/jquery-validation@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.0.1.tgz#20c4c313d9ec73b4dc242729ab3250f747b76b66" + integrity sha512-cUGUCOuwKc1TR1R8GHpjN9HokWK6p6ElM4sN/J3yY/Nef9wKn4zY98Q3hmFLsCDeV+9Sjex1xcqNjqU3ZOiZSg== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" jquery-validation "^1.21.0" -"@abp/jquery@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.0.0-rc.3.tgz#3400f1b8c6966e2d71fceb5349f05b88aeb2bb88" - integrity sha512-liz3FITKdESLGomITjUqcOZYvV0rs61vYMxSbaCDoCKIQj4Ne9mN+HJ/KOpD6GOhqVsjmYOxDuSoecjiFLjVxA== +"@abp/jquery@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.0.1.tgz#fc6fb5fed08e6ab113e0096cd6c00ad10461fef4" + integrity sha512-hIQkMc9ouQz4QKaEJSVzZqQMyWdF7tmzZ8WlVN6EeWEDUKPLyuibhwTvTEO6u+17ZP7GhlldONHsRwTdc0zlJA== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" jquery "~3.7.1" -"@abp/lodash@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.0.0-rc.3.tgz#738baf7394d466112dc5a2380f2c549053621505" - integrity sha512-5PYQks4sJPdiz9zfZD1bfrCkmQ+ZMfWg2xyjbHoQzJdqu9rb2SRzkQ5MAWvqQPVTdLY6Bnutwxuq6mjkfcthcQ== +"@abp/lodash@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.0.1.tgz#41df6cc6d375ea1e6a5a27745b68b0964bcbc295" + integrity sha512-15uv5kNtXBb+3hm7Qorh95mLhSIJkIbGa2bp3Tyw4jEdXTFPsb1v5FCC2m7LEaEUNuNgzXFJGT818Xi58AI0Rw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" lodash "^4.17.21" -"@abp/luxon@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.0.0-rc.3.tgz#bfb0c5fbf4a321e4531ec5b34dcdee47b486afe8" - integrity sha512-PCifbFy7t1h4L+FKJAo5Xr7v5hTvlelwuCsOVGfG8HVWmbOTKiQJywtxvSnARbsJ6SghUEzbqMzeX6nyHZ4Zuw== +"@abp/luxon@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.0.1.tgz#97c920867775def2bb1628b47507e45388179e40" + integrity sha512-LL/J4oyA+o9res57cq/+qsilTvo7ikxtCdpxGSIEjkvNTmYzcChv1ixmDMvqqMvJFELJ9R+1V7NeZhXBAiR6Lw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" luxon "^3.7.2" -"@abp/malihu-custom-scrollbar-plugin@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.0.0-rc.3.tgz#03bf7a8b2e71ec463794260e7fe5e6bfeb526f8e" - integrity sha512-aHOZnr4iPS6QqV07cXyWpQVl6zAaQXuct1yTeIUqcAqxsSt63K6Y27nBR8cU/m6BHhjaxSLn1kynOeccmx7lDA== +"@abp/malihu-custom-scrollbar-plugin@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.0.1.tgz#53dc824537110f155d00c46b1ffe7c6eff060040" + integrity sha512-S4zKvlTMvhkFCBhakql1bLB/lHlRjPy8An0KB2pBKvxfIvzUQn8YmiBSK51Hq/Hf6ZnnSJkNr35cb9TcHUwkNA== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/moment@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.0.0-rc.3.tgz#1d2c8081b9f7f2716b250d16b41021e74c093fb0" - integrity sha512-VKDVY3ml3bhPh2rUsUN1F7zH5Myi+jRYxQYC/OuOsa1P4x9+cKs1lsS68NYAq+JyMlwwuJcAx63nqkxArz+VEw== +"@abp/moment@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.0.1.tgz#dce2c26602ac9c77ea0209e6a3727a7e9f04f4c4" + integrity sha512-fRrMLQhYzOSATSM4hWdr7Y5ggbMd23ffivpDB4O2BDYUXTcfiWyVVKDd+5uLZi+znkWz29bNN4WswileuHvaGw== dependencies: moment "^2.30.1" -"@abp/select2@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.0.0-rc.3.tgz#216403f1207a2556b0317fb973ed874c34c7fb73" - integrity sha512-6t/ZZl9xo0G86dX8zmEv82/64dOxCTgcQvjRGTb5Xwzh05nKHKpFFhJm6juVvpJcYqUj6Weks66SVjr6Wi2kQQ== +"@abp/select2@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.0.1.tgz#df92daf67f46aa2fc884ef84f9da68b1fb8e63d7" + integrity sha512-VQxYH0Uqa7EN+F6XBkDMz3yy8yTM6xcZ6593WtZupl9UbiHToGElsem3ibnZueoyMHcd3ByYw968uvJX7zudNw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" select2 "^4.0.13" -"@abp/sweetalert2@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.0.0-rc.3.tgz#401dc08eb4607d3a575a5288296f6c703b18df8a" - integrity sha512-2nB9I+GxK7UeIjvdUJtAH9GqIL/HloQ+7WC/ZWUNLCBqI5Owx30La2wxj5e9MlDNcLvYs3A2EJP0Llo4Gdefsg== +"@abp/sweetalert2@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.0.1.tgz#a26874fd51ddffeba60f4506eb1a5c914ae3efae" + integrity sha512-4USaGSA5+7O6D+5a4YhluYPKUyOAassUUuKJATP8IqLRtpkh16P4tJ/7+QWvnFDIgJLURpbjmOiN2xhVzhpxvw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" sweetalert2 "^11.23.0" -"@abp/timeago@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.0.0-rc.3.tgz#6fc8f16107171ae6f6afbbd3dc7e844651ffcf77" - integrity sha512-JYhSRbz06IObwA32GutyV+yo4p5PdAmGtlaApDLCpSFccHsel/A3jrN+ykovKy4chWYcbOhxhgjWw6ZaIZMvJg== +"@abp/timeago@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.0.1.tgz#6bc36ab7dd3deea114ff1d68dbda908202837cf6" + integrity sha512-Wd2KY8B95ycsRDn5ouY3l3U+niBMEd+XCgZs6CoaMtiQ1AxkT7/iPqNCMJMKjeIjBQ/A1CSmKL7MI+BGw1bxBA== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" timeago "^1.6.7" -"@abp/utils@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.0.0-rc.3.tgz#d6a07146ba627bcfa0cadd5c7c56601609b24d57" - integrity sha512-bA/WPuosvedfQr+5cJBwKXrhd6b8fDG7LWp4PuZFMdti8nSXgOheLeZ8PcRvut94ENIXS7jzSsqapLHRj5E6zQ== +"@abp/utils@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.0.1.tgz#0db8713481cb781c3c4d07a150b7f45a65466b50" + integrity sha512-YGXgco/qYSxGaQfNTHDIMU1MyEuVDe3FayIZWPW5+p+elwp4DPFD4rvD+6ZLM0Jr30k5UdKT4IFAsw7wduQWrw== dependencies: just-compare "^2.3.0" diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/CmsKitWebHostModule.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Host/CmsKitWebHostModule.cs index 522771c77b..7054a6f1fe 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/CmsKitWebHostModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/CmsKitWebHostModule.cs @@ -2,7 +2,7 @@ using System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; using System.IO; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.DataProtection; diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json b/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json index bc28d12fcd..a963ff1451 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~10.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.basic": "~10.0.1" } } diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock b/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock index 2de8821c44..bbe4b5c934 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock @@ -2,185 +2,185 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.0.0-rc.3.tgz#d2784a3779500b0f22149a35eb81f0456b732239" - integrity sha512-6fYmDHPbaZGzDZgNz6/UzStP3DM4icxscY/IrqyJ0Mhzq00j/4nuG7zuc9hogUxqifwrBAa/oiiUtdkG1tr4uQ== +"@abp/aspnetcore.mvc.ui.theme.basic@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.0.1.tgz#3db3ac9291915c0b129fe90fd9a72ef1703c4b4d" + integrity sha512-D0Nv7VjNk03xF2Ii7pFEKSGzrggS5Y7NVApgOeFXbLhU/XZSfbR1A2wocLy6K+cKInH6+xhEyMdwTjwlUMx/Vw== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~10.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.shared" "~10.0.1" -"@abp/aspnetcore.mvc.ui.theme.shared@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.0.0-rc.3.tgz#a68d95a189e79dccb7bc50460565e03777e3823c" - integrity sha512-QvMZy5gVSksLYiGE8VvDQ7n5GKWCyuJF9Y7Kx6/bw+weWKvEk6kiqw5glTMzUOnpkM4kH7bIb8PoJSAycDlvRg== +"@abp/aspnetcore.mvc.ui.theme.shared@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.0.1.tgz#3c525bbc0da2b4e603b609289af623a030953f6d" + integrity sha512-euCjtPG2AjZ9AFbRQNh9649f40rQRfq58ZLvjUCfCvotbe7Fl+FaZgyIukpxXqKgd14NtCd2xPbvRM6/3Wj6IQ== dependencies: - "@abp/aspnetcore.mvc.ui" "~10.0.0-rc.3" - "@abp/bootstrap" "~10.0.0-rc.3" - "@abp/bootstrap-datepicker" "~10.0.0-rc.3" - "@abp/bootstrap-daterangepicker" "~10.0.0-rc.3" - "@abp/datatables.net-bs5" "~10.0.0-rc.3" - "@abp/font-awesome" "~10.0.0-rc.3" - "@abp/jquery-form" "~10.0.0-rc.3" - "@abp/jquery-validation-unobtrusive" "~10.0.0-rc.3" - "@abp/lodash" "~10.0.0-rc.3" - "@abp/luxon" "~10.0.0-rc.3" - "@abp/malihu-custom-scrollbar-plugin" "~10.0.0-rc.3" - "@abp/moment" "~10.0.0-rc.3" - "@abp/select2" "~10.0.0-rc.3" - "@abp/sweetalert2" "~10.0.0-rc.3" - "@abp/timeago" "~10.0.0-rc.3" - -"@abp/aspnetcore.mvc.ui@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.0.0-rc.3.tgz#8d3cbec33ff9efe7789e5cafb86c39e2488304ca" - integrity sha512-HqbleKwVFVRK0Xxd0XkeyCfX4+JPouEMYvQCL+zo0RDOMfPViPua5ketfU9DDhCCyMfCwy7iW0GeX9NuqEjXwg== + "@abp/aspnetcore.mvc.ui" "~10.0.1" + "@abp/bootstrap" "~10.0.1" + "@abp/bootstrap-datepicker" "~10.0.1" + "@abp/bootstrap-daterangepicker" "~10.0.1" + "@abp/datatables.net-bs5" "~10.0.1" + "@abp/font-awesome" "~10.0.1" + "@abp/jquery-form" "~10.0.1" + "@abp/jquery-validation-unobtrusive" "~10.0.1" + "@abp/lodash" "~10.0.1" + "@abp/luxon" "~10.0.1" + "@abp/malihu-custom-scrollbar-plugin" "~10.0.1" + "@abp/moment" "~10.0.1" + "@abp/select2" "~10.0.1" + "@abp/sweetalert2" "~10.0.1" + "@abp/timeago" "~10.0.1" + +"@abp/aspnetcore.mvc.ui@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.0.1.tgz#b004dc6313b9320b05f465eeb9e74877766ea0f0" + integrity sha512-IEiLfdpDwtrGek/z7iBlgKlZdCvgaL2q9/GGLySrLknnVtv/qONzYburveZsKw8LT7PbZWRQRBh2n7v6TT7M9w== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.0.0-rc.3.tgz#6d7528d9275cede4bf91b929dd407c744e513014" - integrity sha512-zBLJ9hQXucXOM0GpRyJCMHxdi+C5gaGQtYzguFFGDw+jW5Ht7paoAU+HYS8Dy29zHJHMk+VdO5vJovVIXhfuPg== +"@abp/bootstrap-datepicker@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.0.1.tgz#5d58e5039e39d84b179a0c343d616ab0fc7c38d4" + integrity sha512-hwpSDUTM/A/Rn+3Hjjt3xG7QdhmFruM7fGEEU8kd7Qowimx2XVNIM5Ua5obt5bGTyBmsaAx4HnurjJJn1oh4ng== dependencies: bootstrap-datepicker "^1.10.1" -"@abp/bootstrap-daterangepicker@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.0.0-rc.3.tgz#85b09ce28da96e84a9ad448cee5b73d581056041" - integrity sha512-VyAZqPZyx/sjGcYYqDPStwUMeQ+nMwud1pEmDgpPWWsRoQBPOVB3PS8KGgW4Fb2oax9i2v6wF5qqLEQkD3CDmA== +"@abp/bootstrap-daterangepicker@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.0.1.tgz#8ff88aed898e46c36a3e9601a791cb0fa1134f28" + integrity sha512-a1hhaSk+SffutUI0CxUgAG6Zmx/Y4L7i1LEsQff4OEq0j8ipaHT+5UHMXf2DbCMo7yoZh2yUXQAATO0A/O2V+A== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.0.0-rc.3.tgz#9daacf0ab7b3967dedad7f8792b9125c439f9022" - integrity sha512-Rl5DFxazgWZrioVjO6MLgnZW9YBsXN0DoWX3rprBp6qsLdBSNduIdM6J8DqB2y/UadoJwZRduykRZRVPgka3HQ== +"@abp/bootstrap@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.0.1.tgz#cb857f21814097522fbd7e5c1a36cb22182e9f3e" + integrity sha512-AK/8ykw4SYjLgFgJE1zb2Mevn6ypqXqETbndN887JSny1QRrLUBVOKy6g+pnPUqI45/4wPfas7H9WgjFINiK2g== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" bootstrap "^5.3.8" -"@abp/core@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.0.0-rc.3.tgz#7c74ed023ee91fa18d92dc33a64c11d279eb2414" - integrity sha512-z6QKxlAsiXcCwvn3BvNouLa7UsxQmQSlZ2yleTcJ7uEDSwUzbhzCiUQ5WwHTqoOACPQ71/wasSaxEyeRQBcE8w== +"@abp/core@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.0.1.tgz#c96563310d28137b0ac24efff74a969fa13aa7bb" + integrity sha512-mc/Wve/fl/B3cLqQ18IXO0lw1QCi3kCbi8PxRoLowD8NZEguezNglFjNqdvHNvBaWpZpMgJc2U+B15giB0946w== dependencies: - "@abp/utils" "~10.0.0-rc.3" + "@abp/utils" "~10.0.1" -"@abp/datatables.net-bs5@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.0.0-rc.3.tgz#13a533e454c60702ab10eb41faa5643a7d6f6cce" - integrity sha512-a6O+iLX/LdLZTCbLfR7HJlr+z8KlIxih/PFBqaf5lLmTnyS0aJii+KMHjD7nRJy5/TWI+ALiT7gWRbjiHxOuFQ== +"@abp/datatables.net-bs5@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.0.1.tgz#1b33c14e9dabd0b29cc4d6f05120607a14313d55" + integrity sha512-0ww7HZ9m/OZWRQ2/9gNNgd59FpfvWSdw21onCBgJ7eaLd6KQeeFqbXm4eYjHoLgyRwk8c6u/F9ciir3EeTivhw== dependencies: - "@abp/datatables.net" "~10.0.0-rc.3" + "@abp/datatables.net" "~10.0.1" datatables.net-bs5 "^2.3.4" -"@abp/datatables.net@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.0.0-rc.3.tgz#ae97a33f1695b6cab1658ff476a984c7ab9d51a6" - integrity sha512-1gHnOKNJxELYHY7eeO32aFm5+YA2YSEeOO6HrY4HZLRDr5rOHDAswH2OwFtn/qVPGR1fVbUr1TA9uqPOtxsJXA== +"@abp/datatables.net@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.0.1.tgz#ed45edcb4ee6832f38d4f1a56b5c0e1b126e8b82" + integrity sha512-DR53PGhHbW0ZdzeT7PWvBSfZrSyF2eWo1zAzCXsG+MsVRIiNzUNjipeq1igmd0PtXi2FHb76xS2utgAfgZEZ1A== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" datatables.net "^2.3.4" -"@abp/font-awesome@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.0.0-rc.3.tgz#a5b619452416af76203ef1bab18399abf8b8fa96" - integrity sha512-6FoA/2odS1kdV1EJ91YgIjMQiQdblUfqtDx72fDG7+qnqRyZ+Df/KWOqramEe9791zbXByZL4SjpqoisZgFNzQ== +"@abp/font-awesome@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.0.1.tgz#8c75feda6e394143f7e1cbe1ac8fc12b275bafed" + integrity sha512-2DDjc+EJcHDPUm/LHzbVjVMmChIaiEqMasKQ7qhxDq6yL102wMibPz0JR6Q9EYmYWro+Blf3Q0/0ECYLa8BgnQ== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" "@fortawesome/fontawesome-free" "^7.0.1" -"@abp/jquery-form@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-10.0.0-rc.3.tgz#24eefc512942dca37bdeb3fc1753cc3651e2872a" - integrity sha512-RRcGjt3blqH2R4uwrbrO+p1Kv6e7i1oJ9Wf6xrZK2upVfUvToUbif15HlC24FhNPX3BEUyL52s5HKcVBU5/1iw== +"@abp/jquery-form@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-10.0.1.tgz#e19c89863e2175a5e5db638ab95f648d2ee18ab3" + integrity sha512-nVZwEv0VeIP+xQZk7bz8S2RbKhkOUTKSf6mkdkLlna+8TNW0Ry8tBns79n/I0wYUh5007hxQbqb3L5TG4kq4+Q== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.0.0-rc.3.tgz#20c8647e006954887eebe86e17ef39a336f47a30" - integrity sha512-6DVIIEVyqyeKMrZHNOTfW3/xuw7rkjqTMKXT6Z1wrDpt9Erseuz8CjbPpcS+RwpXn6va5ShrkJlwwyScFOKvkQ== +"@abp/jquery-validation-unobtrusive@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.0.1.tgz#35d43938c05ed3f6aab67bfd574c82f5e83a277f" + integrity sha512-jch+haMxPqMcN7CrFoEnULXHSdP43E+CdwDkCYJnTjEydISMyr2CwW4cIA/ab4kjNXs1DloW+r8+unRnOzClWQ== dependencies: - "@abp/jquery-validation" "~10.0.0-rc.3" + "@abp/jquery-validation" "~10.0.1" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.0.0-rc.3.tgz#2e562ad5ca7c5bef389a0b24293a3193fa9823ef" - integrity sha512-xLJVvCkUrNnVeQbdsKfBj7zh3cSaPJC3eWKm2NoVy9KimEhF4zeSJEkciFmS0cckSal+AO2xC8W8ot3FqpkCHQ== +"@abp/jquery-validation@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.0.1.tgz#20c4c313d9ec73b4dc242729ab3250f747b76b66" + integrity sha512-cUGUCOuwKc1TR1R8GHpjN9HokWK6p6ElM4sN/J3yY/Nef9wKn4zY98Q3hmFLsCDeV+9Sjex1xcqNjqU3ZOiZSg== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" jquery-validation "^1.21.0" -"@abp/jquery@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.0.0-rc.3.tgz#3400f1b8c6966e2d71fceb5349f05b88aeb2bb88" - integrity sha512-liz3FITKdESLGomITjUqcOZYvV0rs61vYMxSbaCDoCKIQj4Ne9mN+HJ/KOpD6GOhqVsjmYOxDuSoecjiFLjVxA== +"@abp/jquery@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.0.1.tgz#fc6fb5fed08e6ab113e0096cd6c00ad10461fef4" + integrity sha512-hIQkMc9ouQz4QKaEJSVzZqQMyWdF7tmzZ8WlVN6EeWEDUKPLyuibhwTvTEO6u+17ZP7GhlldONHsRwTdc0zlJA== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" jquery "~3.7.1" -"@abp/lodash@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.0.0-rc.3.tgz#738baf7394d466112dc5a2380f2c549053621505" - integrity sha512-5PYQks4sJPdiz9zfZD1bfrCkmQ+ZMfWg2xyjbHoQzJdqu9rb2SRzkQ5MAWvqQPVTdLY6Bnutwxuq6mjkfcthcQ== +"@abp/lodash@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.0.1.tgz#41df6cc6d375ea1e6a5a27745b68b0964bcbc295" + integrity sha512-15uv5kNtXBb+3hm7Qorh95mLhSIJkIbGa2bp3Tyw4jEdXTFPsb1v5FCC2m7LEaEUNuNgzXFJGT818Xi58AI0Rw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" lodash "^4.17.21" -"@abp/luxon@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.0.0-rc.3.tgz#bfb0c5fbf4a321e4531ec5b34dcdee47b486afe8" - integrity sha512-PCifbFy7t1h4L+FKJAo5Xr7v5hTvlelwuCsOVGfG8HVWmbOTKiQJywtxvSnARbsJ6SghUEzbqMzeX6nyHZ4Zuw== +"@abp/luxon@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.0.1.tgz#97c920867775def2bb1628b47507e45388179e40" + integrity sha512-LL/J4oyA+o9res57cq/+qsilTvo7ikxtCdpxGSIEjkvNTmYzcChv1ixmDMvqqMvJFELJ9R+1V7NeZhXBAiR6Lw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" luxon "^3.7.2" -"@abp/malihu-custom-scrollbar-plugin@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.0.0-rc.3.tgz#03bf7a8b2e71ec463794260e7fe5e6bfeb526f8e" - integrity sha512-aHOZnr4iPS6QqV07cXyWpQVl6zAaQXuct1yTeIUqcAqxsSt63K6Y27nBR8cU/m6BHhjaxSLn1kynOeccmx7lDA== +"@abp/malihu-custom-scrollbar-plugin@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.0.1.tgz#53dc824537110f155d00c46b1ffe7c6eff060040" + integrity sha512-S4zKvlTMvhkFCBhakql1bLB/lHlRjPy8An0KB2pBKvxfIvzUQn8YmiBSK51Hq/Hf6ZnnSJkNr35cb9TcHUwkNA== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/moment@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.0.0-rc.3.tgz#1d2c8081b9f7f2716b250d16b41021e74c093fb0" - integrity sha512-VKDVY3ml3bhPh2rUsUN1F7zH5Myi+jRYxQYC/OuOsa1P4x9+cKs1lsS68NYAq+JyMlwwuJcAx63nqkxArz+VEw== +"@abp/moment@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.0.1.tgz#dce2c26602ac9c77ea0209e6a3727a7e9f04f4c4" + integrity sha512-fRrMLQhYzOSATSM4hWdr7Y5ggbMd23ffivpDB4O2BDYUXTcfiWyVVKDd+5uLZi+znkWz29bNN4WswileuHvaGw== dependencies: moment "^2.30.1" -"@abp/select2@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.0.0-rc.3.tgz#216403f1207a2556b0317fb973ed874c34c7fb73" - integrity sha512-6t/ZZl9xo0G86dX8zmEv82/64dOxCTgcQvjRGTb5Xwzh05nKHKpFFhJm6juVvpJcYqUj6Weks66SVjr6Wi2kQQ== +"@abp/select2@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.0.1.tgz#df92daf67f46aa2fc884ef84f9da68b1fb8e63d7" + integrity sha512-VQxYH0Uqa7EN+F6XBkDMz3yy8yTM6xcZ6593WtZupl9UbiHToGElsem3ibnZueoyMHcd3ByYw968uvJX7zudNw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" select2 "^4.0.13" -"@abp/sweetalert2@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.0.0-rc.3.tgz#401dc08eb4607d3a575a5288296f6c703b18df8a" - integrity sha512-2nB9I+GxK7UeIjvdUJtAH9GqIL/HloQ+7WC/ZWUNLCBqI5Owx30La2wxj5e9MlDNcLvYs3A2EJP0Llo4Gdefsg== +"@abp/sweetalert2@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.0.1.tgz#a26874fd51ddffeba60f4506eb1a5c914ae3efae" + integrity sha512-4USaGSA5+7O6D+5a4YhluYPKUyOAassUUuKJATP8IqLRtpkh16P4tJ/7+QWvnFDIgJLURpbjmOiN2xhVzhpxvw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" sweetalert2 "^11.23.0" -"@abp/timeago@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.0.0-rc.3.tgz#6fc8f16107171ae6f6afbbd3dc7e844651ffcf77" - integrity sha512-JYhSRbz06IObwA32GutyV+yo4p5PdAmGtlaApDLCpSFccHsel/A3jrN+ykovKy4chWYcbOhxhgjWw6ZaIZMvJg== +"@abp/timeago@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.0.1.tgz#6bc36ab7dd3deea114ff1d68dbda908202837cf6" + integrity sha512-Wd2KY8B95ycsRDn5ouY3l3U+niBMEd+XCgZs6CoaMtiQ1AxkT7/iPqNCMJMKjeIjBQ/A1CSmKL7MI+BGw1bxBA== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" timeago "^1.6.7" -"@abp/utils@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.0.0-rc.3.tgz#d6a07146ba627bcfa0cadd5c7c56601609b24d57" - integrity sha512-bA/WPuosvedfQr+5cJBwKXrhd6b8fDG7LWp4PuZFMdti8nSXgOheLeZ8PcRvut94ENIXS7jzSsqapLHRj5E6zQ== +"@abp/utils@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.0.1.tgz#0db8713481cb781c3c4d07a150b7f45a65466b50" + integrity sha512-YGXgco/qYSxGaQfNTHDIMU1MyEuVDe3FayIZWPW5+p+elwp4DPFD4rvD+6ZLM0Jr30k5UdKT4IFAsw7wduQWrw== dependencies: just-compare "^2.3.0" diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs index c216a6ba38..e8169fbfef 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs @@ -3,7 +3,7 @@ using System.IO; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; using Volo.Abp; using Volo.Abp.Account; using Volo.Abp.Account.Web; diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json index 0277a0b878..c59f4fd76c 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json @@ -3,10 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~10.0.0-rc.3", - "@abp/cms-kit": "10.0.0-rc.3" - }, - "resolutions": { - "codemirror": "^5.65.1" + "@abp/aspnetcore.mvc.ui.theme.basic": "~10.0.1", + "@abp/cms-kit": "10.0.1" } } diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock index b6ff9f5f84..7ed7ff1d59 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock @@ -2,293 +2,293 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.0.0-rc.3.tgz#d2784a3779500b0f22149a35eb81f0456b732239" - integrity sha512-6fYmDHPbaZGzDZgNz6/UzStP3DM4icxscY/IrqyJ0Mhzq00j/4nuG7zuc9hogUxqifwrBAa/oiiUtdkG1tr4uQ== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~10.0.0-rc.3" - -"@abp/aspnetcore.mvc.ui.theme.shared@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.0.0-rc.3.tgz#a68d95a189e79dccb7bc50460565e03777e3823c" - integrity sha512-QvMZy5gVSksLYiGE8VvDQ7n5GKWCyuJF9Y7Kx6/bw+weWKvEk6kiqw5glTMzUOnpkM4kH7bIb8PoJSAycDlvRg== - dependencies: - "@abp/aspnetcore.mvc.ui" "~10.0.0-rc.3" - "@abp/bootstrap" "~10.0.0-rc.3" - "@abp/bootstrap-datepicker" "~10.0.0-rc.3" - "@abp/bootstrap-daterangepicker" "~10.0.0-rc.3" - "@abp/datatables.net-bs5" "~10.0.0-rc.3" - "@abp/font-awesome" "~10.0.0-rc.3" - "@abp/jquery-form" "~10.0.0-rc.3" - "@abp/jquery-validation-unobtrusive" "~10.0.0-rc.3" - "@abp/lodash" "~10.0.0-rc.3" - "@abp/luxon" "~10.0.0-rc.3" - "@abp/malihu-custom-scrollbar-plugin" "~10.0.0-rc.3" - "@abp/moment" "~10.0.0-rc.3" - "@abp/select2" "~10.0.0-rc.3" - "@abp/sweetalert2" "~10.0.0-rc.3" - "@abp/timeago" "~10.0.0-rc.3" - -"@abp/aspnetcore.mvc.ui@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.0.0-rc.3.tgz#8d3cbec33ff9efe7789e5cafb86c39e2488304ca" - integrity sha512-HqbleKwVFVRK0Xxd0XkeyCfX4+JPouEMYvQCL+zo0RDOMfPViPua5ketfU9DDhCCyMfCwy7iW0GeX9NuqEjXwg== +"@abp/aspnetcore.mvc.ui.theme.basic@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.0.1.tgz#3db3ac9291915c0b129fe90fd9a72ef1703c4b4d" + integrity sha512-D0Nv7VjNk03xF2Ii7pFEKSGzrggS5Y7NVApgOeFXbLhU/XZSfbR1A2wocLy6K+cKInH6+xhEyMdwTjwlUMx/Vw== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~10.0.1" + +"@abp/aspnetcore.mvc.ui.theme.shared@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.0.1.tgz#3c525bbc0da2b4e603b609289af623a030953f6d" + integrity sha512-euCjtPG2AjZ9AFbRQNh9649f40rQRfq58ZLvjUCfCvotbe7Fl+FaZgyIukpxXqKgd14NtCd2xPbvRM6/3Wj6IQ== + dependencies: + "@abp/aspnetcore.mvc.ui" "~10.0.1" + "@abp/bootstrap" "~10.0.1" + "@abp/bootstrap-datepicker" "~10.0.1" + "@abp/bootstrap-daterangepicker" "~10.0.1" + "@abp/datatables.net-bs5" "~10.0.1" + "@abp/font-awesome" "~10.0.1" + "@abp/jquery-form" "~10.0.1" + "@abp/jquery-validation-unobtrusive" "~10.0.1" + "@abp/lodash" "~10.0.1" + "@abp/luxon" "~10.0.1" + "@abp/malihu-custom-scrollbar-plugin" "~10.0.1" + "@abp/moment" "~10.0.1" + "@abp/select2" "~10.0.1" + "@abp/sweetalert2" "~10.0.1" + "@abp/timeago" "~10.0.1" + +"@abp/aspnetcore.mvc.ui@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.0.1.tgz#b004dc6313b9320b05f465eeb9e74877766ea0f0" + integrity sha512-IEiLfdpDwtrGek/z7iBlgKlZdCvgaL2q9/GGLySrLknnVtv/qONzYburveZsKw8LT7PbZWRQRBh2n7v6TT7M9w== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.0.0-rc.3.tgz#6d7528d9275cede4bf91b929dd407c744e513014" - integrity sha512-zBLJ9hQXucXOM0GpRyJCMHxdi+C5gaGQtYzguFFGDw+jW5Ht7paoAU+HYS8Dy29zHJHMk+VdO5vJovVIXhfuPg== +"@abp/bootstrap-datepicker@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.0.1.tgz#5d58e5039e39d84b179a0c343d616ab0fc7c38d4" + integrity sha512-hwpSDUTM/A/Rn+3Hjjt3xG7QdhmFruM7fGEEU8kd7Qowimx2XVNIM5Ua5obt5bGTyBmsaAx4HnurjJJn1oh4ng== dependencies: bootstrap-datepicker "^1.10.1" -"@abp/bootstrap-daterangepicker@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.0.0-rc.3.tgz#85b09ce28da96e84a9ad448cee5b73d581056041" - integrity sha512-VyAZqPZyx/sjGcYYqDPStwUMeQ+nMwud1pEmDgpPWWsRoQBPOVB3PS8KGgW4Fb2oax9i2v6wF5qqLEQkD3CDmA== +"@abp/bootstrap-daterangepicker@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.0.1.tgz#8ff88aed898e46c36a3e9601a791cb0fa1134f28" + integrity sha512-a1hhaSk+SffutUI0CxUgAG6Zmx/Y4L7i1LEsQff4OEq0j8ipaHT+5UHMXf2DbCMo7yoZh2yUXQAATO0A/O2V+A== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.0.0-rc.3.tgz#9daacf0ab7b3967dedad7f8792b9125c439f9022" - integrity sha512-Rl5DFxazgWZrioVjO6MLgnZW9YBsXN0DoWX3rprBp6qsLdBSNduIdM6J8DqB2y/UadoJwZRduykRZRVPgka3HQ== +"@abp/bootstrap@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.0.1.tgz#cb857f21814097522fbd7e5c1a36cb22182e9f3e" + integrity sha512-AK/8ykw4SYjLgFgJE1zb2Mevn6ypqXqETbndN887JSny1QRrLUBVOKy6g+pnPUqI45/4wPfas7H9WgjFINiK2g== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" bootstrap "^5.3.8" -"@abp/clipboard@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-10.0.0-rc.3.tgz#43f7989809da0df90eecbdda999351defa9f3eec" - integrity sha512-KXvgt91WX4GDOLZsT8OpTBwWdN93/adX+b5OuNxzgASdxKWXI+cj2ZU2PIyKQjPvU7A6tqsBqglVe4DKlGDCiQ== +"@abp/clipboard@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-10.0.1.tgz#fc120857770a16c17f2d029a7920243357cda456" + integrity sha512-iMACbeAq6gSZ2/EUhwd1h/7gctRokSCMNuyE7hh7y2Rb0s4JeW5dbMx9QIc9oywPauRz4yCAJSFi7PJfObFL9w== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" clipboard "^2.0.11" -"@abp/cms-kit.admin@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/cms-kit.admin/-/cms-kit.admin-10.0.0-rc.3.tgz#260e7c6409c7004f9aee28b927b7d96c7dbcd545" - integrity sha512-5CAsTDzyJYuG1Ww+ucAOGm58nCRtavovkqMh18VuIEwrIuxFtliz5TS587kMl3XGug1MtsodFSZYHqqhzIvPVA== +"@abp/cms-kit.admin@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/cms-kit.admin/-/cms-kit.admin-10.0.1.tgz#98ac41348454728638c3b39ddb6d40cf138cd554" + integrity sha512-klgJYE6+fvJUb5R0yJlgbalcXBjrSLXVIe1V/NSPRYhBceHX71ZUIDcYYV5EQUs0FY/xEYiuIDR/M6mYcHYLeg== dependencies: - "@abp/codemirror" "~10.0.0-rc.3" - "@abp/jstree" "~10.0.0-rc.3" - "@abp/markdown-it" "~10.0.0-rc.3" - "@abp/slugify" "~10.0.0-rc.3" - "@abp/tui-editor" "~10.0.0-rc.3" - "@abp/uppy" "~10.0.0-rc.3" + "@abp/codemirror" "~10.0.1" + "@abp/jstree" "~10.0.1" + "@abp/markdown-it" "~10.0.1" + "@abp/slugify" "~10.0.1" + "@abp/tui-editor" "~10.0.1" + "@abp/uppy" "~10.0.1" -"@abp/cms-kit.public@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/cms-kit.public/-/cms-kit.public-10.0.0-rc.3.tgz#6c80384e979d7f00590ff42b599d0a9fce2909bb" - integrity sha512-u8aTT8p8kdhlqbEYVwXyW4CyHGpKbe5IFO9XpKFckVs7OzabbrZtFWzkVx8/kxStlLnM4DgvUo56+3ipNISMGQ== +"@abp/cms-kit.public@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/cms-kit.public/-/cms-kit.public-10.0.1.tgz#aab1d7ba0d34efc1733578e13730fb91cfe65c84" + integrity sha512-RwHusSvwYRZ9GIW4rvrLyPdbEwY75D/gBeABftumRYi9TYuMcrQxHfnQ0dByFiV98lq5V6sB/pvBPVyPcy6g3w== dependencies: - "@abp/highlight.js" "~10.0.0-rc.3" - "@abp/star-rating-svg" "~10.0.0-rc.3" + "@abp/highlight.js" "~10.0.1" + "@abp/star-rating-svg" "~10.0.1" -"@abp/cms-kit@10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/cms-kit/-/cms-kit-10.0.0-rc.3.tgz#2cb1bb682008db7ffb295cf4c529138f0c3681a1" - integrity sha512-y1ifTW2wGevW+zo42QndzcCihPf/q58512mVsmfXxJsXelFg/3f7Q3Kxndd4C4t1SLD3eygL0b69ny975v8K0g== +"@abp/cms-kit@10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/cms-kit/-/cms-kit-10.0.1.tgz#9c50225de5a7b6e1a80567ab912a4b81faec3e16" + integrity sha512-LxGWXbXUeXRzrd91NuTYM0wIRlIEdkTA1tOfTpZapNDO1MwSyadjt1DrtMvlRXo0xHlzE9PRw0KI8EUOGpi49A== dependencies: - "@abp/cms-kit.admin" "~10.0.0-rc.3" - "@abp/cms-kit.public" "~10.0.0-rc.3" + "@abp/cms-kit.admin" "~10.0.1" + "@abp/cms-kit.public" "~10.0.1" -"@abp/codemirror@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/codemirror/-/codemirror-10.0.0-rc.3.tgz#e5dc9fe9da5971aaad534571a4917f9008755ac4" - integrity sha512-CL0cjUTGC8R9+AV85C0v6lE4n2b1yc81pCVwgYCZB5mVDw0zLFtf0F3bnvT48UdjJ3TcHYrtiIs77oJXKAdvRA== +"@abp/codemirror@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/codemirror/-/codemirror-10.0.1.tgz#4b1b0feab9b711809d5115eb359c5ffe77e90056" + integrity sha512-Buj11XuJuDJnEKvSE+HCD846ynqctn76xhLoYwKD6mnRzdvVKw57MpU1TQVjXfqd8hiD418oE7uEaTW/zm7RvA== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" codemirror "^5.65.1" -"@abp/core@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.0.0-rc.3.tgz#7c74ed023ee91fa18d92dc33a64c11d279eb2414" - integrity sha512-z6QKxlAsiXcCwvn3BvNouLa7UsxQmQSlZ2yleTcJ7uEDSwUzbhzCiUQ5WwHTqoOACPQ71/wasSaxEyeRQBcE8w== +"@abp/core@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.0.1.tgz#c96563310d28137b0ac24efff74a969fa13aa7bb" + integrity sha512-mc/Wve/fl/B3cLqQ18IXO0lw1QCi3kCbi8PxRoLowD8NZEguezNglFjNqdvHNvBaWpZpMgJc2U+B15giB0946w== dependencies: - "@abp/utils" "~10.0.0-rc.3" + "@abp/utils" "~10.0.1" -"@abp/datatables.net-bs5@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.0.0-rc.3.tgz#13a533e454c60702ab10eb41faa5643a7d6f6cce" - integrity sha512-a6O+iLX/LdLZTCbLfR7HJlr+z8KlIxih/PFBqaf5lLmTnyS0aJii+KMHjD7nRJy5/TWI+ALiT7gWRbjiHxOuFQ== +"@abp/datatables.net-bs5@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.0.1.tgz#1b33c14e9dabd0b29cc4d6f05120607a14313d55" + integrity sha512-0ww7HZ9m/OZWRQ2/9gNNgd59FpfvWSdw21onCBgJ7eaLd6KQeeFqbXm4eYjHoLgyRwk8c6u/F9ciir3EeTivhw== dependencies: - "@abp/datatables.net" "~10.0.0-rc.3" + "@abp/datatables.net" "~10.0.1" datatables.net-bs5 "^2.3.4" -"@abp/datatables.net@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.0.0-rc.3.tgz#ae97a33f1695b6cab1658ff476a984c7ab9d51a6" - integrity sha512-1gHnOKNJxELYHY7eeO32aFm5+YA2YSEeOO6HrY4HZLRDr5rOHDAswH2OwFtn/qVPGR1fVbUr1TA9uqPOtxsJXA== +"@abp/datatables.net@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.0.1.tgz#ed45edcb4ee6832f38d4f1a56b5c0e1b126e8b82" + integrity sha512-DR53PGhHbW0ZdzeT7PWvBSfZrSyF2eWo1zAzCXsG+MsVRIiNzUNjipeq1igmd0PtXi2FHb76xS2utgAfgZEZ1A== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" datatables.net "^2.3.4" -"@abp/font-awesome@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.0.0-rc.3.tgz#a5b619452416af76203ef1bab18399abf8b8fa96" - integrity sha512-6FoA/2odS1kdV1EJ91YgIjMQiQdblUfqtDx72fDG7+qnqRyZ+Df/KWOqramEe9791zbXByZL4SjpqoisZgFNzQ== +"@abp/font-awesome@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.0.1.tgz#8c75feda6e394143f7e1cbe1ac8fc12b275bafed" + integrity sha512-2DDjc+EJcHDPUm/LHzbVjVMmChIaiEqMasKQ7qhxDq6yL102wMibPz0JR6Q9EYmYWro+Blf3Q0/0ECYLa8BgnQ== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" "@fortawesome/fontawesome-free" "^7.0.1" -"@abp/highlight.js@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-10.0.0-rc.3.tgz#b72dfecd68208e5c9125fc3f03390761c1b1b784" - integrity sha512-dNzuKfm66N7lFiDCkiDBoJNbLerbpK6XRNowVRuVIb/rgGTdMmzk7CatV0n04OJQgMqm/cq+cZSV0Lp0f7v1YA== +"@abp/highlight.js@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-10.0.1.tgz#abdc2033d70c8701453186cd543458154b448961" + integrity sha512-a5Jp9gvS78pK3GxMxqkpN5nBxIGUtTrrr05zLmjh3ohzo/u7p+P1QQpZlOythEEjAgF6V+1PEMl/RRaDKmqllA== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" "@highlightjs/cdn-assets" "~11.11.1" -"@abp/jquery-form@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-10.0.0-rc.3.tgz#24eefc512942dca37bdeb3fc1753cc3651e2872a" - integrity sha512-RRcGjt3blqH2R4uwrbrO+p1Kv6e7i1oJ9Wf6xrZK2upVfUvToUbif15HlC24FhNPX3BEUyL52s5HKcVBU5/1iw== +"@abp/jquery-form@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-10.0.1.tgz#e19c89863e2175a5e5db638ab95f648d2ee18ab3" + integrity sha512-nVZwEv0VeIP+xQZk7bz8S2RbKhkOUTKSf6mkdkLlna+8TNW0Ry8tBns79n/I0wYUh5007hxQbqb3L5TG4kq4+Q== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.0.0-rc.3.tgz#20c8647e006954887eebe86e17ef39a336f47a30" - integrity sha512-6DVIIEVyqyeKMrZHNOTfW3/xuw7rkjqTMKXT6Z1wrDpt9Erseuz8CjbPpcS+RwpXn6va5ShrkJlwwyScFOKvkQ== +"@abp/jquery-validation-unobtrusive@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.0.1.tgz#35d43938c05ed3f6aab67bfd574c82f5e83a277f" + integrity sha512-jch+haMxPqMcN7CrFoEnULXHSdP43E+CdwDkCYJnTjEydISMyr2CwW4cIA/ab4kjNXs1DloW+r8+unRnOzClWQ== dependencies: - "@abp/jquery-validation" "~10.0.0-rc.3" + "@abp/jquery-validation" "~10.0.1" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.0.0-rc.3.tgz#2e562ad5ca7c5bef389a0b24293a3193fa9823ef" - integrity sha512-xLJVvCkUrNnVeQbdsKfBj7zh3cSaPJC3eWKm2NoVy9KimEhF4zeSJEkciFmS0cckSal+AO2xC8W8ot3FqpkCHQ== +"@abp/jquery-validation@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.0.1.tgz#20c4c313d9ec73b4dc242729ab3250f747b76b66" + integrity sha512-cUGUCOuwKc1TR1R8GHpjN9HokWK6p6ElM4sN/J3yY/Nef9wKn4zY98Q3hmFLsCDeV+9Sjex1xcqNjqU3ZOiZSg== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" jquery-validation "^1.21.0" -"@abp/jquery@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.0.0-rc.3.tgz#3400f1b8c6966e2d71fceb5349f05b88aeb2bb88" - integrity sha512-liz3FITKdESLGomITjUqcOZYvV0rs61vYMxSbaCDoCKIQj4Ne9mN+HJ/KOpD6GOhqVsjmYOxDuSoecjiFLjVxA== +"@abp/jquery@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.0.1.tgz#fc6fb5fed08e6ab113e0096cd6c00ad10461fef4" + integrity sha512-hIQkMc9ouQz4QKaEJSVzZqQMyWdF7tmzZ8WlVN6EeWEDUKPLyuibhwTvTEO6u+17ZP7GhlldONHsRwTdc0zlJA== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" jquery "~3.7.1" -"@abp/jstree@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/jstree/-/jstree-10.0.0-rc.3.tgz#2fa742149d42ac9d9758eb6a5c2ee309003caf39" - integrity sha512-QvMimaaMTokfEuhEd0OeJVAoTTYJyhb+7frPd52a1HraPF2d7aiht4bdHcOyeJxVYi2KiRmAgzIHHIX9AeIy8g== +"@abp/jstree@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/jstree/-/jstree-10.0.1.tgz#10db9cc5b9fba61424a202cf3ae15d7f26e651d6" + integrity sha512-V98/Bt++JQQjsPkcE81GAN7Sz6M5heq+t2uHn5gvqeUwkdX1OsutxKp1oSeXVrYItxeI7avWB9iTJGfsq0RhBQ== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" jstree "^3.3.17" -"@abp/lodash@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.0.0-rc.3.tgz#738baf7394d466112dc5a2380f2c549053621505" - integrity sha512-5PYQks4sJPdiz9zfZD1bfrCkmQ+ZMfWg2xyjbHoQzJdqu9rb2SRzkQ5MAWvqQPVTdLY6Bnutwxuq6mjkfcthcQ== +"@abp/lodash@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.0.1.tgz#41df6cc6d375ea1e6a5a27745b68b0964bcbc295" + integrity sha512-15uv5kNtXBb+3hm7Qorh95mLhSIJkIbGa2bp3Tyw4jEdXTFPsb1v5FCC2m7LEaEUNuNgzXFJGT818Xi58AI0Rw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" lodash "^4.17.21" -"@abp/luxon@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.0.0-rc.3.tgz#bfb0c5fbf4a321e4531ec5b34dcdee47b486afe8" - integrity sha512-PCifbFy7t1h4L+FKJAo5Xr7v5hTvlelwuCsOVGfG8HVWmbOTKiQJywtxvSnARbsJ6SghUEzbqMzeX6nyHZ4Zuw== +"@abp/luxon@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.0.1.tgz#97c920867775def2bb1628b47507e45388179e40" + integrity sha512-LL/J4oyA+o9res57cq/+qsilTvo7ikxtCdpxGSIEjkvNTmYzcChv1ixmDMvqqMvJFELJ9R+1V7NeZhXBAiR6Lw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" luxon "^3.7.2" -"@abp/malihu-custom-scrollbar-plugin@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.0.0-rc.3.tgz#03bf7a8b2e71ec463794260e7fe5e6bfeb526f8e" - integrity sha512-aHOZnr4iPS6QqV07cXyWpQVl6zAaQXuct1yTeIUqcAqxsSt63K6Y27nBR8cU/m6BHhjaxSLn1kynOeccmx7lDA== +"@abp/malihu-custom-scrollbar-plugin@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.0.1.tgz#53dc824537110f155d00c46b1ffe7c6eff060040" + integrity sha512-S4zKvlTMvhkFCBhakql1bLB/lHlRjPy8An0KB2pBKvxfIvzUQn8YmiBSK51Hq/Hf6ZnnSJkNr35cb9TcHUwkNA== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/markdown-it@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/markdown-it/-/markdown-it-10.0.0-rc.3.tgz#01f29a09fa8f87a928088ddab4ed73e5e06fa7f2" - integrity sha512-eVenb0mKVxZlvfDVoebt8fJrhvHzqM3y7Fc32FwQcd/0ExP09OT5/VlPbv6p88s59nvdznxtXCETQFjwZ9DkqQ== +"@abp/markdown-it@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/markdown-it/-/markdown-it-10.0.1.tgz#c8266ae68fb1603dd210563f55a2d69050687b46" + integrity sha512-mDe5ZXfaSBIHe1AKV9UgebjuxhDamb63/P6GdZ43hjuUXX42UgPCDO73Y7XuxDJbKZudxVecFoXMZ5mCzeKsLg== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" markdown-it "^14.1.0" -"@abp/moment@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.0.0-rc.3.tgz#1d2c8081b9f7f2716b250d16b41021e74c093fb0" - integrity sha512-VKDVY3ml3bhPh2rUsUN1F7zH5Myi+jRYxQYC/OuOsa1P4x9+cKs1lsS68NYAq+JyMlwwuJcAx63nqkxArz+VEw== +"@abp/moment@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.0.1.tgz#dce2c26602ac9c77ea0209e6a3727a7e9f04f4c4" + integrity sha512-fRrMLQhYzOSATSM4hWdr7Y5ggbMd23ffivpDB4O2BDYUXTcfiWyVVKDd+5uLZi+znkWz29bNN4WswileuHvaGw== dependencies: moment "^2.30.1" -"@abp/prismjs@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-10.0.0-rc.3.tgz#d7342b793fc7baf205726e8a088de88778fc24b1" - integrity sha512-cafgH3lrlT+jOuQKtBVeORbBkJKCG2DqnVF0blaD75ww32R5TJS+LH8gOufezdTfASG14ZlpzqNLl1Xu67Wh4Q== +"@abp/prismjs@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-10.0.1.tgz#dcd4c55e8fed9aa19712517c6f7a86c667269753" + integrity sha512-WdZLCL2UYFVqJnFYuSO4geAi5sdfgxITqI9BhEZdFuJzdfp89PZ4cnK7DYxnYBrgW/yh38xwzv+HVclK3xgPNA== dependencies: - "@abp/clipboard" "~10.0.0-rc.3" - "@abp/core" "~10.0.0-rc.3" + "@abp/clipboard" "~10.0.1" + "@abp/core" "~10.0.1" prismjs "^1.30.0" -"@abp/select2@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.0.0-rc.3.tgz#216403f1207a2556b0317fb973ed874c34c7fb73" - integrity sha512-6t/ZZl9xo0G86dX8zmEv82/64dOxCTgcQvjRGTb5Xwzh05nKHKpFFhJm6juVvpJcYqUj6Weks66SVjr6Wi2kQQ== +"@abp/select2@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.0.1.tgz#df92daf67f46aa2fc884ef84f9da68b1fb8e63d7" + integrity sha512-VQxYH0Uqa7EN+F6XBkDMz3yy8yTM6xcZ6593WtZupl9UbiHToGElsem3ibnZueoyMHcd3ByYw968uvJX7zudNw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" select2 "^4.0.13" -"@abp/slugify@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/slugify/-/slugify-10.0.0-rc.3.tgz#423502a7dacd960ee65f4ad3e7079ef56bb50b07" - integrity sha512-PAPutBCzD7TMijGXuiREpNBa4JLfW7Y7f2GDxJhKMqJ4WZ5yjMl+QWpAmrndeLyKi2w+HxnHocKTqnW/F8X5nA== +"@abp/slugify@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/slugify/-/slugify-10.0.1.tgz#47d8ffa59e4d57b61573e22167cecaaec257d81c" + integrity sha512-fIX4w+96Qdpa/UFq5jc6alSioilNp7LwqKum9G7LRDqjJoOPHRhG0IkPayY9v/oqJeDKoqlXMkD9s4b5MGQYPw== dependencies: slugify "^1.6.6" -"@abp/star-rating-svg@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/star-rating-svg/-/star-rating-svg-10.0.0-rc.3.tgz#672b4138c86c8502b0100c35b7dc471762e1454c" - integrity sha512-/DKDPhhfZBK+madBkYPWD2WxN2gPpxwFVXBaDR/esx9dZ8NuXZPkQ05RasEpwizz5RdK+yl9xF7JoH6ieYcqsw== +"@abp/star-rating-svg@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/star-rating-svg/-/star-rating-svg-10.0.1.tgz#3de67008012d080751cf671cf2bdede88906ca55" + integrity sha512-3vSxBayzdzMTKUeQaCrnFgJBO2V95L4GNUlYtV5txGPtziQd+VTPBL4mxVJ5F/6sizGUlmbXe4fMX33+DSfqbA== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" star-rating-svg "^3.5.0" -"@abp/sweetalert2@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.0.0-rc.3.tgz#401dc08eb4607d3a575a5288296f6c703b18df8a" - integrity sha512-2nB9I+GxK7UeIjvdUJtAH9GqIL/HloQ+7WC/ZWUNLCBqI5Owx30La2wxj5e9MlDNcLvYs3A2EJP0Llo4Gdefsg== +"@abp/sweetalert2@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.0.1.tgz#a26874fd51ddffeba60f4506eb1a5c914ae3efae" + integrity sha512-4USaGSA5+7O6D+5a4YhluYPKUyOAassUUuKJATP8IqLRtpkh16P4tJ/7+QWvnFDIgJLURpbjmOiN2xhVzhpxvw== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" sweetalert2 "^11.23.0" -"@abp/timeago@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.0.0-rc.3.tgz#6fc8f16107171ae6f6afbbd3dc7e844651ffcf77" - integrity sha512-JYhSRbz06IObwA32GutyV+yo4p5PdAmGtlaApDLCpSFccHsel/A3jrN+ykovKy4chWYcbOhxhgjWw6ZaIZMvJg== +"@abp/timeago@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.0.1.tgz#6bc36ab7dd3deea114ff1d68dbda908202837cf6" + integrity sha512-Wd2KY8B95ycsRDn5ouY3l3U+niBMEd+XCgZs6CoaMtiQ1AxkT7/iPqNCMJMKjeIjBQ/A1CSmKL7MI+BGw1bxBA== dependencies: - "@abp/jquery" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" timeago "^1.6.7" -"@abp/tui-editor@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/tui-editor/-/tui-editor-10.0.0-rc.3.tgz#0a196dcfd7eb30223b808e1c192942e6135e1715" - integrity sha512-IaaI1/KNkwYVmEadIoYvuXbdkpwk7CwYA+3Sp64Ow2cbQB6IatW9h4BPHLmQqRmaP1xTLwTLVWenThEpo2CIAQ== +"@abp/tui-editor@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/tui-editor/-/tui-editor-10.0.1.tgz#551720cf5ce65c5c1087afae2c8f7ee3079d4ed9" + integrity sha512-D9Pe+dP9huGLiH176WM2klodENrdI9fLjbX7Pg9rD0FeeydpKREDbgcFs3iJdECrhLU2nV1xTR3gntu9pql65g== dependencies: - "@abp/jquery" "~10.0.0-rc.3" - "@abp/prismjs" "~10.0.0-rc.3" + "@abp/jquery" "~10.0.1" + "@abp/prismjs" "~10.0.1" -"@abp/uppy@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/uppy/-/uppy-10.0.0-rc.3.tgz#ef15186cfb9f06a4eba6ed50b01815d1f8de7eae" - integrity sha512-MAlRdHXn9rWQeCnOKAMKk7DOqPnUj+ffnSByaFsnzmxoawl5ZMmUfhFq5eOT+QbYW02GWVWx1K9cG7wNq+6k+Q== +"@abp/uppy@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/uppy/-/uppy-10.0.1.tgz#5a5df3ac9239ecaeb3ff3bf41868c25dda7e4f59" + integrity sha512-lcERKrPp3cvYplJR0qFi6BJEwWy4jaewmZjtuMV4Vy5su0T1IKadyDNAtw6WLAQae+HGu4tMIZI8kc65AQshjQ== dependencies: - "@abp/core" "~10.0.0-rc.3" + "@abp/core" "~10.0.1" uppy "^5.1.2" -"@abp/utils@~10.0.0-rc.3": - version "10.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.0.0-rc.3.tgz#d6a07146ba627bcfa0cadd5c7c56601609b24d57" - integrity sha512-bA/WPuosvedfQr+5cJBwKXrhd6b8fDG7LWp4PuZFMdti8nSXgOheLeZ8PcRvut94ENIXS7jzSsqapLHRj5E6zQ== +"@abp/utils@~10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.0.1.tgz#0db8713481cb781c3c4d07a150b7f45a65466b50" + integrity sha512-YGXgco/qYSxGaQfNTHDIMU1MyEuVDe3FayIZWPW5+p+elwp4DPFD4rvD+6ZLM0Jr30k5UdKT4IFAsw7wduQWrw== dependencies: just-compare "^2.3.0" diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.abppkg.analyze.json b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.abppkg.analyze.json index ce5b9fcead..f2cd1dfe77 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.abppkg.analyze.json +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.abppkg.analyze.json @@ -955,10 +955,10 @@ { "namespace": "Volo.CmsKit.Admin.GlobalResources", "baseClass": { - "name": "ApplicationService", - "namespace": "Volo.Abp.Application.Services", - "declaringAssemblyName": "Volo.Abp.Ddd.Application", - "fullName": "Volo.Abp.Application.Services.ApplicationService" + "name": "CmsKitAdminAppServiceBase", + "namespace": "Volo.CmsKit.Admin", + "declaringAssemblyName": "Volo.CmsKit.Admin.Application", + "fullName": "Volo.CmsKit.Admin.CmsKitAdminAppServiceBase" }, "implementingInterfaces": [ { diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml index 4ed695dfa8..39c4f4e191 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml @@ -91,13 +91,14 @@ { if (!propertyInfo.Name.EndsWith("_Text")) { - if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + if (propertyInfo.IsEnum() || !propertyInfo.Lookup.Url.IsNullOrEmpty()) { - if (propertyInfo.Type.IsEnum) + if (propertyInfo.IsEnum()) { Model.ViewModel.ExtraProperties.ToEnum(propertyInfo.Name, propertyInfo.Type); } >, ITransientDependency { + protected IFeatureChecker FeatureChecker { get; set; } protected IMenuItemRepository MenuRepository { get; } protected MenuItemManager MenuManager { get; } public PageChangedHandler( + IFeatureChecker featureChecker, IMenuItemRepository menuRepository, MenuItemManager menuManager) { + FeatureChecker = featureChecker; MenuRepository = menuRepository; MenuManager = menuManager; } public async Task HandleEventAsync(EntityUpdatedEventData eventData) { + if(!GlobalFeatureManager.Instance.IsEnabled()) + { + return; + } + + if(!await FeatureChecker.IsEnabledAsync(CmsKitFeatures.MenuEnable)) + { + return; + } + // TODO: Write a repository query. var allMenuItems = await MenuRepository.GetListAsync(); diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.abppkg.analyze.json b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.abppkg.analyze.json index 8e10e6ce08..3fafe1ced4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.abppkg.analyze.json +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.abppkg.analyze.json @@ -710,10 +710,10 @@ { "namespace": "Volo.CmsKit.Public.GlobalResources", "baseClass": { - "name": "ApplicationService", - "namespace": "Volo.Abp.Application.Services", - "declaringAssemblyName": "Volo.Abp.Ddd.Application", - "fullName": "Volo.Abp.Application.Services.ApplicationService" + "name": "CmsKitPublicAppServiceBase", + "namespace": "Volo.CmsKit.Public", + "declaringAssemblyName": "Volo.CmsKit.Public.Application", + "fullName": "Volo.CmsKit.Public.CmsKitPublicAppServiceBase" }, "implementingInterfaces": [ { diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml index 95879128a7..0c0a1dc8f5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml @@ -5,32 +5,37 @@ @model Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Rating.RatingViewModel @inject IHtmlLocalizer L +@{ + var modalId = "ratingDetail_" + Model.EntityType + "_" + Model.EntityId; + modalId = modalId.Replace(".", "-").Replace(":", "-").Replace("/", "-").Replace(" ", "-"); + var modalLabelId = modalId + "_label"; +} +
@if (CurrentUser.IsAuthenticated) { - @if (!Model.IsReadOnly && Model.CurrentRating != null) + @if (Model.Ratings != null) { - - @L["Undo"] - - } - if (Model.Ratings != null) - { - + -