diff --git a/.github/scripts/CheckDocsSyntax/CheckDocsSyntax.csproj b/.github/scripts/CheckDocsSyntax/CheckDocsSyntax.csproj index b17b6c0369..d82becd79c 100644 --- a/.github/scripts/CheckDocsSyntax/CheckDocsSyntax.csproj +++ b/.github/scripts/CheckDocsSyntax/CheckDocsSyntax.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 enable enable Volo.Abp.Docs.SyntaxCheck diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 6c3dce1854..9f091ce341 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -66,7 +66,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 with: - dotnet-version: 10.0.x + dotnet-version: 11.0.x - name: Cache NuGet packages uses: actions/cache@v4 with: diff --git a/.github/workflows/check-docs-syntax.yml b/.github/workflows/check-docs-syntax.yml index 3a3b272e94..45a339a52e 100644 --- a/.github/workflows/check-docs-syntax.yml +++ b/.github/workflows/check-docs-syntax.yml @@ -27,7 +27,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: '10.0.x' + dotnet-version: '11.0.x' - name: Build syntax checker run: dotnet build .github/scripts/CheckDocsSyntax/CheckDocsSyntax.csproj -c Release --nologo -v minimal diff --git a/.github/workflows/nuget-packages-version-change-detector.yml b/.github/workflows/nuget-packages-version-change-detector.yml index 45dba3332b..bcb13d2f68 100644 --- a/.github/workflows/nuget-packages-version-change-detector.yml +++ b/.github/workflows/nuget-packages-version-change-detector.yml @@ -25,7 +25,7 @@ concurrency: jobs: label: - if: ${{ !github.event.pull_request.draft && !startsWith(github.head_ref, 'auto-merge/') && github.event.pull_request.head.repo.full_name == github.repository && !contains(github.event.head_commit.message, '[skip ci]') }} + if: ${{ !github.event.pull_request.draft && !startsWith(github.head_ref, 'auto-merge/') && !startsWith(github.head_ref, 'auto-merge-forward/') && github.event.pull_request.head.repo.full_name == github.repository && !contains(github.event.head_commit.message, '[skip ci]') }} permissions: contents: write pull-requests: write diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 0000000000..1e424cc5c6 --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,8 @@ + + + + false + + diff --git a/Directory.Packages.props b/Directory.Packages.props index 01f0ec3435..5394b53100 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -33,7 +33,7 @@ - + @@ -58,64 +58,64 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - + + + - + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -124,11 +124,11 @@ - + - + @@ -139,9 +139,10 @@ - + - + + @@ -164,22 +165,24 @@ + - + - - + + + - - - + + + @@ -194,6 +197,6 @@ - + diff --git a/common.props b/common.props index 39be4f5c66..496ce41309 100644 --- a/common.props +++ b/common.props @@ -1,8 +1,8 @@ latest - 10.8.0-preview - 5.8.0-preview + 11.0.0-rc.1 + 6.0.0-rc.1 $(NoWarn);CS1591;CS0436 https://abp.io/assets/abp_nupkg.png https://abp.io/ diff --git a/docs/en/Blog-Posts/2026-10-23-Introduce-Volobox/POST.md b/docs/en/Blog-Posts/2026-10-23-Introduce-Volobox/POST.md new file mode 100644 index 0000000000..fdea0012c5 --- /dev/null +++ b/docs/en/Blog-Posts/2026-10-23-Introduce-Volobox/POST.md @@ -0,0 +1,46 @@ +You know us from the ABP Framework. For some time now we have also been building something else with it, and this is the first time we write about it here. + +**Volobox** is a team workspace where AI agents work as governed team members. Since August we have been onboarding teams one at a time through demos and running our own company on it. Today it is generally available: any team can request a free demo, have its own workspace set up the same day, and use it free for 30 days. + +This post is for the ABP community: what Volobox is, how it is built, and what it means for you. + +## What Volobox is + +![volobox-screen](volobox-screen.png) + +Projects, tasks, chat, docs, meetings, files, and customer support live in one workspace, and AI agents work inside it like teammates. An agent has a handle, skills, memberships, and a manager. You assign it a task the same way you assign one to a colleague, mention it in chat, or put it on a scheduled playbook. + +For a bug, the agent writes the code and comes back with a pull request. The coding session runs in an isolated sandbox and you can watch it live: the plan, the terminal, the file diffs, what each step costs. You review the pull request in Volobox, and "request changes" hands your feedback straight back to the agent. GitHub, GitLab.com, and Azure Repos are supported. + +What makes this workable with a real team is the governance model. Every agent action is permissioned, approved, and audited: approval cards for writes, three authorization modes, standing rules with budgets, rate limits, and an audit log. An agent assigned a task acts under its own permissions, not the assigner's. + +## How it is built + +Volobox is a .NET 10 layered ABP application (will be migrated to .NET 11 very soon): the modular backend you would recognize, a React frontend, PostgreSQL, SignalR for realtime, and sandboxes that run in the cloud or on a computer the person owns. Identity, permissions, settings, features, and auditing are the ABP modules you already use. + +**Custom Apps**, the part of Volobox where a team builds internal tools by describing them to an agent, runs on the low-code engine of the ABP Framework, which our team develops. You describe the app, approve what the agent proposes, and get a live app; when you need more, you continue in JavaScript or C# without replatforming. + +Running agents against a large ABP codebase every day has taught us a lot about what agents get right and wrong in a modular .NET solution. That experience goes back into the framework as ordinary improvements, and we will talk about it openly in the Community Talks session below. + +## What it means for ABP developers + +- **Nothing changes about ABP.** Same licensing, same support, same team. Volobox is a separate product. +- **Agents on your own code.** Connect your repository, assign an issue to an agent, and review the pull request in the workspace. Start with agents in Ask mode if you prefer. It is not restricted by ABP Framework. **It works with any kind of programming language and tool**. +- **Keep your current tools.** Start with one project, keep GitHub or GitLab issues in sync, connect what you already use over MCP. +- **Extend it the way you extend ABP.** Library packs, skills, commands, MCP in both directions, Custom Apps on the low-code engine. + +## Generally available + +The way to start is a free 30-minute demo on your own use cases. Bring an open issue; we assign it to an agent and review the pull request together. After the demo we set up your own Volobox Cloud workspace the same day, with model access we manage, and you use it free for 30 days. When the trial ends you choose a plan and keep working; otherwise the workspace is closed. + +Volobox runs in Volobox Cloud, or on a private cloud or on-premise for Enterprise. Every plan has the full product; plans differ in capacity, not capability. The comparison is on the [pricing page](https://volobox.io/pricing). + +## See it live + +We are preparing an **ABP Community Talks** session on Volobox, in English: an open issue taken to a pull request live, the governance model, and how Volobox is built on ABP. The date and registration link will be announced on the [events page](https://abp.io/community/events). If you are joining [ABP Community Talks 2026.6](https://abp.io/community/events/community-talks/abp-ai-coding-agent-for-every-.net-developer-618qay6o) this Thursday, we will also take five minutes there for a first look. + +- Announcement: [Volobox is generally available](https://volobox.io/blog/volobox-is-generally-available) +- Request a free demo: [volobox.io/demo](https://volobox.io/demo) +- Product: [volobox.io](https://volobox.io) + +Thank you for building with ABP. We hope some of you will build with Volobox too. diff --git a/docs/en/Blog-Posts/2026-10-23-Introduce-Volobox/cover.png b/docs/en/Blog-Posts/2026-10-23-Introduce-Volobox/cover.png new file mode 100644 index 0000000000..af9affb7be Binary files /dev/null and b/docs/en/Blog-Posts/2026-10-23-Introduce-Volobox/cover.png differ diff --git a/docs/en/Blog-Posts/2026-10-23-Introduce-Volobox/volobox-screen.png b/docs/en/Blog-Posts/2026-10-23-Introduce-Volobox/volobox-screen.png new file mode 100644 index 0000000000..fe4eab3624 Binary files /dev/null and b/docs/en/Blog-Posts/2026-10-23-Introduce-Volobox/volobox-screen.png differ diff --git a/docs/en/Community-Articles/2024-07-01-Use_User-Defined_Function_Mapping_For_Global_Filter/POST.md b/docs/en/Community-Articles/2024-07-01-Use_User-Defined_Function_Mapping_For_Global_Filter/POST.md index 37171d1219..c7511bdb95 100644 --- a/docs/en/Community-Articles/2024-07-01-Use_User-Defined_Function_Mapping_For_Global_Filter/POST.md +++ b/docs/en/Community-Articles/2024-07-01-Use_User-Defined_Function_Mapping_For_Global_Filter/POST.md @@ -69,7 +69,9 @@ protected override Expression> CreateFilterExpression() == true) + // Context is null when the query is compiled by EF.CompileQuery or EF.CompileAsyncQuery. + var dbContext = abpEfCoreCurrentDbContext.Context ?? throw new InvalidOperationException("The IIsActive filter cannot be applied to EF.CompileQuery or EF.CompileAsyncQuery."); + if (dbContext.DataFilter.IsEnabled()) { // isActive == true return new SqlBinaryExpression( diff --git a/docs/en/Community-Articles/2026-10-13-volobox-performance-case-study/POST.md b/docs/en/Community-Articles/2026-10-13-volobox-performance-case-study/POST.md new file mode 100644 index 0000000000..3add3e9e83 --- /dev/null +++ b/docs/en/Community-Articles/2026-10-13-volobox-performance-case-study/POST.md @@ -0,0 +1,463 @@ +# Keeping a Fast-Growing ABP Application Fast: What We Learned from Volobox + +At Volosoft we run our own work on [Volobox](https://volobox.io), a workspace where people and AI agents work together. Agents take assigned tasks, answer in chat when someone mentions them, draft documents and run scheduled playbooks. They follow the same permissions as everyone else, and their work goes into the same audit log. The workspace also has projects and tasks, team chat, docs, meetings, support desks and AI coding. + +[Volobox](https://volobox.io) is an ABP application with a React front end, and it moves fast: new features ship every few days. Between mid-August and early October, we added video meetings, calendar sync, booking pages and support desks with a customer portal. We also added a choice of coding agents and coding sessions on your own machines. And it got much faster: between two releases, the home page data took about **90% less time** in a warm API replay against production, and the median replay now finishes in under half a second. In local runs, a page refresh shows the home page in 0.8 seconds, about 70% faster. + +ABP is a big part of why we can build that fast. Its modules, dependency injection, units of work and conventions handle the plumbing, so we spend our time on features. In a few months [Volobox](https://volobox.io) grew to: + +- thousands of C# files and a few hundred application services, +- around a thousand services with interceptors (unit of work, auditing, authorization, ...), +- dozens of background workers, +- one process in production, with Autofac, PostgreSQL and Redis. + +At this size, some costs that are too small to notice in a typical application start to add up. We were preparing to deliver [Volobox](https://volobox.io) to customers, so we spent a few rounds on performance. Besides the home page numbers above, startup got 62% faster in container A/B runs, to about 14 seconds. + +We kept the same database and did not rewrite anything. Here is how we found the costs that had grown with [Volobox](https://volobox.io), and what we changed. + +## How we found the bottlenecks + +Timings are noisy. The same request can be fast or slow depending on what else the process is doing. So we built a few signals that tell us where to look, not only that something is slow. Most of them are small and stay in the product. + +### A runtime line every minute + +A background worker logs one line a minute with what the whole process is doing. A simplified version: + +```csharp +var stopwatch = Stopwatch.StartNew(); +var pauseBefore = GC.GetTotalPauseDuration(); +var allocatedBefore = GC.GetTotalAllocatedBytes(); +var gen2Before = GC.CollectionCount(2); + +await Task.Delay(TimeSpan.FromMinutes(1), cancellationToken); + +// Under load the delay can end late, so divide by the time that really passed. +var elapsed = stopwatch.Elapsed; +var info = GC.GetGCMemoryInfo(); +Logger.LogInformation( + "Runtime saturation: threads={Threads} pending={Pending} gcPause={GcPause:P1} " + + "alloc={AllocMb} MB gen2={Gen2} heap={HeapMb} MB", + ThreadPool.ThreadCount, + ThreadPool.PendingWorkItemCount, + (GC.GetTotalPauseDuration() - pauseBefore) / elapsed, + (GC.GetTotalAllocatedBytes() - allocatedBefore) / 1024 / 1024, + GC.CollectionCount(2) - gen2Before, + info.HeapSizeBytes / 1024 / 1024); +``` + +Ours also logs database pool waits, slow DNS lookups, heap fragmentation and the container's CPU throttling (from the cgroup `cpu.stat` file). The line does not give the answer, but it tells us which tool to pick up next: + +- A high `gcPause` with a low `pending` count points to allocations. More threads will not help, so the next step is an allocation trace. +- Database pool waiters with a low `pending` count point to the connection pool, not the thread pool. +- To tell a leak from churn, compare live objects after full GCs under a similar load. The logged heap size comes from the latest GC and includes fragmentation, so it is only a first hint. If live objects keep growing, follow the references in a heap dump. If they stay flat while `alloc` is high, look for what allocates. + +One caveat for `alloc`: on our .NET 10 host with Server GC, the allocation counter could stay flat for many samples and then catch up at once. We check gen 0 GC counts and allocation traces before reading much into a single minute. + +### The cost of each request on its log line + +The second signal puts three numbers on every request summary line: the GC pause time while the request ran, the thread pool queue length when it started, and how many resolve requests the container served for it. With Serilog's request logging, it is a small middleware that runs inside `UseSerilogRequestLogging`: + +```csharp +public async Task InvokeAsync(HttpContext httpContext) +{ + var pendingAtStart = ThreadPool.PendingWorkItemCount; + var pauseAtStart = GC.GetTotalPauseDuration(); + + // Our own counter, described in the next section. It returns null when counting is off. + using var tally = _resolveCounter.Start(httpContext.RequestServices); + try + { + await _next(httpContext); + } + finally + { + _diagnosticContext.Set("GcPauseMs", (long)(GC.GetTotalPauseDuration() - pauseAtStart).TotalMilliseconds); + _diagnosticContext.Set("ThreadPoolPending", pendingAtStart); + if (tally != null) + { + _diagnosticContext.Set("DiResolves", tally.Count); + } + } +} +``` + +These fields tell us what to check for a slow request. `GcPauseMs` is process-wide: it is the GC pause time that overlapped the request. When it is close to the request's duration, an allocation trace is the next thing to check. A high `ThreadPoolPending` shows that the process had queued work when the request started. A common read in [Volobox](https://volobox.io) makes several thousand resolve requests, so hundreds of thousands means a constructor graph has grown and is worth a look. + +Skip SignalR and other long-lived connections here, or one request gets the cost of hours of hub calls. + +### Counting resolve requests + +The resolve count comes from Autofac's own events. For one service in one scope, it takes a few lines: + +```csharp +var count = 0; +using var scope = lifetimeScope.BeginLifetimeScope(); +scope.ResolveOperationBeginning += (_, operation) => +{ + operation.ResolveOperation.ResolveRequestBeginning += (_, _) => count++; +}; + +scope.Resolve(); +// count is now the number of resolve requests for this one resolve +``` + +The counter in the host does the same per request and per background worker run. It also follows the scopes that a request creates through `IServiceScopeFactory`, because those start from the root container, not under the request's scope. A worker run that makes 20,000 or more resolve requests logs one line with its name, duration and item count. We turn the counter on with a configuration switch, because three event subscriptions per scope are not free under load. + +### Ranking every component by graph size + +To find which service to look at first, we resolved every transient and scoped application component once, each in a fresh child scope, and sorted them by resolve requests. The same event also tells us who asked for each component, which gives the edges of the graph: + +```csharp +static Type Owner(Type type) => + type.Namespace == "Castle.Proxies" && type.BaseType != null ? type.BaseType : type; + +var rows = new List<(long Count, Type Type)>(); +var edges = new Dictionary(); +var failures = new List<(Type Type, string Error)>(); + +var registrations = root.ComponentRegistry.Registrations + .Where(r => Owner(r.Activator.LimitType).Namespace?.StartsWith("MyCompany.MyApp") == true + && !r.Activator.LimitType.IsGenericTypeDefinition + && (r.Sharing == InstanceSharing.None || r.Lifetime is CurrentScopeLifetime)) + .DistinctBy(r => r.Activator.LimitType) + .ToArray(); + +foreach (var registration in registrations) +{ + using var scope = root.BeginLifetimeScope(); + long count = 0; + var componentEdges = new Dictionary(); + scope.ResolveOperationBeginning += (_, operation) => + operation.ResolveOperation.ResolveRequestBeginning += (_, request) => + { + count++; + // While this event runs, the active request is the one that asked for this component. + var parent = operation.ResolveOperation.ActiveRequestContext; + if (parent != null) + { + var edge = $"{Owner(parent.Registration.Activator.LimitType).FullName} -> " + + $"{Owner(request.RequestContext.Registration.Activator.LimitType).FullName}"; + componentEdges[edge] = componentEdges.GetValueOrDefault(edge) + 1; + } + }; + + try + { + // Resolve this registration, not whichever one is the default for its service, + // through the service pipeline so sharing and decorators still apply. + var service = registration.Services.First(); + var serviceRegistration = scope.ComponentRegistry.ServiceRegistrationsFor(service) + .Single(candidate => candidate.Registration.Id == registration.Id); + scope.ResolveComponent(new ResolveRequest(service, serviceRegistration, Array.Empty())); + + rows.Add((count, Owner(registration.Activator.LimitType))); + foreach (var edge in componentEdges) + { + edges[edge.Key] = edges.GetValueOrDefault(edge.Key) + edge.Value; + } + } + catch (DependencyResolutionException ex) + { + // Some components need parameters or runtime state. + failures.Add((Owner(registration.Activator.LimitType), ex.Message)); + } +} + +var rankedRows = rows.OrderByDescending(row => row.Count).ToArray(); +var rankedEdges = edges.OrderByDescending(edge => edge.Value).ToArray(); +``` + +Start with the services at the top of the ranking. The failures tell you which components it could not cover. Then check the edge list for the dependencies that make those graphs large. For a single service, resolve each constructor parameter type on its own to see how much it adds, and check which methods really use it before you make it lazy. + +### Replaying the real page + +To measure the home page, we took the API calls it makes (14 calls in seven groups) from a browser HAR file and replayed them with a small script against production: first all together, the way the browser sends them, then one by one. The script reads the application version first, so every result is tied to a release, and runs ten rounds for a median. Before timing, it calls every API once to warm the connections and the server, so the numbers are warm API replays. They do not include HTML, JavaScript or rendering. We ran it before and after the release with the fix. + +### Allocation traces and heap dumps + +When the signals point to allocations or memory, the .NET diagnostic tools show the source: + +```bash +# What the runtime is doing, live +dotnet-counters monitor -p --counters System.Runtime + +# Which call stacks allocate +dotnet-trace collect -p --profile gc-verbose --duration 00:00:05:00 + +# What is alive: take one dump before the load and one during it, then compare +dotnet-dump collect -p --type Heap -o during.dmp +dotnet-dump analyze during.dmp -c "dumpheap -stat -live" -c exit > during.txt +``` + +Compare two `dumpheap -stat -live` outputs to see which types grow under load. + +### Controlled A/B runs + +For changes that are hard to see in production, we ran the old and the new image one after the other in containers with the production CPU and memory limits (`docker run --cpus 3.8 --memory 8g`), the same seed data and the same simulated users. LLM calls were stubbed so the load stayed the same. For each run we recorded the time until the health check passed, the container's CPU time from the cgroup files, and a heap dump during the load. + +## The six bottlenecks + +We found six bottlenecks: + +| # | Where | What we saw | What we changed | Result | +|---|---|---|---|---| +| 1 | Constructor graphs | One application service resolve triggered hundreds of thousands of resolve requests | `Lazy`, keyed services, a budget test | Home page data −90% (production replay), all APIs p50 −30% (production, whole round) | +| 2 | After-commit work | One long operation held thousands of live scopes | Carry values, open a scope when the work runs | Live scopes −99%, heap after full GC −22% (lab, whole round) | +| 3 | Transactions | A page-long connection and a minute-long request held a transaction the whole time | A rule for hub routes, a separate non-transactional unit of work | Preview start peak CPU −87% (local, whole round) | +| 4 | Background workers | Workers built all their services before they knew there was work | Check first, build only when needed | Resolve requests per run −99% (local) | +| 5 | Startup | Cold connections and controllers, around a thousand proxy classes in one dynamic module | Warm up before ready, 16 proxy modules | Startup −62% (lab, whole round), first calls −97% (p50, local, whole round) | +| 6 | Front end | Six startup requests in a row and a large static JavaScript bundle | Inline runtime config, static outline, token reuse, on-demand loading, IndexedDB | Refresh −70% (local) | + +"Production replay" is the home page replay above. "Local" means local tests and page replays. "Lab" means the container A/B runs above. "Whole round" means the number compares two builds that differ in more than this one change. + +## 1. Constructor graphs + +### The problem + +Every HTTP request builds the constructor graph of the application service it calls, before the first line of the method runs. A transient service that is reached along ten different paths is built ten times. In a small application this is nothing. With hundreds of services that depend on each other, the cost multiplies. + +When features are added quickly, the graph grows in a natural way: + +- an application service injects another application service for one method, +- a registry takes `IEnumerable` and builds every provider in its constructor, +- a shared service (push notifications, code host providers, an agent tool catalog) is injected into many classes that use it on one path, +- something that runs for every `DbContext` or every save brings a bigger graph than it needs. + +Each of these is a reasonable choice on its own. Together, one `IProjectRequestAppService` resolve had grown to hundreds of thousands of resolve requests, and resolving every [Volobox](https://volobox.io) component once came to tens of millions. + +We found it from the runtime line: the GC pause stayed high while only a few requests were running. Allocation traces put most allocations under Autofac activation, and the component ranking gave the list of services and the edges that made them big. + +### Resolve dependencies only when they are needed + +A dependency that only some methods use becomes `Lazy`. Autofac supports it out of the box, and ABP's `LazyServiceProvider` does the same for base class properties. The example uses small, illustrative types: + +```csharp +public class ReportAppService : ApplicationService +{ + private readonly IReportRepository _reportRepository; + private readonly Lazy _exporter; + + public ReportAppService( + IReportRepository reportRepository, + Lazy exporter) + { + _reportRepository = reportRepository; + _exporter = exporter; + } + + public virtual async Task ExportAsync(Guid id) + { + // Only this method pays for the exporter's graph. + var report = await _reportRepository.GetAsync(id); + return await _exporter.Value.ExportAsync(report); + } +} +``` + +`Lazy` only defers the cost. When one application service calls another just to reuse some logic, the better fix is to move that logic into a domain service, as ABP's [application service best practices](https://abp.io/docs/latest/framework/architecture/best-practices/application-services) recommend. + +A registry takes `Lazy>` and builds its index on first use, or resolves one implementation by key with a keyed service. Enumerating all three code host providers (GitHub, GitLab, Azure DevOps) cost about 2,000 resolve requests per scope. Resolving only the one we need costs a few. + +Two more costs came with `DbContext`, and we took a different path for each. In [Volobox](https://volobox.io)'s Identity Pro setup, the compiled-query cache key now comes from a small provider that reads the same values directly, which saved about 570 resolve requests for every `DbContext`. The first save on a `DbContext` built the audit store, even outside an audit scope. Now it is resolved only when a log is written, which saved about 120 resolve requests per `DbContext`. + +Resolving every [Volobox](https://volobox.io) component once now takes about 95% fewer resolve requests. In the production replay, the home page data took about 90% less time (median of 10 rounds), the median now finishes in under half a second, and each of its seven groups of calls dropped by about 90%. + +The production logs showed the same trend across all API requests. We compared the daytime hours before and after a later release in this round. In those hours, the median (p50) response time dropped by 30% to about 38 ms, and the 90th percentile (p90) dropped by 26%, while the request rate grew by 57%. Resolve requests per request were cut in half, and CPU per request dropped by about 30%. That release also carried other changes, so this is a whole-round number. + +To keep it that way, we added a test that resolves the services we call most and fails when a graph grows past its budget: + +```csharp +[Theory] +[InlineData(typeof(IProjectTaskAppService), 5_000)] +[InlineData(typeof(IConversationAppService), 10_000)] +[InlineData(typeof(IPullRequestAppService), 6_000)] +public void Resolving_a_busy_service_stays_within_its_graph_budget(Type serviceType, int budget) +{ + CountResolveRequests(serviceType).ShouldBeLessThanOrEqualTo(budget); +} +``` + +The budgets are well above today's graphs. If a test fails, we look for a new eager dependency that pulls in a large graph, and we catch the cost before it reaches production. + +## 2. After-commit work + +### The problem + +[Volobox](https://volobox.io) leaves some work for after the commit, such as push notifications. A local event handler in ABP runs in its own short scope, which ends when the handler returns, and the unit of work commits later. So an after-commit callback must not rely on services from the handler's scope. This is easy to miss with `Lazy`: on first access, it resolves its value from the scope that created the object holding it: + +```csharp +public async Task HandleEventAsync(TaskAssignedEvent eventData) +{ + _unitOfWorkManager.Current.OnCompleted(async () => + { + // Runs after the commit. This handler's scope may be disposed by now. + await _pushNotifier.Value.SendAsync(eventData.AssigneeId); + }); +} +``` + +Our first answer was to keep each handler's scope alive until the unit of work ended. Each kept scope holds its own objects, and in a long operation that publishes many events, one request ended up holding thousands of live scopes. We found it by comparing heap dumps taken before and during a load: the number of `LifetimeScope` objects grew with the number of events the operation published. + +### Carry values and open a fresh scope + +Carry values, not services, and open a fresh scope when the work runs. The event and notifier types here are illustrative: + +```csharp +public class AfterCommitScope : ISingletonDependency +{ + private readonly IServiceScopeFactory _scopeFactory; + + public AfterCommitScope(IServiceScopeFactory scopeFactory) + { + _scopeFactory = scopeFactory; + } + + public async Task RunAsync(TState state, Func work) + { + await using var scope = _scopeFactory.CreateAsyncScope(); + await work(scope.ServiceProvider, state); + } +} + +// In the handler: copy the values first, so the callback holds neither the handler nor the event. +var assigneeId = eventData.AssigneeId; +var afterCommitScope = _afterCommitScope; + +_unitOfWorkManager.Current.OnCompleted(() => afterCommitScope.RunAsync( + assigneeId, + static (services, id) => services + .GetRequiredService() + .SendAsync(id))); +``` + +The new scope does not change the ambient unit of work or tenant. Work that writes to the database starts its own unit of work with `requiresNew: true`. If the handler switched tenants, carry that tenant in the state too. + +In the lab A/B run of this round, a heap dump taken while previews were starting held 99% fewer live `LifetimeScope` objects. While all three previews were still running, the heap after a full GC peaked 22% lower. + +## 3. Transactions + +### The problem + +Most [Volobox](https://volobox.io) requests are short API calls. Two kinds are not. + +**SignalR hub connections.** [Volobox](https://volobox.io) keeps one SignalR connection per browser tab. In our HTTP/2 setup, a hub connection arrives as a `CONNECT` request that lasts as long as the page, and a transaction opened for it stays open just as long. We found one by listing open transactions during a browser test: + +```sql +SELECT pid, state, now() - xact_start AS age, left(query, 80) +FROM pg_stat_activity +WHERE state = 'idle in transaction' +ORDER BY age DESC; +``` + +**Long-running requests.** Starting a preview environment for a coding session can take minutes, and most of that time is spent waiting for other systems. The request held its transaction the whole time, and a few steps did work that grew with the number of steps (a large setup log write, large file buffers). A local run kept more than one CPU core busy and ran dozens of gen 2 GCs a minute. Its request line showed a long request with a high resolve count, and a `gc-verbose` trace of the same run showed where it allocated. + +### A transaction rule for each kind of request + +We gave the hub routes an explicit non-transactional rule, separate from ordinary API requests. ABP lets an application replace its transaction behavior provider for this: + +```csharp +[Dependency(ReplaceServices = true)] +[ExposeServices(typeof(IUnitOfWorkTransactionBehaviourProvider), typeof(AspNetCoreUnitOfWorkTransactionBehaviourProvider))] +public class HubUnitOfWorkTransactionBehaviourProvider : AspNetCoreUnitOfWorkTransactionBehaviourProvider +{ + private readonly IHttpContextAccessor _httpContextAccessor; + + public HubUnitOfWorkTransactionBehaviourProvider( + IHttpContextAccessor httpContextAccessor, + IOptions options) + : base(httpContextAccessor, options) + { + _httpContextAccessor = httpContextAccessor; + } + + public override bool? IsTransactional => + _httpContextAccessor.HttpContext?.Request.Path.StartsWithSegments("/signalr-hubs") == true + ? false + : base.IsTransactional; +} +``` + +For the preview start, the application service method turns off its automatic unit of work and opens a separate, non-transactional one for the preview flow. A simplified version: + +```csharp +[UnitOfWork(IsDisabled = true)] +public virtual async Task StartPreviewAsync(Guid sessionId) +{ + using var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: false); + var result = await StartPreviewCoreAsync(sessionId); + await uow.CompleteAsync(); + return result; +} +``` + +The attribute alone only covers this method. The explicit `requiresNew` unit of work is what keeps the long flow out of the request's unit of work. Together with smaller setup log writes and file buffers, the peak CPU of the same local preview start fell by about 87% across that round, with almost no gen 2 GCs. + +## 4. Background workers + +### The problem + +Background workers are easy to forget, because nobody waits for them. In a single process they share the CPU with requests. + +Our pull request status worker runs every 15 minutes. It read the newest 200 merged pull requests, loaded their links one by one, and built its notifier and coordinator before it checked whether any task needed to change. Our queue workers sleep until something is written for them, but built their dependencies before they waited. + +We found these by searching the worker log lines for runs with high resolve counts. + +### Check for work before building anything + +We changed the workers to check for work before building their services. The pull request status worker now asks the database one question first ("which merged pull requests still have open linked tasks?"), and builds the heavy services only when the answer is not empty. In a local run with a small test set, that cut its resolve requests by more than 99%. Our issue sync, with 10 issues, made 89% fewer. + +The queue workers now wait for their signal first and build their dependencies after it. Across this round of background-work and dependency changes, CPU on an idle local host dropped by 40%. + +## 5. Startup + +### The problem + +A fresh process has cold database connections and has not built its controllers yet, so the first users after a deploy pay for both. Right after a deploy, the runtime line showed many new database connections in the first minute, and the first call to each home page API took much longer than the second. + +Startup itself was long too. An EventPipe CPU sampling trace of a starting host showed proxy type generation near the top. Castle DynamicProxy keeps generated classes in a dynamic module, and generating a new class gets slower as that module grows. Generating proxies in batches of 50 showed each batch getting slower than the one before, and [Volobox](https://volobox.io) has around a thousand proxy classes. + +### Warm up before ready, and spread the proxies + +- **Warm up before reporting ready.** Before the host tells the orchestrator it is ready, it opens a batch of database connections, runs the first queries and builds the controllers the home page needs. Locally, across that round of changes, the first calls to 30 home page APIs got about 97% faster (p50). The host reports ready a bit later, and these first-request costs move into startup. +- **Spread the dynamic proxies.** We spread the proxies over 16 dynamic modules. In the lab, this change alone made the host ready 57% sooner. With the rest of that round, startup got 62% faster and used 57% less CPU, in containers with the same limits. + +## 6. The front end + +### The problem + +A HAR file of a page refresh showed six configuration and sign-in requests running one after another before anything appeared, one of them only to read the runtime configuration. A bundle report from the Vite build showed the first page loading several megabytes of statically imported JavaScript (gzip), and the import chain behind each large module. + +### Draw the page first, and fetch less + +- The host writes the runtime configuration into the HTML, so the page does not fetch it. +- The page draws the outline of the workbench (top bar, sidebars, home cards) in plain HTML before the React app starts. +- A refresh in the same signed-in tab reuses its valid access token, and the OIDC discovery document is cached, so the sign-in round trips are gone from a normal refresh. +- Pages, editors and language files load on demand. This step cut statically imported JavaScript by about 60% (gzip). The active language loads first, and the English fallback loads in the background. +- Home page data is kept in IndexedDB for each user, cleared on sign-out, and shown at once, then refreshed from the server. + +A Playwright script with a simulated network delay timed the first paint, the greeting and the first task card for each change. With a 300 ms simulated delay and gzip, a normal refresh now shows the home page in 0.8 seconds, about 70% faster. + +## A short checklist + +- Log a runtime line every minute, and put GC pause, thread pool queue and resolve count on every request line. +- Count Autofac resolve requests per request and per worker run. Rank components by graph size, and put a budget test on your most-used services. +- Inject only what a class uses. Make a dependency that only some methods use `Lazy`. +- Do not inject `IEnumerable` when a call needs only one implementation. Use keyed services, or `Lazy>` when only some calls need them all. +- Work left for after the commit carries values and opens its own scope. +- Check the unit of work and transaction behavior for long-lived connections and requests that take minutes. +- Make a background worker check whether there is work before it builds anything. +- Warm up database connections and the controllers the home page needs before reporting ready. + +We used production logs to find the problems. The home page numbers come from replaying the home page's API calls against production before and after a release, and the all-API numbers come from production logs before and after a later release. The other numbers come from local and lab A/B runs, so they show the direction and the size of each change, not exact production values. + +## About [Volobox](https://volobox.io) + +In [Volobox](https://volobox.io), a team plans projects on boards and milestones and assigns tasks to people or agents. People chat, edit docs and sheets together, share files, hold meetings and sync their calendars. Support desks come with a portal where customers follow their tickets. + +For coding work, an agent takes a task to a pull request while you watch the session live. Sessions run in isolated sandboxes or on your own machines. You can pick OpenCode, Cursor or Codex, or use Claude Code with your own subscription on your own machine. + +Agents use skills, library packs, MCP and custom apps, and run in scheduled and triggered workflows. Sensitive actions wait on approval cards, budgets and rate limits keep usage in check, and the audit log can be exported. + +[Volobox](https://volobox.io) Cloud is the default. Business plans can run on dedicated infrastructure, and Enterprise can run on a private cloud or on-premise, with model endpoints inside your own network. + +[Volobox](https://volobox.io) is now generally available. Any team can request a demo at [volobox.io](https://volobox.io), get a workspace the same day and use it free for 30 days. diff --git a/docs/en/Community-Articles/2026-10-13-volobox-performance-case-study/cover.png b/docs/en/Community-Articles/2026-10-13-volobox-performance-case-study/cover.png new file mode 100644 index 0000000000..a818e4e3c1 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-13-volobox-performance-case-study/cover.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/MyTalk.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/MyTalk.png new file mode 100644 index 0000000000..74c43f0ee6 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/MyTalk.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/Post.md b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/Post.md new file mode 100644 index 0000000000..dc98e14905 --- /dev/null +++ b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/Post.md @@ -0,0 +1,885 @@ +# A Speaker’s Perspective: WeAreDevelopers World Congress North America 2026 (Lots Of AI) + +![image-20261014024659737](image-20261014024659737.png) + +I’ve been to quite a few developer conferences over the years but this one was a little different: **WeAreDevelopers World Congress had arrived in North America for the first time.** I traveled from Istanbul to San Francisco which took 14 hours of flying. It was exhausting but it worth. Conference was 2 days plus 1 day pre-conf. The dates are September 23–25, 2026. Host venue was San Jose McEnery Convention Center. + +The location was San José, in the heart of Silicon Valley and the scale was impressive. As I learnt the first day 9.000 developers registered and took their badges. AI builders, architects and technology leaders came together for three days of talks, workshops, networking and probably more technical conversations than anyone could keep track of. + +I was there as one of the speakers, so here are some impressions from the conference, this time from both sides of the stage 😊 + +![image-20261009193336745](image-20261009193336745.png) + +## San José, Heart of Silicon Valley + +One thing WeAreDevelopers does very well is scale. This isn’t the kind of conference where you walk into a single hall, watch ten talks, drink a few coffees and go home. Almost **10.000 attendees** came to the conf. More than **600 speakers**... **8 stages** were running in parallel alongside workshops, expo areas, networking spaces and even an outdoor stage and lounge. +And, of course, in 2026, you can probably guess the main topic: + +> **AI... Lots of AI 🙂** + +As I see, the conversations are going beyond “**look what an LLM can do**.” now. We're not surprising anymore about LLMs capabilities. +The next important questions are: + +* **How do we actually put AI into production software?** +* **How much does it cost?** +* **Is it secure?** +* **Who's responsible for the AI made results?** +* **How much effort do humans and AI expend?** +* **When will human take part if AI is doing everything?** +* **While indeterministic AI agents are writing code, how can we make more deterministic apps?** +* **Are sandboxes getting more more important?** + +![image-20261009195239178](image-20261009195239178.png) + +> *We've reached a point where none of us truly understands the internals of our own software anymore!* + +Sessions covered AI agents, AI-generated software, security for autonomous systems, testing non-deterministic behavior, developer infrastructure, data and software architecture. + +That shift feels important. The industry is no longer only experimenting with AI. Developers are trying to figure out how to make it: + +* **reliable** +* **secure** +* **maintainable** +* **really useful** + +## My Talk: Chat with Your Data + +My session was on Stage 6 on Friday 09:40. It was the first time the audience listened to me via headphones while I was speaking on stage. It was a somewhat interesting experience. :) And I made this talk before in different countries but the USA audience was very interested in my topic. They asked many questions after the session. The conversations continued even after the talk and I made some new friends there. + +![MyTalk](MyTalk.png) + +### Being a speaker creates a funny problem at conferences + +Before your session, a small part of your brain is always thinking about your slides, your demo and all the things that could theoretically go wrong. After the talk, suddenly the conference becomes much more relaxing. 🙂 + +And there was a lot to choose from. + +The speaker lineup included people such as Thomas Dohmke (**former GitHub CEO**), Mark Cavage (President of **Docker**), Erran Berger (CTO of **LinkedIn**), Amjad Masad (**Replit** CEO), Kelsey Hightower (**Google** Distinguished Engineer), Justin Boitano (VP of **NVIDIA**), Prashanth Chandrasekar (CEO **StackOverflow**), Eric Simons (Founder **Bolt.New**), Neel Sundaresan (General Manager AI Products **IBM**). + +![image-20261009195303929](image-20261009195303929.png) + +## The Best Part Is Still the People + +Technology conferences are supposedly about technology. +But after attending enough of them, I think the real value is often somewhere **between the sessions**. +You meet somebody after your talk. +A five-minute conversation becomes thirty minutes. +Someone tells you how they solved a problem completely differently. +Someone has been using a project you’ve worked on for years. +Or you finally meet someone you’ve known online for a long time. +With more than 10,000 people in the same place, there were plenty of opportunities for those accidental conversations. +And those are usually the moments I remember much longer than individual slides or keynotes. + +![image-20261009195315021](image-20261009195315021.png) + +## WHAT I LEARNT FROM THE TALKS + +[Jeff An](https://www.linkedin.com/in/jeff-an/) Co-founder of **Momentic.ai** → *How to Trust Code You Didn't Write*: + +> A model reviewing its own work tends to overlook the same mistakes. +> says benchmarks showed that a leading coding agent detected only 15% of the bugs it had introduced. +> So, we should avoid assigning the same agent to both write and review the code. + +[Julia Furst Morgado](https://www.linkedin.com/in/juliafmorgado/) from **Dash0** → *Your Agents Need Observability Before They Need Better Models*: + +> Your Agents Need Observability Before They Need Better Models + +[Himraj Singh](https://www.linkedin.com/in/himraj-singh-5048a266/) from **PayPal** → *Who Tests the AI?*: + +> The same inputs can now produce different outputs, making traditional testing necessary but far from sufficient. + +**Milestones of the Software Development** + +Procedural Programming → Object-Oriented Programming → Frameworks & Design Patterns → Microservices → Cloud-Native & Serverless → Agentic Software Engineering + + + +## Manufacturing Trust: Speed and Safety in the Age of Agents 🧑 Mark Cavage, President of Docker + +![image-20261008194727172](image-20261008194727172.png) + +AI agents can dramatically accelerate software development but they need deterministic security boundaries, explicit permissions and reproducible environments to operate safely at scale. + +![bf6c9bb8-5869-46ca-9d58-5096e9de3a93](bf6c9bb8-5869-46ca-9d58-5096e9de3a93.png) + +#### Takeaways + +- Sandboxing should be the default. Docker advocates microVM-based isolation so agents can operate freely inside their environments without gaining access to sensitive host systems. +- Permissions must be deterministic. Remove dangerous capabilities rather than repeatedly asking the model to behave responsibly. +- Successful task completion isn't enough. Agents must achieve their goals while staying within their intended authorization boundaries. +- Agent teams need engineering processes. Multiple collaborating agents require clearly defined roles, responsibilities, handoffs, reviews and approval gates. +- Portability and reproducibility are essential. Agent environments should work consistently across developers' laptops, teams and cloud infrastructure. + +**The 4 Requirements of an AI Agent Factory** + +![image-20261008193826119](image-20261008193826119.png) + +The following images are retrieved from https://www.docker.com/blog/coding-agent-horror-stories-the-29-million-secret-problem/. And finally the secrets are being encoded and the malware commits it to your public GitHub repo. 2349 secrets leaked. Stolen GitHub tokens made 5.500 private repos as public + +![img](https://www.docker.com/app/uploads/2026/07/image2-1.png) + +**Docker's Products:** + +- **Docker SBX**: Free local microVM-based sandboxing for autonomous agents. https://www.docker.com/products/docker-sandboxes/ +- **Docker Sandbox Kits**: Reproducible specifications for agent environments, models, MCP tools, networks and permissions. https://www.docker.com/blog/docker-sandbox-kit-spec/ +- **Docker Cloud Sandboxes**: Cloud-hosted sandboxes using the same configuration and security approach as local environments. https://agentic-platform.docker.com/ + +**Actionable Insights** + +1. **Audit your current AI agent permissions:** Identify which agents can access repositories, production systems, customer data, credentials and external APIs. Eliminate unnecessary access. + +2. **Introduce sandboxing for coding agents:** Test isolated environments for Claude Code, Codex or other coding agents. **Avoid mounting** sensitive host resources into agent environments. + +3. **Design a structured multi-agent development workflow:** Define separate responsibilities for planning, implementation, testing, security review and final human approval. + +4. **Standardize environments across the team:** Store agent configurations, policies, tools and dependencies in version-controlled files to make workflows reproducible. + +5. **Measure trust alongside productivity:** Track not only completed tasks and development speed but also permission violations, human interventions, security incidents, token costs and escaped defects. + +6. **Capture organizational knowledge through agents:** Experiment with turning successful development workflows into reusable skills, while requiring approval before sharing sensitive organizational knowledge. + +For example, in the following example, even if the Builder Agent installs an infected NPM package, the malicious software cannot read emails and CRM records. Naturally secure! In software development this approach is called "**Principle of Least Privilege**". + +![image-20261008195346170](image-20261008195346170.png) + +![image-20261008200008969](image-20261008200008969.png) + +**Nvidia Unveils AI Agent Safety Platform With Hardware-Based Watchdog** + +Nvidia introduces 2 solutions: + +1. **OpenShell**: An open-source software. Isolates AI agents and controls their permissions and API access. https://github.com/NVIDIA/OpenShell +2. **Sentry**: Hardware-backed security software. Runs on NVIDIA BlueField-4 DPU to provide independent security monitoring and enforcement.![image-20261014003620685](image-20261014003620685.png) + +--- + + + +## AI Decision Observability: Enabling Transparency and Trust in Intelligent Systems + +🧑**Speakers:** Amjad Shaikh (VP Platform ServiceNow) + +![image-20261009150813966](image-20261009150813966.png) + +### Key takeaways + +- AI decisions require different levels of control. Automatically **routing a support ticket** is fundamentally different from **rejecting a loan application**. + + > Autonomy should depend on risk, impact and reversibility. +- Traditional logs are insufficient. Knowing what an AI system did is not the same as understanding **why it made a particular decision**. +- Organizations must know which **information**, **model version**, **configuration** and **policies** made an AI decision. +- AI performance must be measured against business outcomes. A technically correct prediction can still produce a poor business result. So what should we measure in terms of business outcome? + + | Metric | Business outcome | + |---------------------|-----------------------------| + | Prediction accuracy | Revenue uplift | + | Tasks completed | Net time saved | + | Code generated | Maintenance cost | + | Response speed | Customer satisfaction | + | Automation rate | Cost per successful outcome | + +- **As the world changes, AI models degrade**. Continuous monitoring for data and concept drift is necessary after deployment. +- Accountability remains with the organization. Delegating a decision to AI does not transfer legal or operational responsibility to the model. + +![image-20261009152831092](image-20261009152831092.png) + +### AI Decisions Factors + +When should we use human in the loop? When should we allow AI agent to perform? + +![image-20261009151732552](image-20261009151732552.png) + +### Three Layers of AI Decision Observability + +![image-20261009152024726](image-20261009152024726.png) + +1. **Capture**: Record decisions, inputs, data lineage, model versions, policies and configurations at decision time. + +2. **Interpret**: Analyze feature influence, decision robustness, model drift and potential causal relationships. + +3. **Govern**: Preserve tamper-evident evidence, enforce accountability and support audits and investigations. + +**Practical Example: An AI Sales Agent recommends a 20% discount to a potential customer.** + +1. **Capture: What happened?** + Which customer received the offer? What data and AI model were used? What discount policies applied? +2. **Interpret: Why did it happen?** + The AI recommended 20% because similar customers converted with discounts. But what if this customer was already willing to pay full price? +3. **Govern: Can we defend it?** + What if the AI offered 40% when company policy allows a maximum of 25%? Who approved it and why wasn't it blocked? +4. **Business Impact: Did it create value?** + The AI may have increased conversion rates but reduced profit margins by offering unnecessary discounts. + +> An AI decision can be technically correct, explainable and compliant, yet still produce a poor business outcome. + + + +### Practical Implementation Checklist + +✔ **Figure out what decisions your AI is making and how risky they actually are.** Some mistakes are easy to fix, others can cause serious problems. +✔ **Be clear about what AI can handle on its own** and what still needs a human to sign off. +✔ **Log what goes into each AI decision, what comes out,** which model was used and what information it relied on. You'll thank yourself later. +✔ **Don't just track AI accuracy.** Look at whether it's actually improving things like resolution times, customer satisfaction or costs. +✔ **Keep an eye on how your AI behaves in production**. Models can get worse over time, especially when the data changes. +✔ **Test how AI decisions would change under different scenarios** and check for potential bias when those decisions affect people. +✔ **Keep sensitive logs and decision records secure.** Make sure you know who can access them and how long they're stored. +✔ **Decide which information sources your AI should trust first.** You don't want it treating some random outdated document as the ultimate source of truth. + +--- + +## Building the Agentic Software Factory + +🧑**Speakers:** Thomas Dohmke (Founder of [Entire.io](https://entire.io/)) and Matan Grinberg (Cofounder of [Factory.com](https://factory.com/)) + +Before starting let's learn this term: **Agentic Software Factory**. AI-powered software development system where autonomous AI agents collaborate to design, build, test, deploy and maintain software applications with minimal human intervention. + +AI coding agents are cool but the real revolution isn't getting Claude or Codex to write more code. It's building an entire software development system that can plan, code, test, review, deploy and improve products with minimal human intervention. + + + +![image-20261009153157480](image-20261009153157480.png) + +[Entire](https://entire.io/) is created by Thomas Dohmke the former CEO of GitHub and it focuses on AI Agents + Human collaboration in software development. + +![image-20261009152937844](image-20261009152937844.png) + + + +## Key takeaways + +- **We're moving from AI coding assistants to autonomous software factories.** Instead of developers prompting agents for individual tasks, the goal is a continuous loop that turns customer feedback, incidents and product requirements into deployed improvements. + +- **Developers will increasingly build the factory, not just the software.** Engineering shifts toward designing workflows orchestrating agents, establishing quality controls and deciding what deserves human attention. + +- **AI-generated PR spam is a real problem.** Agents can generate hundreds of pull requests but humans can't realistically review them all. More generated code doesn't automatically mean more delivered value. + +- **Full autonomy is technically possible today but business readiness is another story.** New projects can be designed for autonomous development. Legacy enterprise systems are much harder because of complexity, security, compliance and organizational processes. + +- **Token economics matter.** Spending $5,000 on AI tokens to complete a task a developer could finish in five seconds is obviously ridiculous. Successful factories will optimize for business outcomes, not agent activity. + +- **Human oversight isn't disappearing.** The goal is to automate routine checks and low-risk changes while keeping engineers involved in critical architectural, security and product decisions. + +- **Developers aren't necessarily going away but their jobs are changing:** Curiosity, problem-solving, initiative and adaptability may matter more than years spent mastering a particular programming language. + +### Key Takeaways + +- **Build an agent workflow, not just a prompt library.** Define the inputs, expected outputs, tools, tests, review criteria and conditions for escalation to a human. + +- Introduce **risk-based auto-merging**. Allow well-tested, low-risk changes to merge automatically in a controlled pilot. Require human approval for security-sensitive, architectural and business-critical changes. + +- **Measure ROI (Return on Investment) instead of token consumption.** Track engineering hours saved, cost per accepted PR, deployment frequency, defect rates and review time. + +- **Connect agents to real customer signals.** Support tickets, telemetry, bug reports and feature requests should feed a prioritized engineering pipeline, not just sit in separate dashboards. + +- **Make failures improve the factory.** When an agent makes a mistake, add a regression test, architectural rule or automated check so the same mistake is less likely to recur. + + +--- + +## I Don't Trust AI Agents (And Neither Should You): Building Production-Ready Architectures + +🧑**Speakers:** Darko Mesaros (Distinguished Developer Advocate AWS) + +![image-20261009155220391](image-20261009155220391.png) + +The problem isn't that AI agents make mistakes. It's that developers give them too much freedom without building proper controls around them. + +The industry is spending a ridiculous amount of energy making agents smarter, while a lot of production problems are really about controlling what agents are allowed to do. + +The most useful idea in this talk isn't another fancy agent framework. It's treating the LLM as an untrusted component inside an otherwise well-engineered system. + +And I especially liked the point about not giving one giant agent 150 tools and hoping a massive system prompt will keep everything under control. + +- Don't trust agents to behave correctly just because you've written good system prompts. +- Build multiple security layers around agents: guardrails, steering, tool authorization, deterministic policies and observability. +- Never let an LLM decide who has access to sensitive data. Authorization belongs in your backend. +- High-risk operations should be blocked or require human approval. +- Avoid building one giant agent with 150 tools. Use specialized subagents with granular permissions. +- Trust the architecture surrounding the agent, not the agent itself. + +![image-20261009182127593](image-20261009182127593.png) + + + +### 1. Prompt engineering is not security + +You can tell an agent "*Never refund more than $500*" but that **doesn't guarantee it will obey**. + +He identifies three failure modes: + +- **Says something wrong:** Hallucinates information or promises something it cannot deliver. +- **Does something wrong:** Refunds money, deletes data or accesses the wrong customer's account. +- **Gets manipulated:** Prompt injection causes unintended behavior. + +The solution is defense in depth: several independent protection layers rather than trusting the LLM. + +### 2. Steering agents act as reviewers + +**A steering agent is a second LLM** that evaluates the main agent's response before it reaches the customer. + +For example, if the agent claims to have created a shortened return-label URL that it cannot actually generate, the steering agent rejects the response and provides corrective guidance. + +> You don't necessarily need a smarter main model. Sometimes adding an independent reviewer is more effective. + +### 3. Never trust LLM-generated tool parameters + +This is probably one of the most important technical points. + +Imagine a customer asks: + +> Show me order #67890. + +The LLM should not be trusted to determine whether that customer owns the order. + +Instead: + +- Authenticate the customer outside the LLM. +- Inject the authenticated customer ID into MCP calls using an interceptor. +- Enforce authorization deterministically in the backend. +- Return only data that customer is permitted to access. + +### 4. Put policy enforcement in front of tools + +The speaker demonstrates the [Dogwood policy language](https://aws.amazon.com/blogs/opensource/introducing-dogwood-runtime-verification-for-ai-agents/) to enforce business rules before MCP tools execute. This is an open-source AI security framework created by AWS https://github.com/dogwood-policy + +Examples: + +| Rule | Enforcement | +| ------------------------ | ------------------------------------- | +| Refund/return above $500 | Requires human review | +| Return label generation | Eligibility check must run first | +| Return eligibility | Must satisfy the 30-day return window | +| Customer order lookup | Must respect customer identity | + +The particularly interesting part is temporal policies. + +For example, the `generate_return_label` tool cannot execute unless `check_return_eligibility` has successfully run within the previous hour. That's much stronger than asking an LLM to remember the correct workflow. + +### 5. Observability is essential + +Production agents need more than basic application logs. + +The speaker recommends tracking: + +- Agent decisions and tool calls +- Tool selection accuracy +- Parameter selection accuracy +- Task success rates +- Harmful or incorrect outputs + +He also recommends periodically evaluating historical conversations, especially after changing prompts, models or tools. + +The key point: An agent's behavior can change even when your business logic hasn't. + +### 6. One giant agent is usually a bad architecture + +In the Q&A, Darko highlights a common mistake: building one agent with a huge prompt and access to 150 tools. + +Instead, use specialized agents with limited responsibilities. + +For example: + +- Returns Agent +- Customer Account Agent +- Order Status Agent + +Each agent should receive only the tools and permissions it needs. + +This makes agents easier to secure, evaluate and debug. + +![image-20261009182139355](image-20261009182139355.png) + +**Security Layers Architecture** + + + +![image-20261009182212869](image-20261009182212869.png) + +![image-20261009182259531](image-20261009182259531.png) + + + +![image-20261009182348881](image-20261009182348881.png) + +## Most interesting + +- The MCP Gateway becomes a security boundary. It's not just a convenient integration layer. It can enforce identity, tool access and policies independently of the model. +- Temporal policies are underrated. Enforcing what must happen before an action is a powerful way to control agent workflows. +- The speaker is essentially advocating traditional software engineering. Authentication, authorization, least privilege, logging and separation of responsibilities still matter. LLMs don't eliminate those requirements. +- Subagents are not just for better reasoning. They're also a way to isolate permissions and limit damage. + + + +--- + + + +## Securing AI Agent Infrastructure: Identity, Attestation and Trust at Scale + +🧑**Speaker:** Abdel Fane (Founder OpenA2A) + +![image-20261014004734473](image-20261014004734473.png) + +AI agents should be secured through infrastructure, not system prompts, because LLMs are unpredictable and vulnerable to prompt injection. The speaker recommends three essential security layers: + +1. **Identity** (every agent needs a verifiable identity tied to its owner) + +2. **Capabilities** (strict permissions defining exactly what tools, data and actions an agent can access) + +3. **Audit Trails** (tracking every action, including blocked attempts). + + + +He demonstrates how a malicious website can trick an AI agent into leaking sensitive information, while deterministic tool-level permissions can prevent it. + +> Treat agents like users with their own identities, enforce least-privilege access outside the LLM and log every action. Never rely on prompts alone to protect production systems. + +--- + +## Zero-Trust Architecture for Agentic AI: Securing Multi-User Access and Third-Party + +🧑**Speakers:** Borko Djurkovic (Member of Technical Staff Cohere) + +![image-20261014005347668](image-20261014005347668.png) + +AI agents must operate under Zero-Trust security principles, especially in multi-user enterprise environments. The speaker highlights three critical areas: + +1. **User authorization:** Combine RBAC (Role-Based Access Control) with ReBAC (Relationship-Based Access Control, using tools like OpenFGA) to control exactly which agents, models and tools each user can access. + +2. **Secure third-party integrations:** Use OAuth, delegated credentials and controlled MCP tool access so agents never exceed the permissions of the users they represent. + +3. **Secure RAG:** Remove sensitive information before indexing documents and enforce document- or chunk-level permissions during retrieval. + + > An agent must inherit the user's permissions, not bypass them. Every tool call and retrieved document should be independently authorized, regardless of what the LLM decides to do. + + + +--- + +## Give the Agent a Budget, Not a Token + +🧑**Speakers:** Sachin Malhotra (Platform Engineer Anthropic) + +![image-20261014010315592](image-20261014010315592.png) + +AI agents shouldn't receive unlimited permissions, even when performing legitimate tasks. Instead, give them controlled budgets for what they can do, how often and with what level of risk. Sachin Malhotra from Anthropic shares **a real incident where Claude accidentally deleted 200 workloads** belonging to 20 engineers in just 90 seconds. He recommends rate limits (restrict destructive actions per hour), asymmetric permissions (allow low-risk actions but require approval for dangerous ones), tripwires (monitor unusual behavior) and the Undo Test (if an action cannot be safely reversed, require human approval). Crucially, permissions must be enforced by infrastructure using independently verified agent identities, not prompts or agent-controlled credentials. + +> Give every agent its own identity, enforce action limits, monitor behavior and require human approval for high-risk operations. The goal isn't to eliminate every mistake but to limit the damage an agent can cause while preserving its autonomy. + + + +--- + +## From Model Selection to Smart Routing + +🧑**Speakers:** Viktoria Semaan (Principal Technical Evangelist at Databricks) + +![image-20261014010740705](image-20261014010740705.png) + +Using the most powerful LLM for every task is expensive and often unnecessary. Instead, AI systems should automatically select the most cost-effective model based on task complexity, quality, speed and cost. Victoria Ziman from Databricks recommends three approaches: + +1. **Model Evaluation:** Benchmark different models against real tasks, measuring accuracy, latency and cost per task. + +2. **AI Gateway:** Centralize model access, track spending, enforce budgets and support model switching and fallbacks. + +3. **Smart Routing:** Automatically assign simpler tasks to cheaper models and complex reasoning tasks to more powerful models. + + + +She also demonstrates [Omnigen](https://omnigent.ai/), a meta-harness that coordinates coding agents, selects models and controls execution budgets and retry limits. + +![image-20261014011228086](image-20261014011228086.png) + +> Implement intelligent model routing, per-agent budgets and continuous evaluation to reduce AI costs without significantly compromising quality. The goal isn't to use the best model everywhere, but the best model for each task. + + + +--- + +## Building AI Products vs. Building With AI + +🧑**Speakers:** Aparna Dhinakaran (Founder Arize), Rukmini Reddy (VP of Engineering PagerDuty), Tamar Bercovici (VP of Engineering Box) + +![image-20261014011432422](image-20261014011432422.png) + +AI is transforming software engineering from writing code to orchestrating AI agents, evaluating their outputs and ensuring production reliability. As code generation becomes cheaper and faster, engineering teams must rethink their workflows, responsibilities and infrastructure. The panel highlights four major shifts: + +1. **AI Software Factory:** Engineering teams are moving beyond individual coding assistants toward shared platforms where agents generate code, investigate bugs, analyze logs, create PRs and automate development workflows. +2. **Agent Harness & Evaluation:** Building reliable AI products requires adaptable agent harnesses, continuous evaluations, shared context, reusable skills and intelligent model selection. Teams must measure output quality rather than relying solely on traditional unit tests. +3. **AI-Powered Observability:** As AI-generated code increases, human code reviews alone cannot scale. AI agents can review other agents' activities, analyze traces, detect anomalies and identify production issues. Guardrails and controls to limit the impact of failures remain essential. +4. **Build vs. Buy:** AI makes custom software easier to build, but maintaining production-grade reliability, security, compliance and observability remains challenging. Companies should focus engineering resources on differentiating capabilities and consider buying specialized infrastructure. + +The speakers also emphasize that e**ngineers should treat agents like new team members**: when an agent produces poor results, improve its context, tools, instructions and skills rather than simply abandoning the task. + +> Move beyond AI-powered code generation toward an AI Software Factory with shared agent skills, reusable context, continuous evaluations, automated code reviews and production observability. The real competitive advantage is not generating more code but building a reliable system where humans and AI agents can continuously develop, test, deploy and maintain software together. + + + +--- + +## Making (and Breaking) Agents by Adding 1,000 MCP Tools + +🧑 Speaker: Guillaume Lebedev (Co-founder & CTO, StackOne) + +![image-20261014013431823](image-20261014013431823.png) + +Adding more MCP tools doesn't necessarily make AI agents more capable. It can actually break them by overwhelming their context windows, reducing tool-selection accuracy and increasing security risks. Guillaume Lebedev shows what happens when an agent is connected to 1,000 MCP tools and recommends four approaches: + +1. **Tool Search & Lazy Loading:** Instead of loading every MCP tool definition into the LLM's context, dynamically discover and load only relevant tools. His demo shows that loading hundreds of tools can consume approximately 440K tokens before the agent even starts working. +2. **Semantic Tool Discovery:** Traditional keyword-based search (BM25) can miss relevant tools or their prerequisites. Vector embeddings, semantic search and dependency graphs improve tool discovery accuracy and help agents find the correct sequence of operations. +3. **Context Optimization:** Use techniques such as Code Mode and Recursive Language Models (RLM) to process large tool responses without filling the agent's context window. This helps agents work efficiently with large amounts of external data. +4. **Prompt Injection Defense:** Every MCP tool response should be treated as potentially untrusted. Malicious instructions hidden in emails, CRM notes, meeting transcripts or support tickets can hijack agents. Combining specialized classifiers with LLM-based detection improves protection, but no detection method is perfect. + +He also demonstrates that tool discovery and prompt injection detection are classification problems, where specialized models can outperform simple keyword matching. However, the strongest protection remains deterministic access policies that prevent agents from calling unauthorized tools or accessing sensitive data. + +> Build a scalable MCP tool architecture with lazy tool loading, semantic tool discovery and dependency-aware tool selection. Optimize large tool responses to reduce context consumption and token costs. Most importantly, treat all external tool results as untrusted and enforce tool-level permissions outside the LLM. The goal isn't to give agents access to more tools, but to help them discover and safely use the right tools at the right time. + +--- + + + +## Context Engineering: How Machines Remember and Forget + +🧑 Speaker: Emre (Solutions Architect at OpenAI) + +![image-20261014013748342](image-20261014013748342.png) + +Context engineering is about providing AI agents with the right information at the right time, rather than filling their context windows with everything available. The speaker explains that long-running agents accumulate unnecessary tokens, outdated information and conflicting context, which can reduce accuracy and increase costs. He introduces three core strategies: + +1. **Reshape & Fit:** Optimize short-term context using trimming, compaction and summarization. Preserve important decisions and task progress while removing irrelevant conversation history and excessive tool outputs. +2. **Isolate & Route:** Use separate contexts and subagents to prevent information overload. Delegate specific tasks to agents with focused context rather than forcing one agent to process everything. +3. **Extract & Retrieve:** Build long-term memory that works across sessions. Extract meaningful information, store it persistently and retrieve only relevant memories when needed. + +He also emphasizes that memory should evolve rather than grow indefinitely. Agents must consolidate conflicting memories, forget outdated preferences and decide whether information should be loaded automatically or retrieved on demand. Evaluations (evals) are essential for measuring whether memory and context optimization actually improve performance, including testing agents with memory enabled versus disabled. + +> Build a dedicated Context & Memory Management layer that automatically summarizes long-running sessions, isolates subagent contexts and maintains persistent memory across sessions. Implement intelligent memory extraction, retrieval, consolidation and forgetting. Continuously evaluate context quality, token consumption and task success. The goal isn't to make agents remember everything, but to make them remember what matters and forget what doesn't. + +--- + +## Responsible AI Architecture with Zero Trust Agents + +**🧑 Speaker:** Ashok Prakash (Staff ML Engineer Apple) + +![image-20261014014342669](image-20261014014342669.png) + +Building an AI agent is easy, but making it safe, controllable, observable and production-ready requires a complete infrastructure architecture. The speaker identifies four major production risks: black-box decisions, silent model drift, unsafe actions and uncontrolled costs. He proposes an open-source, Zero-Trust reference architecture with five essential principles: + +1. Agent Controller & Execution Budgets: Run agents through controlled workflows (e.g., Temporal or Celery) with checkpoints, execution limits, token budgets and the ability to stop runaway agents. Prevent infinite reasoning loops and uncontrolled subagent execution. +2. Zero-Trust Tool Access: Treat tools and MCP integrations as contracted services with scoped identities, least-privilege permissions and just-in-time access. Agents must never access another user's data or retain permissions beyond their authorized scope. +3. Policy-Based Governance & Human Approval: Use deterministic policy engines such as Open Policy Agent (OPA) instead of relying on natural-language prompts. Classify actions into autonomous, human-assisted and human-only decisions, with structured approval requests for sensitive operations. +4. Responsible Data & Memory Management: Enforce consent tracking, PII redaction, data retention policies and user-scoped access. Isolate conversational memory from knowledge bases and maintain source traceability to detect and recover from poisoned data. +5. Observability, Evaluation & Safe Deployment: Use OpenTelemetry to track agent decisions, costs and failures. Continuously monitor model drift, version models and RAG datasets and deploy through evaluation gates, shadow testing, canary releases and gradual rollouts. + +The speaker also highlights KServe and vLLM for model serving, caching, autoscaling and cost optimization. His central architectural principle is that safety must be enforced throughout the infrastructure, not added as a final layer. + +> Build a Zero-Trust Agent Runtime with centralized execution control, scoped tool permissions, deterministic policies, human approval workflows and end-to-end observability. Add execution budgets, versioned agent configurations, continuous evaluations and safe deployment mechanisms. The goal is not simply to create autonomous agents, but to make their behavior predictable, auditable, recoverable and safe enough for enterprise production. + +--- + +## Rethinking Developer Tools for the Agent Era + +🧑 Speakers: Ben Helle (Chief Product Officer, Webflow), Han Wang (Co-founder, Mintlify), Sam Bhagwat (Founder & CEO, Mastra) + +![image-20261014014755824](image-20261014014755824.png) + +AI agents are becoming primary users of developer tools, forcing companies to rethink product design, documentation, APIs and developer experience. Webflow reports that the majority of its MCP-driven content development activity now involves agents, while Mintlify reports that agent traffic increased from approximately 2–3% in early 2025 to 67%. The speakers highlight four major shifts: + +1. **Developer Experience (DX) → Agent Experience (AX):** Developer tools must increasingly serve AI agents alongside humans. Agent-friendly APIs, MCP servers, CLI interfaces, skills files and documentation are becoming important product capabilities. +2. **Agent Discovery & Adoption:** Agents increasingly discover, evaluate and recommend developer tools. Clear documentation, accurate technical information and well-designed SDKs influence whether agents successfully adopt a product. However, great human developer experience often translates into great agent experience. +3. **Task-Oriented MCP & Shared Skills:** Simply exposing REST APIs through MCP isn't enough. Tools should support meaningful workflows and human goals. Teams also need centralized, reusable agent skills to produce consistent results across multiple agents. +4. **Humans Become Agent Managers:** Developers are shifting from writing every line of code to coordinating teams of agents. The most valuable human skills become product judgment, customer empathy, problem identification and the ability to design effective agent workflows. + +The panel also discusses how AI dramatically reduces the cost of building software but doesn't automatically make products successful. Finding product-market fit, understanding customers and building something people genuinely love remain difficult. + +> Treat AI agents as first-class users of your products. For ABP, invest in agent-friendly documentation, MCP integrations, CLI capabilities, reusable skills and task-oriented workflows. Focus on human-agent collaboration, shared skills and managing teams of agents. The opportunity is no longer just helping developers write code faster, but enabling humans to manage agents that build software for them. + + + +--- + +## Your Next Customer Won’t Be Human + +🧑 Speaker: Ben Smith (Staff Developer Advocate at Stripe) + + ![image-20261014015141785](image-20261014015141785.png) + +AI agents are becoming economic actors: they will not only discover and purchase products on behalf of humans, but also autonomously pay for APIs, tools, compute and services to complete tasks. Traditional websites and checkout flows are designed for humans, while agents need structured data, discoverable APIs, standardized protocols and secure payment mechanisms. Ben Smith from Stripe highlights four major developments: + +1. **Agentic Commerce & Agent Experience:** Businesses must make their products and services discoverable and purchasable by AI agents. Structured product catalogs, clear constraints, APIs and machine-readable information become essential. +2. **Universal Commerce Protocol (UCP):** A standardized protocol that allows agents to discover merchants, browse products, create checkouts and complete purchases without building custom integrations for every merchant. Merchants expose their capabilities through `/.well-known/ucp`. +3. **Secure Agent Payments:** Stripe's Shared Payment Tokens (SPT) allow agents to initiate purchases without exposing raw payment credentials to merchants. Tokens can be restricted by merchant, spending amount, expiration and usage. +4. **Machine Payments Protocol (MPP):** Enables machine-to-machine payments using HTTP `402 Payment Required`. Agents can automatically pay for APIs, MCP tools, storage, compute and other services on demand, without requiring users to manually create accounts or manage API keys. + +The speaker demonstrates an AI shopping assistant that discovers products, recommends options, calculates shipping and taxes and completes a purchase. He also shows how changing an agent's instructions can turn a helpful shopping assistant into a misleading salesperson, emphasizing the importance of responsible agent behavior. + +> Prepare for an agent-to-agent economy where agents can discover, purchase and consume external capabilities autonomously. Consider per-agent wallets, spending limits, payment approvals and usage tracking to support agents purchasing APIs, MCP tools and services. For ABP, explore agent-friendly service discovery and standardized commerce integrations. The next generation of software won't just serve human users; it will also serve AI agents that can independently discover, access and pay for capabilities. + +--- + +## The Browser Is Becoming an AI Runtime + +🧑 Speakers: Ajit Varma (Head of Firefox, Mozilla), Will Burke (Founder & CEO, Exa), Julia Love (Technology Reporter, Bloomberg , Moderator) + +![image-20261014015602329](image-20261014015602329.png) + +Browsers are evolving from tools humans use to navigate websites into AI runtimes where agents search, understand and interact with the internet on our behalf. Mozilla and Exa envision an open, agent-friendly web where users can choose their AI models, preserve their browsing context and avoid dependence on a single AI provider. The speakers highlight four major shifts: + +1\. **Browser as an AI Runtime:** Browsers are becoming execution environments for agents. Instead of simply displaying websites, they enable AI to navigate pages, interpret content, make decisions and perform actions. Some agent systems already use cloud-hosted browsers running inside virtual machines. + +2\. **AI Choice & Model Independence:** Mozilla's Firefox Smart Windows approach allows users to choose between AI providers, including open and privacy-focused models, while maintaining their browsing context. This reduces vendor lock-in and supports AI sovereignty. + +3\. **Search Built for Agents:** Exa is developing search infrastructure specifically for AI agents rather than humans. Will Burke predicts that AI-generated searches could surpass human searches by early 2027, creating a fundamentally different market for information retrieval. + +4\. **A New Economy for Web Content:** Traditional search relies heavily on advertising and human clicks. AI agents increasingly consume information without visiting websites, threatening publishers' existing business models. Exa proposes a model where agents pay data providers directly for high-quality information, including through its Exa Connect offering. + +The panel also emphasizes open web standards, publisher consent, source attribution and user control. Websites are still primarily designed for humans, but agents increasingly interact with them through browser automation, visual recognition and emerging protocols such as MCP. + +> Treat browser automation as a core agent capability, alongside APIs and MCP tools. Consider isolated browser sessions where agents can navigate websites, perform tasks and request human approval for sensitive actions. For ABP, make applications accessible to both humans and agents through structured interfaces, APIs and agent-friendly workflows. The future browser won't just display applications; it will become an execution environment where AI agents operate applications on behalf of users. + +--- + + + +## Going Beyond the Code Through the GitHub Copilot App: How to Unlock You and Your Team’s Superpower + +🧑 Speaker: Jenny Huang (Director of User Research, GitHub) + +![image-20261014020250963](image-20261014020250963.png) + +AI coding agents have removed the bottleneck of writing code, but the bottleneck has shifted to coordination, context switching and deciding what to build. Jenny Huang explains that software productivity is no longer just about generating code faster. It's about connecting information, reducing fragmented workflows and helping people move from ideas to valuable outcomes. She demonstrates three practical applications of the GitHub Copilot app: + +1. Product Feedback & Prioritization: Aggregate thousands of feedback signals from GitHub Issues, customer surveys, telemetry and other sources. Use AI to identify patterns, understand customer needs and prioritize product development based on evidence rather than scattered discussions. +2. Customer Context & Sales Readiness: Connect information from multiple business systems to create a unified customer overview. Sales teams can prepare for meetings, understand customer relationships and identify opportunities without manually searching across different applications. +3. Research & Content Creation: Transform raw data, transcripts and external research into actionable insights and working applications. The VS Code team demonstrates using Copilot to research podcast topics and build an analytics dashboard from podcast engagement data. + +She emphasizes that AI-powered workflows should extend beyond developers to product managers, researchers, sales teams and other business users. The objective is to preserve human creativity and judgment while automating repetitive information gathering and coordination. + +> Think beyond AI-assisted coding and build a unified human-agent workspace that connects development, product management, customer feedback and business operations. Prioritize cross-application context sharing, collaborative workflows and agents that turn scattered information into actionable tasks. For ABP Studio AI Agent, consider integrating product requirements, documentation and user feedback directly into development workflows. The next productivity breakthrough won't come from generating more code, but from reducing the coordination overhead between humans, agents and tools. + +--- + +## Why Buy Software When AI Can Build It? + +🧑**Speakers:** Lee Edwards (General Partner at Root Ventures), Mang-Git Ng (CEO of Anvil), Richard Robinson (Chief Evangelist at UnqorkAI) + +![image-20261009182548395](image-20261009182548395.png) + +AI is making software cheaper to build but not necessarily cheaper to operate, secure, scale and maintain. That's where software companies can still win. + +- Building an MVP is becoming trivial. Getting software production-ready is still difficult. +- Traditional SaaS is under pressure. Customers are starting to build tools themselves rather than paying subscriptions. +- Developer experience is changing. A great UI may no longer be enough. AI-friendly APIs, CLIs, MCP integrations and documentation are becoming competitive advantages. +- AI agents are becoming software buyers and decision-makers. They increasingly recommend which tools, databases and platforms developers should use. +- Software companies need stronger differentiation. Security, compliance, scalability, reliability and domain expertise matter more than basic features. +- The future may involve fewer dashboards. Users could interact with personal agents rather than traditional SaaS interfaces. + +## Main arguments + +### 1. The economics of Buy vs. Build have fundamentally changed + +Historically, buying software was often cheaper than building and maintaining it. AI is shifting that calculation. + +This is particularly concerning for developer tools that primarily monetize convenience, hosting or ease of setup. + +However, the panel agrees that building something and operating it reliably are very different problems. + +### 2. MVPs are no longer a competitive advantage + +Getting a prototype working is easy. Getting it into production and supporting thousands of customers is still hard. + +AI is good at fixing problems once they are identified but panelists argue it remains less reliable at anticipating scaling problems before they occur. + +The competitive advantage is shifting: + +OLD DIFFERENTIATION + +Build software faster + +- Rapid development +- Easy UI +- More features +- Quick prototypes + +NEW DIFFERENTIATION + +Ship reliable software faster + +- Production readiness +- Security and compliance +- Scalability +- Ongoing maintenance + +### 3. Your next customer might be an AI agent + +Lee Edwards describes how Claude recommended Railway and Neon for his projects. The developer didn't independently discover these products. The AI selected them based on the project's requirements. + +Anvil's CEO also explains that their strong documentation helps AI agents recommend Anvil over competing PDF and e-signature solutions, generating inbound interest. + +As a result: + +- Documentation becomes a marketing channel. +- MCP servers and CLIs become product discovery and adoption channels. +- Being recommended by AI assistants may become as important as ranking on Google. + +This doesn't mean traditional SEO disappears but software companies increasingly need to optimize for both human and AI-driven discovery. + +### 4. SaaS might disappear from the UI, not the infrastructure + +Lee Edwards suggests a future where people stop opening multiple SaaS dashboards. + +Instead of logging into Salesforce to review sales activity, someone might ask their personal AI agent for an update. + +This creates two distinct risks for SaaS companies: + +- Customers build their own replacement software. +- Customers stop using traditional applications directly because agents handle the interactions. + +He also suggests that systems of record and foundational infrastructure may retain stronger competitive positions. + +### 5. Companies should buy what doesn't differentiate them + +Anvil's CEO makes a practical argument: Why spend months building PDF generation when that functionality has already been solved, tested and scaled by a specialist provider? + +The same logic applies to security, infrastructure and other standardized capabilities. + +Build the functionality that makes your business unique. Buy or reuse the capabilities that don't. + +AI reduces implementation cost but it doesn't eliminate the value of mature, specialized software. + +## 2. What Can We Do for ABP? + + + +| Priority | Opportunity | Recommended action | +| -------- | --------------------------------- | ------------------------------------------------------------ | +| High | AI-driven discovery | Make ABP documentation easier for AI agents to discover, interpret and recommend | +| High | Production readiness | Emphasize secure, maintainable, production-ready applications rather than just faster development | +| High | Agent-native developer experience | Make ABP Studio capabilities accessible through agent-friendly tools and interfaces | +| Medium | Competitive positioning | Explain why AI-generated code still benefits from ABP architecture and modules | +| Medium | Marketing | Publish AI coding workflows demonstrating the value of ABP alongside coding agents | + + + +The below message shifts the value proposition from code generation to the engineering foundations required to deliver reliable applications. + +## AI can write your code. ABP helps you ship production-ready applications. + +> **The whole "AI will kill SaaS" argument is way too simplistic.** + +Sure, Claude can build a CRM prototype in an afternoon. But who's going to maintain it, secure it, handle migrations, deal with compliance and keep it running when the business grows? + +That's the actual business opportunity. + +> **AI agents becoming the ones choosing software.** + +Imagine spending years optimizing your website for developers, only to discover that the developer now asks Claude which framework to use. + +Suddenly, documentation, APIs, CLI and MCP integrations become part of your marketing strategy. + +> **Don't compete with AI on how quickly it can generate code.** Compete on everything required to turn that code into dependable software. + +*Can we make ABP the preferred foundation for AI-generated enterprise applications, rather than positioning it as an alternative to AI coding?* 👊 **YES** + + + +## NETWORKING + +![image-20261009184812166](image-20261009184812166.png) + +![collage-2](fka-security-guys.png) + +## ROUNDTABLE: Running AI Agents at Scale + +What's actually breaking in production agent deployments, from visibility and governance to cost control at scale and what a real governance layer for agentic AI needs to look like. We gathered to talk the topic: "Running AI Agents at Scale". We were 15 senior engineering and technical leaders facing the same problems. It was hosted by James Everingham, CEO and Co-founder of Guild.ai. I couldn't remember everyone's name in the meeting but as I remember there were Ankit Patel from NVIDIA, Yifei Liu from Vectra AI, Phani Pendurthi from Mastercard, from Oracle and Devin AI. + +![image-20261009185237161](image-20261009185237161.png) + +### Roughly We Talked About + +* There should be lots of alerts in an agentic system. For budget, security... For example if an agent runs too long or it retrieves too much data, be alerted. +* There should be an **AI Kill Switch** toggle somewhere. We don't know when we'll hack, abuse or unwanted agent runs... +* Permissions are crucial! Agents must be allowed with scoped access to the tools, data, APIs. +* Agents should have role-based authentication. +* AI firewalls are another security layer which protect how AI agents interact with users, tools, data and other systems. For example [Cloudflare AI Security](https://www.cloudflare.com/solutions/ai-security/) What an AI firewall does: + * Prompt Injection: Block malicious instructions hidden in documents, emails or web pages. + * Data Leakage: Prevent agents from exposing API keys, credentials or sensitive customer information. + * Tool Call Validation: Block unauthorized or suspicious MCP tool calls. + * Content Filtering: Detect harmful or policy-violating inputs and outputs. + * Anomaly Detection: Flag unusual agent behavior, such as excessive API calls or bulk data exports. +* For MCP tools, we should apply least-privilege access, allowing agents to discover and execute only the tools they need for their specific tasks. +* Who's accountable for the things that AI does? Simply humans. An agent must be under control of someone (who created or who initiates) and that person must be accountable for any issues. +* Auditing is more important now! If don't trace the agent's work, we cannot find the accountable person, measure the outputs, costs, running durations, data breaches etc... +* Using sandbox is a best practise. +* AI agents are not for free! To manage your budget, you need to set upper limits per your agent, project, team, task. +* Human in the loop but when?! If an AI agent asks for human approval at every step, automation loses its value. Everything slows down and humans become the bottleneck. + * **Impact**: How significant are the consequences of the action? + * **Reversibility**: Can the action be easily undone? + * **Confidence**: How confident is the AI in its decision? + * **Risk**: What are the potential financial, security, legal, health or reputational risks? + * **Authority**: Is the action within the AI agent's permitted scope? + +> The higher the impact, the lower the reversibility and the greater the uncertainty, the more important human oversight becomes. + +For example, an AI agent can draft an email without approval but sending an email to 10,000 customers might require human confirmation. + +### Another topic we discussed: Agent Access Control + +AI agents shouldn't have permanent access to everything. Instead, they should receive only the permissions they need, exactly when they need them and only for as long as necessary. This is called Just-in-Time (JIT) Access. For example, an AI agent processing a refund might temporarily get permission to issue that refund, but lose it immediately afterward. This minimizes security risks, limits the damage from compromised agents and allows organizations to scale AI safely without giving agents excessive privileges. + +**Just-in-Time Access:** AI agents shouldn't have permanent access to sensitive systems. Instead, they request permissions when needed and a centralized access management system grants temporary access based on predefined security policies. Humans define the rules and the system enforces them automatically. This reduces security risks, limits potential damage and allows AI agents to operate at scale without requiring human approval for every action. + +For example, a system administrator defines the following rules: + +- An AI agent can issue refunds up to $100. +- Refunds are allowed only for customers assigned to the agent. +- Access is granted temporarily for a single transaction. +- Refunds exceeding $100 require human approval. + +When the agent requests access, the system evaluates these predefined policies and grants temporary permissions only if the conditions are met. + +--- + +## Whole Summary + +- Move beyond AI coding assistants toward AI Software Factories, where agents collaborate to build, test, review and deploy software. +- Run AI agents in isolated sandboxes with dedicated identities, limited permissions and controlled budgets. +- Apply Zero-Trust security with deterministic policies, audit trails and human approval for high-risk actions. +- Choose AI models based on cost per successful task, using smart routing and continuous evaluations. +- Invest in context engineering and long-term memory to improve agent performance and reduce costs. +- Make observability and automated evaluations essential parts of production AI systems. +- Use specialized agents with focused responsibilities instead of giving one agent access to hundreds of tools. +- Design documentation, APIs, CLIs and MCP tools for AI agents, not just human developers. +- Prepare for an agent-driven economy where AI agents discover, recommend, use and purchase software. +- Focus on production readiness, security, scalability and maintainability as AI makes code generation increasingly accessible. +- Shift developers' focus from writing code to orchestrating agents, solving problems and making architectural decisions. +- Keep investing in junior developers and human expertise, because judgment, creativity and understanding what to build remain essential. + +And lastly, I agree 100% to the following saying. + +> **AI LEARNT CODING NOW IT'S CHEAP. LET'S LEARN MARKETING** + +![image-20261014141622229](image-20261014141622229.png) + + + +--- + +## Volobox + +I also have chance to explain our new product [Volobox.io](https://volobox.io) to some attendees. Everyone likes the idea and implementation details. + +> Context is the new king! + +AI models are getting smarter. But the real game-changer is context. That's why Volobox brings chats, meetings, tasks, files and AI agents into one shared context. No need to copy-paste from different apps, environments. Just AI agents that understand your work; Get things done... + +![image-20261009192927320](image-20261009192927320.png) + + + +## About My Trip in San Francisco & Los Angeles + +Some pictures from my trip. + +![usa-trip](usa-trip-moments.png) + +![image-20261014022128876](image-20261014022128876.png) \ No newline at end of file diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/bf6c9bb8-5869-46ca-9d58-5096e9de3a93.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/bf6c9bb8-5869-46ca-9d58-5096e9de3a93.png new file mode 100644 index 0000000000..6556e61f6b Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/bf6c9bb8-5869-46ca-9d58-5096e9de3a93.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/cover.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/cover.png new file mode 100644 index 0000000000..002cf75509 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/cover.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/fka-security-guys.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/fka-security-guys.png new file mode 100644 index 0000000000..32e0c92d18 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/fka-security-guys.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008193826119.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008193826119.png new file mode 100644 index 0000000000..d3b4eaf439 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008193826119.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008194727172.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008194727172.png new file mode 100644 index 0000000000..e2185afa3e Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008194727172.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008195346170.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008195346170.png new file mode 100644 index 0000000000..5f8f22f1fe Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008195346170.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008195527905.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008195527905.png new file mode 100644 index 0000000000..d2f00cfd2f Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008195527905.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008200008969.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008200008969.png new file mode 100644 index 0000000000..cd2844161a Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261008200008969.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009150813966.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009150813966.png new file mode 100644 index 0000000000..df384fd9a3 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009150813966.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009151732552.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009151732552.png new file mode 100644 index 0000000000..07defef290 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009151732552.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009152024726.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009152024726.png new file mode 100644 index 0000000000..7a6bf2eb0f Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009152024726.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009152831092.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009152831092.png new file mode 100644 index 0000000000..57dcfe27d6 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009152831092.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009152937844.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009152937844.png new file mode 100644 index 0000000000..206f891705 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009152937844.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009153157480.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009153157480.png new file mode 100644 index 0000000000..10682f3731 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009153157480.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009155220391.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009155220391.png new file mode 100644 index 0000000000..165adfbb42 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009155220391.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182127593.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182127593.png new file mode 100644 index 0000000000..02295f1940 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182127593.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182139355.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182139355.png new file mode 100644 index 0000000000..5d562a1ce2 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182139355.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182212869.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182212869.png new file mode 100644 index 0000000000..f04cea7767 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182212869.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182259531.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182259531.png new file mode 100644 index 0000000000..3cd5b07c74 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182259531.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182348881.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182348881.png new file mode 100644 index 0000000000..112cf449bd Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182348881.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182548395.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182548395.png new file mode 100644 index 0000000000..de5dd75acd Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009182548395.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009184812166.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009184812166.png new file mode 100644 index 0000000000..93989dd1b7 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009184812166.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009185237161.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009185237161.png new file mode 100644 index 0000000000..c2eabc16a9 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009185237161.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009192927320.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009192927320.png new file mode 100644 index 0000000000..707ce4f0bf Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009192927320.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009193336745.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009193336745.png new file mode 100644 index 0000000000..68a1effec1 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009193336745.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009195239178.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009195239178.png new file mode 100644 index 0000000000..7ca8877400 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009195239178.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009195303929.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009195303929.png new file mode 100644 index 0000000000..34b2cd1aaa Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009195303929.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009195315021.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009195315021.png new file mode 100644 index 0000000000..f25ab53903 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261009195315021.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014003620685.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014003620685.png new file mode 100644 index 0000000000..f89e3936b9 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014003620685.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014004734473.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014004734473.png new file mode 100644 index 0000000000..008c54aed0 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014004734473.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014005347668.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014005347668.png new file mode 100644 index 0000000000..05db8fa289 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014005347668.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014010315592.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014010315592.png new file mode 100644 index 0000000000..7c12dd7be0 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014010315592.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014010740705.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014010740705.png new file mode 100644 index 0000000000..690fee4957 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014010740705.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014011228086.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014011228086.png new file mode 100644 index 0000000000..1786c163b7 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014011228086.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014011432422.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014011432422.png new file mode 100644 index 0000000000..98bcb067ce Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014011432422.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014013431823.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014013431823.png new file mode 100644 index 0000000000..49135e1dcc Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014013431823.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014013748342.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014013748342.png new file mode 100644 index 0000000000..ce6394577c Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014013748342.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014014342669.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014014342669.png new file mode 100644 index 0000000000..ddd022346f Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014014342669.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014014755824.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014014755824.png new file mode 100644 index 0000000000..4f88ae6e6d Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014014755824.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014015141785.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014015141785.png new file mode 100644 index 0000000000..d0fb8bb4d4 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014015141785.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014015602329.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014015602329.png new file mode 100644 index 0000000000..1fb5369cbe Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014015602329.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014020250963.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014020250963.png new file mode 100644 index 0000000000..45922c1289 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014020250963.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014022128876.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014022128876.png new file mode 100644 index 0000000000..7699ed693b Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014022128876.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014024659737.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014024659737.png new file mode 100644 index 0000000000..babb490e85 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014024659737.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014141622229.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014141622229.png new file mode 100644 index 0000000000..7251825679 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/image-20261014141622229.png differ diff --git a/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/usa-trip-moments.png b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/usa-trip-moments.png new file mode 100644 index 0000000000..5366be7ad4 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-14-Speaker-Perspective-WeAreDevelopers-America-2026/usa-trip-moments.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25682.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25682.png new file mode 100644 index 0000000000..e55bf198e7 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25682.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25684.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25684.png new file mode 100644 index 0000000000..3c45d9758f Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25684.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25687.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25687.png new file mode 100644 index 0000000000..642b00fa83 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25687.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25688.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25688.png new file mode 100644 index 0000000000..2cf9fa7caa Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25688.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25693.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25693.png new file mode 100644 index 0000000000..08123a8f51 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25693.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25712.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25712.png new file mode 100644 index 0000000000..90ba066679 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25712.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25714.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25714.png new file mode 100644 index 0000000000..ce34ffa019 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25714.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25716.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25716.png new file mode 100644 index 0000000000..8afc0351db Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25716.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25717.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25717.png new file mode 100644 index 0000000000..712c350d89 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25717.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25719.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25719.png new file mode 100644 index 0000000000..765c626d1c Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25719.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25722.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25722.png new file mode 100644 index 0000000000..7666aa1f26 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25722.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25725.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25725.png new file mode 100644 index 0000000000..0878f48c62 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25725.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25727.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25727.png new file mode 100644 index 0000000000..551dc7ae8a Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25727.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25728.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25728.png new file mode 100644 index 0000000000..f469a85795 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25728.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25731.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25731.png new file mode 100644 index 0000000000..ba00c63b1a Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25731.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25732.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25732.png new file mode 100644 index 0000000000..7ba99cbb71 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25732.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25734.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25734.png new file mode 100644 index 0000000000..ffd39200ab Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25734.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25735.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25735.png new file mode 100644 index 0000000000..d2ae296b52 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25735.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25736.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25736.png new file mode 100644 index 0000000000..621f5fd7b8 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25736.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25737.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25737.png new file mode 100644 index 0000000000..e967ee08ac Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25737.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25738.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25738.png new file mode 100644 index 0000000000..554647073b Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25738.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25739.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25739.png new file mode 100644 index 0000000000..f9adeb4fc9 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25739.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25740.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25740.png new file mode 100644 index 0000000000..3c9cb88a9e Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25740.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25741.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25741.png new file mode 100644 index 0000000000..6ceb43a5cb Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25741.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25742.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25742.png new file mode 100644 index 0000000000..1bc88dc8f8 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25742.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25744.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25744.png new file mode 100644 index 0000000000..f5f1bac456 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25744.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25746.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25746.png new file mode 100644 index 0000000000..7676882a35 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/IMG_25746.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/Post.md b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/Post.md new file mode 100644 index 0000000000..18570a9906 --- /dev/null +++ b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/Post.md @@ -0,0 +1,798 @@ +# Reviews of DevAI Conference From a Speaker’s Eye + +Last week **I traveled to Poland** for a conference just dedicated to AI. I see that there will more conferences in the future targeting **just AI topics**. This's the trend now! I'm happy that, I catched the last good weather period in Warsaw before winter comes. So for me it was a conference at the same time learning some cultural information about Poland's history, city life, people and developer's mindset. + +DevAI by Data Science Summit 2026, the official website https://devai.dssconf.pl, took place in two distinct parts: Monday, October 19 online and Tuesday onsite at the [Copernicus Science Centre](https://www.google.com/maps/place/Copernicus+Science+Centre/@52.2418552,21.0287271,17z/data=!3m1!4b1!4m6!3m5!1s0x471ecc5ba250ccd1:0x8d6f1b9b8410960!8m2!3d52.2418552!4d21.0287271!16s%2Fm%2F05mwh1p?entry=ttu&g_ep=EgoyMDI2MTAyMC4wIKXMDSoASAFQAw%3D%3D) in Warsaw. + +![collage](collage.png) + +There were **50 presentations across 4 tracks**. Sessions were 35-minute long, roundtables, speaker Q&A, networking, an Expo and an afterparty. The audience was explicitly broader than developers alone, extending to architects, DevOps/infrastructure engineers, AI engineers, managers, directors and C-level leaders. In the afterparty, they organized some games to make networking. There were 4 different tables. You stand at a table, and someone from the table asks question. For example: "*what's the most absurd security precaution that your company took?*" and people at the table answers. 10 mins later the organizator comes and switches table so that you meet new people. By doing so, people knows each other. + +I had the chance to talk to several developers at the conference. **One thing that surprised me** was how few of them were working with .NET. Most of the developers I met were using Python, JavaScript or Java. Of course, this is just my observation from a few conversations, not a reflection of the entire Polish developer community. So l look up internet to see a statistics about Polish IT people language spectrum and here's the results... + + ![image-20261028175946044](image-20261028175946044.png) + +## **“Look what AI can generate!” Period Finished** + +Until now, we have been surprised about AI assisted development, tools and AI generated outputs. I guess this time has already completed. Yes we see using AI is productive and impressive but hat happens after an exciting AI-based MVP or demo? We started to ask questions about the following topics: + +* observability + +* reliability + +* security + +* cost control + +* verification + +* human oversight + +* production debugging + +* deterministic retrieval + +* organizational implications + + + +> **The biggest shift is from “WHAT CAN AI BUILD?” ** +> +> **👉 “HOW DO WE MAKE AI-GENERATED WORK TRUSTHWORTHY ENOUGH TO SHIP?** + + + + + +--- + +## My Talk + +My session, “Talk With Your Data: Building AI-Powered Reporting,” ran from 12:55–13:30 in Room 2, followed by a dedicated **Ask-a-Speaker slot at 13:35–13:50**. I covered my hands-on experiences on AI reporting, transforming human language to database queries, visualizing the output and getting insights directly from your database. I have a simple prediction for the future; the application UIs will be mostly eliminated and 👇 + +> **AI will be a conversational interface for the applications!** + +![my-talk](my-talk.png) + +![first-slide-of-my-presentation](first-slide-of-my-presentation.png) + +--- + + + +## Sessions I Attended and What I Learnt + +# How AI-Native Development Is Reshaping Software Teams + +**Speaker:** Bartosz Fijałkowski + +![image-20261028140851318](image-20261028140851318.png) + +### 1. Real-World Results + +![image-20261028145448700](image-20261028145448700.png) + +In their company, they transformed a 10+ year-old Java recruitment system to **.NET 10 + Blazor + PostgreSQL** stack. + +- **19 working days** to a functional platform. +- **10 weeks** to production vs. an estimated 7–9 months traditionally. +- **69 changes** delivered after adopting the new process. + +### 2. Spec-Driven Development Is the Key + +![image-20261028145539256](image-20261028145539256.png) + +Unstructured prompting creates unpredictable results. Their approach follows: + +**Business Problem → Specification → Plan → Small Tasks → Code & Tests** + +Every stage includes human approval. AI generates code based on clear specifications rather than vague prompts. + +I hate terminology as it makes people's mind confusing. When people tell spec-driven development, it looks like there's a new AI development approach coming up in 2026. No it's just a naming which we already do in all our development life. Spec-Driven Development = Giving Details of What You Want. + +**Vibe Coding:** + +> "Hey AI, build me a shopping website." + +AI writes code. You look at the result and ask for changes until you're happy. + +**Spec-Driven Development:** + +> "Let's first define exactly what this shopping website should do, how it should work and how we'll know it's correct. Then implement it." + +### 3. Standardize Architecture and Engineering Rules + +![image-20261028145608349](image-20261028145608349.png) + +They use reusable repository templates with predefined architecture, CI/CD, technology skills and coding standards. + +**Modular monolith is the default.** Complex architectures must be justified. + +### 4. AI Changes Team Structure + +![image-20261028145747056](image-20261028145747056.png) + +Traditional front-end, back-end and DevOps responsibilities merge into broader software engineering roles. + +Their proposed AI-native team has **5 people instead of 13**: one lead, one analyst, two engineers and QA automation. Java developers started to code with .NET. + +### 5. Coding Is No Longer the Bottleneck + +![image-20261028145648827](image-20261028145648827.png) + +AI accelerates implementation but requirements and testing become the new bottlenecks. + +Their project includes **1,531 automated tests** running in approximately 7 seconds and **281 API parity tests**. + +### 6. Faster Development Creates New Challenges + +- **Knowledge management:** Specifications, decisions and an LLM Wiki help teams share knowledge and onboard developers. + +- **Scaling:** Add complete, balanced teams (pods) rather than individual developers. + +- **Prioritization:** Faster delivery brings back previously postponed ideas, potentially increasing the backlog. + + + +> **AI-native development isn't just about generating code faster. It's about redesigning the entire software development process.** The biggest gains come from combining structured specifications, standardized architecture, AI agents, automated testing and human oversight. + + + +--- + +# Retrofitting Agentic RAG: Making Retrieval More Deterministic + +**Speaker:** Jan Majewski, Lead AI Engineer at Minerva + +Jan Majewski shared how his team improved RAG for matching products across different domains, languages and large document collections. The session focused on making RAG more deterministic, scalable and cost-efficient by combining traditional NLP techniques with LLMs. + +![Retrofitting Agentic RAG – Jan Majewski](IMG_25682.png) + +### 1. Traditional RAG Struggles with Domain-Specific Terminology + +Different clients describe the same products using completely different terminology. For example, finding fentanyl in procurement documents may require searching for **30+ different keywords**. + +A relevant document for one client might be irrelevant for another. This makes conventional keyword search and vector similarity insufficient for reliable matching. + +![Different clients define relevance differently](IMG_25684.png) + +### 2. Extract Information Once, Search Many Times + +Instead of repeatedly searching thousands of documents for every client query, their approach processes documents once and extracts relevant product entities. The extracted information is organized into a structured, graph-like product registry. Future queries search this registry rather than repeatedly processing the original documents. + +![Extract information once and reuse it across queries](IMG_25687.png) + +### 3. Combine Named Entity Recognition with LLM Validation + +Their approach, called **NER-RAG**, combines traditional NLP with LLMs: + +- **NER models** extract product names and relevant entities from documents. +- **Hybrid search** identifies potential matches from the extracted entities. +- **Rerankers and LLMs** validate ambiguous matches. +- **Human feedback and LLM-generated labels** help improve NER models over time. + +This reduces unnecessary LLM calls while making retrieval more predictable. + +![NER-RAG architecture with entity extraction and LLM validation](IMG_25688.png) + +### 4. Significant Cost and Scalability Improvements + +The speaker presented some interesting performance figures from their approach: + +- **330× cheaper document processing** using NER compared to LLM-based extraction. +- **96.7% of the searchable catalogue already built** before new client queries arrive, in their illustrated scenario. +- New clients primarily add lookup operations rather than requiring full document reprocessing. +- LLM validation focuses on new or uncertain matches instead of repeatedly evaluating the entire dataset. + +![NER-RAG cost and scalability improvements](IMG_25693.png) + +### Key Takeaway + +**Not every AI problem needs to be solved entirely with LLMs.** + +This session shows how combining traditional NLP, structured entity extraction, hybrid search and selective LLM validation can produce a more deterministic and cost-efficient retrieval system. + +The most interesting architectural decision was **moving expensive processing from query time to document ingestion time**, allowing the system to reuse extracted knowledge across multiple clients and queries. + + + +--- + +# We Have Met the Enemy and It Is Us: Challenges of AI-Driven Software Development + +**Speaker:** Borys Stokalski, Global Partnership on AI / OECD.AI + +Borys Stokalski discussed the challenges and risks emerging from increasingly autonomous AI systems, particularly in software development. His central argument was that **the biggest challenges of AI adoption may come from how we use, manage and scale these systems rather than from the technology itself.** + +![We Have Met the Enemy and It Is Us](IMG_25712.png) + +### 1. The Big Unknown: Complexity, Autonomy and Scale + +As AI systems become more autonomous, three major challenges emerge: + +- **Emergent complexity:** Understanding and predicting the behavior of AI models and interacting agents becomes increasingly difficult. +- **Machine autonomy:** Autonomous agents introduce questions about responsibilities, obligations and decision-making authority. +- **Scaling:** The rapid growth of LLM capabilities creates new challenges in managing increasingly complex AI-driven systems. + +![The Big Unknown: Complexity, Autonomy and Scale](IMG_25714.png) + +### 2. AI Coding Productivity Doesn't Guarantee Software Quality + +One interesting part of the presentation was research showing that AI coding tools can **significantly increase initial development speed** while introducing **long-term maintenance problems.** The speaker referenced a study of 806 GitHub projects that adopted Cursor, compared against 1,380 similar projects. + +The findings presented included: + +- **28.6% to 281% increase** in code production during the initial adoption period. +- **41.6% increase** in code complexity over the longer term. +- **30.3% increase** in static analysis warnings. +- **7.03% increase** in duplicate code density. +- Initial productivity improvements disappeared within 1–2 months. + +The concern is that AI-generated code can introduce technical debt faster than teams can manage it. + +> Generating more code doesn't mean delivering better software. Code quality, maintainability and architectural consistency remain critical. + +![Evidence: AI Coding Productivity vs Software Quality](IMG_25716.png) + +### 3. Development Velocity Is Not the Same as Business Value + +The speaker presented another example showing the enormous amount of code and supporting artifacts produced with AI coding agents. + +Over 127 active development days, the project accumulated: + +- **311K lines of product code** +- **161K lines of tests** +- **53K lines of specifications and documentation** +- **858 commits** + +However, the central question was whether this increased development velocity translated into actual business value. + +![Development Velocity vs Delivery of Value](IMG_25717.png) + +**Key takeaway:** We should measure AI-assisted development by delivered business value, software quality and maintainability rather than lines of code or commit counts. + +### 4. Conceptual Entropy: A Hidden Problem in AI Development + +One of the most interesting concepts introduced was **Conceptual Entropy**. + +The speaker described the following progression: + +**Scale → Specification Inflation → Specification Compression → Conceptual Entropy** + +As AI-assisted projects grow, teams produce increasingly large specifications, documentation and instructions. To manage this complexity, they start compressing information into shorter descriptions, abbreviations and project-specific terminology. Eventually, important context gets lost. + +![Conceptual Entropy](IMG_25719.png) + +In one example, a project generated approximately **20 new terms across 12 sessions in just five days**, without maintaining a glossary. + +When an AI agent later encountered an abbreviation, it could no longer reliably determine what it meant. + +> AI agents can generate code and documentation quickly, but without consistent terminology and knowledge management, the project becomes increasingly difficult for both humans and AI to understand. + +### 5. AI Development Requires a Complete Engineering Lifecycle + +The speaker mentions that responsible AI engineering must cover the entire solution lifecycle: + +- **Discover:** Understand the problem, stakeholders and requirements. +- **Design:** Define the architecture, components and responsibilities. +- **Develop:** Build and integrate AI agents, models and other components. +- **Deploy & Monitor:** Evaluate performance, observe behavior and continuously improve the system. + +He highlighted three interconnected challenges: + +**Time Compression → Conceptual Entropy → Cognitive Overload** + +![AI Solution Lifecycle](IMG_25722.png) + +> Faster development increases the importance of disciplined engineering processes, documentation and human oversight. + +**AI can dramatically accelerate software development, but speed without engineering discipline creates new risks.** + +- More generated code doesn't automatically mean more business value. +- AI-assisted development can increase technical debt and complexity. +- Specifications and documentation need consistent terminology and structure. +- Human understanding must keep pace with AI-generated complexity. +- Engineering practices must evolve alongside increasingly autonomous AI systems. + +The biggest challenge isn't just making AI agents more capable. It's ensuring that **humans can continue to understand, maintain and control the systems those agents help create.** + +--- + +# What Coding Agents Still Get Wrong + +**Speaker:** Michał Prządka + +![What Coding Agents Still Get Wrong](IMG_25725.png) + +## Introduction + +Coding agents still make mistakes. Some are obvious, while others are difficult to recognize because the agents sound confident even when they are wrong. As Michał says he used almost all AI providers, coding assistants and has an hands-on experience. He has encountered some issues as belows: + +![How coding agents go wrong](IMG_25728.png) + +--- + +## 1. Confidently Making Things Up + +One of the most frustrating behaviors of coding agents is presenting assumptions as facts. The speaker showed an example where an agent claimed that it was 50 minutes into the hour. When challenged, the agent admitted: + +> I meant 50 minutes into the hour. That number was a guess. I never checked a clock, and I shouldn't have stated it as if I had. + +![Agent admitting it guessed the time](IMG_25727.png) + +The problem isn't necessarily that the agent cannot determine the time. It is that it may answer confidently without checking. + +This behavior becomes more dangerous in software development. + +An agent might claim that: + +- A test has passed without running it. +- A dependency supports a particular feature without checking the documentation. +- A file contains certain functionality without opening it. +- A bug has been fixed without verifying the result. + +> **Confidence is not evidence.** Agents should verify facts using available tools rather than relying on assumptions. When reviewing an agent's work, distinguish between what it actually verified and what it merely claimed. + +--- + +## 2. Bad Housekeeping + +Coding agents can leave a surprising amount of unnecessary material behind. The speaker shared an example of a development environment containing: **268 stale Git branches on a single laptop.** + +![268 stale branches](IMG_25731.png) + +This illustrates how agents can continuously create artifacts without taking responsibility for cleaning them up. + +Potential consequences include: + +- Unnecessary Git branches +- Temporary files left in repositories +- Unused scripts and generated files +- Confusing development environments +- Increasing maintenance overhead + +> Repository hygiene should be part of the agent's workflow. Finishing a task should include checking for unnecessary changes and cleaning up temporary artifacts. + +--- + +## 3. Writing and Building Too Much + +Coding agents sometimes produce significantly more than the task requires. The speaker illustrated this problem with an engineering-style drawing of a simple pile of sand. + +![Writing and building too much](IMG_25732.png) + +The illustration highlights a familiar problem: excessive engineering. + +Instead of implementing a straightforward solution, an agent may introduce: + +- Unnecessary abstractions +- Additional classes and interfaces +- Complex architectural patterns +- Excessive documentation +- Features that were never requested + +The result might be technically sophisticated but unnecessarily difficult to maintain. This is especially problematic in existing projects where consistency with the established architecture matters more than introducing new patterns. + +> **More code does not necessarily mean a better solution.** Coding agents should prefer the simplest implementation that satisfies the requirements and fits the existing architecture. + +--- + +## 4. Drowning in Their Own Memories + +Memory and persistent instructions are useful features of coding agents. However, they can also become a problem when agents continuously accumulate instructions, decisions and notes. The speaker showed an example containing numerous Markdown files, including: + +- `one_item_per_message.md` +- `decisions-one-per-message.md` +- `settled_decisions.md` + +![Drowning in their own memories](IMG_25734.png) + +We create many additional files containing instructions about planning, reviewing, naming, testing and other development activities. This creates an interesting problem. The more instructions an agent accumulates, the harder it may become to determine which ones are relevant, current or authoritative. + +> **The goal is not to maximize the amount of information available to an agent:** Keep instructions concise and remove outdated information. Avoid duplicating decisions across multiple files. Separate permanent project rules from temporary task context. + +--- + +## 5. Lacking Agency + +Although we call them agents, coding agents do not always behave autonomously. + +![Lacking agency](IMG_25735.png) + +An agent may finish one step and wait for instructions even when there are obvious next steps. This raises an important question about how much initiative an agent should take. The speaker compared two different system prompts from Codex and Claude Code. + +![Conflicting instructions about agent autonomy](IMG_25736.png) + +These instructions illustrate different approaches to agent behavior. One encourages initiative, while the other emphasizes explicit user approval. + +> Agent autonomy should depend on the task and its risks: +> +> * Autonomously action: Reading files and investigating problems can generally be performed. +> * Requires approval: Deleting files +> +> Effective agents need clear boundaries between autonomous execution and human decision-making. + +--- + +## 6. Handling Too Many Things at Once + +Coding agents can struggle when several unrelated tasks are combined into one conversation. + +![Many balls at once](IMG_25737.png) + +When an agent tries to handle too many things simultaneously, it may lose track of important details. It may also mix assumptions between tasks or make decisions before the user has provided sufficient context. + +> Breaking complex work into smaller, clearly defined tasks can improve reliability. + +For each task: + +1. Establish the context. +2. Identify the expected outcome. +3. Discuss relevant options when necessary. +4. Execute the selected approach. +5. Verify the result before moving forward. + +This is particularly important for long-running development sessions. + +--- + +## 7. Overestimating Their Own Work + +One of the most interesting examples in the presentation concerned task estimation. The speaker compared estimates produced by several coding agents against their actual execution times. + +![Coding agents overestimating their work](IMG_25738.png) + +| Coding Agent | Estimated Time | Actual Time | Overestimation | +|---|---:|---:|---:| +| OpenCode (GPT-5.5) | 18 hours | 6.1 minutes | 177× | +| Codex (GPT-5.5) | 13 hours | 8.5 minutes | 92× | +| pi (GPT-5.5) | 12 hours | 24.3 minutes | 30× | +| Claude Code (Fable 5) | 4 hours | 20.3 minutes | 12× | + +### Why does this happen? + +One possible explanation is that language models generate estimates based on patterns learned from descriptions of human software development. + +However, an AI agent's execution time can differ dramatically from the time a human developer would need. + +This explanation is an interpretation rather than a conclusion established by the slide. + +> **Do not treat an agent's time estimate as a reliable prediction.** For project planning, actual execution measurements and historical task data are more useful than unsupported estimates generated by an LLM. + +--- + +## 8. Relying on Memory Instead of Tools + +Coding agents sometimes answer questions from their training data even when they have tools available to verify the information. + +![Memory over tools](IMG_25739.png) + +This is particularly dangerous when dealing with rapidly changing technologies. + +Examples include: + +- Recently released library versions +- Updated API documentation +- Changed configuration options +- Deprecated functionality +- New framework features + +An agent might confidently recommend an outdated solution instead of checking the current documentation. + +> Agents should know when to retrieve information rather than rely on existing knowledge. For software development, current documentation, repository files and actual tool results should take priority over unsupported assumptions. + +--- + +## 9. Sycophancy: Always Agreeing with the User + +Sycophancy in Turkish "Dalkavukluk" mostly used for someone who's assisting to a manager or upper level politics. In AI it describes the tendency of AI systems to agree with users excessively, even when the users are incorrect. In some shops you see "Customer is always right." in shopping context you can say this kind of statement. But if we are asking something to AI, human is not always right. And you need to be aware of this AI behaviour. + +![Sycophancy: Human is always right](IMG_25740.png) + +Many times you see these statements in AI responses: + +- "You're absolutely right." +- "Great catch." +- "That's a fair criticism." +- "You make a valid point." +- "You're right to push back." + +The issue arises when an agent agrees without independently evaluating the user's statement. + +### Why does this matter? + +In software development, an agent that always agrees can reinforce incorrect technical decisions. For example, a developer might suggest an inefficient implementation, and the agent may support it rather than explaining the trade-offs. + +> **An agent that always agrees is not necessarily helping you.** A useful coding agent should be willing to disagree. It should challenge incorrect assumptions, explain technical trade-offs and provide evidence for its recommendations. + +--- + +## 10. Treating Written Information as Correct + +Coding agents frequently rely on written instructions, documentation and existing code. But written information is not automatically correct. + +![Taking written information as correct](IMG_25741.png) + +In the upper image it makes an analogy to show you; a system that appears logical locally but becomes impossible when viewed as a whole. + +> Agents should evaluate information critically, including instructions found in project files. When different sources contradict each other, the agent should identify the conflict rather than silently choosing one interpretation. + +--- + +## 11. Tunnel Vision + +Coding agents can become overly focused on a particular interpretation of a problem. The speaker illustrated this with an elephant being examined by several people, each looking at a different part of the animal. + +![Tunnel vision](IMG_25742.png) + +Focusing on individual details can prevent someone from understanding the complete picture. In software development, an agent may: + +- Investigate only one possible cause of a bug. +- Modify a component without considering its dependencies. +- Optimize one function while ignoring system-level performance. +- Follow an initial assumption despite contradictory evidence. + +> Agents should periodically reconsider their understanding of a problem. + +--- + +## 12. Theater Over Delivery + +One of the strongest points in the presentation was the difference between claiming that something has been done and actually delivering it. + +![Theater over delivery](IMG_25744.png) + +### Example 1 + +**Agent initially said:** + +> Seeing the resets is automatic from now on. + +**After one question:** +> No, it was not fixed when I said it. + +This shows how an agent can create the impression of progress or deliberate planning without sufficient evidence. + +> **Evaluate agents by verified outcomes, not by how convincingly they describe their work.** + +A completed task should have observable evidence. + +For example: + +- Code changes are present. +- Tests have been executed. +- Expected behavior has been verified. +- Relevant errors have been resolved. +- Remaining limitations are clearly documented. + +--- + +## Coding Agents Are Getting Better + +METR measuring the length of software tasks that AI models can complete successfully. The chart was last updated on September 8, 2026. This chart is retrieved from https://metr.org/blog/2025-03-19-measuring-ai-ability-to-complete-long-tasks/ + +![METR research on coding agent capabilities](metr.png) + +**AI agents' task-completion time horizon has been doubling approximately every seven months**. In other words, AI agents are becoming capable of independently handling increasingly complex and time-consuming tasks. However, a two-hour time horizon at 50% success means the agent has only a 50% chance of completing a task that takes a human two hours, not that it can reliably complete every two-hour task. If this trend continues, AI agents could eventually handle projects that currently take human developers days or weeks. + +--- + +## Learn the Harness. Use All of It. + +![Learn the harness. Use all of it.](IMG_25746.png) + + + +- **Context**: These elements help the agent understand project conventions, constraints and previous decisions. +- **Workflows**: These components support more structured execution and automation. +- **Capabilities**: These capabilities allow the agent to interact with external systems, inspect environments and verify information. + +> The language model is only one component of a coding agent. Its effectiveness also depends on the surrounding tools, instructions and workflows. Developers should learn how to configure and use these capabilities instead of relying exclusively on natural-language prompts. + +--- + +# City Life, Culture, History in Poland + +After the conference, I spent some time walking around Warsaw and Krakow and most of that time went to museums. As a Turk, I was surprised by how much Ottoman history I found there. Poland and the Ottoman Empire were neighbors for centuries. They fought wars, signed peace treaties, traded and influenced each other's culture, and you can see this everywhere: in paintings, armor, tents, carpets and even in a metro station. + +![image-20261028193122774](image-20261028193122774.png) + +*A tile panel of the Panorama Istanbul. [Warsaw Metro Politechnika Station](https://www.flickr.com/photos/129661548@N06/17071403919/). Built on 24.04.2015. Turkey gave it to Poland to celebrate 600 years of diplomatic relations, which started in 1414. The sign says "Old Friends, New Leaders", which I think sums up the relationship between the two countries* + +--- + + + +## ROYAL CASTLE, WARSAW + +Royal Castle is equivalent to Topkapı Palace in Istanbul. The first museum was the Royal Castle in Warsaw, the former residence of the Polish kings. The royal apartments have a surprising number of Ottoman-themed works. The official website of Royal Castle is https://www.zamek-krolewski.pl/ + +![image-20261028194035176](image-20261028194035176.png) + +An 18th-century painting in the "[Turquerie](https://en.wikipedia.org/wiki/Turquerie)" style, which was very popular in European courts at that time. An Ottoman gentleman sits on a fur next to a woman holding a long pipe, while a girl in front of them plays mangala, the traditional Turkish board game. +[More info about mangala game](https://en.wikipedia.org/wiki/Mangala_(game)). Painter: Johann Samuel Mock, a German painter works in Polish palace. Painted in 1730–1735. Title: Mangala players. [Click here for Wikipedia information](https://commons.wikimedia.org/wiki/File:Mock_Mangala_players.jpg). + +**When and Why Happened Turquerie Period?** + +After the 1683 Siege of Vienna: With the retreat of the Ottoman military threat, the dread and fear once felt toward the Turks across Europe gave way to intense aesthetic curiosity and fascination. War spoils captured from Ottoman camps such as grand tents, coffee supplies, tulip bulbs and luxurious textiles, planted the initial seeds of this cultural vogue. +The 1721 Paris Embassy of Yirmisekiz Mehmed Çelebi: The arrival of the Ottoman diplomatic delegation in Paris caused a sensation; their distinct sartorial elegance, manners and demeanor sparked a widespread Ottoman craze (*Turquerie*) within both the French royal court and the broader public. + +--- + +## ROYAL CASTLE, WARSAW + +![image-20261028194132013](image-20261028194132013.png) + +Another Turquerie painting called: "Harem Scene with Drinking Coffee.". Painted in 1730-1735. An Ottoman man and women resting in a garden while drinking Turkish coffee. Painter: [Johann Samuel Mock](https://www.wikidata.org/wiki/Q11727772). European aristocrats were fascinated by Ottoman clothing, coffee culture and daily life and paintings like this were made to decorate palaces. [Wikipedia information](https://commons.wikimedia.org/wiki/File:Johann_Samuel_Mock_-_Scena_haremowa_przy_kawie.jpg) + +--- + +## ROYAL CASTLE, WARSAW + +![image-20261028194158435](image-20261028194158435.png) + +[This porcelain plate](https://kolekcja.zamek-krolewski.pl/obiekt-11210-podstawka-pod-owalny-koszyk-azurowy-z-serwisu-sultanskiego) was part of the famous sultan's service ordered from the Royal Farfur Factory in Belvedere by Stanisław August in 1776. It was a diplomatic gift from the "Polish King II. Stanisław August" to "I. Sultan Abdül Hamid". The Turkish ambassador in Poland, Numan Bey delivered it in 1777 to Ottoman Topkapı Palace. Most probably a collationer brought the item to Poland again. +On the plate it's written in Ottoman language as below: + +> *"The King of Poland presents these gifts to the Sultan of the Ottoman dynasty as a token of his deepest affection and sincere good wishes. From the capital city of Warsaw"* + +--- + +## ROYAL CASTLE, WARSAW + +![image-20261028194239145](image-20261028194239145.png) + +[The Peace of Khotyn (Hotin) 1621](https://zbiory.mnk.pl/pl/najcenniejsze/katalog/319308). Painting by Italian Marcello Bacciarelli after 160 years of the war. It shows Polish and Ottoman envoys shaking hands after the Battle of Khotyn. The battle is between Ottoman Sultan Osman II (Genc Osman) led a military campaign against the Polish–Lithuanian Commonwealth. After weeks of intense fighting, neither side achieved a decisive victory. And they're making an agreement. On the left side shaking hand is [Ottoman Grand Vizier Dilaver Pasha](https://en.wikipedia.org/wiki/Dilaver_Pasha) (Osmanlı Sadrazamı). On the right side shaking hand is Stanisław Lubomirski the commander of Poland (Lehistan). The painting underwent restoration funded by the Turkish Embassy in Warsaw with support from the Turkish Cooperation and Coordination Agency (TİKA). + +--- + +## Wilanów Palace Museum of King Jan III, WARSAW + +![image-20261028193240037](image-20261028193240037.png) + +This painting shows the grand arrival of the Polish ambassador in Istanbul in 29 April 1790, during Sultan Selim III's reign. The Ottomans welcomed him with a magnificent ceremony, including Janissaries, horses and hundreds of attendants. At that time, Poland was looking to the Ottoman Empire for support against Russia. A fascinating piece of Turkish-Polish history, [click here for more info](https://wilanow-palac.pl/pasaz-wiedzy/o-strojach-uczestnikow-ostatniego-polskiego-poselstwa-w-stambule-w-1790-roku). Wilanov museum official website is https://wilanow-palac.pl/ + +--- + +## WAVEL ROYAL CASTLE, KRAKOW + +![image-20261028193344487](image-20261028193344487.png) + +This massive painting shows the Battle of Lepanto in 1571, when the Ottoman navy suffered a major defeat against a Christian alliance (Holy League). I took the photo in Wawel Castle / Krakow. Painted by Italian artist Tommaso Dolabella around 1632. It shows the naval battle on the right and a religious procession on the left. Interestingly, the painting is also linked to the 1621 Battle of Khotyn (Inebahtı Deniz Muharebesi) between the Ottomans and the Polish-Lithuanian forces. + + +![image-20261028193446603](image-20261028193446603.png) + +This sea war started by Papa V. Pius because at that time Ottomans were very powerful with Barbaros Hayrettin Pasa and going to invade Cyprus. Then Papa started the Holy League which consists of Spain, Venice ve Vatican. At that time Poland was not in that union but later Bractwo Różańcowe requested this painting to show the Catholics union and painted in Dominiken Church in Poznań. A detail from the Lepanto painting. The painter used it as propaganda: devils drag Ottoman sailors into a boat, while archers keep fighting on the galleys. + +![image-20261028193459653](image-20261028193459653.png) + +Another detail from the same painting: burning galleys, Ottoman flags with crescents and stars, and sailors falling into the sea. The level of detail is impressive considering how old the canvas is. In this war, the Ottoman general and commander Müezzinzade Ali Paşa was died. + +![image-20261028220940161](image-20261028220940161.png) + +And on the left side of the painting Catholic priests pray for victory in the foreground. There's a message on this area of the painting: the victory over the Ottoman fleet was attributed not only to military strength but also to prayer and divine intervention. [Click here to read more about it.](https://wawel.krakow.pl/wydarzenie/bitwy-pod-lepanto-i-pod-chocimiem-obraz-tomasza-dolabelli-w-zbiorach-zamku-krolewskiego-na-wawelu-i-jego-ikonografia) + + + +--- + +## WAVEL ROYAL CASTLE, KRAKOW + +![image-20261028193532292](image-20261028193532292.png) + +This painting shows the Battle of Vienna in 1683, one of the biggest turning points in Ottoman history. The Ottoman army, led by Kara Mustafa Pasha (Sadrazam Merzifonlu Kara Mustafa Paşa), was defeated by a European coalition led by Polish King Jan III Sobieski. The painting captures the chaos of the battle, with cavalry fighting, fallen soldiers and Ottoman military banners. This defeat marked the beginning of a long period of Ottoman territorial losses in Europe. Painted in the Netherlands shortly after 1683, it is now displayed at Wawel Royal Castle in Kraków, Poland. [Original and better contrast of this painting](https://upload.wikimedia.org/wikipedia/commons/6/6c/Pauwel_Casteels_-_Battle_of_Vienna_-_Google_Art_Project.jpg). For more info about this painting https://cyfrowy.wawel.krakow.pl/obiekt/6114eff470d6cc8c120730fe + +![image-20261028224912415](park-ottoman.png) + +And here you can see it's the statue of Polish King Jan III Sobieski, who defeated the Ottoman army at the Battle of Vienna in 1683. I took the picture in Łazienki Royal Park, Warsaw. The king is riding over two fallen Ottoman soldiers, symbolizing his victory. Created by Franciszek Pinck in 1788, the monument also had a political purpose. Interestingly, Poland was trying to build an alliance with Russia against the Ottomans at that time. Just two years later, Poland changed direction and sought Ottoman support against Russia! For more info about this statue: https://www.lazienki-krolewskie.pl/pl/pomniki/pomnik-jana-iii-sobieskiego + +Interestingly, the king of Austria I. Leopold, called Poland to the Vienna battle because he said it's a Christian & Islam war. But after 100 years, Poland was invaded the country which they helped Austria and Russia & Prussia (1772). In 1795, Poland disappeared from the map of Europe for 123 years! Interestingly, the Ottoman Empire never formally recognized the partitions of Poland. In 1842, the Ottomans allowed Polish refugees to establish a settlement near Istanbul, called Adampol (today's [Polonezköy](https://en.wikipedia.org/wiki/Polonezk%C3%B6y)). And from that time, it's a fascinating piece of Turkish-Polish friendship that continues to this day! + +--- + +## WAVEL ROYAL CASTLE, KRAKOW + +![image-20261028193551122](image-20261028193551122.png) + +Ottoman mail-and-plate armor. The steel plates on the chest are engraved with Arabic inscriptions and floral patterns. It looks heavy, but it was designed to give a horseman flexibility. I took these pictures in Wavel Castle in Krakow. In the Arabic texts are from (Surah Al-Fath / Fetih Suresi) and names of Allah: + +- **"الفتاح"** (*el-Fettâh*) : The Granter of Victory +- **"العالم"** (*el-Âlim*): The All-Knowing +- **"الحاكم"** (*el-Hâkim*): The Ruler +- **"الملك"** (*el-Melik*): The King +- **الغالب** (*el-Gâlib*): The Conqueror + +You can visit this gallery virtually at https://3d.wawel.krakow.pl/namioty-tureckie/index.htm (SSL doesn't work, continue unsafe). And for the other ottoman items see https://wawel.krakow.pl/en/exhibition-constant/ottoman-tukish-tents. + +![image-20261028193559288](image-20261028193559288.png) + +Ottoman turban helmets and Pair of Buturluks (Greaves) from the early 16th century and a pair of vambraces (arm guards) covered with engraved calligraphy. Many objects like these reached Poland as war trophies and others came through trade and diplomacy. This is very nice buturluks and probably owned by a higher Ottoman comander. On the items you can see the Arabic text: + +* **"الخلد"** (*el-Huld*) from this surah: **"خلّد الله ملكه وسلطانه"** (*Halladallâhu mülkehû ve sultâneh*. In Turkish: "Allah mülkünü ve saltanatını ebedî kılsın") +* **"السلطان"** (*es-Sultân*) +* **"العادل"** (*el-Âdil*) +* **"المجاهد... المؤيد"** (*el-Mücâhid... el-Müeyyed* — "Cihad eden, Allah tarafından desteklenen/muzaffer kılınan") +* **"العطاء"** (*el-Atâ* — İhsan, bağış) +* **"العظمة لله"** (*el-Azametü lillâh* — "Büyüklük/azamet Allah'a mahsustur") +* **"نصر من الله وفتح قريب"** (*Nasrun minallâhi ve fethun karîb* — Saff Suresi 13: "Allah'tan bir yardım ve yakın bir fetih") + +--- + +## WAVEL ROYAL CASTLE, KRAKOW + +![Broken Ottoman Turban Helmet](turban-helment.png) + +A close-up of the turban helmet. The fluted dome imitates the folds of a turban, and the engraved band at the bottom is still clearly visible after 500 years. On these helmets mostly written **Âyetü'l-Kürsî** from Quran (*Allâhu lâ ilâhe illâ hüve'l-hayyu'l-kayyûm...*). The helmet was broken most probably with the hammer as you see on the right side, in the Polish army it's called [Nadziak](https://pl.wikipedia.org/wiki/Nadziak). + +--- + +## WAVEL ROYAL CASTLE, KRAKOW + +![image-20261028193625516](image-20261028193625516.png) + +A painting that most likely shows the meeting of the Polish King John III Sobieski and the Holy Roman Emperor Leopold I after the Battle of Vienna in 1683. In the background you can see the spire of Vienna and the remains of the Ottoman camp. + +--- + +## WAVEL ROYAL CASTLE, KRAKOW + +![image-20261028193638094](image-20261028193638094.png) + +This 17th-century blade of the Ottoman Grand Vizier Merzifonlu Kara Mustafa Pasha, is crafted from watered Damascus steel with gold koftgari inlay. It notably features a rare spine groove containing free-rolling lead pellets designed to shift the balance forward upon impact and emit an intimidating sound during a strike. The blade bears classical Islamic inscriptions: along the spine's gold cartouche is an Arabic prayer of devotion, reading **"عماد فضل الله تعالى العلي الملك"** / **"توكلت على الله الملك"** (*Turkish: "Yüce ve Mülk sahibi olan Allah’ın lütfuna sığındım / Allah'a tevekkül ettim"*; *English: "Reliance upon the grace of Allah, the Sublime, the Sovereign"*), while the cartouche at the base bears the maker's mark traditionally inscribed as **"عمل أسد الله"** (*Amel-i Esedullâh* / *Türkçe: "Esedullah'ın eseri/işi"*; *English: "Work of Asadullah"*), invoking the renowned 17th-century master swordsmith. + +![image-20261028233506227](image-20261028233506227.png) + +![image-20261028235530330](image-20261028235530330.png) + +![image-20261028193659087](image-20261028193659087.png) + +A close-up of the blade: an inscription inlaid with gold and an engraved ornament below it. This sword was taken from Vienna Battle in 1683 from the Ottoman commander. Kara Mustafa Paşa was a very ambitious man, his goal was to bring Central Europe entirely under Ottoman rule and to conquer Vienna, it's called Kızıl Elma regarded as the "Red Apple" which means conquer never stops until Ottoman finishes conquering the next targetted country. + +--- + +## WAVEL ROYAL CASTLE, KRAKOW + +![image-20261028193824741](image-20261028193824741.png) + +Me in front of a 17th-century Ottoman tent (Otağ-ı Hümayun). These tents were captured at the Battle of Vienna in 1683 and brought to Poland as trophies. Standing in front of one in person is something else: they are huge and beautifully embroidered. + +![image-20261028193722271](image-20261028193722271.png) + +Tent's outer surfaces were typically made linen or canvas, materials resistant to wind, sun and rain; their interiors, meanwhile, were decorated much like a room in a grand mansion. An Ottoman commander's tent was basically a mobile palace. These structures were generally vast complexes, comprising elements such as a main living area, a *divanhane* (reception hall), a *hamam* (bathhouse) and a *haremlik* (private quarters) and all interconnected by corridors. + +![image-20261028193733622](image-20261028193733622.png) + +An Anatolian prayer rug (seccade) inside the tent. The niche (mihrab) design points toward the qibla (where Prophet Mohammed's graveyard). This prayer carpet is mostly probably from the city of Gördes/Manisa or Uşak in Turkey. This carpet is probably 350 years old still its colors are amazingly shining. + +--- + +## WAVEL ROYAL CASTLE, KRAKOW + +![image-20261028193801000](image-20261028193801000.png) + +A showcase of Eastern armor: a Persian "four mirrors" (chahar-aina) armor, gold-decorated shields from India and Persia, and two pairs of 17th-century Turkish vambraces. The Polish nobility loved this style, and it strongly influenced their own fashion and military equipment. + +--- + +## WAVEL ROYAL CASTLE, KRAKOW + +![image-20261028193845135](image-20261028193845135.png) + +--- + +An Ottoman saddle with a velvet seat and a saddle cloth embroidered with metal thread, together with a saber. Horses were central to both the Ottoman and the Polish armies and their equipment was as decorated as the riders' clothes. + +![image-20261028193855490](image-20261028193855490.png) + +Mail-and-plate armor shirts displayed in front of a prayer rug. Seeing a whole row of them together gives you an idea of what an Ottoman cavalry unit looked like. + +--- + +![image-20261028193925526](image-20261028193925526.png) + +And finally, from the museums back to the streets: a Turkish flag on a historic building on Krakowskie Przedmieście, next to Kino Kultura in Warsaw. This is the only foreign flag I see on the kings road to the old town of Warsaw. This building is used for Turkish and Polish cultural events. It was nice to see our flag in the heart of the city, 600 years after the two countries first established relations. + +**This conference trip was a great mix of AI and technical learning, along with cultural and historical discoveries.** + +See you next time, somewhere else in the world! diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/collage.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/collage.png new file mode 100644 index 0000000000..ce16a267be Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/collage.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/cover.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/cover.png new file mode 100644 index 0000000000..c33ef271e0 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/cover.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/first-slide-of-my-presentation.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/first-slide-of-my-presentation.png new file mode 100644 index 0000000000..2ebd77d8d4 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/first-slide-of-my-presentation.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028140851318.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028140851318.png new file mode 100644 index 0000000000..f419a1a0e7 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028140851318.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145448700.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145448700.png new file mode 100644 index 0000000000..3826432f7a Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145448700.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145539256.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145539256.png new file mode 100644 index 0000000000..19577584a7 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145539256.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145601171.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145601171.png new file mode 100644 index 0000000000..0fd272c9be Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145601171.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145608349.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145608349.png new file mode 100644 index 0000000000..0fd272c9be Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145608349.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145648827.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145648827.png new file mode 100644 index 0000000000..efebba4ab7 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145648827.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145747056.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145747056.png new file mode 100644 index 0000000000..1674f89834 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028145747056.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028175946044.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028175946044.png new file mode 100644 index 0000000000..8106163846 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028175946044.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193122774.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193122774.png new file mode 100644 index 0000000000..7426d473c6 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193122774.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193240037.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193240037.png new file mode 100644 index 0000000000..17eb05d572 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193240037.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193344487.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193344487.png new file mode 100644 index 0000000000..6dcb4d347b Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193344487.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193446603.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193446603.png new file mode 100644 index 0000000000..89b9f90edd Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193446603.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193459653.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193459653.png new file mode 100644 index 0000000000..04d25f006d Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193459653.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193532292.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193532292.png new file mode 100644 index 0000000000..d703377647 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193532292.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193551122.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193551122.png new file mode 100644 index 0000000000..e94aba89bd Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193551122.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193559288.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193559288.png new file mode 100644 index 0000000000..36b6914156 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193559288.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193625516.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193625516.png new file mode 100644 index 0000000000..d8878f01dc Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193625516.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193638094.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193638094.png new file mode 100644 index 0000000000..173d5f14d5 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193638094.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193659087.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193659087.png new file mode 100644 index 0000000000..71be0d7635 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193659087.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193714852.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193714852.png new file mode 100644 index 0000000000..d29a0ccfdd Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193714852.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193722271.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193722271.png new file mode 100644 index 0000000000..bc3816529b Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193722271.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193733622.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193733622.png new file mode 100644 index 0000000000..f699e82912 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193733622.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193801000.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193801000.png new file mode 100644 index 0000000000..9d0740cb7e Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193801000.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193824741.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193824741.png new file mode 100644 index 0000000000..9557948439 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193824741.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193845135.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193845135.png new file mode 100644 index 0000000000..1686aeef24 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193845135.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193855490.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193855490.png new file mode 100644 index 0000000000..1938b9a98a Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193855490.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193925526.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193925526.png new file mode 100644 index 0000000000..4d2e609f64 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028193925526.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194035176.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194035176.png new file mode 100644 index 0000000000..3d13cfd2c3 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194035176.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194132013.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194132013.png new file mode 100644 index 0000000000..794c9db3ed Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194132013.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194158435.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194158435.png new file mode 100644 index 0000000000..62bcf8e33f Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194158435.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194239145.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194239145.png new file mode 100644 index 0000000000..1c3ed60196 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028194239145.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028220940161.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028220940161.png new file mode 100644 index 0000000000..273463ce4b Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028220940161.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028224912415.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028224912415.png new file mode 100644 index 0000000000..e7a92ae83f Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028224912415.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028233506227.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028233506227.png new file mode 100644 index 0000000000..db10b2b2cd Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028233506227.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028235530330.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028235530330.png new file mode 100644 index 0000000000..ad29d3b8cc Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/image-20261028235530330.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/metr.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/metr.png new file mode 100644 index 0000000000..a88aa1aa3f Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/metr.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/my-talk.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/my-talk.png new file mode 100644 index 0000000000..7eeae32618 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/my-talk.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/park-ottoman.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/park-ottoman.png new file mode 100644 index 0000000000..340883b951 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/park-ottoman.png differ diff --git a/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/turban-helment.png b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/turban-helment.png new file mode 100644 index 0000000000..ba4c1d13d9 Binary files /dev/null and b/docs/en/Community-Articles/2026-10-29-DevAI-Conference-Review/turban-helment.png differ diff --git a/docs/en/deployment/configuring-openIddict.md b/docs/en/deployment/configuring-openIddict.md index 321d8503c9..3aec2f8301 100644 --- a/docs/en/deployment/configuring-openIddict.md +++ b/docs/en/deployment/configuring-openIddict.md @@ -51,6 +51,8 @@ You can use the `dotnet dev-certs https -v -ep openiddict.pfx -p 00000000-0000-0 > `00000000-0000-0000-0000-000000000000` is the password of the certificate, you can change it to any password you want. +> The solutions created by ABP Studio read the password of the certificate from the `AuthServer:CertificatePassPhrase` setting in the `appsettings.json` file. Use that value as the password if you generate the certificate again. + > Also, please remember to copy `openiddict.pfx` to the [Content Root Folder](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.hosting.ihostingenvironment.contentrootpath?view=aspnetcore-7.0) of the `AuthServer` website. > It is recommended to use **two** RSA certificates, distinct from the certificate(s) used for HTTPS: one for encryption, one for signing. diff --git a/docs/en/deployment/ssl.md b/docs/en/deployment/ssl.md index 515aac4c38..868e9f0f77 100644 --- a/docs/en/deployment/ssl.md +++ b/docs/en/deployment/ssl.md @@ -136,7 +136,7 @@ You will may see the following SSL certificate errors in your browser when you t ## References -* [ABP IIS Deployment](./index.md) +* [ABP IIS Deployment](../solution-templates/layered-web-application/deployment/deployment-iis.md) * [acme.sh](https://github.com/acmesh-official/acme.sh) * [acme.sh DNS API](https://github.com/acmesh-official/acme.sh/wiki/dnsapi#dns_cf) * [HTTPS in ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/security/enforcing-ssl) diff --git a/docs/en/framework/architecture/domain-driven-design/unit-of-work.md b/docs/en/framework/architecture/domain-driven-design/unit-of-work.md index 613620ab13..6b6de422a1 100644 --- a/docs/en/framework/architecture/domain-driven-design/unit-of-work.md +++ b/docs/en/framework/architecture/domain-driven-design/unit-of-work.md @@ -361,6 +361,30 @@ app.UseUnitOfWork(); app.UseConfiguredEndpoints(); ```` +By default, the middleware completes the unit of work at the end of the request pipeline. If the response has already started, a failure (like a transaction commit or a unit of work event handler failure) can not change the status code, so the client may still get a success response. + +`UseUnitOfWork` also adds the exception handling middleware. If you don't use `UseUnitOfWork`, add `UseAbpExceptionHandling` to the same place: + +````csharp +app.UseAbpExceptionHandling(); +app.UseConfiguredEndpoints(); +```` + +#### AbpAspNetCoreUnitOfWorkOptions + +`AbpAspNetCoreUnitOfWorkOptions` is used to configure the middleware: + +````csharp +Configure(options => +{ + options.IgnoredUrls.Add("/api/my-streaming-endpoint"); +}); +```` + +* `IgnoredUrls` (`List`): The middleware is disabled for the requests whose path starts with one of these values. It is also disabled for the [SignalR](../../real-time/signalr.md) hub requests. +* `CompleteUnitOfWorkOnResponseStarting` (`bool`, default: `false`): Completes the unit of work just before the response starts, so a failure can return an error status code (with an empty response body). The changes are committed at that point, so a later failure can not roll them back. It is not suitable for streaming responses. +* `CompleteUnitOfWorkOnResponseStartingUrls` (`List`): Completes the unit of work just before the response starts for the requests whose path starts with one of these values, even if `CompleteUnitOfWorkOnResponseStarting` is `false`. The [OpenIddict module](../../../modules/openiddict.md) adds some of its server endpoints, like the token endpoint, to this list. + ## See Also * [Video tutorial Code](https://abp.io/video-courses/essentials/unit-of-work-code) diff --git a/docs/en/framework/fundamentals/dynamic-claims.md b/docs/en/framework/fundamentals/dynamic-claims.md index 6481654ef9..4b188feff3 100644 --- a/docs/en/framework/fundamentals/dynamic-claims.md +++ b/docs/en/framework/fundamentals/dynamic-claims.md @@ -74,7 +74,57 @@ There are three pre-built implementations of `IAbpDynamicClaimsPrincipalContribu ### IAbpDynamicClaimsPrincipalContributor -If you want to add your own dynamic claims contributor, you can create a class that implement the `IAbpDynamicClaimsPrincipalContributor` interface (and register it to the [dependency injection](./dependency-injection.md) system. ABP will call the `ContributeAsync` method to get the claims. It better to use a kind of cache to improve the performance since that is a frequently executed method (in every HTTP request). +If you want to add your own dynamic claims contributor, you can create a class that implements the `IAbpDynamicClaimsPrincipalContributor` interface and register it with the [dependency injection](./dependency-injection.md) system. ABP will call the `ContributeAsync` method to get the claims. It's better to use a cache to improve the performance since this method is executed frequently (in every HTTP request). + +A custom `IAbpDynamicClaimsPrincipalContributor` only runs in the application that registers it. The claims it adds aren't written to the Identity module's dynamic claims cache, so other applications (such as the UI application of a tiered solution) don't get them. To add a claim that is cached and shared like the built-in ones, see the next section. + +### Adding a Custom Dynamic Claim + +The Identity module builds its dynamic claims cache from the claims principal it creates for the user, which also runs the `IAbpClaimsPrincipalContributor` implementations, and only keeps the claim types listed in `AbpClaimsPrincipalFactoryOptions.DynamicClaims`. So, implement an `IAbpClaimsPrincipalContributor` and add the claim type to `DynamicClaims`. Example contributor: + +````csharp +public class MyClaimContributor : IAbpClaimsPrincipalContributor, ITransientDependency +{ + public Task ContributeAsync(AbpClaimsPrincipalContributorContext context) + { + var identity = context.ClaimsPrincipal.Identities.FirstOrDefault(); + var userId = identity?.FindUserId(); + if (identity == null || userId == null) + { + return Task.CompletedTask; + } + + // Get the value for userId.Value from your own data source + identity.AddOrReplace(new Claim("MyClaim", "MyValue")); + return Task.CompletedTask; + } +} +```` + +Then add the claim type to `DynamicClaims` in the `ConfigureServices` method of your module: + +````csharp +public override void ConfigureServices(ServiceConfigurationContext context) +{ + context.Services.Configure(options => + { + options.DynamicClaims.Add("MyClaim"); + }); +} +```` + +Place the contributor and the configuration in a module used by every application that fills the Identity module's dynamic claims cache. In the tiered startup template, both the authentication server and the HttpApi.Host use the Identity module through your solution's `.Domain` project, so your domain module is a good place. The UI application of a tiered solution gets the dynamic claims from the shared cache through the `RemoteDynamicClaimsPrincipalContributor`, so it doesn't need the contributor or the configuration. + +Cache entries created before you add the claim type don't contain it, so the claim isn't available for a user until the entry [expires](../../modules/identity.md#dynamic-claims-cache) or is removed (for example, when the user logs in again). + +When the claim's source data changes, remove the user's cache entry so the next request rebuilds it. Updating the `IdentityUser` entity already does this. For other data sources, inject `IdentityDynamicClaimsPrincipalContributorCache` and call its `ClearAsync` method. The cache key is also prefixed with the current tenant, so change to the user's tenant if you are not already in it: + +````csharp +using (CurrentTenant.Change(tenantId)) +{ + await _dynamicClaimsCache.ClearAsync(userId, tenantId); +} +```` ## AbpClaimsPrincipalFactoryOptions diff --git a/docs/en/framework/infrastructure/audit-logging.md b/docs/en/framework/infrastructure/audit-logging.md index 8c13979c68..dc8564ec0c 100644 --- a/docs/en/framework/infrastructure/audit-logging.md +++ b/docs/en/framework/infrastructure/audit-logging.md @@ -111,7 +111,9 @@ Configure(options => }); ```` -`IgnoredUrls` is the only option. It is a list of ignored URLs prefixes. In the preceding example, all URLs starting with `/products` will be ignored for audit logging. +`IgnoredUrls` is a list of ignored URLs prefixes. In the preceding example, all URLs starting with `/products` will be ignored for audit logging. + +`IgnoredHubTypes` is a list of ignored [SignalR](../real-time/signalr.md) hub types. The audited services called by these hubs are still audit logged. ## AbpAspNetCoreAuditingUrlOptions @@ -185,8 +187,6 @@ The action is still audit logged and the parameter name is still written, but it [Application service](../architecture/domain-driven-design/application-services.md) method calls also included into the audit log by default. You can use the `[DisableAuditing]` in service or method level. -> **Blazor Server limitation (Entity history):** In `Blazor Server` applications, entity change history is currently not guaranteed to be complete for every UI interaction. Blazor Server uses SignalR-based event handling, and under some flows the audit scope/action tracking may not align with `DbContext.SaveChanges`, which can cause missing or partial entity change records. This is a known platform-level limitation and not a regular configuration issue. See [#11682](https://github.com/abpframework/abp/issues/11682) for related discussions. - #### Enable/Disable for Other Services Action audit logging can be enabled for any type of class (registered to and resolved from the [dependency injection](../fundamentals/dependency-injection.md)) while it is only enabled for the controllers and the application services by default. diff --git a/docs/en/framework/infrastructure/current-user.md b/docs/en/framework/infrastructure/current-user.md index f7d7654f68..96206d3d97 100644 --- a/docs/en/framework/infrastructure/current-user.md +++ b/docs/en/framework/infrastructure/current-user.md @@ -198,4 +198,4 @@ public class DepartmentClaimsPrincipalContributor : } ```` -This contributor runs during regular principal creation. Use `IAbpDynamicClaimsPrincipalContributor` when claims need to be refreshed by the [dynamic claims](../fundamentals/dynamic-claims.md) pipeline. +This contributor runs during regular principal creation. To refresh such a claim through the [dynamic claims](../fundamentals/dynamic-claims.md) system, also add its type to `AbpClaimsPrincipalFactoryOptions.DynamicClaims`. See [Adding a Custom Dynamic Claim](../fundamentals/dynamic-claims.md#adding-a-custom-dynamic-claim). diff --git a/docs/en/framework/infrastructure/data-filtering.md b/docs/en/framework/infrastructure/data-filtering.md index 341c790277..9657999bca 100644 --- a/docs/en/framework/infrastructure/data-filtering.md +++ b/docs/en/framework/infrastructure/data-filtering.md @@ -224,9 +224,9 @@ protected override bool ShouldFilterEntity(IMutableEntityType entityTyp return base.ShouldFilterEntity(entityType); } -protected override Expression> CreateFilterExpression(ModelBuilder modelBuilder) +protected override Expression> CreateFilterExpression(ModelBuilder modelBuilder, EntityTypeBuilder entityTypeBuilder) { - var expression = base.CreateFilterExpression(modelBuilder); + var expression = base.CreateFilterExpression(modelBuilder, entityTypeBuilder); if (typeof(IIsActive).IsAssignableFrom(typeof(TEntity))) { @@ -274,9 +274,9 @@ protected override bool ShouldFilterEntity(IMutableEntityType entityTyp return base.ShouldFilterEntity(entityType); } -protected override Expression> CreateFilterExpression(ModelBuilder modelBuilder) +protected override Expression> CreateFilterExpression(ModelBuilder modelBuilder, EntityTypeBuilder entityTypeBuilder) { - var expression = base.CreateFilterExpression(modelBuilder); + var expression = base.CreateFilterExpression(modelBuilder, entityTypeBuilder); if (typeof(IIsActive).IsAssignableFrom(typeof(TEntity))) { @@ -294,19 +294,19 @@ protected override Expression> CreateFilterExpression() == true) + if (abpEfCoreCurrentDbContext.GetRequiredContext().DataFilter.IsEnabled()) { // isActive == true return new SqlBinaryExpression( ExpressionType.Equal, isActive, - new SqlConstantExpression(Expression.Constant(true), boolParam.TypeMapping), + new SqlConstantExpression(true, typeof(bool), isActive.TypeMapping ?? boolParam.TypeMapping), boolParam.Type, boolParam.TypeMapping); } // empty where sql - return new SqlConstantExpression(Expression.Constant(true), boolParam.TypeMapping); + return new SqlConstantExpression(true, typeof(bool), boolParam.TypeMapping); }); } @@ -327,6 +327,42 @@ public override string GetCompiledQueryCacheKey() } ```` +The `HasTranslation` callback runs only when EF Core compiles the query, and the generated SQL is cached. That's why the example adds `IsActiveFilterEnabled` to the cache key. + +The default compiled-query cache key does not include the tenant ID. ABP's built-in tenant filter uses a runtime parameter, so queries can be reused across tenants. + +> If your custom `HasTranslation` callbacks read tenant-specific values at compilation time or generate different SQL by tenant, add the tenant ID to the cache key. Otherwise, another tenant can reuse SQL compiled for the first tenant. + +````csharp +public override string GetCompiledQueryCacheKey() +{ + return $"{base.GetCompiledQueryCacheKey()}:{IsActiveFilterEnabled}:{CurrentTenantId?.ToString() ?? "Null"}"; +} +```` + +Include any other values read at compilation time in the cache key as well. Keep the call to `base.GetCompiledQueryCacheKey()` to preserve ABP's filter-state keys. + +##### Compiled queries + +When user-defined function mapping is enabled, `EF.CompileQuery` and `EF.CompileAsyncQuery` cannot use the soft delete and multi-tenant filters, or your own filters that call `AbpEfCoreCurrentDbContext.GetRequiredContext()`. Queries that need these filters throw an `AbpException`. Queries that don't need them, for example with `IgnoreQueryFilters()`, are not affected. + +Run these queries as normal LINQ queries, or disable user-defined function mapping: + +````csharp +Configure(options => +{ + options.UseDbFunction = false; +}); +```` + +The data filters still apply when `UseDbFunction` is `false`. Use this setting if a third-party library compiles filtered queries itself. + +In custom `HasTranslation` callbacks, use `AbpEfCoreCurrentDbContext.GetRequiredContext()` instead of `Context`, as shown above. + +Don't replace `ICompiledQueryCacheKeyGenerator` or `IDatabase` with `ReplaceService` while user-defined function mapping is enabled. If you need to replace either service, set `UseDbFunction` to `false` and don't add `AbpDbContextOptionsExtension` yourself. + +If you build EF Core's internal service provider yourself, call `new AbpDbContextOptionsExtension().ApplyServices(services)` after registering the database provider services. + ##### Make User-defined function mapping compatible with [DevExtreme.AspNet.Data's](https://github.com/DevExpress/DevExtreme.AspNet.Data) `IAsyncAdapter` If you are using [DevExtreme.AspNet.Data](https://github.com/DevExpress/DevExtreme.AspNet.Data) and `User-defined function mapping`, You need to create a custom adapter to compatible with `IAsyncAdapter`. @@ -466,4 +502,4 @@ public class MyMongoDbModule : AbpModule .Replace(ServiceDescriptor.Transient(typeof(IMongoDbRepositoryFilterer<,>),typeof(MyMongoDbRepositoryFilterer<,>))); } } -```` \ No newline at end of file +```` diff --git a/docs/en/framework/real-time/signalr.md b/docs/en/framework/real-time/signalr.md index 4a3ffe69fc..358b051bbb 100644 --- a/docs/en/framework/real-time/signalr.md +++ b/docs/en/framework/real-time/signalr.md @@ -234,6 +234,19 @@ Configure(options => }); ``` +### Auditing + +Use `AbpAspNetCoreAuditingOptions.IgnoredHubTypes` to ignore a hub (and the hubs derived from it) for [audit logging](../infrastructure/audit-logging.md): + +```csharp +Configure(options => +{ + options.IgnoredHubTypes.Add(typeof(MessagingHub)); +}); +``` + +The audited services called by an ignored hub are still audit logged. The hub of Blazor Server (and the interactive server render mode of Blazor Web App) is ignored by default. + ### UserIdProvider ABP implements SignalR's `IUserIdProvider` interface to provide the current user id from the `ICurrentUser` service of the ABP (see [the current user service](../infrastructure/current-user.md)), so it will be integrated to the authentication system of your application. The implementing class is the `AbpSignalRUserIdProvider`, if you want to change/override it. diff --git a/docs/en/framework/ui/angular/http-error-handling.md b/docs/en/framework/ui/angular/http-error-handling.md index aa436a8293..faf4416a61 100644 --- a/docs/en/framework/ui/angular/http-error-handling.md +++ b/docs/en/framework/ui/angular/http-error-handling.md @@ -39,6 +39,7 @@ export const appConfig: ApplicationConfig = { - `ErrorScreenErrorCodes` the error codes that you can pass to `skipHandledErrorCodes` and `forWhichErrors`. - `skipHandledErrorCodes` the error codes those you don't want to handle. +- `signInWithoutToken` when a request returns 401 and the user has no access token, starts the sign-in and comes back to the current page. By default (`false`) the user is signed out. - `errorScreen` the screen that you want to show when a route error occurs. - `component` component that you want to show. - `forWhichErrors` same as `ErrorScreenErrorCodes` diff --git a/docs/en/framework/ui/angular/oauth-module.md b/docs/en/framework/ui/angular/oauth-module.md index b8730806e4..49a82edae4 100644 --- a/docs/en/framework/ui/angular/oauth-module.md +++ b/docs/en/framework/ui/angular/oauth-module.md @@ -55,6 +55,22 @@ export const appConfig: ApplicationConfig = { It also registers the OAuth configuration initializer and the providers from `angular-oauth2-oidc`. +## Token Storage + +`MemoryTokenStorageService` keeps the access token and the ID token in memory and shares them between the tabs of the application with a `SharedWorker`. A new tab waits for these tokens (up to 3 seconds) before it initializes the authentication. `nonce`, `PKCE_verifier` and `session_state` are kept in `sessionStorage`, so tabs that sign in at the same time don't overwrite each other's values. The refresh token is kept in `localStorage`. + +The `SharedWorker` is created from a `data:` URL. If the application uses a Content Security Policy, allow it with `worker-src data:`. When the worker can't start, each tab keeps its tokens on its own. + +An application started with server-side rendering uses cookie storage instead. If you register your own `OAuthStorage` provider (for example `localStorage`), it replaces this storage. + +## Signing In Again + +Use `authGuard` on the routes that need a signed-in user. The guard starts the sign-in with the current route, so the user comes back to the same page. The default 401 handler of `@abp/ng.theme.shared` does the same when the access token has expired. When there is no access token, it signs the user out by default; set `signInWithoutToken` in [`withHttpErrorConfig`](./http-error-handling.md) to start the sign-in instead (for example when an anonymous page shouldn't call APIs that need a signed-in user). If you replace these, pass the `returnUrl` to `AuthService.navigateToLogin` yourself. + +When refreshing the tokens fails because the authorization server can't be reached or returns a server error, the tokens are kept, since they can still be valid. When the server rejects the refresh token, the tokens are removed and the sign-in starts. + +With the authorization code flow, `AuthService.navigateToLogin` and `AuthService.login` share one redirect to the login page, until the page leaves. If you open the login page in your own way (a custom `openUri` in the OAuth configuration, a custom `initCodeFlow` or your own strategy), every request is passed to it. + ## API Interceptor For non-external requests, the OAuth API interceptor adds the `X-Requested-With` header and, when the corresponding values are available, an `Authorization` bearer token, `Accept-Language` and the configured tenant header. Existing authorization, language and tenant headers are preserved. Requests marked with the `IS_EXTERNAL_REQUEST` HTTP context token are sent without those ABP headers. The interceptor also integrates every request with the HTTP wait service. diff --git a/docs/en/framework/ui/angular/pwa-configuration.md b/docs/en/framework/ui/angular/pwa-configuration.md index 4c10fb6d27..93afc0f80d 100644 --- a/docs/en/framework/ui/angular/pwa-configuration.md +++ b/docs/en/framework/ui/angular/pwa-configuration.md @@ -11,24 +11,26 @@ Converting your Angular application to a PWA is easy. +> If you created your solution with the **Progressive Web Application** option (in ABP Studio, or with the `-pwa` parameter of the `abp new` command), step 1 has already been done for you, including the `assets` configuration described at the end of step 1. You can continue from [step 2](#2-update-the-web-app-manifest). + ## 1. Install Angular PWA -Run the following command in the root folder of your Angular application: +Run the following command in the root folder of your Angular application. Use the `@angular/pwa` version whose major version matches the `@angular/cli` version in your `package.json` (for example, `@angular/pwa@22` for Angular 22): ```shell -yarn ng add @angular/pwa +yarn ng add @angular/pwa@ ``` ...or... ```shell -npm run ng add @angular/pwa +npx ng add @angular/pwa@ ``` This will install the `@angular/service-worker` package and make your default app a PWA. Alternatively, you may add `project` parameter to target a specific app in your workspace: ```shell -yarn ng add @angular/pwa --project MyProjectName +yarn ng add @angular/pwa@ --project MyProjectName ``` Here is the output of the command: @@ -38,17 +40,24 @@ 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.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: - - `assets` include _manifest.webmanifest_. - - `serviceWorker` is `true` in production build. - - `ngswConfigPath` refers to _ngsw-config.json_. +- **public/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. +- **public/icons** are placeholder icons that are referred to in your web app manifest. We will replace these in a minute. +- **angular.json** has the `serviceWorker` option set to _ngsw-config.json_ in the production configuration. - **package.json** has _@angular/service-worker_ as a new dependency. -- **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. +- **main.ts** (or **app.config.ts**) registers the service worker script with the `provideServiceWorker` provider. In the ABP startup templates, `main.ts` passes the application configuration to `bootstrapApplication` directly, so the provider is added to `main.ts`. +- **index.html** has a `` element that refers to _manifest.webmanifest_. + +The manifest and the icons are placed in the `public` folder. Make sure this folder is copied to the build output. If the build `assets` array of your application in `angular.json` does not include it, add it (this is done automatically for solutions created with the **Progressive Web Application** option): + +```json +"assets": [ + "src/favicon.ico", + "src/assets", + { "glob": "**/*", "input": "public" } +] +``` + +Otherwise, the browser cannot find the manifest and the icons, and the application cannot be installed. ## 2. Update the Web App Manifest @@ -97,7 +106,7 @@ Open the _manifest.webmanifest_ file and update `theme_color` and `background_co } ``` -Then open _index.html_ and change the theme color meta tag as below: +Then open _index.html_ and add (or update) the theme color meta tag as below: ```html @@ -119,7 +128,7 @@ First, open the _manifest.webmanifest_ file and remove all elements in the `icon Then, run the following command in your terminal (changing the path of course): ```shell -npx pwa-asset-generator /path/to/your/logo.png ./src/assets/pwa -i ./src/index.html -m ./src/manifest.webmanifest +npx pwa-asset-generator /path/to/your/logo.png ./public/pwa -i ./src/index.html -m ./public/manifest.webmanifest ``` Open the _manifest.webmanifest_ file again. You will see this: @@ -150,134 +159,134 @@ In addition to updated icons, the library will generate splash screens. However, ``` diff --git a/docs/en/low-code/add-to-existing-solution.md b/docs/en/low-code/add-to-existing-solution.md index a70db7d528..10902e5699 100644 --- a/docs/en/low-code/add-to-existing-solution.md +++ b/docs/en/low-code/add-to-existing-solution.md @@ -7,8 +7,6 @@ # Add Low-Code to an Existing Solution -> **Preview:** The Low-Code System is currently in preview. APIs, generated files, designer behavior, and React runtime details may change before general availability. - This guide explains how to add the ABP Low-Code System to an existing solution instead of generating a new solution with Low-Code enabled from the beginning. Keep every ABP and Low-Code package aligned with the ABP version used by the existing solution. When an example contains a version placeholder, replace it with that version instead of copying a version from another solution. diff --git a/docs/en/low-code/code-integration.md b/docs/en/low-code/code-integration.md index 176ef413ba..475c1677f4 100644 --- a/docs/en/low-code/code-integration.md +++ b/docs/en/low-code/code-integration.md @@ -7,8 +7,6 @@ # Code Integration -> **Preview:** Low-Code integration APIs are part of the preview Low-Code System. Registration details, repository behavior, and page service contracts may change before general availability. - Use the [Low-Code Designer](designer.md) and [React Runtime](react-runtime.md) for standard CRUD screens. This page covers the integration points for the cases where low-code models and regular application code need to reach each other directly. ## Choose the Right Integration Path diff --git a/docs/en/low-code/custom-endpoints.md b/docs/en/low-code/custom-endpoints.md index 052a89ee3a..81866c68fa 100644 --- a/docs/en/low-code/custom-endpoints.md +++ b/docs/en/low-code/custom-endpoints.md @@ -7,8 +7,6 @@ # Custom Endpoints -> **Preview:** Custom endpoint descriptors and scripting helpers are part of the preview Low-Code System. Names, validation rules, and runtime behavior may change before general availability. - Use generated page CRUD APIs for normal dynamic entity pages. Custom endpoints are an advanced option for exposing small model-owned REST APIs that do not map to standard list, get, create, update, delete, export, file, or attachment operations. Custom endpoints are defined in JSON descriptor files or through the Low-Code Designer. Each endpoint executes server-side JavaScript and is registered as an ASP.NET Core route. diff --git a/docs/en/low-code/deleted-objects.md b/docs/en/low-code/deleted-objects.md index 59df88edc6..ee332f793a 100644 --- a/docs/en/low-code/deleted-objects.md +++ b/docs/en/low-code/deleted-objects.md @@ -36,7 +36,6 @@ Deleting a property also takes it out of the places that show it, so the model s * The page columns and page filters that show the property * The form fields bound to it, together with their layout placements -* The API resource field lists that name it (response, writable, import, export, file, and related-name lists) These removals are part of the same change: the deleted-object record lists them, and undo puts them back. A form field that the same change binds to another property is kept, for example when a text property is replaced by a lookup and its form field is re-bound to the new key. @@ -65,8 +64,8 @@ Restore always runs against a fresh read of the object. The request repeats the Restoring from **Deleted objects** brings back the object and its data only. It does not put the object back into the places it was used: -* A restored property is not added back to the API resource field lists, page columns, page filters, or form fields it was removed from when it was deleted. The restore result lists the places that still exist, and the page shows them, so you can add the property back where it is still wanted. -* A restored entity does not bring back the pages, forms, and API resources that used it. +* A restored property is not added back to the page columns, page filters, or form fields it was removed from when it was deleted. The restore result lists the places that still exist, and the page shows them, so you can add the property back where it is still wanted. +* A restored entity does not bring back the pages and forms that used it. To undo a delete together with everything the delete changed, use history instead. See [Deleted Data and History](#deleted-data-and-history). @@ -96,7 +95,7 @@ Files are deleted after the table or column is gone, by a cleanup that is picked * An object was restored under a new name. * A JSON-stored property was renamed. Its values move with the rename and move back on undo. -Undoing a property delete also puts the property back into the API resource field lists, page columns, page filters, and form fields that the delete removed it from, because those changes are part of the same history batch. +Undoing a property delete also puts the property back into the page columns, page filters, and form fields that the delete removed it from, because those changes are part of the same history batch. Once an object is purged, history can no longer bring its data back. @@ -159,7 +158,7 @@ The **Deleted objects** page uses these Designer endpoints under `/api/lowcode/m Like other Designer model endpoints, these requests name the model layer in the `X-LowCode-Layer` header and a non-default app in the `X-LowCode-App` header. The purge endpoints require the **Purge Deleted Objects** permission. Restore requires the Designer edit permission, and the read endpoints require the Designer view permission. -A successful property restore returns `formerUsages`: the API resource, page, and form lists the property was taken out of when it was deleted and that still exist, each with its `kind` (`apiResource`, `page`, or `form`), `name`, and `list`. +A successful property restore returns `formerUsages`: the page and form lists the property was taken out of when it was deleted and that still exist, each with its `kind` (`page` or `form`), `name`, and `list`. [MCP](mcp.md) clients can list, find, and restore deleted objects with the `lowcode_designer_get_deleted_objects`, `lowcode_designer_find_deleted_object`, and `lowcode_designer_restore_deleted_object` tools. There are no MCP tools for purging data or deleting apps. diff --git a/docs/en/low-code/designer.md b/docs/en/low-code/designer.md index 61b9d89bc0..2923a96e1e 100644 --- a/docs/en/low-code/designer.md +++ b/docs/en/low-code/designer.md @@ -7,8 +7,6 @@ # Low-Code Designer -> **Preview:** The Low-Code Designer is part of the preview Low-Code System. Designer screens, metadata fields, and validation rules may change before general availability. - The Low-Code Designer is available in ABP Admin Console. It is the main UI for building and maintaining low-code descriptor metadata. ```text diff --git a/docs/en/low-code/expression-language.md b/docs/en/low-code/expression-language.md index 8898f004a2..32669320ef 100644 --- a/docs/en/low-code/expression-language.md +++ b/docs/en/low-code/expression-language.md @@ -13,8 +13,6 @@ Expressions are not JavaScript. They cannot contain arbitrary code, SQL, network An expression can contain up to 4096 characters. -> **Preview:** The language profile is preview functionality. The supported syntax and function set may change before general availability. - ## Values and field references Use invariant numeric literals, quoted strings, Boolean values, and date constructors. Reference a property by name: diff --git a/docs/en/low-code/fluent-api.md b/docs/en/low-code/fluent-api.md index e28b12e5db..5bcf297c1a 100644 --- a/docs/en/low-code/fluent-api.md +++ b/docs/en/low-code/fluent-api.md @@ -7,8 +7,6 @@ # Attributes & Fluent API -> **Preview:** Attributes and Fluent API configuration for the Low-Code System are preview APIs. Prefer the designer for day-to-day modeling work, and review release notes before relying on these APIs in long-lived integrations. - Use the [Low-Code Designer](designer.md) for runtime pages, forms, filters, dashboards, menus, and page groups. The code-first surface documented here is for source-controlled model metadata: entity definitions, property metadata, enums, validation, attachments, relationships, and runtime overrides. ## What This Surface Configures diff --git a/docs/en/low-code/foreign-access.md b/docs/en/low-code/foreign-access.md index 08af10ea7e..de329c40c1 100644 --- a/docs/en/low-code/foreign-access.md +++ b/docs/en/low-code/foreign-access.md @@ -7,8 +7,6 @@ # Foreign Access -> **Preview:** Foreign access metadata is part of the preview Low-Code System. Relation behavior and designer options may change before general availability. - Use the [Low-Code Designer](designer.md) to review relation metadata visually. This page explains the advanced configuration values that control how related dynamic entities can be reached from runtime pages. Foreign Access controls how related **dynamic entities** can be accessed through foreign key relationships. It determines whether users can view or manage related data directly from the **target entity's** UI. diff --git a/docs/en/low-code/formula-properties.md b/docs/en/low-code/formula-properties.md index 1e35515a39..5ec0441d05 100644 --- a/docs/en/low-code/formula-properties.md +++ b/docs/en/low-code/formula-properties.md @@ -16,8 +16,6 @@ The Designer supports two kinds of calculated property: Both kinds can participate in filtering, sorting, paging, count, projection, grouping, and supported aggregates while the work remains in the database provider. The complete entity set is not loaded into application memory to calculate the values. -> **Preview:** Calculated properties, rollups, and the expression profile are preview features. Supported operations and provider translation may change before general availability. - ## Availability Calculated and rollup properties can be authored in a writable Runtime JSON-backed layer that supports direct model changes. The corresponding commands are disabled when the selected Designer layer does not support them. diff --git a/docs/en/low-code/index.md b/docs/en/low-code/index.md index b710f91203..b8d4753cad 100644 --- a/docs/en/low-code/index.md +++ b/docs/en/low-code/index.md @@ -9,8 +9,6 @@ > You must have an ABP Team or a higher license to use this module. -> **Preview:** The Low-Code System is currently in preview. APIs, designer behavior, generated metadata, and React runtime details may change before general availability. Use it for evaluation and controlled projects, and review release notes before upgrading. - The ABP Low-Code System lets you build data-driven admin screens from metadata. The primary workflow is the **Low-Code Designer** in ABP Admin Console, backed by the **React runtime** in your application. Use the designer to model entities, enums, properties, relations, pages, forms, filters, permissions, actions, and health checks. The runtime uses the same metadata to provide: diff --git a/docs/en/low-code/interceptors.md b/docs/en/low-code/interceptors.md index e926922949..6e7adb6350 100644 --- a/docs/en/low-code/interceptors.md +++ b/docs/en/low-code/interceptors.md @@ -7,8 +7,6 @@ # Interceptors -> **Preview:** Interceptors and their JavaScript context are preview extension points. Script context members, validation behavior, and lifecycle hooks may change before general availability. - Use designer actions and descriptor metadata for standard low-code behavior first. Interceptors are an advanced extension point for adding JavaScript lifecycle logic when the generated CRUD flow needs validation, transformation, or replacement behavior. Interceptors allow you to run custom JavaScript code before, after, or instead of Create, Update, and Delete operations on dynamic entities. @@ -207,9 +205,7 @@ The order applies to both `Pre` and `Post` interceptors. Because the page interc A `Replace` interceptor of the page runs instead of the entity's `Replace` interceptor. `entityExecutionOrder` only affects `Pre` and `Post` interceptors. -API resource interceptors of `Create`, `Update`, and `Delete` are combined with the entity interceptor the same way. Their default order is `apiResourceFirst`; `pageFirst` is refused on an API resource, and `apiResourceFirst` on a page. - -> Earlier versions ran page and API resource interceptors after the entity interceptor by default. An interceptor saved without `entityExecutionOrder` now runs first; set `entityFirst` on the interceptors that must keep the old order. +> Earlier versions ran page interceptors after the entity interceptor by default. An interceptor saved without `entityExecutionOrder` now runs first; set `entityFirst` on the interceptors that must keep the old order. ```json { diff --git a/docs/en/low-code/mcp.md b/docs/en/low-code/mcp.md index 13146416d1..53fff498f1 100644 --- a/docs/en/low-code/mcp.md +++ b/docs/en/low-code/mcp.md @@ -7,8 +7,6 @@ # MCP Integration -> **Preview:** The low-code MCP surface is part of the preview Low-Code System. Endpoint behavior, authorization requirements, and mutation metadata may change before general availability. - The Low-Code Designer exposes a **remote Model Context Protocol (MCP) server** from the running ABP HTTP API host. It is not a local `stdio` tool package. MCP clients connect to your application over HTTP, authenticate with an OpenIddict access token, and work against the same **runtime database-backed** model that the Designer edits in the **Runtime JSON** layer. Use [Model Descriptor Files](model-json.md) when you need source-controlled `_Dynamic/model/**/*.json` files. Use MCP when an agent or automation needs authenticated, structured runtime access that the Designer can immediately show. diff --git a/docs/en/low-code/model-history.md b/docs/en/low-code/model-history.md index 20c7248f2e..1065698cf4 100644 --- a/docs/en/low-code/model-history.md +++ b/docs/en/low-code/model-history.md @@ -68,66 +68,7 @@ A save point restore is applied as the difference between the current model and Comparison and history actions are protected by entry, operation, and serialized-payload budgets. Old history can be pruned while a save point retains its snapshot for later comparison or restore. -## Change Summary - -`POST /api/lowcode/model/history/change-summary` lists what changed between two history points, one row per changed object: an entity, a property, a page, a form, an API resource, a script, an enum, a permission, and so on. It takes the same `from` and `to` points as history comparison (`Current`, `SavePoint`, `SaveBefore`, `SaveAfter`, or `Checkpoint`). - -Each object row reports one of these change kinds: - -| Change kind | Meaning | -|-------------|---------| -| `added` | The object did not exist at the first point | -| `changed` | The object exists at both points and some fields differ | -| `removed` | The object no longer exists at the second point | -| `restored` | A deleted object came back with its kept data | -| `replaced` | The name now belongs to a different object, for example one created again after the original was deleted | - -A changed object lists each changed field with its value before and after. Set `includeObjectDetails` to also receive each object's JSON before and after and the full text of its changed scripts and expressions; with `includeObjectJson: false` only the changed code is returned. Set `objectPath` (for example `["entities", "Acme.Books.Book", "properties", "Title"]`) to return only one object. When a point has no stored model snapshot, the model is rebuilt from the other point or from the current model. When neither model can be rebuilt, `hasBeforeValues` is `false` and changed fields carry only their new values. Long values and long object lists are shortened and flagged (`isTruncated`, `isJsonTruncated`, and `totalObjectCount`). - -The change summary has the same permission requirement as history comparison (the Designer edit permission). There is no MCP tool for it. - -`restored` and `replaced` are reported when the history between the two points is available. A comparison of two stored snapshots without that history reports such an object as added or changed. - -## Extending History - -A host application can add its own information to history and keep the save points it depends on. - -### History Contributors - -Implement `ILowCodeModelHistoryContributor` and register it in DI to set extra properties on each new history batch and save point before it is saved, in the same unit of work. `ContributeToHistoryBatchAsync` is called for a batch recorded by a model save or a history action, and `ContributeToSavePointAsync` for a new save point, after the caller's extra properties are applied; both have default implementations, so implement only the ones you need. The context exposes the row (`Batch` or `SavePoint`), its `Layer`, and its `App` (`null` for the default app). The module stores these properties as they are and returns them in the batch and save point DTOs. Save point creation also accepts `extraProperties` from the caller. - -```csharp -public class MyHistoryContributor : ILowCodeModelHistoryContributor, ITransientDependency -{ - public Task ContributeToHistoryBatchAsync(LowCodeModelHistoryBatchContributionContext context) - { - context.Batch.SetProperty(LowCodeModelHistoryExtraPropertyNames.SourceLabel, "Import"); - return Task.CompletedTask; - } -} -``` - -### Source Labels - -The `SourceLabel` extra property (`LowCodeModelHistoryExtraPropertyNames.SourceLabel`) names where a batch or save point came from. The Designer shows it as a badge in **History**. Set it to a short text that is already localized. Batches created by restoring a save point get a **Restore** badge. - -### Protected Save Points - -The save point limit (`LowCodeRuntimeHistoryOptions.MaxSavePointsPerLayer`) prunes the oldest save points of each app. Implement `ILowCodeModelSavePointRetentionGuard` to protect save points that your application still needs: - -```csharp -public class MySavePointRetentionGuard : ILowCodeModelSavePointRetentionGuard, ITransientDependency -{ - public Task> GetProtectedSavePointIdsAsync(string layer, string? app) - { - // Return the IDs of the save points that must be kept. - IReadOnlyCollection ids = Array.Empty(); - return Task.FromResult(ids); - } -} -``` - -A protected save point is never pruned and does not count toward the limit. Save point DTOs mark it with `isProtected`, the Designer lists it as protected, and the Designer API and MCP refuse to delete it. The application that protects it is responsible for deleting it when it no longer needs it. +Batches created by restoring a save point get a **Restore** badge in **History**. Deleting a save point removes its row from the database. Deleting an app removes its history batches and save points too. diff --git a/docs/en/low-code/model-json.md b/docs/en/low-code/model-json.md index 964d05f620..59663057e6 100644 --- a/docs/en/low-code/model-json.md +++ b/docs/en/low-code/model-json.md @@ -7,8 +7,6 @@ # Model Descriptor Files -> **Preview:** The Low-Code System is currently in preview. The descriptor format is stable enough for evaluation and source control, but fields may change before general availability. - Low-code metadata is source-controlled as JSON descriptor files used by the Low-Code Designer and React runtime. Current generated projects keep descriptors as split files under `_Dynamic/model`; older projects may still contain an aggregate `_Dynamic/model.json` document. Use the [Low-Code Designer](designer.md) for normal editing. Use this page when you need to review, generate, merge, or source-control the JSON metadata directly. ## File Location diff --git a/docs/en/low-code/react-runtime.md b/docs/en/low-code/react-runtime.md index 0c96b92721..72596fc8a7 100644 --- a/docs/en/low-code/react-runtime.md +++ b/docs/en/low-code/react-runtime.md @@ -7,8 +7,6 @@ # React Runtime -> **Preview:** The React low-code runtime is part of the preview Low-Code System. Runtime APIs, generated routes, metadata contracts, and UI behavior may change before general availability. - The React runtime renders low-code pages from backend metadata. Generated low-code React applications include the required package and wiring. ```json diff --git a/docs/en/low-code/reference-entities.md b/docs/en/low-code/reference-entities.md index 1bc31b8bea..f9d56b49b5 100644 --- a/docs/en/low-code/reference-entities.md +++ b/docs/en/low-code/reference-entities.md @@ -7,8 +7,6 @@ # Reference Entities -> **Preview:** Reference entity metadata is part of the preview Low-Code System. Registration APIs, relation options, and designer behavior may change before general availability. - Use the [Low-Code Designer](designer.md) to select reference entities after they are registered in application startup. This page explains the registration and metadata details behind that designer experience. Reference Entities allow you to create foreign key relationships from **dynamic entities** to **existing C# entities** that live outside the Low-Code System. diff --git a/docs/en/low-code/script-actions.md b/docs/en/low-code/script-actions.md index eab2a683d2..dc2706b80a 100644 --- a/docs/en/low-code/script-actions.md +++ b/docs/en/low-code/script-actions.md @@ -7,8 +7,6 @@ # Script Actions -> **Preview:** Script actions are part of the preview Low-Code System. Descriptor fields, designer screens, and script context members may change before general availability. - Use **Actions** in the Low-Code Designer when descriptor metadata and generated CRUD behavior are not enough. Actions can add JavaScript-backed HTTP endpoints, distributed event handlers, background jobs, and scheduled background workers. Custom HTTP endpoints are documented separately in [Custom Endpoints](custom-endpoints.md). This page focuses on the shared action designer experience and the event handler, background job, and background worker action types. diff --git a/docs/en/low-code/scripting-api.md b/docs/en/low-code/scripting-api.md index ea6eaa3d65..105e7d13f5 100644 --- a/docs/en/low-code/scripting-api.md +++ b/docs/en/low-code/scripting-api.md @@ -7,8 +7,6 @@ # Scripting API -> **Preview:** The Low-Code scripting API is a preview server-side JavaScript surface. Available globals, helper methods, limits, and sandbox behavior may change before general availability. - The designer and React runtime cover the standard CRUD, form, filter, and export workflows. Use the scripting API when an interceptor, action, or custom endpoint needs server-side JavaScript. The Low-Code System provides a server-side JavaScript scripting engine for executing custom business logic within [interceptors](interceptors.md), [custom endpoints](custom-endpoints.md), event handlers, background jobs, and background workers. Scripts run in a sandboxed environment with access to a database API backed by EF Core. @@ -809,9 +807,9 @@ Every script type handles a failed script the same way. The script type does not | Script type | Result of a failed script | |-------------|---------------------------| -| Entity, page, and API resource interceptors | The operation is aborted and the request is answered with the error, like an exception thrown by an application service. This includes the API resource `Query`, `Get`, `Export`, `Import`, `Files`, and `Attachments` interceptors | +| Entity and page interceptors | The operation is aborted and the request is answered with the error, like an exception thrown by an application service | | Custom endpoints | The request is answered with the same status and error body as an application service, and the endpoint's database changes are rolled back | -| Page and API resource backend filter scripts | The query fails; no filter value is produced, so no unfiltered data is returned | +| Page backend filter scripts | The query fails; no filter value is produced, so no unfiltered data is returned | | Event handlers, background jobs, and background workers | The exception is passed to the event bus, job, or worker infrastructure, which logs it and, where supported, retries; there is no HTTP response | Calculated and rollup properties are compiled [expressions](expression-language.md), not scripts, so these rules do not apply to them. diff --git a/docs/en/modules/audit-logging-pro.md b/docs/en/modules/audit-logging-pro.md index 1e7ab562dc..b72c48a92c 100644 --- a/docs/en/modules/audit-logging-pro.md +++ b/docs/en/modules/audit-logging-pro.md @@ -73,8 +73,6 @@ You can export audit logs to Excel by clicking the "Export to Excel" button in t Entity changes tab is used to list, view and filter entity change logs. -> **Blazor Server note:** Entity change history can be missing or incomplete in some `Blazor Server` scenarios due to known SignalR/event-pipeline limitations. See [Audit Logging](../framework/infrastructure/audit-logging.md) and [#11682](https://github.com/abpframework/abp/issues/11682). - ![audit-logging-module-entity-changes-list-page](../images/audit-logging-module-entity-changes-list-page.png) diff --git a/docs/en/modules/elsa-pro.md b/docs/en/modules/elsa-pro.md index ae7453b9da..509d879816 100644 --- a/docs/en/modules/elsa-pro.md +++ b/docs/en/modules/elsa-pro.md @@ -235,6 +235,8 @@ Then, you can log in to the Elsa Studio application with the host admin credenti ![elsa-login](../images/elsa-password-login.png) +The Elsa Identity login applies the sign-in checks of the ABP Identity module: inactive and locked out users can't log in, unconfirmed users can't log in if a confirmation is required, and failed attempts are counted for the account lockout. This login has no second step, so users that must change their password or require two-factor authentication can't log in with it either. It only issues an access token, users log in again when the access token expires. Use the code flow authentication below for these users or to refresh the tokens. + Once you have logged in, you can define and manage workflows and view their execution instances: ![elsa-main](../images/elsa-main-page.png) diff --git a/docs/en/modules/file-management.md b/docs/en/modules/file-management.md index c56a7e58b5..785a4cc441 100644 --- a/docs/en/modules/file-management.md +++ b/docs/en/modules/file-management.md @@ -209,7 +209,26 @@ Authenticated clients download a private file in two steps: 1. Call `GET /api/file-management/file-descriptor/download/{id}/token`. This operation checks the module-wide or resource `View` permission. 2. Navigate to `GET /api/file-management/file-descriptor/download/{id}?token=...`. -The download endpoint is anonymous because the token is the credential. A token is bound to one file and tenant, expires after 60 seconds and can be reused during that interval. Do not log or expose it. Public shared files use the separate anonymous `GET /api/file-management/file-descriptor/share?shareToken=...` endpoint. +The download endpoint accepts anonymous requests because the token is the credential. A token is bound to one file and tenant, expires after 60 seconds and can be reused during that interval by default. Do not log or expose it. + +`FileManagementDownloadOptions` provides two optional download restrictions. Both are disabled by default: + +- `UseSingleUseDownloadTokens`: Allows each token to be used only once. +- `BindDownloadTokenToUser`: Restricts a token to the user who requested it. Download requests must carry that user's authentication. + +Configure these options in your application module: + +```csharp +Configure(options => +{ + options.UseSingleUseDownloadTokens = true; + options.BindDownloadTokenToUser = true; +}); +``` + +For multiple API instances, update all instances before enabling these options. Single-use tokens require a shared cache and [distributed lock provider](../framework/infrastructure/distributed-locking.md). + +Public shared files use the separate anonymous `GET /api/file-management/file-descriptor/share?shareToken=...` endpoint and are not affected by these options. ## Data Seed diff --git a/docs/en/modules/identity/session-management.md b/docs/en/modules/identity/session-management.md index 08ae3a5fda..78173360ba 100644 --- a/docs/en/modules/identity/session-management.md +++ b/docs/en/modules/identity/session-management.md @@ -58,6 +58,7 @@ This feature depends on the [Dynamic Claims](../../framework/fundamentals/dynami * The `IdentitySessionChecker` will check the `sessionid` that exists and update the `LastAccessed` and `IpAddress` to the cache. * The `IdentitySessionManager` is used to get one or a list of sessions and update the` LastAccessed` and `IpAddress` from the cache to the database. * The module will remove the session when logging out. +* When a session is removed, the module also remembers it as revoked in the distributed cache (if dynamic claims are enabled). The applications that use the remote dynamic claims (`WebRemoteDynamicClaimsPrincipalContributor` or `RemoteDynamicClaimsPrincipalContributor`) reject the tokens of a revoked session, even when the dynamic claims of the user are cached for another session. The `RevokedSessionCacheExpiration` property of `IdentitySessionCheckerOptions` sets how long it is remembered and defaults to 2 hours. Keep it longer than your access token lifetime plus the clock skew. * The `IdentitySessionCleanupBackgroundWorker` will remove the inactive sessions. * Once a new session has been created, we will remove the other sessions based on the `PreventConcurrentLogin` setting. * The `IdentitySessionManager` is used to manage/maintain the sessions. Please use this class instead of directly using the repository. diff --git a/docs/en/package-version-changes.md b/docs/en/package-version-changes.md index 974ed20453..8ae56b77f2 100644 --- a/docs/en/package-version-changes.md +++ b/docs/en/package-version-changes.md @@ -7,6 +7,89 @@ # Package Version Changes +## 10.7.2 + +| Package | Old Version | New Version | PR | +|---------|-------------|-------------|-----| +| System.Security.Cryptography.Xml | 10.0.10 | 10.0.14 | #26412 | + +**Added:** + +| Package | Version | PR | +|---------|---------|-----| +| System.Security.Cryptography.Pkcs | 10.0.14 | #26412 | + +## 11.0.0-rc.1 + +| Package | Old Version | New Version | PR | +|---------|-------------|-------------|-----| +| @ng-bootstrap/ng-bootstrap | ~20.0.0 | ~21.0.0 | #26380 | +| @swimlane/ngx-datatable | ~22.0.0 | ~25.1.0 | #26380, #26381 | +| Devart.Data.Oracle.EFCore | 11.0.0.9 | 11.2.192.10 | #26147 | +| Microsoft.AspNetCore.Authentication.JwtBearer | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Authentication.OpenIdConnect | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Authorization | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Components | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Components.Authorization | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Components.Web | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Components.WebAssembly | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Components.WebAssembly.Authentication | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Components.WebAssembly.DevServer | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Components.WebAssembly.Server | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Components.WebView.Maui | 10.0.51 | 11.0.0-rc.2.26505.5 | #26147 | +| Microsoft.AspNetCore.DataProtection | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.DataProtection.StackExchangeRedis | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Mvc.NewtonsoftJson | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.Mvc.Testing | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.TestHost | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.AspNetCore.WebUtilities | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Bcl.AsyncInterfaces | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Data.Sqlite | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.EntityFrameworkCore | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.EntityFrameworkCore.Design | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.EntityFrameworkCore.InMemory | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.EntityFrameworkCore.Proxies | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.EntityFrameworkCore.Relational | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.EntityFrameworkCore.SqlServer | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.EntityFrameworkCore.Sqlite | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.EntityFrameworkCore.Tools | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Caching.Memory | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Caching.StackExchangeRedis | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Configuration.Binder | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Configuration.CommandLine | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Configuration.EnvironmentVariables | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Configuration.UserSecrets | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.DependencyInjection | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.DependencyInjection.Abstractions | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.FileProviders.Composite | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.FileProviders.Embedded | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.FileProviders.Physical | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.FileSystemGlobbing | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Hosting | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Hosting.Abstractions | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Http | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Identity.Core | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Localization | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Logging | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Logging.Abstractions | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Logging.Console | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Options | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Extensions.Options.ConfigurationExtensions | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| Microsoft.Maui.Controls | 10.0.51 | 11.0.0-rc.2.26505.5 | #26147 | +| MongoDB.Driver | 3.12.0 | 3.13.0 | #26334 | +| MySql.EntityFrameworkCore | 10.0.9 | 11.0.0-preview | #26400 | +| Npgsql.EntityFrameworkCore.PostgreSQL | 10.0.3 | 11.0.0-rc.3 | #26147, #26400 | +| Oracle.EntityFrameworkCore | 10.23.26000 | 10.23.26301 | #26147 | +| System.Collections.Immutable | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| System.Management | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| System.Security.Cryptography.Xml | 10.0.10 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| System.Security.Permissions | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| System.Text.Encoding.CodePages | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| System.Text.Encodings.Web | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| System.Text.Json | 10.0.11 | 11.0.0-rc.3.26522.148 | #26147, #26340 | +| ng-zorro-antd | ~21.3.1 | ~22.1.0 | #26380 | + ## 10.8.0-rc.1 **Added:** @@ -17,6 +100,7 @@ | HtmlAgilityPack | 1.12.3 | #26216 | | HtmlRenderer.PdfSharp | 1.6.1 | #26216 | | PDFsharp | 6.2.4 | #26216 | +| SkiaSharp.NativeAssets.Linux.NoDependencies | 3.119.0 | #26264 | **Removed:** @@ -357,11 +441,6 @@ | OpenIddict.Server.AspNetCore | 7.2.0 | 7.3.0 | #25053 | | OpenIddict.Validation.AspNetCore | 7.2.0 | 7.3.0 | #25053 | | OpenIddict.Validation.ServerIntegration | 7.2.0 | 7.3.0 | #25053 | - -## 10.2.0-rc.3 - -| Package | Old Version | New Version | PR | -|---------|-------------|-------------|-----| | Scriban | 6.3.0 | 6.6.0 | #25122 | ## 10.2.0-rc.1 diff --git a/docs/en/release-info/migration-guides/abp-10-7.md b/docs/en/release-info/migration-guides/abp-10-7.md index 4ae3f982af..ff701013cc 100644 --- a/docs/en/release-info/migration-guides/abp-10-7.md +++ b/docs/en/release-info/migration-guides/abp-10-7.md @@ -78,6 +78,36 @@ Only pass `--resource-api` when the components that consume the `GET` methods ar > See the [Angular Service Proxies](../../framework/ui/angular/service-proxies.md) document and [#25761](https://github.com/abpframework/abp/pull/25761) for details. +### Angular UI dependencies + +**Who is affected** + +- Angular applications that pin `@swimlane/ngx-datatable`, `@ng-bootstrap/ng-bootstrap`, `ng-zorro-antd`, or `@angular/aria` below the versions below. +- Applications that bind `(sort)` or `(select)` on `ngx-datatable`, or set datatable inputs from TypeScript (`scrollbarH`, `page.pipe`, `bodyComponent`). + +**What changed** + +Published Angular packages now require UI libraries that accept Angular 22: + +| Package | Old range | New range | +| --- | --- | --- | +| `@swimlane/ngx-datatable` | `~22.0.0` | `~25.1.0` | +| `@ng-bootstrap/ng-bootstrap` | `~20.0.0` | `~21.0.0` | +| `ng-zorro-antd` | `~21.3.1` | `~22.1.0` | +| `@angular/aria` (peer of permission, feature, and setting management) | `~21.2.0` | `~22.0.0` | + +ngx-datatable 25 removes the `sort` and `select` outputs. Use `(sortsChange)` and `(selectedChange)`. `sortsChange` emits `SortPropDir[]`, not `{ sorts: [...] }`. Inputs such as `scrollbarH` and `messages` are signals and cannot be assigned. `offset` and `sorts` are models. `bodyComponent` is removed. + +List pages that use the `default` and `list` directives do not need a template change. The stylesheet paths in `angular.json` are unchanged. ng-bootstrap 21 changes the accordion change detection strategy to `OnPush`. + +**What to do** + +Applications that do not pin these libraries and do not customize the datatable API only need to update the ABP packages and reinstall dependencies. + +If you pin them, use the new ranges. Replace `(sort)` with `(sortsChange)` and `(select)` with `(selectedChange)`. Stop assigning datatable inputs from code. + +> See [#26380](https://github.com/abpframework/abp/issues/26380) and [#26381](https://github.com/abpframework/abp/issues/26381) for details. + ### BLOB Encryption and Content Pipeline **Who is affected** @@ -228,6 +258,56 @@ Until you can upgrade, give every authorization server its own client signing ke > See [#26148](https://github.com/abpframework/abp/pull/26148) for details. +### Compiled Query Cache Key of Global Filters + +**Who is affected** + +- Applications that map a custom global filter with user-defined function mapping and read the current tenant, or another tenant specific value, inside its `HasTranslation` callback. + +**What changed** + +- `AbpDbContext.GetCompiledQueryCacheKey()` no longer includes the current tenant ID. It contains only the soft delete and multi-tenant filter states, so EF Core compiles a query once and reuses it for all tenants. Previously every tenant compiled and cached its own copy of every query, so applications with many tenants kept compiling the same queries again. +- ABP's built-in tenant filter passes the current tenant to the SQL as a parameter, so it is not affected. Applications that set `AbpEfCoreGlobalFilterOptions.UseDbFunction` to `false` are not affected either, because this key is only used with user-defined function mapping. +- A `HasTranslation` callback runs only when EF Core compiles the query. If it reads the current tenant and writes it into the SQL, for example as a `SqlConstantExpression`, other tenants now reuse that SQL and get the data of the tenant that compiled it first. + +**What to do** + +No action is required if your `HasTranslation` callbacks do not read tenant specific values. Otherwise, add the tenant ID to the cache key of that `DbContext` and keep the base key: + +```csharp +public override string GetCompiledQueryCacheKey() +{ + return $"{base.GetCompiledQueryCacheKey()}:{CurrentTenantId?.ToString() ?? "Null"}"; +} +``` + +Add any other value the callback reads at compilation time to the key the same way. + +> See the [Data Filtering](../../framework/infrastructure/data-filtering.md) document and [#26282](https://github.com/abpframework/abp/pull/26282) for details. + +### Compiled Queries with User-defined Function Mapping + +**Who is affected** + +- Applications that use `EF.CompileQuery` or `EF.CompileAsyncQuery` on entities with the soft delete or multi-tenant filters, while `AbpEfCoreGlobalFilterOptions.UseDbFunction` is enabled. It is enabled by default for the SQL Server, MySQL, PostgreSQL, Oracle and SQLite providers. +- Applications that use third-party libraries that compile filtered queries themselves. +- Applications with custom `HasTranslation` filters that read `AbpEfCoreCurrentDbContext.Context`. +- Applications that replace `ICompiledQueryCacheKeyGenerator` or `IDatabase` with `ReplaceService` while `UseDbFunction` is enabled. + +**What changed** + +- These queries could run without the soft delete and multi-tenant filters and return soft deleted rows and the rows of other tenants. They now throw an `AbpException`. +- Replacing `ICompiledQueryCacheKeyGenerator` or `IDatabase` with `ReplaceService` now throws an `AbpException`. + +**What to do** + +- Run filtered queries as normal LINQ queries, or set `UseDbFunction` to `false`. The data filters still apply with this setting. +- Use the new `AbpEfCoreCurrentDbContext.GetRequiredContext()` method instead of `Context` in custom `HasTranslation` callbacks. +- If you need to replace `ICompiledQueryCacheKeyGenerator` or `IDatabase`, set `UseDbFunction` to `false` and don't add `AbpDbContextOptionsExtension` yourself. +- If you build EF Core's internal service provider yourself, call `new AbpDbContextOptionsExtension().ApplyServices(services)` after registering the database provider services. + +> See the [Data Filtering](../../framework/infrastructure/data-filtering.md) document and [#26284](https://github.com/abpframework/abp/pull/26284) for details. + ### Dependency Updates **Who is affected** @@ -242,7 +322,7 @@ Until you can upgrade, give every authorization server its own client signing ke - MudBlazor is upgraded from **9.4.0** to **9.7.0**, and the Blazorise packages from **2.2.1** to **2.3.0**. - `MySql.EntityFrameworkCore` is upgraded from **10.0.1** to **10.0.9**. - `Npgsql.EntityFrameworkCore.PostgreSQL` is upgraded from **10.0.0** to **10.0.3**. -- `MongoDB.Driver` is upgraded from **3.10.0** to **3.12.0**, and `AWSSDK.S3` and `AWSSDK.SecurityToken` to their current versions. +- `MongoDB.Driver` is upgraded from **3.10.0** to **3.13.0**, and `AWSSDK.S3` and `AWSSDK.SecurityToken` to their current versions. - ABP maps `Guid[]` query parameters through its own type mapping plugin on MySQL, and stores `IdentityUserPasskey.Data` as a serialized `json` column, because the MySQL providers support neither EF Core JSON columns nor primitive collections. The column name and the stored content stay the same. **What to do** diff --git a/docs/en/release-info/migration-guides/abp-11-0.md b/docs/en/release-info/migration-guides/abp-11-0.md index 41448ca444..2c347bc1e2 100644 --- a/docs/en/release-info/migration-guides/abp-11-0.md +++ b/docs/en/release-info/migration-guides/abp-11-0.md @@ -15,6 +15,54 @@ This document is a guide for upgrading ABP v10.x solutions to ABP v11.0. There a This version contains the following changes on the open-source side: +### Batch Permission Update + +**Who is affected** + +- Applications that implement `IPermissionManager` themselves, instead of deriving from `PermissionManager`. +- Applications that derive from `PermissionManager` and override `SetAsync(string, string, string, bool)`. + +**What changed** + +- `IPermissionManager` has a new `SetAsync(IEnumerable>, string, string)` member. It reads the current state of every requested permission once and writes only the permissions whose state changes, instead of querying the current state once per permission. +- `PermissionAppService.UpdateAsync` calls the new overload once instead of calling the single-permission `SetAsync` in a loop. A derived `PermissionManager` that only overrides the single-permission overload still compiles, but the permission management UI no longer goes through it. + +**What to do** + +Implement the new member if you implement `IPermissionManager` yourself, and move the logic of an overridden single-permission `SetAsync` to the new overload. + +> See [#26126](https://github.com/abpframework/abp/pull/26126) for details. + +### Feature Value Update Skipped When Unchanged + +**Who is affected** + +- Applications that use MongoDB and handle `EntityUpdatedEventData`. + +**What changed** + +`FeatureManagementStore.SetAsync` does not update the feature value when the stored value already equals the requested one, so it no longer raises an entity updated event for it. The Entity Framework Core providers already behaved this way. + +**What to do** + +No action is required unless a handler of yours relies on receiving an event for a value that did not change. + +> See [#26126](https://github.com/abpframework/abp/pull/26126) for details. + +### MySQL and Oracle Providers Do Not Work on EF Core 11 Yet + +**Who is affected** + +- Applications that use `Volo.Abp.EntityFrameworkCore.MySQL`, `Volo.Abp.EntityFrameworkCore.Oracle` or `Volo.Abp.EntityFrameworkCore.Oracle.Devart`. + +**What changed** + +- ABP v11.0 targets .NET 11 and EF Core 11. The database providers these packages use (`MySql.EntityFrameworkCore`, `Oracle.EntityFrameworkCore` and `Devart.Data.Oracle.EFCore`) have no EF Core 11 release yet, and the current versions fail with `MissingMethodException` or `TypeLoadException` when the `DbContext` is created. + +**What to do** + +Keep these applications on ABP v10.x until the provider ships an EF Core 11 version. + ### Polly Is No Longer Referenced **Who is affected** @@ -103,6 +151,23 @@ response.EnsureSuccessStatusCode(); - Update your implementations and derived classes to the new types. See [Migration guide: From NEST v7 to .NET Client v8](https://www.elastic.co/guide/en/elasticsearch/client/net-api/8.19/migration-guide.html) for the query API changes. - Reference the `NEST` package in the projects that use it. +### Localization Dictionaries Are Built Per Culture + +**Who is affected** + +- Applications that derive from `JsonVirtualFileLocalizationResourceContributor` and change the culture or skip files in `CreateDictionaryFromFile` or `CreateDictionaryFromFileContent`. +- Applications that rely on an invalid localization JSON file to throw on the first localization call. + +**What changed** + +`JsonVirtualFileLocalizationResourceContributor` reads the culture of each file first and builds the dictionary of a culture only when that culture is requested. Before, it parsed all culture files of a resource on first use. So an invalid file may now throw only when its culture is requested. + +**What to do** + +In a derived contributor that changes the culture or skips files, override `GetCultureNameOrNull` and return `null`. It then parses all files as before. + +> See [#26378](https://github.com/abpframework/abp/pull/26378) for details. + ## Pro This version contains the following changes on the PRO side: diff --git a/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md b/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md index 047f8bb079..0d40611d0f 100644 --- a/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md +++ b/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md @@ -34,15 +34,25 @@ {{end}} +{{ if UI == "BlazorServer" }} + +- Enable the **WebSocket Protocol** feature of IIS. Blazor Server works best with WebSockets. See [Enabling WebSockets on IIS](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/websockets#enabling-websockets-on-iis). + +{{end}} + ## Generate an Authentication Certificate -If you're using OpenIddict, you need to generate an authentication certificate. You can execute this command in {{ if Tiered == "Yes" }}AuthServer{{ else if UI == "NG" || UI == "Blazor" }}HttpApi.Host{{ else if UI == "BlazorServer" }}Blazor{{ else }}Web{{ end }} folder. +If you're using OpenIddict and your authentication server module calls the `AddProductionEncryptionAndSigningCertificate` method, the application loads the `openiddict.pfx` file in the production environment. Check that this file exists in the {{ if Tiered == "Yes" }}AuthServer{{ else if UI == "NG" || UI == "Blazor" }}HttpApi.Host{{ else if UI == "BlazorServer" }}Blazor{{ else }}Web{{ end }} folder before publishing. It is ignored by git, so it doesn't exist after a fresh clone. + +> If your authentication server doesn't have a production certificate configuration, see the [Configuring OpenIddict](../../../deployment/configuring-openIddict.md) document. + +If the file doesn't exist, you can execute this command in {{ if Tiered == "Yes" }}AuthServer{{ else if UI == "NG" || UI == "Blazor" }}HttpApi.Host{{ else if UI == "BlazorServer" }}Blazor{{ else }}Web{{ end }} folder to create it. ````bash -dotnet dev-certs https -v -ep authserver.pfx -p 00000000-0000-0000-0000-000000000000 +dotnet dev-certs https -v -ep openiddict.pfx -p 00000000-0000-0000-0000-000000000000 ```` -> `00000000-0000-0000-0000-000000000000` is the password of the certificate, you can change it to any password you want. +> Replace `00000000-0000-0000-0000-000000000000` with the password that your module class passes to the `AddProductionEncryptionAndSigningCertificate` method. The solutions created by ABP Studio read it from the `AuthServer:CertificatePassPhrase` setting in the `appsettings.json` file. ## Creating the Publish Files @@ -170,7 +180,7 @@ Add domain names to hosts file(in Windows: `C:\Windows\System32\drivers\etc\host ### Update the appsettings -Update the appsettings according to your project type and domain names. +Update the appsettings according to your project type and domain names. If your `appsettings.json` file has the `AuthServer:CertificatePassPhrase` setting, keep its value. {{ if Tiered == "Yes" }} @@ -284,7 +294,7 @@ Update the appsettings according to your project type and domain names. ### Copy the .pfx file -You need to copy pfx file from ./src/{{ if Tiered == "Yes" }}AuthServer{{ else if UI == "NG" || UI == "Blazor" }}HttpApi.Host{{ else if UI == "BlazorServer" }}Blazor{{ else }}Web{{ end }} to ./publish/{{ if Tiered == "Yes" }}authserver{{ else if UI == "NG" || UI == "Blazor" }}apihost{{ else if UI == "BlazorServer" }}blazor{{ else }}web{{ end }} folder. +If your module loads the `openiddict.pfx` file, make sure it exists in the ./publish/{{ if Tiered == "Yes" }}authserver{{ else if UI == "NG" || UI == "Blazor" }}apihost{{ else if UI == "BlazorServer" }}blazor{{ else }}web{{ end }} folder. If it doesn't, copy it from the {{ if Tiered == "Yes" }}AuthServer{{ else if UI == "NG" || UI == "Blazor" }}HttpApi.Host{{ else if UI == "BlazorServer" }}Blazor{{ else }}Web{{ end }} project folder. ### Publish the Applications(s) diff --git a/docs/en/studio/ai-agent-configuration.md b/docs/en/studio/ai-agent-configuration.md index 51ec4fbe16..3159aecf41 100644 --- a/docs/en/studio/ai-agent-configuration.md +++ b/docs/en/studio/ai-agent-configuration.md @@ -100,6 +100,22 @@ Some tools require explicit permission before execution. Permission choices include allow once, allow always, and skip. "Allow always" persists in the AI Agent settings and is reused by future sessions. +## Pull Request Attribution + +The **Attribute pull requests to ABP Agent** setting in **Settings > Others** is enabled by default. When it is enabled, pull requests that the agent opens with the GitHub CLI (`gh pr create`, or a `gh api` POST request to `repos/{owner}/{repo}/pulls`) end with a `[Made with ABP Agent](https://abp.io/studio/ai-agent)` link in the description. The agent is also instructed to add this link when it writes a pull request description. If the command needs your approval, the permission prompt shows it with the link added. + +When the setting is disabled, the agent does not add the link and shell commands are not modified. Pull request descriptions are published exactly as written. + +The setting is stored as `attributeAgentPullRequests` in `agent-settings.json`. The default location is `~/.abp/studio/agent-settings.json` (`%USERPROFILE%\.abp\studio\agent-settings.json` on Windows). If the `ABP_STUDIO_ROOT` environment variable is set, the file is under that folder instead. For headless usage with `abp agent`, for example on CI or on a server where the ABP Studio UI is not available, turn the attribution off by adding the property to the existing JSON object in that file, alongside the other settings: + +```json +{ + "attributeAgentPullRequests": false +} +``` + +A running `abp agent` server or daemon reads the settings at startup, so restart it after changing the file. + ## MCP Tool Connections ABP Studio can connect to user-configured Model Context Protocol (MCP) servers and expose their tools to Agent mode. This section is about that MCP client integration. For the other direction, where external AI clients connect to ABP Studio and use its own tools, see the [Model Context Protocol (MCP)](model-context-protocol.md) documentation. diff --git a/docs/en/studio/release-notes.md b/docs/en/studio/release-notes.md index 1f22f8fd86..edcb131ffa 100644 --- a/docs/en/studio/release-notes.md +++ b/docs/en/studio/release-notes.md @@ -9,7 +9,29 @@ This document contains **brief release notes** for each ABP Studio release. Release notes only include **major features** and **visible enhancements**. Therefore, they don't include all the development done in the related version. -## 3.1.4 (2026-10-05) Latest +## 3.1.6 (2026-10-21) Latest + +* Fix generated book tests failing on the required author foreign key +* Replace UseUnitOfWork with UseAbpExceptionHandling in templates +* Stop initialize scripts from seeding before EF migrations exist +* Reject solution names that are not valid C# identifiers +* Use request `PathBase` for Blazor `` and keep home links app-relative +* Suggest a random solution name in Development +* Fix Claude tool arguments, model list loading, monitoring commands, and review notes +* Fix `NullReferenceException` when editing a run profile in Solution Runner + +## 3.1.5 (2026-10-15) + +* Pin jQuery 4.0.0 in solution templates +* Sync role delete reassignment to the React admin console template +* Render object extension properties in the admin console +* Sync React Admin Console time zone support to templates +* Make the "Back to the application" links leave the admin console +* Upgrade Blazorise to version 2.3.0 in solution templates +* Focus the first input of MudBlazor dialogs in the sample CRUD pages +* Update the React Admin Console claims modal + +## 3.1.4 (2026-10-05) * Update built-in AI Assistant default models * Fix sidebar flyout backdrop so Switch branch dimming works @@ -19,7 +41,6 @@ This document contains **brief release notes** for each ABP Studio release. Rele * Fix Containers Start staying disabled after bind * Fix missing scroll on the browser start page application list * Use classic console colors for the light-theme terminal palette - ## 3.1.3 (2026-09-22) * Upgrade Studio to Avalonia 12 diff --git a/docs/en/studio/version-mapping.md b/docs/en/studio/version-mapping.md index ba5033b59d..f1651d1490 100644 --- a/docs/en/studio/version-mapping.md +++ b/docs/en/studio/version-mapping.md @@ -11,6 +11,7 @@ This document provides a general overview of the relationship between various ve | **ABP Studio Version** | **ABP Version of Startup Template** | |------------------------|---------------------------| +| 3.1.5 - 3.1.6 | 10.7.0 | | 3.1.2 - 3.1.4 | 10.6.1 | | 3.0.9 - 3.1.1 | 10.6.0 | | 3.0.6 - 3.0.8 | 10.5.0 | diff --git a/docs/en/tutorials/book-store/part-01.md b/docs/en/tutorials/book-store/part-01.md index a90b7ae828..b076aa7c5a 100644 --- a/docs/en/tutorials/book-store/part-01.md +++ b/docs/en/tutorials/book-store/part-01.md @@ -301,6 +301,8 @@ public class BookDto : AuditedEntityDto It will be needed to map the `Book` entities to the `BookDto` objects while returning books to the presentation layer. [Mapperly](https://mapperly.riok.app/) library can automate this conversion when you define the proper mapping. The startup template comes with Mapperly pre-configured. So, you can just define the mapping in the `BookStoreApplicationMappers` class in the `Acme.BookStore.Application` project: ```csharp +using Acme.BookStore.Books; + [Mapper] public partial class BookToBookDtoMapper : MapperBase { @@ -346,6 +348,8 @@ public class CreateUpdateBookDto As done to the `BookDto` above, we should define the mapping from the `CreateUpdateBookDto` object to the `Book` entity. The final class will be as shown below: ```csharp +using Acme.BookStore.Books; + [Mapper] public partial class BookToBookDtoMapper : MapperBase { diff --git a/docs/en/tutorials/book-store/part-02.md b/docs/en/tutorials/book-store/part-02.md index 429d7ec17c..a5049635b3 100644 --- a/docs/en/tutorials/book-store/part-02.md +++ b/docs/en/tutorials/book-store/part-02.md @@ -334,29 +334,31 @@ It's time to create something visible and usable! There are some tools that we w Run the following command line to create a new component, named `BookComponent` in the root folder of the angular application: ```bash -yarn ng generate component book +yarn ng generate component book --type=component ``` +> The `--type=component` option keeps the `.component` suffix in the file and class names (`book.component.ts`, `BookComponent`). Newer Angular CLI versions omit this suffix by default, while this tutorial uses it. + This command should produce the following output: ````bash -> yarn ng generate component book +> yarn ng generate component book --type=component 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) +$ ng generate component book --type=component CREATE src/app/book/book.component.scss (0 bytes) -CREATE src/app/book/book.component.html (20 bytes) +CREATE src/app/book/book.component.spec.ts (581 bytes) +CREATE src/app/book/book.component.ts (208 bytes) +CREATE src/app/book/book.component.html (19 bytes) Done in 3.88s. ```` ### Routing -The generated code places the new route definition to the `src/app/app.routes.ts` file as shown below: +Open the `src/app/app.routes.ts` file and add a route definition for the new component as shown below: ````js -export const routes: Routes = [ +export const APP_ROUTES: Routes = [ // other route definitions... { path : 'books', loadComponent: () => import('./book/book.component').then(c => c.BookComponent) }, ]; @@ -425,27 +427,29 @@ This command will create the following files under the `/src/app/proxy/books` fo Open the `/src/app/book/book.component.ts` file and replace the content as below: ```js -import { ListService, PagedResultDto } from '@abp/ng.core'; -import { Component, OnInit, inject } from '@angular/core'; -import { BookService, BookDto } from '@proxy/books'; +import { CoreModule, ListService, PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core'; +import { Component, OnInit, inject, signal } from '@angular/core'; +import { ThemeSharedModule } from '@abp/ng.theme.shared'; +import { BookService, BookDto } from '../proxy/books'; @Component({ selector: 'app-book', templateUrl: './book.component.html', styleUrls: ['./book.component.scss'], + imports: [CoreModule, ThemeSharedModule], providers: [ListService], }) export class BookComponent implements OnInit { - book = { items: [], totalCount: 0 } as PagedResultDto; + book = signal({ items: [], totalCount: 0 } as PagedResultDto); public readonly list = inject(ListService); private readonly bookService = inject(BookService); ngOnInit() { - const bookStreamCreator = (query) => this.bookService.getList(query); + const bookStreamCreator = (query: PagedAndSortedResultRequestDto) => this.bookService.getList(query); this.list.hookToQuery(bookStreamCreator).subscribe((response) => { - this.book = response; + this.book.set(response); }); } } @@ -453,6 +457,8 @@ export class BookComponent implements OnInit { * We imported and injected the generated `BookService`. * We are using the [ListService](../../framework/ui/angular/list-service.md), a utility service from the ABP which provides easy pagination, sorting and searching. +* `BookComponent` is a standalone component, so the template dependencies are added to the `imports` array. `CoreModule` provides the `abpLocalization` pipe and the common Angular pipes (like `date` and `currency`), and `ThemeSharedModule` provides the `ngx-datatable` component and the ABP directives used with it. +* `book` is a [signal](https://angular.dev/guide/signals). Starting with Angular 22, components use the `OnPush` change detection strategy by default, so the view is not refreshed when a plain property is changed inside a `subscribe` callback. Updating a signal refreshes the view. Open the `/src/app/book/book.component.html` and replace the content as shown below: @@ -469,7 +475,7 @@ Open the `/src/app/book/book.component.html` and replace the content as shown be
- + @@ -584,14 +590,14 @@ Open the `Books.razor` and replace the content as the following: Field="@nameof(BookDto.Type)" Caption="@L["Type"]"> - @L[$"Enum:BookType.{context.Type}"] + @L[$"Enum:BookType.{(int)context.Item.Type}"] - @context.PublishDate.ToShortDateString() + @context.Item.PublishDate.ToShortDateString() - @context.CreationTime.ToLongDateString() + @context.Item.CreationTime.ToLongDateString() @@ -651,9 +657,11 @@ Open the `Books.razor` and replace the content as the following: - + RowsPerPage="@PageSize" + SortMode="SortMode.None"> @@ -678,12 +686,17 @@ Open the `Books.razor` and replace the content as the following: + + + @code { + private MudDataGrid _booksDataGrid = default!; + public Books() // Constructor { LocalizationResource = typeof(BookStoreResource); @@ -697,6 +710,7 @@ Open the `Books.razor` and replace the content as the following: * `Entities`, `TotalCount`, `PageSize`, `OnDataGridReadAsync` are defined in the base class. * `LocalizationResource` is set to the `BookStoreResource` to localize the texts. * This page uses the standard MudBlazor `MudDataGrid` with `` definitions. ABP also ships an `AbpMudExtensibleDataGrid` that integrates with the [data table column extension system](../../framework/ui/blazor/data-table-column-extensions.md) when you need to extend module pages. +* `AbpMudCrudPageBase` uses its own `AbpMudExtensibleDataGrid` to reload the data and to resolve the sort columns. Since this page uses the standard `MudDataGrid`, it keeps a reference to the grid (`_booksDataGrid`) to reload it after the create, update and delete operations in the next part, and disables sorting with `SortMode.None`. While the code above is pretty easy to understand, you can check the MudBlazor [Card](https://mudblazor.com/components/card) and [DataGrid](https://mudblazor.com/components/datagrid) documents to understand them better. @@ -712,6 +726,14 @@ You can run the application! The final UI of this part is shown below: ![blazor-bookstore-book-list](images/blazor-bookstore-book-list-2.png) +{{if BlazorUI == "MudBlazor"}} + +This is a fully working, server side paged and localized table of books. + +{{else}} + This is a fully working, server side paged, sorted and localized table of books. +{{end}} + {{end # UI }} diff --git a/docs/en/tutorials/book-store/part-03.md b/docs/en/tutorials/book-store/part-03.md index 259475b27d..77ca1ca590 100644 --- a/docs/en/tutorials/book-store/part-03.md +++ b/docs/en/tutorials/book-store/part-03.md @@ -583,40 +583,42 @@ In this section, you will learn how to create a new modal dialog form to create 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 } from '@proxy/books'; +import { CoreModule, ListService, PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core'; +import { Component, OnInit, inject, signal } from '@angular/core'; +import { ThemeSharedModule } from '@abp/ng.theme.shared'; +import { BookService, BookDto } from '../proxy/books'; @Component({ selector: 'app-book', templateUrl: './book.component.html', styleUrls: ['./book.component.scss'], + imports: [CoreModule, ThemeSharedModule], providers: [ListService], }) export class BookComponent implements OnInit { - book = { items: [], totalCount: 0 } as PagedResultDto; + book = signal({ items: [], totalCount: 0 } as PagedResultDto); - isModalOpen = false; + isModalOpen = signal(false); public readonly list = inject(ListService); private readonly bookService = inject(BookService); ngOnInit() { - const bookStreamCreator = (query) => this.bookService.getList(query); + const bookStreamCreator = (query: PagedAndSortedResultRequestDto) => this.bookService.getList(query); this.list.hookToQuery(bookStreamCreator).subscribe((response) => { - this.book = response; + this.book.set(response); }); } //add new method createBook() { - this.isModalOpen = true; + this.isModalOpen.set(true); } } ``` -* We defined a property called `isModalOpen` and a method called `createBook`. +* We defined a signal called `isModalOpen` and a method called `createBook`. Open `/src/app/book/book.component.html` and make the following changes: @@ -676,43 +678,45 @@ You can open your browser and click the **New book** button to see the new modal 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'; // add bookTypeOptions +import { CoreModule, ListService, PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core'; +import { Component, OnInit, inject, signal } from '@angular/core'; +import { ThemeSharedModule } from '@abp/ng.theme.shared'; +import { BookService, BookDto, bookTypeOptions } from '../proxy/books'; // add bookTypeOptions import { FormGroup, FormBuilder, Validators } from '@angular/forms'; // add this @Component({ selector: 'app-book', templateUrl: './book.component.html', styleUrls: ['./book.component.scss'], + imports: [CoreModule, ThemeSharedModule], providers: [ListService], }) export class BookComponent implements OnInit { - book = { items: [], totalCount: 0 } as PagedResultDto; + book = signal({ items: [], totalCount: 0 } as PagedResultDto); - form: FormGroup; // add this line + form!: FormGroup; // add this line // add bookTypes as a list of BookType enum members bookTypes = bookTypeOptions; - isModalOpen = false; + isModalOpen = signal(false); public readonly list = inject(ListService); private readonly bookService = inject(BookService); private readonly fb = inject(FormBuilder); // inject FormBuilder ngOnInit() { - const bookStreamCreator = (query) => this.bookService.getList(query); + const bookStreamCreator = (query: PagedAndSortedResultRequestDto) => this.bookService.getList(query); this.list.hookToQuery(bookStreamCreator).subscribe((response) => { - this.book = response; + this.book.set(response); }); } // add new method createBook() { this.buildForm(); // add this line - this.isModalOpen = true; + this.isModalOpen.set(true); } // add buildForm method @@ -732,7 +736,7 @@ export class BookComponent implements OnInit { } this.bookService.create(this.form.value).subscribe(() => { - this.isModalOpen = false; + this.isModalOpen.set(false); this.form.reset(); this.list.get(); }); @@ -741,7 +745,7 @@ export class BookComponent implements OnInit { ``` * Imported `FormGroup`, `FormBuilder` and `Validators` from `@angular/forms`. -* Added a `form: FormGroup` property. +* Added a `form: FormGroup` property. The `!` tells TypeScript that the form is created later, in the `buildForm` method. * Added a `bookTypes` property as a list of `BookType` enum members. That will be used in form options. * 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. @@ -812,10 +816,10 @@ We've used [NgBootstrap datepicker](https://ng-bootstrap.github.io/#/components/ 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, ReactiveFormsModule } from '@angular/forms'; +import { CoreModule, ListService, PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core'; +import { Component, OnInit, inject, signal } from '@angular/core'; +import { BookService, BookDto, bookTypeOptions } from '../proxy/books'; +import { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { NgbDateNativeAdapter, NgbDateAdapter, NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap'; import { ThemeSharedModule } from '@abp/ng.theme.shared'; @@ -823,36 +827,36 @@ import { ThemeSharedModule } from '@abp/ng.theme.shared'; selector: 'app-book', templateUrl: './book.component.html', styleUrls: ['./book.component.scss'], - imports: [ThemeSharedModule, ReactiveFormsModule, NgbDatepickerModule], + imports: [CoreModule, ThemeSharedModule, NgbDatepickerModule], providers: [ ListService, { provide: NgbDateAdapter, useClass: NgbDateNativeAdapter } ], }) export class BookComponent implements OnInit { - book = { items: [], totalCount: 0 } as PagedResultDto; + book = signal({ items: [], totalCount: 0 } as PagedResultDto); - form: FormGroup; + form!: FormGroup; bookTypes = bookTypeOptions; - isModalOpen = false; + isModalOpen = signal(false); public readonly list = inject(ListService); private readonly bookService = inject(BookService); private readonly fb = inject(FormBuilder); ngOnInit() { - const bookStreamCreator = (query) => this.bookService.getList(query); + const bookStreamCreator = (query: PagedAndSortedResultRequestDto) => this.bookService.getList(query); this.list.hookToQuery(bookStreamCreator).subscribe((response) => { - this.book = response; + this.book.set(response); }); } createBook() { this.buildForm(); - this.isModalOpen = true; + this.isModalOpen.set(true); } buildForm() { @@ -870,7 +874,7 @@ export class BookComponent implements OnInit { } this.bookService.create(this.form.value).subscribe(() => { - this.isModalOpen = false; + this.isModalOpen.set(false); this.form.reset(); this.list.get(); }); @@ -878,7 +882,8 @@ export class BookComponent implements OnInit { } ``` -* Imported ` NgbDateNativeAdapter` and `NgbDateAdapter`. +* Imported ` NgbDateNativeAdapter`, `NgbDateAdapter` and `NgbDatepickerModule`. +* Added `NgbDatepickerModule` to the `imports` array of the component, so the `ngbDatepicker` directive can be used in the template. * We added a new provider `NgbDateAdapter` that converts the Datepicker value to `Date` type. Check out the [datepicker adapters](https://ng-bootstrap.github.io/#/components/datepicker/overview) for more details. Now, you can open your browser to see the changes: @@ -890,65 +895,74 @@ Now, you can open your browser to see the changes: Open `/src/app/book/book.component.ts` and replace the content as shown below: ```js -import { ListService, PagedResultDto } from '@abp/ng.core'; -import { Component, OnInit, inject } from '@angular/core'; -import { BookService, BookDto, bookTypeOptions } from '@proxy/books'; +import { CoreModule, ListService, PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core'; +import { Component, OnInit, inject, signal } from '@angular/core'; +import { BookService, BookDto, bookTypeOptions } from '../proxy/books'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; -import { NgbDateNativeAdapter, NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap'; +import { + NgbDateNativeAdapter, + NgbDateAdapter, + NgbDatepickerModule, + NgbDropdownModule, +} 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: [CoreModule, ThemeSharedModule, NgbDatepickerModule, NgbDropdownModule], providers: [ListService, { provide: NgbDateAdapter, useClass: NgbDateNativeAdapter }], }) export class BookComponent implements OnInit { - book = { items: [], totalCount: 0 } as PagedResultDto; + book = signal({ items: [], totalCount: 0 } as PagedResultDto); - selectedBook = {} as BookDto; // declare selectedBook + selectedBook = signal({} as BookDto); // declare selectedBook - form: FormGroup; + form!: FormGroup; bookTypes = bookTypeOptions; - isModalOpen = false; + isModalOpen = signal(false); public readonly list = inject(ListService); private readonly bookService = inject(BookService); private readonly fb = inject(FormBuilder); ngOnInit() { - const bookStreamCreator = (query) => this.bookService.getList(query); + const bookStreamCreator = (query: PagedAndSortedResultRequestDto) => this.bookService.getList(query); this.list.hookToQuery(bookStreamCreator).subscribe((response) => { - this.book = response; + this.book.set(response); }); } createBook() { - this.selectedBook = {} as BookDto; // reset the selected book + this.selectedBook.set({} as BookDto); // reset the selected book this.buildForm(); - this.isModalOpen = true; + this.isModalOpen.set(true); } // Add editBook method editBook(id: string) { this.bookService.get(id).subscribe((book) => { - this.selectedBook = book; + this.selectedBook.set(book); this.buildForm(); - this.isModalOpen = true; + this.isModalOpen.set(true); }); } buildForm() { + const selectedBook = this.selectedBook(); + this.form = this.fb.group({ - name: [this.selectedBook.name || '', Validators.required], - type: [this.selectedBook.type || null, Validators.required], + name: [selectedBook.name || '', Validators.required], + type: [selectedBook.type || null, Validators.required], publishDate: [ - this.selectedBook.publishDate ? new Date(this.selectedBook.publishDate) : null, + selectedBook.publishDate ? new Date(selectedBook.publishDate) : null, Validators.required, ], - price: [this.selectedBook.price || null, Validators.required], + price: [selectedBook.price || null, Validators.required], }); } @@ -958,12 +972,14 @@ export class BookComponent implements OnInit { return; } - const request = this.selectedBook.id - ? this.bookService.update(this.selectedBook.id, this.form.value) + const selectedBook = this.selectedBook(); + + const request = selectedBook.id + ? this.bookService.update(selectedBook.id, this.form.value) : this.bookService.create(this.form.value); request.subscribe(() => { - this.isModalOpen = false; + this.isModalOpen.set(false); this.form.reset(); this.list.get(); }); @@ -971,10 +987,12 @@ export class BookComponent implements OnInit { } ``` -* We declared a variable named `selectedBook` as `BookDto`. -* We added an `editBook` method. This method fetches the book with the given `id` and sets it to `selectedBook` object. +* We declared a signal named `selectedBook` that holds a `BookDto`. +* Added `NgbDropdownModule` to the `imports` array, since the "Actions" dropdown (added below) uses it. +* We added an `editBook` method. This method fetches the book with the given `id` and sets it to `selectedBook` signal. * We replaced the `buildForm` method so that it creates the form with the `selectedBook` data. * We replaced the `createBook` method so it sets `selectedBook` to an empty object. +* `selectedBook` and `isModalOpen` are signals because they are changed inside `subscribe` callbacks; updating a signal refreshes the view. * We changed the `save` method to handle both of create and update operations. ### Add "Actions" Dropdown to the Table @@ -1015,7 +1033,7 @@ Also, change the `ng-template #abpHeader` section as shown below: ```html -

{%{{{ (selectedBook.id ? '::Edit' : '::NewBook' ) | abpLocalization }}}%}

+

{%{{{ (selectedBook().id ? '::Edit' : '::NewBook' ) | abpLocalization }}}%}

``` @@ -1031,8 +1049,8 @@ Replace the injected services as below: // ... // add new imports -import { ConfirmationService, Confirmation } from '@abp/ng.theme.shared'; -import { Component, OnInit, inject } from '@angular/core'; +import { ConfirmationService, Confirmation, ThemeSharedModule } from '@abp/ng.theme.shared'; +import { Component, OnInit, inject, signal } from '@angular/core'; // ... @@ -1070,6 +1088,9 @@ Open `/src/app/book/book.component.html` and modify the `ngbDropdownMenu` to add ```html
+
- + -

{%{{{ (selectedAuthor.id ? '::Edit' : '::NewAuthor') | abpLocalization }}}%}

+

{%{{{ (selectedAuthor().id ? '::Edit' : '::NewAuthor') | abpLocalization }}}%}

@@ -811,6 +830,7 @@ This page uses some localization keys we need to declare. Open the `en.json` fil "Authors": "Authors", "AuthorDeletionConfirmationMessage": "Are you sure to delete the author '{0}'?", "BirthDate": "Birth date", +"ShortBio": "Short bio", "NewAuthor": "New author" ```` @@ -873,7 +893,7 @@ Create a new Razor Component Page, `/Pages/Authors.razor`, in the {{ if UI == "B ShowPager="true" PageSize="PageSize"> - @if (CanEditAuthor) { - + @L["Edit"] } @if (CanDeleteAuthor) { - + @L["Delete"] } @@ -907,7 +927,7 @@ Create a new Razor Component Page, `/Pages/Authors.razor`, in the {{ if UI == "B Field="@nameof(AuthorDto.BirthDate)" Caption="@L["BirthDate"]"> - @context.BirthDate.ToShortDateString() + @context.Item.BirthDate.ToShortDateString() @@ -915,9 +935,8 @@ Create a new Razor Component Page, `/Pages/Authors.razor`, in the {{ if UI == "B - - - + + @L["NewAuthor"] @@ -928,25 +947,25 @@ Create a new Razor Component Page, `/Pages/Authors.razor`, in the {{ if UI == "B @L["Name"] - + - + @L["BirthDate"] - + @L["ShortBio"] - + - + @@ -967,9 +986,8 @@ Create a new Razor Component Page, `/Pages/Authors.razor`, in the {{ if UI == "B - - - + + @EditingAuthor.Name @@ -980,25 +998,25 @@ Create a new Razor Component Page, `/Pages/Authors.razor`, in the {{ if UI == "B @L["Name"] - + - + @L["BirthDate"] - + @L["ShortBio"] - + - + @@ -1048,7 +1066,8 @@ Create a new Razor Component Page, `/Pages/Authors.razor`, in the {{ if UI == "B - @@ -1079,6 +1098,9 @@ Create a new Razor Component Page, `/Pages/Authors.razor`, in the {{ if UI == "B + + + @@ -1238,26 +1260,26 @@ public partial class Authors await InvokeAsync(StateHasChanged); } - private void OpenCreateAuthorModal() + private async Task OpenCreateAuthorModal() { - CreateValidationsRef.ClearAll(); + await CreateValidationsRef.ClearAll(); NewAuthor = new CreateAuthorDto(); - CreateAuthorModal.Show(); + await CreateAuthorModal.Show(); } - private void CloseCreateAuthorModal() + private async Task CloseCreateAuthorModal() { - CreateAuthorModal.Hide(); + await CreateAuthorModal.Hide(); } - private void OpenEditAuthorModal(AuthorDto author) + private async Task OpenEditAuthorModal(AuthorDto author) { - EditValidationsRef.ClearAll(); + await EditValidationsRef.ClearAll(); EditingAuthorId = author.Id; EditingAuthor = ObjectMapper.Map(author); - EditAuthorModal.Show(); + await EditAuthorModal.Show(); } private async Task DeleteAuthorAsync(AuthorDto author) @@ -1279,9 +1301,9 @@ public partial class Authors } } - private void CloseEditAuthorModal() + private async Task CloseEditAuthorModal() { - EditAuthorModal.Hide(); + await EditAuthorModal.Hide(); } private async Task CreateAuthorAsync() @@ -1292,7 +1314,7 @@ public partial class Authors { await AuthorAppService.CreateAsync(NewAuthor); await GetAuthorsAsync(); - CreateAuthorModal.Hide(); + await CreateAuthorModal.Hide(); } } catch(Exception ex) @@ -1309,7 +1331,7 @@ public partial class Authors { await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor); await GetAuthorsAsync(); - EditAuthorModal.Hide(); + await EditAuthorModal.Hide(); } } catch(Exception ex) @@ -1328,6 +1350,7 @@ public partial class Authors using System; using System.Collections.Generic; using System.Linq; +using System.Threading; using System.Threading.Tasks; using Acme.BookStore.Authors; using Acme.BookStore.Permissions; @@ -1355,6 +1378,8 @@ public partial class Authors private Guid EditingAuthorId { get; set; } private UpdateAuthorDto EditingAuthor { get; set; } + private MudDataGrid AuthorsGrid { get; set; } + private MudDialog CreateAuthorDialog { get; set; } private MudDialog EditAuthorDialog { get; set; } @@ -1365,7 +1390,7 @@ public partial class Authors // Bind to a nullable wrapper and sync back to the DTO before saving. private DateTime? NewAuthorBirthDate { - get => NewAuthor?.BirthDate; + get => NewAuthor == null || NewAuthor.BirthDate == default ? null : NewAuthor.BirthDate; set { if (NewAuthor != null && value.HasValue) NewAuthor.BirthDate = value.Value; } } @@ -1414,7 +1439,7 @@ public partial class Authors TotalCount = (int)result.TotalCount; } - private async Task> OnDataGridReadAsync(GridState state) + private async Task> OnDataGridReadAsync(GridState state, CancellationToken cancellationToken = default) { CurrentSorting = state.SortDefinitions .Where(s => !string.IsNullOrWhiteSpace(s.SortBy?.ToString())) @@ -1463,7 +1488,16 @@ public partial class Authors } await AuthorAppService.DeleteAsync(author.Id); - await GetAuthorsAsync(); + + // Go back to the previous page if the deleted author was the only one on the current page + if (AuthorsGrid.CurrentPage > 0 && AuthorsGrid.ServerItems.Count() == 1) + { + await InvokeAsync(() => AuthorsGrid.NavigateTo(Page.Previous)); + } + else + { + await InvokeAsync(() => AuthorsGrid.ReloadServerData()); + } } catch(Exception ex) { @@ -1475,11 +1509,11 @@ public partial class Authors { try { - await CreateFormRef.Validate(); + await CreateFormRef.ValidateAsync(); if (CreateFormRef.IsValid) { await AuthorAppService.CreateAsync(NewAuthor); - await GetAuthorsAsync(); + await InvokeAsync(() => AuthorsGrid.ReloadServerData()); await InvokeAsync(() => CreateAuthorDialog.CloseAsync()); } } @@ -1493,11 +1527,11 @@ public partial class Authors { try { - await EditFormRef.Validate(); + await EditFormRef.ValidateAsync(); if (EditFormRef.IsValid) { await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor); - await GetAuthorsAsync(); + await InvokeAsync(() => AuthorsGrid.ReloadServerData()); await InvokeAsync(() => EditAuthorDialog.CloseAsync()); } } @@ -1540,11 +1574,11 @@ public partial class AuthorDtoToUpdateAuthorDtoMapper : MapperBase Delete existing books or delete the database before executing the `DbMigrator`. See the *Database & Data Migration* section above for more info. +> Delete existing books and authors (or delete the database) before executing the `DbMigrator`. The new seeder creates the authors again, so it fails with `AuthorAlreadyExistsException` if the authors from the previous part still exist. See the *Database & Data Migration* section above for more info. {{if DB=="EF"}} @@ -989,12 +989,17 @@ Added the Author dropdown as the first element in the form. Open the `/src/app/book/book.component.ts` and and change the content as shown below: ````js -import { ListService, PagedResultDto } from '@abp/ng.core'; -import { Component, OnInit } from '@angular/core'; -import { BookService, BookDto, bookTypeOptions, AuthorLookupDto } from '@proxy/books'; +import { CoreModule, ListService, PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core'; +import { Component, OnInit, inject, signal } from '@angular/core'; +import { BookService, BookDto, bookTypeOptions, AuthorLookupDto } from '../proxy/books'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; -import { NgbDateNativeAdapter, NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap'; -import { ConfirmationService, Confirmation } from '@abp/ng.theme.shared'; +import { + NgbDateNativeAdapter, + NgbDateAdapter, + NgbDatepickerModule, + NgbDropdownModule, +} from '@ng-bootstrap/ng-bootstrap'; +import { ConfirmationService, Confirmation, ThemeSharedModule } from '@abp/ng.theme.shared'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @@ -1002,20 +1007,21 @@ import { map } from 'rxjs/operators'; selector: 'app-book', templateUrl: './book.component.html', styleUrls: ['./book.component.scss'], + imports: [CoreModule, ThemeSharedModule, NgbDatepickerModule, NgbDropdownModule], providers: [ListService, { provide: NgbDateAdapter, useClass: NgbDateNativeAdapter }], }) export class BookComponent implements OnInit { - book = { items: [], totalCount: 0 } as PagedResultDto; + book = signal({ items: [], totalCount: 0 } as PagedResultDto); - form: FormGroup; + form!: FormGroup; - selectedBook = {} as BookDto; + selectedBook = signal({} as BookDto); authors$: Observable; bookTypes = bookTypeOptions; - isModalOpen = false; + isModalOpen = signal(false); public readonly list = inject(ListService); private readonly bookService = inject(BookService); @@ -1023,41 +1029,43 @@ export class BookComponent implements OnInit { private readonly confirmation = inject(ConfirmationService); constructor() { - this.authors$ = bookService.getAuthorLookup().pipe(map((r) => r.items)); + this.authors$ = this.bookService.getAuthorLookup().pipe(map((r) => r.items ?? [])); } ngOnInit() { - const bookStreamCreator = (query) => this.bookService.getList(query); + const bookStreamCreator = (query: PagedAndSortedResultRequestDto) => this.bookService.getList(query); this.list.hookToQuery(bookStreamCreator).subscribe((response) => { - this.book = response; + this.book.set(response); }); } createBook() { - this.selectedBook = {} as BookDto; + this.selectedBook.set({} as BookDto); this.buildForm(); - this.isModalOpen = true; + this.isModalOpen.set(true); } editBook(id: string) { this.bookService.get(id).subscribe((book) => { - this.selectedBook = book; + this.selectedBook.set(book); this.buildForm(); - this.isModalOpen = true; + this.isModalOpen.set(true); }); } buildForm() { + const selectedBook = this.selectedBook(); + this.form = this.fb.group({ - authorId: [this.selectedBook.authorId || null, Validators.required], - name: [this.selectedBook.name || null, Validators.required], - type: [this.selectedBook.type || null, Validators.required], + authorId: [selectedBook.authorId || null, Validators.required], + name: [selectedBook.name || null, Validators.required], + type: [selectedBook.type || null, Validators.required], publishDate: [ - this.selectedBook.publishDate ? new Date(this.selectedBook.publishDate) : null, + selectedBook.publishDate ? new Date(selectedBook.publishDate) : null, Validators.required, ], - price: [this.selectedBook.price || null, Validators.required], + price: [selectedBook.price || null, Validators.required], }); } @@ -1066,12 +1074,14 @@ export class BookComponent implements OnInit { return; } - const request = this.selectedBook.id - ? this.bookService.update(this.selectedBook.id, this.form.value) + const selectedBook = this.selectedBook(); + + const request = selectedBook.id + ? this.bookService.update(selectedBook.id, this.form.value) : this.bookService.create(this.form.value); request.subscribe(() => { - this.isModalOpen = false; + this.isModalOpen.set(false); this.form.reset(); this.list.get(); }); @@ -1089,8 +1099,8 @@ export class BookComponent implements OnInit { * Added imports for the `AuthorLookupDto`, `Observable` and `map`. * Added `authors$: Observable;` field after the `selectedBook`. -* Added `this.authors$ = bookService.getAuthorLookup().pipe(map((r) => r.items));` into the constructor. -* Added ` authorId: [this.selectedBook.authorId || null, Validators.required],` into the `buildForm()` function. +* Added `this.authors$ = this.bookService.getAuthorLookup().pipe(map((r) => r.items ?? []));` into the constructor. +* Added ` authorId: [selectedBook.authorId || null, Validators.required],` into the `buildForm()` function. Open the `/src/app/book/book.component.html` and add the following form group just before the book name form group: @@ -1160,6 +1170,12 @@ protected override async Task OnInitializedAsync() * It is essential to call the `base.OnInitializedAsync()` since `AbpCrudPageBase` has some initialization code to be executed. +The code below throws a `UserFriendlyException`, which is defined in the `Volo.Abp` namespace. Add the following line to the top of the `Books.razor` file: + +````html +@using Volo.Abp +```` + {{if BlazorUI == "Blazorise"}} Override the `OpenCreateModalAsync` method and adding the following code: @@ -1250,6 +1266,51 @@ The final `@code` block should be the following: DeletePolicyName = BookStorePermissions.Books.Delete; } + // MudDatePicker requires nullable DateTime, while CreateUpdateBookDto.PublishDate is non-nullable. + // Bind to a nullable wrapper and sync back to the DTO. + private DateTime? NewEntityPublishDate + { + get => NewEntity?.PublishDate; + set { if (NewEntity != null && value.HasValue) NewEntity.PublishDate = value.Value; } + } + + private DateTime? EditingEntityPublishDate + { + get => EditingEntity?.PublishDate; + set { if (EditingEntity != null && value.HasValue) EditingEntity.PublishDate = value.Value; } + } + + private MudDataGrid _booksDataGrid = default!; + + protected override async Task OnCreatedEntityAsync() + { + await InvokeAsync(() => _booksDataGrid.ReloadServerData()); + await CloseCreateDialogAsync(); + Snackbar.Add(GetCreateMessage(), Severity.Success); + } + + protected override async Task OnUpdatedEntityAsync() + { + await InvokeAsync(() => _booksDataGrid.ReloadServerData()); + await CloseEditDialogAsync(); + Snackbar.Add(GetUpdateMessage(), Severity.Success); + } + + protected override async Task OnDeletedEntityAsync() + { + // Go back to the previous page if the deleted book was the only one on the current page + if (_booksDataGrid.CurrentPage > 0 && _booksDataGrid.ServerItems.Count() == 1) + { + await InvokeAsync(() => _booksDataGrid.NavigateTo(Page.Previous)); + } + else + { + await InvokeAsync(() => _booksDataGrid.ReloadServerData()); + } + + Snackbar.Add(GetDeleteMessage(), Severity.Success); + } + //GET AUTHORS ON INITIALIZATION protected override async Task OnInitializedAsync() { @@ -1279,7 +1340,7 @@ Finally, add the following field definition into the *Create* modal/dialog, as t ````xml @L["Author"] - @foreach (var author in authorList) { @@ -1324,7 +1385,7 @@ Add the following field definition into the *Edit* modal/dialog, as the first it ````xml @L["Author"] - @foreach (var author in authorList) { diff --git a/framework/Volo.Abp.slnx b/framework/Volo.Abp.slnx index 133fd89eed..7079d1c598 100644 --- a/framework/Volo.Abp.slnx +++ b/framework/Volo.Abp.slnx @@ -188,7 +188,9 @@ + + @@ -230,6 +232,7 @@ + diff --git a/framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo.Abp.ApiVersioning.Abstractions.csproj b/framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo.Abp.ApiVersioning.Abstractions.csproj index f2d7f23a93..a4adf8b502 100644 --- a/framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo.Abp.ApiVersioning.Abstractions.csproj +++ b/framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo.Abp.ApiVersioning.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.ApiVersioning.Abstractions diff --git a/framework/src/Volo.Abp.AspNetCore.Abstractions/Volo.Abp.AspNetCore.Abstractions.csproj b/framework/src/Volo.Abp.AspNetCore.Abstractions/Volo.Abp.AspNetCore.Abstractions.csproj index e14456193c..ad68cdf23c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Abstractions/Volo.Abp.AspNetCore.Abstractions.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Abstractions/Volo.Abp.AspNetCore.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.AspNetCore.Abstractions diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj index 1a554f0885..ce68508ab3 100644 --- a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore.Authentication.JwtBearer diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorCache.cs b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorCache.cs index 63c2d6d082..259a13c8e2 100644 --- a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorCache.cs +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo/Abp/AspNetCore/Authentication/JwtBearer/DynamicClaims/WebRemoteDynamicClaimsPrincipalContributorCache.cs @@ -39,6 +39,12 @@ public class WebRemoteDynamicClaimsPrincipalContributorCache : RemoteDynamicClai return await Cache.GetAsync(AbpDynamicClaimCacheItem.CalculateCacheKey(userId, tenantId)); } + public async override Task IsSessionRevokedAsync(string sessionId) + { + // A failed read must not count as a valid session, so the error isn't hidden. + return await Cache.GetAsync(AbpDynamicClaimCacheItem.CalculateRevokedSessionCacheKey(sessionId), hideErrors: false) != null; + } + protected async override Task RefreshAsync(Guid userId, Guid? tenantId = null) { try diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj index afc795041f..2d47b6810d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore.Authentication.OAuth diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj b/framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj index 0ea9594c73..07f4e9952d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Bundling/Volo.Abp.AspNetCore.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo.Abp.AspNetCore.Bundling.csproj index 80f10bd3f2..ef9515670e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Bundling/Volo.Abp.AspNetCore.Bundling.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo.Abp.AspNetCore.Bundling.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj index f729a24bdb..ee7b0db0e3 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj @@ -5,7 +5,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling @@ -18,7 +18,7 @@ - + diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo/Abp/AspNetCore/Components/MauiBlazor/Bundling/AbpAspNetCoreComponentsMauiBlazorBundlingModule.cs b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo/Abp/AspNetCore/Components/MauiBlazor/Bundling/AbpAspNetCoreComponentsMauiBlazorBundlingModule.cs index 07900b0fb0..512471c5c2 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo/Abp/AspNetCore/Components/MauiBlazor/Bundling/AbpAspNetCoreComponentsMauiBlazorBundlingModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo/Abp/AspNetCore/Components/MauiBlazor/Bundling/AbpAspNetCoreComponentsMauiBlazorBundlingModule.cs @@ -59,9 +59,10 @@ public class AbpAspNetCoreComponentsMauiBlazorBundlingModule : AbpModule var fileContent = await fileInfo.ReadAsStringAsync(); if (!bundleManager.IsBundlingEnabled()) { + var webRootPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot"); fileContent = CssRelativePath.Adjust(fileContent, - file.FileName, - Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")); + Path.Combine(webRootPath, file.FileName.RemovePreFix("/")), + Path.Combine(webRootPath, bundlingOptions.GlobalAssets.CssFileName)); styles += $"/*{file.FileName}*/{Environment.NewLine}{fileContent}{Environment.NewLine}{Environment.NewLine}"; } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling.csproj index ec14f258be..900c4f03f5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling.csproj index b33c5a2adf..43a48f0a5a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.csproj b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.csproj index 5a24de82c0..084e963206 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.csproj b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.csproj index 1603b46eb7..f74299cbc6 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.csproj b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.csproj index 5131e13a54..234681fb4c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore.Components.MauiBlazor diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.Server.Theming.MudBlazor.csproj b/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.Server.Theming.MudBlazor.csproj index b4464b5367..0fc30a18a3 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.Server.Theming.MudBlazor.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.Server.Theming.MudBlazor.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming/Volo.Abp.AspNetCore.Components.Server.Theming.csproj b/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming/Volo.Abp.AspNetCore.Components.Server.Theming.csproj index 2af3594de2..6d79f89db0 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming/Volo.Abp.AspNetCore.Components.Server.Theming.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming/Volo.Abp.AspNetCore.Components.Server.Theming.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Server/Volo.Abp.AspNetCore.Components.Server.csproj b/framework/src/Volo.Abp.AspNetCore.Components.Server/Volo.Abp.AspNetCore.Components.Server.csproj index a9a713990c..1faccdaacc 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Server/Volo.Abp.AspNetCore.Components.Server.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.Server/Volo.Abp.AspNetCore.Components.Server.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Server/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerModule.cs b/framework/src/Volo.Abp.AspNetCore.Components.Server/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerModule.cs index 74b5193066..55a681a8b8 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Server/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.Server/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerModule.cs @@ -2,6 +2,7 @@ using System.Net; using System.Net.Http; using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Components.Server; using Microsoft.AspNetCore.Http.Connections; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; @@ -52,6 +53,14 @@ public class AbpAspNetCoreComponentsServerModule : AbpModule Configure(options => { options.IgnoredUrls.AddIfNotContains("/_blazor"); + + // ComponentHub returns before component event handlers complete, so a hub level audit scope + // would be disposed before the application services add their actions and entity changes to it. + var componentHubType = typeof(CircuitOptions).Assembly.GetType("Microsoft.AspNetCore.Components.Server.ComponentHub"); + if (componentHubType != null) + { + options.IgnoredHubTypes.AddIfNotContains(componentHubType); + } }); if (!context.Services.ExecutePreConfiguredActions().IsBlazorWebApp) diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/AbpScripts.razor b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/AbpScripts.razor index 436a22fc0e..6560d97bd6 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/AbpScripts.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/AbpScripts.razor @@ -1,16 +1,14 @@ +@using Microsoft.AspNetCore.Components @implements IDisposable @inject IComponentBundleManager BundleManager @inject PersistentComponentState ApplicationState +@inject NavigationManager NavigationManager +@inject IComponentBundleUrlBuilder BundleUrlBuilder @if (ScriptFiles != null) { foreach (var file in ScriptFiles) { - var src = file; - if (!AppBasePath.IsNullOrWhiteSpace()) - { - src = AppBasePath.EnsureEndsWith('/') + file.RemovePreFix("/"); - } - + } } @@ -39,18 +37,29 @@ // We are in prerendering mode if (!BundleName.IsNullOrWhiteSpace()) { - ScriptFiles = (await BundleManager.GetScriptBundleFilesAsync(BundleName!)).ToList(); + var rawFiles = await BundleManager.GetScriptBundleFilesAsync(BundleName!); + ScriptFiles = await ResolveAsync(rawFiles); } } else { if (OperatingSystem.IsBrowser() && WebAssemblyScriptFiles != null) { - ScriptFiles = WebAssemblyScriptFiles; + ScriptFiles = await ResolveAsync(WebAssemblyScriptFiles); } } } + private async Task> ResolveAsync(IReadOnlyList files) + { + var resolved = new List(files.Count); + foreach (var file in files) + { + resolved.Add(await BundleUrlBuilder.BuildAsync(file, AppBasePath, NavigationManager.BaseUri)); + } + return resolved; + } + private Task Callback() { ApplicationState.PersistAsJson(PrerenderedKey, PrerenderedKey); diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/AbpStyles.razor b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/AbpStyles.razor index 1c2ede488f..015ef9fa35 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/AbpStyles.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/AbpStyles.razor @@ -1,16 +1,14 @@ +@using Microsoft.AspNetCore.Components @implements IDisposable @inject IComponentBundleManager BundleManager @inject PersistentComponentState ApplicationState +@inject NavigationManager NavigationManager +@inject IComponentBundleUrlBuilder BundleUrlBuilder @if (StyleFiles != null) { foreach (var file in StyleFiles) { - var href = file; - if (!AppBasePath.IsNullOrWhiteSpace()) - { - href = AppBasePath.EnsureEndsWith('/') + file.RemovePreFix("/"); - } - + } } @@ -39,7 +37,8 @@ // We are in prerendering mode if (!BundleName.IsNullOrWhiteSpace()) { - StyleFiles = (await BundleManager.GetStyleBundleFilesAsync(BundleName!)).ToList(); + var rawFiles = await BundleManager.GetStyleBundleFilesAsync(BundleName!); + StyleFiles = await ResolveAsync(rawFiles); } } else @@ -47,7 +46,7 @@ StyleFiles = scriptFiles; if (OperatingSystem.IsBrowser() && StyleFiles != null && WebAssemblyStyleFiles != null) { - StyleFiles.AddIfNotContains(WebAssemblyStyleFiles); + StyleFiles.AddIfNotContains(await ResolveAsync(WebAssemblyStyleFiles)); } } } @@ -60,11 +59,21 @@ { _hasRemoveServerStyle = true; await Task.Delay(3000); - StyleFiles = WebAssemblyStyleFiles; + StyleFiles = await ResolveAsync(WebAssemblyStyleFiles); StateHasChanged(); } } + private async Task> ResolveAsync(IReadOnlyList files) + { + var resolved = new List(files.Count); + foreach (var file in files) + { + resolved.Add(await BundleUrlBuilder.BuildAsync(file, AppBasePath, NavigationManager.BaseUri)); + } + return resolved; + } + private Task Callback() { ApplicationState.PersistAsJson(PrerenderedKey, StyleFiles); diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/ComponentBundleUrlBuilder.cs b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/ComponentBundleUrlBuilder.cs new file mode 100644 index 0000000000..f813f90d8a --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/ComponentBundleUrlBuilder.cs @@ -0,0 +1,62 @@ +using System; +using System.Threading.Tasks; +using JetBrains.Annotations; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Bundling; + +public class ComponentBundleUrlBuilder : IComponentBundleUrlBuilder, ITransientDependency +{ + public virtual Task BuildAsync( + [NotNull] string fileName, + [CanBeNull] string? appBasePath, + [CanBeNull] string? navigationBaseUri) + { + Check.NotNull(fileName, nameof(fileName)); + + if (IsExternalUrl(fileName)) + { + return Task.FromResult(fileName); + } + + var pathBase = !string.IsNullOrWhiteSpace(appBasePath) + ? appBasePath + : ExtractPathBaseFromNavigationBaseUri(navigationBaseUri); + + if (string.IsNullOrWhiteSpace(pathBase)) + { + return Task.FromResult(fileName); + } + + var normalized = pathBase.EnsureEndsWith('/'); + if (normalized == "/") + { + return Task.FromResult(fileName); + } + + if (fileName.StartsWith(normalized, StringComparison.Ordinal)) + { + return Task.FromResult(fileName); + } + + return Task.FromResult(normalized + fileName.RemovePreFix("/")); + } + + protected virtual bool IsExternalUrl([NotNull] string fileName) + { + return fileName.StartsWith("//", StringComparison.Ordinal) || + (fileName.Contains(':') && Uri.TryCreate(fileName, UriKind.Absolute, out _)); + } + + protected virtual string? ExtractPathBaseFromNavigationBaseUri([CanBeNull] string? navigationBaseUri) + { + if (string.IsNullOrWhiteSpace(navigationBaseUri)) + { + return null; + } + + return Uri.TryCreate(navigationBaseUri, UriKind.Absolute, out var uri) + ? uri.AbsolutePath + : null; + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/IComponentBundleUrlBuilder.cs b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/IComponentBundleUrlBuilder.cs new file mode 100644 index 0000000000..633ec3561e --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Bundling/IComponentBundleUrlBuilder.cs @@ -0,0 +1,8 @@ +using System.Threading.Tasks; + +namespace Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Bundling; + +public interface IComponentBundleUrlBuilder +{ + Task BuildAsync(string fileName, string? appBasePath, string? navigationBaseUri); +} diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.csproj b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.csproj index 0e174f1ab8..58ef4c395b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Volo.Abp.AspNetCore.Components.Web.Theming.csproj b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Volo.Abp.AspNetCore.Components.Web.Theming.csproj index 49238669e2..0aa56f3389 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Volo.Abp.AspNetCore.Components.Web.Theming.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Volo.Abp.AspNetCore.Components.Web.Theming.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo.Abp.AspNetCore.Components.Web.csproj b/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo.Abp.AspNetCore.Components.Web.csproj index e2380bbd98..d32a222c5b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo.Abp.AspNetCore.Components.Web.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo.Abp.AspNetCore.Components.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/MenuItemUrlHelper.cs b/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/MenuItemUrlHelper.cs new file mode 100644 index 0000000000..c69024b9cd --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/MenuItemUrlHelper.cs @@ -0,0 +1,20 @@ +using System; + +namespace Volo.Abp.AspNetCore.Components.Web; + +public static class MenuItemUrlHelper +{ + /// + /// Makes an app-local menu url ("/x" or "~/x") relative to the base href, so it keeps the PathBase. + /// Protocol-relative urls ("//host/x") point to another host and are returned as is. + /// + public static string? ToBaseRelativeUrl(string? url) + { + if (url == null || url.StartsWith("//", StringComparison.Ordinal)) + { + return url; + } + + return url.TrimStart('/', '~'); + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling.csproj index bf82865fdf..90acb578c5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling.csproj index adb6c6260d..35ce7c1708 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.csproj b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.csproj index 1f830fa162..954bf1677a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj index 76b63c76c7..69897f9acf 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj index 0809acdc21..2722a6ec0f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore.Components.WebAssembly diff --git a/framework/src/Volo.Abp.AspNetCore.Components/Volo.Abp.AspNetCore.Components.csproj b/framework/src/Volo.Abp.AspNetCore.Components/Volo.Abp.AspNetCore.Components.csproj index b980ae5846..21ddee96f1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components/Volo.Abp.AspNetCore.Components.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components/Volo.Abp.AspNetCore.Components.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore.Components diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj index 97f328ca22..1658387054 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore.MultiTenancy diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo.Abp.AspNetCore.Mvc.Client.Common.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo.Abp.AspNetCore.Mvc.Client.Common.csproj index 211e798093..227cf387f1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo.Abp.AspNetCore.Mvc.Client.Common.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo.Abp.AspNetCore.Mvc.Client.Common.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.AspNetCore.Mvc.Client.Common diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributorCache.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributorCache.cs index 8f81b5aab4..dd6455272d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributorCache.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributorCache.cs @@ -47,6 +47,12 @@ public class RemoteDynamicClaimsPrincipalContributorCache : RemoteDynamicClaimsP return await Cache.GetAsync(AbpDynamicClaimCacheItem.CalculateCacheKey(userId, tenantId)); } + public async override Task IsSessionRevokedAsync(string sessionId) + { + // A failed read must not count as a valid session, so the error isn't hidden. + return await Cache.GetAsync(AbpDynamicClaimCacheItem.CalculateRevokedSessionCacheKey(sessionId), hideErrors: false) != null; + } + public virtual Task GetAsync(Guid userId, Guid? tenantId, string accessToken) { return GetAsync(userId, tenantId, () => RefreshAsync(userId, tenantId, accessToken)); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj index 0453b94a15..593b32a821 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore.Mvc.Client diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/AbpRemoteDynamicClaimsCookieAuthenticationOptionsExtensions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/AbpRemoteDynamicClaimsCookieAuthenticationOptionsExtensions.cs index 4887429898..edcf69c34b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/AbpRemoteDynamicClaimsCookieAuthenticationOptionsExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/AbpRemoteDynamicClaimsCookieAuthenticationOptionsExtensions.cs @@ -88,6 +88,15 @@ public static class AbpRemoteDynamicClaimsCookieAuthenticationOptionsExtensions var tenantId = identity!.FindTenantId(); using (httpContext.RequestServices.GetRequiredService().Change(tenantId)) { + var sessionId = identity!.FindSessionId(); + if (!sessionId.IsNullOrWhiteSpace() && await dynamicClaimsCache.IsSessionRevokedAsync(sessionId!)) + { + httpContext.RequestServices + .GetRequiredService>() + .LogWarning($"The session: {sessionId} of user: {userId.Value} is revoked, the authentication cookie is rejected."); + return false; + } + await dynamicClaimsCache.GetAsync(userId.Value, tenantId, accessToken); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj index 887ee1fa08..abb19e4cf1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.AspNetCore.Mvc.Contracts diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.csproj index 4fa344e256..a2edd2c233 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo.Abp.AspNetCore.Mvc.Dapr.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo.Abp.AspNetCore.Mvc.Dapr.csproj index f0fcc5e043..1925e1cbf2 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo.Abp.AspNetCore.Mvc.Dapr.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Dapr/Volo.Abp.AspNetCore.Mvc.Dapr.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson.csproj index d3401b1d7d..6a8710f70b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson/Volo.Abp.AspNetCore.Mvc.NewtonsoftJson.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/DatePicker/AbpDatePickerBaseTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/DatePicker/AbpDatePickerBaseTagHelperService.cs index b79b97140e..77dc0c3fcc 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/DatePicker/AbpDatePickerBaseTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/DatePicker/AbpDatePickerBaseTagHelperService.cs @@ -666,6 +666,7 @@ public abstract class AbpDatePickerBaseTagHelperService : AbpTagHelp abpButtonTagHelper.Icon = icon; abpButtonTagHelper.Disabled = TagHelper.IsDisabled || GetAttribute() != null; + abpButtonTagHelper.Size = GetButtonSize(context, output); if (!visible) { @@ -775,6 +776,23 @@ public abstract class AbpDatePickerBaseTagHelperService : AbpTagHelp }; } + protected virtual AbpButtonSize GetButtonSize(TagHelperContext context, TagHelperOutput output) + { + var attribute = GetAttribute(); + + if (attribute != null) + { + TagHelper.Size = attribute.Size; + } + + return TagHelper.Size switch + { + AbpFormControlSize.Small => AbpButtonSize.Small, + AbpFormControlSize.Large => AbpButtonSize.Large, + _ => AbpButtonSize.Default + }; + } + protected virtual Task GetValidationAsHtmlAsync(TagHelperContext context, TagHelperOutput output) { var @for = GetModelExpression(); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj index 420b40973b..d29d87b76a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions.csproj index 9382c749c7..069d64c39f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj index 85825792b3..e7c3493c7b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpAspNetCoreMvcUiBundlingModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpAspNetCoreMvcUiBundlingModule.cs index 13b157748b..00ffcfc46f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpAspNetCoreMvcUiBundlingModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpAspNetCoreMvcUiBundlingModule.cs @@ -80,9 +80,10 @@ public class AbpAspNetCoreMvcUiBundlingModule : AbpModule var fileContent = await fileInfo.ReadAsStringAsync(); if (!bundleManager.IsBundlingEnabled()) { + var webRootPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot"); fileContent = CssRelativePath.Adjust(fileContent, - file.FileName, - Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")); + Path.Combine(webRootPath, file.FileName.RemovePreFix("/")), + Path.Combine(webRootPath, bundlingOptions.GlobalAssets.CssFileName)); styles += $"/*{file.FileName}*/{Environment.NewLine}{fileContent}{Environment.NewLine}{Environment.NewLine}"; } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs index b83d090f11..91618566ac 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs @@ -5,7 +5,9 @@ using System.Collections.Generic; using System.Diagnostics; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Rendering; +using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; @@ -100,6 +102,35 @@ public abstract class AbpTagHelperResourceService : ITransientDependency output.Content.AppendHtml($"{Environment.NewLine}"); } + /// + /// External files are not bundled, but an external file given as a local path ("/x" or "~/x") + /// is still served by this application, so it needs the request's PathBase like the other files. + /// A "/x" path that already starts with the PathBase is kept as is, so URLs that were prefixed manually keep working. + /// + protected virtual string GetExternalFileUrl(ViewContext viewContext, BundleFile file) + { + var fileName = file.FileName; + if (fileName.StartsWith("~/", StringComparison.Ordinal)) + { + return viewContext.GetUrlHelper().Content(fileName); + } + + if (fileName.StartsWith("/", StringComparison.Ordinal) && !fileName.StartsWith("//", StringComparison.Ordinal)) + { + var pathBase = viewContext.HttpContext.Request.PathBase; + var queryIndex = fileName.IndexOfAny(['?', '#']); + var path = new PathString(queryIndex < 0 ? fileName : fileName.Substring(0, queryIndex)); + if (pathBase.HasValue && path.StartsWithSegments(pathBase)) + { + return fileName; + } + + return viewContext.GetUrlHelper().Content("~" + fileName); + } + + return fileName; + } + protected virtual string GenerateBundleName(List bundleItems) { return bundleItems.JoinAsString("|").ToMd5(); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs index 0e87d88370..f6ba47c613 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs @@ -54,7 +54,7 @@ public class AbpTagHelperScriptService : AbpTagHelperResourceService var nonceText = (viewContext.HttpContext.Items.TryGetValue(AbpAspNetCoreConsts.ScriptNonceKey, out var nonce) && nonce is string nonceString && !string.IsNullOrEmpty(nonceString)) ? $"nonce=\"{nonceString}\" " : string.Empty; - var src = file.IsExternalFile ? file.FileName : viewContext.GetUrlHelper().Content((file.FileName + "?_v=" + fileInfo!.LastModified.UtcTicks).EnsureStartsWith('~')); + var src = file.IsExternalFile ? GetExternalFileUrl(viewContext, file) : viewContext.GetUrlHelper().Content((file.FileName + "?_v=" + fileInfo!.LastModified.UtcTicks).EnsureStartsWith('~')); output.Content.AppendHtml($"{Environment.NewLine}"); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs index a61d000d6b..b19aa97fe7 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs @@ -52,7 +52,7 @@ public class AbpTagHelperStyleService : AbpTagHelperResourceService _ => false }; - var href = file.IsExternalFile ? file.FileName : viewContext.GetUrlHelper().Content((file.FileName + "?_v=" + fileInfo!.LastModified.UtcTicks).EnsureStartsWith('~')); + var href = file.IsExternalFile ? GetExternalFileUrl(viewContext, file) : viewContext.GetUrlHelper().Content((file.FileName + "?_v=" + fileInfo!.LastModified.UtcTicks).EnsureStartsWith('~')); if (preload || Options.PreloadStylesByDefault || Options.PreloadStyles.Any(x => file.FileName.StartsWith(x, StringComparison.OrdinalIgnoreCase))) { output.Content.AppendHtml(SecurityHeadersOptions.UseContentSecurityPolicyScriptNonce diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj index 3cece12cc8..c09c45e676 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/he.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/he.json new file mode 100644 index 0000000000..ed3dcc8a6d --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/he.json @@ -0,0 +1,13 @@ +{ + "culture": "he", + "texts": { + "GivenTenantIsNotExist": "הדייר שצוין אינו קיים: {0}", + "GivenTenantIsNotAvailable": "הדייר שצוין אינו זמין: {0}", + "Tenant": "דייר", + "Switch": "החלפה", + "Name": "שם", + "SwitchTenantHint": "השאירו את שדה השם ריק כדי לעבור לצד המארח.", + "SwitchTenant": "החלפת דייר", + "NotSelected": "לא נבחר" + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/pt.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/pt.json index 3c1e0f1efc..7f6ca8d235 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/pt.json +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/pt.json @@ -6,7 +6,7 @@ "Tenant": "Cliente", "Switch": "mudar", "Name": "Nome", - "SwitchTenantHint": "Deixe o campo do nome em branco para mudar para o lado do anfitrião.", + "SwitchTenantHint": "Deixe o campo do nome em branco para mudar para o lado do host.", "SwitchTenant": "Mudar de cliente", "NotSelected": "Não selecionado" } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj index 0f1bd42757..0e5824ea52 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj index f149af33ba..fe22e13a0c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj index c2bc439691..7f24c91551 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/toast/abp-toast.css b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/toast/abp-toast.css index 4c5f172fc8..fbd6f48d9e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/toast/abp-toast.css +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/toast/abp-toast.css @@ -129,6 +129,40 @@ animation: toastOut 0.3s ease-in-out forwards; } +.abp-toast-container-top { + justify-content: flex-start; +} + +@keyframes toastInLeft { + from { + transform: translateX(-100%); + opacity: 0; + } + to { + transform: translateX(0); + opacity: 1; + } +} + +@keyframes toastOutLeft { + from { + transform: translateX(0); + opacity: 1; + } + to { + transform: translateX(-100%); + opacity: 0; + } +} + +.abp-toast-container-left .abp-toast { + animation-name: toastInLeft; +} + +.abp-toast-container-left .abp-toast.toast-removing { + animation-name: toastOutLeft; +} + @media only screen and (max-width: 768px) { .abp-toast-container { min-width: 100%; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/toast/abp-toast.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/toast/abp-toast.js index a23d844ce6..4bffd57a29 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/toast/abp-toast.js +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/toast/abp-toast.js @@ -1,22 +1,4 @@ function AbpToastService(globalOptions) { - // Static default configuration for all instances - if (!AbpToastService.defaultOptions) { - AbpToastService.defaultOptions = { - closable: true, - sticky: false, - life: 5000, - tapToDismiss: false, - containerKey: undefined, - iconClass: undefined, - position: { - top: 'auto', - right: '30px', - bottom: '30px', - left: 'auto' - } - }; - } - // Find existing container or create new one const containerId = globalOptions?.containerKey ? `toast-container-${globalOptions.containerKey}` : @@ -39,6 +21,23 @@ function AbpToastService(globalOptions) { this.updateContainerPosition(); } +// Static default configuration for all instances. +// Defined up front so setDefaultOptions can be called before the first toast. +AbpToastService.defaultOptions = { + closable: true, + sticky: false, + life: 5000, + tapToDismiss: false, + containerKey: undefined, + iconClass: undefined, + position: { + top: 'auto', + right: '30px', + bottom: '30px', + left: 'auto' + } +}; + // Deep merge objects AbpToastService.prototype.extend = function(target, ...sources) { sources.forEach(source => { @@ -57,6 +56,10 @@ AbpToastService.prototype.extend = function(target, ...sources) { AbpToastService.prototype.updateContainerPosition = function() { const { position } = this.globalOptions; Object.assign(this.container.style, position); + + const isSet = value => value && value !== 'auto'; + this.container.classList.toggle('abp-toast-container-left', isSet(position?.left) && !isSet(position?.right)); + this.container.classList.toggle('abp-toast-container-top', isSet(position?.top) && !isSet(position?.bottom)); }; // Update global options @@ -188,20 +191,29 @@ AbpToastService.setDefaultOptions = function(options) { }; var abp = abp || {}; -(function () { +(function () { + // All containers are full width on small screens (see abp-toast.css), + // so use the default container there to avoid covering each other + function createToastService(options) { + if (options?.containerKey && window.matchMedia('(max-width: 768px)').matches) { + return new AbpToastService({ ...options, containerKey: undefined }); + } + return new AbpToastService(options); + } + abp.notify.success = function (message, title, options) { - new AbpToastService().success(message, title, options); + createToastService(options).success(message, title, options); }; abp.notify.info = function (message, title, options) { - new AbpToastService().info(message, title, options); + createToastService(options).info(message, title, options); }; abp.notify.warn = function (message, title, options) { - new AbpToastService().warning(message, title, options); + createToastService(options).warning(message, title, options); }; abp.notify.error = function (message, title, options) { - new AbpToastService().error(message, title, options); + createToastService(options).error(message, title, options); }; })(); \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj index 3fa14bf8de..d12af926d2 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj index 6ae382c40a..97496ede15 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj index 98b18f9d39..79564c8423 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Localization/AbpMvcAttributeValidationResultProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Localization/AbpMvcAttributeValidationResultProvider.cs index 34aeb2c44c..cc2d1eed1d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Localization/AbpMvcAttributeValidationResultProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Localization/AbpMvcAttributeValidationResultProvider.cs @@ -1,5 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.Threading; +using System.Threading.Tasks; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; using Volo.Abp.AspNetCore.Mvc.Validation; @@ -23,11 +25,27 @@ public class AbpMvcAttributeValidationResultProvider : DefaultAttributeValidatio } public override ValidationResult? GetOrDefault(ValidationAttribute validationAttribute, object? validatingObject, ValidationContext validationContext) + { + LocalizeErrorMessage(validationAttribute, validationContext); + return base.GetOrDefault(validationAttribute, validatingObject, validationContext); + } + + public override Task GetOrDefaultAsync( + ValidationAttribute validationAttribute, + object? validatingObject, + ValidationContext validationContext, + CancellationToken cancellationToken = default) + { + LocalizeErrorMessage(validationAttribute, validationContext); + return base.GetOrDefaultAsync(validationAttribute, validatingObject, validationContext, cancellationToken); + } + + protected virtual void LocalizeErrorMessage(ValidationAttribute validationAttribute, ValidationContext validationContext) { var resourceSource = _abpMvcDataAnnotationsLocalizationOptions.AssemblyResources.GetOrDefault(validationContext.ObjectType.Assembly); if (resourceSource == null) { - return base.GetOrDefault(validationAttribute, validatingObject, validationContext); + return; } if (validationAttribute.ErrorMessage == null) @@ -39,7 +57,5 @@ public class AbpMvcAttributeValidationResultProvider : DefaultAttributeValidatio { validationAttribute.ErrorMessage = _stringLocalizerFactory.Create(resourceSource)[validationAttribute.ErrorMessage]; } - - return base.GetOrDefault(validationAttribute, validatingObject, validationContext); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj b/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj index cc5761c6e0..01d81b7775 100644 --- a/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore.Serilog diff --git a/framework/src/Volo.Abp.AspNetCore.SignalR/Volo.Abp.AspNetCore.SignalR.csproj b/framework/src/Volo.Abp.AspNetCore.SignalR/Volo.Abp.AspNetCore.SignalR.csproj index 5a73959a40..62c1d95a03 100644 --- a/framework/src/Volo.Abp.AspNetCore.SignalR/Volo.Abp.AspNetCore.SignalR.csproj +++ b/framework/src/Volo.Abp.AspNetCore.SignalR/Volo.Abp.AspNetCore.SignalR.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore.SignalR diff --git a/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Auditing/AbpAuditHubFilter.cs b/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Auditing/AbpAuditHubFilter.cs index 7d3c21f067..7ac2e12fd0 100644 --- a/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Auditing/AbpAuditHubFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Auditing/AbpAuditHubFilter.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Auditing; using Volo.Abp.Auditing; using Volo.Abp.Uow; using Volo.Abp.Users; @@ -17,7 +18,7 @@ public class AbpAuditHubFilter : IHubFilter public virtual async ValueTask InvokeMethodAsync(HubInvocationContext invocationContext, Func> next) { var options = invocationContext.ServiceProvider.GetRequiredService>().Value; - if (!options.IsEnabled) + if (!options.IsEnabled || IsIgnoredHub(invocationContext)) { return await next(invocationContext); } @@ -76,6 +77,13 @@ public class AbpAuditHubFilter : IHubFilter } } + protected virtual bool IsIgnoredHub(HubInvocationContext invocationContext) + { + var options = invocationContext.ServiceProvider.GetRequiredService>().Value; + var hubType = invocationContext.Hub.GetType(); + return options.IgnoredHubTypes.Any(ignoredHubType => ignoredHubType.IsAssignableFrom(hubType)); + } + private async Task ShouldWriteAuditLogAsync(AuditLogInfo auditLogInfo, IServiceProvider serviceProvider, bool hasError) { var options = serviceProvider.GetRequiredService>().Value; diff --git a/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Auditing/AspNetCoreSignalRAuditLogContributor.cs b/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Auditing/AspNetCoreSignalRAuditLogContributor.cs index a4b977de2f..f39b50c606 100644 --- a/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Auditing/AspNetCoreSignalRAuditLogContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.SignalR/Volo/Abp/AspNetCore/SignalR/Auditing/AspNetCoreSignalRAuditLogContributor.cs @@ -25,6 +25,10 @@ public class AspNetCoreSignalRAuditLogContributor : AuditLogContributor, ITransi return; } + // The HTTP method of a non WebSocket transport (like the GET request of Server-Sent Events) belongs to the + // connection, not to the hub method call. Otherwise, the audit logs of the hub method calls are treated as GET requests. + context.AuditInfo.HttpMethod = null; + var clientInfoProvider = context.ServiceProvider.GetRequiredService(); if (context.AuditInfo.ClientIpAddress == null) { diff --git a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj index a9ba46892e..a3051bc049 100644 --- a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj +++ b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore.TestBase diff --git a/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj b/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj index 9affb2a326..e5e499537d 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj +++ b/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.AspNetCore @@ -34,4 +34,8 @@ + + + + diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAspNetCoreAuditingOptions.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAspNetCoreAuditingOptions.cs index 693945e903..ad5d757f1c 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAspNetCoreAuditingOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAspNetCoreAuditingOptions.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; namespace Volo.Abp.AspNetCore.Auditing; @@ -11,4 +12,11 @@ public class AbpAspNetCoreAuditingOptions /// starting with an ignored URL. /// public List IgnoredUrls { get; } = new(); + + /// + /// SignalR hub types (including the derived types) that no audit log scope is created for, + /// neither for their requests by the nor for their method calls by the ABP SignalR integration. + /// The audited services called by these hubs still create and save their own audit logs. + /// + public List IgnoredHubTypes { get; } = new(); } diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs index 112b3be61a..5e6334bda0 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs @@ -3,6 +3,7 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.Options; using Volo.Abp.AspNetCore.Middleware; using Volo.Abp.Auditing; @@ -94,6 +95,17 @@ public class AbpAuditingMiddleware : AbpMiddlewareBase, ITransientDependency } } + protected async override Task ShouldSkipAsync(HttpContext context, RequestDelegate next) + { + var hubType = context.GetEndpoint()?.Metadata?.GetMetadata()?.HubType; + if (hubType != null && AspNetCoreAuditingOptions.IgnoredHubTypes.Any(ignoredHubType => ignoredHubType.IsAssignableFrom(hubType))) + { + return true; + } + + return await base.ShouldSkipAsync(context, next); + } + private bool IsIgnoredUrl(HttpContext context) { if (context.Request.Path.Value == null) diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AspNetCoreAuditLogContributor.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AspNetCoreAuditLogContributor.cs index becdee806d..bce8440098 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AspNetCoreAuditLogContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AspNetCoreAuditLogContributor.cs @@ -2,6 +2,7 @@ using System.Linq; using System.Text; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; @@ -30,7 +31,9 @@ public class AspNetCoreAuditLogContributor : AuditLogContributor, ITransientDepe return; } - if (httpContext.WebSockets.IsWebSocketRequest) + // HttpContext.WebSockets writes to the feature collection on every read when the request has no + // websocket feature, which breaks other threads reading the same HttpContext (e.g. Blazor prerendering). + if (httpContext.Features.Get()?.IsWebSocketRequest == true) { return; } diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs index 64c507d260..bd19bbf348 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Components.Endpoints; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.Options; using Volo.Abp.AspNetCore.Middleware; using Volo.Abp.DependencyInjection; @@ -94,6 +95,13 @@ public class AbpUnitOfWorkMiddleware : AbpMiddlewareBase, ITransientDependency return true; } + // A hub connection request lives as long as the connection. A unit of work reserved for it would be + // shared by all the hub method calls of the connection and can not be completed when the client disconnects. + if (context.GetEndpoint()?.Metadata?.GetMetadata() != null) + { + return true; + } + return await base.ShouldSkipAsync(context, next); } } diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider.cs index e323b323d1..f3ad8a8a75 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider.cs @@ -1,5 +1,6 @@ using System; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.Options; using Volo.Abp.DependencyInjection; using Volo.Abp.Http; @@ -20,7 +21,9 @@ public class AspNetCoreUnitOfWorkTransactionBehaviourProvider : IUnitOfWorkTrans return null; } - if (httpContext.WebSockets.IsWebSocketRequest) + // HttpContext.WebSockets writes to the feature collection on every read when the request has no + // websocket feature, which breaks other threads reading the same HttpContext (e.g. Blazor prerendering). + if (httpContext.Features.Get()?.IsWebSocketRequest == true) { return null; } diff --git a/framework/src/Volo.Abp.AspNetCore/buildTransitive/Volo.Abp.AspNetCore.targets b/framework/src/Volo.Abp.AspNetCore/buildTransitive/Volo.Abp.AspNetCore.targets new file mode 100644 index 0000000000..ac2b3a951d --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore/buildTransitive/Volo.Abp.AspNetCore.targets @@ -0,0 +1,14 @@ + + + + false + + + + + false + + diff --git a/framework/src/Volo.Abp.Auditing.Contracts/Volo.Abp.Auditing.Contracts.csproj b/framework/src/Volo.Abp.Auditing.Contracts/Volo.Abp.Auditing.Contracts.csproj index 20c235230f..be549bf490 100644 --- a/framework/src/Volo.Abp.Auditing.Contracts/Volo.Abp.Auditing.Contracts.csproj +++ b/framework/src/Volo.Abp.Auditing.Contracts/Volo.Abp.Auditing.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Auditing.Contracts diff --git a/framework/src/Volo.Abp.Auditing/Volo.Abp.Auditing.csproj b/framework/src/Volo.Abp.Auditing/Volo.Abp.Auditing.csproj index 42af9b5b97..dd94eb794a 100644 --- a/framework/src/Volo.Abp.Auditing/Volo.Abp.Auditing.csproj +++ b/framework/src/Volo.Abp.Auditing/Volo.Abp.Auditing.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Auditing diff --git a/framework/src/Volo.Abp.Authorization.Abstractions/Volo.Abp.Authorization.Abstractions.csproj b/framework/src/Volo.Abp.Authorization.Abstractions/Volo.Abp.Authorization.Abstractions.csproj index 173bf23a70..ebc70dc1bf 100644 --- a/framework/src/Volo.Abp.Authorization.Abstractions/Volo.Abp.Authorization.Abstractions.csproj +++ b/framework/src/Volo.Abp.Authorization.Abstractions/Volo.Abp.Authorization.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Authorization.Abstractions diff --git a/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj b/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj index a068287892..f1f01ae005 100644 --- a/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj +++ b/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Authorization diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Localization/he.json b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Localization/he.json new file mode 100644 index 0000000000..d424e992c1 --- /dev/null +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Localization/he.json @@ -0,0 +1,10 @@ +{ + "culture": "he", + "texts": { + "Volo.Authorization:010001": "ההרשאה נכשלה! המדיניות הנדרשת לא התקיימה.", + "Volo.Authorization:010002": "ההרשאה נכשלה! המדיניות הנדרשת לא התקיימה: {PolicyName}", + "Volo.Authorization:010003": "ההרשאה נכשלה! המדיניות הנדרשת לא התקיימה עבור המשאב: {ResourceName}", + "Volo.Authorization:010004": "ההרשאה נכשלה! הדרישה לא התקיימה עבור המשאב: {ResourceName}", + "Volo.Authorization:010005": "ההרשאה נכשלה! הדרישות לא התקיימו עבור המשאב: {ResourceName}" + } +} diff --git a/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj b/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj index 70d1672dfc..f7513aa65e 100644 --- a/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj +++ b/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj @@ -4,7 +4,7 @@ - net8.0;net9.0;net10.0 + net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.AutoMapper diff --git a/framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj b/framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj index 9f1ddd5467..d978284054 100644 --- a/framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj +++ b/framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj b/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj index cb34bc6642..76765cebfd 100644 --- a/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj +++ b/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Autofac diff --git a/framework/src/Volo.Abp.AzureServiceBus/Volo.Abp.AzureServiceBus.csproj b/framework/src/Volo.Abp.AzureServiceBus/Volo.Abp.AzureServiceBus.csproj index fe6a6a9708..36d2a9db19 100644 --- a/framework/src/Volo.Abp.AzureServiceBus/Volo.Abp.AzureServiceBus.csproj +++ b/framework/src/Volo.Abp.AzureServiceBus/Volo.Abp.AzureServiceBus.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.AzureServiceBus diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo.Abp.BackgroundJobs.Abstractions.csproj b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo.Abp.BackgroundJobs.Abstractions.csproj index 1627c0e16d..e3383dcf8a 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo.Abp.BackgroundJobs.Abstractions.csproj +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo.Abp.BackgroundJobs.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BackgroundJobs.Abstractions diff --git a/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo.Abp.BackgroundJobs.HangFire.csproj b/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo.Abp.BackgroundJobs.HangFire.csproj index 6ad383d22b..8f4590d35f 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo.Abp.BackgroundJobs.HangFire.csproj +++ b/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo.Abp.BackgroundJobs.HangFire.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BackgroundJobs.HangFire diff --git a/framework/src/Volo.Abp.BackgroundJobs.Quartz/Volo.Abp.BackgroundJobs.Quartz.csproj b/framework/src/Volo.Abp.BackgroundJobs.Quartz/Volo.Abp.BackgroundJobs.Quartz.csproj index b8bbf250b3..24b6421fe4 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Quartz/Volo.Abp.BackgroundJobs.Quartz.csproj +++ b/framework/src/Volo.Abp.BackgroundJobs.Quartz/Volo.Abp.BackgroundJobs.Quartz.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BackgroundJobs.Quartz diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo.Abp.BackgroundJobs.RabbitMQ.csproj b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo.Abp.BackgroundJobs.RabbitMQ.csproj index e59bb911ee..bc68b7402a 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo.Abp.BackgroundJobs.RabbitMQ.csproj +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo.Abp.BackgroundJobs.RabbitMQ.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BackgroundJobs.RabbitMQ diff --git a/framework/src/Volo.Abp.BackgroundJobs.TickerQ/Volo.Abp.BackgroundJobs.TickerQ.csproj b/framework/src/Volo.Abp.BackgroundJobs.TickerQ/Volo.Abp.BackgroundJobs.TickerQ.csproj index 41d70914a4..bfc183fbfe 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.TickerQ/Volo.Abp.BackgroundJobs.TickerQ.csproj +++ b/framework/src/Volo.Abp.BackgroundJobs.TickerQ/Volo.Abp.BackgroundJobs.TickerQ.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.BackgroundJobs.TickerQ diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo.Abp.BackgroundJobs.csproj b/framework/src/Volo.Abp.BackgroundJobs/Volo.Abp.BackgroundJobs.csproj index 10f8395465..5939b93abb 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo.Abp.BackgroundJobs.csproj +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo.Abp.BackgroundJobs.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BackgroundJobs diff --git a/framework/src/Volo.Abp.BackgroundWorkers.Hangfire/Volo.Abp.BackgroundWorkers.Hangfire.csproj b/framework/src/Volo.Abp.BackgroundWorkers.Hangfire/Volo.Abp.BackgroundWorkers.Hangfire.csproj index c7f11775f0..ab921c6351 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers.Hangfire/Volo.Abp.BackgroundWorkers.Hangfire.csproj +++ b/framework/src/Volo.Abp.BackgroundWorkers.Hangfire/Volo.Abp.BackgroundWorkers.Hangfire.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BackgroundWorkers.Hangfire diff --git a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo.Abp.BackgroundWorkers.Quartz.csproj b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo.Abp.BackgroundWorkers.Quartz.csproj index 910b2097ef..9e83bc0979 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo.Abp.BackgroundWorkers.Quartz.csproj +++ b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo.Abp.BackgroundWorkers.Quartz.csproj @@ -5,7 +5,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BackgroundWorkers.Quartz diff --git a/framework/src/Volo.Abp.BackgroundWorkers.TickerQ/Volo.Abp.BackgroundWorkers.TickerQ.csproj b/framework/src/Volo.Abp.BackgroundWorkers.TickerQ/Volo.Abp.BackgroundWorkers.TickerQ.csproj index b62024131d..2b6c4fcbdc 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers.TickerQ/Volo.Abp.BackgroundWorkers.TickerQ.csproj +++ b/framework/src/Volo.Abp.BackgroundWorkers.TickerQ/Volo.Abp.BackgroundWorkers.TickerQ.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.BackgroundWorkers.TickerQ diff --git a/framework/src/Volo.Abp.BackgroundWorkers/Volo.Abp.BackgroundWorkers.csproj b/framework/src/Volo.Abp.BackgroundWorkers/Volo.Abp.BackgroundWorkers.csproj index a6d2388ce7..15e624cf6a 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers/Volo.Abp.BackgroundWorkers.csproj +++ b/framework/src/Volo.Abp.BackgroundWorkers/Volo.Abp.BackgroundWorkers.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BackgroundWorkers diff --git a/framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj b/framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj index 761c6f87cd..c3cd22a87a 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj +++ b/framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo.Abp.BlobStoring.Aliyun.csproj b/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo.Abp.BlobStoring.Aliyun.csproj index 5bf60a3f21..605cb648ac 100644 --- a/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo.Abp.BlobStoring.Aliyun.csproj +++ b/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo.Abp.BlobStoring.Aliyun.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BlobStoring.Aliyun diff --git a/framework/src/Volo.Abp.BlobStoring.Aws/Volo.Abp.BlobStoring.Aws.csproj b/framework/src/Volo.Abp.BlobStoring.Aws/Volo.Abp.BlobStoring.Aws.csproj index b74a1d153f..a2e79f56f8 100644 --- a/framework/src/Volo.Abp.BlobStoring.Aws/Volo.Abp.BlobStoring.Aws.csproj +++ b/framework/src/Volo.Abp.BlobStoring.Aws/Volo.Abp.BlobStoring.Aws.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable false diff --git a/framework/src/Volo.Abp.BlobStoring.Azure/Volo.Abp.BlobStoring.Azure.csproj b/framework/src/Volo.Abp.BlobStoring.Azure/Volo.Abp.BlobStoring.Azure.csproj index ae20a2ebbc..88c7165392 100644 --- a/framework/src/Volo.Abp.BlobStoring.Azure/Volo.Abp.BlobStoring.Azure.csproj +++ b/framework/src/Volo.Abp.BlobStoring.Azure/Volo.Abp.BlobStoring.Azure.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BlobStoring.Azure diff --git a/framework/src/Volo.Abp.BlobStoring.Bunny/Volo.Abp.BlobStoring.Bunny.csproj b/framework/src/Volo.Abp.BlobStoring.Bunny/Volo.Abp.BlobStoring.Bunny.csproj index 6881925027..38392f664a 100644 --- a/framework/src/Volo.Abp.BlobStoring.Bunny/Volo.Abp.BlobStoring.Bunny.csproj +++ b/framework/src/Volo.Abp.BlobStoring.Bunny/Volo.Abp.BlobStoring.Bunny.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable false diff --git a/framework/src/Volo.Abp.BlobStoring.FileSystem/Volo.Abp.BlobStoring.FileSystem.csproj b/framework/src/Volo.Abp.BlobStoring.FileSystem/Volo.Abp.BlobStoring.FileSystem.csproj index 76c01d33da..b723115a5a 100644 --- a/framework/src/Volo.Abp.BlobStoring.FileSystem/Volo.Abp.BlobStoring.FileSystem.csproj +++ b/framework/src/Volo.Abp.BlobStoring.FileSystem/Volo.Abp.BlobStoring.FileSystem.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BlobStoring.FileSystem diff --git a/framework/src/Volo.Abp.BlobStoring.Google/Volo.Abp.BlobStoring.Google.csproj b/framework/src/Volo.Abp.BlobStoring.Google/Volo.Abp.BlobStoring.Google.csproj index 706182ad37..f8970f430a 100644 --- a/framework/src/Volo.Abp.BlobStoring.Google/Volo.Abp.BlobStoring.Google.csproj +++ b/framework/src/Volo.Abp.BlobStoring.Google/Volo.Abp.BlobStoring.Google.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BlobStoring.Google diff --git a/framework/src/Volo.Abp.BlobStoring.Memory/Volo.Abp.BlobStoring.Memory.csproj b/framework/src/Volo.Abp.BlobStoring.Memory/Volo.Abp.BlobStoring.Memory.csproj index 02abcd3836..da51f58236 100644 --- a/framework/src/Volo.Abp.BlobStoring.Memory/Volo.Abp.BlobStoring.Memory.csproj +++ b/framework/src/Volo.Abp.BlobStoring.Memory/Volo.Abp.BlobStoring.Memory.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BlobStoring.Memory diff --git a/framework/src/Volo.Abp.BlobStoring.Minio/Volo.Abp.BlobStoring.Minio.csproj b/framework/src/Volo.Abp.BlobStoring.Minio/Volo.Abp.BlobStoring.Minio.csproj index 98d3481999..3b1e795a5c 100644 --- a/framework/src/Volo.Abp.BlobStoring.Minio/Volo.Abp.BlobStoring.Minio.csproj +++ b/framework/src/Volo.Abp.BlobStoring.Minio/Volo.Abp.BlobStoring.Minio.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.BlobStoring.Minio diff --git a/framework/src/Volo.Abp.BlobStoring/Volo.Abp.BlobStoring.csproj b/framework/src/Volo.Abp.BlobStoring/Volo.Abp.BlobStoring.csproj index 4c710d6b8b..5e62066291 100644 --- a/framework/src/Volo.Abp.BlobStoring/Volo.Abp.BlobStoring.csproj +++ b/framework/src/Volo.Abp.BlobStoring/Volo.Abp.BlobStoring.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.BlobStoring diff --git a/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj b/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj index 12581fb7b0..c6508fdfde 100644 --- a/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj +++ b/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Caching.StackExchangeRedis diff --git a/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj b/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj index ad2e8df65f..1aaa42ad1a 100644 --- a/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj +++ b/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Volo.Abp.Caching Volo.Abp.Caching diff --git a/framework/src/Volo.Abp.Castle.Core/Volo.Abp.Castle.Core.csproj b/framework/src/Volo.Abp.Castle.Core/Volo.Abp.Castle.Core.csproj index 15dc1bc33b..421261225f 100644 --- a/framework/src/Volo.Abp.Castle.Core/Volo.Abp.Castle.Core.csproj +++ b/framework/src/Volo.Abp.Castle.Core/Volo.Abp.Castle.Core.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Castle.Core diff --git a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj index d73bda8303..60bd49196d 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj +++ b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; false false diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/SuiteAppSettingsService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/SuiteAppSettingsService.cs index 197e2b9bb5..9a97c63094 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/SuiteAppSettingsService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/SuiteAppSettingsService.cs @@ -92,7 +92,7 @@ public class SuiteAppSettingsService : ITransientDependency "volo.abp.suite", version, "tools", - "net10.0", + "net11.0", "any", "appsettings.json" ); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularPwaSupportAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularPwaSupportAdder.cs index 86880aaacf..84c26087b7 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularPwaSupportAdder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularPwaSupportAdder.cs @@ -1,6 +1,9 @@ using System; using System.IO; using System.Linq; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using Volo.Abp.Cli.Utils; using Volo.Abp.DependencyInjection; @@ -29,7 +32,88 @@ public class AngularPwaSupportAdder : ITransientDependency protected virtual void AddPwaSupportToProject(string filePath) { var directory = Path.GetDirectoryName(filePath).EnsureEndsWith(Path.DirectorySeparatorChar); + var pwaMajorVersion = GetAngularCliMajorVersion(filePath); - CmdHelper.RunCmd("ng add @angular/pwa@13 --skip-confirmation", workingDirectory: directory); + // "ng" is usually not on the PATH and node_modules may not be installed yet, so the Angular CLI is run through npx. + CmdHelper.RunCmd( + $"npx -y -p @angular/cli@{pwaMajorVersion} ng add @angular/pwa@{pwaMajorVersion} --skip-confirmation", + out var exitCode, + workingDirectory: directory + ); + + if (exitCode != 0) + { + throw new AbpException( + $"Failed to add Angular PWA support to '{filePath}'. 'ng add @angular/pwa@{pwaMajorVersion}' exited with code {exitCode}." + ); + } + + var angularJsonFilePath = Path.Combine(directory, "angular.json"); + var angularJson = File.ReadAllText(angularJsonFilePath); + var updatedAngularJson = AddPublicFolderToBuildAssets(angularJson, directory); + + if (updatedAngularJson != angularJson) + { + File.WriteAllText(angularJsonFilePath, updatedAngularJson); + } + } + + protected virtual string GetAngularCliMajorVersion(string packageJsonFilePath) + { + var packageJson = JObject.Parse(File.ReadAllText(packageJsonFilePath)); + + var cliVersion = + (packageJson["devDependencies"]?["@angular/cli"] ?? packageJson["dependencies"]?["@angular/cli"])?.ToString(); + + var match = cliVersion == null ? null : Regex.Match(cliVersion, @"\d+"); + if (match == null || !match.Success) + { + throw new AbpException( + $"Could not determine the @angular/cli version from '{packageJsonFilePath}', so the matching @angular/pwa version cannot be selected." + ); + } + + return match.Value; + } + + // "ng add @angular/pwa" puts the manifest and the icons into the "public" folder of the project, + // which is not copied to the build output unless the build assets include it. + protected virtual string AddPublicFolderToBuildAssets(string angularJson, string workspaceDirectory) + { + var json = JObject.Parse(angularJson); + var changed = false; + + foreach (var project in json["projects"]?.Children() ?? Enumerable.Empty()) + { + if (project.Value.SelectToken("architect.build.options.assets") is not JArray assets) + { + continue; + } + + var projectRoot = project.Value["root"]?.ToString().Replace('\\', '/').TrimEnd('/'); + var publicFolder = projectRoot.IsNullOrEmpty() ? "public" : projectRoot + "/public"; + + if (!Directory.Exists(Path.Combine(workspaceDirectory, publicFolder)) || + assets.OfType().Any(x => x["input"]?.ToString().Replace('\\', '/').TrimEnd('/') == publicFolder)) + { + continue; + } + + assets.Add(new JObject + { + ["glob"] = "**/*", + ["input"] = publicFolder + }); + changed = true; + } + + if (!changed) + { + return angularJson; + } + + var newLine = angularJson.Contains("\r\n") ? "\r\n" : "\n"; + var result = json.ToString(Formatting.Indented).Replace("\r\n", "\n").Replace("\n", newLine); + return angularJson.EndsWith("\n") ? result + newLine : result; } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/MyGetApiResponse.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/MyGetApiResponse.cs index af02817401..fb7d6659a2 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/MyGetApiResponse.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/MyGetApiResponse.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; namespace Volo.Abp.Cli.ProjectModification; @@ -7,4 +8,17 @@ public class MyGetApiResponse public string _date { get; set; } public List Packages { get; set; } + + /// + /// Returns the latest version of the given package, or null if the response doesn't contain it. + /// and can be null when the endpoint + /// answers with an unexpected payload, so both are treated as "no version available". + /// + public string GetLatestVersionOrNull(string packageId) + { + return Packages? + .FirstOrDefault(p => p?.Id == packageId)? + .Versions? + .LastOrDefault(); + } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs index cad3671ba1..9dd6528980 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs @@ -374,7 +374,7 @@ public class VoloNugetPackagesVersionUpdater : ITransientDependency { var myGetPack = await _myGetPackageListFinder.GetPackagesAsync(); - return myGetPack.Packages.FirstOrDefault(p => p.Id == packageId)?.Versions.LastOrDefault(); + return myGetPack?.GetLatestVersionOrNull(packageId); } /// diff --git a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj index 9254b21165..2dcc552ac4 100644 --- a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj +++ b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj @@ -7,7 +7,7 @@ Exe enable Nullable - net10.0 + net11.0 true abp diff --git a/framework/src/Volo.Abp.Core/System/AbpObjectExtensions.cs b/framework/src/Volo.Abp.Core/System/AbpObjectExtensions.cs index 9b0af42a11..2b5f80c743 100644 --- a/framework/src/Volo.Abp.Core/System/AbpObjectExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/AbpObjectExtensions.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.ComponentModel; -using System.Globalization; using System.Linq; using System.Runtime.CompilerServices; +using Volo.Abp.Reflection; namespace System; @@ -38,7 +38,7 @@ public static class AbpObjectExtensions return (T)TypeDescriptor.GetConverter(typeof(T)).ConvertFromInvariantString(obj.ToString()!)!; } - return (T)Convert.ChangeType(obj, typeof(T), CultureInfo.InvariantCulture); + return (T)TypeHelper.ChangeType(obj, typeof(T)); } /// diff --git a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj index def4aa417d..cd1578125b 100644 --- a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj +++ b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Core 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 49b4c2edbd..7ecfd6b647 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 @@ -113,13 +113,32 @@ internal sealed class TelemetrySolutionInfoEnricher : TelemetryActivityEventEnri continue; } - ExtractModuleImportsInfo(modulePath, modules); + ExtractModuleImportsInfo(modulePath, modules, new HashSet(StringComparer.Ordinal)); } context.Current[ActivityPropertyNames.InstalledModules] = modules; } - private static void ExtractModuleImportsInfo(string modulePath, List> modules) + private static void ExtractModuleImportsInfo(string modulePath, List> modules, HashSet importChain) + { + // Modules can import each other, so skip a module that is already in the current import chain. + var fullModulePath = Path.GetFullPath(modulePath); + if (!importChain.Add(fullModulePath)) + { + return; + } + + try + { + ExtractModuleImportsInfoCore(modulePath, modules, importChain); + } + finally + { + importChain.Remove(fullModulePath); + } + } + + private static void ExtractModuleImportsInfoCore(string modulePath, List> modules, HashSet importChain) { var moduleJsonFileContent = File.ReadAllText(modulePath); using var moduleDoc = JsonDocument.Parse(moduleJsonFileContent, new JsonDocumentOptions @@ -138,7 +157,7 @@ internal sealed class TelemetrySolutionInfoEnricher : TelemetryActivityEventEnri if (!importPath.IsNullOrEmpty()) { - ExtractModuleImportsInfo(importPath, modules); + ExtractModuleImportsInfo(importPath, modules, importChain); continue; } 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 4f8f77b245..577d396d04 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 @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.DependencyInjection; @@ -81,33 +82,38 @@ public class TelemetryService : ITelemetryService, IScopedDependency telemetryActivitySender); }); - AppDomain.CurrentDomain.ProcessExit += (_, _) => - { - try - { - telemetryTask.Wait(TimeSpan.FromSeconds(10)); - } - catch - { - // ignored - } - }; - - Console.CancelKeyPress += (_, _) => - { - try - { - telemetryTask.Wait(TimeSpan.FromSeconds(10)); - } - catch - { - // ignored - } - }; + WaitForTelemetryTaskOnExit(telemetryTask); return Task.CompletedTask; } + private static void WaitForTelemetryTaskOnExit(Task telemetryTask) + { + EventHandler processExitHandler = (_, _) => WaitForTelemetryTask(telemetryTask); + ConsoleCancelEventHandler cancelKeyPressHandler = (_, _) => WaitForTelemetryTask(telemetryTask); + + AppDomain.CurrentDomain.ProcessExit += processExitHandler; + Console.CancelKeyPress += cancelKeyPressHandler; + + _ = telemetryTask.ContinueWith(_ => + { + AppDomain.CurrentDomain.ProcessExit -= processExitHandler; + Console.CancelKeyPress -= cancelKeyPressHandler; + }, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); + } + + private static void WaitForTelemetryTask(Task telemetryTask) + { + try + { + telemetryTask.Wait(TimeSpan.FromSeconds(10)); + } + catch + { + // ignored + } + } + private static async Task BuildAndSendActivityAsync( ActivityContext context, ITelemetryActivityEventBuilder telemetryActivityEventBuilder, @@ -130,4 +136,4 @@ public class TelemetryService : ITelemetryService, IScopedDependency //ignored } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs index eb83b73b75..eec4da40e1 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs @@ -106,12 +106,51 @@ public static class TypeHelper return (TProperty)Enum.Parse(conversionType, value.ToString()!); } - return (TProperty)Convert.ChangeType(value, conversionType, CultureInfo.InvariantCulture); + return (TProperty)ChangeType(value, conversionType); } throw new AbpException("ChangeTypePrimitiveExtended does not support non-primitive types. Use non-generic GetProperty method and handle type casting manually."); } + /// + /// Converts the value like with the invariant culture. + /// A float or double converted to decimal is rounded to the 7 or 15 significant digits the type holds, which is what + /// earlier .NET versions returned for amounts (0.1d is 0.1m). + /// + public static object ChangeType(object value, Type conversionType) + { +#if NET11_0_OR_GREATER + // Since .NET 11 the conversion keeps the binary error: 0.1d became 0.1000000000000000055511151231m, so an amount + // read back from JSON (where it is a double) would no longer equal the decimal that was saved. + if (conversionType == typeof(decimal)) + { + switch (value) + { + case double doubleValue: + return ToDecimal(doubleValue, doubleValue.ToString("G15", CultureInfo.InvariantCulture)); + case float floatValue: + return ToDecimal(floatValue, floatValue.ToString("G7", CultureInfo.InvariantCulture)); + } + } +#endif + + return Convert.ChangeType(value, conversionType, CultureInfo.InvariantCulture); + } + +#if NET11_0_OR_GREATER + private static decimal ToDecimal(double value, string roundedValue) + { + // Convert.ChangeType throws OverflowException for NaN, infinity and values outside the decimal range; parsing the + // rounded text would instead throw FormatException or round a value just past the range back into it. + if (!(Math.Abs(value) < 7.922816251426434E+28)) + { + throw new OverflowException("Value was either too large or too small for a Decimal."); + } + + return decimal.Parse(roundedValue, NumberStyles.Float, CultureInfo.InvariantCulture); + } +#endif + public static bool IsNullable(Type type) { return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); diff --git a/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj index 181ce099a7..6b546f0705 100644 --- a/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj +++ b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.Dapper diff --git a/framework/src/Volo.Abp.Dapr/Volo.Abp.Dapr.csproj b/framework/src/Volo.Abp.Dapr/Volo.Abp.Dapr.csproj index af162ef2c5..687ac22eca 100644 --- a/framework/src/Volo.Abp.Dapr/Volo.Abp.Dapr.csproj +++ b/framework/src/Volo.Abp.Dapr/Volo.Abp.Dapr.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.Data/Volo.Abp.Data.csproj b/framework/src/Volo.Abp.Data/Volo.Abp.Data.csproj index 34ce9d6cff..dc8d2021e2 100644 --- a/framework/src/Volo.Abp.Data/Volo.Abp.Data.csproj +++ b/framework/src/Volo.Abp.Data/Volo.Abp.Data.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Data diff --git a/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo.Abp.Ddd.Application.Contracts.csproj b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo.Abp.Ddd.Application.Contracts.csproj index cf9e65fd73..237138f589 100644 --- a/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo.Abp.Ddd.Application.Contracts.csproj +++ b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo.Abp.Ddd.Application.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Ddd.Application.Contracts diff --git a/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/he.json b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/he.json new file mode 100644 index 0000000000..f019798007 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/he.json @@ -0,0 +1,6 @@ +{ + "culture": "he", + "texts": { + "MaxResultCountExceededExceptionMessage": "{0} לא יכול להיות גדול מ-{1}! כדי לאפשר יותר תוצאות, הגדילו את {2}.{3} בצד השרת." + } +} diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo.Abp.Ddd.Application.csproj b/framework/src/Volo.Abp.Ddd.Application/Volo.Abp.Ddd.Application.csproj index e164352063..6c9d532927 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo.Abp.Ddd.Application.csproj +++ b/framework/src/Volo.Abp.Ddd.Application/Volo.Abp.Ddd.Application.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Ddd.Application diff --git a/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo.Abp.Ddd.Domain.Shared.csproj b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo.Abp.Ddd.Domain.Shared.csproj index 844d50f772..37970608df 100644 --- a/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo.Abp.Ddd.Domain.Shared.csproj +++ b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo.Abp.Ddd.Domain.Shared.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Ddd.Domain.Shared diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj b/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj index 6506d8fe7b..5aeb9726a0 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Ddd.Domain diff --git a/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo.Abp.DistributedLocking.Abstractions.csproj b/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo.Abp.DistributedLocking.Abstractions.csproj index 773c954051..67a8d07b85 100644 --- a/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo.Abp.DistributedLocking.Abstractions.csproj +++ b/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo.Abp.DistributedLocking.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.DistributedLocking.Abstractions diff --git a/framework/src/Volo.Abp.DistributedLocking.Dapr/Volo.Abp.DistributedLocking.Dapr.csproj b/framework/src/Volo.Abp.DistributedLocking.Dapr/Volo.Abp.DistributedLocking.Dapr.csproj index 3ab038c260..91b1c20049 100644 --- a/framework/src/Volo.Abp.DistributedLocking.Dapr/Volo.Abp.DistributedLocking.Dapr.csproj +++ b/framework/src/Volo.Abp.DistributedLocking.Dapr/Volo.Abp.DistributedLocking.Dapr.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.DistributedLocking/Volo.Abp.DistributedLocking.csproj b/framework/src/Volo.Abp.DistributedLocking/Volo.Abp.DistributedLocking.csproj index b911014bf9..8a2a1970f1 100644 --- a/framework/src/Volo.Abp.DistributedLocking/Volo.Abp.DistributedLocking.csproj +++ b/framework/src/Volo.Abp.DistributedLocking/Volo.Abp.DistributedLocking.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.DistributedLocking diff --git a/framework/src/Volo.Abp.Emailing/Volo.Abp.Emailing.csproj b/framework/src/Volo.Abp.Emailing/Volo.Abp.Emailing.csproj index 6ba46d58ea..31cc6e23b6 100644 --- a/framework/src/Volo.Abp.Emailing/Volo.Abp.Emailing.csproj +++ b/framework/src/Volo.Abp.Emailing/Volo.Abp.Emailing.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Emailing diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/he.json b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/he.json new file mode 100644 index 0000000000..3caab85400 --- /dev/null +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/he.json @@ -0,0 +1,25 @@ +{ + "culture": "he", + "texts": { + "DisplayName:Abp.Mailing.DefaultFromAddress": "כתובת השולח המוגדרת כברירת מחדל", + "DisplayName:Abp.Mailing.DefaultFromDisplayName": "שם התצוגה של השולח המוגדר כברירת מחדל", + "DisplayName:Abp.Mailing.Smtp.Host": "שרת", + "DisplayName:Abp.Mailing.Smtp.Port": "פורט", + "DisplayName:Abp.Mailing.Smtp.UserName": "שם משתמש", + "DisplayName:Abp.Mailing.Smtp.Password": "סיסמה", + "DisplayName:Abp.Mailing.Smtp.Domain": "דומיין", + "DisplayName:Abp.Mailing.Smtp.EnableSsl": "הפעלת SSL", + "DisplayName:Abp.Mailing.Smtp.UseDefaultCredentials": "שימוש בפרטי ההתחברות של ברירת המחדל", + "Description:Abp.Mailing.DefaultFromAddress": "כתובת השולח המוגדרת כברירת מחדל", + "Description:Abp.Mailing.DefaultFromDisplayName": "שם התצוגה של השולח המוגדר כברירת מחדל", + "Description:Abp.Mailing.Smtp.Host": "השם או כתובת ה-IP של השרת שמשמש לתקשורת SMTP.", + "Description:Abp.Mailing.Smtp.Port": "הפורט שמשמש לתקשורת SMTP.", + "Description:Abp.Mailing.Smtp.UserName": "שם המשתמש של פרטי ההתחברות.", + "Description:Abp.Mailing.Smtp.Password": "הסיסמה של שם המשתמש בפרטי ההתחברות.", + "Description:Abp.Mailing.Smtp.Domain": "הדומיין או שם המחשב שמאמת את פרטי ההתחברות.", + "Description:Abp.Mailing.Smtp.EnableSsl": "האם SmtpClient משתמש ב-Secure Sockets Layer (SSL) כדי להצפין את החיבור.", + "Description:Abp.Mailing.Smtp.UseDefaultCredentials": "האם DefaultCredentials נשלחים עם הבקשות.", + "TextTemplate:StandardEmailTemplates.Layout": "תבנית הפריסה של אימייל המוגדרת כברירת מחדל", + "TextTemplate:StandardEmailTemplates.Message": "תבנית הודעה פשוטה לאימיילים" + } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL.Pomelo/Volo.Abp.EntityFrameworkCore.MySQL.Pomelo.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL.Pomelo/Volo.Abp.EntityFrameworkCore.MySQL.Pomelo.csproj index 1dcc18eca2..0ac2d82a46 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL.Pomelo/Volo.Abp.EntityFrameworkCore.MySQL.Pomelo.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL.Pomelo/Volo.Abp.EntityFrameworkCore.MySQL.Pomelo.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.EntityFrameworkCore.MySQL.Pomelo diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj index 3bb532169b..32b07911f1 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.EntityFrameworkCore.MySQL diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/MySQL/MySQLGuidArrayTypeMappingSourcePlugin.cs b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/MySQL/MySQLGuidArrayTypeMappingSourcePlugin.cs index e3ac23563c..6eefbfddf6 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/MySQL/MySQLGuidArrayTypeMappingSourcePlugin.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/MySQL/MySQLGuidArrayTypeMappingSourcePlugin.cs @@ -1,5 +1,4 @@ using System; -using System.Data; using Microsoft.EntityFrameworkCore.Storage; namespace Volo.Abp.EntityFrameworkCore.MySQL; @@ -15,11 +14,32 @@ internal sealed class MySQLGuidArrayTypeMappingSourcePlugin : IRelationalTypeMap { if (mappingInfo.ClrType == typeof(Guid[]) && mappingInfo.ElementTypeMapping is not null) { - return new StringTypeMapping("longtext", DbType.String).Clone( - clrType: typeof(Guid[]), - elementMapping: mappingInfo.ElementTypeMapping); + return new GuidArrayTypeMapping(mappingInfo.ElementTypeMapping); } return null; } + + /* RelationalTypeMapping.Clone no longer takes a clrType since EF Core 11, so the + * CLR type has to come from the mapping parameters instead. */ + private sealed class GuidArrayTypeMapping : StringTypeMapping + { + public GuidArrayTypeMapping(CoreTypeMapping elementMapping) + : base(new RelationalTypeMappingParameters( + new CoreTypeMappingParameters(typeof(Guid[]), elementMapping: elementMapping), + "longtext", + dbType: System.Data.DbType.String)) + { + } + + private GuidArrayTypeMapping(RelationalTypeMappingParameters parameters) + : base(parameters) + { + } + + protected override RelationalTypeMapping Clone(RelationalTypeMappingParameters parameters) + { + return new GuidArrayTypeMapping(parameters); + } + } } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo.Abp.EntityFrameworkCore.Oracle.Devart.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo.Abp.EntityFrameworkCore.Oracle.Devart.csproj index 6d685652ca..f77908170f 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo.Abp.EntityFrameworkCore.Oracle.Devart.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo.Abp.EntityFrameworkCore.Oracle.Devart.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.EntityFrameworkCore.Oracle.Devart @@ -22,7 +22,6 @@ - diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj index 8fd893c6c1..4f5cbe34c1 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.EntityFrameworkCore.Oracle 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 063f956379..ee88c8680a 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 @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.EntityFrameworkCore.PostgreSql diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj index ee5822b500..e493c23a81 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.EntityFrameworkCore.SqlServer @@ -22,6 +22,7 @@ + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj index bac7c9df4e..f79cc8f014 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.EntityFrameworkCore.Sqlite diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Microsoft/Extensions/DependencyInjection/AbpEfCoreModelBuilderExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Microsoft/Extensions/DependencyInjection/AbpEfCoreModelBuilderExtensions.cs index 4b90d801e6..9c5626af4f 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Microsoft/Extensions/DependencyInjection/AbpEfCoreModelBuilderExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Microsoft/Extensions/DependencyInjection/AbpEfCoreModelBuilderExtensions.cs @@ -19,7 +19,7 @@ public static class AbpEfCoreModelBuilderExtensions var isDeleted = args[0]; var boolParam = args[1]; - if (abpEfCoreCurrentDbContext.Context?.DataFilter.IsEnabled() == true) + if (abpEfCoreCurrentDbContext.GetRequiredContext().DataFilter.IsEnabled()) { // IsDeleted == false. Use the column's TypeMapping so any ValueConverter is applied to the literal. return new SqlBinaryExpression( @@ -47,7 +47,7 @@ public static class AbpEfCoreModelBuilderExtensions var currentTenantId = args[1]; var boolParam = args[2]; - if (abpEfCoreCurrentDbContext.Context?.DataFilter.IsEnabled() == true) + if (abpEfCoreCurrentDbContext.GetRequiredContext().DataFilter.IsEnabled()) { // TenantId == CurrentTenantId return new SqlBinaryExpression( diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj b/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj index faa31d08a8..c55d7a180b 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.EntityFrameworkCore diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs index a4aa3a510a..30f70ed6ab 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations.Schema; -using System.Globalization; using System.Linq; using System.Linq.Expressions; using System.Reflection; @@ -668,7 +667,7 @@ public abstract class AbpDbContext : DbContext, IAbpEfCoreDbContext, } else { - entryProperty.CurrentValue = Convert.ChangeType(entityProperty, conversionType, CultureInfo.InvariantCulture); + entryProperty.CurrentValue = TypeHelper.ChangeType(entityProperty, conversionType); } } } @@ -997,6 +996,6 @@ public abstract class AbpDbContext : DbContext, IAbpEfCoreDbContext, public virtual string GetCompiledQueryCacheKey() { - return $"{CurrentTenantId?.ToString() ?? "Null"}:{IsSoftDeleteFilterEnabled}:{IsMultiTenantFilterEnabled}"; + return $"{IsSoftDeleteFilterEnabled}:{IsMultiTenantFilterEnabled}"; } } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsExtension.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsExtension.cs index d9dc4cef9f..17b0e5dfdb 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsExtension.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsExtension.cs @@ -3,8 +3,10 @@ using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Storage; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; +using Volo.Abp.EntityFrameworkCore.DependencyInjection; using Volo.Abp.EntityFrameworkCore.GlobalFilters; namespace Volo.Abp.EntityFrameworkCore; @@ -13,23 +15,31 @@ public class AbpDbContextOptionsExtension : IDbContextOptionsExtension { public void ApplyServices(IServiceCollection services) { - var serviceDescriptor = services.FirstOrDefault(x => x.ServiceType == typeof(ICompiledQueryCacheKeyGenerator)); - if (serviceDescriptor != null && serviceDescriptor.ImplementationType != null) + services.Decorate((provider, inner) => + ActivatorUtilities.CreateInstance(provider, inner)); + + // The user-defined functions are only translated by relational providers, and others, such as InMemory, cast IDatabase to their own type. + if (services.IsAdded()) { - services.Remove(serviceDescriptor); - services.AddScoped(serviceDescriptor.ImplementationType); - services.Add(ServiceDescriptor.Scoped(provider => - ActivatorUtilities.CreateInstance(provider, - provider.GetRequiredService(serviceDescriptor.ImplementationType) - .As()))); + services.Decorate((provider, inner) => + ActivatorUtilities.CreateInstance(provider, inner)); } services.Replace(ServiceDescriptor.Scoped()); - services.AddSingleton(typeof(AbpEfCoreCurrentDbContext)); + services.TryAddSingleton(); } public void Validate(IDbContextOptions options) { + // EF Core applies ReplaceService after ApplyServices, so it would silently remove the wrappers. + var replacedServices = options.FindExtension()?.ReplacedServices; + if (replacedServices != null && replacedServices.Keys.Any(x => x.Item1 == typeof(ICompiledQueryCacheKeyGenerator) || x.Item1 == typeof(IDatabase))) + { + throw new AbpException( + "ICompiledQueryCacheKeyGenerator and IDatabase cannot be replaced with ReplaceService while AbpDbContextOptionsExtension is used, " + + "because ABP wraps them to apply the data filters. Remove the ReplaceService call, or set 'UseDbFunction' of 'AbpEfCoreGlobalFilterOptions' to false " + + "and don't add AbpDbContextOptionsExtension yourself."); + } } public DbContextOptionsExtensionInfo Info => new AbpOptionsExtensionInfo(this); diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityQueryProvider.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityQueryProvider.cs index 665757e17b..cfe9079cbf 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityQueryProvider.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityQueryProvider.cs @@ -1,7 +1,10 @@ using System.Linq.Expressions; using System.Threading; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.Query.Internal; +using Microsoft.EntityFrameworkCore.Storage; using Volo.Abp.EntityFrameworkCore.GlobalFilters; namespace Volo.Abp.EntityFrameworkCore; @@ -12,6 +15,8 @@ public class AbpEntityQueryProvider : EntityQueryProvider protected AbpEfCoreCurrentDbContext AbpEfCoreCurrentDbContext { get; } protected ICurrentDbContext CurrentDbContext { get; } + private bool _queryServicesChecked; + public AbpEntityQueryProvider( IQueryCompiler queryCompiler, AbpEfCoreCurrentDbContext abpEfCoreCurrentDbContext, @@ -24,7 +29,8 @@ public class AbpEntityQueryProvider : EntityQueryProvider public override object Execute(Expression expression) { - using (AbpEfCoreCurrentDbContext.Use(CurrentDbContext.Context as IAbpEfCoreDbFunctionContext)) + CheckQueryServices(); + using (AbpEfCoreCurrentDbContext.BeginQuery(CurrentDbContext.Context as IAbpEfCoreDbFunctionContext)) { return base.Execute(expression); } @@ -32,7 +38,8 @@ public class AbpEntityQueryProvider : EntityQueryProvider public override TResult Execute(Expression expression) { - using (AbpEfCoreCurrentDbContext.Use(CurrentDbContext.Context as IAbpEfCoreDbFunctionContext)) + CheckQueryServices(); + using (AbpEfCoreCurrentDbContext.BeginQuery(CurrentDbContext.Context as IAbpEfCoreDbFunctionContext)) { return base.Execute(expression); } @@ -40,10 +47,31 @@ public class AbpEntityQueryProvider : EntityQueryProvider public override TResult ExecuteAsync(Expression expression, CancellationToken cancellationToken = new CancellationToken()) { - using (AbpEfCoreCurrentDbContext.Use(CurrentDbContext.Context as IAbpEfCoreDbFunctionContext)) + CheckQueryServices(); + using (AbpEfCoreCurrentDbContext.BeginQuery(CurrentDbContext.Context as IAbpEfCoreDbFunctionContext)) { return base.ExecuteAsync(expression, cancellationToken); } } + + protected virtual void CheckQueryServices() + { + if (_queryServicesChecked) + { + return; + } + + var dbContext = CurrentDbContext.Context; + if (dbContext is IAbpEfCoreDbFunctionContext abpDbContext && abpDbContext.UseDbFunction() && dbContext.Database.IsRelational() && + (dbContext.GetService() is not AbpEfCoreDatabase || + dbContext.GetService() is not AbpCompiledQueryCacheKeyGenerator)) + { + throw new AbpException( + "The data filters cannot be applied, because the EF Core services of ABP are not registered. " + + "Add AbpDbContextOptionsExtension after the database provider, or set 'UseDbFunction' of 'AbpEfCoreGlobalFilterOptions' to false."); + } + + _queryServicesChecked = true; + } } #pragma warning restore EF1001 diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/ServiceCollectionDecorateExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/ServiceCollectionDecorateExtensions.cs new file mode 100644 index 0000000000..bfb79603d4 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/ServiceCollectionDecorateExtensions.cs @@ -0,0 +1,81 @@ +using System; +using Microsoft.Extensions.DependencyInjection; + +namespace Volo.Abp.EntityFrameworkCore.DependencyInjection; + +internal static class ServiceCollectionDecorateExtensions +{ + internal static IServiceCollection Decorate( + this IServiceCollection services, + Func decorator) + where TService : class + { + // The container resolves the last registration. + for (var i = services.Count - 1; i >= 0; i--) + { + var descriptor = services[i]; + if (descriptor.ServiceType != typeof(TService) || descriptor.IsKeyedService) + { + continue; + } + + // The same service collection can be decorated more than once, for example when ApplyServices runs again. + if (descriptor.ImplementationFactory?.Target is Decorator) + { + break; + } + + // The original registration stays in the container under its own key, so the container still creates and disposes it. + var innerServiceKey = new object(); + services[i] = new ServiceDescriptor( + typeof(TService), + new Decorator(innerServiceKey, decorator).Create, + descriptor.Lifetime); + services.Add(CreateInnerDescriptor(descriptor, innerServiceKey)); + break; + } + + return services; + } + + private static ServiceDescriptor CreateInnerDescriptor(ServiceDescriptor descriptor, object innerServiceKey) + { + if (descriptor.ImplementationType != null) + { + return new ServiceDescriptor(descriptor.ServiceType, innerServiceKey, descriptor.ImplementationType, descriptor.Lifetime); + } + + if (descriptor.ImplementationFactory != null) + { + var implementationFactory = descriptor.ImplementationFactory; + return new ServiceDescriptor(descriptor.ServiceType, innerServiceKey, (provider, _) => implementationFactory(provider), descriptor.Lifetime); + } + + return new ServiceDescriptor(descriptor.ServiceType, innerServiceKey, descriptor.ImplementationInstance!); + } + + private sealed class Decorator + where TService : class + { + private readonly object _innerServiceKey; + private readonly Func _decorator; + + public Decorator(object innerServiceKey, Func decorator) + { + _innerServiceKey = innerServiceKey; + _decorator = decorator; + } + + public object Create(IServiceProvider serviceProvider) + { + var inner = serviceProvider.GetRequiredKeyedService(_innerServiceKey); + var service = _decorator(serviceProvider, inner); + if (service == null || ReferenceEquals(service, inner)) + { + throw new AbpException($"The decorator of {typeof(TService).FullName} must return a new object."); + } + + return service; + } + } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/GlobalFilters/AbpCompiledQueryCacheKeyGenerator.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/GlobalFilters/AbpCompiledQueryCacheKeyGenerator.cs index 8ce26b7ce1..45436b49f7 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/GlobalFilters/AbpCompiledQueryCacheKeyGenerator.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/GlobalFilters/AbpCompiledQueryCacheKeyGenerator.cs @@ -39,6 +39,8 @@ public class AbpCompiledQueryCacheKeyGenerator : ICompiledQueryCacheKeyGenerator } } + CurrentContext.Context.GetService().AuthorizeQueryCompilation(abpEfCoreDbFunctionContext, query); + return new AbpCompiledQueryCacheKey(cacheKey, abpCacheKey); } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/GlobalFilters/AbpEfCoreCurrentDbContext.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/GlobalFilters/AbpEfCoreCurrentDbContext.cs index c3a29b6d70..b397b6aafb 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/GlobalFilters/AbpEfCoreCurrentDbContext.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/GlobalFilters/AbpEfCoreCurrentDbContext.cs @@ -1,4 +1,5 @@ using System; +using System.Linq.Expressions; using System.Threading; namespace Volo.Abp.EntityFrameworkCore.GlobalFilters; @@ -6,9 +7,17 @@ namespace Volo.Abp.EntityFrameworkCore.GlobalFilters; public class AbpEfCoreCurrentDbContext { private readonly AsyncLocal _current = new AsyncLocal(); + private readonly AsyncLocal _queryScope = new AsyncLocal(); public IAbpEfCoreDbFunctionContext? Context => _current.Value; + public virtual IAbpEfCoreDbFunctionContext GetRequiredContext() + { + return Context ?? throw new AbpException( + "The data filters cannot be applied to a query that is compiled outside of EF Core's normal query pipeline, such as EF.CompileQuery or EF.CompileAsyncQuery. " + + "Run it as a normal LINQ query, or set 'UseDbFunction' of 'AbpEfCoreGlobalFilterOptions' to false."); + } + public IDisposable Use(IAbpEfCoreDbFunctionContext? context) { var previousValue = Context; @@ -18,4 +27,51 @@ public class AbpEfCoreCurrentDbContext _current.Value = previousValue; }); } + + // Only the query of AbpEntityQueryProvider puts the filter state into the compiled query cache key, so only its compilation + // may read it. Other compilations, such as EF.CompileQuery or a query compiled while another query runs, must fail. + internal IDisposable BeginQuery(IAbpEfCoreDbFunctionContext? context) + { + var previousScope = _queryScope.Value; + _queryScope.Value = context == null ? null : new QueryScope(context); + var contextScope = Use(context); + return new DisposeAction(() => + { + contextScope.Dispose(); + _queryScope.Value = previousScope; + }); + } + + internal void AuthorizeQueryCompilation(IAbpEfCoreDbFunctionContext context, Expression query) + { + var scope = _queryScope.Value; + if (scope != null && scope.Context == context) + { + scope.AuthorizedQuery = query; + } + } + + internal IDisposable BeginQueryCompilation(IAbpEfCoreDbFunctionContext? context, Expression query) + { + var scope = _queryScope.Value; + if (scope == null || scope.Context != context || !ReferenceEquals(scope.AuthorizedQuery, query)) + { + return Use(null); + } + + scope.AuthorizedQuery = null; + return Use(scope.Context); + } + + private sealed class QueryScope + { + public IAbpEfCoreDbFunctionContext Context { get; } + + public Expression? AuthorizedQuery { get; set; } + + public QueryScope(IAbpEfCoreDbFunctionContext context) + { + Context = context; + } + } } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/GlobalFilters/AbpEfCoreDatabase.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/GlobalFilters/AbpEfCoreDatabase.cs new file mode 100644 index 0000000000..92fe77003b --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/GlobalFilters/AbpEfCoreDatabase.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Update; + +namespace Volo.Abp.EntityFrameworkCore.GlobalFilters; + +public class AbpEfCoreDatabase : IDatabase +{ + protected IDatabase InnerDatabase { get; } + protected AbpEfCoreCurrentDbContext AbpEfCoreCurrentDbContext { get; } + protected ICurrentDbContext CurrentDbContext { get; } + + public AbpEfCoreDatabase( + IDatabase innerDatabase, + AbpEfCoreCurrentDbContext abpEfCoreCurrentDbContext, + ICurrentDbContext currentDbContext) + { + InnerDatabase = innerDatabase; + AbpEfCoreCurrentDbContext = abpEfCoreCurrentDbContext; + CurrentDbContext = currentDbContext; + } + + public virtual int SaveChanges(IList entries) + { + return InnerDatabase.SaveChanges(entries); + } + + public virtual Task SaveChangesAsync(IList entries, CancellationToken cancellationToken = default) + { + return InnerDatabase.SaveChangesAsync(entries, cancellationToken); + } + + public virtual Func CompileQuery(Expression query, bool async) + { + using (AbpEfCoreCurrentDbContext.BeginQueryCompilation(CurrentDbContext.Context as IAbpEfCoreDbFunctionContext, query)) + { + return InnerDatabase.CompileQuery(query, async); + } + } + +#pragma warning disable EF9100 + public virtual Expression> CompileQueryExpression(Expression query, bool async) + { + using (AbpEfCoreCurrentDbContext.BeginQueryCompilation(CurrentDbContext.Context as IAbpEfCoreDbFunctionContext, query)) + { + return InnerDatabase.CompileQueryExpression(query, async); + } + } +#pragma warning restore EF9100 +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Migrations/EfCoreRuntimeDatabaseMigratorBase.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Migrations/EfCoreRuntimeDatabaseMigratorBase.cs index ff557a2a73..35fd761813 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Migrations/EfCoreRuntimeDatabaseMigratorBase.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Migrations/EfCoreRuntimeDatabaseMigratorBase.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.DistributedLocking; @@ -16,6 +17,8 @@ namespace Volo.Abp.EntityFrameworkCore.Migrations; public abstract class EfCoreRuntimeDatabaseMigratorBase : ITransientDependency where TDbContext : DbContext, IEfCoreDbContext { + private bool _isAppliedDatabaseMigrationsEventPending; + protected int MinValueToWaitOnFailure { get; set; } = 5000; protected int MaxValueToWaitOnFailure { get; set; } = 15000; @@ -56,6 +59,8 @@ public abstract class EfCoreRuntimeDatabaseMigratorBase : ITransient public virtual async Task CheckAndApplyDatabaseMigrationsAsync() { + // The pending event is only retried within this call. + _isAppliedDatabaseMigrationsEventPending = false; await TryAsync(LockAndApplyDatabaseMigrationsAsync); } @@ -69,6 +74,12 @@ public abstract class EfCoreRuntimeDatabaseMigratorBase : ITransient { if (handle is null) { + if (_isAppliedDatabaseMigrationsEventPending) + { + // Throw to retry, so the pending event is not silently lost. + throw new AbpException($"Distributed lock could not be acquired to save the {nameof(AppliedDatabaseMigrationsEto)} for database migration: {DatabaseName}."); + } + Logger.LogInformation($"Distributed lock could not be acquired for database migration: {DatabaseName}. Operation cancelled."); return; } @@ -100,21 +111,51 @@ public abstract class EfCoreRuntimeDatabaseMigratorBase : ITransient await SeedAsync(); - if (schemaMigrated || AlwaysSeedTenantDatabases) + if (schemaMigrated || AlwaysSeedTenantDatabases || _isAppliedDatabaseMigrationsEventPending) { - await DistributedEventBus.PublishAsync( - new AppliedDatabaseMigrationsEto - { - DatabaseName = DatabaseName, - TenantId = null - } - ); + await PublishAppliedDatabaseMigrationsEventAsync(); } } Logger.LogInformation($"Distributed lock has been released for database migration: {DatabaseName}..."); } + protected virtual async Task PublishAppliedDatabaseMigrationsEventAsync() + { + var eventData = new AppliedDatabaseMigrationsEto + { + DatabaseName = DatabaseName, + TenantId = null + }; + + if (UnitOfWorkManager.Current != null || !IsOutboxConfiguredFor(typeof(AppliedDatabaseMigrationsEto))) + { + await DistributedEventBus.PublishAsync(eventData); + return; + } + + // Saving to the outbox lets the application start without waiting for the message broker. + // Not transactional, to work with retrying execution strategies. The pending flag makes TryAsync save it again if it fails. + _isAppliedDatabaseMigrationsEventPending = true; + + using (CurrentTenant.Change(null)) + { + using (var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: false)) + { + await DistributedEventBus.PublishAsync(eventData); + await uow.CompleteAsync(); + } + } + + _isAppliedDatabaseMigrationsEventPending = false; + } + + protected virtual bool IsOutboxConfiguredFor(Type eventType) + { + var options = ServiceProvider.GetRequiredService>().Value; + return options.Outboxes.Values.Any(outboxConfig => outboxConfig.Selector == null || outboxConfig.Selector(eventType)); + } + protected virtual Task SeedAsync() { return Task.CompletedTask; diff --git a/framework/src/Volo.Abp.EventBus.Abstractions/Volo.Abp.EventBus.Abstractions.csproj b/framework/src/Volo.Abp.EventBus.Abstractions/Volo.Abp.EventBus.Abstractions.csproj index c97d6a4807..bb03fa39c3 100644 --- a/framework/src/Volo.Abp.EventBus.Abstractions/Volo.Abp.EventBus.Abstractions.csproj +++ b/framework/src/Volo.Abp.EventBus.Abstractions/Volo.Abp.EventBus.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.EventBus.Azure/Volo.Abp.EventBus.Azure.csproj b/framework/src/Volo.Abp.EventBus.Azure/Volo.Abp.EventBus.Azure.csproj index 0179b08dee..ca8371f453 100644 --- a/framework/src/Volo.Abp.EventBus.Azure/Volo.Abp.EventBus.Azure.csproj +++ b/framework/src/Volo.Abp.EventBus.Azure/Volo.Abp.EventBus.Azure.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.EventBus.Azure diff --git a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs index 922ab95412..4344e3c72b 100644 --- a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs @@ -119,13 +119,22 @@ public class AzureDistributedEventBus : DistributedEventBusBase, ISingletonDepen { var handlerFactories = GetOrCreateHandlerFactories(eventType); - if (factory.IsInFactories(handlerFactories)) + var added = handlerFactories.Locking(factories => + { + if (factory.IsInFactories(factories)) + { + return false; + } + + factories.Add(factory); + return true; + }); + + if (!added) { return NullDisposable.Instance; } - handlerFactories.Add(factory); - return new EventHandlerFactoryUnregistrar(this, eventType, factory); } @@ -134,13 +143,22 @@ public class AzureDistributedEventBus : DistributedEventBusBase, ISingletonDepen { var handlerFactories = GetOrCreateDynamicHandlerFactories(eventName); - if (handler.IsInFactories(handlerFactories)) + var added = handlerFactories.Locking(factories => + { + if (handler.IsInFactories(factories)) + { + return false; + } + + factories.Add(handler); + return true; + }); + + if (!added) { return NullDisposable.Instance; } - handlerFactories.Add(handler); - return new DynamicEventHandlerFactoryUnregistrar(this, eventName, handler); } @@ -396,12 +414,12 @@ public class AzureDistributedEventBus : DistributedEventBusBase, ISingletonDepen foreach (var handlerFactory in HandlerFactories.Where(hf => ShouldTriggerEventForHandler(eventType, hf.Key))) { - handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value)); + handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value.Locking(factories => factories.ToList()))); } foreach (var handlerFactory in DynamicHandlerFactories.Where(aehf => eventNames.Contains(aehf.Key))) { - handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value)); + handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value.Locking(factories => factories.ToList()))); } return handlerFactoryList.ToArray(); @@ -452,7 +470,7 @@ public class AzureDistributedEventBus : DistributedEventBusBase, ISingletonDepen foreach (var handlerFactory in DynamicHandlerFactories.Where(hf => hf.Key == eventName)) { - result.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value)); + result.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value.Locking(factories => factories.ToList()))); } return result; diff --git a/framework/src/Volo.Abp.EventBus.Dapr/Volo.Abp.EventBus.Dapr.csproj b/framework/src/Volo.Abp.EventBus.Dapr/Volo.Abp.EventBus.Dapr.csproj index 4a2f75e55a..da42fbcbaa 100644 --- a/framework/src/Volo.Abp.EventBus.Dapr/Volo.Abp.EventBus.Dapr.csproj +++ b/framework/src/Volo.Abp.EventBus.Dapr/Volo.Abp.EventBus.Dapr.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.EventBus.Dapr/Volo/Abp/EventBus/Dapr/DaprDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.Dapr/Volo/Abp/EventBus/Dapr/DaprDistributedEventBus.cs index 5e89571554..37968ddd53 100644 --- a/framework/src/Volo.Abp.EventBus.Dapr/Volo/Abp/EventBus/Dapr/DaprDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.Dapr/Volo/Abp/EventBus/Dapr/DaprDistributedEventBus.cs @@ -69,13 +69,22 @@ public class DaprDistributedEventBus : DistributedEventBusBase, ISingletonDepend { var handlerFactories = GetOrCreateHandlerFactories(eventType); - if (factory.IsInFactories(handlerFactories)) + var added = handlerFactories.Locking(factories => + { + if (factory.IsInFactories(factories)) + { + return false; + } + + factories.Add(factory); + return true; + }); + + if (!added) { return NullDisposable.Instance; } - handlerFactories.Add(factory); - return new EventHandlerFactoryUnregistrar(this, eventType, factory); } @@ -273,7 +282,7 @@ public class DaprDistributedEventBus : DistributedEventBusBase, ISingletonDepend foreach (var handlerFactory in HandlerFactories.Where(hf => ShouldTriggerEventForHandler(eventType, hf.Key))) { - handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value)); + handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value.Locking(factories => factories.ToList()))); } return handlerFactoryList.ToArray(); diff --git a/framework/src/Volo.Abp.EventBus.Kafka/Volo.Abp.EventBus.Kafka.csproj b/framework/src/Volo.Abp.EventBus.Kafka/Volo.Abp.EventBus.Kafka.csproj index 88ed4a9bb0..400a18c6c2 100644 --- a/framework/src/Volo.Abp.EventBus.Kafka/Volo.Abp.EventBus.Kafka.csproj +++ b/framework/src/Volo.Abp.EventBus.Kafka/Volo.Abp.EventBus.Kafka.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable 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 4ac6d4a805..017355a5e5 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 @@ -118,13 +118,22 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen { var handlerFactories = GetOrCreateHandlerFactories(eventType); - if (factory.IsInFactories(handlerFactories)) + var added = handlerFactories.Locking(factories => + { + if (factory.IsInFactories(factories)) + { + return false; + } + + factories.Add(factory); + return true; + }); + + if (!added) { return NullDisposable.Instance; } - handlerFactories.Add(factory); - return new EventHandlerFactoryUnregistrar(this, eventType, factory); } @@ -133,13 +142,22 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen { var handlerFactories = GetOrCreateDynamicHandlerFactories(eventName); - if (handler.IsInFactories(handlerFactories)) + var added = handlerFactories.Locking(factories => + { + if (handler.IsInFactories(factories)) + { + return false; + } + + factories.Add(handler); + return true; + }); + + if (!added) { return NullDisposable.Instance; } - handlerFactories.Add(handler); - return new DynamicEventHandlerFactoryUnregistrar(this, eventName, handler); } @@ -427,12 +445,12 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen foreach (var handlerFactory in HandlerFactories.Where(hf => ShouldTriggerEventForHandler(eventType, hf.Key))) { - handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value)); + handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value.Locking(factories => factories.ToList()))); } foreach (var handlerFactory in DynamicHandlerFactories.Where(aehf => eventNames.Contains(aehf.Key))) { - handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value)); + handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value.Locking(factories => factories.ToList()))); } return handlerFactoryList.ToArray(); @@ -481,7 +499,7 @@ public class KafkaDistributedEventBus : DistributedEventBusBase, ISingletonDepen foreach (var handlerFactory in DynamicHandlerFactories.Where(hf => hf.Key == eventName)) { - result.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value)); + result.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value.Locking(factories => factories.ToList()))); } return result; diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo.Abp.EventBus.RabbitMQ.csproj b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo.Abp.EventBus.RabbitMQ.csproj index 27ac38c5ec..11387f6a15 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo.Abp.EventBus.RabbitMQ.csproj +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo.Abp.EventBus.RabbitMQ.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.EventBus.RabbitMQ diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs index 529a16ddba..29f4d4d416 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs @@ -138,13 +138,22 @@ public class RabbitMqDistributedEventBus : DistributedEventBusBase, IRabbitMqDis { var handlerFactories = GetOrCreateHandlerFactories(eventType); - if (factory.IsInFactories(handlerFactories)) + var added = handlerFactories.Locking(factories => + { + if (factory.IsInFactories(factories)) + { + return false; + } + + factories.Add(factory); + return true; + }); + + if (!added) { return NullDisposable.Instance; } - handlerFactories.Add(factory); - if (handlerFactories.Count == 1) //TODO: Multi-threading! { Consumer.BindAsync(EventNameAttribute.GetNameOrDefault(eventType)); @@ -157,14 +166,23 @@ public class RabbitMqDistributedEventBus : DistributedEventBusBase, IRabbitMqDis public override IDisposable Subscribe(string eventName, IEventHandlerFactory handler) { var handlerFactories = GetOrCreateDynamicHandlerFactories(eventName); - - if (handler.IsInFactories(handlerFactories)) + + var added = handlerFactories.Locking(factories => + { + if (handler.IsInFactories(factories)) + { + return false; + } + + factories.Add(handler); + return true; + }); + + if (!added) { return NullDisposable.Instance; } - handlerFactories.Add(handler); - if (handlerFactories.Count == 1) //TODO: Multi-threading! { Consumer.BindAsync(eventName); @@ -494,12 +512,12 @@ public class RabbitMqDistributedEventBus : DistributedEventBusBase, IRabbitMqDis foreach (var handlerFactory in HandlerFactories.Where(hf => ShouldTriggerEventForHandler(eventType, hf.Key))) { - handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value)); + handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value.Locking(factories => factories.ToList()))); } foreach (var handlerFactory in DynamicHandlerFactories.Where(aehf => eventNames.Contains(aehf.Key))) { - handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value)); + handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value.Locking(factories => factories.ToList()))); } return handlerFactoryList.ToArray(); @@ -548,7 +566,7 @@ public class RabbitMqDistributedEventBus : DistributedEventBusBase, IRabbitMqDis foreach (var handlerFactory in DynamicHandlerFactories.Where(hf => hf.Key == eventName)) { - result.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value)); + result.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value.Locking(factories => factories.ToList()))); } return result; diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo.Abp.EventBus.Rebus.csproj b/framework/src/Volo.Abp.EventBus.Rebus/Volo.Abp.EventBus.Rebus.csproj index 4b384f75b6..ae0ca8ec59 100644 --- a/framework/src/Volo.Abp.EventBus.Rebus/Volo.Abp.EventBus.Rebus.csproj +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo.Abp.EventBus.Rebus.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.EventBus.Rebus diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventBus.cs index b44b65bd4a..2304acaa4a 100644 --- a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventBus.cs @@ -109,13 +109,22 @@ public class RebusDistributedEventBus : DistributedEventBusBase, ISingletonDepen { var handlerFactories = GetOrCreateHandlerFactories(eventType); - if (factory.IsInFactories(handlerFactories)) + var added = handlerFactories.Locking(factories => + { + if (factory.IsInFactories(factories)) + { + return false; + } + + factories.Add(factory); + return true; + }); + + if (!added) { return NullDisposable.Instance; } - handlerFactories.Add(factory); - if (handlerFactories.Count == 1) //TODO: Multi-threading! { Rebus.Subscribe(eventType); @@ -129,12 +138,21 @@ public class RebusDistributedEventBus : DistributedEventBusBase, ISingletonDepen { var handlerFactories = GetOrCreateDynamicHandlerFactories(eventName); - if (handler.IsInFactories(handlerFactories)) + var added = handlerFactories.Locking(factories => + { + if (handler.IsInFactories(factories)) + { + return false; + } + + factories.Add(handler); + return true; + }); + + if (!added) { return NullDisposable.Instance; } - - handlerFactories.Add(handler); if (DynamicHandlerFactories.Count == 1) //TODO: Multi-threading! { @@ -392,12 +410,12 @@ public class RebusDistributedEventBus : DistributedEventBusBase, ISingletonDepen foreach (var handlerFactory in HandlerFactories.Where(hf => ShouldTriggerEventForHandler(eventType, hf.Key))) { - handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value)); + handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value.Locking(factories => factories.ToList()))); } foreach (var handlerFactory in DynamicHandlerFactories.Where(aehf => eventNames.Contains(aehf.Key))) { - handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value)); + handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value.Locking(factories => factories.ToList()))); } return handlerFactoryList.ToArray(); @@ -446,7 +464,7 @@ public class RebusDistributedEventBus : DistributedEventBusBase, ISingletonDepen foreach (var handlerFactory in DynamicHandlerFactories.Where(hf => hf.Key == eventName)) { - result.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value)); + result.Add(new EventTypeWithEventHandlerFactories(typeof(DynamicEventData), handlerFactory.Value.Locking(factories => factories.ToList()))); } return result; diff --git a/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj b/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj index 8cd89d870a..a431b045be 100644 --- a/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj +++ b/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.EventBus diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs index 8d5913e558..9ac45bc546 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs @@ -218,7 +218,7 @@ public class LocalEventBus : EventBusBase, ILocalEventBus, ISingletonDependency foreach (var handlerFactory in HandlerFactories.Where(hf => ShouldTriggerEventForHandler(eventType, hf.Key))) { - foreach (var factory in handlerFactory.Value.Locking(factories => factories.ToList())) + foreach (var factory in handlerFactory.Value.Locking(factories => factories.ToArray())) { handlerFactoryList.Add(new Tuple(factory, handlerFactory.Key, GetHandlerOrder(factory))); } @@ -226,7 +226,7 @@ public class LocalEventBus : EventBusBase, ILocalEventBus, ISingletonDependency foreach (var handlerFactory in DynamicEventHandlerFactories.Where(aehf => eventNames.Contains(aehf.Key))) { - foreach (var factory in handlerFactory.Value.Locking(factories => factories.ToList())) + foreach (var factory in handlerFactory.Value.Locking(factories => factories.ToArray())) { handlerFactoryList.Add(new Tuple(factory, typeof(DynamicEventData), GetHandlerOrder(factory))); } @@ -247,7 +247,7 @@ public class LocalEventBus : EventBusBase, ILocalEventBus, ISingletonDependency foreach (var handlerFactory in DynamicEventHandlerFactories.Where(aehf => aehf.Key == eventName)) { - foreach (var factory in handlerFactory.Value.Locking(factories => factories.ToList())) + foreach (var factory in handlerFactory.Value.Locking(factories => factories.ToArray())) { handlerFactoryList.Add(new Tuple(factory, typeof(DynamicEventData), GetHandlerOrder(factory))); } diff --git a/framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj b/framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj index a950bacb91..97e45ed91f 100644 --- a/framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj +++ b/framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable true diff --git a/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/he.json b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/he.json new file mode 100644 index 0000000000..58f4466438 --- /dev/null +++ b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/he.json @@ -0,0 +1,31 @@ +{ + "culture": "he", + "texts": { + "InternalServerErrorMessage": "אירעה שגיאה פנימית בזמן הטיפול בבקשה!", + "ValidationErrorMessage": "הבקשה אינה תקינה!", + "ValidationNarrativeErrorMessageTitle": "השגיאות הבאות נמצאו במהלך האימות.", + "DefaultErrorMessage": "אירעה שגיאה!", + "DefaultErrorMessageDetail": "השרת לא שלח פרטים על השגיאה.", + "DefaultErrorMessage401": "לא בוצעה התחברות!", + "DefaultErrorMessage401Detail": "יש להתחבר כדי לבצע פעולה זו.", + "DefaultErrorMessage403": "אין לך הרשאה!", + "DefaultErrorMessage403Detail": "אין לך הרשאה לבצע פעולה זו!", + "DefaultErrorMessage404": "המשאב לא נמצא!", + "DefaultErrorMessage404Detail": "המשאב המבוקש לא נמצא בשרת!", + "EntityNotFoundErrorMessage": "לא קיימת ישות {0} עם המזהה {1}!", + "EntityNotFoundErrorMessageWithoutId": "לא קיימת ישות {0}!", + "AbpDbConcurrencyErrorMessage": "הנתונים ששלחת כבר שונו על ידי משתמש אחר. בטלו את השינויים ונסו שוב.", + "Error": "שגיאה", + "UnhandledException": "חריגה שלא טופלה!", + "Authorizing": "בודק הרשאות…", + "401Message": "נדרשת התחברות", + "403Message": "אין הרשאה", + "404Message": "הדף לא נמצא", + "500Message": "שגיאת שרת פנימית", + "403MessageDetail": "אין לך הרשאה לבצע פעולה זו!", + "404MessageDetail": "מצטערים, אין כלום בכתובת הזו.", + "Unauthorized": "נדרשת התחברות", + "invalid_token": "אסימון לא תקין", + "SessionExpired": "תוקף ההתחברות פג. יש להתחבר מחדש כדי להמשיך להשתמש ביישום." + } +} diff --git a/framework/src/Volo.Abp.Features/Volo.Abp.Features.csproj b/framework/src/Volo.Abp.Features/Volo.Abp.Features.csproj index def9e073d6..b98438edf7 100644 --- a/framework/src/Volo.Abp.Features/Volo.Abp.Features.csproj +++ b/framework/src/Volo.Abp.Features/Volo.Abp.Features.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Features diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/Localization/he.json b/framework/src/Volo.Abp.Features/Volo/Abp/Features/Localization/he.json new file mode 100644 index 0000000000..1479f034c2 --- /dev/null +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/Localization/he.json @@ -0,0 +1,8 @@ +{ + "culture": "he", + "texts": { + "Volo.Feature:010001": "התכונה אינה מופעלת: {FeatureName}", + "Volo.Feature:010002": "תכונות נדרשות אינן מופעלות. כל התכונות הבאות חייבות להיות מופעלות: {FeatureNames}", + "Volo.Feature:010003": "תכונות נדרשות אינן מופעלות. לפחות אחת מהתכונות הבאות חייבת להיות מופעלת: {FeatureNames}" + } +} diff --git a/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj b/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj index 563ef49f80..c74d3b16dc 100644 --- a/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj +++ b/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj @@ -4,7 +4,7 @@ - net8.0;net9.0;net10.0 + net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.FluentValidation diff --git a/framework/src/Volo.Abp.Gdpr.Abstractions/Volo.Abp.Gdpr.Abstractions.csproj b/framework/src/Volo.Abp.Gdpr.Abstractions/Volo.Abp.Gdpr.Abstractions.csproj index 1dce223a34..3dfe9cd90c 100644 --- a/framework/src/Volo.Abp.Gdpr.Abstractions/Volo.Abp.Gdpr.Abstractions.csproj +++ b/framework/src/Volo.Abp.Gdpr.Abstractions/Volo.Abp.Gdpr.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.GlobalFeatures/Volo.Abp.GlobalFeatures.csproj b/framework/src/Volo.Abp.GlobalFeatures/Volo.Abp.GlobalFeatures.csproj index 32bfa132e5..61b6be36dc 100644 --- a/framework/src/Volo.Abp.GlobalFeatures/Volo.Abp.GlobalFeatures.csproj +++ b/framework/src/Volo.Abp.GlobalFeatures/Volo.Abp.GlobalFeatures.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.GlobalFeatures diff --git a/framework/src/Volo.Abp.GlobalFeatures/Volo/Abp/GlobalFeatures/Localization/he.json b/framework/src/Volo.Abp.GlobalFeatures/Volo/Abp/GlobalFeatures/Localization/he.json new file mode 100644 index 0000000000..0a076da7e9 --- /dev/null +++ b/framework/src/Volo.Abp.GlobalFeatures/Volo/Abp/GlobalFeatures/Localization/he.json @@ -0,0 +1,6 @@ +{ + "culture": "he", + "texts": { + "Volo.GlobalFeature:010001": "השירות '{ServiceName}' דורש להפעיל את התכונה '{GlobalFeatureName}'." + } +} diff --git a/framework/src/Volo.Abp.Guids/Volo.Abp.Guids.csproj b/framework/src/Volo.Abp.Guids/Volo.Abp.Guids.csproj index f2f6381b77..d8e853e74e 100644 --- a/framework/src/Volo.Abp.Guids/Volo.Abp.Guids.csproj +++ b/framework/src/Volo.Abp.Guids/Volo.Abp.Guids.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Guids diff --git a/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj b/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj index bb1acf0822..9aac108a11 100644 --- a/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj +++ b/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.HangFire diff --git a/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj b/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj index 4dc003f417..990725f12f 100644 --- a/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj +++ b/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Http.Abstractions diff --git a/framework/src/Volo.Abp.Http.Client.Dapr/Volo.Abp.Http.Client.Dapr.csproj b/framework/src/Volo.Abp.Http.Client.Dapr/Volo.Abp.Http.Client.Dapr.csproj index 4fe948db2c..47f4aab141 100644 --- a/framework/src/Volo.Abp.Http.Client.Dapr/Volo.Abp.Http.Client.Dapr.csproj +++ b/framework/src/Volo.Abp.Http.Client.Dapr/Volo.Abp.Http.Client.Dapr.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo.Abp.Http.Client.IdentityModel.MauiBlazor.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo.Abp.Http.Client.IdentityModel.MauiBlazor.csproj index 868fa11e81..12e52bd006 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo.Abp.Http.Client.IdentityModel.MauiBlazor.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo.Abp.Http.Client.IdentityModel.MauiBlazor.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.Http.Client.IdentityModel.MauiBlazor diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj index 3e72869de0..f4867b862a 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.Http.Client.IdentityModel.Web diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj index 6bdf8bb604..41eeffd542 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.Http.Client.IdentityModel.WebAssembly diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj index 9a994aa923..2567ca9008 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Http.Client.IdentityModel diff --git a/framework/src/Volo.Abp.Http.Client.Web/Volo.Abp.Http.Client.Web.csproj b/framework/src/Volo.Abp.Http.Client.Web/Volo.Abp.Http.Client.Web.csproj index 418e5b765a..8e5a7a8258 100644 --- a/framework/src/Volo.Abp.Http.Client.Web/Volo.Abp.Http.Client.Web.csproj +++ b/framework/src/Volo.Abp.Http.Client.Web/Volo.Abp.Http.Client.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.Http.Client.Web diff --git a/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs index 004669eeb2..5d930c9de0 100644 --- a/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs +++ b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs @@ -15,6 +15,7 @@ using Volo.Abp.DependencyInjection; using Volo.Abp.Http.Client.ClientProxying; using Volo.Abp.Http.Client.StaticProxying; using Volo.Abp.Http.Modeling; +using Volo.Abp.Http.ProxyScripting.Generators; using Volo.Abp.Reflection; namespace Volo.Abp.Http.Client.Web.Conventions; @@ -72,11 +73,39 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention } ConfigureClientProxySelector(controller); + RemoveConventionalSelectors(controller); ConfigureClientProxyApiExplorer(controller); + ConfigureClientProxyParameters(controller); ConfigureParameters(controller); } } + protected virtual void ConfigureClientProxyParameters(ControllerModel controller) + { + foreach (var action in controller.Actions) + { + var actionApiDescriptionModel = FindActionApiDescriptionModel(controller, action); + if (actionApiDescriptionModel == null) + { + continue; + } + + foreach (var prm in action.Parameters) + { + if (prm.BindingInfo != null) + { + continue; + } + + // Clients send the parameter where the remote action reads it, so a primitive [FromBody] parameter has to be read from the body here too. + if (actionApiDescriptionModel.Parameters.Any(x => x.NameOnMethod == prm.ParameterName && x.BindingSourceId == ParameterBindingSources.Body)) + { + prm.BindingInfo = BindingInfo.GetBindingInfo(new[] { new FromBodyAttribute() }); + } + } + } + } + protected override void ConfigureParameters(ControllerModel controller) { foreach (var action in controller.Actions) @@ -201,6 +230,22 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention } } + protected virtual void RemoveConventionalSelectors(ControllerModel controller) + { + if (controller.Selectors.Any(selector => selector.AttributeRouteModel != null)) + { + return; + } + + foreach (var action in controller.Actions) + { + action.Selectors + .Where(selector => selector.AttributeRouteModel == null) + .ToList() + .ForEach(selector => action.Selectors.Remove(selector)); + } + } + protected virtual void ConfigureClientProxyApiExplorer(ControllerModel controller) { if (ControllerWithAttributeRoute.Contains(controller)) @@ -218,10 +263,7 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention foreach (var action in controller.Actions) { - if (ActionWithAttributeRoute.Contains(action)) - { - ConfigureApiExplorer(action); - } + ConfigureApiExplorer(action); } } diff --git a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj index 42a5062403..ecd73ad927 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj +++ b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Http.Client diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyUrlBuilder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyUrlBuilder.cs index bbe737a020..72e426b454 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyUrlBuilder.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyUrlBuilder.cs @@ -93,7 +93,7 @@ public class ClientProxyUrlBuilder : ITransientDependency } else if (pathParameter.DefaultValue != null) { - urlBuilder = urlBuilder.Replace($"{{{pathParameter.Name}}}", await ConvertValueToStringAsync(pathParameter.DefaultValue)); + urlBuilder = urlBuilder.Replace($"{{{pathParameter.Name}}}", EncodePathValue(pathParameter, await ConvertValueToStringAsync(pathParameter.DefaultValue))); } else { @@ -118,17 +118,44 @@ public class ClientProxyUrlBuilder : ITransientDependency if (path != null) { + ValidatePathValue(pathParameter, path); urlBuilder = urlBuilder.Replace($"{{{pathParameter.Name}}}", path); } continue; } } - urlBuilder = urlBuilder.Replace($"{{{pathParameter.Name}}}", await ConvertValueToStringAsync(value)); + urlBuilder = urlBuilder.Replace($"{{{pathParameter.Name}}}", EncodePathValue(pathParameter, await ConvertValueToStringAsync(value))); } } } + protected virtual string EncodePathValue(ParameterApiDescriptionModel pathParameter, string value) + { + // Keep "/" unencoded so catch-all route parameters still receive multiple segments. + var path = string.Join("/", value.Split('/').Select(Uri.EscapeDataString)); + ValidatePathValue(pathParameter, path); + return path; + } + + protected virtual void ValidatePathValue(ParameterApiDescriptionModel pathParameter, string value) + { + // HTTP URIs ignore trailing whitespace and treat "\" as a path separator. + var path = value.TrimEnd(' ', '\t', '\r', '\n'); + var pathEnd = path.IndexOfAny(new[] { '?', '#' }); + if (pathEnd >= 0) + { + path = path.Substring(0, pathEnd); + } + + // Dot segments are removed by URI normalization even when percent-encoded, so the request would go to another endpoint. + // Encoded separators are decoded too, because a server or proxy may treat them as separators. + if (Uri.UnescapeDataString(path).Split('/', '\\').Any(segment => segment is "." or "..")) + { + throw new AbpException($"Path parameter value for {pathParameter.Name} ({pathParameter.NameOnMethod}) cannot contain \".\" or \"..\" segments."); + } + } + protected virtual async Task AddQueryStringParametersAsync(StringBuilder urlBuilder, ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments, ApiVersionInfo apiVersion) { var queryStringParameters = action.Parameters diff --git a/framework/src/Volo.Abp.Http.FluentValidation/Volo.Abp.Http.FluentValidation.csproj b/framework/src/Volo.Abp.Http.FluentValidation/Volo.Abp.Http.FluentValidation.csproj index 5c44a55420..a819f2e884 100644 --- a/framework/src/Volo.Abp.Http.FluentValidation/Volo.Abp.Http.FluentValidation.csproj +++ b/framework/src/Volo.Abp.Http.FluentValidation/Volo.Abp.Http.FluentValidation.csproj @@ -4,7 +4,7 @@ - net8.0;net9.0;net10.0 + net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Http.FluentValidation diff --git a/framework/src/Volo.Abp.Http/Volo.Abp.Http.csproj b/framework/src/Volo.Abp.Http/Volo.Abp.Http.csproj index 1f0d9927ca..7e87c8e954 100644 --- a/framework/src/Volo.Abp.Http/Volo.Abp.Http.csproj +++ b/framework/src/Volo.Abp.Http/Volo.Abp.Http.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Http diff --git a/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj b/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj index 2c3304871c..5a3eba50c6 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj +++ b/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.IdentityModel diff --git a/framework/src/Volo.Abp.Imaging.Abstractions/Volo.Abp.Imaging.Abstractions.csproj b/framework/src/Volo.Abp.Imaging.Abstractions/Volo.Abp.Imaging.Abstractions.csproj index 67adce53b8..8b7197cb66 100644 --- a/framework/src/Volo.Abp.Imaging.Abstractions/Volo.Abp.Imaging.Abstractions.csproj +++ b/framework/src/Volo.Abp.Imaging.Abstractions/Volo.Abp.Imaging.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Imaging.Abstractions diff --git a/framework/src/Volo.Abp.Imaging.AspNetCore/Volo.Abp.Imaging.AspNetCore.csproj b/framework/src/Volo.Abp.Imaging.AspNetCore/Volo.Abp.Imaging.AspNetCore.csproj index cf6d464b32..4b801b21d7 100644 --- a/framework/src/Volo.Abp.Imaging.AspNetCore/Volo.Abp.Imaging.AspNetCore.csproj +++ b/framework/src/Volo.Abp.Imaging.AspNetCore/Volo.Abp.Imaging.AspNetCore.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.Imaging.AspNetCore diff --git a/framework/src/Volo.Abp.Imaging.ImageSharp/Volo.Abp.Imaging.ImageSharp.csproj b/framework/src/Volo.Abp.Imaging.ImageSharp/Volo.Abp.Imaging.ImageSharp.csproj index 5e153b4076..eaecbea6c0 100644 --- a/framework/src/Volo.Abp.Imaging.ImageSharp/Volo.Abp.Imaging.ImageSharp.csproj +++ b/framework/src/Volo.Abp.Imaging.ImageSharp/Volo.Abp.Imaging.ImageSharp.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.Imaging.ImageSharp diff --git a/framework/src/Volo.Abp.Imaging.MagickNet/Volo.Abp.Imaging.MagickNet.csproj b/framework/src/Volo.Abp.Imaging.MagickNet/Volo.Abp.Imaging.MagickNet.csproj index acd780d9d1..1aafec7cea 100644 --- a/framework/src/Volo.Abp.Imaging.MagickNet/Volo.Abp.Imaging.MagickNet.csproj +++ b/framework/src/Volo.Abp.Imaging.MagickNet/Volo.Abp.Imaging.MagickNet.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Imaging.MagickNet diff --git a/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo.Abp.Imaging.SkiaSharp.csproj b/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo.Abp.Imaging.SkiaSharp.csproj index c1df2bfebb..5b6dcdfa64 100644 --- a/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo.Abp.Imaging.SkiaSharp.csproj +++ b/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo.Abp.Imaging.SkiaSharp.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Imaging.SkiaSharp diff --git a/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo/Abp/Imaging/SkiaSharpBitmapHelper.cs b/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo/Abp/Imaging/SkiaSharpBitmapHelper.cs new file mode 100644 index 0000000000..545d312a5b --- /dev/null +++ b/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo/Abp/Imaging/SkiaSharpBitmapHelper.cs @@ -0,0 +1,56 @@ +using SkiaSharp; + +namespace Volo.Abp.Imaging; + +public static class SkiaSharpBitmapHelper +{ + // The encoders write no EXIF, so the orientation has to be applied to the pixels. + public static SKBitmap? DecodeUpright(SKCodec codec) + { + var bitmap = SKBitmap.Decode(codec); + if (bitmap == null || codec.EncodedOrigin == SKEncodedOrigin.TopLeft) + { + return bitmap; + } + + using (bitmap) + { + return ApplyOrigin(bitmap, codec.EncodedOrigin); + } + } + + private static SKBitmap ApplyOrigin(SKBitmap source, SKEncodedOrigin origin) + { + var matrix = origin switch + { + SKEncodedOrigin.TopRight => new SKMatrix(-1, 0, source.Width, 0, 1, 0, 0, 0, 1), + SKEncodedOrigin.BottomRight => new SKMatrix(-1, 0, source.Width, 0, -1, source.Height, 0, 0, 1), + SKEncodedOrigin.BottomLeft => new SKMatrix(1, 0, 0, 0, -1, source.Height, 0, 0, 1), + SKEncodedOrigin.LeftTop => new SKMatrix(0, 1, 0, 1, 0, 0, 0, 0, 1), + SKEncodedOrigin.RightTop => new SKMatrix(0, -1, source.Height, 1, 0, 0, 0, 0, 1), + SKEncodedOrigin.RightBottom => new SKMatrix(0, -1, source.Height, -1, 0, source.Width, 0, 0, 1), + SKEncodedOrigin.LeftBottom => new SKMatrix(0, 1, 0, -1, 0, source.Width, 0, 0, 1), + _ => SKMatrix.Identity + }; + + var swapSides = origin is SKEncodedOrigin.LeftTop or SKEncodedOrigin.RightTop or SKEncodedOrigin.RightBottom or SKEncodedOrigin.LeftBottom; + var info = swapSides ? source.Info.WithSize(source.Height, source.Width) : source.Info; + + // DrawBitmap copies the pixels of a mutable bitmap, which doubles the memory for a large photo. + source.SetImmutable(); + + var result = new SKBitmap(info); + try + { + using var canvas = new SKCanvas(result); + canvas.SetMatrix(matrix); + canvas.DrawBitmap(source, 0, 0); + return result; + } + catch + { + result.Dispose(); + throw; + } + } +} diff --git a/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo/Abp/Imaging/SkiaSharpImageCompressorContributor.cs b/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo/Abp/Imaging/SkiaSharpImageCompressorContributor.cs index c3117d0461..6a24af928c 100644 --- a/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo/Abp/Imaging/SkiaSharpImageCompressorContributor.cs +++ b/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo/Abp/Imaging/SkiaSharpImageCompressorContributor.cs @@ -38,7 +38,7 @@ public class SkiaSharpImageCompressorContributor : IImageCompressorContributor, return new ImageCompressResult(stream, ImageProcessState.Unsupported); } - using var bitmap = SKBitmap.Decode(memoryBitmapStream); + using var bitmap = DecodeBitmap(codec); if (bitmap == null) { return new ImageCompressResult(stream, ImageProcessState.Unsupported); @@ -97,6 +97,11 @@ public class SkiaSharpImageCompressorContributor : IImageCompressorContributor, return new ImageCompressResult(newBytes, result.State); } + protected virtual SKBitmap? DecodeBitmap(SKCodec codec) + { + return SkiaSharpBitmapHelper.DecodeUpright(codec); + } + protected virtual bool CanCompress(string? mimeType) { return mimeType switch { diff --git a/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo/Abp/Imaging/SkiaSharpImageResizerContributor.cs b/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo/Abp/Imaging/SkiaSharpImageResizerContributor.cs index dd7da3251a..b3d5c751ec 100644 --- a/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo/Abp/Imaging/SkiaSharpImageResizerContributor.cs +++ b/framework/src/Volo.Abp.Imaging.SkiaSharp/Volo/Abp/Imaging/SkiaSharpImageResizerContributor.cs @@ -57,7 +57,7 @@ public class SkiaSharpImageResizerContributor : IImageResizerContributor, ITrans return new ImageResizeResult(stream, ImageProcessState.Unsupported); } - using var original = SKBitmap.Decode(memoryBitmapStream); + using var original = DecodeBitmap(codec); if (original == null) { return new ImageResizeResult(stream, ImageProcessState.Unsupported); @@ -119,6 +119,11 @@ public class SkiaSharpImageResizerContributor : IImageResizerContributor, ITrans } } + protected virtual SKBitmap? DecodeBitmap(SKCodec codec) + { + return SkiaSharpBitmapHelper.DecodeUpright(codec); + } + protected virtual bool CanResize(string? mimeType) { return mimeType switch { diff --git a/framework/src/Volo.Abp.Json.Abstractions/Volo.Abp.Json.Abstractions.csproj b/framework/src/Volo.Abp.Json.Abstractions/Volo.Abp.Json.Abstractions.csproj index c251398039..761b6179b6 100644 --- a/framework/src/Volo.Abp.Json.Abstractions/Volo.Abp.Json.Abstractions.csproj +++ b/framework/src/Volo.Abp.Json.Abstractions/Volo.Abp.Json.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Json.Abstractions diff --git a/framework/src/Volo.Abp.Json.Newtonsoft/Volo.Abp.Json.Newtonsoft.csproj b/framework/src/Volo.Abp.Json.Newtonsoft/Volo.Abp.Json.Newtonsoft.csproj index 5dd75a7243..4c6e3cd88c 100644 --- a/framework/src/Volo.Abp.Json.Newtonsoft/Volo.Abp.Json.Newtonsoft.csproj +++ b/framework/src/Volo.Abp.Json.Newtonsoft/Volo.Abp.Json.Newtonsoft.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Json.Newtonsoft diff --git a/framework/src/Volo.Abp.Json.SystemTextJson/Volo.Abp.Json.SystemTextJson.csproj b/framework/src/Volo.Abp.Json.SystemTextJson/Volo.Abp.Json.SystemTextJson.csproj index 1b81259da3..43f9898196 100644 --- a/framework/src/Volo.Abp.Json.SystemTextJson/Volo.Abp.Json.SystemTextJson.csproj +++ b/framework/src/Volo.Abp.Json.SystemTextJson/Volo.Abp.Json.SystemTextJson.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Json.SystemTextJson diff --git a/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj b/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj index 619848230e..c80ff4f183 100644 --- a/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj +++ b/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Json diff --git a/framework/src/Volo.Abp.Kafka/Volo.Abp.Kafka.csproj b/framework/src/Volo.Abp.Kafka/Volo.Abp.Kafka.csproj index 2a747576bc..9f32a842a5 100644 --- a/framework/src/Volo.Abp.Kafka/Volo.Abp.Kafka.csproj +++ b/framework/src/Volo.Abp.Kafka/Volo.Abp.Kafka.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.Ldap.Abstractions/Volo.Abp.Ldap.Abstractions.csproj b/framework/src/Volo.Abp.Ldap.Abstractions/Volo.Abp.Ldap.Abstractions.csproj index 2e94cfda45..b4188b2c04 100644 --- a/framework/src/Volo.Abp.Ldap.Abstractions/Volo.Abp.Ldap.Abstractions.csproj +++ b/framework/src/Volo.Abp.Ldap.Abstractions/Volo.Abp.Ldap.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Ldap.Abstractions diff --git a/framework/src/Volo.Abp.Ldap.Abstractions/Volo/Abp/Ldap/Localization/he.json b/framework/src/Volo.Abp.Ldap.Abstractions/Volo/Abp/Ldap/Localization/he.json new file mode 100644 index 0000000000..bcd8036a71 --- /dev/null +++ b/framework/src/Volo.Abp.Ldap.Abstractions/Volo/Abp/Ldap/Localization/he.json @@ -0,0 +1,19 @@ +{ + "culture": "he", + "texts": { + "DisplayName:Abp.Ldap.Ldaps": "LDAP על גבי SSL", + "Description:Abp.Ldap.Ldaps": "LDAP על גבי SSL", + "DisplayName:Abp.Ldap.ServerHost": "כתובת השרת", + "Description:Abp.Ldap.ServerHost": "כתובת השרת", + "DisplayName:Abp.Ldap.ServerPort": "פורט השרת", + "Description:Abp.Ldap.ServerPort": "פורט השרת", + "DisplayName:Abp.Ldap.BaseDc": "רכיב דומיין בסיסי (Base DC)", + "Description:Abp.Ldap.BaseDc": "רכיב דומיין בסיסי (Base DC)", + "DisplayName:Abp.Ldap.Domain": "דומיין", + "Description:Abp.Ldap.Domain": "דומיין", + "DisplayName:Abp.Ldap.UserName": "שם משתמש", + "Description:Abp.Ldap.UserName": "שם משתמש", + "DisplayName:Abp.Ldap.Password": "סיסמה", + "Description:Abp.Ldap.Password": "סיסמה" + } +} diff --git a/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj b/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj index bced0fceb1..7721be69ba 100644 --- a/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj +++ b/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Ldap diff --git a/framework/src/Volo.Abp.Localization.Abstractions/Volo.Abp.Localization.Abstractions.csproj b/framework/src/Volo.Abp.Localization.Abstractions/Volo.Abp.Localization.Abstractions.csproj index ced01b1eb5..d255deb7d2 100644 --- a/framework/src/Volo.Abp.Localization.Abstractions/Volo.Abp.Localization.Abstractions.csproj +++ b/framework/src/Volo.Abp.Localization.Abstractions/Volo.Abp.Localization.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Localization.Abstractions diff --git a/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj b/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj index 920883a866..27b6b6cc7b 100644 --- a/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj +++ b/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Localization diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Json/JsonLocalizationDictionaryBuilder.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Json/JsonLocalizationDictionaryBuilder.cs index d39c06a1b4..3abd4ef0ff 100644 --- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Json/JsonLocalizationDictionaryBuilder.cs +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Json/JsonLocalizationDictionaryBuilder.cs @@ -74,6 +74,47 @@ public static class JsonLocalizationDictionaryBuilder return new StaticLocalizationDictionary(cultureCode, dictionary); } + /// + /// Reads the culture of a localization json without reading its texts. + /// Returns null if the json has no culture, and throws if it is invalid. + /// + internal static string? GetCultureNameOrNull(Stream stream) + { + var json = new ReadOnlySpan(stream.GetAllBytes()); + if (json.StartsWith(Utf8Bom)) + { + json = json.Slice(Utf8Bom.Length); + } + + var reader = new Utf8JsonReader(json, new JsonReaderOptions + { + CommentHandling = JsonCommentHandling.Skip, + AllowTrailingCommas = true + }); + + if (!reader.Read() || reader.TokenType != JsonTokenType.StartObject) + { + return null; + } + + while (reader.Read() && reader.TokenType == JsonTokenType.PropertyName) + { + var isCulture = string.Equals(reader.GetString(), nameof(JsonLocalizationFile.Culture), StringComparison.OrdinalIgnoreCase); + reader.Read(); + + if (isCulture) + { + return reader.TokenType == JsonTokenType.String ? reader.GetString() : null; + } + + reader.Skip(); + } + + return null; + } + + private static readonly byte[] Utf8Bom = [0xEF, 0xBB, 0xBF]; + private static Dictionary FlattenTexts(Dictionary texts, string prefix = "") { var result = new Dictionary(); diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/he.json b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/he.json new file mode 100644 index 0000000000..3c87d05853 --- /dev/null +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/he.json @@ -0,0 +1,7 @@ +{ + "culture": "he", + "texts": { + "DisplayName:Abp.Localization.DefaultLanguage": "שפת ברירת המחדל", + "Description:Abp.Localization.DefaultLanguage": "שפת ברירת המחדל של היישום." + } +} diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/Json/JsonVirtualFileLocalizationResourceContributor.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/Json/JsonVirtualFileLocalizationResourceContributor.cs index 71ca2744a0..7ab69db0ee 100644 --- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/Json/JsonVirtualFileLocalizationResourceContributor.cs +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/Json/JsonVirtualFileLocalizationResourceContributor.cs @@ -19,6 +19,22 @@ public class JsonVirtualFileLocalizationResourceContributor : VirtualFileLocaliz return file.Name.EndsWith(".json", StringComparison.OrdinalIgnoreCase); } + protected override string? GetCultureNameOrNull(IFileInfo file) + { + try + { + using (var stream = file.CreateReadStream()) + { + return JsonLocalizationDictionaryBuilder.GetCultureNameOrNull(stream); + } + } + catch (Exception) + { + // All files are parsed as before, which reports the error if there is one. + return null; + } + } + protected override ILocalizationDictionary? CreateDictionaryFromFileContent(string jsonString) { return JsonLocalizationDictionaryBuilder.BuildFromJsonString(jsonString); diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs index 41fd38a430..f66eff7246 100644 --- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -16,8 +17,9 @@ public abstract class VirtualFileLocalizationResourceContributorBase : ILocaliza public bool IsDynamic => false; private readonly string _virtualPath; - private IVirtualFileProvider _virtualFileProvider = default!; - private Dictionary? _dictionaries; + private IServiceProvider _serviceProvider = default!; + private IVirtualFileProvider? _virtualFileProvider; + private volatile LocalizationFiles? _files; private bool _subscribedForChanges; private readonly object _syncObj = new object(); @@ -28,17 +30,23 @@ public abstract class VirtualFileLocalizationResourceContributorBase : ILocaliza public virtual void Initialize(LocalizationResourceInitializationContext context) { - _virtualFileProvider = context.ServiceProvider.GetRequiredService(); + // The provider is resolved on first use, outside any lock: Initialize runs while the localizer factory holds + // its lock, and resolving a singleton under a lock deadlocks with a thread that creates that singleton and + // reads localized texts. + _serviceProvider = context.ServiceProvider; } + private IVirtualFileProvider VirtualFileProvider => + _virtualFileProvider ??= _serviceProvider.GetRequiredService(); + public virtual LocalizedString? GetOrNull(string cultureName, string name) { - return GetDictionaries().GetOrDefault(cultureName)?.GetOrNull(name); + return GetDictionaryOrNull(cultureName)?.GetOrNull(name); } public virtual void Fill(string cultureName, Dictionary dictionary) { - GetDictionaries().GetOrDefault(cultureName)?.Fill(dictionary); + GetDictionaryOrNull(cultureName)?.Fill(dictionary); } public Task FillAsync(string cultureName, Dictionary dictionary) @@ -49,49 +57,134 @@ public abstract class VirtualFileLocalizationResourceContributorBase : ILocaliza public Task> GetSupportedCulturesAsync() { - return Task.FromResult((IEnumerable)GetDictionaries().Keys); + return Task.FromResult((IEnumerable)GetFiles().CultureNames); + } + + private ILocalizationDictionary? GetDictionaryOrNull(string cultureName) + { + var files = GetFiles(); + if (files.Dictionaries.TryGetValue(cultureName, out var dictionary)) + { + return dictionary; + } + + if (files.FilesByCulture == null || !files.FilesByCulture.TryGetValue(cultureName, out var cultureFiles)) + { + return null; + } + + lock (_syncObj) + { + if (files.Dictionaries.TryGetValue(cultureName, out dictionary)) + { + return dictionary; + } + + dictionary = CreateDictionaryOrNull(cultureName, cultureFiles); + if (dictionary != null) + { + files.Dictionaries[cultureName] = dictionary; + return dictionary; + } + + // A file did not contain the culture it was indexed with, so the index can not be trusted. + var allDictionaries = CreateAllDictionaries(files.AllFiles); + if (ReferenceEquals(_files, files)) + { + _files = allDictionaries; + } + + return allDictionaries.Dictionaries.GetOrDefault(cultureName); + } } - private Dictionary GetDictionaries() + private LocalizationFiles GetFiles() { - var dictionaries = _dictionaries; - if (dictionaries != null) + var files = _files; + if (files != null) { - return dictionaries; + return files; } + var virtualFileProvider = VirtualFileProvider; + lock (_syncObj) { - dictionaries = _dictionaries; - if (dictionaries != null) + files = _files; + if (files != null) { - return dictionaries; + return files; } if (!_subscribedForChanges) { - ChangeToken.OnChange(() => _virtualFileProvider.Watch(_virtualPath.EnsureEndsWith('/') + "*.*"), + ChangeToken.OnChange(() => virtualFileProvider.Watch(_virtualPath.EnsureEndsWith('/') + "*.*"), () => { - _dictionaries = null; + _files = null; }); _subscribedForChanges = true; } - dictionaries = _dictionaries = CreateDictionaries(); + _files = files = CreateFiles(virtualFileProvider); } - return dictionaries; + return files; } - private Dictionary CreateDictionaries() + private LocalizationFiles CreateFiles(IVirtualFileProvider virtualFileProvider) + { + var allFiles = virtualFileProvider.GetDirectoryContents(_virtualPath) + .Where(f => !f.IsDirectory && CanParseFile(f)) + .OrderBy(f => f.Name, StringComparer.Ordinal) + .ToList(); + + var filesByCulture = new Dictionary>(); + + foreach (var file in allFiles) + { + var cultureName = GetCultureNameOrNull(file); + if (cultureName.IsNullOrEmpty()) + { + return CreateAllDictionaries(allFiles); + } + + if (!filesByCulture.TryGetValue(cultureName!, out var cultureFiles)) + { + cultureFiles = new List(); + filesByCulture[cultureName!] = cultureFiles; + } + + cultureFiles.Add(file); + } + + return new LocalizationFiles(allFiles, filesByCulture, filesByCulture.Keys.ToList().AsReadOnly()); + } + + private ILocalizationDictionary? CreateDictionaryOrNull(string cultureName, List cultureFiles) + { + var rawDictionary = new Dictionary(); + + foreach (var file in cultureFiles) + { + var dictionary = CreateDictionaryFromFile(file); + if (dictionary == null || dictionary.CultureName != cultureName) + { + return null; + } + + dictionary.Fill(rawDictionary); + } + + return new StaticLocalizationDictionary(cultureName, rawDictionary); + } + + private LocalizationFiles CreateAllDictionaries(List allFiles) { var rawDictionaries = new Dictionary>(); - foreach (var file in _virtualFileProvider.GetDirectoryContents(_virtualPath) - .Where(f => !f.IsDirectory && CanParseFile(f)) - .OrderBy(f => f.Name, StringComparer.Ordinal)) + foreach (var file in allFiles) { var dictionary = CreateDictionaryFromFile(file); @@ -109,14 +202,26 @@ public abstract class VirtualFileLocalizationResourceContributorBase : ILocaliza dictionary.Fill(raw); } - return rawDictionaries.ToDictionary( - kvp => kvp.Key, - kvp => (ILocalizationDictionary)new StaticLocalizationDictionary(kvp.Key, kvp.Value) - ); + var dictionaries = new ConcurrentDictionary(); + foreach (var raw in rawDictionaries) + { + dictionaries[raw.Key] = new StaticLocalizationDictionary(raw.Key, raw.Value); + } + + return new LocalizationFiles(allFiles, null, rawDictionaries.Keys.ToList().AsReadOnly(), dictionaries); } protected abstract bool CanParseFile(IFileInfo file); + /// + /// Returns the culture of the given file without building its texts, so only the files of the requested cultures + /// need to be parsed. Returns null if it can not be determined; then all files are parsed at once. + /// + protected virtual string? GetCultureNameOrNull(IFileInfo file) + { + return null; + } + protected virtual ILocalizationDictionary? CreateDictionaryFromFile(IFileInfo file) { using (var stream = file.CreateReadStream()) @@ -133,4 +238,30 @@ public abstract class VirtualFileLocalizationResourceContributorBase : ILocaliza } protected abstract ILocalizationDictionary? CreateDictionaryFromFileContent(string fileContent); + + private class LocalizationFiles + { + public List AllFiles { get; } + + /// + /// Null when all dictionaries are created at once. + /// + public Dictionary>? FilesByCulture { get; } + + public IReadOnlyList CultureNames { get; } + + public ConcurrentDictionary Dictionaries { get; } + + public LocalizationFiles( + List allFiles, + Dictionary>? filesByCulture, + IReadOnlyList cultureNames, + ConcurrentDictionary? dictionaries = null) + { + AllFiles = allFiles; + FilesByCulture = filesByCulture; + CultureNames = cultureNames; + Dictionaries = dictionaries ?? new ConcurrentDictionary(); + } + } } diff --git a/framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo.Abp.LuckyPenny.AutoMapper.csproj b/framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo.Abp.LuckyPenny.AutoMapper.csproj index 661c9e7e5b..e22920e612 100644 --- a/framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo.Abp.LuckyPenny.AutoMapper.csproj +++ b/framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo.Abp.LuckyPenny.AutoMapper.csproj @@ -4,7 +4,7 @@ - net8.0;net9.0;net10.0 + net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.LuckyPenny.AutoMapper diff --git a/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj b/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj index 5bb5520611..4b0d0e6802 100644 --- a/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj +++ b/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.MailKit diff --git a/framework/src/Volo.Abp.Mapperly/Volo.Abp.Mapperly.csproj b/framework/src/Volo.Abp.Mapperly/Volo.Abp.Mapperly.csproj index 10eb9d8c73..83182338f6 100644 --- a/framework/src/Volo.Abp.Mapperly/Volo.Abp.Mapperly.csproj +++ b/framework/src/Volo.Abp.Mapperly/Volo.Abp.Mapperly.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Mapperly diff --git a/framework/src/Volo.Abp.Maui.Client/Volo.Abp.Maui.Client.csproj b/framework/src/Volo.Abp.Maui.Client/Volo.Abp.Maui.Client.csproj index 7bbf84d2ba..82f636d17a 100644 --- a/framework/src/Volo.Abp.Maui.Client/Volo.Abp.Maui.Client.csproj +++ b/framework/src/Volo.Abp.Maui.Client/Volo.Abp.Maui.Client.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.Maui.Client diff --git a/framework/src/Volo.Abp.MemoryDb/Volo.Abp.MemoryDb.csproj b/framework/src/Volo.Abp.MemoryDb/Volo.Abp.MemoryDb.csproj index e6e53a124c..3119f2fd72 100644 --- a/framework/src/Volo.Abp.MemoryDb/Volo.Abp.MemoryDb.csproj +++ b/framework/src/Volo.Abp.MemoryDb/Volo.Abp.MemoryDb.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.MemoryDb diff --git a/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj b/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj index 6ee2461a6f..f9fa30ac8f 100644 --- a/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj +++ b/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Minify diff --git a/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj b/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj index 165b0c7dd8..495170149f 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj +++ b/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.MongoDB diff --git a/framework/src/Volo.Abp.MudBlazorUI/AbpMudCrudPageBase.cs b/framework/src/Volo.Abp.MudBlazorUI/AbpMudCrudPageBase.cs index 9bc201bdca..e0f9e05e23 100644 --- a/framework/src/Volo.Abp.MudBlazorUI/AbpMudCrudPageBase.cs +++ b/framework/src/Volo.Abp.MudBlazorUI/AbpMudCrudPageBase.cs @@ -180,6 +180,7 @@ public abstract class AbpMudCrudPageBase< protected virtual int PageSize { get; set; } = LimitedResultRequestDto.DefaultMaxResultCount; + protected IReadOnlyList Entities = Array.Empty(); protected int CurrentPage = 1; protected string CurrentSorting = default!; protected TGetListInput GetListInput = new TGetListInput(); @@ -349,6 +350,7 @@ public abstract class AbpMudCrudPageBase< await UpdateGetListInputAsync(); var result = await AppService.GetListAsync(GetListInput); var items = MapToListViewModel(result.Items); + Entities = items; await InvokeAsync(StateHasChanged); @@ -599,7 +601,17 @@ public abstract class AbpMudCrudPageBase< protected virtual async Task OnDeletedEntityAsync() { - if (_dataGrid != null) + if (Entities.Count == 1 && CurrentPage > 1) + { + // The data grid loads the previous page by itself when it receives the new CurrentPage + CurrentPage -= 1; + await InvokeAsync(StateHasChanged); + if (_dataGrid != null) + { + await InvokeAsync(() => _dataGrid.WaitForServerDataAsync()); + } + } + else if (_dataGrid != null) { await InvokeAsync(() => _dataGrid.ReloadServerDataAsync()); } diff --git a/framework/src/Volo.Abp.MudBlazorUI/Components/AbpMudExtensibleDataGrid.razor b/framework/src/Volo.Abp.MudBlazorUI/Components/AbpMudExtensibleDataGrid.razor index 2bf9b47935..50575c8049 100644 --- a/framework/src/Volo.Abp.MudBlazorUI/Components/AbpMudExtensibleDataGrid.razor +++ b/framework/src/Volo.Abp.MudBlazorUI/Components/AbpMudExtensibleDataGrid.razor @@ -2,7 +2,7 @@ @using MudBlazor @using Volo.Abp.Data - @@ -71,12 +71,12 @@ @if (column.ValueConverter == null) { private readonly Dictionary, string> _sortFuncToPropertyMap = new(); + /// + /// Keeps one sort function per sort path, so re-renders reuse it instead of growing . + /// Keyed by path rather than by column, because a column's data can change between renders. + /// + private readonly Dictionary> _sortFuncsByPath = new(); + + private Task? _serverDataTask; + [Parameter] public Func, CancellationToken, Task>>? ServerData { get; set; } [Parameter] public bool Loading { get; set; } @@ -66,6 +74,30 @@ public partial class AbpMudExtensibleDataGrid : ComponentBase } } + /// + /// Waits for the server data load that is in progress, such as the one the data grid starts by itself + /// when changes. Completes immediately if there is no load in progress. + /// + public virtual async Task WaitForServerDataAsync() + { + if (_serverDataTask != null) + { + await _serverDataTask; + } + } + + protected virtual Func, CancellationToken, Task>>? GetServerDataFunc() + { + return ServerData == null ? null : LoadServerDataAsync; + } + + private Task> LoadServerDataAsync(GridState state, CancellationToken cancellationToken) + { + var task = ServerData!(state, cancellationToken); + _serverDataTask = task; + return task; + } + /// /// Resolves the property name for a given SortDefinition by matching its SortFunc reference. /// When MudBlazor uses Func for SortBy on TemplateColumn, it returns an internal GUID identifier @@ -216,6 +248,12 @@ public partial class AbpMudExtensibleDataGrid : ComponentBase return null; } + var cacheKey = "property:" + propertyPath; + if (_sortFuncsByPath.TryGetValue(cacheKey, out var cachedSortFunc)) + { + return cachedSortFunc; + } + var properties = propertyPath.Split('.'); // Build a lambda expression that directly accesses the property @@ -244,6 +282,7 @@ public partial class AbpMudExtensibleDataGrid : ComponentBase // Register the mapping so we can resolve property name from SortDefinition.SortFunc later _sortFuncToPropertyMap[sortFunc] = propertyPath; + _sortFuncsByPath[cacheKey] = sortFunc; return sortFunc; } @@ -262,6 +301,12 @@ public partial class AbpMudExtensibleDataGrid : ComponentBase } var propertyName = match.Groups[1].Value; + var cacheKey = "extension:" + propertyName; + if (_sortFuncsByPath.TryGetValue(cacheKey, out var cachedSortFunc)) + { + return cachedSortFunc; + } + Func sortFunc = item => { var entity = item as IHasExtraProperties; @@ -270,6 +315,7 @@ public partial class AbpMudExtensibleDataGrid : ComponentBase // Register the mapping so we can resolve property name from SortDefinition.SortFunc later _sortFuncToPropertyMap[sortFunc] = propertyName; + _sortFuncsByPath[cacheKey] = sortFunc; return sortFunc; } diff --git a/framework/src/Volo.Abp.MudBlazorUI/Volo.Abp.MudBlazorUI.csproj b/framework/src/Volo.Abp.MudBlazorUI/Volo.Abp.MudBlazorUI.csproj index 16ed2f6423..f49535aacc 100644 --- a/framework/src/Volo.Abp.MudBlazorUI/Volo.Abp.MudBlazorUI.csproj +++ b/framework/src/Volo.Abp.MudBlazorUI/Volo.Abp.MudBlazorUI.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.MultiLingualObjects/Volo.Abp.MultiLingualObjects.csproj b/framework/src/Volo.Abp.MultiLingualObjects/Volo.Abp.MultiLingualObjects.csproj index c450371505..b1de973316 100644 --- a/framework/src/Volo.Abp.MultiLingualObjects/Volo.Abp.MultiLingualObjects.csproj +++ b/framework/src/Volo.Abp.MultiLingualObjects/Volo.Abp.MultiLingualObjects.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.MultiLingualObject diff --git a/framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo.Abp.MultiTenancy.Abstractions.csproj b/framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo.Abp.MultiTenancy.Abstractions.csproj index 30d3d44abf..a39498716b 100644 --- a/framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo.Abp.MultiTenancy.Abstractions.csproj +++ b/framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo.Abp.MultiTenancy.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.MultiTenancy.Abstractions diff --git a/framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo/Abp/MultiTenancy/Localization/he.json b/framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo/Abp/MultiTenancy/Localization/he.json new file mode 100644 index 0000000000..5a9908599b --- /dev/null +++ b/framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo/Abp/MultiTenancy/Localization/he.json @@ -0,0 +1,9 @@ +{ + "culture": "he", + "texts": { + "TenantNotFoundMessage": "הדייר לא נמצא!", + "TenantNotFoundDetails": "לא קיים דייר עם המזהה או השם: {0}", + "TenantNotActiveMessage": "הדייר אינו פעיל!", + "TenantNotActiveDetails": "הדייר אינו פעיל. מזהה או שם הדייר: {0}" + } +} diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj b/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj index 1220abaacc..02ea64554c 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj +++ b/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.MultiTenancy diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo.Abp.ObjectExtending.csproj b/framework/src/Volo.Abp.ObjectExtending/Volo.Abp.ObjectExtending.csproj index 01ab05798a..8b70d4d5a5 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo.Abp.ObjectExtending.csproj +++ b/framework/src/Volo.Abp.ObjectExtending/Volo.Abp.ObjectExtending.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.ObjectExtending diff --git a/framework/src/Volo.Abp.ObjectMapping/Volo.Abp.ObjectMapping.csproj b/framework/src/Volo.Abp.ObjectMapping/Volo.Abp.ObjectMapping.csproj index 9546cd83eb..835c88aa68 100644 --- a/framework/src/Volo.Abp.ObjectMapping/Volo.Abp.ObjectMapping.csproj +++ b/framework/src/Volo.Abp.ObjectMapping/Volo.Abp.ObjectMapping.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.ObjectMapping diff --git a/framework/src/Volo.Abp.Quartz/Volo.Abp.Quartz.csproj b/framework/src/Volo.Abp.Quartz/Volo.Abp.Quartz.csproj index 12613702f6..d27ab666b9 100644 --- a/framework/src/Volo.Abp.Quartz/Volo.Abp.Quartz.csproj +++ b/framework/src/Volo.Abp.Quartz/Volo.Abp.Quartz.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Quartz diff --git a/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj b/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj index 1580e0fae0..f06b6a215e 100644 --- a/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj +++ b/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.RabbitMQ diff --git a/framework/src/Volo.Abp.RemoteServices/Volo.Abp.RemoteServices.csproj b/framework/src/Volo.Abp.RemoteServices/Volo.Abp.RemoteServices.csproj index 00d2bba8d6..810fee26dd 100644 --- a/framework/src/Volo.Abp.RemoteServices/Volo.Abp.RemoteServices.csproj +++ b/framework/src/Volo.Abp.RemoteServices/Volo.Abp.RemoteServices.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.RemoteServices diff --git a/framework/src/Volo.Abp.Security/Volo.Abp.Security.csproj b/framework/src/Volo.Abp.Security/Volo.Abp.Security.csproj index cb4d7e7efa..d0d6407624 100644 --- a/framework/src/Volo.Abp.Security/Volo.Abp.Security.csproj +++ b/framework/src/Volo.Abp.Security/Volo.Abp.Security.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Security diff --git a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/AbpDynamicClaimCacheItem.cs b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/AbpDynamicClaimCacheItem.cs index 8c25cb19e7..71c9634d7b 100644 --- a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/AbpDynamicClaimCacheItem.cs +++ b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/AbpDynamicClaimCacheItem.cs @@ -22,4 +22,9 @@ public class AbpDynamicClaimCacheItem { return $"{tenantId}-{userId}"; } + + public static string CalculateRevokedSessionCacheKey(string sessionId) + { + return $"revoked-session:{sessionId}"; + } } diff --git a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/RemoteDynamicClaimsPrincipalContributorBase.cs b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/RemoteDynamicClaimsPrincipalContributorBase.cs index b54f5becbd..72164c3d58 100644 --- a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/RemoteDynamicClaimsPrincipalContributorBase.cs +++ b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/RemoteDynamicClaimsPrincipalContributorBase.cs @@ -30,6 +30,15 @@ public abstract class RemoteDynamicClaimsPrincipalContributorBase>() + .LogWarning($"The session: {sessionId} of user: {userId.Value} is revoked, the claims principal is cleared."); + return; + } + dynamicClaims = await dynamicClaimsCache.GetAsync(userId.Value, identity.FindTenantId()); } catch (Exception e) diff --git a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/RemoteDynamicClaimsPrincipalContributorCacheBase.cs b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/RemoteDynamicClaimsPrincipalContributorCacheBase.cs index e8cedc77e9..23b2fbd56b 100644 --- a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/RemoteDynamicClaimsPrincipalContributorCacheBase.cs +++ b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/RemoteDynamicClaimsPrincipalContributorCacheBase.cs @@ -54,6 +54,15 @@ public abstract class RemoteDynamicClaimsPrincipalContributorCacheBase + /// Whether the session was revoked (for example by a logout). The dynamic claims are cached per user, + /// so a cached user doesn't mean the session of the current token is still valid. + /// + public virtual Task IsSessionRevokedAsync(string sessionId) + { + return Task.FromResult(false); + } + protected abstract Task GetCacheAsync(Guid userId, Guid? tenantId = null); protected abstract Task RefreshAsync(Guid userId, Guid? tenantId = null); diff --git a/framework/src/Volo.Abp.Serialization/Volo.Abp.Serialization.csproj b/framework/src/Volo.Abp.Serialization/Volo.Abp.Serialization.csproj index d57b4b73f8..ecb0015bfb 100644 --- a/framework/src/Volo.Abp.Serialization/Volo.Abp.Serialization.csproj +++ b/framework/src/Volo.Abp.Serialization/Volo.Abp.Serialization.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Serialization diff --git a/framework/src/Volo.Abp.Settings/Volo.Abp.Settings.csproj b/framework/src/Volo.Abp.Settings/Volo.Abp.Settings.csproj index b33e5af031..573fecbc8f 100644 --- a/framework/src/Volo.Abp.Settings/Volo.Abp.Settings.csproj +++ b/framework/src/Volo.Abp.Settings/Volo.Abp.Settings.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Settings diff --git a/framework/src/Volo.Abp.Sms.Aliyun/Volo.Abp.Sms.Aliyun.csproj b/framework/src/Volo.Abp.Sms.Aliyun/Volo.Abp.Sms.Aliyun.csproj index 8c2b0dbd27..28f34a614c 100644 --- a/framework/src/Volo.Abp.Sms.Aliyun/Volo.Abp.Sms.Aliyun.csproj +++ b/framework/src/Volo.Abp.Sms.Aliyun/Volo.Abp.Sms.Aliyun.csproj @@ -3,7 +3,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Sms.Aliyun diff --git a/framework/src/Volo.Abp.Sms.TencentCloud/Volo.Abp.Sms.TencentCloud.csproj b/framework/src/Volo.Abp.Sms.TencentCloud/Volo.Abp.Sms.TencentCloud.csproj index 349fc82f7c..8d46715afd 100644 --- a/framework/src/Volo.Abp.Sms.TencentCloud/Volo.Abp.Sms.TencentCloud.csproj +++ b/framework/src/Volo.Abp.Sms.TencentCloud/Volo.Abp.Sms.TencentCloud.csproj @@ -3,7 +3,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Sms.TencentCloud diff --git a/framework/src/Volo.Abp.Sms/Volo.Abp.Sms.csproj b/framework/src/Volo.Abp.Sms/Volo.Abp.Sms.csproj index 25145e2d17..eab7d7f112 100644 --- a/framework/src/Volo.Abp.Sms/Volo.Abp.Sms.csproj +++ b/framework/src/Volo.Abp.Sms/Volo.Abp.Sms.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Sms diff --git a/framework/src/Volo.Abp.Specifications/Volo.Abp.Specifications.csproj b/framework/src/Volo.Abp.Specifications/Volo.Abp.Specifications.csproj index 16e093f58e..5970fbff9a 100644 --- a/framework/src/Volo.Abp.Specifications/Volo.Abp.Specifications.csproj +++ b/framework/src/Volo.Abp.Specifications/Volo.Abp.Specifications.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Specifications diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj b/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj index 3a5dac82e7..e22a8969ae 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj +++ b/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.Swashbuckle diff --git a/framework/src/Volo.Abp.TestBase/Volo.Abp.TestBase.csproj b/framework/src/Volo.Abp.TestBase/Volo.Abp.TestBase.csproj index ced20624e2..0800cf60e3 100644 --- a/framework/src/Volo.Abp.TestBase/Volo.Abp.TestBase.csproj +++ b/framework/src/Volo.Abp.TestBase/Volo.Abp.TestBase.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.TestBase diff --git a/framework/src/Volo.Abp.TextTemplating.Core/Volo.Abp.TextTemplating.Core.csproj b/framework/src/Volo.Abp.TextTemplating.Core/Volo.Abp.TextTemplating.Core.csproj index 8c04e20190..74bfb28daa 100644 --- a/framework/src/Volo.Abp.TextTemplating.Core/Volo.Abp.TextTemplating.Core.csproj +++ b/framework/src/Volo.Abp.TextTemplating.Core/Volo.Abp.TextTemplating.Core.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.TextTemplating.Razor/Volo.Abp.TextTemplating.Razor.csproj b/framework/src/Volo.Abp.TextTemplating.Razor/Volo.Abp.TextTemplating.Razor.csproj index 990cf28c67..9813921485 100644 --- a/framework/src/Volo.Abp.TextTemplating.Razor/Volo.Abp.TextTemplating.Razor.csproj +++ b/framework/src/Volo.Abp.TextTemplating.Razor/Volo.Abp.TextTemplating.Razor.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.TextTemplating.Scriban/Volo.Abp.TextTemplating.Scriban.csproj b/framework/src/Volo.Abp.TextTemplating.Scriban/Volo.Abp.TextTemplating.Scriban.csproj index 6571b8340f..2966572a89 100644 --- a/framework/src/Volo.Abp.TextTemplating.Scriban/Volo.Abp.TextTemplating.Scriban.csproj +++ b/framework/src/Volo.Abp.TextTemplating.Scriban/Volo.Abp.TextTemplating.Scriban.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.TextTemplating/Volo.Abp.TextTemplating.csproj b/framework/src/Volo.Abp.TextTemplating/Volo.Abp.TextTemplating.csproj index d83f39fb59..2312333049 100644 --- a/framework/src/Volo.Abp.TextTemplating/Volo.Abp.TextTemplating.csproj +++ b/framework/src/Volo.Abp.TextTemplating/Volo.Abp.TextTemplating.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable diff --git a/framework/src/Volo.Abp.Threading/Volo.Abp.Threading.csproj b/framework/src/Volo.Abp.Threading/Volo.Abp.Threading.csproj index dca1407ce2..3ab9e982ef 100644 --- a/framework/src/Volo.Abp.Threading/Volo.Abp.Threading.csproj +++ b/framework/src/Volo.Abp.Threading/Volo.Abp.Threading.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Threading diff --git a/framework/src/Volo.Abp.TickerQ/Volo.Abp.TickerQ.csproj b/framework/src/Volo.Abp.TickerQ/Volo.Abp.TickerQ.csproj index 51649a9a86..092ba8e9f9 100644 --- a/framework/src/Volo.Abp.TickerQ/Volo.Abp.TickerQ.csproj +++ b/framework/src/Volo.Abp.TickerQ/Volo.Abp.TickerQ.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 enable Nullable Volo.Abp.TickerQ diff --git a/framework/src/Volo.Abp.Timing/Volo.Abp.Timing.csproj b/framework/src/Volo.Abp.Timing/Volo.Abp.Timing.csproj index 6af7fbef4e..edd7666a0d 100644 --- a/framework/src/Volo.Abp.Timing/Volo.Abp.Timing.csproj +++ b/framework/src/Volo.Abp.Timing/Volo.Abp.Timing.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Timing diff --git a/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/he.json b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/he.json new file mode 100644 index 0000000000..4c5de9e708 --- /dev/null +++ b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/he.json @@ -0,0 +1,7 @@ +{ + "culture": "he", + "texts": { + "DisplayName:Abp.Timing.Timezone": "אזור זמן", + "Description:Abp.Timing.Timezone": "אזור הזמן של היישום" + } +} diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo.Abp.UI.Navigation.csproj b/framework/src/Volo.Abp.UI.Navigation/Volo.Abp.UI.Navigation.csproj index c01959bb61..511b9aba24 100644 --- a/framework/src/Volo.Abp.UI.Navigation/Volo.Abp.UI.Navigation.csproj +++ b/framework/src/Volo.Abp.UI.Navigation/Volo.Abp.UI.Navigation.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.UI.Navigation diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/he.json b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/he.json new file mode 100644 index 0000000000..2cecf6ebbf --- /dev/null +++ b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/he.json @@ -0,0 +1,6 @@ +{ + "culture": "he", + "texts": { + "Menu:Administration": "ניהול" + } +} diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/he.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/he.json new file mode 100644 index 0000000000..0e92e91b8d --- /dev/null +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/he.json @@ -0,0 +1,67 @@ +{ + "culture": "he", + "texts": { + "Languages": "שפות", + "AreYouSure": "האם להמשיך?", + "Cancel": "ביטול", + "Clear": "ניקוי", + "Yes": "כן", + "No": "לא", + "Ok": "אישור", + "Close": "סגירה", + "Save": "שמירה", + "SavingWithThreeDot": "שומר...", + "Actions": "פעולות", + "Delete": "מחיקה", + "CreatedSuccessfully": "נוצר בהצלחה", + "SavedSuccessfully": "נשמר בהצלחה", + "DeletedSuccessfully": "נמחק בהצלחה", + "Edit": "עריכה", + "Refresh": "רענון", + "Language": "שפה", + "LoadMore": "טעינת פריטים נוספים", + "ProcessingWithThreeDot": "מעבד...", + "LoadingWithThreeDot": "טוען...", + "Welcome": "ברוכים הבאים", + "Login": "כניסה", + "Register": "הרשמה", + "Logout": "יציאה", + "Submit": "שליחה", + "Back": "חזרה", + "PagerSearch": "חיפוש", + "PagerNext": "הבא", + "PagerPrevious": "הקודם", + "PagerFirst": "ראשון", + "PagerLast": "אחרון", + "PagerInfo": "מציג _START_ עד _END_ מתוך _TOTAL_ רשומות", + "PagerInfo{0}{1}{2}": "מציג {0} עד {1} מתוך {2} רשומות", + "PagerInfoEmpty": "מציג 0 עד 0 מתוך 0 רשומות", + "PagerInfoFiltered": "(מסונן מתוך _MAX_ רשומות)", + "NoDataAvailableInDatatable": "אין נתונים להצגה", + "ErrorLoadingDatatable": "אירעה שגיאה במהלך הבקשה. הפרטים מופיעים בהודעה.", + "Total": "סך הכול", + "Selected": "נבחרו", + "PagerShowMenuEntries": "הצגת _MENU_ רשומות", + "DatatableActionDropdownDefaultText": "פעולות", + "ChangePassword": "שינוי סיסמה", + "PersonalInfo": "הפרופיל שלי", + "AreYouSureYouWantToCancelEditingWarningMessage": "יש שינויים שלא נשמרו.", + "GoHomePage": "מעבר לדף הבית", + "GoBack": "חזרה", + "Search": "חיפוש", + "ItemWillBeDeletedMessageWithFormat": "{0} יימחק!", + "ItemWillBeDeletedMessage": "הפריט יימחק!", + "ManageYourAccount": "ניהול החשבון", + "OthersGroup": "אחר", + "Today": "היום", + "Apply": "החלה", + "InternetConnectionInfo": "לא ניתן היה לבצע את הפעולה. אין כרגע חיבור לאינטרנט.", + "CopiedToTheClipboard": "הועתק ללוח", + "AddNew": "הוספה", + "ProfilePicture": "תמונת פרופיל", + "Theme": "ערכת עיצוב", + "NotAssigned": "לא שויך", + "EntityActionsDisabledTooltip": "אין לך הרשאה לבצע אף פעולה.", + "ResourcePermissions": "הרשאות" + } +} diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/pt.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/pt.json index d297cb0d97..d8395ae1cd 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/pt.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/pt.json @@ -58,7 +58,7 @@ "InternetConnectionInfo": "Não foi possível realizar a operação. A sua ligação à Internet não está disponível de momento.", "CopiedToTheClipboard": "Copiado para a área de transferência", "AddNew": "Adicionar novo", - "ProfilePicture": "Fotografia de perfil", + "ProfilePicture": "Imagem de perfil", "Theme": "Tema", "NotAssigned": "Não atribuído", "EntityActionsDisabledTooltip": "Não tem permissão para realizar qualquer ação.", diff --git a/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj b/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj index b18d09d484..d5aef23a43 100644 --- a/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj +++ b/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.UI diff --git a/framework/src/Volo.Abp.Uow/Volo.Abp.Uow.csproj b/framework/src/Volo.Abp.Uow/Volo.Abp.Uow.csproj index 9b35b0cd7c..888e521429 100644 --- a/framework/src/Volo.Abp.Uow/Volo.Abp.Uow.csproj +++ b/framework/src/Volo.Abp.Uow/Volo.Abp.Uow.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Uow diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManager.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManager.cs index 970f7030ca..3ce638df72 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManager.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManager.cs @@ -71,7 +71,8 @@ public class UnitOfWorkManager : IUnitOfWorkManager, ISingletonDependency var uow = _ambientUnitOfWork.UnitOfWork; //Find reserved unit of work starting from current and going to outers - while (uow != null && !uow.IsReservedFor(reservationName)) + //A reservation that has ended can still be the ambient one for the code that outlives it + while (uow != null && (!uow.IsReservedFor(reservationName) || uow.IsCompleted || uow.IsDisposed)) { uow = uow.Outer; } diff --git a/framework/src/Volo.Abp.Validation.Abstractions/Volo.Abp.Validation.Abstractions.csproj b/framework/src/Volo.Abp.Validation.Abstractions/Volo.Abp.Validation.Abstractions.csproj index a31e1c043a..04865df943 100644 --- a/framework/src/Volo.Abp.Validation.Abstractions/Volo.Abp.Validation.Abstractions.csproj +++ b/framework/src/Volo.Abp.Validation.Abstractions/Volo.Abp.Validation.Abstractions.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Validation.Abstractions diff --git a/framework/src/Volo.Abp.Validation/Volo.Abp.Validation.csproj b/framework/src/Volo.Abp.Validation/Volo.Abp.Validation.csproj index 2caf43a9da..0e5da8bd3a 100644 --- a/framework/src/Volo.Abp.Validation/Volo.Abp.Validation.csproj +++ b/framework/src/Volo.Abp.Validation/Volo.Abp.Validation.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.Validation diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/DataAnnotationObjectValidationContributor.cs b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/DataAnnotationObjectValidationContributor.cs index 90afe4d60e..011b875e9b 100644 --- a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/DataAnnotationObjectValidationContributor.cs +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/DataAnnotationObjectValidationContributor.cs @@ -1,9 +1,11 @@ using System; using System.Collections; +using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; +using System.Reflection; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; @@ -29,6 +31,12 @@ public class DataAnnotationObjectValidationContributor : IObjectValidationContri public Task AddErrorsAsync(ObjectValidationContext context) { +#if NET11_0_OR_GREATER + if (!OverridesOnlySynchronousWalk(GetType())) + { + return ValidateObjectRecursivelyAsync(context.Errors, context.ValidatingObject, currentDepth: 1); + } +#endif ValidateObjectRecursively(context.Errors, context.ValidatingObject, currentDepth: 1); return Task.CompletedTask; } @@ -133,4 +141,147 @@ public class DataAnnotationObjectValidationContributor : IObjectValidationContri } } } + +#if NET11_0_OR_GREATER + private static readonly ConcurrentDictionary OverridesOnlySynchronousWalkCache = new(); + + /* A contributor written before the asynchronous walk existed customizes ValidateObjectRecursively; keep + * calling it, as the asynchronous walk would skip the override without any error. */ + private static bool OverridesOnlySynchronousWalk(Type contributorType) + { + return OverridesOnlySynchronousWalkCache.GetOrAdd(contributorType, type => + GetWalkDeclaringType(type, nameof(ValidateObjectRecursively)) != typeof(DataAnnotationObjectValidationContributor) && + GetWalkDeclaringType(type, nameof(ValidateObjectRecursivelyAsync)) == typeof(DataAnnotationObjectValidationContributor)); + } + + private static Type? GetWalkDeclaringType(Type type, string methodName) + { + return type.GetMethod( + methodName, + BindingFlags.Instance | BindingFlags.NonPublic, + [typeof(List), typeof(object), typeof(int)] + )?.DeclaringType; + } + + /* Mirrors the synchronous walk above. Attributes deriving from AsyncValidationAttribute and + * objects implementing IAsyncValidatableObject only produce results when awaited, so the + * synchronous path either throws or silently validates nothing for them. */ + protected virtual async Task ValidateObjectRecursivelyAsync(List errors, object? validatingObject, int currentDepth) + { + if (currentDepth > MaxRecursiveParameterValidationDepth) + { + return; + } + + if (validatingObject == null) + { + return; + } + + await AddErrorsAsync(errors, validatingObject); + + //Validate items of enumerable + if (validatingObject is IEnumerable enumerable) + { + if (!(enumerable is IQueryable)) + { + foreach (var item in enumerable) + { + //Do not recursively validate for primitive objects + if (item == null || TypeHelper.IsPrimitiveExtended(item.GetType())) + { + break; + } + + await ValidateObjectRecursivelyAsync(errors, item, currentDepth + 1); + } + } + + return; + } + + var validatingObjectType = validatingObject.GetType(); + + //Do not recursively validate for primitive objects + if (TypeHelper.IsPrimitiveExtended(validatingObjectType)) + { + return; + } + + if (Options.IgnoredTypes.Any(t => t.IsInstanceOfType(validatingObject))) + { + return; + } + + var properties = TypeDescriptor.GetProperties(validatingObject).Cast(); + foreach (var property in properties) + { + if (property.Attributes.OfType().Any()) + { + continue; + } + + await ValidateObjectRecursivelyAsync(errors, property.GetValue(validatingObject), currentDepth + 1); + } + } + + public virtual async Task AddErrorsAsync(List errors, object validatingObject) + { + var properties = TypeDescriptor.GetProperties(validatingObject).Cast(); + + foreach (var property in properties) + { + await AddPropertyErrorsAsync(validatingObject, property, errors); + } + + /* IAsyncValidatableObject extends IValidatableObject, so the asynchronous overload has to win + * to avoid running the object twice and to avoid the synchronous Validate that such a type is + * expected to throw from. */ + if (validatingObject is IAsyncValidatableObject asyncValidatableObject) + { + await foreach (var result in asyncValidatableObject.ValidateAsync(new ValidationContext(asyncValidatableObject, ServiceProvider, null))) + { + errors.Add(result); + } + } + else if (validatingObject is IValidatableObject validatableObject) + { + errors.AddRange( + validatableObject.Validate(new ValidationContext(validatableObject, ServiceProvider, null)) + ); + } + } + + protected virtual async Task AddPropertyErrorsAsync(object validatingObject, PropertyDescriptor property, List errors) + { + var validationAttributes = property.Attributes.OfType().ToArray(); + if (validationAttributes.IsNullOrEmpty()) + { + return; + } + + // Without an asynchronous attribute the property validates as before, so an AddPropertyErrors override still runs. + if (!validationAttributes.OfType().Any()) + { + AddPropertyErrors(validatingObject, property, errors); + return; + } + + var validationContext = new ValidationContext(validatingObject, ServiceProvider, null) + { + DisplayName = property.DisplayName, + MemberName = property.Name + }; + + var attributeValidationResultProvider = ServiceProvider.GetRequiredService(); + foreach (var attribute in validationAttributes) + { + var result = await attributeValidationResultProvider.GetOrDefaultAsync(attribute, property.GetValue(validatingObject), validationContext); + if (result != null) + { + errors.Add(result); + } + } + } +#endif } diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/DefaultAttributeValidationResultProvider.cs b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/DefaultAttributeValidationResultProvider.cs index ced3615d04..1b3a821b72 100644 --- a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/DefaultAttributeValidationResultProvider.cs +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/DefaultAttributeValidationResultProvider.cs @@ -1,5 +1,9 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using Volo.Abp.DependencyInjection; +#if NET11_0_OR_GREATER +using System.Threading; +using System.Threading.Tasks; +#endif namespace Volo.Abp.Validation; @@ -9,4 +13,20 @@ public class DefaultAttributeValidationResultProvider : IAttributeValidationResu { return validationAttribute.GetValidationResult(validatingObject, validationContext); } + +#if NET11_0_OR_GREATER + public virtual Task GetOrDefaultAsync( + ValidationAttribute validationAttribute, + object? validatingObject, + ValidationContext validationContext, + CancellationToken cancellationToken = default) + { + if (validationAttribute is AsyncValidationAttribute asyncValidationAttribute) + { + return asyncValidationAttribute.GetValidationResultAsync(validatingObject, validationContext, cancellationToken); + } + + return Task.FromResult(GetOrDefault(validationAttribute, validatingObject, validationContext)); + } +#endif } diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/IAttributeValidationResultProvider.cs b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/IAttributeValidationResultProvider.cs index 5cc919b967..aaa1f49d80 100644 --- a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/IAttributeValidationResultProvider.cs +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/IAttributeValidationResultProvider.cs @@ -1,8 +1,26 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; +#if NET11_0_OR_GREATER +using System.Threading; +using System.Threading.Tasks; +#endif namespace Volo.Abp.Validation; public interface IAttributeValidationResultProvider { ValidationResult? GetOrDefault(ValidationAttribute validationAttribute, object? validatingObject, ValidationContext validationContext); + +#if NET11_0_OR_GREATER + /* AsyncValidationAttribute seals IsValid and routes it through the synchronous overload, which + * attributes that only validate asynchronously are expected to throw from. They have to be + * awaited here instead. The default implementation keeps existing providers working. */ + Task GetOrDefaultAsync( + ValidationAttribute validationAttribute, + object? validatingObject, + ValidationContext validationContext, + CancellationToken cancellationToken = default) + { + return Task.FromResult(GetOrDefault(validationAttribute, validatingObject, validationContext)); + } +#endif } diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/he.json b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/he.json new file mode 100644 index 0000000000..6ef1117dae --- /dev/null +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/he.json @@ -0,0 +1,39 @@ +{ + "culture": "he", + "texts": { + "'{0}' and '{1}' do not match.": "'{0}' ו-'{1}' אינם תואמים.", + "The {0} field is not a valid credit card number.": "השדה {0} אינו מספר כרטיס אשראי תקין.", + "{0} is not valid.": "{0} אינו תקין.", + "The {0} field is not a valid e-mail address.": "השדה {0} אינו כתובת אימייל תקינה.", + "The {0} field only accepts files with the following extensions: {1}": "השדה {0} מקבל רק קבצים עם הסיומות הבאות: {1}", + "The field {0} must be a string or array type with a maximum length of '{1}'.": "השדה {0} חייב להיות מחרוזת או מערך באורך מרבי של '{1}'.", + "The field {0} must be a string or array type with a minimum length of '{1}'.": "השדה {0} חייב להיות מחרוזת או מערך באורך מינימלי של '{1}'.", + "The {0} field is not a valid phone number.": "השדה {0} אינו מספר טלפון תקין.", + "The field {0} must be between {1} and {2}.": "השדה {0} חייב להיות בין {1} ל-{2}.", + "The field {0} must match the regular expression '{1}'.": "השדה {0} אינו בפורמט הנדרש.", + "The {0} field is required.": "השדה {0} הוא שדה חובה.", + "The field {0} must be a string with a maximum length of {1}.": "השדה {0} חייב להיות מחרוזת באורך מרבי של {1}.", + "The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.": "השדה {0} חייב להיות מחרוזת באורך של {2} תווים לפחות ו-{1} תווים לכל היותר.", + "The {0} field is not a valid fully-qualified http, https, or ftp URL.": "השדה {0} אינו כתובת URL מלאה ותקינה מסוג http, https או ftp.", + "The field {0} is invalid.": "השדה {0} אינו תקין.", + "The value '{0}' is invalid.": "הערך '{0}' אינו תקין.", + "The field {0} must be a number.": "השדה {0} חייב להיות מספר.", + "The field must be a number.": "השדה חייב להיות מספר.", + "ThisFieldIsNotAValidCreditCardNumber.": "שדה זה אינו מספר כרטיס אשראי תקין.", + "ThisFieldIsNotValid.": "שדה זה אינו תקין.", + "ThisFieldIsNotAValidEmailAddress.": "שדה זה אינו כתובת אימייל תקינה.", + "ThisFieldOnlyAcceptsFilesWithTheFollowingExtensions:{0}": "שדה זה מקבל רק קבצים עם הסיומות הבאות: {0}", + "ThisFieldMustBeAStringOrArrayTypeWithAMaximumLengthOf{0}": "שדה זה יכול להכיל '{0}' תווים לכל היותר.", + "ThisFieldMustBeAStringOrArrayTypeWithAMinimumLengthOf{0}": "שדה זה חייב להכיל '{0}' תווים לפחות.", + "ThisFieldIsNotAValidPhoneNumber.": "שדה זה אינו מספר טלפון תקין.", + "ThisFieldMustBeBetween{0}And{1}": "ערך השדה חייב להיות בין {0} ל-{1}.", + "ThisFieldMustBeGreaterThanOrEqual{0}": "ערך השדה חייב להיות גדול מ-{0} או שווה לו.", + "ThisFieldMustBeLessOrEqual{0}": "ערך השדה חייב להיות קטן מ-{0} או שווה לו.", + "ThisFieldMustMatchTheRegularExpression{0}": "שדה זה חייב להתאים לביטוי הרגולרי '{0}'.", + "ThisFieldIsRequired.": "זהו שדה חובה.", + "ThisFieldMustBeAStringWithAMaximumLengthOf{0}": "שדה זה יכול להכיל '{0}' תווים לכל היותר.", + "ThisFieldMustBeAStringWithAMinimumLengthOf{1}AndAMaximumLengthOf{0}": "שדה זה חייב להכיל {1} תווים לפחות ו-{0} תווים לכל היותר.", + "ThisFieldIsNotAValidFullyQualifiedHttpHttpsOrFtpUrl": "שדה זה אינו כתובת URL מלאה ותקינה מסוג http, https או ftp.", + "ThisFieldIsInvalid.": "שדה זה אינו תקין." + } +} diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj b/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj index 837aea7b8c..2e547f2bb7 100644 --- a/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj +++ b/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 enable Nullable Volo.Abp.VirtualFileSystem diff --git a/framework/src/Volo.Abp/Volo.Abp.csproj b/framework/src/Volo.Abp/Volo.Abp.csproj index b127dfc1db..2fc718d14d 100644 --- a/framework/src/Volo.Abp/Volo.Abp.csproj +++ b/framework/src/Volo.Abp/Volo.Abp.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Abp Volo.Abp $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/test/AbpTestBase/AbpTestBase.csproj b/framework/test/AbpTestBase/AbpTestBase.csproj index 5079da91df..b3938f6e63 100644 --- a/framework/test/AbpTestBase/AbpTestBase.csproj +++ b/framework/test/AbpTestBase/AbpTestBase.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 AbpTestBase AbpTestBase diff --git a/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj b/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj index 7d4d822502..9e9ccb6f69 100644 --- a/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj +++ b/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.AI.Tests/Volo.Abp.AI.Tests.csproj b/framework/test/Volo.Abp.AI.Tests/Volo.Abp.AI.Tests.csproj index c67a9b8a0d..4cacf458e6 100644 --- a/framework/test/Volo.Abp.AI.Tests/Volo.Abp.AI.Tests.csproj +++ b/framework/test/Volo.Abp.AI.Tests/Volo.Abp.AI.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.AI.Tests Volo.Abp.AI.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj index 9710a18bd6..6f3fd942de 100644 --- a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 latest Volo.Abp.AspNetCore.Authentication.OAuth.Tests Volo.Abp.AspNetCore.Authentication.OAuth.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo.Abp.AspNetCore.Components.Server.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo.Abp.AspNetCore.Components.Server.Tests.csproj new file mode 100644 index 0000000000..08cedd67e5 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo.Abp.AspNetCore.Components.Server.Tests.csproj @@ -0,0 +1,17 @@ + + + + + + net11.0 + + enable + + + + + + + + + diff --git a/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerModule_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerModule_Tests.cs new file mode 100644 index 0000000000..d92c0fad98 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerModule_Tests.cs @@ -0,0 +1,42 @@ +using System.Linq; +using Microsoft.Extensions.Options; +using Shouldly; +using Volo.Abp.AspNetCore.Auditing; +using Volo.Abp.Modularity; +using Volo.Abp.Testing; +using Xunit; + +namespace Volo.Abp.AspNetCore.Components.Server; + +public abstract class AbpAspNetCoreComponentsServerModule_Tests : AbpIntegratedTest + where TStartupModule : IAbpModule +{ + private const string ComponentHubTypeFullName = "Microsoft.AspNetCore.Components.Server.ComponentHub"; + + private readonly AbpAspNetCoreAuditingOptions _auditingOptions; + + protected AbpAspNetCoreComponentsServerModule_Tests() + { + _auditingOptions = GetRequiredService>().Value; + } + + [Fact] + public void Should_Only_Ignore_ComponentHub_For_Hub_Auditing() + { + _auditingOptions.IgnoredHubTypes.Single().FullName.ShouldBe(ComponentHubTypeFullName); + } + + [Fact] + public void Should_Ignore_Blazor_Urls_For_Auditing() + { + _auditingOptions.IgnoredUrls.ShouldContain("/_blazor"); + } +} + +public class AbpAspNetCoreComponentsServerModule_BlazorServer_Tests : AbpAspNetCoreComponentsServerModule_Tests +{ +} + +public class AbpAspNetCoreComponentsServerModule_BlazorWebApp_Tests : AbpAspNetCoreComponentsServerModule_Tests +{ +} diff --git a/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerTestModule.cs new file mode 100644 index 0000000000..2905b34e5e --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerTestModule.cs @@ -0,0 +1,8 @@ +using Volo.Abp.Modularity; + +namespace Volo.Abp.AspNetCore.Components.Server; + +[DependsOn(typeof(AbpAspNetCoreComponentsServerModule))] +public class AbpAspNetCoreComponentsServerTestModule : AbpModule +{ +} diff --git a/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerWebAppTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerWebAppTestModule.cs new file mode 100644 index 0000000000..cd385e05de --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Components.Server.Tests/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerWebAppTestModule.cs @@ -0,0 +1,16 @@ +using Volo.Abp.AspNetCore.Components.Web; +using Volo.Abp.Modularity; + +namespace Volo.Abp.AspNetCore.Components.Server; + +[DependsOn(typeof(AbpAspNetCoreComponentsServerModule))] +public class AbpAspNetCoreComponentsServerWebAppTestModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(options => + { + options.IsBlazorWebApp = true; + }); + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests.abppkg b/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests.abppkg new file mode 100644 index 0000000000..64c1552e37 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} diff --git a/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests.csproj new file mode 100644 index 0000000000..8cef47c0ab --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests.csproj @@ -0,0 +1,17 @@ + + + + + + net11.0 + + enable + + + + + + + + + diff --git a/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests/Volo/Abp/AspNetCore/Components/Web/Theming/MudBlazor/Bundling/ComponentBundleUrlBuilder_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests/Volo/Abp/AspNetCore/Components/Web/Theming/MudBlazor/Bundling/ComponentBundleUrlBuilder_Tests.cs new file mode 100644 index 0000000000..8df0f04b9d --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Tests/Volo/Abp/AspNetCore/Components/Web/Theming/MudBlazor/Bundling/ComponentBundleUrlBuilder_Tests.cs @@ -0,0 +1,119 @@ +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Bundling; + +public class ComponentBundleUrlBuilder_Tests +{ + private readonly IComponentBundleUrlBuilder _builder = new ComponentBundleUrlBuilder(); + + [Fact] + public async Task Should_Return_FileName_When_No_PathBase_Available() + { + (await _builder.BuildAsync("/__bundles/Global.css", appBasePath: null, navigationBaseUri: null)) + .ShouldBe("/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Return_FileName_When_NavigationBaseUri_Has_Root_PathBase() + { + (await _builder.BuildAsync("/__bundles/Global.css", appBasePath: null, navigationBaseUri: "https://localhost/")) + .ShouldBe("/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Use_Explicit_AppBasePath_Over_NavigationBaseUri() + { + (await _builder.BuildAsync("/__bundles/Global.css", appBasePath: "/explicit", navigationBaseUri: "https://localhost/from-nav/")) + .ShouldBe("/explicit/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Resolve_PathBase_From_NavigationBaseUri() + { + (await _builder.BuildAsync("/__bundles/Global.css", appBasePath: null, navigationBaseUri: "https://localhost/foo/")) + .ShouldBe("/foo/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Resolve_PathBase_From_NavigationBaseUri_When_AppBasePath_Empty() + { + (await _builder.BuildAsync("/__bundles/Global.css", appBasePath: "", navigationBaseUri: "https://localhost/foo/")) + .ShouldBe("/foo/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Handle_Nested_PathBase() + { + (await _builder.BuildAsync("/__bundles/Global.css", appBasePath: null, navigationBaseUri: "https://localhost/foo/bar/")) + .ShouldBe("/foo/bar/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Normalize_AppBasePath_Without_Trailing_Slash() + { + (await _builder.BuildAsync("/__bundles/Global.css", appBasePath: "/foo", navigationBaseUri: null)) + .ShouldBe("/foo/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Not_Duplicate_Leading_Slash() + { + (await _builder.BuildAsync("/__bundles/Global.css", appBasePath: "/foo/", navigationBaseUri: null)) + .ShouldBe("/foo/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Handle_FileName_Without_Leading_Slash() + { + (await _builder.BuildAsync("__bundles/Global.css", appBasePath: "/foo", navigationBaseUri: null)) + .ShouldBe("/foo/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Return_FileName_When_NavigationBaseUri_Is_Invalid() + { + (await _builder.BuildAsync("/__bundles/Global.css", appBasePath: null, navigationBaseUri: "not-a-uri")) + .ShouldBe("/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Throw_When_FileName_Is_Null() + { + await Should.ThrowAsync(async () => + await _builder.BuildAsync(null!, appBasePath: "/foo", navigationBaseUri: null)); + } + + [Theory] + [InlineData("https://cdn.example.com/foo.css")] + [InlineData("http://cdn.example.com/foo.css")] + [InlineData("//cdn.example.com/foo.css")] + [InlineData("data:text/css;base64,Zm9vIA==")] + public async Task Should_Not_Prefix_External_Urls(string externalUrl) + { + (await _builder.BuildAsync(externalUrl, appBasePath: "/foo", navigationBaseUri: "https://localhost/foo/")) + .ShouldBe(externalUrl); + } + + [Fact] + public async Task Should_Treat_Whitespace_AppBasePath_As_Not_Provided() + { + (await _builder.BuildAsync("/__bundles/Global.css", appBasePath: " ", navigationBaseUri: "https://localhost/foo/")) + .ShouldBe("/foo/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Be_Idempotent_For_Already_Prefixed_FileName() + { + (await _builder.BuildAsync("/foo/__bundles/Global.css", appBasePath: "/foo", navigationBaseUri: null)) + .ShouldBe("/foo/__bundles/Global.css"); + } + + [Fact] + public async Task Should_Be_Idempotent_When_PathBase_Resolved_From_NavigationBaseUri() + { + (await _builder.BuildAsync("/foo/__bundles/Global.css", appBasePath: null, navigationBaseUri: "https://localhost/foo/")) + .ShouldBe("/foo/__bundles/Global.css"); + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.Tests/Volo.Abp.AspNetCore.Components.Web.Theming.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.Tests/Volo.Abp.AspNetCore.Components.Web.Theming.Tests.csproj index 4e317e99ce..f3fd15d31e 100644 --- a/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.Tests/Volo.Abp.AspNetCore.Components.Web.Theming.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.Tests/Volo.Abp.AspNetCore.Components.Web.Theming.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 enable diff --git a/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.Tests/Volo/Abp/AspNetCore/Components/Web/MenuItemUrlHelper_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.Tests/Volo/Abp/AspNetCore/Components/Web/MenuItemUrlHelper_Tests.cs new file mode 100644 index 0000000000..0874819b7d --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Components.Web.Theming.Tests/Volo/Abp/AspNetCore/Components/Web/MenuItemUrlHelper_Tests.cs @@ -0,0 +1,27 @@ +using Shouldly; +using Xunit; + +namespace Volo.Abp.AspNetCore.Components.Web; + +public class MenuItemUrlHelper_Tests +{ + [Theory] + [InlineData("/", "")] + [InlineData("/books", "books")] + [InlineData("~/books", "books")] + [InlineData("books", "books")] + [InlineData("/identity/users?filter=a", "identity/users?filter=a")] + [InlineData("//cdn.example.com/help", "//cdn.example.com/help")] + [InlineData("https://docs.example.com/help", "https://docs.example.com/help")] + [InlineData("mailto:info@example.com", "mailto:info@example.com")] + public void Should_Make_Local_Urls_Relative_To_Base(string url, string expected) + { + MenuItemUrlHelper.ToBaseRelativeUrl(url).ShouldBe(expected); + } + + [Fact] + public void Should_Return_Null_For_Null_Url() + { + MenuItemUrlHelper.ToBaseRelativeUrl(null).ShouldBeNull(); + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj index 24427e10a2..5eb7923d04 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.AspNetCore.MultiTenancy.Tests Volo.Abp.AspNetCore.MultiTenancy.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo.Abp.AspNetCore.Mvc.Client.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo.Abp.AspNetCore.Mvc.Client.Tests.csproj index d1190652a3..9cd6b83505 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo.Abp.AspNetCore.Mvc.Client.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo.Abp.AspNetCore.Mvc.Client.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo/Abp/AspNetCore/Mvc/Client/AbpRemoteDynamicClaimsCookieAuthenticationOptionsExtensions_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo/Abp/AspNetCore/Mvc/Client/AbpRemoteDynamicClaimsCookieAuthenticationOptionsExtensions_Tests.cs index 594d250330..ce38eb3a02 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo/Abp/AspNetCore/Mvc/Client/AbpRemoteDynamicClaimsCookieAuthenticationOptionsExtensions_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo/Abp/AspNetCore/Mvc/Client/AbpRemoteDynamicClaimsCookieAuthenticationOptionsExtensions_Tests.cs @@ -63,6 +63,35 @@ public class AbpRemoteDynamicClaimsCookieAuthenticationOptionsExtensions_Tests : _remoteRefreshResponseHandler.ReceivedAccessTokens.ShouldBeEmpty(); } + [Fact] + public async Task Should_Reject_The_Principal_When_The_Session_Is_Revoked() + { + var userId = Guid.NewGuid(); + var cache = GetRequiredService>(); + // Another session of the user filled the cache. + await cache.SetAsync(AbpDynamicClaimCacheItem.CalculateCacheKey(userId, null), new AbpDynamicClaimCacheItem()); + await cache.SetAsync(AbpDynamicClaimCacheItem.CalculateRevokedSessionCacheKey("session-a"), new AbpDynamicClaimCacheItem()); + + var context = await ValidatePrincipalAsync(userId, sessionId: "session-a"); + + context.Principal.ShouldBeNull(); + _remoteRefreshResponseHandler.ReceivedAccessTokens.ShouldBeEmpty(); + } + + [Fact] + public async Task Should_Keep_The_Principal_Of_Another_Session_When_A_Session_Is_Revoked() + { + var userId = Guid.NewGuid(); + var cache = GetRequiredService>(); + await cache.SetAsync(AbpDynamicClaimCacheItem.CalculateCacheKey(userId, null), new AbpDynamicClaimCacheItem()); + await cache.SetAsync(AbpDynamicClaimCacheItem.CalculateRevokedSessionCacheKey("session-a"), new AbpDynamicClaimCacheItem()); + + var context = await ValidatePrincipalAsync(userId, sessionId: "session-b"); + + context.Principal.ShouldNotBeNull(); + _remoteRefreshResponseHandler.ReceivedAccessTokens.ShouldBeEmpty(); + } + [Fact] public async Task Should_Keep_The_Principal_When_There_Is_No_Access_Token() { @@ -72,13 +101,17 @@ public class AbpRemoteDynamicClaimsCookieAuthenticationOptionsExtensions_Tests : _remoteRefreshResponseHandler.ReceivedAccessTokens.ShouldBeEmpty(); } - private async Task ValidatePrincipalAsync(Guid userId, string accessToken = "test-access-token") + private async Task ValidatePrincipalAsync(Guid userId, string accessToken = "test-access-token", string sessionId = null) { var options = new CookieAuthenticationOptions().ValidateRemoteDynamicClaims(); var identity = new ClaimsIdentity(CookieAuthenticationDefaults.AuthenticationScheme, AbpClaimTypes.UserName, AbpClaimTypes.Role); identity.AddClaim(new Claim(AbpClaimTypes.UserId, userId.ToString())); identity.AddClaim(new Claim(AbpClaimTypes.UserName, "john")); + if (sessionId != null) + { + identity.AddClaim(new Claim(AbpClaimTypes.SessionId, sessionId)); + } var properties = new AuthenticationProperties(); if (accessToken != null) diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributorCacheFailure_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributorCacheFailure_Tests.cs new file mode 100644 index 0000000000..a3b1dbca01 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributorCacheFailure_Tests.cs @@ -0,0 +1,81 @@ +using System; +using System.Security.Claims; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Caching.Distributed; +using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Shouldly; +using Volo.Abp.Caching; +using Volo.Abp.Security.Claims; +using Xunit; + +namespace Volo.Abp.AspNetCore.Mvc.Client; + +public class RemoteDynamicClaimsPrincipalContributorCacheFailure_Tests : AbpAspNetCoreMvcClientTestBase +{ + protected override void AfterAddApplication(IServiceCollection services) + { + services.Replace(ServiceDescriptor.Singleton()); + services.Configure(options => + { + options.IsDynamicClaimsEnabled = true; + }); + } + + [Fact] + public async Task Should_Clear_The_Principal_When_The_Revoked_Sessions_Can_Not_Be_Read() + { + var userId = Guid.NewGuid(); + await GetRequiredService>().SetAsync( + AbpDynamicClaimCacheItem.CalculateCacheKey(userId, null), + new AbpDynamicClaimCacheItem()); + + var identity = new ClaimsIdentity("Bearer", AbpClaimTypes.UserName, AbpClaimTypes.Role); + identity.AddClaim(new Claim(AbpClaimTypes.UserId, userId.ToString())); + identity.AddClaim(new Claim(AbpClaimTypes.SessionId, "session-a")); + var context = new AbpClaimsPrincipalContributorContext(new ClaimsPrincipal(identity), ServiceProvider); + + await GetRequiredService().ContributeAsync(context); + + context.ClaimsPrincipal.Identity!.IsAuthenticated.ShouldBeFalse(); + } + + private class RevokedSessionFailingCache : IDistributedCache + { + private readonly MemoryDistributedCache _cache = new(Microsoft.Extensions.Options.Options.Create(new MemoryDistributedCacheOptions())); + + public byte[] Get(string key) + { + ThrowForRevokedSession(key); + return _cache.Get(key); + } + + public Task GetAsync(string key, CancellationToken token = default) + { + ThrowForRevokedSession(key); + return _cache.GetAsync(key, token); + } + + public void Set(string key, byte[] value, DistributedCacheEntryOptions options) => _cache.Set(key, value, options); + + public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default) => _cache.SetAsync(key, value, options, token); + + public void Refresh(string key) => _cache.Refresh(key); + + public Task RefreshAsync(string key, CancellationToken token = default) => _cache.RefreshAsync(key, token); + + public void Remove(string key) => _cache.Remove(key); + + public Task RemoveAsync(string key, CancellationToken token = default) => _cache.RemoveAsync(key, token); + + private static void ThrowForRevokedSession(string key) + { + if (key.Contains("revoked-session:")) + { + throw new InvalidOperationException("The cache is not available."); + } + } + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributor_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributor_Tests.cs new file mode 100644 index 0000000000..2831e5aa8a --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Client.Tests/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributor_Tests.cs @@ -0,0 +1,85 @@ +using System; +using System.Security.Claims; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.Caching; +using Volo.Abp.Security.Claims; +using Xunit; + +namespace Volo.Abp.AspNetCore.Mvc.Client; + +public class RemoteDynamicClaimsPrincipalContributor_Tests : AbpAspNetCoreMvcClientTestBase +{ + protected override void AfterAddApplication(IServiceCollection services) + { + services.Configure(options => + { + options.IsDynamicClaimsEnabled = true; + }); + } + + [Fact] + public async Task Should_Clear_The_Principal_When_The_Session_Is_Revoked() + { + var userId = await CacheUserAsync(); + await RevokeSessionAsync("session-a"); + + var principal = await ContributeAsync(userId, "session-a"); + + principal.Identity!.IsAuthenticated.ShouldBeFalse(); + } + + [Fact] + public async Task Should_Keep_The_Principal_Of_Another_Session() + { + var userId = await CacheUserAsync(); + await RevokeSessionAsync("session-a"); + + var principal = await ContributeAsync(userId, "session-b"); + + principal.Identity!.IsAuthenticated.ShouldBeTrue(); + principal.FindFirst(AbpClaimTypes.UserName)!.Value.ShouldBe("john"); + } + + [Fact] + public async Task Should_Keep_The_Principal_Without_A_Session_Id() + { + var userId = await CacheUserAsync(); + + var principal = await ContributeAsync(userId, sessionId: null); + + principal.Identity!.IsAuthenticated.ShouldBeTrue(); + } + + private async Task CacheUserAsync() + { + var userId = Guid.NewGuid(); + await GetRequiredService>().SetAsync( + AbpDynamicClaimCacheItem.CalculateCacheKey(userId, null), + new AbpDynamicClaimCacheItem(new() { new AbpDynamicClaim(AbpClaimTypes.UserName, "john") })); + return userId; + } + + private Task RevokeSessionAsync(string sessionId) + { + return GetRequiredService>().SetAsync( + AbpDynamicClaimCacheItem.CalculateRevokedSessionCacheKey(sessionId), + new AbpDynamicClaimCacheItem()); + } + + private async Task ContributeAsync(Guid userId, string sessionId) + { + var identity = new ClaimsIdentity("Bearer", AbpClaimTypes.UserName, AbpClaimTypes.Role); + identity.AddClaim(new Claim(AbpClaimTypes.UserId, userId.ToString())); + identity.AddClaim(new Claim(AbpClaimTypes.UserName, "john")); + if (sessionId != null) + { + identity.AddClaim(new Claim(AbpClaimTypes.SessionId, sessionId)); + } + + var context = new AbpClaimsPrincipalContributorContext(new ClaimsPrincipal(identity), ServiceProvider); + await GetRequiredService().ContributeAsync(context); + return context.ClaimsPrincipal; + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.PlugIn/Volo.Abp.AspNetCore.Mvc.PlugIn.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.PlugIn/Volo.Abp.AspNetCore.Mvc.PlugIn.csproj index b2cee9ad65..22821c8f59 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.PlugIn/Volo.Abp.AspNetCore.Mvc.PlugIn.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.PlugIn/Volo.Abp.AspNetCore.Mvc.PlugIn.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Library true true diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj index 7eb833e09a..01ae985bde 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; Volo.Abp.AspNetCore.Mvc.Tests Volo.Abp.AspNetCore.Mvc.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Program.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Program.cs index 48f32590be..457c25f230 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Program.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Program.cs @@ -25,9 +25,9 @@ await builder.RunAbpModuleAsync(options => if (parentDirectory.Name == "test") { #if DEBUG - plugDllInPath = Path.Combine(parentDirectory.FullName, "Volo.Abp.AspNetCore.Mvc.PlugIn", "bin", "Debug", "net10.0"); + plugDllInPath = Path.Combine(parentDirectory.FullName, "Volo.Abp.AspNetCore.Mvc.PlugIn", "bin", "Debug", "net11.0"); #else - plugDllInPath = Path.Combine(parentDirectory.FullName, "Volo.Abp.AspNetCore.Mvc.PlugIn", "bin", "Release", "net10.0"); + plugDllInPath = Path.Combine(parentDirectory.FullName, "Volo.Abp.AspNetCore.Mvc.PlugIn", "bin", "Release", "net11.0"); #endif break; } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Exception_Rollback_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Exception_Rollback_Tests.cs index d959db1632..66dabb75cd 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Exception_Rollback_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Exception_Rollback_Tests.cs @@ -3,7 +3,9 @@ using System.Net; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Options; using Shouldly; +using Volo.Abp.AspNetCore.Uow; using Volo.Abp.Http; using Volo.Abp.Json; using Volo.Abp.Uow; @@ -40,4 +42,18 @@ public class UnitOfWorkMiddleware_Exception_Rollback_Tests : AspNetCoreMvcTestBa result.Error.ShouldNotBeNull(); result.Error.Message.ShouldBe(TestUnitOfWorkConfig.ExceptionOnCompleteMessage); } + + [Fact] + public async Task Should_Return_The_Error_When_Completing_Fails_After_An_Object_Result_Without_The_Middleware() + { + const string url = "/api/unitofwork-test/ObjectResultExceptionOnComplete"; + + // The request runs as if the pipeline only had app.UseAbpExceptionHandling(). + ServiceProvider.GetRequiredService>().Value.IgnoredUrls.Add(url); + + var result = await GetResponseAsObjectAsync(url, HttpStatusCode.Forbidden); + + result.Error.ShouldNotBeNull(); + result.Error.Message.ShouldBe(TestUnitOfWorkConfig.ExceptionOnCompleteMessage); + } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkTestController.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkTestController.cs index 77cf3f07b4..58227e855a 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkTestController.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkTestController.cs @@ -74,6 +74,15 @@ public class UnitOfWorkTestController : AbpController _testUnitOfWorkConfig.ThrowExceptionOnComplete = true; } + [HttpGet] + [Route("ObjectResultExceptionOnComplete")] + public object ObjectResultExceptionOnComplete() + { + _testUnitOfWorkConfig.ThrowExceptionOnComplete = true; + + return new { Value = 42 }; + } + [HttpGet] [Route("CommitBeforeResponseFlush")] public async Task CommitBeforeResponseFlush() diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj index 654b6b0d0c..a142ec015e 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; Volo.Abp.AspNetCore.Mvc.UI.Tests Volo.Abp.AspNetCore.Mvc.UI.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService_ExternalFile_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService_ExternalFile_Tests.cs new file mode 100644 index 0000000000..de8ef9aa0c --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService_ExternalFile_Tests.cs @@ -0,0 +1,125 @@ +#nullable enable + +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc.Abstractions; +using Microsoft.AspNetCore.Mvc.Rendering; +using Microsoft.AspNetCore.Mvc.Routing; +using Microsoft.AspNetCore.Razor.TagHelpers; +using Microsoft.AspNetCore.Routing; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using Shouldly; +using Volo.Abp.AspNetCore.Security; +using Xunit; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers; + +public class AbpTagHelperResourceService_ExternalFile_Tests +{ + [Theory] + [InlineData("/themes/basic/googlefonts.css", "", "/themes/basic/googlefonts.css")] + [InlineData("/themes/basic/googlefonts.css", "/foo", "/foo/themes/basic/googlefonts.css")] + [InlineData("~/themes/basic/googlefonts.css", "/foo", "/foo/themes/basic/googlefonts.css")] + [InlineData("/themes/basic/googlefonts.css", "/foo/bar", "/foo/bar/themes/basic/googlefonts.css")] + [InlineData("https://fonts.googleapis.com/css2?family=Lexend", "/foo", "https://fonts.googleapis.com/css2?family=Lexend")] + [InlineData("//cdn.example.com/foo.css", "/foo", "//cdn.example.com/foo.css")] + [InlineData("main.css", "/foo", "main.css")] + [InlineData("/foo/themes/basic/googlefonts.css", "/foo", "/foo/themes/basic/googlefonts.css")] + [InlineData("/foo/bar/themes/basic/googlefonts.css", "/foo/bar", "/foo/bar/themes/basic/googlefonts.css")] + [InlineData("/foo/themes/basic/googlefonts.css?v=1", "/foo", "/foo/themes/basic/googlefonts.css?v=1")] + [InlineData("/foobar/themes/basic/googlefonts.css", "/foo", "/foo/foobar/themes/basic/googlefonts.css")] + [InlineData("~/themes/basic/googlefonts.css", "", "/themes/basic/googlefonts.css")] + [InlineData("~/themes/basic/googlefonts.css", "/themes", "/themes/themes/basic/googlefonts.css")] + [InlineData("~/themes/basic/googlefonts.css", "/themes/basic", "/themes/basic/themes/basic/googlefonts.css")] + public void Style_Should_Resolve_Local_External_File_With_PathBase(string fileName, string pathBase, string expected) + { + var service = new TestStyleService(); + + var output = CreateOutput(); + service.AddTag(CreateViewContext(pathBase), output, new BundleFile(fileName, true)); + + output.Content.GetContent().ShouldContain($"href=\"{expected}\""); + } + + [Theory] + [InlineData("/libs/external.js", "", "/libs/external.js")] + [InlineData("/libs/external.js", "/foo", "/foo/libs/external.js")] + [InlineData("~/libs/external.js", "/foo", "/foo/libs/external.js")] + [InlineData("https://cdn.example.com/external.js", "/foo", "https://cdn.example.com/external.js")] + [InlineData("//cdn.example.com/external.js", "/foo", "//cdn.example.com/external.js")] + [InlineData("/foo/libs/external.js", "/foo", "/foo/libs/external.js")] + [InlineData("/foo/bar/libs/external.js", "/foo/bar", "/foo/bar/libs/external.js")] + [InlineData("/foobar/libs/external.js", "/foo", "/foo/foobar/libs/external.js")] + public void Script_Should_Resolve_Local_External_File_With_PathBase(string fileName, string pathBase, string expected) + { + var service = new TestScriptService(); + + var output = CreateOutput(); + service.AddTag(CreateViewContext(pathBase), output, new BundleFile(fileName, true)); + + output.Content.GetContent().ShouldContain($"src=\"{expected}\""); + } + + private static ViewContext CreateViewContext(string pathBase) + { + var httpContext = new DefaultHttpContext + { + RequestServices = new ServiceCollection() + .AddSingleton() + .BuildServiceProvider() + }; + httpContext.Request.PathBase = new PathString(pathBase); + + return new ViewContext + { + HttpContext = httpContext, + RouteData = new RouteData(), + ActionDescriptor = new ActionDescriptor() + }; + } + + private static TagHelperOutput CreateOutput() + { + return new TagHelperOutput( + "abp-test", + new TagHelperAttributeList(), + (_, _) => Task.FromResult(new DefaultTagHelperContent())); + } + + private static TagHelperContext CreateContext() + { + return new TagHelperContext(new TagHelperAttributeList(), new Dictionary(), "test"); + } + + private class TestTagHelper : TagHelper + { + } + + private class TestStyleService : AbpTagHelperStyleService + { + public TestStyleService() + : base(null!, Microsoft.Extensions.Options.Options.Create(new AbpBundlingOptions()), null!, Microsoft.Extensions.Options.Options.Create(new AbpSecurityHeadersOptions())) + { + } + + public void AddTag(ViewContext viewContext, TagHelperOutput output, BundleFile file) + { + AddHtmlTag(viewContext, new TestTagHelper(), CreateContext(), output, file, null); + } + } + + private class TestScriptService : AbpTagHelperScriptService + { + public TestScriptService() + : base(null!, Microsoft.Extensions.Options.Options.Create(new AbpBundlingOptions()), null!) + { + } + + public void AddTag(ViewContext viewContext, TagHelperOutput output, BundleFile file) + { + AddHtmlTag(viewContext, new TestTagHelper(), CreateContext(), output, file, null); + } + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests.csproj index 56379f10a3..c6a3c52dd3 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj index 0626fbc0b1..54c2a87ab5 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; Volo.Abp.AspNetCore.Mvc.Versioning.Tests Volo.Abp.AspNetCore.Mvc.Versioning.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj index cc5f18f77e..ad15b558c3 100644 --- a/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.AspNetCore.Serilog.Tests Volo.Abp.AspNetCore.Serilog.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo.Abp.AspNetCore.SignalR.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo.Abp.AspNetCore.SignalR.Tests.csproj index e47ff0d502..dac8dc7a89 100644 --- a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo.Abp.AspNetCore.SignalR.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo.Abp.AspNetCore.SignalR.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 @@ -14,6 +14,7 @@ + diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/AbpAspNetCoreSignalRTestModule.cs b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/AbpAspNetCoreSignalRTestModule.cs index f0c056c784..4eb3d44f2a 100644 --- a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/AbpAspNetCoreSignalRTestModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/AbpAspNetCoreSignalRTestModule.cs @@ -1,30 +1,105 @@ using System; using Microsoft.AspNetCore.Builder; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AspNetCore.Auditing; +using Volo.Abp.AspNetCore.SignalR.Auditing.TestApp; +using Volo.Abp.AspNetCore.SignalR.SampleHubs; using Volo.Abp.AspNetCore.TestBase; +using Volo.Abp.Auditing; using Volo.Abp.Autofac; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Sqlite; using Volo.Abp.Modularity; +using Volo.Abp.Uow; namespace Volo.Abp.AspNetCore.SignalR; [DependsOn( typeof(AbpAspNetCoreSignalRModule), typeof(AbpAspNetCoreTestBaseModule), - typeof(AbpAutofacModule) + typeof(AbpAutofacModule), + typeof(AbpEntityFrameworkCoreSqliteModule) )] public class AbpAspNetCoreSignalRTestModule : AbpModule { + public const string UnitOfWorkReservedHeaderName = "X-Unit-Of-Work-Reserved"; + + public const string AuditScopeStartedHeaderName = "X-Audit-Scope-Started"; + public static Exception UseConfiguredEndpointsException { get; set; } + private AbpUnitTestSqliteDatabase _database; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(options => + { + options.AddDefaultRepositories(includeAllEntities: true); + }); + + _database = new AbpUnitTestSqliteDatabase(); + _database.CreateTables(new SignalRAuditingTestDbContext( + new DbContextOptionsBuilder() + .UseSqlite(_database.ConnectionString) + .AddAbpDbContextOptionsExtension() + .Options)); + + Configure(options => + { + options.ConnectionStrings.Default = _database.ConnectionString; + }); + + Configure(options => + { + options.Configure(configurationContext => + { + configurationContext.UseSqlite(); + }); + }); + + Configure(options => + { + options.IgnoredHubTypes.Add(typeof(IgnoredAuditingHub)); + }); + + Configure(options => + { + options.EntityHistorySelectors.Add(new NamedTypeSelector(nameof(AuditedNote), type => type == typeof(AuditedNote))); + }); + } + + public override void OnApplicationShutdown(ApplicationShutdownContext context) + { + _database?.Dispose(); + } + public override void OnApplicationInitialization(ApplicationInitializationContext context) { var app = context.GetApplicationBuilder(); app.UseRouting(); + app.UseUnitOfWork(); + app.UseAuditing(); + app.Use(async (httpContext, next) => + { + httpContext.Response.Headers[UnitOfWorkReservedHeaderName] = + (httpContext.RequestServices.GetRequiredService().UnitOfWork?.IsReserved == true).ToString(); + httpContext.Response.Headers[AuditScopeStartedHeaderName] = + (httpContext.RequestServices.GetRequiredService().Current != null).ToString(); + + await next(); + }); UseConfiguredEndpointsException = null; try { - app.UseConfiguredEndpoints(); + app.UseConfiguredEndpoints(endpoints => + { + endpoints.MapHub("/manually-mapped-hub"); + endpoints.MapHub("/ignored-auditing-hub"); + }); } catch (Exception e) { diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/AbpSignalRUnitOfWork_Tests.cs b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/AbpSignalRUnitOfWork_Tests.cs new file mode 100644 index 0000000000..a6c9e5d553 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/AbpSignalRUnitOfWork_Tests.cs @@ -0,0 +1,38 @@ +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace Volo.Abp.AspNetCore.SignalR; + +public class AbpSignalRUnitOfWork_Tests : AbpAspNetCoreTestBase +{ + [Theory] + [InlineData("/signalr-hubs/regular-abp/negotiate?negotiateVersion=1")] + [InlineData("/custom-route-hub/negotiate?negotiateVersion=1")] + [InlineData("/manually-mapped-hub/negotiate?negotiateVersion=1")] + public async Task Should_Not_Reserve_A_Unit_Of_Work_For_The_Hub_Requests(string url) + { + var response = await Client.PostAsync(url, null); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + IsUnitOfWorkReserved(response).ShouldBeFalse(); + } + + [Theory] + [InlineData("/not-a-hub")] + [InlineData("/custom-route-hub-export")] + public async Task Should_Reserve_A_Unit_Of_Work_For_The_Other_Requests(string url) + { + var response = await Client.GetAsync(url); + + IsUnitOfWorkReserved(response).ShouldBeTrue(); + } + + private static bool IsUnitOfWorkReserved(HttpResponseMessage response) + { + return bool.Parse(response.Headers.GetValues(AbpAspNetCoreSignalRTestModule.UnitOfWorkReservedHeaderName).Single()); + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/AbpAuditHubFilter_Tests.cs b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/AbpAuditHubFilter_Tests.cs new file mode 100644 index 0000000000..02b40f7357 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/AbpAuditHubFilter_Tests.cs @@ -0,0 +1,242 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.SignalR; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using NSubstitute; +using Shouldly; +using Volo.Abp.AspNetCore.Auditing; +using Volo.Abp.AspNetCore.SignalR.Auditing.TestApp; +using Volo.Abp.Auditing; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Uow; +using Xunit; + +namespace Volo.Abp.AspNetCore.SignalR.Auditing; + +[Collection("AbpAspNetCoreSignalR")] +public class AbpAuditHubFilter_Tests : AbpAspNetCoreTestBase +{ + private IAuditingStore _auditingStore; + + public AbpAuditHubFilter_Tests() + { + _auditingStore = GetRequiredService(); + } + + protected override void ConfigureServices(IServiceCollection services) + { + services.Configure(options => + { + options.IgnoredHubTypes.Add(typeof(IgnoredAuditHub)); + }); + + _auditingStore = Substitute.For(); + services.Replace(ServiceDescriptor.Singleton(_auditingStore)); + } + + [Fact] + public async Task Should_Begin_An_Audit_Scope_For_Regular_Hubs() + { + (await HasAuditScopeInHubMethodAsync(new RegularAuditHub())).ShouldBeTrue(); + } + + [Fact] + public async Task Should_Not_Begin_An_Audit_Scope_For_Ignored_Hubs() + { + (await HasAuditScopeInHubMethodAsync(new IgnoredAuditHub())).ShouldBeFalse(); + } + + [Fact] + public async Task Should_Not_Begin_An_Audit_Scope_For_Hubs_Derived_From_Ignored_Hubs() + { + (await HasAuditScopeInHubMethodAsync(new DerivedIgnoredAuditHub())).ShouldBeFalse(); + } + + [Fact] + public async Task Should_Save_The_Hub_Audit_Log_After_A_Regular_Hub_Method_Completes() + { + var noteId = await CreateNoteAsync("old"); + using var scope = GetRequiredService().CreateScope(); + var noteService = scope.ServiceProvider.GetRequiredService(); + + var invocationTask = InvokeHubMethodAsync(scope.ServiceProvider, new RegularAuditHub(), async () => + { + await noteService.UpdateTextAsync(noteId, "new"); + }); + + await Task.Delay(100); + invocationTask.IsCompleted.ShouldBeFalse(); + await _auditingStore.DidNotReceive().SaveAsync(Arg.Any()); + + GetRequiredService().Complete(); + await invocationTask; + + await ShouldHaveSavedTheNoteUpdateAsync(noteId); + } + + [Fact] + public async Task Should_Save_The_Audit_Log_Of_A_Service_That_Completes_After_An_Ignored_Hub_Method_Returns() + { + var noteId = await CreateNoteAsync("old"); + using var scope = GetRequiredService().CreateScope(); + + var serviceTask = await StartServiceInIgnoredHubMethodAsync(scope.ServiceProvider, noteId); + await _auditingStore.DidNotReceive().SaveAsync(Arg.Any()); + + GetRequiredService().Complete(); + await serviceTask; + + await ShouldHaveSavedTheNoteUpdateAsync(noteId); + } + + [Fact] + public async Task Should_Save_The_Entity_Changes_Saved_By_The_Unit_Of_Work_Of_A_Service_That_Completes_After_An_Ignored_Hub_Method_Returns() + { + var noteId = await CreateNoteAsync("old"); + using var scope = GetRequiredService().CreateScope(); + + var serviceTask = await StartServiceInIgnoredHubMethodAsync( + scope.ServiceProvider, + noteService => noteService.UpdateTextWithoutSavingAsync(noteId, "new")); + await _auditingStore.DidNotReceive().SaveAsync(Arg.Any()); + + GetRequiredService().Complete(); + await serviceTask; + + await ShouldHaveSavedTheNoteUpdateAsync(noteId, nameof(AuditedNoteService.UpdateTextWithoutSavingAsync)); + (await GetRequiredService>().GetAsync(noteId)).Text.ShouldBe("new"); + } + + [Fact] + public async Task Should_Save_The_Audit_Log_Of_A_Service_Called_By_An_Ignored_Hub_Over_A_Non_WebSocket_Transport() + { + var noteId = await CreateNoteAsync("old"); + using var scope = GetRequiredService().CreateScope(); + + // Server-Sent Events keep the connection on a single GET request. + var httpContextAccessor = scope.ServiceProvider.GetRequiredService(); + var connectionRequest = new DefaultHttpContext { RequestServices = scope.ServiceProvider }; + connectionRequest.Request.Method = HttpMethods.Get; + connectionRequest.Request.Path = "/signalr-hubs/ignored"; + httpContextAccessor.HttpContext = connectionRequest; + + try + { + var serviceTask = await StartServiceInIgnoredHubMethodAsync(scope.ServiceProvider, noteId); + + GetRequiredService().Complete(); + await serviceTask; + } + finally + { + httpContextAccessor.HttpContext = null; + } + + await ShouldHaveSavedTheNoteUpdateAsync(noteId); + await _auditingStore.Received(1).SaveAsync(Arg.Is(x => x.HttpMethod == null)); + } + + private Task StartServiceInIgnoredHubMethodAsync(IServiceProvider serviceProvider, Guid noteId) + { + return StartServiceInIgnoredHubMethodAsync(serviceProvider, noteService => noteService.UpdateTextAsync(noteId, "new")); + } + + private async Task StartServiceInIgnoredHubMethodAsync(IServiceProvider serviceProvider, Func serviceCall) + { + var noteService = serviceProvider.GetRequiredService(); + + Task serviceTask = null; + await InvokeHubMethodAsync(serviceProvider, new IgnoredAuditHub(), () => + { + // Like Blazor's ComponentHub, return before the started work completes. + serviceTask = serviceCall(noteService); + return Task.CompletedTask; + }); + + return serviceTask; + } + + private async Task CreateNoteAsync(string text) + { + var noteId = Guid.NewGuid(); + using (var uow = GetRequiredService().Begin(requiresNew: true)) + { + await GetRequiredService>().InsertAsync(new AuditedNote(noteId, text)); + await uow.CompleteAsync(); + } + + _auditingStore.ClearReceivedCalls(); + return noteId; + } + + private async Task ShouldHaveSavedTheNoteUpdateAsync(Guid noteId, string methodName = nameof(AuditedNoteService.UpdateTextAsync)) + { + await _auditingStore.Received(1).SaveAsync(Arg.Any()); + await _auditingStore.Received(1).SaveAsync(Arg.Is(x => + x.Actions.Count == 1 && + x.Actions[0].MethodName == methodName && + x.EntityChanges.Count == 1 && + x.EntityChanges[0].ChangeType == EntityChangeType.Updated && + x.EntityChanges[0].EntityTypeFullName == typeof(AuditedNote).FullName && + x.EntityChanges[0].EntityId == noteId.ToString() && + x.EntityChanges[0].PropertyChanges.Any(p => + p.PropertyName == nameof(AuditedNote.Text) && + p.OriginalValue == "\"old\"" && + p.NewValue == "\"new\""))); + } + + private async Task HasAuditScopeInHubMethodAsync(Hub hub) + { + using var scope = GetRequiredService().CreateScope(); + var auditingManager = scope.ServiceProvider.GetRequiredService(); + + var hasAuditScope = false; + await InvokeHubMethodAsync(scope.ServiceProvider, hub, () => + { + hasAuditScope = auditingManager.Current != null; + return Task.CompletedTask; + }); + + return hasAuditScope; + } + + private static async Task InvokeHubMethodAsync(IServiceProvider serviceProvider, Hub hub, Func hubMethod) + { + var invocationContext = new HubInvocationContext( + new TestHubCallerContext(), + serviceProvider, + hub, + typeof(RegularAuditHub).GetMethod(nameof(RegularAuditHub.Ping)), + Array.Empty()); + + // AbpAspNetCoreSignalRModule also registers the hub context accessor filter before the audit filter. + await new AbpHubContextAccessorHubFilter().InvokeMethodAsync(invocationContext, context => + new AbpAuditHubFilter().InvokeMethodAsync(context, async _ => + { + await hubMethod(); + return null; + })); + } + + [DisableConventionalRegistration] + public class RegularAuditHub : Hub + { + public void Ping() + { + } + } + + [DisableConventionalRegistration] + public class IgnoredAuditHub : Hub + { + } + + [DisableConventionalRegistration] + public class DerivedIgnoredAuditHub : IgnoredAuditHub + { + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/AbpSignalRAuditingMiddleware_Tests.cs b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/AbpSignalRAuditingMiddleware_Tests.cs new file mode 100644 index 0000000000..7d2f41b63b --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/AbpSignalRAuditingMiddleware_Tests.cs @@ -0,0 +1,54 @@ +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace Volo.Abp.AspNetCore.SignalR.Auditing; + +[Collection("AbpAspNetCoreSignalR")] +public class AbpSignalRAuditingMiddleware_Tests : AbpAspNetCoreTestBase +{ + [Theory] + [InlineData("/signalr-hubs/regular-abp/negotiate?negotiateVersion=1")] + [InlineData("/custom-route-hub/negotiate?negotiateVersion=1")] + public async Task Should_Not_Begin_An_Audit_Scope_For_The_Requests_Of_The_Auto_Mapped_Hubs(string url) + { + var response = await Client.PostAsync(url, null); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + IsAuditScopeStarted(response).ShouldBeFalse(); + } + + [Fact] + public async Task Should_Not_Begin_An_Audit_Scope_For_The_Requests_Of_The_Ignored_Hub_Types() + { + var response = await Client.PostAsync("/ignored-auditing-hub/negotiate?negotiateVersion=1", null); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + IsAuditScopeStarted(response).ShouldBeFalse(); + } + + [Fact] + public async Task Should_Begin_An_Audit_Scope_For_The_Requests_Of_The_Other_Manually_Mapped_Hubs() + { + var response = await Client.PostAsync("/manually-mapped-hub/negotiate?negotiateVersion=1", null); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + IsAuditScopeStarted(response).ShouldBeTrue(); + } + + [Fact] + public async Task Should_Begin_An_Audit_Scope_For_The_Other_Requests() + { + var response = await Client.GetAsync("/not-a-hub"); + + IsAuditScopeStarted(response).ShouldBeTrue(); + } + + private static bool IsAuditScopeStarted(HttpResponseMessage response) + { + return bool.Parse(response.Headers.GetValues(AbpAspNetCoreSignalRTestModule.AuditScopeStartedHeaderName).Single()); + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/AuditedNote.cs b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/AuditedNote.cs new file mode 100644 index 0000000000..fd23bd91df --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/AuditedNote.cs @@ -0,0 +1,19 @@ +using System; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.AspNetCore.SignalR.Auditing.TestApp; + +public class AuditedNote : Entity +{ + public string Text { get; set; } + + protected AuditedNote() + { + } + + public AuditedNote(Guid id, string text) + : base(id) + { + Text = text; + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/AuditedNoteService.cs b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/AuditedNoteService.cs new file mode 100644 index 0000000000..0ffad7b018 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/AuditedNoteService.cs @@ -0,0 +1,50 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.Auditing; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Uow; + +namespace Volo.Abp.AspNetCore.SignalR.Auditing.TestApp; + +[Audited] +public class AuditedNoteService : ITransientDependency +{ + private readonly IRepository _noteRepository; + private readonly AuditedWorkSignal _signal; + + public AuditedNoteService(IRepository noteRepository, AuditedWorkSignal signal) + { + _noteRepository = noteRepository; + _signal = signal; + } + + [UnitOfWork] + public virtual async Task UpdateTextAsync(Guid id, string text) + { + await _signal.Task; + + var note = await _noteRepository.GetAsync(id); + note.Text = text; + await _noteRepository.UpdateAsync(note, autoSave: true); + } + + [UnitOfWork] + public virtual async Task UpdateTextWithoutSavingAsync(Guid id, string text) + { + await _signal.Task; + + // The change is saved when the unit of work completes. + var note = await _noteRepository.GetAsync(id); + note.Text = text; + } +} + +public class AuditedWorkSignal : ISingletonDependency +{ + private readonly TaskCompletionSource _completionSource = new(TaskCreationOptions.RunContinuationsAsynchronously); + + public Task Task => _completionSource.Task; + + public void Complete() => _completionSource.TrySetResult(); +} diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/SignalRAuditingTestDbContext.cs b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/SignalRAuditingTestDbContext.cs new file mode 100644 index 0000000000..5b6c98167c --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/SignalRAuditingTestDbContext.cs @@ -0,0 +1,14 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +namespace Volo.Abp.AspNetCore.SignalR.Auditing.TestApp; + +public class SignalRAuditingTestDbContext : AbpDbContext +{ + public DbSet AuditedNotes { get; set; } + + public SignalRAuditingTestDbContext(DbContextOptions options) + : base(options) + { + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/TestHubCallerContext.cs b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/TestHubCallerContext.cs new file mode 100644 index 0000000000..e307ca3b48 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/Auditing/TestApp/TestHubCallerContext.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; +using System.Security.Claims; +using System.Threading; +using Microsoft.AspNetCore.Http.Features; +using Microsoft.AspNetCore.SignalR; + +namespace Volo.Abp.AspNetCore.SignalR.Auditing.TestApp; + +public class TestHubCallerContext : HubCallerContext +{ + public override string ConnectionId => "test-connection"; + + public override string UserIdentifier => null; + + public override ClaimsPrincipal User => null; + + public override IDictionary Items { get; } = new Dictionary(); + + public override IFeatureCollection Features { get; } = new FeatureCollection(); + + public override CancellationToken ConnectionAborted => CancellationToken.None; + + public override void Abort() + { + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/SampleHubs/CustomRouteHub.cs b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/SampleHubs/CustomRouteHub.cs new file mode 100644 index 0000000000..7e2f233efc --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/SampleHubs/CustomRouteHub.cs @@ -0,0 +1,6 @@ +namespace Volo.Abp.AspNetCore.SignalR.SampleHubs; + +[HubRoute("/custom-route-hub")] +public class CustomRouteHub : AbpHub +{ +} diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/SampleHubs/IgnoredAuditingHub.cs b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/SampleHubs/IgnoredAuditingHub.cs new file mode 100644 index 0000000000..47ee41c85c --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo/Abp/AspNetCore/SignalR/SampleHubs/IgnoredAuditingHub.cs @@ -0,0 +1,8 @@ +using Microsoft.AspNetCore.SignalR; + +namespace Volo.Abp.AspNetCore.SignalR.SampleHubs; + +[DisableAutoHubMap] +public class IgnoredAuditingHub : Hub +{ +} diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj index da54648998..7920b8acb4 100644 --- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.AspNetCore.Tests Volo.Abp.AspNetCore.Tests true diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware_HubRequest_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware_HubRequest_Tests.cs new file mode 100644 index 0000000000..feb5c9fa70 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware_HubRequest_Tests.cs @@ -0,0 +1,146 @@ +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.SignalR; +using Microsoft.AspNetCore.TestHost; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Shouldly; +using Volo.Abp.Auditing; +using Volo.Abp.Modularity; +using Xunit; + +namespace Volo.Abp.AspNetCore.Auditing; + +public class AbpAuditingMiddleware_HubRequest_Tests +{ + [Fact] + public async Task Should_Begin_An_Audit_Scope_For_Hub_Requests_By_Default() + { + (await IsAuditScopeStartedForHubRequestAsync()).ShouldBeTrue(); + } + + [Fact] + public async Task Should_Not_Begin_An_Audit_Scope_For_The_Requests_Of_An_Ignored_Hub_Type() + { + (await IsAuditScopeStartedForHubRequestAsync()).ShouldBeFalse(); + } + + [Fact] + public async Task Should_Not_Begin_An_Audit_Scope_For_The_Requests_Of_A_Hub_Derived_From_An_Ignored_Hub_Type() + { + (await IsAuditScopeStartedForHubRequestAsync()).ShouldBeFalse(); + } + + [Fact] + public async Task Should_Begin_An_Audit_Scope_For_The_Requests_Of_The_Other_Hubs() + { + (await IsAuditScopeStartedForHubRequestAsync()).ShouldBeTrue(); + } + + private static async Task IsAuditScopeStartedForHubRequestAsync() + where TModule : IAbpModule + { + var builder = WebApplication.CreateBuilder(); + builder.WebHost.UseTestServer(); + builder.Host.UseAutofac(); + await builder.AddApplicationAsync(); + + await using var app = builder.Build(); + await app.InitializeApplicationAsync(); + await app.StartAsync(); + + try + { + using var client = ((IHost)app).GetTestClient(); + var response = await client.PostAsync("/native-hub/negotiate?negotiateVersion=1", null); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + return bool.Parse(response.Headers.GetValues(NativeSignalRAuditingTestModule.AuditScopeStartedHeaderName).Single()); + } + finally + { + await app.StopAsync(); + } + } + + public class NativeTestHubBase : Hub + { + } + + public class NativeTestHub : NativeTestHubBase + { + } + + public class OtherNativeTestHub : Hub + { + } + + [DependsOn(typeof(AbpAspNetCoreTestModule))] + public class NativeSignalRAuditingTestModule : AbpModule + { + public const string AuditScopeStartedHeaderName = "X-Audit-Scope-Started"; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddSignalR(); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var app = context.GetApplicationBuilder(); + + app.UseRouting(); + app.UseAuditing(); + app.Use(async (httpContext, next) => + { + httpContext.Response.Headers[AuditScopeStartedHeaderName] = + (httpContext.RequestServices.GetRequiredService().Current != null).ToString(); + + await next(); + }); + app.UseEndpoints(endpoints => + { + endpoints.MapHub("/native-hub"); + }); + } + } + + [DependsOn(typeof(NativeSignalRAuditingTestModule))] + public class IgnoredHubTypeTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.IgnoredHubTypes.Add(typeof(NativeTestHub)); + }); + } + } + + [DependsOn(typeof(NativeSignalRAuditingTestModule))] + public class IgnoredBaseHubTypeTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.IgnoredHubTypes.Add(typeof(NativeTestHubBase)); + }); + } + } + + [DependsOn(typeof(NativeSignalRAuditingTestModule))] + public class IgnoredOtherHubTypeTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.IgnoredHubTypes.Add(typeof(OtherNativeTestHub)); + }); + } + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/TelemetryApplicationLifetime_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/TelemetryApplicationLifetime_Tests.cs new file mode 100644 index 0000000000..7c2f5c8c8c --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/TelemetryApplicationLifetime_Tests.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Threading.Tasks; +using Autofac; +using Autofac.Core; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Hosting; +using NSubstitute; +using Shouldly; +using Volo.Abp.Autofac; +using Volo.Abp.Internal.Telemetry; +using Volo.Abp.Internal.Telemetry.Activity; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Constants; +using Volo.Abp.Modularity; +using Volo.Abp.Testing; +using Xunit; + +namespace Volo.Abp.AspNetCore; + +public class TelemetryApplicationLifetime_Tests +{ + [Theory] + [InlineData(false)] + [InlineData(true)] + public void Should_Release_Applications_And_Autofac_Containers_After_Telemetry_Completes(bool useIntegratedTest) + { + var references = new List(); + for (var i = 0; i < 10; i++) + { + references.Add(CreateAndDisposeApplication(useIntegratedTest)); + } + + var collected = SpinWait.SpinUntil(() => + { + GC.Collect(); + GC.WaitForPendingFinalizers(); + return references.All(reference => !reference.Application.IsAlive && !reference.Container.IsAlive); + }, TimeSpan.FromSeconds(10)); + + collected.ShouldBeTrue("Disposed applications and their root Autofac containers must be collectible."); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + private static ApplicationReferences CreateAndDisposeApplication(bool useIntegratedTest) + { + if (useIntegratedTest) + { + using var test = new TelemetryIntegratedTest(); + return test.GetReferences(); + } + + using var application = AbpApplicationFactory.Create(options => options.UseAutofac()); + application.Initialize(); + try + { + return ObserveApplication(application, application.ServiceProvider); + } + finally + { + application.Shutdown(); + } + } + + private static ApplicationReferences ObserveApplication(IAbpApplication application, IServiceProvider serviceProvider) + { + serviceProvider.GetService().ShouldBeNull(); + serviceProvider.GetRequiredService().EnvironmentName.ShouldBe(Environments.Development); + serviceProvider.GetRequiredService().GetValue("Abp:Telemetry:IsEnabled").ShouldBeNull(); + + var completion = serviceProvider.GetRequiredService(); + completion.ScopeDisposed.Task.Wait(TimeSpan.FromSeconds(10)).ShouldBeTrue(); + completion.ActivityCount.ShouldBe(1); + completion.ActivityName.ShouldBe(ActivityNameConsts.ApplicationRun); + + var lifetimeScope = (ISharingLifetimeScope)serviceProvider.GetRequiredService(); + return new ApplicationReferences(new WeakReference(application), new WeakReference(lifetimeScope.RootLifetimeScope)); + } + + private sealed record ApplicationReferences(WeakReference Application, WeakReference Container); + + private sealed class TelemetryIntegratedTest : AbpIntegratedTest + { + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + + public ApplicationReferences GetReferences() + { + return ObserveApplication(Application, ServiceProvider); + } + } + + [DependsOn(typeof(AbpAspNetCoreModule), typeof(AbpAutofacModule))] + public class TelemetryTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.Replace(ServiceDescriptor.Singleton(new ConfigurationBuilder().Build())); + context.Services.AddSingleton(); + context.Services.Replace(ServiceDescriptor.Scoped()); + context.Services.Replace(ServiceDescriptor.Singleton(Substitute.For())); + context.Services.Replace(ServiceDescriptor.Singleton(Substitute.For())); + } + } + + public class TelemetryCompletion + { + public TaskCompletionSource ScopeDisposed { get; } = new(TaskCreationOptions.RunContinuationsAsynchronously); + public int ActivityCount; + public string ActivityName { get; set; } + } + + public class TestActivityEventBuilder : ITelemetryActivityEventBuilder, IDisposable + { + private readonly TelemetryCompletion _completion; + + public TestActivityEventBuilder(TelemetryCompletion completion) + { + _completion = completion; + } + + public Task BuildAsync(ActivityContext context) + { + Interlocked.Increment(ref _completion.ActivityCount); + _completion.ActivityName = context.Current.Get(ActivityPropertyNames.ActivityName); + return Task.FromResult(null); + } + + public void Dispose() + { + _completion.ScopeDisposed.TrySetResult(true); + } + } +} diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider_Tests.cs index e5369e688e..203ab21559 100644 --- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider_Tests.cs @@ -1,4 +1,11 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Net.WebSockets; +using System.Threading.Tasks; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.Options; using Shouldly; using Xunit; @@ -12,6 +19,11 @@ public class AspNetCoreUnitOfWorkTransactionBehaviourProvider_Tests var httpContext = new DefaultHttpContext(); httpContext.Request.Method = method; + return CreateProvider(httpContext); + } + + private static AspNetCoreUnitOfWorkTransactionBehaviourProvider CreateProvider(HttpContext httpContext) + { return new AspNetCoreUnitOfWorkTransactionBehaviourProvider( new HttpContextAccessor { HttpContext = httpContext }, Microsoft.Extensions.Options.Options.Create(new AspNetCoreUnitOfWorkTransactionBehaviourProviderOptions())); @@ -29,4 +41,82 @@ public class AspNetCoreUnitOfWorkTransactionBehaviourProvider_Tests { CreateProvider(method).IsTransactional.ShouldBe(expected); } + + [Fact] + public void IsTransactional_Should_Not_Change_The_Feature_Collection() + { + var features = new KestrelLikeFeatureCollection(); + features.Set(new HttpRequestFeature { Method = "GET", Path = "/" }); + features.Set(new HttpResponseFeature()); + features.Set(new StreamResponseBodyFeature(Stream.Null)); + var httpContext = new DefaultHttpContext(features); + var provider = CreateProvider(httpContext); + var revision = httpContext.Features.Revision; + + provider.IsTransactional.ShouldBe(false); + provider.IsTransactional.ShouldBe(false); + + httpContext.Features.Revision.ShouldBe(revision); + } + + [Fact] + public void IsTransactional_Should_Return_Null_For_WebSocket_Requests() + { + var httpContext = new DefaultHttpContext(); + httpContext.Request.Method = "GET"; + httpContext.Features.Set(new TestWebSocketFeature()); + + CreateProvider(httpContext).IsTransactional.ShouldBeNull(); + } + + // Kestrel's feature collection increments the revision on every Set, even when the value is null. + private sealed class KestrelLikeFeatureCollection : IFeatureCollection + { + private readonly FeatureCollection _inner = new(); + + public int Revision { get; private set; } + + public bool IsReadOnly => false; + + public object? this[Type key] + { + get => _inner[key]; + set + { + Revision++; + _inner[key] = value; + } + } + + public TFeature? Get() + { + return _inner.Get(); + } + + public void Set(TFeature? instance) + { + Revision++; + _inner.Set(instance); + } + + public IEnumerator> GetEnumerator() + { + return _inner.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } + + private sealed class TestWebSocketFeature : IHttpWebSocketFeature + { + public bool IsWebSocketRequest => true; + + public Task AcceptAsync(WebSocketAcceptContext context) + { + throw new System.NotSupportedException(); + } + } } diff --git a/framework/test/Volo.Abp.AspNetCore.Uow.Tests/Volo.Abp.AspNetCore.Uow.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Uow.Tests/Volo.Abp.AspNetCore.Uow.Tests.csproj index 08b17d2002..81e70c8b4f 100644 --- a/framework/test/Volo.Abp.AspNetCore.Uow.Tests/Volo.Abp.AspNetCore.Uow.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Uow.Tests/Volo.Abp.AspNetCore.Uow.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.AspNetCore.Uow.Tests Volo.Abp.AspNetCore.Uow.Tests true diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj index 0d076d9014..01909fff3b 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.Auditing.Tests Volo.Abp.Auditing.Tests true diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj index f1deb2761a..962a5107de 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.Authorization.Tests Volo.Abp.Authorization.Tests true diff --git a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj index e34757b095..8d040f536c 100644 --- a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj +++ b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.AutoMapper.Tests Volo.Abp.AutoMapper.Tests diff --git a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj index e17ce29209..409941f309 100644 --- a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj +++ b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.Autofac.Tests Volo.Abp.Autofac.Tests true diff --git a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj index ba27daaf88..0e1d1b22f8 100644 --- a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj +++ b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.BackgroundJobs.Tests Volo.Abp.BackgroundJobs.Tests diff --git a/framework/test/Volo.Abp.BlobStoring.Aliyun.Tests/Volo.Abp.BlobStoring.Aliyun.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Aliyun.Tests/Volo.Abp.BlobStoring.Aliyun.Tests.csproj index 255e0b4f12..179efa9346 100644 --- a/framework/test/Volo.Abp.BlobStoring.Aliyun.Tests/Volo.Abp.BlobStoring.Aliyun.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Aliyun.Tests/Volo.Abp.BlobStoring.Aliyun.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 9f0d2c00-80c1-435b-bfab-2c39c8249091 diff --git a/framework/test/Volo.Abp.BlobStoring.Aws.Tests/Volo.Abp.BlobStoring.Aws.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Aws.Tests/Volo.Abp.BlobStoring.Aws.Tests.csproj index f60b4b34c4..cd4e906551 100644 --- a/framework/test/Volo.Abp.BlobStoring.Aws.Tests/Volo.Abp.BlobStoring.Aws.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Aws.Tests/Volo.Abp.BlobStoring.Aws.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 9f0d2c00-80c1-435b-bfab-2c39c8249091 diff --git a/framework/test/Volo.Abp.BlobStoring.Azure.Tests/Volo.Abp.BlobStoring.Azure.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Azure.Tests/Volo.Abp.BlobStoring.Azure.Tests.csproj index 5398b30f33..6be6dd561a 100644 --- a/framework/test/Volo.Abp.BlobStoring.Azure.Tests/Volo.Abp.BlobStoring.Azure.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Azure.Tests/Volo.Abp.BlobStoring.Azure.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 9f0d2c00-80c1-435b-bfab-2c39c8249091 diff --git a/framework/test/Volo.Abp.BlobStoring.Bunny.Tests/Volo.Abp.BlobStoring.Bunny.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Bunny.Tests/Volo.Abp.BlobStoring.Bunny.Tests.csproj index 8a758947b1..a858b43fd9 100644 --- a/framework/test/Volo.Abp.BlobStoring.Bunny.Tests/Volo.Abp.BlobStoring.Bunny.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Bunny.Tests/Volo.Abp.BlobStoring.Bunny.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 9f0d2c00-80c1-435b-bfab-2c39c8249091 diff --git a/framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo.Abp.BlobStoring.FileSystem.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo.Abp.BlobStoring.FileSystem.Tests.csproj index ddecd11444..76873d4e8b 100644 --- a/framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo.Abp.BlobStoring.FileSystem.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo.Abp.BlobStoring.FileSystem.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.BlobStoring.Google.Tests/Volo.Abp.BlobStoring.Google.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Google.Tests/Volo.Abp.BlobStoring.Google.Tests.csproj index 2def35beb8..980a0bd054 100644 --- a/framework/test/Volo.Abp.BlobStoring.Google.Tests/Volo.Abp.BlobStoring.Google.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Google.Tests/Volo.Abp.BlobStoring.Google.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 9f0d2c00-80c1-435b-bfab-2c39c8249091 diff --git a/framework/test/Volo.Abp.BlobStoring.Memory.Tests/Volo.Abp.BlobStoring.Memory.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Memory.Tests/Volo.Abp.BlobStoring.Memory.Tests.csproj index 9950ceabba..a5a5269800 100644 --- a/framework/test/Volo.Abp.BlobStoring.Memory.Tests/Volo.Abp.BlobStoring.Memory.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Memory.Tests/Volo.Abp.BlobStoring.Memory.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.BlobStoring.Minio.Tests/Volo.Abp.BlobStoring.Minio.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Minio.Tests/Volo.Abp.BlobStoring.Minio.Tests.csproj index 96887c44d4..10a223896e 100644 --- a/framework/test/Volo.Abp.BlobStoring.Minio.Tests/Volo.Abp.BlobStoring.Minio.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Minio.Tests/Volo.Abp.BlobStoring.Minio.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 9f0d2c00-80c1-435b-bfab-2c39c8249091 diff --git a/framework/test/Volo.Abp.BlobStoring.Tests/Volo.Abp.BlobStoring.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Tests/Volo.Abp.BlobStoring.Tests.csproj index 8a79fa378c..7bdc0dbba3 100644 --- a/framework/test/Volo.Abp.BlobStoring.Tests/Volo.Abp.BlobStoring.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Tests/Volo.Abp.BlobStoring.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Caching.StackExchangeRedis.Tests/Volo.Abp.Caching.StackExchangeRedis.Tests.csproj b/framework/test/Volo.Abp.Caching.StackExchangeRedis.Tests/Volo.Abp.Caching.StackExchangeRedis.Tests.csproj index 3f31815501..a7a911cf57 100644 --- a/framework/test/Volo.Abp.Caching.StackExchangeRedis.Tests/Volo.Abp.Caching.StackExchangeRedis.Tests.csproj +++ b/framework/test/Volo.Abp.Caching.StackExchangeRedis.Tests/Volo.Abp.Caching.StackExchangeRedis.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj index 92968be6fd..e933f1d84a 100644 --- a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj +++ b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.Caching.Tests Volo.Abp.Caching.Tests diff --git a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj index 7dada4dc91..c048a90b1f 100644 --- a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj b/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj index 82aa889ead..f4a953b96d 100644 --- a/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectModification/AngularPwaSupportAdder_Tests.cs b/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectModification/AngularPwaSupportAdder_Tests.cs new file mode 100644 index 0000000000..d59cee78de --- /dev/null +++ b/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectModification/AngularPwaSupportAdder_Tests.cs @@ -0,0 +1,229 @@ +using System; +using System.IO; +using System.Linq; +using Newtonsoft.Json.Linq; +using NSubstitute; +using Shouldly; +using Volo.Abp.Cli.Utils; +using Xunit; + +namespace Volo.Abp.Cli.ProjectModification; + +public class AngularPwaSupportAdder_Tests : IDisposable +{ + private static readonly string AngularJson = """ + { + "version": 1, + "projects": { + "MyProjectName": { + "projectType": "application", + "root": "", + "architect": { + "build": { + "options": { + "polyfills": ["src/polyfills.ts"], + "assets": [ + "src/favicon.ico", + "src/assets", + { + "glob": "web.config", + "input": ".", + "output": "." + } + ] + } + }, + "test": { + "options": { + "assets": ["src/assets"] + } + } + } + } + } + } + """.Replace("\r\n", "\n"); + + private readonly string _testDirectory; + private readonly TestAngularPwaSupportAdder _adder; + + public AngularPwaSupportAdder_Tests() + { + _testDirectory = Path.Combine(Path.GetTempPath(), "abp-cli-tests", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(_testDirectory); + + _adder = new TestAngularPwaSupportAdder(Substitute.For(), new PackageJsonFileFinder()); + } + + public void Dispose() + { + Directory.Delete(_testDirectory, recursive: true); + } + + [Theory] + [InlineData("{ \"devDependencies\": { \"@angular/cli\": \"~22.0.0\" } }", "22")] + [InlineData("{ \"devDependencies\": { \"@angular/cli\": \"^21.1.3\" } }", "21")] + [InlineData("{ \"devDependencies\": { \"@angular/cli\": \"22\" } }", "22")] + [InlineData("{ \"dependencies\": { \"@angular/cli\": \"~20.3.0\" } }", "20")] + [InlineData("{ \"dependencies\": { \"@angular/cli\": \"~20.3.0\" }, \"devDependencies\": { \"@angular/cli\": \"~22.0.0\" } }", "22")] + public void Should_Get_Angular_Cli_Major_Version(string packageJson, string expectedVersion) + { + _adder.GetAngularCliMajorVersion(WritePackageJson(packageJson)).ShouldBe(expectedVersion); + } + + [Theory] + [InlineData("{ \"devDependencies\": { \"typescript\": \"~5.9.0\" } }")] + [InlineData("{ \"devDependencies\": { \"@angular/cli\": \"latest\" } }")] + public void Should_Throw_If_Angular_Cli_Version_Cannot_Be_Determined(string packageJson) + { + Should.Throw(() => _adder.GetAngularCliMajorVersion(WritePackageJson(packageJson))); + } + + [Fact] + public void Should_Add_Public_Folder_To_Build_Assets() + { + Directory.CreateDirectory(Path.Combine(_testDirectory, "public")); + + var result = _adder.AddPublicFolderToBuildAssets(AngularJson, _testDirectory); + + var assets = GetAssets(result, "build"); + assets.Count.ShouldBe(4); + assets[0].ToString().ShouldBe("src/favicon.ico"); + assets[1].ToString().ShouldBe("src/assets"); + assets[2]["glob"].ToString().ShouldBe("web.config"); + assets[3]["glob"].ToString().ShouldBe("**/*"); + assets[3]["input"].ToString().ShouldBe("public"); + + GetAssets(result, "test").Count.ShouldBe(1); + result.ShouldEndWith("}"); + _adder.AddPublicFolderToBuildAssets(AngularJson + "\n", _testDirectory).ShouldEndWith("}\n"); + } + + [Fact] + public void Should_Not_Add_Public_Folder_To_Build_Assets_Twice() + { + Directory.CreateDirectory(Path.Combine(_testDirectory, "public")); + + var result = _adder.AddPublicFolderToBuildAssets(AngularJson, _testDirectory); + + _adder.AddPublicFolderToBuildAssets(result, _testDirectory).ShouldBe(result); + GetAssets(result, "build").Count(x => x is JObject && x["input"]?.ToString() == "public").ShouldBe(1); + } + + [Fact] + public void Should_Not_Add_Public_Folder_To_Build_Assets_If_It_Does_Not_Exist() + { + _adder.AddPublicFolderToBuildAssets(AngularJson, _testDirectory).ShouldBe(AngularJson); + } + + [Fact] + public void Should_Add_Public_Folder_Of_Project_Root_To_Build_Assets() + { + Directory.CreateDirectory(Path.Combine(_testDirectory, "projects", "app", "public")); + var angularJson = AngularJson.Replace("\"root\": \"\"", "\"root\": \"projects/app\""); + + var result = _adder.AddPublicFolderToBuildAssets(angularJson, _testDirectory); + + GetAssets(result, "build").Last()["input"].ToString().ShouldBe("projects/app/public"); + } + + [Fact] + public void Should_Keep_Line_Endings() + { + Directory.CreateDirectory(Path.Combine(_testDirectory, "public")); + + var result = _adder.AddPublicFolderToBuildAssets(AngularJson.Replace("\n", "\r\n"), _testDirectory); + + GetAssets(result, "build").Last()["input"].ToString().ShouldBe("public"); + result.ShouldContain("\r\n"); + result.Replace("\r\n", string.Empty).ShouldNotContain("\n"); + } + + [Theory] + [InlineData("[\"src/favicon.ico\"]", 2)] + [InlineData("[]", 1)] + public void Should_Add_Public_Folder_To_Inline_Build_Assets(string assets, int expectedCount) + { + Directory.CreateDirectory(Path.Combine(_testDirectory, "public")); + var angularJson = $"{{ \"projects\": {{ \"app\": {{ \"root\": \"\", \"architect\": {{ \"build\": {{ \"options\": {{ \"assets\": {assets} }} }} }} }} }} }}"; + + var result = (JArray)JObject.Parse(_adder.AddPublicFolderToBuildAssets(angularJson, _testDirectory)) + ["projects"]!["app"]!["architect"]!["build"]!["options"]!["assets"]; + + result.Count.ShouldBe(expectedCount); + result.Last()["input"]!.ToString().ShouldBe("public"); + } + + [Fact] + public void Should_Run_Ng_Add_Through_Npx_And_Add_Public_Folder_To_Build_Assets() + { + var cmdHelper = CreateCmdHelper(exitCode: 0); + WritePackageJson("{ \"devDependencies\": { \"@angular/cli\": \"~22.0.0\" } }"); + var angularJsonPath = Path.Combine(_testDirectory, "angular.json"); + File.WriteAllText(angularJsonPath, AngularJson); + + new AngularPwaSupportAdder(cmdHelper, new PackageJsonFileFinder()).AddPwaSupport(_testDirectory); + + cmdHelper.Received(1).RunCmd( + "npx -y -p @angular/cli@22 ng add @angular/pwa@22 --skip-confirmation", + out Arg.Any(), + _testDirectory + Path.DirectorySeparatorChar); + GetAssets(File.ReadAllText(angularJsonPath), "build").Last()["input"].ToString().ShouldBe("public"); + } + + [Fact] + public void Should_Throw_If_Ng_Add_Fails() + { + var cmdHelper = CreateCmdHelper(exitCode: 127); + WritePackageJson("{ \"devDependencies\": { \"@angular/cli\": \"~22.0.0\" } }"); + var angularJsonPath = Path.Combine(_testDirectory, "angular.json"); + File.WriteAllText(angularJsonPath, AngularJson); + + Should.Throw(() => new AngularPwaSupportAdder(cmdHelper, new PackageJsonFileFinder()).AddPwaSupport(_testDirectory)); + + File.ReadAllText(angularJsonPath).ShouldBe(AngularJson); + } + + private ICmdHelper CreateCmdHelper(int exitCode) + { + var cmdHelper = Substitute.For(); + cmdHelper + .When(x => x.RunCmd(Arg.Any(), out Arg.Any(), Arg.Any())) + .Do(call => + { + call[1] = exitCode; + Directory.CreateDirectory(Path.Combine(_testDirectory, "public")); + }); + return cmdHelper; + } + + private string WritePackageJson(string content) + { + var path = Path.Combine(_testDirectory, "package.json"); + File.WriteAllText(path, content); + return path; + } + + private static JArray GetAssets(string angularJson, string target) + { + return (JArray)JObject.Parse(angularJson)["projects"]!["MyProjectName"]!["architect"]![target]!["options"]!["assets"]; + } + + private class TestAngularPwaSupportAdder : AngularPwaSupportAdder + { + public TestAngularPwaSupportAdder(ICmdHelper cmdHelper, PackageJsonFileFinder packageJsonFileFinder) + : base(cmdHelper, packageJsonFileFinder) + { + } + + public new string GetAngularCliMajorVersion(string packageJsonFilePath) + { + return base.GetAngularCliMajorVersion(packageJsonFilePath); + } + + public new string AddPublicFolderToBuildAssets(string angularJson, string workspaceDirectory) + { + return base.AddPublicFolderToBuildAssets(angularJson, workspaceDirectory); + } + } +} diff --git a/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectModification/MyGetApiResponse_Tests.cs b/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectModification/MyGetApiResponse_Tests.cs new file mode 100644 index 0000000000..410aa42709 --- /dev/null +++ b/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectModification/MyGetApiResponse_Tests.cs @@ -0,0 +1,73 @@ +using System.Collections.Generic; +using Shouldly; +using Volo.Abp.Cli.ProjectModification; +using Xunit; + +namespace Volo.Abp.Cli; + +public class MyGetApiResponse_Tests +{ + [Fact] + public void GetLatestVersionOrNull_Should_Return_Last_Version_Of_Package() + { + var response = new MyGetApiResponse + { + Packages = new List + { + new() { Id = "Volo.Abp.Account", Versions = new List { "10.6.0", "10.7.0-preview.1" } }, + new() { Id = "Volo.Abp.Core", Versions = new List { "10.6.0", "10.7.0-preview.1", "10.7.0-preview.2" } } + } + }; + + response.GetLatestVersionOrNull("Volo.Abp.Core").ShouldBe("10.7.0-preview.2"); + } + + [Fact] + public void GetLatestVersionOrNull_Should_Return_Null_When_Package_Does_Not_Exist() + { + var response = new MyGetApiResponse + { + Packages = new List + { + new() { Id = "Volo.Abp.Account", Versions = new List { "10.7.0-preview.1" } } + } + }; + + response.GetLatestVersionOrNull("Volo.Abp.Core").ShouldBeNull(); + } + + [Fact] + public void GetLatestVersionOrNull_Should_Return_Null_When_Packages_Is_Null() + { + new MyGetApiResponse { Packages = null }.GetLatestVersionOrNull("Volo.Abp.Core").ShouldBeNull(); + } + + [Fact] + public void GetLatestVersionOrNull_Should_Return_Null_When_Package_Versions_Is_Null() + { + var response = new MyGetApiResponse + { + Packages = new List + { + new() { Id = "Volo.Abp.Core", Versions = null } + } + }; + + response.GetLatestVersionOrNull("Volo.Abp.Core").ShouldBeNull(); + } + + [Fact] + public void GetLatestVersionOrNull_Should_Ignore_Null_Package_Entries() + { + var response = new MyGetApiResponse + { + Packages = new List + { + null, + new() { Id = "Volo.Abp.Core", Versions = new List { "10.7.0-preview.1" } } + } + }; + + response.GetLatestVersionOrNull("Volo.Abp.Core").ShouldBe("10.7.0-preview.1"); + } +} diff --git a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj index 4f91a9f854..a9cdd529db 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 enable diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/TypeHelper_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/TypeHelper_Tests.cs index fc020da2dd..dbc762b0d8 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/TypeHelper_Tests.cs +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/TypeHelper_Tests.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using Shouldly; using Xunit; @@ -91,6 +92,52 @@ public class TypeHelper_Tests TypeHelper.ConvertFromString(null).ShouldBeNull(); } + [Theory] + [InlineData(0.1, "0.1")] + [InlineData(19.99, "19.99")] + [InlineData(-2878.8, "-2878.8")] + [InlineData(123456.789012, "123456.789012")] + public void ChangeTypePrimitiveExtended_Should_Keep_A_Double_As_Written(double value, string expected) + { + var amount = decimal.Parse(expected, CultureInfo.InvariantCulture); + + TypeHelper.ChangeTypePrimitiveExtended(value).ShouldBe(amount); + TypeHelper.ChangeTypePrimitiveExtended(value).ShouldBe(amount); + value.To().ShouldBe(amount); + } + + [Theory] + [InlineData(19.99f, "19.99")] + [InlineData(1299.9f, "1299.9")] + [InlineData(-0.01f, "-0.01")] + public void ChangeTypePrimitiveExtended_Should_Keep_A_Float_As_Written(float value, string expected) + { + var amount = decimal.Parse(expected, CultureInfo.InvariantCulture); + + TypeHelper.ChangeTypePrimitiveExtended(value).ShouldBe(amount); + value.To().ShouldBe(amount); + } + + [Theory] + [InlineData(double.NaN)] + [InlineData(double.PositiveInfinity)] + [InlineData(double.NegativeInfinity)] + [InlineData(1e29)] + [InlineData(7.9228162514264338E+28)] + public void ChangeTypePrimitiveExtended_Should_Refuse_A_Double_A_Decimal_Cannot_Hold(double value) + { + Should.Throw(() => TypeHelper.ChangeTypePrimitiveExtended(value)); + } + + [Fact] + public void ChangeTypePrimitiveExtended_Should_Convert_Other_Numbers_As_Before() + { + TypeHelper.ChangeTypePrimitiveExtended(42L).ShouldBe(42m); + TypeHelper.ChangeTypePrimitiveExtended("19.99").ShouldBe(19.99m); + TypeHelper.ChangeTypePrimitiveExtended(0.1m).ShouldBe(0.1d); + TypeHelper.ChangeTypePrimitiveExtended(2.0d).ShouldBe(2); + } + public class MyDictionary : Dictionary { diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/TelemetryService_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/TelemetryService_Tests.cs new file mode 100644 index 0000000000..a94fa7be5e --- /dev/null +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/TelemetryService_Tests.cs @@ -0,0 +1,182 @@ +using System; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using NSubstitute; +using Shouldly; +using Volo.Abp.Internal.Telemetry; +using Volo.Abp.Internal.Telemetry.Activity; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Xunit; + +namespace Volo.Abp.Telemetry; + +public class TelemetryService_Tests +{ + [Theory] + [InlineData(TaskStatus.RanToCompletion)] + [InlineData(TaskStatus.Faulted)] + [InlineData(TaskStatus.Canceled)] + public void Should_Unsubscribe_And_Release_Service_When_Activity_Completes(TaskStatus status) + { + using var started = new ManualResetEventSlim(); + using var release = new ManualResetEventSlim(); + var serviceProvider = Substitute.For(); + var builder = Substitute.For(); + builder.BuildAsync(Arg.Any()).Returns(Task.FromResult(null)); + serviceProvider.GetService(typeof(ITelemetryActivityEventBuilder)).Returns(builder); + serviceProvider.GetService(typeof(ITelemetryActivityStorage)).Returns(Substitute.For()); + serviceProvider.GetService(typeof(ITelemetryActivitySender)).Returns(Substitute.For()); + var scope = Substitute.For(); + scope.ServiceProvider.Returns(serviceProvider); + var scopeFactory = Substitute.For(); + scopeFactory.CreateScope().Returns(_ => + { + started.Set(); + if (!release.Wait(TimeSpan.FromSeconds(10))) + { + throw new TimeoutException(); + } + + if (status == TaskStatus.Faulted) + { + throw new InvalidOperationException(); + } + + if (status == TaskStatus.Canceled) + { + throw new OperationCanceledException(); + } + + return scope; + }); + + var service = StartActivity(scopeFactory); + try + { + started.Wait(TimeSpan.FromSeconds(10)).ShouldBeTrue(); + GetProcessExitHandlers().Length.ShouldBe(1); + GetCancelKeyPressHandlers().Length.ShouldBe(1); + } + finally + { + release.Set(); + } + + WaitForHandlersToBeRemoved(); + for (var i = 0; i < 3; i++) + { + GC.Collect(); + GC.WaitForPendingFinalizers(); + } + + service.IsAlive.ShouldBeFalse(); + } + + [Theory] + [InlineData(TaskStatus.RanToCompletion)] + [InlineData(TaskStatus.Faulted)] + [InlineData(TaskStatus.Canceled)] + public void Should_Not_Leave_Handlers_For_Already_Completed_Tasks(TaskStatus status) + { + var task = status switch + { + TaskStatus.Faulted => Task.FromException(new InvalidOperationException()), + TaskStatus.Canceled => Task.FromCanceled(new CancellationToken(true)), + _ => Task.CompletedTask + }; + + RegisterExitHandlers(task); + + GetProcessExitHandlers().ShouldBeEmpty(); + GetCancelKeyPressHandlers().ShouldBeEmpty(); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task Should_Wait_For_Pending_Task_On_Exit(bool cancelKeyPress) + { + var completion = new TaskCompletionSource(); + var handlerStarted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + RegisterExitHandlers(completion.Task); + var handler = cancelKeyPress ? GetCancelKeyPressHandlers().Single() : GetProcessExitHandlers().Single(); + var handlerTask = Task.Run(() => + { + handlerStarted.SetResult(true); + if (handler is ConsoleCancelEventHandler consoleHandler) + { + consoleHandler(null, null!); + } + else + { + ((EventHandler)handler)(null, EventArgs.Empty); + } + }); + + try + { + await handlerStarted.Task.WaitAsync(TimeSpan.FromSeconds(10)); + await Task.Delay(100); + handlerTask.IsCompleted.ShouldBeFalse(); + } + finally + { + completion.TrySetResult(true); + } + + await handlerTask.WaitAsync(TimeSpan.FromSeconds(10)); + WaitForHandlersToBeRemoved(); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + private static WeakReference StartActivity(IServiceScopeFactory scopeFactory) + { + var service = new TelemetryService(scopeFactory); + service.AddActivityAsync("TestActivity").GetAwaiter().GetResult(); + return new WeakReference(service); + } + + private static void RegisterExitHandlers(Task task) + { + typeof(TelemetryService).GetMethod("WaitForTelemetryTaskOnExit", BindingFlags.NonPublic | BindingFlags.Static)! + .Invoke(null, new object[] { task }); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + private static void WaitForHandlersToBeRemoved() + { + SpinWait.SpinUntil(() => GetProcessExitHandlers().Length == 0 && GetCancelKeyPressHandlers().Length == 0, + TimeSpan.FromSeconds(10)).ShouldBeTrue(); + } + + private static Delegate[] GetProcessExitHandlers() + { + return typeof(AppDomain).GetFields(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static) + .Where(field => typeof(Delegate).IsAssignableFrom(field.FieldType)) + .Select(field => field.GetValue(field.IsStatic ? null : AppDomain.CurrentDomain)) + .OfType() + .SelectMany(handler => handler.GetInvocationList()) + .Where(IsTelemetryHandler) + .ToArray(); + } + + private static Delegate[] GetCancelKeyPressHandlers() + { + return typeof(Console).GetFields(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static) + .Where(field => typeof(Delegate).IsAssignableFrom(field.FieldType)) + .Select(field => field.GetValue(null)) + .OfType() + .SelectMany(handler => handler.GetInvocationList()) + .Where(IsTelemetryHandler) + .ToArray(); + } + + private static bool IsTelemetryHandler(Delegate handler) + { + return handler.Target?.GetType().DeclaringType == typeof(TelemetryService); + } +} diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/TelemetrySolutionInfoEnricher_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/TelemetrySolutionInfoEnricher_Tests.cs new file mode 100644 index 0000000000..57e3aad372 --- /dev/null +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/TelemetrySolutionInfoEnricher_Tests.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using NSubstitute; +using Shouldly; +using Volo.Abp.Internal.Telemetry.Activity; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Activity.Providers; +using Volo.Abp.Internal.Telemetry.Constants; +using Xunit; + +namespace Volo.Abp.Telemetry; + +public class TelemetrySolutionInfoEnricher_Tests : IDisposable +{ + private readonly string _solutionDirectory; + + public TelemetrySolutionInfoEnricher_Tests() + { + _solutionDirectory = Path.Combine(Path.GetTempPath(), "abp-telemetry-" + Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(Path.Combine(_solutionDirectory, "catalog")); + Directory.CreateDirectory(Path.Combine(_solutionDirectory, "ordering")); + } + + [Fact] + public async Task Should_Handle_Modules_That_Import_Each_Other() + { + File.WriteAllText(Path.Combine(_solutionDirectory, "MySolution.abpsln"), """ + { + "modules": { + "Catalog": { "path": "catalog/Catalog.abpmdl" }, + "Ordering": { "path": "ordering/Ordering.abpmdl" } + } + } + """); + File.WriteAllText(Path.Combine(_solutionDirectory, "catalog", "Catalog.abpmdl"), """ + { + "imports": { + "Volo.Abp.SettingManagement": { "version": "10.7.0" }, + "Ordering": { "path": "../ordering/Ordering.abpmdl" } + } + } + """); + File.WriteAllText(Path.Combine(_solutionDirectory, "ordering", "Ordering.abpmdl"), """ + { + "imports": { + "Volo.Abp.FeatureManagement": { "version": "10.7.0" }, + "Catalog": { "path": "../catalog/Catalog.abpmdl" } + } + } + """); + + var storage = Substitute.For(); + storage.ShouldAddSolutionInformation(Arg.Any()).Returns(true); + var enricher = new TelemetrySolutionInfoEnricher(storage, new ServiceCollection().BuildServiceProvider()); + + var context = ActivityContext.Create("Test"); + context.Current[ActivityPropertyNames.SolutionId] = Guid.NewGuid(); + context.ExtraProperties[ActivityPropertyNames.SolutionPath] = Path.Combine(_solutionDirectory, "MySolution.abpsln"); + + await enricher.EnrichAsync(context); + + context.Current[ActivityPropertyNames.HasSolutionInfo].ShouldBe(true); + var moduleNames = ((List>)context.Current[ActivityPropertyNames.InstalledModules]!) + .Select(x => x[ActivityPropertyNames.ModuleName]) + .ToList(); + moduleNames.ShouldContain("Volo.Abp.SettingManagement"); + moduleNames.ShouldContain("Volo.Abp.FeatureManagement"); + } + + public void Dispose() + { + if (Directory.Exists(_solutionDirectory)) + { + Directory.Delete(_solutionDirectory, true); + } + } +} diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj index 734703e392..9e83d45262 100644 --- a/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj index 7bed89375d..8d07e13096 100644 --- a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj +++ b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Ddd.Application.Tests/Volo.Abp.Ddd.Application.Tests.csproj b/framework/test/Volo.Abp.Ddd.Application.Tests/Volo.Abp.Ddd.Application.Tests.csproj index 1836c9133a..12f79e3a1c 100644 --- a/framework/test/Volo.Abp.Ddd.Application.Tests/Volo.Abp.Ddd.Application.Tests.csproj +++ b/framework/test/Volo.Abp.Ddd.Application.Tests/Volo.Abp.Ddd.Application.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj index a25e59b84c..9cac1d1923 100644 --- a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj +++ b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.DistributedLocking.Abstractions.Tests/Volo.Abp.DistributedLocking.Abstractions.Tests.csproj b/framework/test/Volo.Abp.DistributedLocking.Abstractions.Tests/Volo.Abp.DistributedLocking.Abstractions.Tests.csproj index 002fe095f6..c56ead60fd 100644 --- a/framework/test/Volo.Abp.DistributedLocking.Abstractions.Tests/Volo.Abp.DistributedLocking.Abstractions.Tests.csproj +++ b/framework/test/Volo.Abp.DistributedLocking.Abstractions.Tests/Volo.Abp.DistributedLocking.Abstractions.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 true diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj index b9486fd766..acb5ebd89f 100644 --- a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj index 3ab05c5d27..1cf972bbf5 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; true true diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj index 137dba20f4..f43f2460ea 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreTestModule.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreTestModule.cs index fae245bc3a..9ff2a4f838 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreTestModule.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreTestModule.cs @@ -105,7 +105,6 @@ public class AbpEntityFrameworkCoreTestModule : AbpModule public override void OnPreApplicationInitialization(ApplicationInitializationContext context) { - context.ServiceProvider.GetRequiredService().Database.Migrate(); using (var scope = context.ServiceProvider.CreateScope()) { var categoryRepository = scope.ServiceProvider.GetRequiredService>(); diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/AbpDbContextOptionsExtension_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/AbpDbContextOptionsExtension_Tests.cs new file mode 100644 index 0000000000..d2759e1fd0 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/AbpDbContextOptionsExtension_Tests.cs @@ -0,0 +1,77 @@ +using System; +using System.Linq; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.EntityFrameworkCore.GlobalFilters; +using Xunit; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class AbpDbContextOptionsExtension_Tests +{ + [Fact] + public void Should_Create_And_Delete_InMemory_Database() + { + var options = new DbContextOptionsBuilder() + .UseInMemoryDatabase(Guid.NewGuid().ToString()) + .AddAbpDbContextOptionsExtension() + .Options; + + using var context = new DbContext(options); + context.GetService().ShouldNotBeOfType(); + context.Database.EnsureCreated().ShouldBeTrue(); + context.Database.EnsureDeleted().ShouldBeTrue(); + } + + [Fact] + public void Should_Apply_Services_Once() + { + var services = new ServiceCollection(); + services.AddEntityFrameworkSqlite(); + + new AbpDbContextOptionsExtension().ApplyServices(services); + new AbpDbContextOptionsExtension().ApplyServices(services); + + services.Count(x => x.ServiceType == typeof(IDatabase) && x.IsKeyedService).ShouldBe(1); + services.Count(x => x.ServiceType == typeof(AbpEfCoreCurrentDbContext)).ShouldBe(1); + } + + [Fact] + public void Should_Apply_Services_Again_After_The_Database_Provider() + { + var services = new ServiceCollection(); + var extension = new AbpDbContextOptionsExtension(); + + extension.ApplyServices(services); + services.AddEntityFrameworkSqlite(); + extension.ApplyServices(services); + + services.Count(x => x.ServiceType == typeof(IDatabase) && x.IsKeyedService).ShouldBe(1); + services.Count(x => x.ServiceType == typeof(ICompiledQueryCacheKeyGenerator) && x.IsKeyedService).ShouldBe(1); + services.Count(x => x.ServiceType == typeof(AbpEfCoreCurrentDbContext)).ShouldBe(1); + } + + [Fact] + public void Should_Decorate_Database_Registered_After_Applying_Services() + { + var services = new ServiceCollection(); + var extension = new AbpDbContextOptionsExtension(); + services.AddEntityFrameworkSqlite(); + extension.ApplyServices(services); + services.AddScoped(provider => ActivatorUtilities.CreateInstance(provider)); + extension.ApplyServices(services); + + using var serviceProvider = services.BuildServiceProvider(); + var options = new DbContextOptionsBuilder() + .UseSqlite("Data Source=:memory:") + .UseInternalServiceProvider(serviceProvider) + .Options; + + using var context = new DbContext(options); + context.GetService().ShouldBeOfType(); + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheMultiTenantRow.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheMultiTenantRow.cs new file mode 100644 index 0000000000..c80b5e4f0b --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheMultiTenantRow.cs @@ -0,0 +1,11 @@ +using System; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class CompiledQueryCacheMultiTenantRow : Entity, IMultiTenant +{ + public Guid? TenantId { get; set; } + public string Name { get; set; } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheSoftDeleteRow.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheSoftDeleteRow.cs new file mode 100644 index 0000000000..52ed2591ae --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheSoftDeleteRow.cs @@ -0,0 +1,11 @@ +using System; +using Volo.Abp.Data; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class CompiledQueryCacheSoftDeleteRow : Entity, ISoftDelete +{ + public bool IsDeleted { get; set; } + public string Name { get; set; } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestBase.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestBase.cs new file mode 100644 index 0000000000..d3ca9a733e --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestBase.cs @@ -0,0 +1,203 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore.GlobalFilters; +using Volo.Abp.Modularity; +using Volo.Abp.MultiTenancy; +using Volo.Abp.TestApp.Testing; +using Volo.Abp.Uow; +using Xunit; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public abstract class CompiledQueryCacheTestBase : TestAppTestBase + where TStartupModule : IAbpModule +{ + private readonly string _queryTag = Guid.NewGuid().ToString(); + + protected abstract bool UseDbFunction { get; } + + [Theory] + [InlineData(false, false)] + [InlineData(false, true)] + [InlineData(true, false)] + [InlineData(true, true)] + public async Task Should_Reuse_Compiled_Query_Without_Reusing_Tenant_Or_Filter_State(bool asyncQuery, bool hostFirst) + { + var counter = GetRequiredService(); + var before = counter.Count; + IModel sharedModel = null; + var cacheKeys = new Dictionary<(bool SoftDelete, bool MultiTenant), object>(); + var tenants = hostFirst + ? new Guid?[] + { + null, + CompiledQueryCacheTestModuleBase.TenantA, + CompiledQueryCacheTestModuleBase.TenantB, + null, + CompiledQueryCacheTestModuleBase.TenantA + } + : new Guid?[] + { + CompiledQueryCacheTestModuleBase.TenantA, + CompiledQueryCacheTestModuleBase.TenantB, + null, + CompiledQueryCacheTestModuleBase.TenantA + }; + + foreach (var tenantId in tenants) + { + foreach (var softDeleteEnabled in new[] { true, false, true }) + { + foreach (var multiTenantEnabled in new[] { true, false, true }) + { + using var scope = ServiceProvider.CreateScope(); + using var tenant = scope.ServiceProvider.GetRequiredService().Change(tenantId); + var dataFilter = scope.ServiceProvider.GetRequiredService(); + using var softDelete = softDeleteEnabled + ? dataFilter.Enable() + : dataFilter.Disable(); + using var multiTenant = multiTenantEnabled + ? dataFilter.Enable() + : dataFilter.Disable(); + using var uow = scope.ServiceProvider.GetRequiredService().Begin(); + var context = scope.ServiceProvider.GetRequiredService(); + context.UseDbFunction().ShouldBe(UseDbFunction); + + sharedModel ??= context.Model; + context.Model.ShouldBeSameAs(sharedModel); + + var query = context.Rows + .AsNoTracking() + .TagWith(_queryTag) + .OrderBy(x => x.Name) + .Select(x => x.Name); + var cacheKeyGenerator = context.GetService(); + if (UseDbFunction) + { + cacheKeyGenerator.ShouldBeOfType(); + } + else + { + cacheKeyGenerator.ShouldNotBeOfType(); + } + + var cacheKey = cacheKeyGenerator.GenerateCacheKey(query.Expression, asyncQuery); + var filterState = (softDeleteEnabled, multiTenantEnabled); + if (cacheKeys.TryGetValue(filterState, out var previousKey)) + { + cacheKey.ShouldBe(previousKey); + } + else + { + cacheKeys.Add(filterState, cacheKey); + } + + var names = asyncQuery ? await query.ToListAsync() : query.ToList(); + names.ShouldBe(CompiledQueryCacheTestModuleBase.Rows + .Where(row => !softDeleteEnabled || !row.Deleted) + .Where(row => !multiTenantEnabled || row.TenantId == tenantId) + .Select(row => row.Name) + .OrderBy(name => name) + .ToArray()); + await uow.CompleteAsync(); + } + } + } + + var expectedCompilationCount = UseDbFunction ? 4 : 1; + cacheKeys.Values.Distinct().Count().ShouldBe(expectedCompilationCount); + (counter.Count - before).ShouldBe(expectedCompilationCount); + } + + [Fact] + public async Task Should_Read_Current_Tenant_When_Reusing_Query_In_Same_DbContext() + { + using var uow = GetRequiredService().Begin(); + var context = GetRequiredService(); + context.UseDbFunction().ShouldBe(UseDbFunction); + var currentTenant = GetRequiredService(); + var counter = GetRequiredService(); + var before = counter.Count; + var query = context.Rows + .AsNoTracking() + .TagWith(_queryTag) + .OrderBy(x => x.Name) + .Select(x => x.Name); + var tenants = new Guid?[] + { + CompiledQueryCacheTestModuleBase.TenantA, + CompiledQueryCacheTestModuleBase.TenantB, + null, + CompiledQueryCacheTestModuleBase.TenantA + }; + + foreach (var tenantId in tenants) + { + using var tenant = currentTenant.Change(tenantId); + var names = await query.ToListAsync(); + names.ShouldBe(CompiledQueryCacheTestModuleBase.Rows + .Where(row => !row.Deleted && row.TenantId == tenantId) + .Select(row => row.Name) + .OrderBy(name => name) + .ToArray()); + } + + (counter.Count - before).ShouldBe(1); + await uow.CompleteAsync(); + } + + [Fact] + public async Task Should_Apply_Filters_To_Other_Query_Entry_Points() + { + var names = await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, async db => + { + (await db.Rows.IgnoreQueryFilters().CountAsync()).ShouldBe(CompiledQueryCacheTestModuleBase.Rows.Length); + db.Rows.Select(row => row.Name).ToQueryString().ShouldContain("IsDeleted"); + + (await db.Rows.Where(row => row.Name == "B-live").ExecuteUpdateAsync(s => s.SetProperty(row => row.Name, "B-updated"))).ShouldBe(0); + (await db.Rows.Where(row => row.Name == "A-live").ExecuteUpdateAsync(s => s.SetProperty(row => row.Name, "A-updated"))).ShouldBe(1); + + var row = await db.Rows.SingleAsync(); + row.Name = "A-saved"; + await db.SaveChangesAsync(); + + return await db.Rows.AsNoTracking().Select(x => x.Name).ToListAsync(); + }); + + names.ShouldBe(new[] { "A-saved" }); + } + + protected async Task> RunInTenantAsync( + Guid? tenantId, + Func>> query) + { + using var uow = GetRequiredService().Begin(); + using var tenant = GetRequiredService().Change(tenantId); + var context = GetRequiredService(); + context.UseDbFunction().ShouldBe(UseDbFunction); + + var names = await query(context); + await uow.CompleteAsync(); + return names; + } + + protected static async Task> ToListAsync(IAsyncEnumerable source) + { + var names = new List(); + await foreach (var name in source) + { + names.Add(name); + } + + return names; + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestDatabase.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestDatabase.cs new file mode 100644 index 0000000000..580e33bd71 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestDatabase.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Update; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class CompiledQueryCacheTestDatabase : RelationalDatabase, IDisposable +{ + private readonly CompiledQueryCacheTestDatabaseRecorder _recorder; + + public CompiledQueryCacheTestDatabase( + DatabaseDependencies dependencies, + RelationalDatabaseDependencies relationalDependencies, + CompiledQueryCacheTestDatabaseRecorder recorder) + : base(dependencies, relationalDependencies) + { + _recorder = recorder; + } + + public override int SaveChanges(IList entries) + { + Interlocked.Increment(ref _recorder.SaveChangesCount); + return base.SaveChanges(entries); + } + + public override Task SaveChangesAsync(IList entries, CancellationToken cancellationToken = default) + { + Interlocked.Increment(ref _recorder.SaveChangesCount); + return base.SaveChangesAsync(entries, cancellationToken); + } + + public void Dispose() + { + Interlocked.Increment(ref _recorder.DisposeCount); + } +} + +public class CompiledQueryCacheTestDatabaseRecorder +{ + public int SaveChangesCount; + + public int DisposeCount; +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestDbContext.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestDbContext.cs new file mode 100644 index 0000000000..b22ebc1aac --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestDbContext.cs @@ -0,0 +1,17 @@ +using Microsoft.EntityFrameworkCore; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class CompiledQueryCacheTestDbContext : AbpDbContext +{ + public DbSet Rows { get; set; } + + public DbSet SoftDeleteRows { get; set; } + + public DbSet MultiTenantRows { get; set; } + + public CompiledQueryCacheTestDbContext(DbContextOptions options) + : base(options) + { + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestHooks.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestHooks.cs new file mode 100644 index 0000000000..89d94ad631 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestHooks.cs @@ -0,0 +1,49 @@ +using System; +using System.Linq.Expressions; +using Microsoft.EntityFrameworkCore.Diagnostics; +using Volo.Abp.EntityFrameworkCore.GlobalFilters; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class CompiledQueryCacheTestHooks +{ + public Action OnQueryCompilationStarting { get; set; } + + public Action OnGetCompiledQueryCacheKey { get; set; } +} + +public class CompiledQueryCacheTestInterceptor : IQueryExpressionInterceptor +{ + private readonly CompiledQueryCacheTestHooks _hooks; + + public CompiledQueryCacheTestInterceptor(CompiledQueryCacheTestHooks hooks) + { + _hooks = hooks; + } + + public Expression QueryCompilationStarting(Expression queryExpression, QueryExpressionEventData eventData) + { + if (eventData.Context is CompiledQueryCacheTestDbContext dbContext) + { + _hooks.OnQueryCompilationStarting?.Invoke(dbContext); + } + + return queryExpression; + } +} + +public class CompiledQueryCacheTestKeyProvider : IAbpEfCoreCompiledQueryCacheKeyProvider +{ + private readonly CompiledQueryCacheTestHooks _hooks; + + public CompiledQueryCacheTestKeyProvider(CompiledQueryCacheTestHooks hooks) + { + _hooks = hooks; + } + + public string GetCompiledQueryCacheKey() + { + _hooks.OnGetCompiledQueryCacheKey?.Invoke(); + return null; + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModule.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModule.cs new file mode 100644 index 0000000000..30680f84ac --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModule.cs @@ -0,0 +1,11 @@ +using Volo.Abp.Autofac; +using Volo.Abp.EntityFrameworkCore.Sqlite; +using Volo.Abp.Modularity; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +[DependsOn(typeof(AbpEntityFrameworkCoreSqliteModule), typeof(AbpAutofacModule))] +public class CompiledQueryCacheTestModule : CompiledQueryCacheTestModuleBase +{ + protected override bool UseDbFunction => true; +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleBase.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleBase.cs new file mode 100644 index 0000000000..7f8552d7cd --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleBase.cs @@ -0,0 +1,122 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Diagnostics; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore.GlobalFilters; +using Volo.Abp.EntityFrameworkCore.Sqlite; +using Volo.Abp.Modularity; +using Volo.Abp.Uow; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public abstract class CompiledQueryCacheTestModuleBase : AbpModule +{ + public static readonly Guid TenantA = Guid.Parse("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"); + public static readonly Guid TenantB = Guid.Parse("bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"); + public static readonly (string Name, Guid? TenantId, bool Deleted)[] Rows = + { + ("A-live", TenantA, false), + ("A-deleted", TenantA, true), + ("B-live", TenantB, false), + ("B-deleted", TenantB, true), + ("Host-live", null, false), + ("Host-deleted", null, true) + }; + + private readonly AbpUnitTestSqliteDatabase _database = new(); + private ServiceProvider _efServiceProvider; + + protected abstract bool UseDbFunction { get; } + + protected virtual bool AddAbpServicesBeforeDatabaseProvider => false; + + protected virtual bool AddCustomDatabase => false; + + // When false, EF Core builds its own service provider, so it applies the ReplaceService calls of the options. + protected virtual bool UseExternalEfServiceProvider => true; + + protected virtual void ConfigureEfOptions(DbContextOptionsBuilder options) + { + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + var counter = new QueryCompilationCounter(); + var hooks = new CompiledQueryCacheTestHooks(); + var databaseRecorder = new CompiledQueryCacheTestDatabaseRecorder(); + + if (UseExternalEfServiceProvider) + { + // Avoid growing EF's global service-provider cache across test applications. + var efServices = new ServiceCollection(); + if (UseDbFunction && AddAbpServicesBeforeDatabaseProvider) + { + new AbpDbContextOptionsExtension().ApplyServices(efServices); + } + + efServices.AddEntityFrameworkSqlite(); + if (AddCustomDatabase) + { + efServices.AddSingleton(databaseRecorder); + efServices.AddScoped(provider => ActivatorUtilities.CreateInstance(provider)); + } + + efServices.AddSingleton(new CompiledQueryCacheTestInterceptor(hooks)); + if (UseDbFunction && !AddAbpServicesBeforeDatabaseProvider) + { + new AbpDbContextOptionsExtension().ApplyServices(efServices); + } + + _efServiceProvider = efServices.BuildServiceProvider(); + } + + context.Services.AddSingleton(counter); + context.Services.AddSingleton(hooks); + context.Services.AddSingleton(databaseRecorder); + context.Services.AddTransient(_ => new CompiledQueryCacheTestKeyProvider(hooks)); + context.Services.AddAbpDbContext(); + Configure(options => options.UseDbFunction = UseDbFunction); + Configure(options => options.ConnectionStrings.Default = _database.ConnectionString); + Configure(options => options.Configure(configuration => + { + configuration.UseSqlite(); + configuration.DbContextOptions.UseLoggerFactory(null); + if (UseExternalEfServiceProvider) + { + configuration.DbContextOptions.UseInternalServiceProvider(_efServiceProvider); + } + else + { + configuration.DbContextOptions.EnableServiceProviderCaching(false); + configuration.DbContextOptions.AddInterceptors(new CompiledQueryCacheTestInterceptor(hooks)); + } + + ConfigureEfOptions(configuration.DbContextOptions); + configuration.DbContextOptions.LogTo( + _ => counter.Increment(), + new[] { CoreEventId.QueryCompilationStarting }); + })); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + using var scope = context.ServiceProvider.CreateScope(); + using var uow = scope.ServiceProvider.GetRequiredService().Begin(); + var dbContext = scope.ServiceProvider.GetRequiredService(); + dbContext.Database.EnsureCreated(); + foreach (var row in Rows) + { + dbContext.Database.ExecuteSqlInterpolated( + $@"INSERT INTO Rows (Id, TenantId, IsDeleted, Name) + VALUES ({Guid.NewGuid()}, {row.TenantId}, {row.Deleted}, {row.Name})"); + } + } + + public override void OnApplicationShutdown(ApplicationShutdownContext context) + { + _database.Dispose(); + _efServiceProvider?.Dispose(); + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithAbpServicesFirst.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithAbpServicesFirst.cs new file mode 100644 index 0000000000..9fc58b9070 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithAbpServicesFirst.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Autofac; +using Volo.Abp.EntityFrameworkCore.Sqlite; +using Volo.Abp.Modularity; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +[DependsOn(typeof(AbpEntityFrameworkCoreSqliteModule), typeof(AbpAutofacModule))] +public class CompiledQueryCacheTestModuleWithAbpServicesFirst : CompiledQueryCacheTestModuleBase +{ + protected override bool UseDbFunction => true; + + protected override bool AddAbpServicesBeforeDatabaseProvider => true; +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithDatabaseFactory.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithDatabaseFactory.cs new file mode 100644 index 0000000000..b7aeafc846 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithDatabaseFactory.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Autofac; +using Volo.Abp.EntityFrameworkCore.Sqlite; +using Volo.Abp.Modularity; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +[DependsOn(typeof(AbpEntityFrameworkCoreSqliteModule), typeof(AbpAutofacModule))] +public class CompiledQueryCacheTestModuleWithDatabaseFactory : CompiledQueryCacheTestModuleBase +{ + protected override bool UseDbFunction => true; + + protected override bool AddCustomDatabase => true; +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithQueryCompiler.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithQueryCompiler.cs new file mode 100644 index 0000000000..abd4b085e4 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithQueryCompiler.cs @@ -0,0 +1,43 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Internal; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Autofac; +using Volo.Abp.EntityFrameworkCore.Sqlite; +using Volo.Abp.Modularity; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +[DependsOn(typeof(AbpEntityFrameworkCoreSqliteModule), typeof(AbpAutofacModule))] +public class CompiledQueryCacheTestModuleWithQueryCompiler : CompiledQueryCacheTestModuleBase +{ + private readonly CompiledQueryCacheTestQueryCompilerOptions _queryCompilerOptions = new(); + + protected override bool UseDbFunction => true; + + protected override bool UseExternalEfServiceProvider => false; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddSingleton(_queryCompilerOptions); + base.ConfigureServices(context); + } + + protected override void ConfigureEfOptions(DbContextOptionsBuilder options) + { +#pragma warning disable EF1001 + if (_queryCompilerOptions.ReplaceImplementationType) + { + options.ReplaceService(); + } + else + { + options.ReplaceService(); + } +#pragma warning restore EF1001 + } +} + +public class CompiledQueryCacheTestQueryCompilerOptions +{ + public bool ReplaceImplementationType { get; set; } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithoutDbFunction.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithoutDbFunction.cs new file mode 100644 index 0000000000..4761463966 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestModuleWithoutDbFunction.cs @@ -0,0 +1,11 @@ +using Volo.Abp.Autofac; +using Volo.Abp.EntityFrameworkCore.Sqlite; +using Volo.Abp.Modularity; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +[DependsOn(typeof(AbpEntityFrameworkCoreSqliteModule), typeof(AbpAutofacModule))] +public class CompiledQueryCacheTestModuleWithoutDbFunction : CompiledQueryCacheTestModuleBase +{ + protected override bool UseDbFunction => false; +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestQueryCompiler.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestQueryCompiler.cs new file mode 100644 index 0000000000..83a3067ebf --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestQueryCompiler.cs @@ -0,0 +1,56 @@ +using System; +using System.Linq.Expressions; +using System.Threading; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Internal; +using Microsoft.Extensions.DependencyInjection; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +#pragma warning disable EF1001 +// A custom query compiler that an application registers with ReplaceService. +public class CompiledQueryCacheTestQueryCompiler : IQueryCompiler +{ + private readonly QueryCompiler _inner; + + public int ExecuteCount { get; private set; } + + public int CreateCompiledQueryCount { get; private set; } + + public CompiledQueryCacheTestQueryCompiler(IServiceProvider serviceProvider) + { + _inner = ActivatorUtilities.CreateInstance(serviceProvider); + } + + public TResult Execute(Expression query) + { + ExecuteCount++; + return _inner.Execute(query); + } + + public TResult ExecuteAsync(Expression query, CancellationToken cancellationToken) + { + ExecuteCount++; + return _inner.ExecuteAsync(query, cancellationToken); + } + + public Func CreateCompiledQuery(Expression query) + { + CreateCompiledQueryCount++; + return _inner.CreateCompiledQuery(query); + } + + public Func CreateCompiledAsyncQuery(Expression query) + { + CreateCompiledQueryCount++; + return _inner.CreateCompiledAsyncQuery(query); + } + +#pragma warning disable EF9100 + public Expression> PrecompileQuery(Expression query, bool async) + { + return _inner.PrecompileQuery(query, async); + } +#pragma warning restore EF9100 +} +#pragma warning restore EF1001 diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestRow.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestRow.cs new file mode 100644 index 0000000000..f32ebf6b14 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCacheTestRow.cs @@ -0,0 +1,13 @@ +using System; +using Volo.Abp.Data; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class CompiledQueryCacheTestRow : Entity, IMultiTenant, ISoftDelete +{ + public Guid? TenantId { get; set; } + public bool IsDeleted { get; set; } + public string Name { get; set; } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_AbpServicesFirst_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_AbpServicesFirst_Tests.cs new file mode 100644 index 0000000000..59bba7fcd6 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_AbpServicesFirst_Tests.cs @@ -0,0 +1,25 @@ +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Shouldly; +using Volo.Abp.MultiTenancy; +using Volo.Abp.TestApp.Testing; +using Volo.Abp.Uow; +using Xunit; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class CompiledQueryCache_AbpServicesFirst_Tests : TestAppTestBase +{ + [Fact] + public async Task Should_Not_Run_Query_Without_Filters() + { + using var uow = GetRequiredService().Begin(); + using var tenant = GetRequiredService().Change(CompiledQueryCacheTestModuleBase.TenantA); + var context = GetRequiredService(); + context.UseDbFunction().ShouldBeTrue(); + + var exception = await Should.ThrowAsync(() => context.Rows.Select(row => row.Name).ToListAsync()); + exception.Message.ShouldContain("AbpDbContextOptionsExtension"); + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_DatabaseFactory_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_DatabaseFactory_Tests.cs new file mode 100644 index 0000000000..c9b0a7a4bd --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_DatabaseFactory_Tests.cs @@ -0,0 +1,49 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; +using Xunit; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class CompiledQueryCache_DatabaseFactory_Tests : CompiledQueryCacheTestBase +{ + protected override bool UseDbFunction => true; + + [Fact] + public async Task Should_Not_Run_Compiled_Query_First_Run_Inside_Another_Query_Without_Filters() + { + var countRows = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => db.Rows.Count()); + + var exception = await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + Task.FromResult(db.Rows.Where(row => row.Name.Length > countRows(db)).Select(row => row.Name).ToList()))); + exception.InnerException.ShouldBeOfType(); + } + + [Fact] + public async Task Should_Keep_Using_And_Disposing_The_Custom_Database() + { + var recorder = GetRequiredService(); + var disposeCount = recorder.DisposeCount; + + using (var scope = ServiceProvider.CreateScope()) + { + using var uow = scope.ServiceProvider.GetRequiredService().Begin(); + using var tenant = scope.ServiceProvider.GetRequiredService().Change(CompiledQueryCacheTestModuleBase.TenantA); + var db = scope.ServiceProvider.GetRequiredService(); + + var row = await db.Rows.SingleAsync(); + row.Name = "A-saved"; + await db.SaveChangesAsync(); + await uow.CompleteAsync(); + } + + recorder.SaveChangesCount.ShouldBe(1); + recorder.DisposeCount.ShouldBeGreaterThan(disposeCount); + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_QueryCompiler_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_QueryCompiler_Tests.cs new file mode 100644 index 0000000000..57f0a341ef --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_QueryCompiler_Tests.cs @@ -0,0 +1,75 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Query.Internal; +using Shouldly; +using Volo.Abp.Data; +using Volo.Abp.MultiTenancy; +using Volo.Abp.TestApp.Testing; +using Xunit; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +#pragma warning disable EF1001 +public class CompiledQueryCache_QueryCompiler_Tests : TestAppTestBase +{ + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task Should_Use_The_Replaced_Query_Compiler(bool replaceImplementationType) + { + GetRequiredService().ReplaceImplementationType = replaceImplementationType; + + await WithUnitOfWorkAsync(async () => + { + var currentTenant = GetRequiredService(); + using (currentTenant.Change(CompiledQueryCacheTestModuleBase.TenantA)) + { + var db = GetRequiredService(); + db.UseDbFunction().ShouldBeTrue(); + var queryCompiler = db.GetService().ShouldBeOfType(); + + (await db.Rows.Select(row => row.Name).ToListAsync()).ShouldBe(new[] { "A-live" }); + using (currentTenant.Change(CompiledQueryCacheTestModuleBase.TenantB)) + { + db.Rows.Select(row => row.Name).ToList().ShouldBe(new[] { "B-live" }); + } + + queryCompiler.ExecuteCount.ShouldBe(2); + } + }); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task Should_Not_Run_Compiled_Query_First_Run_Inside_Another_Query_Without_Filters(bool replaceImplementationType) + { + GetRequiredService().ReplaceImplementationType = replaceImplementationType; + var countRows = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => db.Rows.Count()); + + await WithUnitOfWorkAsync(async () => + { + using (GetRequiredService().Change(CompiledQueryCacheTestModuleBase.TenantA)) + { + var db = GetRequiredService(); + var queryCompiler = db.GetService().ShouldBeOfType(); + var dataFilter = GetRequiredService(); + + using (dataFilter.Disable()) + using (dataFilter.Disable()) + { + var exception = Should.Throw(() => + db.Rows.Where(row => row.Name.Length > countRows(db)).Select(row => row.Name).ToList()); + exception.InnerException.ShouldBeOfType(); + } + + queryCompiler.CreateCompiledQueryCount.ShouldBe(1); + (await db.Rows.Select(row => row.Name).ToListAsync()).ShouldBe(new[] { "A-live" }); + } + }); + } +} +#pragma warning restore EF1001 diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_Tests.cs new file mode 100644 index 0000000000..146ef79eb2 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_Tests.cs @@ -0,0 +1,283 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore.GlobalFilters; +using Volo.Abp.MultiTenancy; +using Xunit; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class CompiledQueryCache_Tests : CompiledQueryCacheTestBase +{ + protected override bool UseDbFunction => true; + + [Fact] + public async Task Should_Not_Run_Compiled_Query_Without_SoftDelete_Filter() + { + var query = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => db.SoftDeleteRows.Select(x => x.Name)); + + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => Task.FromResult(query(db).ToList()))); + } + + [Fact] + public async Task Should_Not_Run_Compiled_Query_Without_MultiTenant_Filter() + { + var query = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => db.MultiTenantRows.Select(x => x.Name)); + + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => Task.FromResult(query(db).ToList()))); + } + + [Fact] + public async Task Should_Not_Run_Compiled_Query_First_Run_Inside_Another_Query_Without_Filters() + { + var countRows = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => db.Rows.Count()); + + // EF Core wraps the exceptions thrown while it evaluates the parameters of the outer query. + var exception = await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + Task.FromResult(db.Rows.Where(row => row.Name.Length > countRows(db)).Select(row => row.Name).ToList()))); + exception.InnerException.ShouldBeOfType(); + + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => Task.FromResult(new[] { countRows(db).ToString() }.ToList()))); + } + + [Fact] + public async Task Should_Not_Run_Compiled_Async_Query_First_Run_Inside_Another_Query_Without_Filters() + { + var countRowsAsync = EF.CompileAsyncQuery((CompiledQueryCacheTestDbContext db) => db.Rows.Count()); + + var exception = await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + Task.FromResult(db.Rows + .Where(row => row.Name.Length > countRowsAsync(db).GetAwaiter().GetResult()) + .Select(row => row.Name) + .ToList()))); + exception.InnerException.ShouldBeOfType(); + + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, async db => new[] { (await countRowsAsync(db)).ToString() }.ToList())); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task Should_Not_Run_Compiled_Query_First_Run_Inside_Another_Query_With_Disabled_Filters(bool asyncCompiledQuery) + { + var countRows = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => db.Rows.Count()); + var countRowsAsync = EF.CompileAsyncQuery((CompiledQueryCacheTestDbContext db) => db.Rows.Count()); + var dataFilter = GetRequiredService(); + + using (dataFilter.Disable()) + using (dataFilter.Disable()) + { + var exception = await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + Task.FromResult(asyncCompiledQuery + ? db.Rows.Where(row => row.Name.Length > countRowsAsync(db).GetAwaiter().GetResult()).Select(row => row.Name).ToList() + : db.Rows.Where(row => row.Name.Length > countRows(db)).Select(row => row.Name).ToList()))); + exception.InnerException.ShouldBeOfType(); + } + + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, async db => + new[] { (asyncCompiledQuery ? await countRowsAsync(db) : countRows(db)).ToString() }.ToList())); + } + + [Fact] + public async Task Should_Not_Run_Compiled_Query_First_Run_While_Another_Query_Is_Compiled_Without_Filters() + { + var countRows = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => db.Rows.Count()); + var countRowsAsync = EF.CompileAsyncQuery((CompiledQueryCacheTestDbContext db) => db.Rows.Count()); + var hooks = GetRequiredService(); + + hooks.OnQueryCompilationStarting = db => + { + hooks.OnQueryCompilationStarting = null; + countRows(db); + }; + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + Task.FromResult(db.Rows.TagWith(Guid.NewGuid().ToString()).Select(row => row.Name).ToList()))); + + hooks.OnQueryCompilationStarting = db => + { + hooks.OnQueryCompilationStarting = null; + countRowsAsync(db).GetAwaiter().GetResult(); + }; + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + db.Rows.TagWith(Guid.NewGuid().ToString()).Select(row => row.Name).ToListAsync())); + + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => Task.FromResult(new[] { countRows(db).ToString() }.ToList()))); + } + + [Fact] + public async Task Should_Not_Run_Compiled_Query_First_Run_While_Cache_Key_Is_Generated_Without_Filters() + { + var countRows = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => db.Rows.Count()); + var hooks = GetRequiredService(); + + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + { + hooks.OnGetCompiledQueryCacheKey = () => + { + hooks.OnGetCompiledQueryCacheKey = null; + countRows(db); + }; + + return Task.FromResult(db.Rows.TagWith(Guid.NewGuid().ToString()).Select(row => row.Name).ToList()); + })); + + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => Task.FromResult(new[] { countRows(db).ToString() }.ToList()))); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task Should_Not_Precompile_Query_While_Cache_Key_Is_Generated_Without_Filters(bool async) + { + var hooks = GetRequiredService(); + + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + { + hooks.OnGetCompiledQueryCacheKey = () => + { + hooks.OnGetCompiledQueryCacheKey = null; +#pragma warning disable EF1001, EF9100 + var queryCompiler = db.GetService(); + var query = db.Rows.Select(row => row.Name).Expression; + if (async) + { + queryCompiler.PrecompileQuery>(query, true); + } + else + { + queryCompiler.PrecompileQuery>(query, false); + } +#pragma warning restore EF1001, EF9100 + }; + + return Task.FromResult(db.Rows.TagWith(Guid.NewGuid().ToString()).Select(row => row.Name).ToList()); + })); + } + + [Fact] + public async Task Should_Provide_Current_DbContext_While_Cache_Key_Is_Generated() + { + var hooks = GetRequiredService(); + + await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, async db => + { + var currentDbContext = db.GetService(); + var contexts = new List(); + hooks.OnGetCompiledQueryCacheKey = () => contexts.Add(currentDbContext.Context); + try + { + db.Rows.Select(row => row.Name).ToList(); + await db.Rows.Select(row => row.Name).ToListAsync(); + } + finally + { + hooks.OnGetCompiledQueryCacheKey = null; + } + + contexts.Count.ShouldBe(2); + contexts.ShouldAllBe(context => context == db); + return new List(); + }); + } + + [Fact] + public async Task Should_Not_Compile_Query_With_Cache_Key_Generated_Outside_Of_Query_Provider() + { + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + { + var expression = ((IQueryable)db.Rows).Expression; + db.GetService().GenerateCacheKey(expression, false); + db.GetService().CompileQuery>(expression, false); + return Task.FromResult(new List()); + })); + } + + [Fact] + public async Task Should_Apply_Filters_To_Normal_Query_After_Compiled_Query_Failed() + { + var countRows = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => db.Rows.Count()); + + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + Task.FromResult(db.Rows.Where(row => row.Name.Length > countRows(db)).Select(row => row.Name).ToList()))); + + (await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + db.Rows.OrderBy(row => row.Name).Select(row => row.Name).ToListAsync())) + .ShouldBe(new[] { "A-live" }); + + (await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, async db => + { + Should.Throw(() => db.Rows.Where(row => row.Name.Length > countRows(db)).Select(row => row.Name).ToList()); + return await db.Rows.OrderBy(row => row.Name).Select(row => row.Name).ToListAsync(); + })) + .ShouldBe(new[] { "A-live" }); + } + + [Fact] + public async Task Should_Run_Compiled_Query_That_Ignores_Filters() + { + var countAllRows = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => db.Rows.IgnoreQueryFilters().Count()); + + (await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => Task.FromResult(new[] { countAllRows(db).ToString() }.ToList()))) + .ShouldBe(new[] { CompiledQueryCacheTestModuleBase.Rows.Length.ToString() }); + } + + [Fact] + public void Should_Not_Allow_Replacing_Database() + { + var options = new DbContextOptionsBuilder() + .UseSqlite("Data Source=:memory:") + .ReplaceService() + .AddAbpDbContextOptionsExtension() + .Options; + + Should.Throw(() => new CompiledQueryCacheTestDbContext(options).Dispose()); + } + + [Fact] + public async Task Should_Not_Compile_Query_Inside_Another_Query_Without_Filters() + { + var exception = await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => + Task.FromResult(db.Rows.Where(row => row.Name.Length > CompileRowsQuery(db)).Select(row => row.Name).ToList()))); + exception.InnerException.ShouldBeOfType(); + } + + private static int CompileRowsQuery(CompiledQueryCacheTestDbContext db) + { + db.GetService().CompileQuery>(((IQueryable)db.Rows).Expression, false); + return 0; + } + + [Fact] + public async Task Should_Not_Run_Compiled_Async_Query_Without_Filters() + { + var query = EF.CompileAsyncQuery((CompiledQueryCacheTestDbContext db) => db.Rows.Select(x => x.Name)); + + await Should.ThrowAsync(() => + RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => ToListAsync(query(db)))); + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_WithoutDbFunction_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_WithoutDbFunction_Tests.cs new file mode 100644 index 0000000000..2eb7a09844 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/CompiledQueryCache_WithoutDbFunction_Tests.cs @@ -0,0 +1,58 @@ +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Shouldly; +using Volo.Abp.Data; +using Volo.Abp.MultiTenancy; +using Xunit; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class CompiledQueryCache_WithoutDbFunction_Tests : CompiledQueryCacheTestBase +{ + protected override bool UseDbFunction => false; + + [Fact] + public async Task Should_Apply_Filters_To_Compiled_Queries() + { + var query = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => + db.Rows.OrderBy(x => x.Name).Select(x => x.Name)); + var asyncQuery = EF.CompileAsyncQuery((CompiledQueryCacheTestDbContext db) => + db.Rows.OrderBy(x => x.Name).Select(x => x.Name)); + + (await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => Task.FromResult(query(db).ToList()))) + .ShouldBe(new[] { "A-live" }); + (await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantB, db => Task.FromResult(query(db).ToList()))) + .ShouldBe(new[] { "B-live" }); + (await RunInTenantAsync(null, db => ToListAsync(asyncQuery(db)))) + .ShouldBe(new[] { "Host-live" }); + (await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => ToListAsync(asyncQuery(db)))) + .ShouldBe(new[] { "A-live" }); + } + + [Fact] + public async Task Should_Read_Filter_State_On_Every_Run_Of_Compiled_Query() + { + var query = EF.CompileQuery((CompiledQueryCacheTestDbContext db) => + db.Rows.OrderBy(x => x.Name).Select(x => x.Name)); + var dataFilter = GetRequiredService(); + + (await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => Task.FromResult(query(db).ToList()))) + .ShouldBe(new[] { "A-live" }); + + using (dataFilter.Disable()) + { + (await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => Task.FromResult(query(db).ToList()))) + .ShouldBe(new[] { "A-deleted", "A-live" }); + } + + using (dataFilter.Disable()) + { + (await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => Task.FromResult(query(db).ToList()))) + .ShouldBe(new[] { "A-live", "B-live", "Host-live" }); + } + + (await RunInTenantAsync(CompiledQueryCacheTestModuleBase.TenantA, db => Task.FromResult(query(db).ToList()))) + .ShouldBe(new[] { "A-live" }); + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/QueryCompilationCounter.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/QueryCompilationCounter.cs new file mode 100644 index 0000000000..bdd3a7c752 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/QueryCompilationCounter.cs @@ -0,0 +1,14 @@ +using System.Threading; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class QueryCompilationCounter +{ + private int _count; + public int Count => Volatile.Read(ref _count); + + public void Increment() + { + Interlocked.Increment(ref _count); + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslationTestDbContext.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslationTestDbContext.cs new file mode 100644 index 0000000000..89cb930f57 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslationTestDbContext.cs @@ -0,0 +1,56 @@ +using System; +using System.Linq.Expressions; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Query.SqlExpressions; +using Volo.Abp.EntityFrameworkCore.GlobalFilters; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class TenantDependentTranslationTestDbContext : AbpDbContext +{ + public DbSet Rows { get; set; } + + public TenantDependentTranslationTestDbContext(DbContextOptions options) + : base(options) + { + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + modelBuilder.Entity(builder => + { + builder.ToTable("CustomTranslationRows"); + builder.Property(row => row.Name).HasMaxLength(100); + builder.HasQueryFilter(row => MatchesCurrentTenant(row.OwnerTenantId, true)); + }); + + var currentDbContext = this.GetService(); + modelBuilder.HasDbFunction(typeof(TenantDependentTranslationTestDbContext) + .GetMethod(nameof(MatchesCurrentTenant))) + .HasTranslation(arguments => + { + var ownerTenantId = arguments[0]; + var boolParameter = arguments[1]; + var currentTenantId = currentDbContext.Context.CurrentTenant.Id; + + return new SqlBinaryExpression( + ExpressionType.Equal, + ownerTenantId, + new SqlConstantExpression(currentTenantId, typeof(Guid?), ownerTenantId.TypeMapping), + boolParameter.Type, + boolParameter.TypeMapping); + }); + } + + public static bool MatchesCurrentTenant(Guid? ownerTenantId, bool boolParameter) + { + throw new NotSupportedException(AbpEfCoreDataFilterDbFunctionMethods.NotSupportedExceptionMessage); + } + + public override string GetCompiledQueryCacheKey() + { + return $"{base.GetCompiledQueryCacheKey()}:{CurrentTenantId?.ToString() ?? "Null"}"; + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslationTestModule.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslationTestModule.cs new file mode 100644 index 0000000000..d3e2aa0045 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslationTestModule.cs @@ -0,0 +1,46 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Autofac; +using Volo.Abp.EntityFrameworkCore.Sqlite; +using Volo.Abp.Modularity; +using Volo.Abp.Uow; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +[DependsOn(typeof(AbpEntityFrameworkCoreSqliteModule), typeof(AbpAutofacModule))] +public class TenantDependentTranslationTestModule : CompiledQueryCacheTestModuleBase +{ + public static readonly (string Name, Guid? OwnerTenantId)[] CustomRows = + { + ("A-row", TenantA), + ("B-row", TenantB), + ("Host-row", null) + }; + + protected override bool UseDbFunction => true; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + base.ConfigureServices(context); + context.Services.AddAbpDbContext(); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + base.OnApplicationInitialization(context); + + using var scope = context.ServiceProvider.CreateScope(); + using var uow = scope.ServiceProvider.GetRequiredService().Begin(); + var dbContext = scope.ServiceProvider.GetRequiredService(); + dbContext.GetService().CreateTables(); + foreach (var row in CustomRows) + { + dbContext.Database.ExecuteSqlInterpolated( + $@"INSERT INTO CustomTranslationRows (Id, OwnerTenantId, Name) + VALUES ({Guid.NewGuid()}, {row.OwnerTenantId}, {row.Name})"); + } + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslationTestRow.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslationTestRow.cs new file mode 100644 index 0000000000..4cc7a6a63f --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslationTestRow.cs @@ -0,0 +1,11 @@ +using System; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class TenantDependentTranslationTestRow : Entity +{ + public Guid? OwnerTenantId { get; set; } + + public string Name { get; set; } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslation_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslation_Tests.cs new file mode 100644 index 0000000000..633711618b --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/CompiledQueryCache/TenantDependentTranslation_Tests.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.EntityFrameworkCore.GlobalFilters; +using Volo.Abp.MultiTenancy; +using Volo.Abp.TestApp.Testing; +using Volo.Abp.Uow; +using Xunit; + +namespace Volo.Abp.EntityFrameworkCore.DataFiltering.CompiledQueryCache; + +public class TenantDependentTranslation_Tests : TestAppTestBase +{ + [Theory] + [InlineData(false, false)] + [InlineData(false, true)] + [InlineData(true, false)] + [InlineData(true, true)] + public async Task Should_Isolate_Tenants_When_Custom_Translation_Includes_Tenant_In_Cache_Key( + bool asyncQuery, + bool hostFirst) + { + var queryTag = Guid.NewGuid().ToString(); + var counter = GetRequiredService(); + var before = counter.Count; + IModel sharedModel = null; + var cacheKeys = new HashSet(); + var tenants = hostFirst + ? new Guid?[] + { + null, + CompiledQueryCacheTestModuleBase.TenantA, + CompiledQueryCacheTestModuleBase.TenantB, + null, + CompiledQueryCacheTestModuleBase.TenantA + } + : new Guid?[] + { + CompiledQueryCacheTestModuleBase.TenantA, + CompiledQueryCacheTestModuleBase.TenantB, + CompiledQueryCacheTestModuleBase.TenantA, + null, + CompiledQueryCacheTestModuleBase.TenantB + }; + + foreach (var tenantId in tenants) + { + using var scope = ServiceProvider.CreateScope(); + using var tenant = scope.ServiceProvider.GetRequiredService().Change(tenantId); + using var uow = scope.ServiceProvider.GetRequiredService().Begin(); + var context = scope.ServiceProvider.GetRequiredService(); + context.UseDbFunction().ShouldBeTrue(); + context.CurrentTenant.Id.ShouldBe(tenantId); + + sharedModel ??= context.Model; + context.Model.ShouldBeSameAs(sharedModel); + + var query = context.Rows + .AsNoTracking() + .TagWith(queryTag) + .OrderBy(row => row.Name) + .Select(row => row.Name); + var cacheKeyGenerator = context.GetService(); + cacheKeyGenerator.ShouldBeOfType(); + var cacheKey = cacheKeyGenerator.GenerateCacheKey(query.Expression, asyncQuery); + cacheKeys.Add(cacheKey); + var names = asyncQuery ? await query.ToListAsync() : query.ToList(); + (counter.Count - before).ShouldBe(cacheKeys.Count); + + names.ShouldBe(TenantDependentTranslationTestModule.CustomRows + .Where(row => row.OwnerTenantId == tenantId) + .Select(row => row.Name) + .OrderBy(name => name) + .ToArray()); + await uow.CompleteAsync(); + } + + cacheKeys.Count.ShouldBe(3); + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DependencyInjection/ServiceCollectionDecorateExtensions_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DependencyInjection/ServiceCollectionDecorateExtensions_Tests.cs new file mode 100644 index 0000000000..6ab93249ec --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DependencyInjection/ServiceCollectionDecorateExtensions_Tests.cs @@ -0,0 +1,160 @@ +using System; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Xunit; + +namespace Volo.Abp.EntityFrameworkCore.DependencyInjection; + +public class ServiceCollectionDecorateExtensions_Tests +{ + [Fact] + public void Should_Decorate_Type_Registration() + { + var services = new ServiceCollection(); + services.AddScoped(); + + services.Decorate((_, inner) => new DecorateTestServiceDecorator(inner)); + + using var provider = services.BuildServiceProvider(); + using var scope = provider.CreateScope(); + var service = scope.ServiceProvider.GetRequiredService(); + service.ShouldBeOfType().Inner.ShouldBeOfType(); + scope.ServiceProvider.GetRequiredService().ShouldBeSameAs(service); + } + + [Fact] + public void Should_Decorate_The_Last_Registration() + { + var services = new ServiceCollection(); + services.AddScoped(); + services.AddScoped(); + + services.Decorate((_, inner) => new DecorateTestServiceDecorator(inner)); + + using var provider = services.BuildServiceProvider(); + provider.GetRequiredService() + .ShouldBeOfType().Inner.ShouldBeOfType(); + } + + [Fact] + public void Should_Dispose_Inner_Service_Created_By_Factory() + { + var services = new ServiceCollection(); + services.AddScoped(_ => new DisposableDecorateTestService()); + + services.Decorate((_, inner) => new DecorateTestServiceDecorator(inner)); + + using var provider = services.BuildServiceProvider(); + DisposableDecorateTestService inner; + using (var scope = provider.CreateScope()) + { + inner = scope.ServiceProvider.GetRequiredService() + .ShouldBeOfType().Inner.ShouldBeOfType(); + inner.DisposeCount.ShouldBe(0); + } + + inner.DisposeCount.ShouldBe(1); + } + + [Fact] + public void Should_Not_Dispose_Inner_Service_Registered_As_Instance() + { + var instance = new DisposableDecorateTestService(); + var services = new ServiceCollection(); + services.AddSingleton(instance); + + services.Decorate((_, inner) => new DecorateTestServiceDecorator(inner)); + + using (var provider = services.BuildServiceProvider()) + { + provider.GetRequiredService() + .ShouldBeOfType().Inner.ShouldBeSameAs(instance); + } + + instance.DisposeCount.ShouldBe(0); + } + + [Fact] + public void Should_Not_Allow_Returning_The_Decorated_Service() + { + var services = new ServiceCollection(); + services.AddScoped(); + + services.Decorate((_, inner) => inner); + + using var provider = services.BuildServiceProvider(); + using var scope = provider.CreateScope(); + Should.Throw(() => scope.ServiceProvider.GetRequiredService()); + } + + [Fact] + public void Should_Decorate_Once() + { + var services = new ServiceCollection(); + services.AddScoped(); + + services.Decorate((_, inner) => new DecorateTestServiceDecorator(inner)); + services.Decorate((_, inner) => new DecorateTestServiceDecorator(inner)); + + using var provider = services.BuildServiceProvider(); + provider.GetRequiredService() + .ShouldBeOfType().Inner.ShouldBeOfType(); + } + + [Fact] + public void Should_Decorate_Registration_Added_After_Decoration() + { + var services = new ServiceCollection(); + services.AddScoped(); + services.Decorate((_, inner) => new DecorateTestServiceDecorator(inner)); + services.AddScoped(); + + services.Decorate((_, inner) => new DecorateTestServiceDecorator(inner)); + + using var provider = services.BuildServiceProvider(); + provider.GetRequiredService() + .ShouldBeOfType().Inner.ShouldBeOfType(); + } + + [Fact] + public void Should_Not_Change_Services_Without_Registration() + { + var services = new ServiceCollection(); + + services.Decorate((_, inner) => new DecorateTestServiceDecorator(inner)); + + services.ShouldBeEmpty(); + } + + public interface IDecorateTestService + { + } + + public class DecorateTestService : IDecorateTestService + { + } + + public class OtherDecorateTestService : IDecorateTestService + { + } + + public class DisposableDecorateTestService : IDecorateTestService, IDisposable + { + public int DisposeCount { get; private set; } + + public void Dispose() + { + DisposeCount++; + } + } + + public class DecorateTestServiceDecorator : IDecorateTestService + { + public IDecorateTestService Inner { get; } + + public DecorateTestServiceDecorator(IDecorateTestService inner) + { + Inner = inner; + } + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/ExtraProperties_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/ExtraProperties_Tests.cs index 59eaa367fa..f7a8888782 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/ExtraProperties_Tests.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/ExtraProperties_Tests.cs @@ -48,6 +48,21 @@ public class ExtraProperties_Tests : ExtraProperties_Tests("EnumLiteral").ShouldBe(Color.White); } + [Fact] + public async Task Should_Save_And_Read_Back_Floating_Point_Amounts_As_Written() + { + var london = await CityRepository.FindByNameAsync("London"); + // The extra properties of a DTO bound from JSON hold a fractional number as a double. + london.ExtraProperties["Area"] = 19.99d; + london.ExtraProperties["Budget"] = 0.1m; + await CityRepository.UpdateAsync(london); + + var london2 = await CityRepository.FindByNameAsync("London"); + london2.GetProperty("Area").ShouldBe(19.99m); + // Not mapped to a column, so it is saved in the JSON column and read back as a double. + london2.GetProperty("Budget").ShouldBe(0.1m); + } + [Fact] public async Task An_Extra_Property_Configured_As_Extension2() { diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/TestEntityExtensionConfigurator.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/TestEntityExtensionConfigurator.cs index 2580e915f1..c46f5417e9 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/TestEntityExtensionConfigurator.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/TestEntityExtensionConfigurator.cs @@ -31,6 +31,8 @@ public static class TestEntityExtensionConfigurator "Established" ).MapEfCoreProperty( "Guid" + ).MapEfCoreProperty( + "Area" ).MapEfCoreProperty( "EnumNumber" ).MapEfCoreProperty( diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/EfCoreDatabaseProviderHelper_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/EfCoreDatabaseProviderHelper_Tests.cs index f4faf5aacb..cdaa5d0bb1 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/EfCoreDatabaseProviderHelper_Tests.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/EfCoreDatabaseProviderHelper_Tests.cs @@ -44,7 +44,7 @@ public class EfCoreDatabaseProviderHelper_Tests .ShouldBe(EfCoreDatabaseProvider.MySql); } - [Fact] + [Fact(Skip = "Oracle.EntityFrameworkCore has no EF Core 11 build yet; UseOracle throws MissingMethodException. Remove the skip once the provider ships.")] public void Should_Detect_Oracle_From_Real_Assembly() { var builder = new DbContextOptionsBuilder(); diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Migrations/EfCoreRuntimeDatabaseMigratorBase_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Migrations/EfCoreRuntimeDatabaseMigratorBase_Tests.cs new file mode 100644 index 0000000000..bd333200c1 --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Migrations/EfCoreRuntimeDatabaseMigratorBase_Tests.cs @@ -0,0 +1,159 @@ +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Shouldly; +using Volo.Abp.Modularity; +using Volo.Abp.TestApp.Testing; +using Volo.Abp.Uow; +using Xunit; + +namespace Volo.Abp.EntityFrameworkCore.Migrations; + +// The migration lock (LocalAbpDistributedLock) is process wide, so the migrator tests can not run in parallel. +[Collection(nameof(EfCoreRuntimeDatabaseMigratorBase_Tests))] +public class EfCoreRuntimeDatabaseMigratorBase_Tests : EfCoreRuntimeDatabaseMigratorBase_Tests +{ + [Fact] + public async Task Should_Save_The_Event_To_The_Outbox() + { + await CheckAndApplyDatabaseMigrationsAsync(); + + GetDirectlyPublishedEventCount().ShouldBe(0); + (await GetOutboxEventCountAsync()).ShouldBe(1); + } + + [Fact] + public async Task Should_Save_The_Event_To_The_Outbox_On_Retry_If_Saving_Fails() + { + GetRequiredService().RemainingFailures = 1; + + await CheckAndApplyDatabaseMigrationsAsync(); + + GetDirectlyPublishedEventCount().ShouldBe(0); + (await GetOutboxEventCountAsync()).ShouldBe(1); + } + + [Fact] + public async Task Should_Save_The_Event_To_The_Outbox_On_Retry_If_Another_Instance_Holds_The_Lock() + { + GetRequiredService().RemainingFailures = 1; + GetRequiredService().ContendedAcquisitionsAfterFirst = 1; + + await CheckAndApplyDatabaseMigrationsAsync(); + + GetDirectlyPublishedEventCount().ShouldBe(0); + (await GetOutboxEventCountAsync()).ShouldBe(1); + } + + [Fact] + public async Task Should_Throw_If_The_Event_Is_Not_Saved_Because_Another_Instance_Holds_The_Lock() + { + GetRequiredService().RemainingFailures = 1; + GetRequiredService().ContendedAcquisitionsAfterFirst = 2; + + await Should.ThrowAsync(CheckAndApplyDatabaseMigrationsAsync()); + + GetDirectlyPublishedEventCount().ShouldBe(0); + (await GetOutboxEventCountAsync()).ShouldBe(0); + } + + [Fact] + public async Task Should_Not_Keep_The_Pending_Event_For_The_Next_Call() + { + var migrator = GetRequiredService(); + var outboxSaveFailure = GetRequiredService(); + + outboxSaveFailure.RemainingFailures = 3; + await Should.ThrowAsync(migrator.CheckAndApplyDatabaseMigrationsAsync()); + + await migrator.CheckAndApplyDatabaseMigrationsAsync(); + + GetDirectlyPublishedEventCount().ShouldBe(0); + (await GetOutboxEventCountAsync()).ShouldBe(0); + } + + [Fact] + public async Task Should_Use_The_Current_Unit_Of_Work() + { + using (GetRequiredService().Begin(requiresNew: true)) + { + await CheckAndApplyDatabaseMigrationsAsync(); + + // Not completed, so the event is discarded with the unit of work. + } + + GetDirectlyPublishedEventCount().ShouldBe(0); + (await GetOutboxEventCountAsync()).ShouldBe(0); + } + + [Fact] + public async Task Should_Not_Publish_The_Event_Directly_If_It_Can_Not_Be_Saved_To_The_Outbox() + { + await WithUnitOfWorkAsync(async () => + { + var dbContext = await GetRequiredService>().GetDbContextAsync(); + await dbContext.Database.ExecuteSqlRawAsync("DROP TABLE AbpEventOutbox"); + }); + + await Should.ThrowAsync(CheckAndApplyDatabaseMigrationsAsync()); + + GetDirectlyPublishedEventCount().ShouldBe(0); + } +} + +[Collection(nameof(EfCoreRuntimeDatabaseMigratorBase_Tests))] +public class EfCoreRuntimeDatabaseMigratorBase_WithoutOutbox_Tests : EfCoreRuntimeDatabaseMigratorBase_Tests +{ + [Fact] + public async Task Should_Publish_The_Event_Directly() + { + await CheckAndApplyDatabaseMigrationsAsync(); + + GetDirectlyPublishedEventCount().ShouldBe(1); + (await GetOutboxEventCountAsync()).ShouldBe(0); + } + + [Fact] + public async Task Should_Not_Change_The_Unit_Of_Work_Of_The_Local_Handlers() + { + await CheckAndApplyDatabaseMigrationsAsync(); + + GetRequiredService().IsHandledInTransactionalUnitOfWork.ShouldBe(true); + } +} + +[Collection(nameof(EfCoreRuntimeDatabaseMigratorBase_Tests))] +public class EfCoreRuntimeDatabaseMigratorBase_ExcludedEvent_Tests : EfCoreRuntimeDatabaseMigratorBase_Tests +{ + [Fact] + public async Task Should_Publish_The_Event_Directly_If_The_Outbox_Does_Not_Accept_It() + { + await CheckAndApplyDatabaseMigrationsAsync(); + + GetDirectlyPublishedEventCount().ShouldBe(1); + (await GetOutboxEventCountAsync()).ShouldBe(0); + GetRequiredService().IsHandledInTransactionalUnitOfWork.ShouldBe(true); + } +} + +public abstract class EfCoreRuntimeDatabaseMigratorBase_Tests : TestAppTestBase + where TStartupModule : IAbpModule +{ + protected Task CheckAndApplyDatabaseMigrationsAsync() + { + return GetRequiredService().CheckAndApplyDatabaseMigrationsAsync(); + } + + protected int GetDirectlyPublishedEventCount() + { + return GetRequiredService().Count; + } + + protected Task GetOutboxEventCountAsync() + { + return WithUnitOfWorkAsync(async () => + { + var dbContext = await GetRequiredService>().GetDbContextAsync(); + return await dbContext.OutgoingEvents.CountAsync(); + }); + } +} diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Migrations/RuntimeDatabaseMigratorTestModule.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Migrations/RuntimeDatabaseMigratorTestModule.cs new file mode 100644 index 0000000000..907df3d3ce --- /dev/null +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Migrations/RuntimeDatabaseMigratorTestModule.cs @@ -0,0 +1,243 @@ +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Diagnostics; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Logging; +using Volo.Abp.Autofac; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EntityFrameworkCore.DistributedEvents; +using Volo.Abp.EntityFrameworkCore.Sqlite; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.Modularity; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace Volo.Abp.EntityFrameworkCore.Migrations; + +[DependsOn(typeof(AbpEntityFrameworkCoreSqliteModule), typeof(AbpAutofacModule))] +public class RuntimeDatabaseMigratorTestModule : RuntimeDatabaseMigratorTestModuleBase +{ + protected override void ConfigureOutboxes(OutboxConfigDictionary outboxes) + { + outboxes.Configure(config => + { + config.UseDbContext(); + // Keep the events in the outbox, so the tests can check them. + config.IsSendingEnabled = false; + }); + } +} + +[DependsOn(typeof(AbpEntityFrameworkCoreSqliteModule), typeof(AbpAutofacModule))] +public class RuntimeDatabaseMigratorWithoutOutboxTestModule : RuntimeDatabaseMigratorTestModuleBase +{ +} + +[DependsOn(typeof(AbpEntityFrameworkCoreSqliteModule), typeof(AbpAutofacModule))] +public class RuntimeDatabaseMigratorWithExcludedEventTestModule : RuntimeDatabaseMigratorTestModuleBase +{ + protected override void ConfigureOutboxes(OutboxConfigDictionary outboxes) + { + outboxes.Configure(config => + { + config.UseDbContext(); + config.IsSendingEnabled = false; + config.Selector = eventType => eventType != typeof(AppliedDatabaseMigrationsEto); + }); + } +} + +public abstract class RuntimeDatabaseMigratorTestModuleBase : AbpModule +{ + private readonly AbpUnitTestSqliteDatabase _database = new(); + private readonly RuntimeDatabaseMigratorTestOutboxSaveFailure _outboxSaveFailure = new(); + + protected virtual void ConfigureOutboxes(OutboxConfigDictionary outboxes) + { + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + context.Services.AddSingleton(_outboxSaveFailure); + context.Services.Replace(ServiceDescriptor.Singleton()); + context.Services.AddSingleton(provider => (RuntimeDatabaseMigratorTestDistributedLock)provider.GetRequiredService()); + + _database.CreateTables(new RuntimeDatabaseMigratorTestDbContext( + new DbContextOptionsBuilder().UseSqlite(_database.ConnectionString).Options)); + + Configure(options => + { + options.ConnectionStrings[RuntimeDatabaseMigratorTestDbContext.DatabaseName] = _database.ConnectionString; + }); + + Configure(options => + { + options.Configure(configuration => + { + configuration.UseSqlite(sqlite => + { + sqlite.ExecutionStrategy(dependencies => new RuntimeDatabaseMigratorTestRetryingExecutionStrategy(dependencies)); + }); + configuration.DbContextOptions.AddInterceptors(_outboxSaveFailure); + }); + }); + + Configure(options => ConfigureOutboxes(options.Outboxes)); + } + + public override void OnApplicationShutdown(ApplicationShutdownContext context) + { + _database.Dispose(); + } +} + +[ConnectionStringName(DatabaseName)] +public class RuntimeDatabaseMigratorTestDbContext : AbpDbContext, IHasEventOutbox +{ + public const string DatabaseName = "RuntimeDatabaseMigratorTest"; + + public DbSet OutgoingEvents { get; set; } + + public RuntimeDatabaseMigratorTestDbContext(DbContextOptions options) + : base(options) + { + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigureEventOutbox(); + } +} + +// A real pending migration, so the migrator publishes the event like after a deployment. +[DbContext(typeof(RuntimeDatabaseMigratorTestDbContext))] +[Migration("20261017000000_RuntimeDatabaseMigratorTest")] +public class RuntimeDatabaseMigratorTestMigration : Migration +{ + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.Sql("CREATE TABLE RuntimeDatabaseMigratorTestMarkers (Id INTEGER NOT NULL)"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.Sql("DROP TABLE RuntimeDatabaseMigratorTestMarkers"); + } +} + +public class TestRuntimeDatabaseMigrator : EfCoreRuntimeDatabaseMigratorBase +{ + public TestRuntimeDatabaseMigrator( + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + ICurrentTenant currentTenant, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + RuntimeDatabaseMigratorTestDbContext.DatabaseName, + unitOfWorkManager, + serviceProvider, + currentTenant, + abpDistributedLock, + distributedEventBus, + loggerFactory) + { + MinValueToWaitOnFailure = 0; + MaxValueToWaitOnFailure = 1; + } +} + +public class AppliedDatabaseMigrationsRecorder : IDistributedEventHandler, ISingletonDependency +{ + private readonly IUnitOfWorkManager _unitOfWorkManager; + private int _count; + + public int Count => _count; + + public bool? IsHandledInTransactionalUnitOfWork { get; private set; } + + public AppliedDatabaseMigrationsRecorder(IUnitOfWorkManager unitOfWorkManager) + { + _unitOfWorkManager = unitOfWorkManager; + } + + [UnitOfWork(isTransactional: true)] + public virtual Task HandleEventAsync(AppliedDatabaseMigrationsEto eventData) + { + IsHandledInTransactionalUnitOfWork = _unitOfWorkManager.Current?.Options.IsTransactional; + Interlocked.Increment(ref _count); + return Task.CompletedTask; + } +} + +public class RuntimeDatabaseMigratorTestOutboxSaveFailure : SaveChangesInterceptor +{ + public int RemainingFailures { get; set; } + + public override ValueTask> SavingChangesAsync( + DbContextEventData eventData, + InterceptionResult result, + CancellationToken cancellationToken = default) + { + if (RemainingFailures > 0 && + eventData.Context.ChangeTracker.Entries().Any(x => x.State == EntityState.Added)) + { + RemainingFailures--; + throw new DbUpdateException("Could not save the outbox event."); + } + + return base.SavingChangesAsync(eventData, result, cancellationToken); + } +} + +// Simulates another instance that holds the lock after the first acquisition. +public class RuntimeDatabaseMigratorTestDistributedLock : IAbpDistributedLock +{ + private readonly LocalAbpDistributedLock _localDistributedLock; + private int _acquisitionCount; + + public int ContendedAcquisitionsAfterFirst { get; set; } + + public RuntimeDatabaseMigratorTestDistributedLock(LocalAbpDistributedLock localDistributedLock) + { + _localDistributedLock = localDistributedLock; + } + + public Task TryAcquireAsync(string name, TimeSpan timeout = default, CancellationToken cancellationToken = default) + { + if (++_acquisitionCount > 1 && ContendedAcquisitionsAfterFirst > 0) + { + ContendedAcquisitionsAfterFirst--; + return Task.FromResult(null); + } + + return _localDistributedLock.TryAcquireAsync(name, timeout, cancellationToken); + } +} + +// Rejects user-initiated transactions, like SQL Server's EnableRetryOnFailure. +public class RuntimeDatabaseMigratorTestRetryingExecutionStrategy : ExecutionStrategy +{ + public RuntimeDatabaseMigratorTestRetryingExecutionStrategy(ExecutionStrategyDependencies dependencies) + : base(dependencies, maxRetryCount: 3, maxRetryDelay: TimeSpan.FromMilliseconds(10)) + { + } + + protected override bool ShouldRetryOn(Exception exception) + { + return false; + } +} diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj index b56a799ef2..2ad4f4d0f9 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_Concurrency_Test.cs b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_Concurrency_Test.cs new file mode 100644 index 0000000000..0c285390da --- /dev/null +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/EventBus_Concurrency_Test.cs @@ -0,0 +1,103 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace Volo.Abp.EventBus.Local; + +public class EventBus_Concurrency_Test : EventBusTestBase +{ + private const int PublishCount = 10_000; + + [Fact] + public async Task Should_Publish_While_Other_Handlers_Subscribe_And_Unsubscribe() + { + var handledCount = 0; + using var subscription = LocalEventBus.Subscribe(_ => + { + Interlocked.Increment(ref handledCount); + return Task.CompletedTask; + }); + + await PublishWhileChurningAsync( + () => LocalEventBus.Subscribe(_ => Task.CompletedTask).Dispose(), + () => LocalEventBus.PublishAsync(new MySimpleEventData(1), onUnitOfWorkComplete: false)); + + handledCount.ShouldBe(PublishCount); + } + + [Fact] + public async Task Should_Publish_While_Dynamic_Handlers_Of_The_Same_Event_Subscribe_And_Unsubscribe() + { + var handledCount = 0; + using var subscription = LocalEventBus.Subscribe(_ => + { + Interlocked.Increment(ref handledCount); + return Task.CompletedTask; + }); + + var eventName = EventNameAttribute.GetNameOrDefault(); + + await PublishWhileChurningAsync( + () => LocalEventBus.Subscribe(eventName, new SingleInstanceHandlerFactory( + new ActionEventHandler(_ => Task.CompletedTask))).Dispose(), + () => LocalEventBus.PublishAsync(new MySimpleEventData(1), onUnitOfWorkComplete: false)); + + handledCount.ShouldBe(PublishCount); + } + + [Fact] + public async Task Should_Publish_Dynamic_Event_While_Other_Handlers_Subscribe_And_Unsubscribe() + { + const string eventName = "MyConcurrencyTestDynamicEvent"; + var handledCount = 0; + using var subscription = LocalEventBus.Subscribe(eventName, new SingleInstanceHandlerFactory( + new ActionEventHandler(_ => + { + Interlocked.Increment(ref handledCount); + return Task.CompletedTask; + }))); + + await PublishWhileChurningAsync( + () => LocalEventBus.Subscribe(eventName, new SingleInstanceHandlerFactory( + new ActionEventHandler(_ => Task.CompletedTask))).Dispose(), + () => LocalEventBus.PublishAsync(eventName, new { Value = 1 }, onUnitOfWorkComplete: false)); + + handledCount.ShouldBe(PublishCount); + } + + private static async Task PublishWhileChurningAsync(Action subscribeAndUnsubscribe, Func publish) + { + var churnStarted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var churnCount = 0; + + using var cts = new CancellationTokenSource(); + var churn = Task.Run(() => + { + churnStarted.TrySetResult(); + while (!cts.IsCancellationRequested) + { + subscribeAndUnsubscribe(); + Interlocked.Increment(ref churnCount); + } + }); + + try + { + await churnStarted.Task.WaitAsync(TimeSpan.FromSeconds(10)); + + for (var i = 0; i < PublishCount; i++) + { + await publish(); + } + } + finally + { + cts.Cancel(); + await churn; + } + + churnCount.ShouldBeGreaterThan(0); + } +} diff --git a/framework/test/Volo.Abp.ExceptionHandling.Tests/Volo.Abp.ExceptionHandling.Tests.csproj b/framework/test/Volo.Abp.ExceptionHandling.Tests/Volo.Abp.ExceptionHandling.Tests.csproj index b621480809..3b022ac06d 100644 --- a/framework/test/Volo.Abp.ExceptionHandling.Tests/Volo.Abp.ExceptionHandling.Tests.csproj +++ b/framework/test/Volo.Abp.ExceptionHandling.Tests/Volo.Abp.ExceptionHandling.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj index 72b3047bbb..7517bfbefa 100644 --- a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj +++ b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj index cea5566aa5..646f8447bb 100644 --- a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj +++ b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.GlobalFeatures.Tests/Volo.Abp.GlobalFeatures.Tests.csproj b/framework/test/Volo.Abp.GlobalFeatures.Tests/Volo.Abp.GlobalFeatures.Tests.csproj index 43d6b9a316..7a4a5e8ba8 100644 --- a/framework/test/Volo.Abp.GlobalFeatures.Tests/Volo.Abp.GlobalFeatures.Tests.csproj +++ b/framework/test/Volo.Abp.GlobalFeatures.Tests/Volo.Abp.GlobalFeatures.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj b/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj index 82b2156c67..08ae4ce352 100644 --- a/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj +++ b/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj index c10435d9de..f227d6531e 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 @@ -16,6 +16,7 @@ + diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/ClientProxyUrlBuilder_PathParameter_Tests.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/ClientProxyUrlBuilder_PathParameter_Tests.cs new file mode 100644 index 0000000000..55f0220d27 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/ClientProxyUrlBuilder_PathParameter_Tests.cs @@ -0,0 +1,279 @@ +#nullable enable +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.Http.Modeling; +using Volo.Abp.Http.ProxyScripting.Generators; +using Volo.Abp.Timing; +using Xunit; +using MicrosoftOptions = Microsoft.Extensions.Options.Options; + +namespace Volo.Abp.Http.Client.ClientProxying; + +public class ClientProxyUrlBuilder_PathParameter_Tests +{ + private readonly ClientProxyUrlBuilder _builder; + private static readonly ApiVersionInfo PathApiVersion = new("Path", "1.0"); + + public ClientProxyUrlBuilder_PathParameter_Tests() + { + _builder = CreateBuilder(); + } + + [Theory] + [InlineData("plain", "api/files/plain")] + [InlineData("a&b#c", "api/files/a%26b%23c")] + [InlineData("a?b=c", "api/files/a%3Fb%3Dc")] + [InlineData("a b", "api/files/a%20b")] + [InlineData("a%23b", "api/files/a%2523b")] + [InlineData("a/b#c", "api/files/a/b%23c")] + [InlineData("rvA-a&b#", "api/files/rvA-a%26b%23%3Cq%3E")] + [InlineData("ä😀", "api/files/%C3%A4%F0%9F%98%80")] + [InlineData("...", "api/files/...")] + [InlineData("a..b", "api/files/a..b")] + [InlineData(".hidden", "api/files/.hidden")] + [InlineData("%2E%2E", "api/files/%252E%252E")] + [InlineData("..%2Fadmin", "api/files/..%252Fadmin")] + [InlineData("a\\b", "api/files/a%5Cb")] + public async Task Should_Encode_Path_Value(string value, string expectedUrl) + { + var action = BuildAction(PathParam("name")); + + var url = await _builder.GenerateUrlWithParametersAsync(action, new Dictionary { ["name"] = value }, PathApiVersion); + + url.ShouldBe(expectedUrl); + } + + [Theory] + [InlineData(".")] + [InlineData("..")] + [InlineData("../admin")] + [InlineData("a/../b")] + [InlineData("a/./b")] + [InlineData("a/..")] + [InlineData("..\\admin")] + [InlineData("a\\..\\b")] + public async Task Should_Reject_Dot_Segments(string value) + { + var exception = await Should.ThrowAsync(() => GenerateUrlAsync(value)); + + exception.Message.ShouldContain("name"); + } + + [Fact] + public async Task Should_Reject_Dot_Segments_In_Default_Path_Value() + { + var action = BuildAction(PathParam("name", defaultValue: "../admin")); + + await Should.ThrowAsync(() => _builder.GenerateUrlWithParametersAsync(action, new Dictionary(), PathApiVersion)); + } + + [Fact] + public async Task Should_Keep_Format_Of_Non_String_Path_Values() + { + var id = Guid.NewGuid(); + + (await GenerateUrlAsync(42)).ShouldBe("api/files/42"); + (await GenerateUrlAsync(id)).ShouldBe($"api/files/{id}"); + (await GenerateUrlAsync(true)).ShouldBe("api/files/True"); + (await GenerateUrlAsync(DayOfWeek.Monday)).ShouldBe("api/files/Monday"); + (await GenerateUrlAsync(new DateTime(2026, 10, 8, 12, 30, 45, DateTimeKind.Utc))).ShouldBe("api/files/2026-10-08T12%3A30%3A45.0000000Z"); + } + + [Fact] + public async Task Should_Keep_Empty_Path_Value_Empty() + { + (await GenerateUrlAsync(string.Empty)).ShouldBe("api/files/"); + } + + [Fact] + public async Task Should_Encode_Path_And_Query_Values_Separately() + { + var action = BuildAction("api/files/{name}", PathParam("name"), QueryParam("search")); + + var url = await _builder.GenerateUrlWithParametersAsync(action, new Dictionary { ["name"] = "a b#c", ["search"] = "a b#c" }, PathApiVersion); + + url.ShouldBe("api/files/a%20b%23c?search=a+b%23c"); + } + + [Fact] + public async Task Should_Replace_Path_Api_Version_And_Encode_Path_Value() + { + var action = BuildAction("api/v{apiVersion}/files/{name}", PathParam("apiVersion"), PathParam("name")); + + var url = await _builder.GenerateUrlWithParametersAsync(action, new Dictionary { ["name"] = "a#b" }, new ApiVersionInfo("Path", "1.0")); + + url.ShouldBe("api/v1.0/files/a%23b"); + } + + [Fact] + public async Task Should_Add_Query_Api_Version_After_Encoded_Path_Value() + { + var action = BuildAction(PathParam("name")); + + var url = await _builder.GenerateUrlWithParametersAsync(action, new Dictionary { ["name"] = "a#b" }, new ApiVersionInfo("Query", "1.0")); + + url.ShouldBe("api/files/a%23b?api-version=1.0"); + } + + [Fact] + public async Task Should_Not_Encode_Path_Converter_Result() + { + (await GenerateUrlWithPathConverterAsync("a%23b/c")).ShouldBe("api/files/a%23b/c"); + } + + [Theory] + [InlineData(".")] + [InlineData("..")] + [InlineData("../admin")] + [InlineData("a/../b")] + [InlineData("%2E")] + [InlineData("%2E%2E")] + [InlineData("%2e.")] + [InlineData(".%2e")] + [InlineData("a/%2e%2E/b")] + [InlineData("..\\admin")] + [InlineData("a/%2e%2e\\b")] + [InlineData("%2e%2e%2fadmin")] + [InlineData("%2e%2e%5cadmin")] + [InlineData("a%2F..%2Fb")] + [InlineData("a/..?q=1")] + [InlineData("a/..#f")] + [InlineData(".. ")] + [InlineData("..\t")] + [InlineData("..\r\n")] + public async Task Should_Reject_Dot_Segments_In_Path_Converter_Result(string value) + { + var exception = await Should.ThrowAsync(() => GenerateUrlWithPathConverterAsync(value)); + + exception.Message.ShouldContain("name"); + } + + [Theory] + [InlineData("%252E%252E")] + [InlineData("a%2Fb")] + [InlineData("...")] + [InlineData(".hidden")] + [InlineData("a..b")] + [InlineData("")] + [InlineData("a//b")] + [InlineData("a?x=/../admin")] + [InlineData("a#../admin")] + [InlineData("a/%zz/b")] + [InlineData("a/..;x/b")] + [InlineData("..%20")] + [InlineData("..%09")] + [InlineData(".\t.")] + public async Task Should_Keep_Path_Converter_Result_Unchanged(string value) + { + (await GenerateUrlWithPathConverterAsync(value)).ShouldBe("api/files/" + value); + } + + [Fact] + public async Task Should_Encode_Default_Path_Value() + { + var action = BuildAction(PathParam("name", defaultValue: "a/b#c?d")); + + var url = await _builder.GenerateUrlWithParametersAsync(action, new Dictionary(), PathApiVersion); + + url.ShouldBe("api/files/a/b%23c%3Fd"); + } + + [Fact] + public async Task Should_Remove_Missing_Optional_Path_Value() + { + var action = BuildAction(PathParam("name", isOptional: true, defaultValue: "a#b")); + + var url = await _builder.GenerateUrlWithParametersAsync(action, new Dictionary(), PathApiVersion); + + url.ShouldBe("api/files/"); + } + + private Task GenerateUrlAsync(object value) + { + return _builder.GenerateUrlWithParametersAsync(BuildAction(PathParam("name")), new Dictionary { ["name"] = value }, PathApiVersion); + } + + private static Task GenerateUrlWithPathConverterAsync(string converterResult) + { + var builder = CreateBuilder( + services => services.AddTransient(), + options => options.PathConverts.Add(typeof(PreEncodedPathValue), typeof(PreEncodedPathValueToPath))); + + return builder.GenerateUrlWithParametersAsync(BuildAction(PathParam("name")), new Dictionary { ["name"] = new PreEncodedPathValue(converterResult) }, PathApiVersion); + } + + private static ClientProxyUrlBuilder CreateBuilder(Action? configureServices = null, Action? configureOptions = null) + { + var services = new ServiceCollection(); + configureServices?.Invoke(services); + var proxyingOptions = new AbpHttpClientProxyingOptions(); + configureOptions?.Invoke(proxyingOptions); + var scopeFactory = services.BuildServiceProvider().GetRequiredService(); + return new ClientProxyUrlBuilder(scopeFactory, MicrosoftOptions.Create(proxyingOptions), new TestClock()); + } + + private static ActionApiDescriptionModel BuildAction(ParameterApiDescriptionModel parameter) + { + return BuildAction("api/files/{" + parameter.Name + "}", parameter); + } + + private static ActionApiDescriptionModel BuildAction(string url, params ParameterApiDescriptionModel[] parameters) + { + return new ActionApiDescriptionModel + { + UniqueName = "Sample", + Name = "Sample", + HttpMethod = "GET", + Url = url, + SupportedVersions = new List(), + ParametersOnMethod = new List(), + Parameters = new List(parameters) + }; + } + + private static ParameterApiDescriptionModel PathParam(string name, bool isOptional = false, object? defaultValue = null) + { + return ParameterApiDescriptionModel.Create( + name, + jsonName: null, + nameOnMethod: name, + type: typeof(string), + isOptional: isOptional, + defaultValue: defaultValue, + bindingSourceId: ParameterBindingSources.Path); + } + + private static ParameterApiDescriptionModel QueryParam(string name) + { + return ParameterApiDescriptionModel.Create( + name, + jsonName: null, + nameOnMethod: name, + type: typeof(string), + bindingSourceId: ParameterBindingSources.Query); + } + + private record PreEncodedPathValue(string Value); + + private class PreEncodedPathValueToPath : IObjectToPath + { + public Task ConvertAsync(ActionApiDescriptionModel actionApiDescription, ParameterApiDescriptionModel parameterApiDescription, PreEncodedPathValue value) + { + return Task.FromResult(value.Value); + } + } + + private class TestClock : IClock + { + public DateTime Now => DateTime.UtcNow; + public DateTimeKind Kind => DateTimeKind.Utc; + public bool SupportsMultipleTimezone => false; + public DateTime Normalize(DateTime dateTime) => dateTime; + public DateTime ConvertToUserTime(DateTime utcDateTime) => utcDateTime; + public DateTimeOffset ConvertToUserTime(DateTimeOffset dateTimeOffset) => dateTimeOffset; + public DateTime ConvertToUtc(DateTime dateTime) => dateTime; + } +} diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/RegularTestControllerStaticClientProxy.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/RegularTestControllerStaticClientProxy.cs new file mode 100644 index 0000000000..f0372d0d14 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/RegularTestControllerStaticClientProxy.cs @@ -0,0 +1,31 @@ +using System.Threading.Tasks; +using Volo.Abp.Http.DynamicProxying; + +namespace Volo.Abp.Http.Client.ClientProxying; + +public class RegularTestControllerStaticClientProxy : ClientProxyBase +{ + public virtual async Task GetWithStringPathAsync(string name) + { + return await RequestAsync(nameof(GetWithStringPathAsync), new ClientProxyRequestTypeValue + { + { typeof(string), name } + }); + } + + public virtual async Task GetWithCatchAllPathAsync(string path) + { + return await RequestAsync(nameof(GetWithCatchAllPathAsync), new ClientProxyRequestTypeValue + { + { typeof(string), path } + }); + } + + public virtual async Task GetWithSingleStarCatchAllPathAsync(string path) + { + return await RequestAsync(nameof(GetWithSingleStarCatchAllPathAsync), new ClientProxyRequestTypeValue + { + { typeof(string), path } + }); + } +} diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/RegularTestControllerStaticClientProxy_Tests.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/RegularTestControllerStaticClientProxy_Tests.cs new file mode 100644 index 0000000000..4c19190918 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/RegularTestControllerStaticClientProxy_Tests.cs @@ -0,0 +1,61 @@ +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Xunit; + +namespace Volo.Abp.Http.Client.ClientProxying; + +public class RegularTestControllerStaticClientProxy_Tests : AbpHttpClientTestBase +{ + private readonly RegularTestControllerStaticClientProxy _proxy; + + public RegularTestControllerStaticClientProxy_Tests() + { + _proxy = ServiceProvider.GetRequiredService(); + } + + [Theory] + [InlineData("plain")] + [InlineData("a&b#c")] + [InlineData("a?b=c")] + [InlineData("50% off")] + [InlineData("a+b")] + [InlineData("a%23b")] + [InlineData("rvA-a&b#")] + [InlineData("ä😀")] + [InlineData("...")] + [InlineData(".hidden")] + public async Task GetWithStringPathAsync(string name) + { + (await _proxy.GetWithStringPathAsync(name)).ShouldBe(name); + } + + [Theory] + [InlineData("../increment")] + [InlineData("..")] + [InlineData("..\\increment")] + public async Task GetWithStringPathAsync_Should_Not_Send_Dot_Segments(string name) + { + var exception = await Should.ThrowAsync(() => _proxy.GetWithStringPathAsync(name)); + exception.ShouldBeOfType(); + } + + [Theory] + [InlineData("a")] + [InlineData("a/b")] + [InlineData("a/b#c?d")] + [InlineData("a b/c&d")] + public async Task GetWithCatchAllPathAsync(string path) + { + (await _proxy.GetWithCatchAllPathAsync(path)).ShouldBe(path); + } + + [Theory] + [InlineData("a")] + [InlineData("a/b")] + [InlineData("a/b#c?d")] + public async Task GetWithSingleStarCatchAllPathAsync(string path) + { + (await _proxy.GetWithSingleStarCatchAllPathAsync(path)).ShouldBe(path); + } +} diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/regular-test-generate-proxy.json b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/regular-test-generate-proxy.json new file mode 100644 index 0000000000..c99d2a5fa5 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Client/ClientProxying/regular-test-generate-proxy.json @@ -0,0 +1,267 @@ +{ + "modules": { + "app": { + "rootPath": "app", + "remoteServiceName": "Default", + "controllers": { + "Volo.Abp.Http.DynamicProxying.RegularTestController": { + "controllerName": "RegularTest", + "controllerGroupName": "RegularTest", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.Http.DynamicProxying.RegularTestController", + "summary": null, + "remarks": null, + "description": null, + "displayName": null, + "interfaces": [ + { + "type": "Volo.Abp.Http.DynamicProxying.IRegularTestController", + "name": "IRegularTestController", + "methods": [ + { + "name": "GetWithStringPathAsync", + "parametersOnMethod": [ + { + "name": "name", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "summary": null, + "description": null, + "displayName": null + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string", + "summary": null, + "contentTypes": null, + "isRemoteStream": false + } + }, + { + "name": "GetWithCatchAllPathAsync", + "parametersOnMethod": [ + { + "name": "path", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "summary": null, + "description": null, + "displayName": null + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string", + "summary": null, + "contentTypes": null, + "isRemoteStream": false + } + }, + { + "name": "GetWithSingleStarCatchAllPathAsync", + "parametersOnMethod": [ + { + "name": "path", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "summary": null, + "description": null, + "displayName": null + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string", + "summary": null, + "contentTypes": null, + "isRemoteStream": false + } + } + ] + } + ], + "actions": { + "GetWithStringPathAsyncByName": { + "uniqueName": "GetWithStringPathAsyncByName", + "name": "GetWithStringPathAsync", + "httpMethod": "GET", + "url": "api/regular-test-controller/get-with-string-path/{name}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "name", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "summary": null, + "description": null, + "displayName": null + } + ], + "parameters": [ + { + "nameOnMethod": "name", + "name": "name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "", + "summary": null, + "description": null, + "displayName": null + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string", + "summary": null, + "contentTypes": [ + "text/plain", + "application/json", + "text/json" + ], + "isRemoteStream": false + }, + "allowAnonymous": null, + "authorizeDatas": [], + "implementFrom": "Volo.Abp.Http.DynamicProxying.IRegularTestController", + "summary": null, + "remarks": null, + "description": null, + "displayName": null + }, + "GetWithCatchAllPathAsyncByPath": { + "uniqueName": "GetWithCatchAllPathAsyncByPath", + "name": "GetWithCatchAllPathAsync", + "httpMethod": "GET", + "url": "api/regular-test-controller/get-with-catch-all-path/{path}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "path", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "summary": null, + "description": null, + "displayName": null + } + ], + "parameters": [ + { + "nameOnMethod": "path", + "name": "path", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "", + "summary": null, + "description": null, + "displayName": null + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string", + "summary": null, + "contentTypes": [ + "text/plain", + "application/json", + "text/json" + ], + "isRemoteStream": false + }, + "allowAnonymous": null, + "authorizeDatas": [], + "implementFrom": "Volo.Abp.Http.DynamicProxying.IRegularTestController", + "summary": null, + "remarks": null, + "description": null, + "displayName": null + }, + "GetWithSingleStarCatchAllPathAsyncByPath": { + "uniqueName": "GetWithSingleStarCatchAllPathAsyncByPath", + "name": "GetWithSingleStarCatchAllPathAsync", + "httpMethod": "GET", + "url": "api/regular-test-controller/get-with-single-star-catch-all-path/{path}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "path", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "summary": null, + "description": null, + "displayName": null + } + ], + "parameters": [ + { + "nameOnMethod": "path", + "name": "path", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "", + "summary": null, + "description": null, + "displayName": null + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string", + "summary": null, + "contentTypes": [ + "text/plain", + "application/json", + "text/json" + ], + "isRemoteStream": false + }, + "allowAnonymous": null, + "authorizeDatas": [], + "implementFrom": "Volo.Abp.Http.DynamicProxying.IRegularTestController", + "summary": null, + "remarks": null, + "description": null, + "displayName": null + } + } + } + } + } + }, + "types": {} +} diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/IRegularTestController.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/IRegularTestController.cs index 06965e2f0b..9f1e01266d 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/IRegularTestController.cs +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/IRegularTestController.cs @@ -55,6 +55,12 @@ public interface IRegularTestController Task GetObjectAndIdWithQueryAsync(int id, Car bodyValue); + Task GetWithStringPathAsync(string name); + + Task GetWithCatchAllPathAsync(string path); + + Task GetWithSingleStarCatchAllPathAsync(string path); + Task PutValueWithBodyAsync(string bodyValue); Task PatchValueWithBodyAsync(string bodyValue); diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestController.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestController.cs index 5a86077126..292396cfb0 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestController.cs +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestController.cs @@ -196,6 +196,27 @@ public class RegularTestController : AbpController, IRegularTestController return Task.FromResult(bodyValue); } + [HttpGet] + [Route("get-with-string-path/{name}")] + public Task GetWithStringPathAsync(string name) + { + return Task.FromResult(name); + } + + [HttpGet] + [Route("get-with-catch-all-path/{**path}")] + public Task GetWithCatchAllPathAsync(string path) + { + return Task.FromResult(path); + } + + [HttpGet] + [Route("get-with-single-star-catch-all-path/{*path}")] + public Task GetWithSingleStarCatchAllPathAsync(string path) + { + return Task.FromResult(path); + } + [HttpPut] [Route("put-with-body")] public Task PutValueWithBodyAsync([FromBody] string bodyValue) diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs index 2e1af7ada0..580c469ff6 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs @@ -157,6 +157,61 @@ public class RegularTestControllerClientProxy_Tests : AbpHttpClientTestBase result.Model.ShouldBe("Ford"); } + [Theory] + [InlineData("plain")] + [InlineData("a&b#c")] + [InlineData("a?b=c")] + [InlineData("50% off")] + [InlineData("a+b")] + [InlineData("a%23b")] + [InlineData("rvA-a&b#")] + [InlineData("ä😀")] + [InlineData("...")] + [InlineData(".hidden")] + public async Task GetWithStringPathAsync(string name) + { + var result = await _controller.GetWithStringPathAsync(name); + result.ShouldBe(name); + } + + [Theory] + [InlineData("../increment")] + [InlineData("..")] + [InlineData("..\\increment")] + public async Task GetWithStringPathAsync_Should_Not_Send_Dot_Segments(string name) + { + var exception = await Should.ThrowAsync(() => _controller.GetWithStringPathAsync(name)); + exception.ShouldBeOfType(); + } + + [Fact] + public async Task GetWithCatchAllPathAsync_Should_Not_Send_Dot_Segments() + { + var exception = await Should.ThrowAsync(() => _controller.GetWithCatchAllPathAsync("a/../../increment")); + exception.ShouldBeOfType(); + } + + [Theory] + [InlineData("a")] + [InlineData("a/b")] + [InlineData("a/b#c?d")] + [InlineData("a b/c&d")] + public async Task GetWithCatchAllPathAsync(string path) + { + var result = await _controller.GetWithCatchAllPathAsync(path); + result.ShouldBe(path); + } + + [Theory] + [InlineData("a")] + [InlineData("a/b")] + [InlineData("a/b#c?d")] + public async Task GetWithSingleStarCatchAllPathAsync(string path) + { + var result = await _controller.GetWithSingleStarCatchAllPathAsync(path); + result.ShouldBe(path); + } + [Fact] public async Task PatchValueWithBodyAsync() { diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo.Abp.Http.Client.Web.Tests.abppkg b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo.Abp.Http.Client.Web.Tests.abppkg new file mode 100644 index 0000000000..a686451fbc --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo.Abp.Http.Client.Web.Tests.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo.Abp.Http.Client.Web.Tests.csproj b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo.Abp.Http.Client.Web.Tests.csproj new file mode 100644 index 0000000000..120d30ff40 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo.Abp.Http.Client.Web.Tests.csproj @@ -0,0 +1,22 @@ + + + + + + net11.0 + Volo.Abp.Http.Client.Web.Tests + Volo.Abp.Http.Client.Web.Tests + + + + + + + + + + + + + + diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestBase.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestBase.cs new file mode 100644 index 0000000000..7ec8ca7f19 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestBase.cs @@ -0,0 +1,8 @@ +using Volo.Abp.AspNetCore; + +namespace Volo.Abp.Http.Client.Web; + +public abstract class AbpHttpClientWebTestBase : AbpAspNetCoreTestBase +{ + +} diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestModule.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestModule.cs new file mode 100644 index 0000000000..ca2f404b0c --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestModule.cs @@ -0,0 +1,41 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AspNetCore.TestBase; +using Volo.Abp.Autofac; +using Volo.Abp.Http.Client.StaticProxying; +using Volo.Abp.Http.Client.Web.Conventions; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; + +namespace Volo.Abp.Http.Client.Web; + +[DependsOn( + typeof(AbpHttpClientWebModule), + typeof(AbpAspNetCoreTestBaseModule), + typeof(AbpAutofacModule) +)] +public class AbpHttpClientWebTestModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddStaticHttpClientProxies(typeof(AbpHttpClientWebTestModule).Assembly); + + Configure(options => + { + options.BindingFromQueryTypes.Add(typeof(ClientProxyTestQueryInput)); + }); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var app = context.GetApplicationBuilder(); + + app.UseRouting(); + app.UseConfiguredEndpoints(); + } +} diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention_Tests.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention_Tests.cs new file mode 100644 index 0000000000..84fba21065 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention_Tests.cs @@ -0,0 +1,577 @@ +using System; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ActionConstraints; +using Microsoft.AspNetCore.Mvc.ApiExplorer; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.AspNetCore.Mvc.Infrastructure; +using Shouldly; +using Volo.Abp.Application.Services; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Content; +using Volo.Abp.Http.Client.ClientProxying; +using Xunit; + +namespace Volo.Abp.Http.Client.Web.Conventions; + +public class AbpHttpClientProxyServiceConvention_Tests : AbpHttpClientWebTestBase +{ + [Fact] + public async Task Should_Read_Primitive_Body_Parameter_From_Request_Body() + { + var response = await Client.PostAsync( + "/api/client-proxy-test/from-body", + new StringContent("\"Server=localhost;Database=Test\"", Encoding.UTF8, "application/json")); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + (await response.Content.ReadAsStringAsync()).ShouldBe("Server=localhost;Database=Test"); + } + + [Fact] + public async Task Should_Read_Non_String_Primitive_Body_Parameter_From_Request_Body() + { + var response = await Client.PostAsync( + "/api/client-proxy-test/number-from-body", + new StringContent("42", Encoding.UTF8, "application/json")); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + (await response.Content.ReadAsStringAsync()).ShouldBe("42"); + } + + [Fact] + public async Task Should_Keep_Reading_Other_Primitive_Parameters_From_Query_String() + { + var response = await Client.PostAsync("/api/client-proxy-test/from-query?value=test", null); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + (await response.Content.ReadAsStringAsync()).ShouldBe("test"); + } + + [Fact] + public async Task Should_Read_Primitive_Parameters_From_Query_String_In_Get_Actions() + { + var guid = Guid.NewGuid(); + + var response = await Client.GetAsync($"/api/client-proxy-test/query-parameters?number=42&flag=true&guid={guid}"); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + (await response.Content.ReadAsStringAsync()).ShouldBe($"42:True:{guid}"); + } + + [Fact] + public async Task Should_Keep_Explicit_Binding_Attribute() + { + var response = await Client.PostAsync("/api/client-proxy-test/from-explicit-query?value=test", null); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + (await response.Content.ReadAsStringAsync()).ShouldBe("test"); + } + + [Fact] + public async Task Should_Read_Complex_Parameter_From_Request_Body() + { + var response = await Client.PostAsync( + "/api/client-proxy-test", + new StringContent("{\"name\":\"test\",\"value\":42}", Encoding.UTF8, "application/json")); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + (await response.Content.ReadAsStringAsync()).ShouldBe("test:42"); + } + + [Fact] + public async Task Should_Read_Id_From_Route_And_Complex_Parameter_From_Request_Body() + { + var id = Guid.NewGuid(); + + var response = await Client.PutAsync( + $"/api/client-proxy-test/{id}", + new StringContent("{\"name\":\"test\",\"value\":42}", Encoding.UTF8, "application/json")); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + (await response.Content.ReadAsStringAsync()).ShouldBe($"{id}:test:42"); + } + + [Fact] + public async Task Should_Read_Complex_Parameter_From_Query_String_In_Get_Actions() + { + var response = await Client.GetAsync("/api/client-proxy-test?Name=test&Value=42"); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + (await response.Content.ReadAsStringAsync()).ShouldBe("test:42"); + } + + [Fact] + public async Task Should_Read_Binding_From_Query_Types_From_Query_String() + { + var response = await Client.PostAsync("/api/client-proxy-test/by-query-type?Name=test&Value=42", null); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + (await response.Content.ReadAsStringAsync()).ShouldBe("test:42"); + } + + [Fact] + public async Task Should_Read_Remote_Stream_Content_From_Form() + { + using var content = new MultipartFormDataContent(); + content.Add(new StringContent("file content"), "file", "test.txt"); + + var response = await Client.PostAsync("/api/client-proxy-test/upload", content); + + response.StatusCode.ShouldBe(HttpStatusCode.OK); + (await response.Content.ReadAsStringAsync()).ShouldBe("test.txt:file content"); + } + + [Fact] + public async Task Should_Use_Url_And_Http_Method_Of_Remote_Action() + { + var action = GetProxyAction(nameof(IClientProxyTestAppService.GetFromBodyAsync)); + + action.AttributeRouteInfo.ShouldNotBeNull(); + action.AttributeRouteInfo.Template.ShouldBe("api/client-proxy-test/from-body"); + action.ActionConstraints.ShouldNotBeNull(); + action.ActionConstraints.OfType().Single().HttpMethods.ShouldBe(new[] { "POST" }); + + var response = await Client.GetAsync("/api/client-proxy-test/from-body"); + response.StatusCode.ShouldBe(HttpStatusCode.MethodNotAllowed); + } + + [Fact] + public void Should_Use_Controller_Group_Name_As_Controller_Name() + { + var action = GetProxyAction(nameof(IClientProxyTestAppService.GetFromBodyAsync)); + + action.ControllerName.ShouldBe("ClientProxyTest"); + } + + [Fact] + public async Task Should_Remove_ClientProxy_Postfix_From_Controller_Name_Without_Controller_Group_Name() + { + var action = GetProxyAction(nameof(IClientProxyNoGroupNameAppService.GetAsync)); + + action.ControllerName.ShouldBe("ClientProxyNoGroupNameAppService"); + (await Client.GetStringAsync("/api/client-proxy-no-group-name")).ShouldBe("no-group-name"); + } + + [Fact] + public void Should_Use_Root_Path_As_Area() + { + var action = GetProxyAction(nameof(IClientProxyTestAppService.GetFromBodyAsync)); + + action.RouteValues["area"].ShouldBe("clientProxyTest"); + } + + [Theory] + [InlineData(nameof(IClientProxyTestAppService.GetNotDescribedAsync))] + [InlineData(nameof(IClientProxyTestAppService.GetNotDescribedWithRemoteServiceAsync))] + [InlineData(nameof(IClientProxyTestAppService.GetNotDescribedWithVerbAsync))] + [InlineData(nameof(IClientProxyTestAppService.GetNotDescribedHiddenAsync))] + [InlineData(nameof(IClientProxyTestAppService.GetNotDescribedIgnoredAsync))] + [InlineData(nameof(IClientProxyTestAppService.GetDisabledAsync))] + [InlineData(nameof(IClientProxyTestAppService.GetDisabledWithVerbAsync))] + public async Task Should_Not_Expose_Action_Without_Route(string methodName) + { + FindProxyAction(methodName).ShouldBeNull(); + + var response = await Client.GetAsync($"/clientProxyTest/ClientProxyTest/{methodName.RemovePostFix("Async")}"); + response.StatusCode.ShouldBe(HttpStatusCode.NotFound); + } + + [Fact] + public async Task Should_Not_Expose_Action_Without_Route_When_Controller_Has_No_Other_Route() + { + FindProxyAction(nameof(IClientProxyDisabledActionAppService.GetAsync)).ShouldBeNull(); + + (await Client.GetAsync("/clientProxyTest/ClientProxyDisabledAction/Get")).StatusCode.ShouldBe(HttpStatusCode.NotFound); + (await Client.GetAsync("/api/client-proxy-disabled-action")).StatusCode.ShouldBe(HttpStatusCode.NotFound); + } + + [Fact] + public async Task Should_Not_Expose_Actions_Of_Disabled_Client_Proxy_Without_Explicit_Route() + { + FindProxyAction(nameof(IClientProxyDisabledAppService.GetAsync)).ShouldBeNull(); + + (await Client.GetAsync("/clientProxyTest/ClientProxyDisabled/Get")).StatusCode.ShouldBe(HttpStatusCode.NotFound); + (await Client.GetAsync("/api/client-proxy-disabled")).StatusCode.ShouldBe(HttpStatusCode.NotFound); + (await Client.GetStringAsync("/api/client-proxy-disabled/with-route")).ShouldBe("disabled-with-route"); + } + + [Theory] + [InlineData(nameof(IClientProxyTestAppService.GetDisabledWithRouteAsync), "api/client-proxy-test/disabled-with-route", false)] + [InlineData(nameof(IClientProxyTestAppService.GetNotDescribedWithRouteAsync), "api/client-proxy-test/not-described-with-route", true)] + public async Task Should_Keep_Explicit_Action_Route(string methodName, string url, bool visibleInApiExplorer) + { + GetProxyAction(methodName).AttributeRouteInfo.Template.ShouldBe(url); + + (await Client.GetAsync($"/{url}")).StatusCode.ShouldBe(HttpStatusCode.OK); + GetApiDescriptions("ClientProxyTest").Any(x => x.RelativePath == url).ShouldBe(visibleInApiExplorer); + } + + [Fact] + public async Task Should_Keep_Only_Explicit_Route_Of_Action_With_Multiple_Selectors() + { + var action = GetProxyAction(nameof(IClientProxyTestAppService.GetDisabledWithVerbAndRouteAsync)); + action.AttributeRouteInfo.Template.ShouldBe("api/client-proxy-test/disabled-with-verb-and-route"); + + (await Client.PostAsync("/api/client-proxy-test/disabled-with-verb-and-route", null)).StatusCode.ShouldBe(HttpStatusCode.OK); + (await Client.GetAsync("/clientProxyTest/ClientProxyTest/GetDisabledWithVerbAndRoute")).StatusCode.ShouldBe(HttpStatusCode.NotFound); + } + + [Fact] + public async Task Should_Keep_Explicit_Controller_Route() + { + (await Client.GetStringAsync("/api/client-proxy-controller-route")).ShouldBe("controller-route"); + (await Client.GetAsync("/api/client-proxy-controller-route-json")).StatusCode.ShouldBe(HttpStatusCode.NotFound); + } + + [Fact] + public async Task Should_Hide_Client_Proxy_With_Disabled_Metadata_From_Api_Explorer() + { + (await Client.GetStringAsync("/api/client-proxy-metadata-disabled")).ShouldBe("metadata-disabled"); + GetApiDescriptions("ClientProxyMetadataDisabled").ShouldBeEmpty(); + } + + [Fact] + public async Task Should_Remove_Client_Proxy_Controller_If_Another_Controller_Implements_The_Same_Service() + { + GetActions() + .Any(x => x.ControllerTypeInfo.AsType() == typeof(ClientProxyDuplicatedAppServiceClientProxy)) + .ShouldBeFalse(); + + (await Client.GetStringAsync("/api/client-proxy-duplicated")).ShouldBe("controller"); + (await Client.GetAsync("/api/client-proxy-duplicated-proxy")).StatusCode.ShouldBe(HttpStatusCode.NotFound); + } + + [Fact] + public void Should_Add_Client_Proxy_Actions_To_Api_Explorer() + { + var apiDescriptions = GetApiDescriptions("ClientProxyTest"); + + apiDescriptions.ShouldContain(x => x.RelativePath == "api/client-proxy-test/from-body" && x.HttpMethod == "POST"); + apiDescriptions.ShouldContain(x => x.RelativePath == "api/client-proxy-test/{id}" && x.HttpMethod == "PUT"); + } + + [Fact] + public async Task Should_Hide_Action_With_Disabled_Metadata_From_Api_Explorer() + { + GetApiDescriptions("ClientProxyTest").ShouldNotContain(x => x.RelativePath == "api/client-proxy-test/hidden"); + + (await Client.GetStringAsync("/api/client-proxy-test/hidden")).ShouldBe("hidden"); + } + + private ControllerActionDescriptor[] GetActions() + { + return GetRequiredService() + .ActionDescriptors.Items + .OfType() + .ToArray(); + } + + private ControllerActionDescriptor GetProxyAction(string methodName) + { + return GetActions().Single(x => x.ControllerTypeInfo.AsType() == typeof(TClientProxy) && x.MethodInfo.Name == methodName); + } + + private ControllerActionDescriptor FindProxyAction(string methodName) + { + return GetActions().SingleOrDefault(x => x.ControllerTypeInfo.AsType() == typeof(TClientProxy) && x.MethodInfo.Name == methodName); + } + + private ApiDescription[] GetApiDescriptions(string groupName) + { + return GetRequiredService() + .ApiDescriptionGroups.Items + .Where(x => x.GroupName == groupName) + .SelectMany(x => x.Items) + .ToArray(); + } +} + +public interface IClientProxyTestAppService : IApplicationService +{ + Task GetFromBodyAsync(string value); + + Task GetFromQueryAsync(string value); + + Task GetNumberFromBodyAsync(int value); + + Task GetFromExplicitQueryAsync(string value); + + Task GetQueryParametersAsync(int number, bool flag, Guid guid); + + Task CreateAsync(ClientProxyTestInput input); + + Task UpdateAsync(Guid id, ClientProxyTestInput input); + + Task GetListAsync(ClientProxyTestInput input); + + Task GetByQueryTypeAsync(ClientProxyTestQueryInput input); + + Task UploadAsync(IRemoteStreamContent file); + + Task GetHiddenAsync(); + + Task GetNotDescribedAsync(); + + Task GetDisabledAsync(); + + Task GetDisabledWithVerbAsync(); + + Task GetNotDescribedWithRemoteServiceAsync(); + + Task GetNotDescribedWithVerbAsync(); + + Task GetNotDescribedHiddenAsync(); + + Task GetNotDescribedIgnoredAsync(); + + Task GetDisabledWithRouteAsync(); + + Task GetNotDescribedWithRouteAsync(); + + Task GetDisabledWithVerbAndRouteAsync(); +} + +// Returns the received values instead of calling a remote service, so the tests can see what the proxy controller bound. +public class ClientProxyTestAppServiceClientProxy : ClientProxyBase, IClientProxyTestAppService +{ + public virtual Task GetFromBodyAsync(string value) + { + return Task.FromResult(value); + } + + public virtual Task GetFromQueryAsync(string value) + { + return Task.FromResult(value); + } + + public virtual Task GetNumberFromBodyAsync(int value) + { + return Task.FromResult(value); + } + + public virtual Task GetFromExplicitQueryAsync([FromQuery] string value) + { + return Task.FromResult(value); + } + + public virtual Task GetQueryParametersAsync(int number, bool flag, Guid guid) + { + return Task.FromResult($"{number}:{flag}:{guid}"); + } + + public virtual Task CreateAsync(ClientProxyTestInput input) + { + return Task.FromResult($"{input.Name}:{input.Value}"); + } + + public virtual Task UpdateAsync(Guid id, ClientProxyTestInput input) + { + return Task.FromResult($"{id}:{input.Name}:{input.Value}"); + } + + public virtual Task GetListAsync(ClientProxyTestInput input) + { + return Task.FromResult($"{input.Name}:{input.Value}"); + } + + public virtual Task GetByQueryTypeAsync(ClientProxyTestQueryInput input) + { + return Task.FromResult($"{input.Name}:{input.Value}"); + } + + public virtual async Task UploadAsync(IRemoteStreamContent file) + { + using var reader = new StreamReader(file.GetStream()); + return $"{file.FileName}:{await reader.ReadToEndAsync()}"; + } + + [RemoteService(IsMetadataEnabled = false)] + public virtual Task GetHiddenAsync() + { + return Task.FromResult("hidden"); + } + + public virtual Task GetNotDescribedAsync() + { + return Task.FromResult("not-described"); + } + + [RemoteService(false)] + public virtual Task GetDisabledAsync() + { + return Task.FromResult("disabled"); + } + + [RemoteService(false)] + [HttpGet] + public virtual Task GetDisabledWithVerbAsync() + { + return Task.FromResult("disabled-with-verb"); + } + + [RemoteService] + public virtual Task GetNotDescribedWithRemoteServiceAsync() + { + return Task.FromResult("not-described-with-remote-service"); + } + + [HttpGet] + public virtual Task GetNotDescribedWithVerbAsync() + { + return Task.FromResult("not-described-with-verb"); + } + + [RemoteService(IsMetadataEnabled = false)] + public virtual Task GetNotDescribedHiddenAsync() + { + return Task.FromResult("not-described-hidden"); + } + + [ApiExplorerSettings(IgnoreApi = true)] + public virtual Task GetNotDescribedIgnoredAsync() + { + return Task.FromResult("not-described-ignored"); + } + + [RemoteService(false)] + [HttpGet("api/client-proxy-test/disabled-with-route")] + public virtual Task GetDisabledWithRouteAsync() + { + return Task.FromResult("disabled-with-route"); + } + + [HttpGet("api/client-proxy-test/not-described-with-route")] + public virtual Task GetNotDescribedWithRouteAsync() + { + return Task.FromResult("not-described-with-route"); + } + + [RemoteService(false)] + [HttpGet] + [HttpPost("api/client-proxy-test/disabled-with-verb-and-route")] + public virtual Task GetDisabledWithVerbAndRouteAsync() + { + return Task.FromResult("disabled-with-verb-and-route"); + } +} + +public class ClientProxyTestInput +{ + public string Name { get; set; } + + public int Value { get; set; } +} + +public class ClientProxyTestQueryInput +{ + public string Name { get; set; } + + public int Value { get; set; } +} + +public interface IClientProxyNoGroupNameAppService : IApplicationService +{ + Task GetAsync(); +} + +public class ClientProxyNoGroupNameAppServiceClientProxy : ClientProxyBase, IClientProxyNoGroupNameAppService +{ + public virtual Task GetAsync() + { + return Task.FromResult("no-group-name"); + } +} + +public interface IClientProxyDuplicatedAppService : IApplicationService +{ + Task GetAsync(); +} + +public class ClientProxyDuplicatedAppServiceClientProxy : ClientProxyBase, IClientProxyDuplicatedAppService +{ + public virtual Task GetAsync() + { + return Task.FromResult("proxy"); + } +} + +[Route("api/client-proxy-duplicated")] +public class ClientProxyDuplicatedController : AbpControllerBase, IClientProxyDuplicatedAppService +{ + [HttpGet] + public virtual Task GetAsync() + { + return Task.FromResult("controller"); + } +} + +public interface IClientProxyDisabledAppService : IApplicationService +{ + Task GetAsync(); + + Task GetWithRouteAsync(); +} + +[RemoteService(false)] +public class ClientProxyDisabledAppServiceClientProxy : ClientProxyBase, IClientProxyDisabledAppService +{ + public virtual Task GetAsync() + { + return Task.FromResult("disabled"); + } + + [HttpGet("api/client-proxy-disabled/with-route")] + public virtual Task GetWithRouteAsync() + { + return Task.FromResult("disabled-with-route"); + } +} + +public interface IClientProxyDisabledActionAppService : IApplicationService +{ + Task GetAsync(); +} + +public class ClientProxyDisabledActionAppServiceClientProxy : ClientProxyBase, IClientProxyDisabledActionAppService +{ + [RemoteService(false)] + public virtual Task GetAsync() + { + return Task.FromResult("disabled-action"); + } +} + +public interface IClientProxyMetadataDisabledAppService : IApplicationService +{ + Task GetAsync(); +} + +[RemoteService(IsMetadataEnabled = false)] +public class ClientProxyMetadataDisabledAppServiceClientProxy : ClientProxyBase, IClientProxyMetadataDisabledAppService +{ + public virtual Task GetAsync() + { + return Task.FromResult("metadata-disabled"); + } +} + +public interface IClientProxyControllerRouteAppService : IApplicationService +{ + Task GetAsync(); +} + +[Route("api/client-proxy-controller-route")] +public class ClientProxyControllerRouteAppServiceClientProxy : ClientProxyBase, IClientProxyControllerRouteAppService +{ + [RemoteService(false)] + [HttpGet] + public virtual Task GetAsync() + { + return Task.FromResult("controller-route"); + } +} diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Conventions/client-proxy-test-generate-proxy.json b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Conventions/client-proxy-test-generate-proxy.json new file mode 100644 index 0000000000..ed5057b876 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Conventions/client-proxy-test-generate-proxy.json @@ -0,0 +1,719 @@ +{ + "modules": { + "clientProxyTest": { + "rootPath": "clientProxyTest", + "remoteServiceName": "Default", + "controllers": { + "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestController": { + "controllerName": "ClientProxyTest", + "controllerGroupName": "ClientProxyTest", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestController", + "interfaces": [ + { + "type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService", + "name": "IClientProxyTestAppService", + "methods": [] + } + ], + "actions": { + "GetFromBodyAsyncByValue": { + "uniqueName": "GetFromBodyAsyncByValue", + "name": "GetFromBodyAsync", + "httpMethod": "POST", + "url": "api/client-proxy-test/from-body", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "value", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "value", + "name": "value", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "GetFromQueryAsyncByValue": { + "uniqueName": "GetFromQueryAsyncByValue", + "name": "GetFromQueryAsync", + "httpMethod": "POST", + "url": "api/client-proxy-test/from-query", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "value", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "value", + "name": "value", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "GetNumberFromBodyAsyncByValue": { + "uniqueName": "GetNumberFromBodyAsyncByValue", + "name": "GetNumberFromBodyAsync", + "httpMethod": "POST", + "url": "api/client-proxy-test/number-from-body", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "value", + "typeAsString": "System.Int32, System.Private.CoreLib", + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "value", + "name": "value", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "GetFromExplicitQueryAsyncByValue": { + "uniqueName": "GetFromExplicitQueryAsyncByValue", + "name": "GetFromExplicitQueryAsync", + "httpMethod": "POST", + "url": "api/client-proxy-test/from-explicit-query", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "value", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "value", + "name": "value", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "GetQueryParametersAsyncByNumberAndFlagAndGuid": { + "uniqueName": "GetQueryParametersAsyncByNumberAndFlagAndGuid", + "name": "GetQueryParametersAsync", + "httpMethod": "GET", + "url": "api/client-proxy-test/query-parameters", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "number", + "typeAsString": "System.Int32, System.Private.CoreLib", + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null + }, + { + "name": "flag", + "typeAsString": "System.Boolean, System.Private.CoreLib", + "type": "System.Boolean", + "typeSimple": "boolean", + "isOptional": false, + "defaultValue": null + }, + { + "name": "guid", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "number", + "name": "number", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "flag", + "name": "flag", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "guid", + "name": "guid", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/client-proxy-test", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput, Volo.Abp.Http.Client.Web.Tests", + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput", + "typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput", + "typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/client-proxy-test/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput, Volo.Abp.Http.Client.Web.Tests", + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput", + "typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput", + "typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/client-proxy-test", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput, Volo.Abp.Http.Client.Web.Tests", + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput", + "typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Value", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "GetByQueryTypeAsyncByInput": { + "uniqueName": "GetByQueryTypeAsyncByInput", + "name": "GetByQueryTypeAsync", + "httpMethod": "POST", + "url": "api/client-proxy-test/by-query-type", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestQueryInput, Volo.Abp.Http.Client.Web.Tests", + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestQueryInput", + "typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestQueryInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Query", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Value", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Query", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "UploadAsyncByFile": { + "uniqueName": "UploadAsyncByFile", + "name": "UploadAsync", + "httpMethod": "POST", + "url": "api/client-proxy-test/upload", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "file", + "typeAsString": "Volo.Abp.Content.IRemoteStreamContent, Volo.Abp.Core", + "type": "Volo.Abp.Content.IRemoteStreamContent", + "typeSimple": "Volo.Abp.Content.IRemoteStreamContent", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "file", + "name": "file", + "jsonName": null, + "type": "Volo.Abp.Content.IRemoteStreamContent", + "typeSimple": "Volo.Abp.Content.IRemoteStreamContent", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "FormFile", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "GetHiddenAsync": { + "uniqueName": "GetHiddenAsync", + "name": "GetHiddenAsync", + "httpMethod": "GET", + "url": "api/client-proxy-test/hidden", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "GetDisabledAsync": { + "uniqueName": "GetDisabledAsync", + "name": "GetDisabledAsync", + "httpMethod": "GET", + "url": "api/client-proxy-test/disabled", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + }, + "GetDisabledWithVerbAsync": { + "uniqueName": "GetDisabledWithVerbAsync", + "name": "GetDisabledWithVerbAsync", + "httpMethod": "GET", + "url": "api/client-proxy-test/disabled-with-verb", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService" + } + } + }, + "Volo.Abp.Http.Client.Web.Conventions.ClientProxyNoGroupNameController": { + "controllerName": "ClientProxyNoGroupName", + "controllerGroupName": "", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyNoGroupNameController", + "interfaces": [ + { + "type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyNoGroupNameAppService", + "name": "IClientProxyNoGroupNameAppService", + "methods": [] + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/client-proxy-no-group-name", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyNoGroupNameAppService" + } + } + }, + "Volo.Abp.Http.Client.Web.Conventions.ClientProxyDuplicatedController": { + "controllerName": "ClientProxyDuplicated", + "controllerGroupName": "ClientProxyDuplicated", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyDuplicatedController", + "interfaces": [ + { + "type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDuplicatedAppService", + "name": "IClientProxyDuplicatedAppService", + "methods": [] + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/client-proxy-duplicated-proxy", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDuplicatedAppService" + } + } + }, + "Volo.Abp.Http.Client.Web.Conventions.ClientProxyDisabledController": { + "controllerName": "ClientProxyDisabled", + "controllerGroupName": "ClientProxyDisabled", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyDisabledController", + "interfaces": [ + { + "type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDisabledAppService", + "name": "IClientProxyDisabledAppService", + "methods": [] + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/client-proxy-disabled", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDisabledAppService" + } + } + }, + "Volo.Abp.Http.Client.Web.Conventions.ClientProxyDisabledActionController": { + "controllerName": "ClientProxyDisabledAction", + "controllerGroupName": "ClientProxyDisabledAction", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyDisabledActionController", + "interfaces": [ + { + "type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDisabledActionAppService", + "name": "IClientProxyDisabledActionAppService", + "methods": [] + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/client-proxy-disabled-action", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDisabledActionAppService" + } + } + }, + "Volo.Abp.Http.Client.Web.Conventions.ClientProxyMetadataDisabledController": { + "controllerName": "ClientProxyMetadataDisabled", + "controllerGroupName": "ClientProxyMetadataDisabled", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyMetadataDisabledController", + "interfaces": [ + { + "type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyMetadataDisabledAppService", + "name": "IClientProxyMetadataDisabledAppService", + "methods": [] + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/client-proxy-metadata-disabled", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyMetadataDisabledAppService" + } + } + }, + "Volo.Abp.Http.Client.Web.Conventions.ClientProxyControllerRouteController": { + "controllerName": "ClientProxyControllerRoute", + "controllerGroupName": "ClientProxyControllerRoute", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyControllerRouteController", + "interfaces": [ + { + "type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyControllerRouteAppService", + "name": "IClientProxyControllerRouteAppService", + "methods": [] + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/client-proxy-controller-route-json", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyControllerRouteAppService" + } + } + } + } + } + }, + "types": {} +} diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Program.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Program.cs new file mode 100644 index 0000000000..a4a2006805 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Program.cs @@ -0,0 +1,10 @@ +using Microsoft.AspNetCore.Builder; +using Volo.Abp.AspNetCore.TestBase; +using Volo.Abp.Http.Client.Web; + +var builder = WebApplication.CreateBuilder(); +await builder.RunAbpModuleAsync(); + +public partial class Program +{ +} diff --git a/framework/test/Volo.Abp.Http.FluentValidation.Tests/Volo.Abp.Http.FluentValidation.Tests.csproj b/framework/test/Volo.Abp.Http.FluentValidation.Tests/Volo.Abp.Http.FluentValidation.Tests.csproj index f3001bd8a8..b796b0fb9e 100644 --- a/framework/test/Volo.Abp.Http.FluentValidation.Tests/Volo.Abp.Http.FluentValidation.Tests.csproj +++ b/framework/test/Volo.Abp.Http.FluentValidation.Tests/Volo.Abp.Http.FluentValidation.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 enable diff --git a/framework/test/Volo.Abp.Http.Tests/Volo.Abp.Http.Tests.csproj b/framework/test/Volo.Abp.Http.Tests/Volo.Abp.Http.Tests.csproj index 461a8b7f8c..d140cf6ef0 100644 --- a/framework/test/Volo.Abp.Http.Tests/Volo.Abp.Http.Tests.csproj +++ b/framework/test/Volo.Abp.Http.Tests/Volo.Abp.Http.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.IdentityModel.Tests/Volo.Abp.IdentityModel.Tests.csproj b/framework/test/Volo.Abp.IdentityModel.Tests/Volo.Abp.IdentityModel.Tests.csproj index db127be690..8edb0c4fc5 100644 --- a/framework/test/Volo.Abp.IdentityModel.Tests/Volo.Abp.IdentityModel.Tests.csproj +++ b/framework/test/Volo.Abp.IdentityModel.Tests/Volo.Abp.IdentityModel.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Imaging.Abstractions.Tests/Volo.Abp.Imaging.Abstractions.Tests.csproj b/framework/test/Volo.Abp.Imaging.Abstractions.Tests/Volo.Abp.Imaging.Abstractions.Tests.csproj index 767fccfa6e..16112992e0 100644 --- a/framework/test/Volo.Abp.Imaging.Abstractions.Tests/Volo.Abp.Imaging.Abstractions.Tests.csproj +++ b/framework/test/Volo.Abp.Imaging.Abstractions.Tests/Volo.Abp.Imaging.Abstractions.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Imaging.AspNetCore.Tests/Volo.Abp.Imaging.AspNetCore.Tests.csproj b/framework/test/Volo.Abp.Imaging.AspNetCore.Tests/Volo.Abp.Imaging.AspNetCore.Tests.csproj index 370082dd53..5fdf2a1ebe 100644 --- a/framework/test/Volo.Abp.Imaging.AspNetCore.Tests/Volo.Abp.Imaging.AspNetCore.Tests.csproj +++ b/framework/test/Volo.Abp.Imaging.AspNetCore.Tests/Volo.Abp.Imaging.AspNetCore.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Imaging.ImageSharp.Tests/Volo.Abp.Imaging.ImageSharp.Tests.csproj b/framework/test/Volo.Abp.Imaging.ImageSharp.Tests/Volo.Abp.Imaging.ImageSharp.Tests.csproj index 0909a0b439..01543a0a54 100644 --- a/framework/test/Volo.Abp.Imaging.ImageSharp.Tests/Volo.Abp.Imaging.ImageSharp.Tests.csproj +++ b/framework/test/Volo.Abp.Imaging.ImageSharp.Tests/Volo.Abp.Imaging.ImageSharp.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Imaging.MagickNet.Tests/Volo.Abp.Imaging.MagickNet.Tests.csproj b/framework/test/Volo.Abp.Imaging.MagickNet.Tests/Volo.Abp.Imaging.MagickNet.Tests.csproj index 8475453d4f..538b56df7c 100644 --- a/framework/test/Volo.Abp.Imaging.MagickNet.Tests/Volo.Abp.Imaging.MagickNet.Tests.csproj +++ b/framework/test/Volo.Abp.Imaging.MagickNet.Tests/Volo.Abp.Imaging.MagickNet.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo.Abp.Imaging.SkiaSharp.Tests.csproj b/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo.Abp.Imaging.SkiaSharp.Tests.csproj index d848f26d56..e721729ada 100644 --- a/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo.Abp.Imaging.SkiaSharp.Tests.csproj +++ b/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo.Abp.Imaging.SkiaSharp.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo/Abp/Imaging/SkiaSharpImageCompressorTests.cs b/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo/Abp/Imaging/SkiaSharpImageCompressorTests.cs index 4c575d9f04..577eec040a 100644 --- a/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo/Abp/Imaging/SkiaSharpImageCompressorTests.cs +++ b/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo/Abp/Imaging/SkiaSharpImageCompressorTests.cs @@ -4,6 +4,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Shouldly; +using SkiaSharp; using Xunit; namespace Volo.Abp.Imaging; @@ -176,4 +177,18 @@ public class SkiaSharpImageCompressorTests : AbpImagingSkiaSharpTestBase base.Dispose(disposing); } } + + [Fact] + public async Task Should_Apply_Exif_Orientation() + { + await using var jpegImage = SkiaSharpTestImageHelper.CreateQuadrantJpegWithExifOrientation(6); + var compressedImage = await ImageCompressor.CompressAsync(jpegImage); + + compressedImage.State.ShouldBe(ImageProcessState.Done); + using var decoded = SKBitmap.Decode(compressedImage.Result); + decoded.Width.ShouldBe(100); + decoded.Height.ShouldBe(200); + SkiaSharpTestImageHelper.GetQuadrantColors(decoded).ShouldBe("BRYG"); + compressedImage.Result.Dispose(); + } } diff --git a/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo/Abp/Imaging/SkiaSharpImageResizerTests.cs b/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo/Abp/Imaging/SkiaSharpImageResizerTests.cs index 593beb506d..001e38c5f4 100644 --- a/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo/Abp/Imaging/SkiaSharpImageResizerTests.cs +++ b/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo/Abp/Imaging/SkiaSharpImageResizerTests.cs @@ -189,4 +189,39 @@ public class SkiaSharpImageResizerTests : AbpImagingSkiaSharpTestBase (decoded.Width == 120 || decoded.Height == 80).ShouldBeTrue(); resizedImage.Result.Dispose(); } + + [Theory] + [InlineData(1, 100, 50, "RGBY")] + [InlineData(2, 100, 50, "GRYB")] + [InlineData(3, 100, 50, "YBGR")] + [InlineData(4, 100, 50, "BYRG")] + [InlineData(5, 50, 100, "RBGY")] + [InlineData(6, 50, 100, "BRYG")] + [InlineData(7, 50, 100, "YGBR")] + [InlineData(8, 50, 100, "GYRB")] + public async Task Should_Apply_Exif_Orientation(ushort orientation, int expectedWidth, int expectedHeight, string expectedQuadrants) + { + await using var jpegImage = SkiaSharpTestImageHelper.CreateQuadrantJpegWithExifOrientation(orientation); + var resizedImage = await ImageResizer.ResizeAsync(jpegImage, new ImageResizeArgs(100, 100, ImageResizeMode.Max)); + + resizedImage.State.ShouldBe(ImageProcessState.Done); + using var decoded = SKBitmap.Decode(resizedImage.Result); + decoded.Width.ShouldBe(expectedWidth); + decoded.Height.ShouldBe(expectedHeight); + SkiaSharpTestImageHelper.GetQuadrantColors(decoded).ShouldBe(expectedQuadrants); + resizedImage.Result.Dispose(); + } + + [Fact] + public async Task Should_Apply_Resize_Box_To_Upright_Image() + { + await using var jpegImage = SkiaSharpTestImageHelper.CreateQuadrantJpegWithExifOrientation(6); + var resizedImage = await ImageResizer.ResizeAsync(jpegImage, new ImageResizeArgs(100, 50, ImageResizeMode.Max)); + + resizedImage.State.ShouldBe(ImageProcessState.Done); + using var decoded = SKBitmap.Decode(resizedImage.Result); + decoded.Width.ShouldBe(25); + decoded.Height.ShouldBe(50); + resizedImage.Result.Dispose(); + } } diff --git a/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo/Abp/Imaging/SkiaSharpTestImageHelper.cs b/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo/Abp/Imaging/SkiaSharpTestImageHelper.cs new file mode 100644 index 0000000000..1333afc9aa --- /dev/null +++ b/framework/test/Volo.Abp.Imaging.SkiaSharp.Tests/Volo/Abp/Imaging/SkiaSharpTestImageHelper.cs @@ -0,0 +1,69 @@ +using System.IO; +using SkiaSharp; + +namespace Volo.Abp.Imaging; + +public static class SkiaSharpTestImageHelper +{ + public static MemoryStream CreateQuadrantJpegWithExifOrientation(ushort orientation) + { + using var bitmap = new SKBitmap(200, 100); + using (var canvas = new SKCanvas(bitmap)) + { + using var paint = new SKPaint(); + paint.Color = SKColors.Red; + canvas.DrawRect(0, 0, 100, 50, paint); + paint.Color = SKColors.Lime; + canvas.DrawRect(100, 0, 100, 50, paint); + paint.Color = SKColors.Blue; + canvas.DrawRect(0, 50, 100, 50, paint); + paint.Color = SKColors.Yellow; + canvas.DrawRect(100, 50, 100, 50, paint); + } + + using var image = SKImage.FromBitmap(bitmap); + using var data = image.Encode(SKEncodedImageFormat.Jpeg, 100); + var jpeg = data.ToArray(); + + var exif = new byte[] + { + 0xFF, 0xE1, 0x00, 0x22, + (byte)'E', (byte)'x', (byte)'i', (byte)'f', 0x00, 0x00, + (byte)'M', (byte)'M', 0x00, 0x2A, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x01, + 0x01, 0x12, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, (byte)(orientation >> 8), (byte)orientation, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 + }; + + var stream = new MemoryStream(); + stream.Write(jpeg, 0, 2); + stream.Write(exif, 0, exif.Length); + stream.Write(jpeg, 2, jpeg.Length - 2); + stream.Position = 0; + return stream; + } + + public static string GetQuadrantColors(SKBitmap bitmap) + { + return GetColorInitial(bitmap.GetPixel(bitmap.Width / 4, bitmap.Height / 4)) + + GetColorInitial(bitmap.GetPixel(bitmap.Width * 3 / 4, bitmap.Height / 4)) + + GetColorInitial(bitmap.GetPixel(bitmap.Width / 4, bitmap.Height * 3 / 4)) + + GetColorInitial(bitmap.GetPixel(bitmap.Width * 3 / 4, bitmap.Height * 3 / 4)); + } + + private static string GetColorInitial(SKColor color) + { + var red = color.Red > 200; + var green = color.Green > 200; + var blue = color.Blue > 200; + + return (red, green, blue) switch + { + (true, true, false) => "Y", + (true, false, false) => "R", + (false, true, false) => "G", + (false, false, true) => "B", + _ => "?" + }; + } +} diff --git a/framework/test/Volo.Abp.Json.Tests/Volo.Abp.Json.Tests.csproj b/framework/test/Volo.Abp.Json.Tests/Volo.Abp.Json.Tests.csproj index 6fd25b256e..fb94666fac 100644 --- a/framework/test/Volo.Abp.Json.Tests/Volo.Abp.Json.Tests.csproj +++ b/framework/test/Volo.Abp.Json.Tests/Volo.Abp.Json.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj b/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj index 44a347d932..5b2d147635 100644 --- a/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj +++ b/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj index 9fdec44c92..785b16aa91 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj +++ b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/Comments.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/Comments.json new file mode 100644 index 0000000000..8669015221 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/Comments.json @@ -0,0 +1,7 @@ +{ + // The culture is after the texts + "texts": { + "Hello": "Bonjour", + }, + "Culture": "fr", +} diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/en.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/en.json new file mode 100644 index 0000000000..d43298c5e9 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/en.json @@ -0,0 +1,6 @@ +{ + "culture": "en", + "texts": { + "Hello": "Hello" + } +} diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/texts-de.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/texts-de.json new file mode 100644 index 0000000000..0b6404baaf --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/texts-de.json @@ -0,0 +1,6 @@ +{ + "culture": "de", + "texts": { + "Hello": "Hallo" + } +} diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/tr.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/tr.json new file mode 100644 index 0000000000..0312657143 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/CultureIndex/tr.json @@ -0,0 +1,6 @@ +{ + "culture": "tr", + "texts": { + "Hello": "Merhaba" + } +} diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/VirtualFileLocalizationResourceContributor_Tests.cs b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/VirtualFileLocalizationResourceContributor_Tests.cs new file mode 100644 index 0000000000..6c9b465355 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/VirtualFileLocalizationResourceContributor_Tests.cs @@ -0,0 +1,465 @@ +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.FileProviders; +using Microsoft.Extensions.Localization; +using Microsoft.Extensions.Options; +using Microsoft.Extensions.Primitives; +using Shouldly; +using Volo.Abp.Localization.VirtualFiles.Json; +using Volo.Abp.Testing; +using Volo.Abp.VirtualFileSystem; +using Xunit; + +namespace Volo.Abp.Localization; + +public class VirtualFileLocalizationResourceContributor_Tests : AbpIntegratedTest +{ + private const string CountryNamesPath = "/Volo/Abp/Localization/TestResources/Base/CountryNames"; + + private const string CultureIndexPath = "/Volo/Abp/Localization/TestResources/CultureIndex"; + + [Fact] + public void Initialize_Should_Not_Resolve_Services() + { + var serviceProvider = new RecordingServiceProvider(ServiceProvider); + var resource = GetRequiredService>().Value.Resources.Get("LocalizationTestCountryNames"); + var contributor = new JsonVirtualFileLocalizationResourceContributor("/Volo/Abp/Localization/TestResources/Base/CountryNames"); + + contributor.Initialize(new LocalizationResourceInitializationContext(resource, serviceProvider)); + + serviceProvider.RequestedTypes.ShouldBeEmpty(); + + contributor.GetOrNull("en", "USA").Value.ShouldBe("United States of America"); + serviceProvider.RequestedTypes.ShouldBe(new[] { typeof(IVirtualFileProvider) }); + } + + [Fact] + public void The_First_Read_Should_Resolve_Services_Outside_Of_Its_Lock() + { + var resource = GetRequiredService>().Value.Resources.Get("LocalizationTestCountryNames"); + var contributor = new JsonVirtualFileLocalizationResourceContributor("/Volo/Abp/Localization/TestResources/Base/CountryNames"); + var serviceProvider = new ReadingWhileResolvingServiceProvider(ServiceProvider, contributor); + contributor.Initialize(new LocalizationResourceInitializationContext(resource, serviceProvider)); + + contributor.GetOrNull("en", "USA").Value.ShouldBe("United States of America"); + + serviceProvider.OtherReadCompletedWhileResolving.ShouldBeTrue(); + serviceProvider.OtherRead.IsCompletedSuccessfully.ShouldBeTrue(); + } + + [Fact] + public void Should_Only_Build_The_Dictionaries_Of_The_Requested_Cultures() + { + var fileProvider = new RecordingFileProvider(GetRequiredService()); + var contributor = CreateContributor(new JsonVirtualFileLocalizationResourceContributor(CountryNamesPath), fileProvider); + + contributor.GetOrNull("en", "USA").Value.ShouldBe("United States of America"); + contributor.GetOrNull("tr", "USA").Value.ShouldBe("Amerika Birleşik Devletleri"); + contributor.GetOrNull("en", "Brazil").ShouldNotBeNull(); + contributor.GetOrNull("xx", "USA").ShouldBeNull(); + + fileProvider.GetReopenedFileNames().ShouldBe(new[] { "en.json", "tr.json" }, ignoreOrder: true); + fileProvider.GetOpenCount().ShouldBe(27 + 2); + } + + [Fact] + public void Should_Use_The_Culture_In_The_File_Instead_Of_The_File_Name() + { + var fileProvider = new RecordingFileProvider(GetRequiredService()); + var contributor = CreateContributor(new JsonVirtualFileLocalizationResourceContributor(CountryNamesPath), fileProvider); + + contributor.GetOrNull("fr", "USA").Value.ShouldBe("les états-unis d'Amérique"); + contributor.GetOrNull("FR", "USA").ShouldBeNull(); + + fileProvider.GetReopenedFileNames().ShouldBe(new[] { "FR.json" }); + } + + [Fact] + public async Task Should_Get_The_Same_Supported_Cultures_Without_Building_Dictionaries() + { + var fileProvider = new RecordingFileProvider(GetRequiredService()); + var contributor = CreateContributor(new JsonVirtualFileLocalizationResourceContributor(CountryNamesPath), fileProvider); + var parseAllContributor = CreateContributor(new ParseAllJsonContributor(CountryNamesPath)); + + var cultures = (await contributor.GetSupportedCulturesAsync()).ToList(); + + cultures.ShouldBe((await parseAllContributor.GetSupportedCulturesAsync()).ToList()); + cultures.Count.ShouldBe(27); + fileProvider.GetReopenedFileNames().ShouldBeEmpty(); + } + + [Fact] + public async Task Supported_Cultures_Should_Be_Read_Only() + { + var contributor = CreateContributor(new JsonVirtualFileLocalizationResourceContributor(CountryNamesPath)); + + var cultures = (ICollection)await contributor.GetSupportedCulturesAsync(); + + cultures.IsReadOnly.ShouldBeTrue(); + Should.Throw(() => cultures.Clear()); + } + + [Fact] + public async Task Should_Read_The_Culture_From_Any_Json_Layout() + { + var fileProvider = new RecordingFileProvider(GetRequiredService()); + var contributor = CreateContributor(new JsonVirtualFileLocalizationResourceContributor(CultureIndexPath), fileProvider); + + (await contributor.GetSupportedCulturesAsync()).ShouldBe(new[] { "fr", "en", "de", "tr" }); + + contributor.GetOrNull("en", "Hello").Value.ShouldBe("Hello"); + contributor.GetOrNull("de", "Hello").Value.ShouldBe("Hallo"); + contributor.GetOrNull("fr", "Hello").Value.ShouldBe("Bonjour"); + + fileProvider.GetReopenedFileNames().ShouldBe(new[] { "en.json", "texts-de.json", "Comments.json" }, ignoreOrder: true); + } + + [Fact] + public void Should_Merge_Split_Files_In_File_Name_Order() + { + var contributor = CreateContributor(new JsonVirtualFileLocalizationResourceContributor("/Volo/Abp/Localization/TestResources/FilesSplit")); + + contributor.GetOrNull("en", "Base.Id").Value.ShouldBe("Id"); + contributor.GetOrNull("en", "Book.Id").Value.ShouldBe("ISBN"); + contributor.GetOrNull("en", "ThisIsRequiredValue").Value.ShouldBe("This is required value (this will be used)"); + } + + [Fact] + public void Should_Parse_All_Files_If_The_Culture_Of_A_File_Can_Not_Be_Read() + { + var fileProvider = new RecordingFileProvider(GetRequiredService()); + var contributor = CreateContributor(new ParseAllJsonContributor(CountryNamesPath), fileProvider); + + contributor.GetOrNull("en", "USA").Value.ShouldBe("United States of America"); + contributor.GetOrNull("fr", "USA").Value.ShouldBe("les états-unis d'Amérique"); + + fileProvider.GetOpenCount().ShouldBe(27); + } + + [Fact] + public void Should_Parse_All_Files_If_A_File_Does_Not_Have_The_Indexed_Culture() + { + var contributor = CreateContributor(new WrongCultureJsonContributor(CountryNamesPath)); + + contributor.GetOrNull("en", "USA").Value.ShouldBe("United States of America"); + contributor.GetOrNull("tr", "USA").Value.ShouldBe("Amerika Birleşik Devletleri"); + contributor.GetOrNull("fr", "USA").Value.ShouldBe("les états-unis d'Amérique"); + } + + [Fact] + public void Should_Parse_All_Files_If_A_File_Can_Not_Be_Opened() + { + var fileProvider = new InMemoryFileProvider(new IFileInfo[] { new UnopenableFileInfo("en.json") }); + var contributor = CreateContributor(new GeneratedDictionaryJsonContributor("/Test"), new RecordingFileProvider(fileProvider)); + + contributor.GetOrNull("en", "Hello").Value.ShouldBe("Hello"); + } + + [Fact] + public void Should_Only_Build_A_Culture_Once_When_Read_Concurrently() + { + var fileProvider = new RecordingFileProvider(GetRequiredService()); + var contributor = CreateContributor(new JsonVirtualFileLocalizationResourceContributor(CountryNamesPath), fileProvider); + + Parallel.For(0, 32, _ => contributor.GetOrNull("en", "USA").Value.ShouldBe("United States of America")); + + fileProvider.GetReopenedFileNames().ShouldBe(new[] { "en.json" }); + fileProvider.GetOpenCount().ShouldBe(27 + 1); + } + + [Fact] + public async Task Should_Read_The_Files_Again_When_They_Change() + { + var fileProvider = new InMemoryFileProvider(new[] + { + CreateFile("en.json", "{\"culture\":\"en\",\"texts\":{\"Hello\":\"Hello\"}}"), + CreateFile("fr.json", "{\"culture\":\"fr\",\"texts\":{\"Hello\":\"Bonjour\"}}") + }); + var contributor = CreateContributor(new JsonVirtualFileLocalizationResourceContributor("/Test"), new RecordingFileProvider(fileProvider)); + + contributor.GetOrNull("en", "Hello").Value.ShouldBe("Hello"); + contributor.GetOrNull("fr", "Hello").Value.ShouldBe("Bonjour"); + + fileProvider.Change( + CreateFile("de.json", "{\"culture\":\"de\",\"texts\":{\"Hello\":\"Hallo\"}}"), + CreateFile("en.json", "{\"culture\":\"en\",\"texts\":{\"Hello\":\"Hi\"}}") + ); + + contributor.GetOrNull("en", "Hello").Value.ShouldBe("Hi"); + contributor.GetOrNull("fr", "Hello").ShouldBeNull(); + contributor.GetOrNull("de", "Hello").Value.ShouldBe("Hallo"); + (await contributor.GetSupportedCulturesAsync()).ShouldBe(new[] { "de", "en" }); + } + + private static IFileInfo CreateFile(string name, string json) + { + return new InMemoryFileInfo("/Test/" + name, Encoding.UTF8.GetBytes(json), name); + } + + private TContributor CreateContributor(TContributor contributor, IVirtualFileProvider fileProvider = null) + where TContributor : JsonVirtualFileLocalizationResourceContributor + { + var resource = GetRequiredService>().Value.Resources.Get("LocalizationTestCountryNames"); + IServiceProvider serviceProvider = fileProvider == null ? ServiceProvider : new FileProviderServiceProvider(ServiceProvider, fileProvider); + contributor.Initialize(new LocalizationResourceInitializationContext(resource, serviceProvider)); + return contributor; + } + + private class ParseAllJsonContributor : JsonVirtualFileLocalizationResourceContributor + { + public ParseAllJsonContributor(string virtualPath) + : base(virtualPath) + { + } + + protected override string GetCultureNameOrNull(IFileInfo file) + { + return null; + } + } + + private class WrongCultureJsonContributor : JsonVirtualFileLocalizationResourceContributor + { + public WrongCultureJsonContributor(string virtualPath) + : base(virtualPath) + { + } + + protected override string GetCultureNameOrNull(IFileInfo file) + { + return "en"; + } + } + + private class GeneratedDictionaryJsonContributor : JsonVirtualFileLocalizationResourceContributor + { + public GeneratedDictionaryJsonContributor(string virtualPath) + : base(virtualPath) + { + } + + protected override ILocalizationDictionary CreateDictionaryFromFile(IFileInfo file) + { + return new StaticLocalizationDictionary("en", new Dictionary + { + { "Hello", new LocalizedString("Hello", "Hello") } + }); + } + } + + private class UnopenableFileInfo : IFileInfo + { + public bool Exists => true; + public long Length => 0; + public string PhysicalPath => null; + public string Name { get; } + public DateTimeOffset LastModified => DateTimeOffset.MinValue; + public bool IsDirectory => false; + + public UnopenableFileInfo(string name) + { + Name = name; + } + + public Stream CreateReadStream() + { + throw new FileNotFoundException(Name); + } + } + + private class FileProviderServiceProvider : IServiceProvider + { + private readonly IServiceProvider _serviceProvider; + private readonly IVirtualFileProvider _fileProvider; + + public FileProviderServiceProvider(IServiceProvider serviceProvider, IVirtualFileProvider fileProvider) + { + _serviceProvider = serviceProvider; + _fileProvider = fileProvider; + } + + public object GetService(Type serviceType) + { + return serviceType == typeof(IVirtualFileProvider) ? _fileProvider : _serviceProvider.GetService(serviceType); + } + } + + private class RecordingFileProvider : IVirtualFileProvider + { + private readonly IFileProvider _fileProvider; + private readonly ConcurrentQueue _openedFileNames = new(); + + public RecordingFileProvider(IFileProvider fileProvider) + { + _fileProvider = fileProvider; + } + + public int GetOpenCount() + { + return _openedFileNames.Count; + } + + /// + /// The files opened more than once: all files are read once to index their cultures, then a file is opened again to build the dictionary of its culture. + /// + public List GetReopenedFileNames() + { + return _openedFileNames.GroupBy(x => x).Where(x => x.Count() > 1).Select(x => x.Key).ToList(); + } + + public IFileInfo GetFileInfo(string subpath) + { + return _fileProvider.GetFileInfo(subpath); + } + + public IDirectoryContents GetDirectoryContents(string subpath) + { + return new FileList(_fileProvider.GetDirectoryContents(subpath) + .Select(x => (IFileInfo)new RecordingFileInfo(x, _openedFileNames)) + .ToList()); + } + + public IChangeToken Watch(string filter) + { + return _fileProvider.Watch(filter); + } + } + + private class InMemoryFileProvider : IFileProvider + { + private IFileInfo[] _files; + private CancellationTokenSource _changeTokenSource = new(); + + public InMemoryFileProvider(IFileInfo[] files) + { + _files = files; + } + + public void Change(params IFileInfo[] files) + { + _files = files; + var changeTokenSource = _changeTokenSource; + _changeTokenSource = new CancellationTokenSource(); + changeTokenSource.Cancel(); + } + + public IFileInfo GetFileInfo(string subpath) + { + return new NotFoundFileInfo(subpath); + } + + public IDirectoryContents GetDirectoryContents(string subpath) + { + return new FileList(_files.ToList()); + } + + public IChangeToken Watch(string filter) + { + return new CancellationChangeToken(_changeTokenSource.Token); + } + } + + private class FileList : IDirectoryContents + { + private readonly List _files; + + public bool Exists => true; + + public FileList(List files) + { + _files = files; + } + + public IEnumerator GetEnumerator() + { + return _files.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } + + private class RecordingFileInfo : IFileInfo + { + private readonly IFileInfo _fileInfo; + private readonly ConcurrentQueue _openedFileNames; + + public bool Exists => _fileInfo.Exists; + public long Length => _fileInfo.Length; + public string PhysicalPath => _fileInfo.PhysicalPath; + public string Name => _fileInfo.Name; + public DateTimeOffset LastModified => _fileInfo.LastModified; + public bool IsDirectory => _fileInfo.IsDirectory; + + public RecordingFileInfo(IFileInfo fileInfo, ConcurrentQueue openedFileNames) + { + _fileInfo = fileInfo; + _openedFileNames = openedFileNames; + } + + public Stream CreateReadStream() + { + _openedFileNames.Enqueue(Name); + return _fileInfo.CreateReadStream(); + } + } + + /* Reads the same resource from another thread while the first read resolves the virtual file provider, as a + * container does when it creates a singleton that reads localized texts while it holds its own lock. */ + private class ReadingWhileResolvingServiceProvider : IServiceProvider + { + public Task OtherRead { get; private set; } + + public bool OtherReadCompletedWhileResolving { get; private set; } + + private readonly IServiceProvider _serviceProvider; + private readonly JsonVirtualFileLocalizationResourceContributor _contributor; + private int _otherReadStarted; + + public ReadingWhileResolvingServiceProvider(IServiceProvider serviceProvider, JsonVirtualFileLocalizationResourceContributor contributor) + { + _serviceProvider = serviceProvider; + _contributor = contributor; + } + + public object GetService(Type serviceType) + { + // The other read resolves the provider too, and may do so before OtherRead is assigned. + if (serviceType == typeof(IVirtualFileProvider) && Interlocked.CompareExchange(ref _otherReadStarted, 1, 0) == 0) + { + var otherRead = Task.Run(() => _contributor.GetOrNull("en", "Brazil")); + OtherRead = otherRead; + OtherReadCompletedWhileResolving = otherRead.Wait(TimeSpan.FromSeconds(5)); + } + + return _serviceProvider.GetService(serviceType); + } + } + + private class RecordingServiceProvider : IServiceProvider + { + public List RequestedTypes { get; } = new(); + + private readonly IServiceProvider _serviceProvider; + + public RecordingServiceProvider(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + } + + public object GetService(Type serviceType) + { + RequestedTypes.Add(serviceType); + return _serviceProvider.GetService(serviceType); + } + } +} diff --git a/framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo.Abp.LuckyPenny.AutoMapper.Tests.csproj b/framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo.Abp.LuckyPenny.AutoMapper.Tests.csproj index 384447a180..79e317e575 100644 --- a/framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo.Abp.LuckyPenny.AutoMapper.Tests.csproj +++ b/framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo.Abp.LuckyPenny.AutoMapper.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.LuckyPenny.AutoMapper.Tests Volo.Abp.LuckyPenny.AutoMapper.Tests diff --git a/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj b/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj index 42fecfe817..62749ac0c3 100644 --- a/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj +++ b/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Mapperly.Tests/Volo.Abp.Mapperly.Tests.csproj b/framework/test/Volo.Abp.Mapperly.Tests/Volo.Abp.Mapperly.Tests.csproj index 0708117ca2..69ea025f5d 100644 --- a/framework/test/Volo.Abp.Mapperly.Tests/Volo.Abp.Mapperly.Tests.csproj +++ b/framework/test/Volo.Abp.Mapperly.Tests/Volo.Abp.Mapperly.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.Mapperly.Tests Volo.Abp.Mapperly.Tests diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj index f34c210cfb..80af73fe44 100644 --- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj +++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj b/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj index 663a65d679..9cc6743cde 100644 --- a/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj +++ b/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.MongoDB.Tests.SecondContext/Volo.Abp.MongoDB.Tests.SecondContext.csproj b/framework/test/Volo.Abp.MongoDB.Tests.SecondContext/Volo.Abp.MongoDB.Tests.SecondContext.csproj index a25b61b983..08b9038ff9 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests.SecondContext/Volo.Abp.MongoDB.Tests.SecondContext.csproj +++ b/framework/test/Volo.Abp.MongoDB.Tests.SecondContext/Volo.Abp.MongoDB.Tests.SecondContext.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; true true diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj index 01aaa0017c..72e3be5b93 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.MultiLingualObjects.Tests/Volo.Abp.MultiLingualObjects.Tests.csproj b/framework/test/Volo.Abp.MultiLingualObjects.Tests/Volo.Abp.MultiLingualObjects.Tests.csproj index 663e009cf0..6f4dd34abd 100644 --- a/framework/test/Volo.Abp.MultiLingualObjects.Tests/Volo.Abp.MultiLingualObjects.Tests.csproj +++ b/framework/test/Volo.Abp.MultiLingualObjects.Tests/Volo.Abp.MultiLingualObjects.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 enable diff --git a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj index b4b4b9641b..f13fd27cd8 100644 --- a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj +++ b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.ObjectExtending.Tests/Volo.Abp.ObjectExtending.Tests.csproj b/framework/test/Volo.Abp.ObjectExtending.Tests/Volo.Abp.ObjectExtending.Tests.csproj index c77e4ab7e1..9e9e67a784 100644 --- a/framework/test/Volo.Abp.ObjectExtending.Tests/Volo.Abp.ObjectExtending.Tests.csproj +++ b/framework/test/Volo.Abp.ObjectExtending.Tests/Volo.Abp.ObjectExtending.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj b/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj index 3eddf5ed1b..475ee84eb1 100644 --- a/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj +++ b/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Quartz.Tests/Volo.Abp.Quartz.Tests.csproj b/framework/test/Volo.Abp.Quartz.Tests/Volo.Abp.Quartz.Tests.csproj index 209dd997ec..3605045e62 100644 --- a/framework/test/Volo.Abp.Quartz.Tests/Volo.Abp.Quartz.Tests.csproj +++ b/framework/test/Volo.Abp.Quartz.Tests/Volo.Abp.Quartz.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Volo.Abp.Quartz.Tests Volo.Abp.Quartz.Tests diff --git a/framework/test/Volo.Abp.RabbitMQ.Tests/Volo.Abp.RabbitMQ.Tests.csproj b/framework/test/Volo.Abp.RabbitMQ.Tests/Volo.Abp.RabbitMQ.Tests.csproj index 0c4b2a2260..3454cd5fba 100644 --- a/framework/test/Volo.Abp.RabbitMQ.Tests/Volo.Abp.RabbitMQ.Tests.csproj +++ b/framework/test/Volo.Abp.RabbitMQ.Tests/Volo.Abp.RabbitMQ.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.RemoteServices.Tests/Volo.Abp.RemoteServices.Tests.csproj b/framework/test/Volo.Abp.RemoteServices.Tests/Volo.Abp.RemoteServices.Tests.csproj index 8ea1a2c4f6..37bd28e00d 100644 --- a/framework/test/Volo.Abp.RemoteServices.Tests/Volo.Abp.RemoteServices.Tests.csproj +++ b/framework/test/Volo.Abp.RemoteServices.Tests/Volo.Abp.RemoteServices.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj index 25a8592314..9292600a92 100644 --- a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj +++ b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj index cde6aaeae2..8271246a55 100644 --- a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj +++ b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj index 01395fb9a9..bb75d1a863 100644 --- a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj +++ b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Sms.Aliyun.Tests/Volo.Abp.Sms.Aliyun.Tests.csproj b/framework/test/Volo.Abp.Sms.Aliyun.Tests/Volo.Abp.Sms.Aliyun.Tests.csproj index 34bde20c9b..f86092ac68 100644 --- a/framework/test/Volo.Abp.Sms.Aliyun.Tests/Volo.Abp.Sms.Aliyun.Tests.csproj +++ b/framework/test/Volo.Abp.Sms.Aliyun.Tests/Volo.Abp.Sms.Aliyun.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 9f0d2c00-80c1-435b-bfab-2c39c8249091 diff --git a/framework/test/Volo.Abp.Sms.TencenCloud.Tests/Volo.Abp.Sms.TencentCloud.Tests.csproj b/framework/test/Volo.Abp.Sms.TencenCloud.Tests/Volo.Abp.Sms.TencentCloud.Tests.csproj index 8ffbf02285..afaf21092d 100644 --- a/framework/test/Volo.Abp.Sms.TencenCloud.Tests/Volo.Abp.Sms.TencentCloud.Tests.csproj +++ b/framework/test/Volo.Abp.Sms.TencenCloud.Tests/Volo.Abp.Sms.TencentCloud.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj b/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj index c061c1ee46..bf4f70514e 100644 --- a/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj +++ b/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj index 6a1f4de2fd..92ef261f9b 100644 --- a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj +++ b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj index d5c3970ddc..fd7b8dbfd7 100644 --- a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj +++ b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 true true diff --git a/framework/test/Volo.Abp.TextTemplating.Razor.Tests/Volo.Abp.TextTemplating.Razor.Tests.csproj b/framework/test/Volo.Abp.TextTemplating.Razor.Tests/Volo.Abp.TextTemplating.Razor.Tests.csproj index ba96267db1..cf8d5f9a96 100644 --- a/framework/test/Volo.Abp.TextTemplating.Razor.Tests/Volo.Abp.TextTemplating.Razor.Tests.csproj +++ b/framework/test/Volo.Abp.TextTemplating.Razor.Tests/Volo.Abp.TextTemplating.Razor.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.TextTemplating.Scriban.Tests/Volo.Abp.TextTemplating.Scriban.Tests.csproj b/framework/test/Volo.Abp.TextTemplating.Scriban.Tests/Volo.Abp.TextTemplating.Scriban.Tests.csproj index 3fe043b39c..bf382b519c 100644 --- a/framework/test/Volo.Abp.TextTemplating.Scriban.Tests/Volo.Abp.TextTemplating.Scriban.Tests.csproj +++ b/framework/test/Volo.Abp.TextTemplating.Scriban.Tests/Volo.Abp.TextTemplating.Scriban.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.TextTemplating.Scriban.Tests/Volo/Abp/TextTemplating/Scriban/ScribanTemplateRenderingEngine_IsSandboxed_Tests.cs b/framework/test/Volo.Abp.TextTemplating.Scriban.Tests/Volo/Abp/TextTemplating/Scriban/ScribanTemplateRenderingEngine_IsSandboxed_Tests.cs index 2aa0cd018f..253692abd6 100644 --- a/framework/test/Volo.Abp.TextTemplating.Scriban.Tests/Volo/Abp/TextTemplating/Scriban/ScribanTemplateRenderingEngine_IsSandboxed_Tests.cs +++ b/framework/test/Volo.Abp.TextTemplating.Scriban.Tests/Volo/Abp/TextTemplating/Scriban/ScribanTemplateRenderingEngine_IsSandboxed_Tests.cs @@ -43,7 +43,7 @@ public class ScribanTemplateRenderingEngine_IsSandboxed_Tests : AbpTextTemplatin ScribanTestTemplateDefinitionProvider.ReflectionEscapeAttempt, model: new ReflectionEscapeModel { Name = "John" }); - result.ShouldBe("getType=[]\n"); + result.ReplaceLineEndings("\n").ShouldBe("getType=[]\n"); result.ShouldNotContain("RuntimeType"); result.ShouldNotContain("Volo.Abp.TextTemplating"); } @@ -80,7 +80,7 @@ public class ScribanTemplateRenderingEngine_IsSandboxed_Tests : AbpTextTemplatin ScribanTestTemplateDefinitionProvider.MethodInvocationAttempt, model: new ServiceLikeModel()); - result.ShouldBe("danger=[]\n"); + result.ReplaceLineEndings("\n").ShouldBe("danger=[]\n"); result.ShouldNotContain("UNSAFE"); } @@ -94,7 +94,7 @@ public class ScribanTemplateRenderingEngine_IsSandboxed_Tests : AbpTextTemplatin ScribanTestTemplateDefinitionProvider.NestedPropertyAccess, model: new OuterModel { Name = "John", Inner = new InnerModel { Email = "j@a.b" } }); - result.ShouldBe("name=[John] email=[j@a.b]\n"); + result.ReplaceLineEndings("\n").ShouldBe("name=[John] email=[j@a.b]\n"); } private class ReflectionEscapeModel diff --git a/framework/test/Volo.Abp.TextTemplating.Tests/Volo.Abp.TextTemplating.Tests.csproj b/framework/test/Volo.Abp.TextTemplating.Tests/Volo.Abp.TextTemplating.Tests.csproj index 6bb10aff0e..b6fee2b211 100644 --- a/framework/test/Volo.Abp.TextTemplating.Tests/Volo.Abp.TextTemplating.Tests.csproj +++ b/framework/test/Volo.Abp.TextTemplating.Tests/Volo.Abp.TextTemplating.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Threading.Tests/Volo.Abp.Threading.Tests.csproj b/framework/test/Volo.Abp.Threading.Tests/Volo.Abp.Threading.Tests.csproj index 569bfcf5f1..02dcd379f7 100644 --- a/framework/test/Volo.Abp.Threading.Tests/Volo.Abp.Threading.Tests.csproj +++ b/framework/test/Volo.Abp.Threading.Tests/Volo.Abp.Threading.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Timing.Tests/Volo.Abp.Timing.Tests.csproj b/framework/test/Volo.Abp.Timing.Tests/Volo.Abp.Timing.Tests.csproj index fcd7ba3c02..37bedae529 100644 --- a/framework/test/Volo.Abp.Timing.Tests/Volo.Abp.Timing.Tests.csproj +++ b/framework/test/Volo.Abp.Timing.Tests/Volo.Abp.Timing.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj index 80b64d4f9c..0e04123012 100644 --- a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj +++ b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj index 52307aa1ee..c6d7c42cc5 100644 --- a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj +++ b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Ambient_Scope_Tests.cs b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Ambient_Scope_Tests.cs index 62395bf8e6..80de5af8c8 100644 --- a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Ambient_Scope_Tests.cs +++ b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Ambient_Scope_Tests.cs @@ -71,4 +71,49 @@ public class UnitOfWork_Ambient_Scope_Tests : AbpIntegratedTest + { + await reservationEnded.Task; + + var isBegun = _unitOfWorkManager.TryBeginReserved("Reservation1", new AbpUnitOfWorkOptions()); + + using (var uow2 = _unitOfWorkManager.Begin()) + { + _unitOfWorkManager.Current.ShouldNotBeNull(); + _unitOfWorkManager.Current.Id.ShouldNotBe(uow1.Id); + + await uow2.CompleteAsync(); + } + + return isBegun; + }); + + if (complete) + { + await uow1.CompleteAsync(); + } + + if (dispose) + { + uow1.Dispose(); + } + + reservationEnded.SetResult(); + + (await outlivingWork).ShouldBeFalse(); + } + } } diff --git a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj index 423eb97b2a..05c20ec5c2 100644 --- a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj +++ b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/framework/test/Volo.Abp.Validation.Tests/Volo/Abp/Validation/AsyncDataAnnotations_Validation_Tests.cs b/framework/test/Volo.Abp.Validation.Tests/Volo/Abp/Validation/AsyncDataAnnotations_Validation_Tests.cs new file mode 100644 index 0000000000..b14e5be0fb --- /dev/null +++ b/framework/test/Volo.Abp.Validation.Tests/Volo/Abp/Validation/AsyncDataAnnotations_Validation_Tests.cs @@ -0,0 +1,120 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Threading.Tasks; +using Shouldly; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; +using Volo.Abp.Testing; +using Xunit; + +namespace Volo.Abp.Validation; + +public class AsyncDataAnnotations_Validation_Tests : AbpIntegratedTest +{ + private readonly IObjectValidator _objectValidator; + + public AsyncDataAnnotations_Validation_Tests() + { + _objectValidator = GetRequiredService(); + } + + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + + [Fact] + public async Task Should_Run_Async_Validation_Attribute() + { + var errors = await _objectValidator.GetErrorsAsync(new AsyncAttributeInput { Name = "taken" }); + + errors.ShouldContain(e => e.ErrorMessage == "Name is already taken"); + } + + [Fact] + public async Task Should_Not_Report_Error_When_Async_Validation_Attribute_Passes() + { + var errors = await _objectValidator.GetErrorsAsync(new AsyncAttributeInput { Name = "free" }); + + errors.ShouldBeEmpty(); + } + + [Fact] + public async Task Should_Run_IAsyncValidatableObject() + { + var errors = await _objectValidator.GetErrorsAsync(new AsyncValidatableInput { Value = -1 }); + + errors.ShouldContain(e => e.ErrorMessage == "Value must not be negative"); + } + + [Fact] + public async Task Should_Not_Run_Synchronous_Validate_Of_IAsyncValidatableObject() + { + var input = new AsyncValidatableInput { Value = 1 }; + + await _objectValidator.ValidateAsync(input); + + /* IAsyncValidatableObject extends IValidatableObject. Running both would validate twice and + * the synchronous overload is the one such a type is expected to throw from. */ + input.SynchronousValidateCallCount.ShouldBe(0); + } + + public class AsyncAttributeInput + { + [NameNotTaken] + public string? Name { get; set; } + } + + public class NameNotTakenAttribute : AsyncValidationAttribute + { + protected override ValidationResult? IsValid(object? value, ValidationContext validationContext) + { + throw new AbpException("This attribute only validates asynchronously."); + } + + protected override async Task IsValidAsync( + object? value, + ValidationContext validationContext, + CancellationToken cancellationToken) + { + await Task.Yield(); + + return value as string == "taken" + ? new ValidationResult("Name is already taken", new[] { validationContext.MemberName! }) + : ValidationResult.Success; + } + } + + public class AsyncValidatableInput : IAsyncValidatableObject + { + public int Value { get; set; } + + public int SynchronousValidateCallCount { get; private set; } + + public IEnumerable Validate(ValidationContext validationContext) + { + SynchronousValidateCallCount++; + return Enumerable.Empty(); + } + + public async IAsyncEnumerable ValidateAsync( + ValidationContext validationContext, + [EnumeratorCancellation] CancellationToken cancellationToken = default) + { + await Task.Yield(); + + if (Value < 0) + { + yield return new ValidationResult("Value must not be negative", new[] { nameof(Value) }); + } + } + } + + [DependsOn(typeof(AbpValidationModule), typeof(AbpAutofacModule))] + public class TestModule : AbpModule + { + } +} diff --git a/framework/test/Volo.Abp.Validation.Tests/Volo/Abp/Validation/DataAnnotationObjectValidationContributorOverride_Tests.cs b/framework/test/Volo.Abp.Validation.Tests/Volo/Abp/Validation/DataAnnotationObjectValidationContributorOverride_Tests.cs new file mode 100644 index 0000000000..c62415fcf1 --- /dev/null +++ b/framework/test/Volo.Abp.Validation.Tests/Volo/Abp/Validation/DataAnnotationObjectValidationContributorOverride_Tests.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using Shouldly; +using Volo.Abp.Autofac; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Modularity; +using Volo.Abp.Testing; +using Xunit; + +namespace Volo.Abp.Validation; + +public abstract class DataAnnotationObjectValidationContributorOverride_TestBase : AbpIntegratedTest + where TStartupModule : IAbpModule +{ + protected IObjectValidator ObjectValidator { get; } + + protected DataAnnotationObjectValidationContributorOverride_TestBase() + { + ObjectValidator = GetRequiredService(); + } + + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + + protected static void UseContributor(ServiceConfigurationContext context) + where TContributor : DataAnnotationObjectValidationContributor + { + context.Services.AddTransient(); + context.Services.Configure(options => + { + options.ObjectValidationContributors.Remove(); + options.ObjectValidationContributors.AddIfNotContains(typeof(TContributor)); + }); + } +} + +public class ContributorOverrideInput +{ + [Required] + public string? Name { get; set; } + + [CodeNotTaken] + public string? Code { get; set; } +} + +public class CodeNotTakenAttribute : AsyncValidationAttribute +{ + protected override ValidationResult? IsValid(object? value, ValidationContext validationContext) + { + throw new AbpException("This attribute only validates asynchronously."); + } + + protected override async Task IsValidAsync( + object? value, + ValidationContext validationContext, + CancellationToken cancellationToken) + { + await Task.Yield(); + + return value as string == "taken" + ? new ValidationResult("Code is already taken", new[] { validationContext.MemberName! }) + : ValidationResult.Success; + } +} + +public class DataAnnotationObjectValidationContributorPropertyOverride_Tests + : DataAnnotationObjectValidationContributorOverride_TestBase +{ + [Fact] + public async Task Should_Call_An_AddPropertyErrors_Override() + { + var errors = await ObjectValidator.GetErrorsAsync(new ContributorOverrideInput { Name = "forbidden" }); + + errors.ShouldHaveSingleItem().ErrorMessage.ShouldBe("Name is forbidden"); + } + + [Fact] + public async Task Should_Still_Validate_An_Async_Attribute() + { + var errors = await ObjectValidator.GetErrorsAsync(new ContributorOverrideInput { Code = "taken" }); + + errors.Select(e => e.ErrorMessage).ShouldBe(new[] { "The Name field is required.", "Code is already taken" }, ignoreOrder: true); + } + + [DisableConventionalRegistration] + public class PropertyOverridingContributor : DataAnnotationObjectValidationContributor + { + public PropertyOverridingContributor(IOptions options, IServiceProvider serviceProvider) + : base(options, serviceProvider) + { + } + + protected override void AddPropertyErrors(object validatingObject, PropertyDescriptor property, List errors) + { + base.AddPropertyErrors(validatingObject, property, errors); + + if (property.Name == nameof(ContributorOverrideInput.Name) && property.GetValue(validatingObject) as string == "forbidden") + { + errors.Add(new ValidationResult("Name is forbidden", new[] { property.Name })); + } + } + } + + [DependsOn(typeof(AbpValidationModule), typeof(AbpAutofacModule))] + public class TestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + UseContributor(context); + } + } +} + +public class DataAnnotationObjectValidationContributorWalkOverride_Tests + : DataAnnotationObjectValidationContributorOverride_TestBase +{ + [Fact] + public async Task Should_Call_A_ValidateObjectRecursively_Override() + { + var errors = await ObjectValidator.GetErrorsAsync(new ContributorOverrideInput { Name = "valid" }); + + errors.ShouldHaveSingleItem().ErrorMessage.ShouldBe("Checked by the override"); + } + + [DisableConventionalRegistration] + public class WalkOverridingContributor : DataAnnotationObjectValidationContributor + { + public WalkOverridingContributor(IOptions options, IServiceProvider serviceProvider) + : base(options, serviceProvider) + { + } + + protected override void ValidateObjectRecursively(List errors, object? validatingObject, int currentDepth) + { + if (currentDepth == 1) + { + errors.Add(new ValidationResult("Checked by the override")); + } + } + } + + [DependsOn(typeof(AbpValidationModule), typeof(AbpAutofacModule))] + public class TestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + UseContributor(context); + } + } +} diff --git a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj index 0dc39d64cb..4f5be16283 100644 --- a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj +++ b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 true diff --git a/global.json b/global.json index 512142d2be..390868cfce 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.100", + "version": "11.0.100-rc.3.26522.148", "rollForward": "latestFeature" } } diff --git a/latest-versions.json b/latest-versions.json index 809fcf7fef..1db62f5920 100644 --- a/latest-versions.json +++ b/latest-versions.json @@ -8,6 +8,15 @@ "version": "5.7.0" } }, + { + "version": "10.6.2", + "releaseDate": "", + "type": "stable", + "message": "", + "leptonx": { + "version": "5.6.2" + } + }, { "version": "10.6.1", "releaseDate": "", diff --git a/modules/account/Volo.Abp.Account.abpmdl b/modules/account/Volo.Abp.Account.abpmdl index 1c68c5785d..ca458aa738 100644 --- a/modules/account/Volo.Abp.Account.abpmdl +++ b/modules/account/Volo.Abp.Account.abpmdl @@ -38,6 +38,10 @@ "path": "test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.abppkg", "folder": "test" }, + "Volo.Abp.Account.Web.Tests": { + "path": "test/Volo.Abp.Account.Web.Tests/Volo.Abp.Account.Web.Tests.abppkg", + "folder": "test" + }, "Volo.Abp.Account.Blazor": { "path": "src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.abppkg", "folder": "src" diff --git a/modules/account/Volo.Abp.Account.slnx b/modules/account/Volo.Abp.Account.slnx index 1beae2db60..ba16189d54 100644 --- a/modules/account/Volo.Abp.Account.slnx +++ b/modules/account/Volo.Abp.Account.slnx @@ -13,5 +13,6 @@ + diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj index 477bb63bf4..65a255c2f5 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Abp.Account.Application.Contracts Volo.Abp.Account.Application.Contracts true diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ar.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ar.json index d3db345a9b..f45a9dd11c 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ar.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ar.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "تم قفل حساب المستخدم بسبب محاولات تسجيل الدخول غير الصالحة. يرجى الانتظار بعض الوقت والمحاولة مرة أخرى.", "InvalidUserNameOrPassword": "اسم مستخدم أو كلمة مرور غير صالحة!", "LoginIsNotAllowed": "لا يسمح لك بتسجيل الدخول! حسابك غير نشط أو يحتاج إلى تأكيد بريدك الإلكتروني/رقم هاتفك.", + "ExternalLoginPasswordChangeRequired": "لا يسمح لك بتسجيل الدخول! يجب تغيير كلمة المرور الخاصة بك، لكن ذلك غير ممكن عند تسجيل الدخول الخارجي. يرجى الاتصال بالمسؤول.", + "RegisteredButLoginIsNotAllowed": "تم إنشاء حسابك، لكن لا يسمح لك بتسجيل الدخول بعد!", "SelfRegistrationDisabledMessage": "تم تعطيل التسجيل الذاتي لهذا التطبيق. يرجى الاتصال بمسؤول التطبيق لتسجيل مستخدم جديد.", "LocalLoginDisabledMessage": "تسجيل الدخول المحلي معطّل لهذا التطبيق.", "Login": "دخول", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json index 6967ed0d61..05f59bd463 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Tento účet byl uzamčen z důvodu neúspěšných přihlášení. Přihlaste se prosím později.", "InvalidUserNameOrPassword": "Neplatné uživatelské jméno nebo heslo!", "LoginIsNotAllowed": "Nemáte oprávnění se přihlásit! Váš účet je neaktivní nebo potřebuje potvrdit váš e -mail/telefonní číslo.", + "ExternalLoginPasswordChangeRequired": "Nemáte oprávnění se přihlásit! Vaše heslo musí být změněno, což ale při externím přihlášení není možné. Kontaktujte prosím svého správce.", + "RegisteredButLoginIsNotAllowed": "Váš účet byl vytvořen, ale zatím nemáte oprávnění se přihlásit!", "SelfRegistrationDisabledMessage": "Vlastní registrace uživatele není povolena. K vytvoření účtu kontaktujte správce.", "LocalLoginDisabledMessage": "Místní přihlášení je pro tuto aplikaci zakázáno.", "Login": "Přihlásit", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json index 98cc684389..32580a54c6 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json @@ -10,6 +10,8 @@ "UserLockedOutMessage": "Brugerkontoen er blevet låst grundet forkerte login forsøg. Vent venligst og prøv igen.", "InvalidUserNameOrPassword": "Forkert brugernavn eller kodeord!", "LoginIsNotAllowed": "Du kan ikke logge ind! Du skal bekræfte den angivne email/telefonnummer.", + "ExternalLoginPasswordChangeRequired": "Du kan ikke logge ind! Dit kodeord skal ændres, men det er ikke muligt med et eksternt login. Kontakt venligst din administrator.", + "RegisteredButLoginIsNotAllowed": "Din konto er oprettet, men du kan ikke logge ind endnu!", "SelfRegistrationDisabledMessage": "Selvregistrering er deaktiveret for denne applikation. Kontakt venligst applikationens administrator for at registrere en ny bruger.", "LocalLoginDisabledMessage": "Lokalt login er deaktiveret for denne appliaktion.", "Login": "Login", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json index 982a213753..2037e7219f 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Das Benutzerkonto wurde aufgrund ungültiger Anmeldeversuche gesperrt. Bitte warten Sie eine Weile und versuchen Sie es erneut.", "InvalidUserNameOrPassword": "Ungültiger Benutzername oder Passwort!", "LoginIsNotAllowed": "Sie dürfen sich nicht anmelden! Ihr Konto ist inaktiv oder muss Ihre E-Mail-/Telefonnummer bestätigen.", + "ExternalLoginPasswordChangeRequired": "Sie dürfen sich nicht anmelden! Ihr Passwort muss geändert werden, was bei einer externen Anmeldung jedoch nicht möglich ist. Bitte wenden Sie sich an Ihren Administrator.", + "RegisteredButLoginIsNotAllowed": "Ihr Konto wurde erstellt, aber Sie dürfen sich noch nicht anmelden!", "SelfRegistrationDisabledMessage": "Die Selbstregistrierung ist für diese Anwendung deaktiviert. Bitte wenden Sie sich an den Anwendungsadministrator, um einen neuen Benutzer zu registrieren.", "LocalLoginDisabledMessage": "Die lokale Anmeldung ist für diese Anwendung deaktiviert.", "Login": "Anmelden", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json index 594adbd31f..58f509af06 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Ο λογαριασμός χρήστη έχει κλειδωθεί λόγω μη έγκυρων προσπαθειών σύνδεσης. Περιμένετε λίγο και προσπαθήστε ξανά.", "InvalidUserNameOrPassword": "Μη έγκυρο όνομα χρήστη ή κωδικός!", "LoginIsNotAllowed": "Δεν επιτρέπεται να συνδεθείτε! Ο λογαριασμός σας είναι ανενεργός ή χρειάζεται να επιβεβαιώσετε το ηλεκτρονικού ταχυδρομείου/τον αριθμό τηλεφώνου σας.", + "ExternalLoginPasswordChangeRequired": "Δεν επιτρέπεται να συνδεθείτε! Ο κωδικός σας πρέπει να αλλάξει, αλλά αυτό δεν είναι δυνατό με εξωτερική σύνδεση. Επικοινωνήστε με τον διαχειριστή σας.", + "RegisteredButLoginIsNotAllowed": "Ο λογαριασμός σας δημιουργήθηκε, αλλά δεν επιτρέπεται να συνδεθείτε ακόμη!", "SelfRegistrationDisabledMessage": "Η αυτοεγγραφή είναι απενεργοποιημένη για αυτήν την εφαρμογή. Επικοινωνήστε με τον διαχειριστή της εφαρμογής για να εγγραφείτε ως νέος χρήστης.", "LocalLoginDisabledMessage": "Η τοπική σύνδεση είναι απενεργοποιημένη για αυτήν την εφαρμογή.", "Login": "Σύνδεση", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json index 09a93dca6f..bf1c289c17 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json @@ -10,6 +10,8 @@ "UserLockedOutMessage": "The user account has been locked out due to invalid login attempts. Please wait a while and try again.", "InvalidUserNameOrPassword": "Invalid username or password!", "LoginIsNotAllowed": "You are not allowed to login! Your account is inactive or needs to confirm your email/phone number.", + "ExternalLoginPasswordChangeRequired": "You are not allowed to login! Your password must be changed, but this is not possible with an external login. Please contact your administrator.", + "RegisteredButLoginIsNotAllowed": "Your account has been created, but you are not allowed to login yet!", "SelfRegistrationDisabledMessage": "Self-registration is disabled for this application. Please contact the application administrator to register a new user.", "LocalLoginDisabledMessage": "Local login is disabled for this application.", "Login": "Login", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json index a230495c87..942a9ba03b 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "The user account has been locked out due to invalid login attempts. Please wait a while and try again.", "InvalidUserNameOrPassword": "Invalid username or password!", "LoginIsNotAllowed": "You are not allowed to log in! Your account is inactive or needs to confirm your email/phone number.", + "ExternalLoginPasswordChangeRequired": "You are not allowed to log in! Your password must be changed, but this is not possible with an external login. Please contact your administrator.", + "RegisteredButLoginIsNotAllowed": "Your account has been created, but you are not allowed to log in yet!", "SelfRegistrationDisabledMessage": "Self-registration is disabled for this application. Please contact the application administrator to register a new user.", "LocalLoginDisabledMessage": "Local login is disabled for this application.", "Login": "Login", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es-mx.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es-mx.json index f25046575a..56597cd568 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es-mx.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es-mx.json @@ -10,6 +10,8 @@ "UserLockedOutMessage": "La cuenta de usuario ha sido bloqueada debido a los intentos de inicio de sesión no válido. Por favor, espere un rato y vuelve a intentarlo.", "InvalidUserNameOrPassword": "No válido nombre de usuario o la contraseña!", "LoginIsNotAllowed": "¡No está permitido iniciar sesión! Su cuenta está inactiva o necesita confirmar su correo electrónico/número de teléfono.", + "ExternalLoginPasswordChangeRequired": "¡No está permitido iniciar sesión! Su contraseña debe cambiarse, pero esto no es posible con un inicio de sesión externo. Póngase en contacto con su administrador.", + "RegisteredButLoginIsNotAllowed": "¡Su cuenta ha sido creada, pero todavía no está permitido iniciar sesión!", "SelfRegistrationDisabledMessage": "El autoregistro de usuario está deshabilitado para esta aplicación. Póngase en contacto con el administrador de la aplicación para registrar un nuevo usuario.", "Login": "Iniciar sesión", "Cancel": "Cancelar", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es.json index 814c41d218..8038cb9b5a 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "La cuenta de usuario ha sido bloqueada debido a los intentos de inicio de sesión no válidos. Por favor, espere unos minutos y vuelve a intentarlo.", "InvalidUserNameOrPassword": "El nombre de usuario o la contraseña no son válidos", "LoginIsNotAllowed": "¡No está permitido iniciar sesión! Su cuenta está inactiva o necesita confirmar su correo electrónico/número de teléfono.", + "ExternalLoginPasswordChangeRequired": "¡No está permitido iniciar sesión! Su contraseña debe cambiarse, pero esto no es posible con un inicio de sesión externo. Póngase en contacto con su administrador.", + "RegisteredButLoginIsNotAllowed": "¡Su cuenta ha sido creada, pero todavía no está permitido iniciar sesión!", "SelfRegistrationDisabledMessage": "El autoregistro de usuario está deshabilitado para esta aplicación. Póngase en contacto con el administrador de la aplicación para registrar un nuevo usuario.", "LocalLoginDisabledMessage": "Inicio de sesión local ha sido deshabilitado para esta aplicación", "Login": "Iniciar sesión", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json index e431b84548..bfb2716d47 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "حساب کاربری به دلیل تلاش های نامعتبر ورود به سیستم قفل شده است. لطفاً کمی صبر کنید و دوباره امتحان کنید.", "InvalidUserNameOrPassword": "نام کاربری یا گذرواژه نامعتبر است!", "LoginIsNotAllowed": "شما اجازه ورود ندارید! باید شماره تلفن/ایمیل خود را تأیید کنید.", + "ExternalLoginPasswordChangeRequired": "شما اجازه ورود ندارید! گذرواژه شما باید تغییر کند، اما این کار با ورود خارجی امکان‌پذیر نیست. لطفاً با مدیر سیستم تماس بگیرید.", + "RegisteredButLoginIsNotAllowed": "حساب شما ایجاد شد، اما هنوز اجازه ورود ندارید!", "SelfRegistrationDisabledMessage": "ثبت نام خودکار برای این برنامه غیرفعال است. لطفاً برای ثبت نام کاربر جدید با سرپرست برنامه تماس بگیرید.", "LocalLoginDisabledMessage": "ورود محلی برای این برنامه غیرفعال است.", "Login": "ورود کاربران", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json index 72acd91647..1b80ef496e 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Käyttäjätili on lukittu virheellisten kirjautumisyritysten vuoksi. Odota hetki ja yritä uudelleen.", "InvalidUserNameOrPassword": "Väärä käyttäjänimi tai salasana!", "LoginIsNotAllowed": "Et saa kirjautua sisään! Tilisi on passiivinen tai sinun on vahvistettava sähköpostiosoitteesi/puhelinnumerosi.", + "ExternalLoginPasswordChangeRequired": "Et saa kirjautua sisään! Salasanasi on vaihdettava, mutta se ei ole mahdollista ulkoisella kirjautumisella. Ota yhteyttä järjestelmänvalvojaan.", + "RegisteredButLoginIsNotAllowed": "Tilisi on luotu, mutta et saa vielä kirjautua sisään!", "SelfRegistrationDisabledMessage": "Itserekisteröinti on poistettu käytöstä tälle sovellukselle. Rekisteröi uusi käyttäjä ottamalla yhteyttä sovelluksen järjestelmänvalvojaan.", "LocalLoginDisabledMessage": "Paikallinen sisäänkirjautuminen on poistettu käytöstä tälle sovellukselle.", "Login": "Kirjaudu sisään", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json index 73a53b4bee..961f8e784c 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Le compte utilisateur a été verrouillé en raison de tentatives de connexion non valides. Veuillez patienter un instant et réessayer.", "InvalidUserNameOrPassword": "Nom d'utilisateur ou mot de passe invalide!", "LoginIsNotAllowed": "Vous n'êtes pas autorisé à vous connecter ! Votre compte est inactif ou doit confirmer votre e-mail/numéro de téléphone.", + "ExternalLoginPasswordChangeRequired": "Vous n'êtes pas autorisé à vous connecter ! Votre mot de passe doit être modifié, mais cela n'est pas possible avec une connexion externe. Veuillez contacter votre administrateur.", + "RegisteredButLoginIsNotAllowed": "Votre compte a été créé, mais vous n'êtes pas encore autorisé à vous connecter !", "SelfRegistrationDisabledMessage": "L'auto-inscription est désactivée pour cette application. Veuillez contacter l'administrateur de l'application pour enregistrer un nouvel utilisateur.", "LocalLoginDisabledMessage": "La connexion locale est désactivée pour cette application.", "Login": "Connectez-vous", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/he.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/he.json new file mode 100644 index 0000000000..d447e187c0 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/he.json @@ -0,0 +1,77 @@ +{ + "culture": "he", + "texts": { + "Menu:Account": "חשבון", + "UserName": "שם משתמש", + "EmailAddress": "כתובת אימייל", + "UserNameOrEmailAddress": "שם משתמש או כתובת אימייל", + "Password": "סיסמה", + "RememberMe": "זכור אותי", + "UseAnotherServiceToLogin": "התחברות באמצעות שירות אחר", + "UserLockedOutMessage": "חשבון המשתמש ננעל בגלל ניסיונות התחברות כושלים. המתינו זמן מה ונסו שוב.", + "InvalidUserNameOrPassword": "שם משתמש או סיסמה שגויים!", + "LoginIsNotAllowed": "אין אפשרות להתחבר! החשבון אינו פעיל, או שיש לאמת את כתובת האימייל או את מספר הטלפון.", + "ExternalLoginPasswordChangeRequired": "אין אפשרות להתחבר! יש לשנות את הסיסמה, אבל לא ניתן לעשות זאת בהתחברות חיצונית. פנו למנהל המערכת.", + "RegisteredButLoginIsNotAllowed": "החשבון נוצר, אבל עדיין אין אפשרות להתחבר!", + "SelfRegistrationDisabledMessage": "הרשמה עצמית אינה זמינה ביישום זה. כדי לרשום משתמש חדש, פנו למנהל היישום.", + "LocalLoginDisabledMessage": "התחברות עם חשבון מקומי אינה זמינה ביישום זה.", + "Login": "כניסה", + "Cancel": "ביטול", + "Register": "הרשמה", + "AreYouANewUser": "אין לך חשבון?", + "AlreadyRegistered": "כבר יש לך חשבון?", + "InvalidLoginRequest": "בקשת התחברות לא תקינה", + "ThereAreNoLoginSchemesConfiguredForThisClient": "לא הוגדרו שיטות התחברות עבור לקוח זה.", + "LogInUsingYourProviderAccount": "התחברות באמצעות חשבון {0}", + "DisplayName:CurrentPassword": "הסיסמה הנוכחית", + "DisplayName:NewPassword": "סיסמה חדשה", + "DisplayName:NewPasswordConfirm": "אימות הסיסמה החדשה", + "PasswordChangedMessage": "הסיסמה שונתה בהצלחה.", + "DisplayName:UserName": "שם משתמש", + "DisplayName:Email": "אימייל", + "DisplayName:Name": "שם פרטי", + "DisplayName:Surname": "שם משפחה", + "DisplayName:Password": "סיסמה", + "DisplayName:EmailAddress": "כתובת אימייל", + "DisplayName:PhoneNumber": "מספר טלפון", + "PersonalSettings": "הגדרות אישיות", + "PersonalSettingsSaved": "ההגדרות האישיות נשמרו", + "PersonalSettingsChangedConfirmationModalTitle": "הפרטים האישיים השתנו", + "PersonalSettingsChangedConfirmationModalDescription": "השינויים ייכנסו לתוקף אחרי התחברות מחדש. לצאת עכשיו?", + "PasswordChanged": "הסיסמה שונתה", + "NewPasswordConfirmFailed": "יש לאמת את הסיסמה החדשה.", + "NewPasswordSameAsOld": "הסיסמה החדשה חייבת להיות שונה מהסיסמה הקודמת.", + "Manage": "ניהול", + "MyAccount": "החשבון שלי", + "DisplayName:Abp.Account.IsSelfRegistrationEnabled": "הרשמה עצמית מופעלת", + "Description:Abp.Account.IsSelfRegistrationEnabled": "האם משתמשים יכולים לפתוח חשבון בעצמם.", + "DisplayName:Abp.Account.EnableLocalLogin": "אימות עם חשבון מקומי", + "Description:Abp.Account.EnableLocalLogin": "האם השרת מאפשר למשתמשים להתחבר עם חשבון מקומי.", + "LoggedOutTitle": "יצאת מהחשבון", + "LoggedOutText": "יצאת מהחשבון. ההפניה תתבצע בעוד רגע.", + "ReturnToText": "לחצו כאן כדי לחזור ליישום", + "OrLoginWith": "או התחברות עם:", + "ForgotPassword": "שכחת את הסיסמה?", + "SendPasswordResetLink_Information": "קישור לאיפוס הסיסמה יישלח לאימייל שלך. אם האימייל לא מגיע תוך כמה דקות, נסו שוב.", + "PasswordResetMailSentMessage": "אימייל לשחזור החשבון נשלח לכתובת האימייל שלך. אם האימייל לא מופיע בתיבת הדואר הנכנס תוך 15 דקות, חפשו אותו בתיקיית דואר הזבל. אם הוא נמצא שם, סמנו אותו כ\"לא זבל\".", + "ResetPassword": "איפוס סיסמה", + "ConfirmPassword": "אימות הסיסמה", + "ResetPassword_Information": "הזינו את הסיסמה החדשה.", + "YourPasswordIsSuccessfullyReset": "הסיסמה אופסה בהצלחה.", + "GoToTheApplication": "מעבר ליישום", + "BackToLogin": "חזרה לכניסה", + "ProfileTab:Password": "שינוי סיסמה", + "ProfileTab:PersonalInfo": "פרטים אישיים", + "ReturnToApplication": "חזרה ליישום", + "Volo.Account:InvalidEmailAddress": "כתובת האימייל לא נמצאה: {0}", + "PasswordReset": "איפוס סיסמה", + "PasswordResetInfoInEmail": "קיבלנו בקשה לשחזור החשבון! אם הבקשה נשלחה על ידך, לחצו על הקישור הבא כדי לאפס את הסיסמה.", + "ResetMyPassword": "איפוס הסיסמה שלי", + "AccessDenied": "הגישה נדחתה!", + "AccessDeniedMessage": "אין לך גישה למשאב זה.", + "OrRegisterWith": "או הרשמה עם", + "RegisterUsingYourProviderAccount": "הרשמה באמצעות חשבון {0}", + "RequireMigrateSeedTitle": "משתמש המנהל לא נמצא", + "RequireMigrateSeedMessage": "ודאו שזריעת הנתונים (seed) של מסד הנתונים הורצה. פתרונות אפשריים מופיעים בתיעוד." + } +} diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json index 4264f6ebcf..3d1f7dc50f 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "अमान्य लॉगिन प्रयासों के कारण उपयोगकर्ता खाता बंद कर दिया गया है। कृपया थोड़ी देर प्रतीक्षा करें और पुन: प्रयास करें।", "InvalidUserNameOrPassword": "अमान्य उपयोगकर्ता नाम या पासवर्ड!", "LoginIsNotAllowed": "आपको लॉगिन करने की अनुमति नहीं है! आपका खाता निष्क्रिय है या आपके ईमेल/फ़ोन नंबर की पुष्टि करने की आवश्यकता है।", + "ExternalLoginPasswordChangeRequired": "आपको लॉगिन करने की अनुमति नहीं है! आपका पासवर्ड बदला जाना आवश्यक है, लेकिन बाहरी लॉगिन के साथ यह संभव नहीं है। कृपया अपने व्यवस्थापक से संपर्क करें।", + "RegisteredButLoginIsNotAllowed": "आपका खाता बना दिया गया है, लेकिन आपको अभी लॉगिन करने की अनुमति नहीं है!", "SelfRegistrationDisabledMessage": "इस आवेदन के लिए स्व-पंजीकरण अक्षम है। नया उपयोगकर्ता पंजीकृत करने के लिए कृपया एप्लिकेशन व्यवस्थापक से संपर्क करें।", "LocalLoginDisabledMessage": "इस एप्लिकेशन के लिए स्थानीय लॉगिन अक्षम है।", "Login": "लॉग इन करें", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json index 2262779dba..808904b23d 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Korisnički račun je zaključan zbog nevažećih pokušaja prijave. Pričekajte malo i pokušajte ponovo.", "InvalidUserNameOrPassword": "Neispravno korisničko ime ili lozinka!", "LoginIsNotAllowed": "Nemate dopuštenje za prijavu! Vaš račun nije aktivan ili treba potvrditi vašu e-poštu/broj telefona.", + "ExternalLoginPasswordChangeRequired": "Nemate dopuštenje za prijavu! Vaša lozinka mora se promijeniti, ali to nije moguće s vanjskom prijavom. Obratite se svom administratoru.", + "RegisteredButLoginIsNotAllowed": "Vaš račun je kreiran, ali još nemate dopuštenje za prijavu!", "SelfRegistrationDisabledMessage": "Samoregistracija je onemogućena za ovu aplikaciju. Molimo kontaktirajte administratora aplikacije za registraciju novog korisnika.", "LocalLoginDisabledMessage": "Lokalna prijava je onemogućena za ovu aplikaciju.", "Login": "Prijavi se", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json index c2a8d3d354..5d7936c0ef 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "A felhasználói fiókot érvénytelen bejelentkezési kísérletek miatt zároltuk. Kérjük, várjon egy kicsit, és próbálja újra.", "InvalidUserNameOrPassword": "Érvénytelen felhasználónév vagy jelszó!", "LoginIsNotAllowed": "A bejelentkezés nem engedélyezett! Fiókja inaktív, vagy meg kell erősítenie e -mail címét/telefonszámát.", + "ExternalLoginPasswordChangeRequired": "A bejelentkezés nem engedélyezett! A jelszavát meg kell változtatni, de ez külső bejelentkezéssel nem lehetséges. Kérjük, forduljon a rendszergazdához.", + "RegisteredButLoginIsNotAllowed": "A fiókja létrejött, de a bejelentkezés még nem engedélyezett!", "SelfRegistrationDisabledMessage": "Ennél az alkalmazásnál az önregisztráció le van tiltva. Új felhasználó regisztrálásához vegye fel a kapcsolatot az alkalmazás rendszergazdájával.", "LocalLoginDisabledMessage": "A helyi bejelentkezés le van tiltva ennél az alkalmazásnál.", "Login": "Bejelntkezés", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json index cb38ff2b6a..1d78b2edec 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Notandareikningnum hefur verið lokað vegna ógildra innskráningartilrauna. Bíddu aðeins og reyndu aftur.", "InvalidUserNameOrPassword": "Ógilt notendanafn eða lykilorð!", "LoginIsNotAllowed": "Þú hefur ekki leyfi til að skrá þig inn! Þú þarft að staðfesta netfangið þitt/símanúmer.", + "ExternalLoginPasswordChangeRequired": "Þú hefur ekki leyfi til að skrá þig inn! Breyta þarf lykilorðinu þínu, en það er ekki hægt með ytri innskráningu. Vinsamlegast hafðu samband við kerfisstjóra.", + "RegisteredButLoginIsNotAllowed": "Aðgangurinn þinn hefur verið stofnaður, en þú hefur ekki leyfi til að skrá þig inn ennþá!", "SelfRegistrationDisabledMessage": "Sjálfsskráning er óvirk fyrir þetta forrit. Vinsamlegast hafðu samband við umsjónarmann hugbúnaðarins til að skrá nýjan notanda.", "LocalLoginDisabledMessage": "Staðbundin innskráning er óvirk fyrir þetta forrit.", "Login": "Skrá inn", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json index a2a2a6db50..71e81d2410 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "L'account utente è stato bloccato a causa di troppi tentativi di accesso non validi. Attendi qualche istante e riprova.", "InvalidUserNameOrPassword": "Username o password non validi!", "LoginIsNotAllowed": "Non sei autorizzato ad accedere! Il tuo account non è attivo o devi confermare la tua e-mail/numero di telefono.", + "ExternalLoginPasswordChangeRequired": "Non sei autorizzato ad accedere! La tua password deve essere modificata, ma ciò non è possibile con un accesso esterno. Contatta il tuo amministratore.", + "RegisteredButLoginIsNotAllowed": "Il tuo account è stato creato, ma non sei ancora autorizzato ad accedere!", "SelfRegistrationDisabledMessage": "L'auto-registrazione è disabilitata per questa applicazione. Contatta l'amministratore dell'applicazione per richiedere la registrazione.", "LocalLoginDisabledMessage": "L'accesso locale è disabilitato per questa applicazione.", "Login": "Accedi", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json index a1c389d8a2..273171bed1 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Het gebruikersaccount is geblokkeerd vanwege ongeldige inlogpogingen. Wacht even en probeer het opnieuw.", "InvalidUserNameOrPassword": "Ongeldige gebruikersnaam of wachtwoord!", "LoginIsNotAllowed": "U mag niet inloggen! Uw account is inactief of moet uw e-mailadres/telefoonnummer bevestigen.", + "ExternalLoginPasswordChangeRequired": "U mag niet inloggen! Uw wachtwoord moet worden gewijzigd, maar dit is niet mogelijk met een externe login. Neem contact op met uw beheerder.", + "RegisteredButLoginIsNotAllowed": "Uw account is aangemaakt, maar u mag nog niet inloggen!", "SelfRegistrationDisabledMessage": "Zelfregistratie is uitgeschakeld voor deze applicatie. Neem contact op met de applicatiebeheerder om een nieuwe gebruiker te registreren.", "LocalLoginDisabledMessage": "Lokale aanmelding is uitgeschakeld voor deze applicatie.", "Login": "Log in", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json index 028fc3100b..8c9112c0de 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Konto użytkownika zostało zablokowane po nieudanych próbach zalogowania. Odczekaj chwilę i spróbuj ponownie.", "InvalidUserNameOrPassword": "Niepoprawna nazwa użytkownika lub hasło!", "LoginIsNotAllowed": "Nie możesz się zalogować! Twoje konto jest nieaktywne lub wymaga potwierdzenia adresu e-mail/numeru telefonu.", + "ExternalLoginPasswordChangeRequired": "Nie możesz się zalogować! Twoje hasło musi zostać zmienione, ale nie jest to możliwe przy logowaniu zewnętrznym. Skontaktuj się z administratorem.", + "RegisteredButLoginIsNotAllowed": "Twoje konto zostało utworzone, ale nie możesz się jeszcze zalogować!", "SelfRegistrationDisabledMessage": "Rejestracja użytkowników jest wyłączona dla tej aplikacji. Skontaktuj się z administratorem aplikacji w celu rejestracji nowego użytkownika.", "LocalLoginDisabledMessage": "Logowanie lokalne jest wyłączone dla tej aplikacji.", "Login": "Zaloguj", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json index e92a6f1d5b..811bba3c1b 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Esta conta de usuário está bloqueada devido a muitas tentativas de acesso. Por favor, espere alguns instantes e tente novamente.", "InvalidUserNameOrPassword": "Usuário ou senha estão incorretos!", "LoginIsNotAllowed": "Você não tem permissão para fazer o login! Sua conta está inativa ou precisa confirmar seu e-mail/número de telefone.", + "ExternalLoginPasswordChangeRequired": "Você não tem permissão para fazer o login! Sua senha precisa ser alterada, mas isso não é possível com um login externo. Entre em contato com o administrador.", + "RegisteredButLoginIsNotAllowed": "Sua conta foi criada, mas você ainda não tem permissão para fazer o login!", "SelfRegistrationDisabledMessage": "Não é permitido que você crie uma nova conta neste site. Contate um administrador para que ele crie uma conta para você.", "LocalLoginDisabledMessage": "O login local está desativado para este aplicativo.", "Login": "Entrar", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt.json index df64691b13..baaf4188af 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt.json @@ -11,12 +11,14 @@ "UserLockedOutMessage": "A sua conta foi bloqueada pelo administrador ou devido a tentativas de início de sessão inválidas. Tente novamente mais tarde. Contacte o administrador de sistema se considerar que se trata de um erro.", "InvalidUserNameOrPassword": "Nome de utilizador ou palavra-passe inválidos!", "LoginIsNotAllowed": "Não tem permissão para iniciar sessão! A sua conta está inativa ou precisa de confirmar o seu email/número de telefone.", + "ExternalLoginPasswordChangeRequired": "Não tem permissão para iniciar sessão! A sua palavra-passe tem de ser alterada, mas isso não é possível com um início de sessão externo. Contacte o seu administrador.", + "RegisteredButLoginIsNotAllowed": "A sua conta foi criada, mas ainda não tem permissão para iniciar sessão!", "SelfRegistrationDisabledMessage": "O registo autónomo está desativado nesta aplicação. Contacte o administrador da aplicação para registar um novo utilizador.", "LocalLoginDisabledMessage": "O início de sessão local está desativado nesta aplicação.", "Login": "Iniciar sessão", "Cancel": "Cancelar", "Register": "Registar", - "AreYouANewUser": "É um novo utilizador?", + "AreYouANewUser": "É um utilizador novo?", "AlreadyRegistered": "Já está registado?", "InvalidLoginRequest": "Pedido de início de sessão inválido", "ThereAreNoLoginSchemesConfiguredForThisClient": "Não existem esquemas de início de sessão configurados para este cliente.", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json index 63fea101b1..20fc5333cf 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Contul a fost blocat din cauza incercărilor eşuate de autentificare. Vă rugăm să aşteptaţi şi să încercaţi din nou.", "InvalidUserNameOrPassword": "Nume de utilizator sau parolă invalide!", "LoginIsNotAllowed": "Nu ai voie să te autentifici! Contul dvs. este inactiv sau trebuie să vă confirme numărul de e-mail/telefon.", + "ExternalLoginPasswordChangeRequired": "Nu ai voie să te autentifici! Parola dvs. trebuie schimbată, dar acest lucru nu este posibil cu o autentificare externă. Vă rugăm să contactați administratorul.", + "RegisteredButLoginIsNotAllowed": "Contul dvs. a fost creat, dar încă nu aveți voie să vă autentificați!", "SelfRegistrationDisabledMessage": "Înregistrarea personală este dezactivată pentru această aplicaţie. Vă rugăm să contactaţi administratorul aplicaţiei pentru a înregistra un nou utilizator.", "LocalLoginDisabledMessage": "Autentificarea locală este dezactivată pentru această aplicaţie.", "Login": "Autentificare", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json index 834fd7707b..341a789315 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Пользователь заблокирован из-за большого количества попыток входа. Пожалуйста, попробуйте позднее.", "InvalidUserNameOrPassword": "Неправильные имя пользователя и/или пароль!", "LoginIsNotAllowed": "Вам не разрешено входить в систему! Ваша учетная запись неактивна или вам необходимо подтвердить адрес электронной почты/номер телефона.", + "ExternalLoginPasswordChangeRequired": "Вам не разрешено входить в систему! Ваш пароль необходимо изменить, но это невозможно при внешнем входе. Обратитесь к администратору.", + "RegisteredButLoginIsNotAllowed": "Ваша учетная запись создана, но вам пока не разрешено входить в систему!", "SelfRegistrationDisabledMessage": "Самостоятельная регистрация не предусмотрена. Пожалуйста, свяжитесь с администраром для получения доступа.", "LocalLoginDisabledMessage": "Локальный вход отключен.", "Login": "Войти", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json index 0965e8aaa3..b00ad3f02b 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Používateľské konto bolo uzamknuté z dôvodu neplatných pokusov o prihlásenie. Chvíľu počkajte a skúste to znova.", "InvalidUserNameOrPassword": "Neplatné používateľské meno alebo heslo!", "LoginIsNotAllowed": "Nemáte povolenie sa prihlásiť! Váš účet je neaktívny alebo potrebuje potvrdiť váš e -mail/telefónne číslo.", + "ExternalLoginPasswordChangeRequired": "Nemáte povolenie sa prihlásiť! Vaše heslo musí byť zmenené, čo však pri externom prihlásení nie je možné. Kontaktujte prosím svojho správcu.", + "RegisteredButLoginIsNotAllowed": "Váš účet bol vytvorený, ale zatiaľ nemáte povolenie sa prihlásiť!", "SelfRegistrationDisabledMessage": "Samostatná registrácia je pre túto aplikáciu vypnutá. Ak chcete zaregistrovať nového používateľa, obráťte sa na správcu aplikácie.", "LocalLoginDisabledMessage": "Lokálne prihlásenie je pre túto aplikáciu zakázané.", "Login": "Prihlásiť", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json index 63820bc60f..5c17e641e8 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Uporabniški račun je bil zaklenjen zaradi neveljavnih poskusov prijave. Počakajte nekaj časa in poskusite znova.", "InvalidUserNameOrPassword": "Napačno uporabniško ime ali geslo!", "LoginIsNotAllowed": "Ne smete se prijaviti! Vaš račun je neaktiven ali mora potrditi vaš e -poštni naslov/telefonsko številko.", + "ExternalLoginPasswordChangeRequired": "Ne smete se prijaviti! Vaše geslo je treba spremeniti, vendar to z zunanjo prijavo ni mogoče. Obrnite se na skrbnika.", + "RegisteredButLoginIsNotAllowed": "Vaš račun je bil ustvarjen, vendar se še ne smete prijaviti!", "SelfRegistrationDisabledMessage": "Možnost lastne registracije uporabnika je onemogočena za to aplikacijo. Kontaktirajte skrbnika aplikacije, da registrirate novega uporabnika.", "LocalLoginDisabledMessage": "Lokalna prijava za to aplikacijo je onemogočena.", "Login": "Prijava", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sv.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sv.json index a03bf20e97..6f917392db 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sv.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sv.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Användarkontot har låsts på grund av ogiltiga inloggningsförsök. Vänligen vänta ett tag och försök igen.", "InvalidUserNameOrPassword": "Ogiltigt användarnamn eller lösenord!", "LoginIsNotAllowed": "Du kan inte logga in! Ditt konto är inaktivt eller så behöver du bekräfta din e-postadress eller ditt telefonnummer.", + "ExternalLoginPasswordChangeRequired": "Du kan inte logga in! Ditt lösenord måste ändras, men det är inte möjligt med en extern inloggning. Kontakta din administratör.", + "RegisteredButLoginIsNotAllowed": "Ditt konto har skapats, men du kan inte logga in ännu!", "SelfRegistrationDisabledMessage": "Självregistrering är inaktiverat för denna applikation. Vänligen kontakta applikationsadministratören för att registrera en ny användare.", "LocalLoginDisabledMessage": "Lokal inloggning är inaktiverad för denna applikation.", "Login": "Logga in", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json index 07309d4922..3853253467 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Kullanıcı hesabı hatalı giriş denemeleri nedeniyle kilitlenmiştir. Lütfen bir süre bekleyip tekrar deneyin.", "InvalidUserNameOrPassword": "Kullanıcı adı ya da şifre geçersiz!", "LoginIsNotAllowed": "Giriş yapmanıza izin verilmiyor! Hesabınız etkin değil veya e-postanızı/telefon numaranızı onaylamanız gerekiyor.", + "ExternalLoginPasswordChangeRequired": "Giriş yapmanıza izin verilmiyor! Şifrenizin değiştirilmesi gerekiyor, ancak bu harici bir girişle mümkün değil. Lütfen yöneticinizle iletişime geçin.", + "RegisteredButLoginIsNotAllowed": "Hesabınız oluşturuldu, ancak henüz giriş yapmanıza izin verilmiyor!", "SelfRegistrationDisabledMessage": "Bu uygulama için kullanıcıların kendi kendilerine kaydolmaları engellenmiştir. Yeni bir kullanıcı kaydetmek için lütfen uygulama yöneticisi ile iletişime geçin.", "LocalLoginDisabledMessage": "Bu uygulama için local login devre dışı bırakılmıştır.", "Login": "Giriş yap", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json index e29ba0d7b9..b3ede109b7 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "Tài khoản người dùng đã bị khóa do các nỗ lực đăng nhập không hợp lệ. Xin vui lòng chờ một lúc và thử lại.", "InvalidUserNameOrPassword": "Sai tên tài khoản hoặc mật khẩu!", "LoginIsNotAllowed": "Bạn không được phép đăng nhập! Tài khoản của bạn không hoạt động hoặc cần xác nhận email/số điện thoại của bạn.", + "ExternalLoginPasswordChangeRequired": "Bạn không được phép đăng nhập! Mật khẩu của bạn phải được thay đổi, nhưng không thể thực hiện việc này với đăng nhập bên ngoài. Vui lòng liên hệ với quản trị viên của bạn.", + "RegisteredButLoginIsNotAllowed": "Tài khoản của bạn đã được tạo, nhưng bạn chưa được phép đăng nhập!", "SelfRegistrationDisabledMessage": "Tự đăng ký người dùng bị vô hiệu hóa cho ứng dụng này. Liên hệ với quản trị viên ứng dụng để đăng ký người dùng mới.", "LocalLoginDisabledMessage": "Đăng nhập cục bộ bị vô hiệu hóa cho ứng dụng này.", "Login": "Đăng nhập", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json index 094798b95c..2a1ee5419e 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "由于尝试登录无效,用户账户已被锁定。请稍候再试。", "InvalidUserNameOrPassword": "用户名或密码无效!", "LoginIsNotAllowed": "您不能登录!您的帐户未激活或需要确认您的电子邮件/电话号码。", + "ExternalLoginPasswordChangeRequired": "您不能登录!您的密码必须更改,但无法通过外部登录完成。请联系管理员。", + "RegisteredButLoginIsNotAllowed": "您的帐户已创建,但您暂时不能登录!", "SelfRegistrationDisabledMessage": "应用程序未开放注册。请联系应用程序管理员注册新用户。", "LocalLoginDisabledMessage": "应用程序禁用本地登录。", "Login": "登录", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json index 1657ce4a49..7e1f1b302a 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json @@ -11,6 +11,8 @@ "UserLockedOutMessage": "登入失敗,使用者帳號已被鎖定.請稍後再試.", "InvalidUserNameOrPassword": "使用者名稱或密碼錯誤!", "LoginIsNotAllowed": "無法登入!你的帳號未啟用或者需要驗證電子郵件地址/手機號碼.", + "ExternalLoginPasswordChangeRequired": "無法登入!你的密碼必須變更,但無法透過外部登入完成.請聯絡管理員.", + "RegisteredButLoginIsNotAllowed": "帳號已建立,但你暫時無法登入!", "SelfRegistrationDisabledMessage": "應用程式未開放註冊,請聯絡管理員以加入新使用者.", "LocalLoginDisabledMessage": "應用程式未開放本地帳戶登入.", "Login": "登入", diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj b/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj index 0046c63637..d2f318b320 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj +++ b/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Abp.Account.Application Volo.Abp.Account.Application true diff --git a/modules/account/src/Volo.Abp.Account.Blazor.MudBlazor/Volo.Abp.Account.Blazor.MudBlazor.csproj b/modules/account/src/Volo.Abp.Account.Blazor.MudBlazor/Volo.Abp.Account.Blazor.MudBlazor.csproj index 8ee2deb508..c75816db05 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor.MudBlazor/Volo.Abp.Account.Blazor.MudBlazor.csproj +++ b/modules/account/src/Volo.Abp.Account.Blazor.MudBlazor/Volo.Abp.Account.Blazor.MudBlazor.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Abp.Account.Blazor.MudBlazor diff --git a/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj b/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj index c86f70c5ae..a2a26b1e27 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj +++ b/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Abp.Account.Blazor diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj b/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj index c19963867e..74b26fe5b1 100644 --- a/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Abp.Account.HttpApi.Client Volo.Abp.Account.HttpApi.Client diff --git a/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj b/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj index a23e01866b..bf0663fd06 100644 --- a/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj +++ b/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Abp.Account.HttpApi Volo.Abp.Account.HttpApi diff --git a/modules/account/src/Volo.Abp.Account.Installer/Volo.Abp.Account.Installer.csproj b/modules/account/src/Volo.Abp.Account.Installer/Volo.Abp.Account.Installer.csproj index 271a2428af..5834802856 100644 --- a/modules/account/src/Volo.Abp.Account.Installer/Volo.Abp.Account.Installer.csproj +++ b/modules/account/src/Volo.Abp.Account.Installer/Volo.Abp.Account.Installer.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 true diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs index 676f37aa47..519d76ce9f 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs @@ -157,16 +157,32 @@ public class IdentityServerSupportedLoginModel : LoginModel return Page(); } + if (result is AbpSignInResult { IsExternalLoginPasswordChangeRequired: true }) + { + Alerts.Warning(L["ExternalLoginPasswordChangeRequired"]); + return Page(); + } + if (result.IsNotAllowed) { - var notAllowedUser = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress) ?? - await UserManager.FindByEmailAsync(LoginInput.UserNameOrEmailAddress); + var notAllowedUser = await UserManager.FindSharedUserByNameAsync(LoginInput.UserNameOrEmailAddress) ?? + await UserManager.FindSharedUserByEmailAsync(LoginInput.UserNameOrEmailAddress); if (notAllowedUser != null) { using (CurrentTenant.Change(notAllowedUser.TenantId)) { await IdentityOptions.SetAsync(); - if ((notAllowedUser.ShouldChangePasswordOnNextLogin || + if (notAllowedUser.IsActive && await UserManager.IsLockedOutAsync(notAllowedUser)) + { + Alerts.Warning(L["UserLockedOutMessage"]); + return Page(); + } + + // The password is only checked if the password change is the reason of the rejection. + // The user may be authenticated by an external login provider otherwise. + if (notAllowedUser.IsActive && + await SignInManager.CanSignInAsync(notAllowedUser) && + (notAllowedUser.ShouldChangePasswordOnNextLogin || await UserManager.ShouldPeriodicallyChangePasswordAsync(notAllowedUser)) && !await UserManager.CheckPasswordAsync(notAllowedUser, LoginInput.Password)) { diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj index c9a7915447..bc264c371a 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Abp.Account.Web.IdentityServer Volo.Abp.Account.Web.IdentityServer true diff --git a/modules/account/src/Volo.Abp.Account.Web.OpenIddict/Volo.Abp.Account.Web.OpenIddict.csproj b/modules/account/src/Volo.Abp.Account.Web.OpenIddict/Volo.Abp.Account.Web.OpenIddict.csproj index 51817191d7..5aeb685aa1 100644 --- a/modules/account/src/Volo.Abp.Account.Web.OpenIddict/Volo.Abp.Account.Web.OpenIddict.csproj +++ b/modules/account/src/Volo.Abp.Account.Web.OpenIddict/Volo.Abp.Account.Web.OpenIddict.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Abp.Account.Web.OpenIddict Volo.Abp.Account.Web.OpenIddict true diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs index ebd556f8e2..38b7c8a67d 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Options; using Volo.Abp.Account.Localization; @@ -8,6 +9,7 @@ using Volo.Abp.AspNetCore.ExceptionHandling; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; using Volo.Abp.ExceptionHandling; using Volo.Abp.Identity; +using Volo.Abp.Identity.AspNetCore; using IdentityUser = Volo.Abp.Identity.IdentityUser; namespace Volo.Abp.Account.Web.Pages.Account; @@ -35,6 +37,36 @@ public abstract class AccountPageModel : AbpPageModel } } + /// + /// Checks the user before signing in without asking for the credentials of the user. + /// + /// Null if the user is allowed to sign in, otherwise the result why the user is denied. + protected virtual async Task CheckUserSignInAsync(IdentityUser user) + { + // The IdentityOptions property is hidden by the login page. + await LazyServiceProvider.LazyGetRequiredService>().SetAsync(); + if (SignInManager is AbpSignInManager abpSignInManager) + { + return await abpSignInManager.CallPreSignInCheckAsync(user); + } + + // The sign-in manager of the application may not be derived from AbpSignInManager. + if (!user.IsActive || + user.ShouldChangePasswordOnNextLogin || + await UserManager.ShouldPeriodicallyChangePasswordAsync(user) || + !await SignInManager.CanSignInAsync(user)) + { + return SignInResult.NotAllowed; + } + + if (UserManager.SupportsUserLockout && await UserManager.IsLockedOutAsync(user)) + { + return SignInResult.LockedOut; + } + + return null; + } + protected virtual void CheckIdentityErrors(IdentityResult identityResult) { if (!identityResult.Succeeded) diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs index 57fcbe9e46..d53482daf0 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs @@ -128,16 +128,32 @@ public class LoginModel : AccountPageModel return Page(); } + if (result is AbpSignInResult { IsExternalLoginPasswordChangeRequired: true }) + { + Alerts.Warning(L["ExternalLoginPasswordChangeRequired"]); + return Page(); + } + if (result.IsNotAllowed) { - var notAllowedUser = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress) ?? - await UserManager.FindByEmailAsync(LoginInput.UserNameOrEmailAddress); + var notAllowedUser = await UserManager.FindSharedUserByNameAsync(LoginInput.UserNameOrEmailAddress) ?? + await UserManager.FindSharedUserByEmailAsync(LoginInput.UserNameOrEmailAddress); if (notAllowedUser != null) { using (CurrentTenant.Change(notAllowedUser.TenantId)) { await IdentityOptions.SetAsync(); - if ((notAllowedUser.ShouldChangePasswordOnNextLogin || + if (notAllowedUser.IsActive && await UserManager.IsLockedOutAsync(notAllowedUser)) + { + Alerts.Warning(L["UserLockedOutMessage"]); + return Page(); + } + + // The password is only checked if the password change is the reason of the rejection. + // The user may be authenticated by an external login provider otherwise. + if (notAllowedUser.IsActive && + await SignInManager.CanSignInAsync(notAllowedUser) && + (notAllowedUser.ShouldChangePasswordOnNextLogin || await UserManager.ShouldPeriodicallyChangePasswordAsync(notAllowedUser)) && !await UserManager.CheckPasswordAsync(notAllowedUser, LoginInput.Password)) { @@ -296,6 +312,19 @@ public class LoginModel : AccountPageModel }); } + var signInCheckResult = await CheckUserSignInAsync(user); + if (signInCheckResult != null) + { + if (signInCheckResult.IsLockedOut) + { + Logger.LogWarning($"External login callback error: user is locked out!"); + throw new UserFriendlyException("Cannot proceed because user is locked out!"); + } + + Logger.LogWarning($"External login callback error: user is not allowed!"); + throw new UserFriendlyException("Cannot proceed because user is not allowed!"); + } + if (await UserManager.FindByLoginAsync(loginInfo.LoginProvider, loginInfo.ProviderKey) == null) { CheckIdentityErrors(await UserManager.AddLoginAsync(user, loginInfo)); diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs index 6b990253fc..ccdbc688c6 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs @@ -43,6 +43,8 @@ public class RegisterModel : AccountPageModel public bool IsExternalLoginOnly => EnableLocalRegister == false && ExternalProviders?.Count() == 1; public string ExternalLoginScheme => IsExternalLoginOnly ? ExternalProviders?.SingleOrDefault()?.AuthenticationScheme : null; + protected bool IsRegisteredUserNotAllowedToSignIn { get; set; } + protected IAuthenticationSchemeProvider SchemeProvider { get; } protected AbpAccountOptions AccountOptions { get; } @@ -137,6 +139,12 @@ public class RegisterModel : AccountPageModel await RegisterLocalUserAsync(); } + if (IsRegisteredUserNotAllowedToSignIn) + { + Alerts.Warning(L["RegisteredButLoginIsNotAllowed"]); + return Page(); + } + return await RedirectSafelyAsync(ReturnUrl, ReturnUrlHash); } catch (BusinessException e) @@ -161,10 +169,7 @@ public class RegisterModel : AccountPageModel ); var user = await UserManager.GetByIdAsync(userDto.Id); - await SignInManager.SignInAsync(user, isPersistent: true); - - // Clear the dynamic claims cache. - await IdentityDynamicClaimsPrincipalContributorCache.ClearAsync(user.Id, user.TenantId); + await SignInRegisteredUserAsync(user); } protected virtual async Task RegisterExternalUserAsync(ExternalLoginInfo externalLoginInfo, string userName, string emailAddress) @@ -190,7 +195,20 @@ public class RegisterModel : AccountPageModel ))).CheckErrors(); } - await SignInManager.SignInAsync(user, isPersistent: true, ExternalLoginAuthSchema); + await SignInRegisteredUserAsync(user, ExternalLoginAuthSchema); + } + + protected virtual async Task SignInRegisteredUserAsync(IdentityUser user, string authenticationMethod = null) + { + if (await CheckUserSignInAsync(user) != null) + { + // The user is registered but has to sign in later, for example after confirming the email. + Logger.LogWarning($"The registered user is not allowed to sign in! (username: \"{user.UserName}\", id:\"{user.Id}\")"); + IsRegisteredUserNotAllowedToSignIn = true; + return; + } + + await SignInManager.SignInAsync(user, isPersistent: true, authenticationMethod); // Clear the dynamic claims cache. await IdentityDynamicClaimsPrincipalContributorCache.ClearAsync(user.Id, user.TenantId); diff --git a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj index 35f0d57960..b5f12f0c37 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj +++ b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Abp.Account.Web Volo.Abp.Account.Web $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj index cdfd30470e..a39089e990 100644 --- a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj +++ b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 diff --git a/modules/account/test/Volo.Abp.Account.Web.Tests/Volo.Abp.Account.Web.Tests.abppkg b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo.Abp.Account.Web.Tests.abppkg new file mode 100644 index 0000000000..4a37acf831 --- /dev/null +++ b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo.Abp.Account.Web.Tests.abppkg @@ -0,0 +1,4 @@ +{ + "role": "lib.test", + "projectId": "e7ac0de5-6c69-4e07-8d24-6082c3dd9c1b" +} \ No newline at end of file diff --git a/modules/account/test/Volo.Abp.Account.Web.Tests/Volo.Abp.Account.Web.Tests.csproj b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo.Abp.Account.Web.Tests.csproj new file mode 100644 index 0000000000..fe2292391a --- /dev/null +++ b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo.Abp.Account.Web.Tests.csproj @@ -0,0 +1,23 @@ + + + + net11.0 + + + + + + + + + + + + + + + + + + + diff --git a/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/AbpAccountWebIdentityServerTestModule.cs b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/AbpAccountWebIdentityServerTestModule.cs new file mode 100644 index 0000000000..da28ce7c2d --- /dev/null +++ b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/AbpAccountWebIdentityServerTestModule.cs @@ -0,0 +1,40 @@ +using IdentityServer4.Models; +using IdentityServer4.Services; +using Microsoft.AspNetCore.Authentication; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using NSubstitute; +using Volo.Abp.IdentityServer; +using Volo.Abp.Modularity; + +namespace Volo.Abp.Account.Web; + +[DependsOn( + typeof(AbpAccountWebTestModule), + typeof(AbpAccountWebIdentityServerModule) +)] +public class AbpAccountWebIdentityServerTestModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + // The other tests of the assembly run in the same process, so the static claim types are not changed. + PreConfigure(options => + { + options.UpdateAbpClaimTypes = false; + options.UpdateJwtSecurityTokenHandlerDefaultInboundClaimTypeMap = false; + options.AddDeveloperSigningCredential = false; + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + // There is no authorize request in the tests. + var interaction = Substitute.For(); + interaction.GetAuthorizationContextAsync(Arg.Any()).Returns((AuthorizationRequest)null); + context.Services.Replace(ServiceDescriptor.Singleton(interaction)); + + // IdentityServer decorates the authentication service, the substitute of the tests is used instead. + context.Services.RemoveAll(); + context.Services.AddSingleton(Substitute.For()); + } +} diff --git a/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/AbpAccountWebTestBase.cs b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/AbpAccountWebTestBase.cs new file mode 100644 index 0000000000..310cdb338a --- /dev/null +++ b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/AbpAccountWebTestBase.cs @@ -0,0 +1,181 @@ +using System; +using System.Linq; +using System.Security.Claims; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.AspNetCore.Mvc.Routing; +using Microsoft.AspNetCore.Mvc.ViewFeatures; +using Microsoft.AspNetCore.Routing; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Localization; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using NSubstitute; +using Volo.Abp.Account.Localization; +using Volo.Abp.Account.Web.Pages.Account; +using Volo.Abp.AspNetCore.Mvc.UI.Alerts; +using Volo.Abp.Identity; +using Volo.Abp.Identity.Settings; +using Volo.Abp.Modularity; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Settings; +using Volo.Abp.Testing; +using Volo.Abp.Uow; +using IdentityRole = Volo.Abp.Identity.IdentityRole; +using IdentityUser = Volo.Abp.Identity.IdentityUser; + +namespace Volo.Abp.Account.Web; + +public enum RestrictedUserState +{ + Inactive, + LockedOut, + RequiresConfirmation, + MustChangePassword, + PasswordExpired +} + +public abstract class AbpAccountWebTestBase : AbpAccountWebTestBase +{ +} + +public abstract class AbpAccountWebTestBase : AbpIntegratedTest + where TStartupModule : IAbpModule +{ + protected const string Password = "1q2w3E*"; + protected const string ExternalLoginProvider = "TestProvider"; + + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + + // The sign-in manager of an application, replaced like it is documented for ASP.NET Core Identity. + protected static void ReplaceSignInManager(IServiceCollection services) + { + new IdentityBuilder(typeof(IdentityUser), typeof(IdentityRole), services).AddSignInManager(); + } + + protected void SetSetting(string name, string value) + { + ((TestSettingStore)GetRequiredService()).GlobalValues[name] = value; + } + + protected async Task CreateUserAsync(Guid? tenantId = null, params RestrictedUserState[] states) + { + if (states.Contains(RestrictedUserState.RequiresConfirmation)) + { + SetSetting(IdentitySettingNames.SignIn.RequireConfirmedEmail, "true"); + } + + if (states.Contains(RestrictedUserState.PasswordExpired)) + { + SetSetting(IdentitySettingNames.Password.ForceUsersToPeriodicallyChangePassword, "true"); + SetSetting(IdentitySettingNames.Password.PasswordChangePeriodDays, "1"); + } + + using (GetRequiredService().Change(tenantId)) + using (var uow = GetRequiredService().Begin()) + { + var userManager = GetRequiredService(); + var userName = "user-" + Guid.NewGuid().ToString("N"); + var user = new IdentityUser(Guid.NewGuid(), userName, userName + "@abp.io", tenantId); + user.SetEmailConfirmed(!states.Contains(RestrictedUserState.RequiresConfirmation)); + (await userManager.CreateAsync(user, Password)).CheckErrors(); + + foreach (var state in states) + { + switch (state) + { + case RestrictedUserState.Inactive: + user.SetIsActive(false); + break; + case RestrictedUserState.LockedOut: + (await userManager.SetLockoutEnabledAsync(user, true)).CheckErrors(); + (await userManager.SetLockoutEndDateAsync(user, DateTimeOffset.UtcNow.AddHours(1))).CheckErrors(); + break; + case RestrictedUserState.MustChangePassword: + user.SetShouldChangePasswordOnNextLogin(true); + break; + case RestrictedUserState.PasswordExpired: + user.SetLastPasswordChangeTime(DateTimeOffset.UtcNow.AddDays(-30)); + break; + } + } + + (await userManager.UpdateAsync(user)).CheckErrors(); + await uow.CompleteAsync(); + return user; + } + } + + /// + /// Creates the page like it is created for a request. + /// + /// The services of the request + /// The principal of the external login, if the request is a callback of it + protected TPage CreatePage(IServiceProvider serviceProvider, ClaimsPrincipal externalLoginPrincipal = null) + where TPage : AccountPageModel + { + var httpContext = new DefaultHttpContext { RequestServices = serviceProvider }; + serviceProvider.GetRequiredService().HttpContext = httpContext; + + var authenticationService = serviceProvider.GetRequiredService(); + authenticationService.AuthenticateAsync(Arg.Any(), Arg.Any()).Returns(AuthenticateResult.NoResult()); + if (externalLoginPrincipal != null) + { + var properties = new AuthenticationProperties(); + properties.Items["LoginProvider"] = ExternalLoginProvider; + authenticationService.AuthenticateAsync(Arg.Any(), IdentityConstants.ExternalScheme).Returns( + AuthenticateResult.Success(new AuthenticationTicket(externalLoginPrincipal, properties, IdentityConstants.ExternalScheme))); + } + + var page = serviceProvider.GetRequiredService(); + var modelState = new ModelStateDictionary(); + var actionContext = new ActionContext(httpContext, new RouteData(), new PageActionDescriptor(), modelState); + page.PageContext = new PageContext(actionContext) + { + ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), modelState) + }; + page.TempData = new TempDataDictionary(httpContext, Substitute.For()); + page.Url = new UrlHelper(actionContext); + return page; + } + + protected bool IsSignedIn() + { + return GetRequiredService().ReceivedCalls().Any(call => + call.GetMethodInfo().Name == nameof(IAuthenticationService.SignInAsync) && + (string)call.GetArguments()[1] == IdentityConstants.ApplicationScheme); + } + + protected static string[] GetAlerts(IServiceProvider serviceProvider) + { + return serviceProvider.GetRequiredService().Alerts.Select(x => x.Text).ToArray(); + } + + protected string L(string name) + { + return GetRequiredService>()[name]; + } +} + +public class TestSignInManager : SignInManager +{ + public TestSignInManager( + UserManager userManager, + IHttpContextAccessor contextAccessor, + IUserClaimsPrincipalFactory claimsFactory, + IOptions optionsAccessor, + ILogger> logger, + IAuthenticationSchemeProvider schemes, + IUserConfirmation confirmation) + : base(userManager, contextAccessor, claimsFactory, optionsAccessor, logger, schemes, confirmation) + { + } +} diff --git a/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/AbpAccountWebTestModule.cs b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/AbpAccountWebTestModule.cs new file mode 100644 index 0000000000..7970656b31 --- /dev/null +++ b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/AbpAccountWebTestModule.cs @@ -0,0 +1,46 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using NSubstitute; +using Volo.Abp.Modularity; +using Volo.Abp.Settings; + +namespace Volo.Abp.Account.Web; + +[DependsOn( + typeof(AbpAccountApplicationTestModule), + typeof(AbpAccountWebModule) +)] +public class AbpAccountWebTestModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddSingleton(Substitute.For()); + context.Services.Replace(ServiceDescriptor.Singleton(Substitute.For())); + context.Services.Replace(ServiceDescriptor.Singleton()); + } +} + +public class TestSettingStore : ISettingStore +{ + public Dictionary GlobalValues { get; } = new(); + + public Task GetOrNullAsync(string name, string providerName, string providerKey) + { + return Task.FromResult(GetOrNull(name, providerName)); + } + + public Task> GetAllAsync(string[] names, string providerName, string providerKey) + { + return Task.FromResult(names.Select(name => new SettingValue(name, GetOrNull(name, providerName))).ToList()); + } + + private string GetOrNull(string name, string providerName) + { + return providerName == GlobalSettingValueProvider.ProviderName ? GlobalValues.GetOrDefault(name) : null; + } +} diff --git a/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/AccountPageModel_SignInCheck_Tests.cs b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/AccountPageModel_SignInCheck_Tests.cs new file mode 100644 index 0000000000..a5d0e43dd9 --- /dev/null +++ b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/AccountPageModel_SignInCheck_Tests.cs @@ -0,0 +1,81 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Identity; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.Identity.AspNetCore; +using Volo.Abp.Uow; +using Xunit; +using IdentityUser = Volo.Abp.Identity.IdentityUser; + +namespace Volo.Abp.Account.Web.Pages.Account; + +// Some pages sign in a user without asking for the credentials of the user, for example after the registration. +public abstract class AccountPageModel_SignInCheck_TestBase : AbpAccountWebTestBase +{ + [Fact] + public async Task Should_Allow_User() + { + (await CheckUserSignInAsync()).ShouldBeNull(); + } + + [Theory] + [InlineData(RestrictedUserState.Inactive)] + [InlineData(RestrictedUserState.RequiresConfirmation)] + [InlineData(RestrictedUserState.MustChangePassword)] + [InlineData(RestrictedUserState.PasswordExpired)] + public async Task Should_Not_Allow_Restricted_User(RestrictedUserState state) + { + (await CheckUserSignInAsync(state)).ShouldBe(SignInResult.NotAllowed); + } + + [Fact] + public async Task Should_Not_Allow_Locked_Out_User() + { + (await CheckUserSignInAsync(RestrictedUserState.LockedOut)).ShouldBe(SignInResult.LockedOut); + } + + protected async Task CheckUserSignInAsync(params RestrictedUserState[] states) + { + var user = await CreateUserAsync(states: states); + + using var scope = ServiceProvider.CreateScope(); + var page = CreatePage(scope.ServiceProvider); + using (var uow = GetRequiredService().Begin()) + { + var result = await page.CheckAsync(user); + await uow.CompleteAsync(); + return result; + } + } +} + +public class AccountPageModel_SignInCheck_Tests : AccountPageModel_SignInCheck_TestBase +{ + [Fact] + public void Should_Use_AbpSignInManager() + { + GetRequiredService>().ShouldBeAssignableTo(); + } +} + +public class AccountPageModel_SignInCheck_ReplacedSignInManager_Tests : AccountPageModel_SignInCheck_TestBase +{ + protected override void AfterAddApplication(IServiceCollection services) + { + ReplaceSignInManager(services); + } + + [Fact] + public void Should_Use_Replaced_SignInManager() + { + GetRequiredService>().ShouldBeOfType(); + } +} + +public class TestAccountPageModel : AccountPageModel +{ + public Task CheckAsync(IdentityUser user) + { + return CheckUserSignInAsync(user); + } +} diff --git a/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/IdentityServerSupportedLogin_NotAllowedUser_Tests.cs b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/IdentityServerSupportedLogin_NotAllowedUser_Tests.cs new file mode 100644 index 0000000000..4c97fe11ee --- /dev/null +++ b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/IdentityServerSupportedLogin_NotAllowedUser_Tests.cs @@ -0,0 +1,34 @@ +using System; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.MultiTenancy; +using Xunit; + +namespace Volo.Abp.Account.Web.Pages.Account; + +// The login page is replaced by the login page of IdentityServer. +public class IdentityServerSupportedLogin_NotAllowedUser_Tests : Login_NotAllowedUser_TestBase +{ + [Fact] + public void Should_Use_Login_Page_Of_IdentityServer() + { + using var scope = ServiceProvider.CreateScope(); + CreatePage(scope.ServiceProvider).ShouldBeOfType(); + } +} + +// The user of a tenant logs in on the host side. +public class IdentityServerSupportedLogin_NotAllowedUser_SharedUser_Tests : IdentityServerSupportedLogin_NotAllowedUser_Tests +{ + protected override Guid? UserTenantId { get; } = Guid.NewGuid(); + + protected override void AfterAddApplication(IServiceCollection services) + { + base.AfterAddApplication(services); + services.Configure(options => + { + options.IsEnabled = true; + options.UserSharingStrategy = TenantUserSharingStrategy.Shared; + }); + } +} diff --git a/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/Login_ExternalLoginCallback_Tests.cs b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/Login_ExternalLoginCallback_Tests.cs new file mode 100644 index 0000000000..52e303fb9c --- /dev/null +++ b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/Login_ExternalLoginCallback_Tests.cs @@ -0,0 +1,78 @@ +using System; +using System.Security.Claims; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Identity; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.Identity; +using Volo.Abp.Uow; +using Xunit; +using IdentityUser = Volo.Abp.Identity.IdentityUser; + +namespace Volo.Abp.Account.Web.Pages.Account; + +// The external login is not linked to a user yet, the user is found by the email of the external login. +public class Login_ExternalLoginCallback_Tests : AbpAccountWebTestBase +{ + [Fact] + public async Task Should_Sign_In_User_That_Is_Found_By_Email() + { + var user = await CreateUserAsync(); + var providerKey = Guid.NewGuid().ToString("N"); + + await CallbackAsync(user, providerKey); + + IsSignedIn().ShouldBeTrue(); + (await FindByLoginAsync(providerKey))?.Id.ShouldBe(user.Id); + } + + [Theory] + [InlineData(RestrictedUserState.Inactive)] + [InlineData(RestrictedUserState.LockedOut)] + [InlineData(RestrictedUserState.RequiresConfirmation)] + [InlineData(RestrictedUserState.MustChangePassword)] + [InlineData(RestrictedUserState.PasswordExpired)] + public async Task Should_Not_Sign_In_Restricted_User_That_Is_Found_By_Email(RestrictedUserState state) + { + var user = await CreateUserAsync(states: state); + var providerKey = Guid.NewGuid().ToString("N"); + + await Should.ThrowAsync(() => CallbackAsync(user, providerKey)); + + IsSignedIn().ShouldBeFalse(); + (await FindByLoginAsync(providerKey)).ShouldBeNull(); + } + + private async Task CallbackAsync(IdentityUser user, string providerKey) + { + var principal = new ClaimsPrincipal(new ClaimsIdentity(new[] + { + new Claim(ClaimTypes.NameIdentifier, providerKey), + new Claim(ClaimTypes.Email, user.Email) + }, IdentityConstants.ExternalScheme)); + + using var scope = ServiceProvider.CreateScope(); + var page = CreatePage(scope.ServiceProvider, principal); + using (var uow = GetRequiredService().Begin()) + { + await page.OnGetExternalLoginCallbackAsync("/"); + await uow.CompleteAsync(); + } + } + + private async Task FindByLoginAsync(string providerKey) + { + using (var uow = GetRequiredService().Begin()) + { + return await GetRequiredService().FindByLoginAsync(ExternalLoginProvider, providerKey); + } + } +} + +public class Login_ExternalLoginCallback_ReplacedSignInManager_Tests : Login_ExternalLoginCallback_Tests +{ + protected override void AfterAddApplication(IServiceCollection services) + { + ReplaceSignInManager(services); + } +} diff --git a/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/Login_NotAllowedUser_Tests.cs b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/Login_NotAllowedUser_Tests.cs new file mode 100644 index 0000000000..260577bdee --- /dev/null +++ b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/Login_NotAllowedUser_Tests.cs @@ -0,0 +1,113 @@ +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.Identity; +using Volo.Abp.Modularity; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; +using Xunit; + +namespace Volo.Abp.Account.Web.Pages.Account; + +// The page has no step to change the password, so a user that has to change the password is not allowed to log in. +public abstract class Login_NotAllowedUser_TestBase : AbpAccountWebTestBase + where TStartupModule : IAbpModule +{ + protected virtual Guid? UserTenantId => null; + + protected override void AfterAddApplication(IServiceCollection services) + { + services.Configure(options => + { + options.ExternalLoginProviders.Add(TestExternalLoginProvider.Name); + }); + } + + [Fact] + public async Task Should_Check_Password_Of_User_That_Has_To_Change_Password() + { + var user = await CreateUserAsync(UserTenantId, RestrictedUserState.MustChangePassword); + + (await LoginAsync(user.UserName, "wrong-password")).ShouldBe(new[] { L("InvalidUserNameOrPassword") }); + (await LoginAsync(user.UserName, Password)).ShouldBe(new[] { L("LoginIsNotAllowed") }); + } + + [Fact] + public async Task Should_Show_Locked_Out_Message_For_Locked_Out_User_That_Has_To_Change_Password() + { + var user = await CreateUserAsync(UserTenantId, RestrictedUserState.MustChangePassword, RestrictedUserState.LockedOut); + + (await LoginAsync(user.UserName, "wrong-password")).ShouldBe(new[] { L("UserLockedOutMessage") }); + } + + // The user may be authenticated by an external login provider, the local password is not the reason of the rejection. + [Fact] + public async Task Should_Not_Check_Password_Of_Unconfirmed_User_That_Has_To_Change_Password() + { + var user = await CreateUserAsync(UserTenantId, RestrictedUserState.MustChangePassword, RestrictedUserState.RequiresConfirmation); + + (await LoginAsync(user.UserName, "wrong-password")).ShouldBe(new[] { L("LoginIsNotAllowed") }); + } + + // The password of the external login provider can not be changed by the application. + [Fact] + public async Task Should_Not_Allow_External_Login_User_That_Has_To_Change_Password() + { + var user = await CreateUserAsync(UserTenantId, RestrictedUserState.MustChangePassword); + + (await LoginAsync(user.UserName, TestExternalLoginProvider.Password)).ShouldBe(new[] { L("ExternalLoginPasswordChangeRequired") }); + } + + [Fact] + public async Task Should_Show_Locked_Out_Message_For_Locked_Out_External_Login_User_That_Has_To_Change_Password() + { + var user = await CreateUserAsync(UserTenantId, RestrictedUserState.MustChangePassword, RestrictedUserState.LockedOut); + + (await LoginAsync(user.UserName, TestExternalLoginProvider.Password)).ShouldBe(new[] { L("UserLockedOutMessage") }); + } + + [Fact] + public async Task Should_Not_Allow_Unconfirmed_External_Login_User_That_Has_To_Change_Password() + { + var user = await CreateUserAsync(UserTenantId, RestrictedUserState.MustChangePassword, RestrictedUserState.RequiresConfirmation); + + (await LoginAsync(user.UserName, TestExternalLoginProvider.Password)).ShouldBe(new[] { L("LoginIsNotAllowed") }); + } + + private async Task LoginAsync(string userName, string password) + { + using var scope = ServiceProvider.CreateScope(); + var page = CreatePage(scope.ServiceProvider); + page.LoginInput = new LoginModel.LoginInputModel { UserNameOrEmailAddress = userName, Password = password }; + + using (var uow = GetRequiredService().Begin()) + { + await page.OnPostAsync("Login"); + await uow.CompleteAsync(); + } + + IsSignedIn().ShouldBeFalse(); + return GetAlerts(scope.ServiceProvider); + } +} + +public class Login_NotAllowedUser_Tests : Login_NotAllowedUser_TestBase +{ +} + +// The user of a tenant logs in on the host side. +public class Login_NotAllowedUser_SharedUser_Tests : Login_NotAllowedUser_Tests +{ + protected override Guid? UserTenantId { get; } = Guid.NewGuid(); + + protected override void AfterAddApplication(IServiceCollection services) + { + base.AfterAddApplication(services); + services.Configure(options => + { + options.IsEnabled = true; + options.UserSharingStrategy = TenantUserSharingStrategy.Shared; + }); + } +} diff --git a/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/Register_Tests.cs b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/Register_Tests.cs new file mode 100644 index 0000000000..274a687502 --- /dev/null +++ b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/Pages/Account/Register_Tests.cs @@ -0,0 +1,64 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Volo.Abp.Identity; +using Volo.Abp.Identity.Settings; +using Volo.Abp.Uow; +using Xunit; + +namespace Volo.Abp.Account.Web.Pages.Account; + +public class Register_Tests : AbpAccountWebTestBase +{ + [Fact] + public async Task Should_Sign_In_Registered_User() + { + var (result, alerts) = await RegisterAsync(); + + result.ShouldNotBeOfType(); + alerts.ShouldBeEmpty(); + IsSignedIn().ShouldBeTrue(); + } + + [Fact] + public async Task Should_Show_Message_If_Registered_User_Is_Not_Allowed_To_Sign_In() + { + SetSetting(IdentitySettingNames.SignIn.RequireConfirmedEmail, "true"); + + var (result, alerts) = await RegisterAsync(); + + result.ShouldBeOfType(); + alerts.ShouldBe(new[] { L("RegisteredButLoginIsNotAllowed") }); + IsSignedIn().ShouldBeFalse(); + } + + private async Task<(IActionResult Result, string[] Alerts)> RegisterAsync() + { + var userName = "user-" + Guid.NewGuid().ToString("N"); + + using var scope = ServiceProvider.CreateScope(); + var page = CreatePage(scope.ServiceProvider); + page.Input = new RegisterModel.PostInput { UserName = userName, EmailAddress = userName + "@abp.io", Password = Password }; + page.ReturnUrl = "/"; + + using (var uow = GetRequiredService().Begin()) + { + var result = await page.OnPostAsync(); + await uow.CompleteAsync(); + + (await GetRequiredService().FindByNameAsync(userName)).ShouldNotBeNull(); + return (result, GetAlerts(scope.ServiceProvider)); + } + } +} + +public class Register_ReplacedSignInManager_Tests : Register_Tests +{ + protected override void AfterAddApplication(IServiceCollection services) + { + ReplaceSignInManager(services); + } +} diff --git a/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/TestExternalLoginProvider.cs b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/TestExternalLoginProvider.cs new file mode 100644 index 0000000000..ee9e093945 --- /dev/null +++ b/modules/account/test/Volo.Abp.Account.Web.Tests/Volo/Abp/Account/Web/TestExternalLoginProvider.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Identity; + +namespace Volo.Abp.Account.Web; + +// Authenticates the existing users with a password that is not their local password. +public class TestExternalLoginProvider : IExternalLoginProvider, ITransientDependency +{ + public const string Name = "Test"; + public const string Password = "External!9Aa"; + + public Task TryAuthenticateAsync(string userName, string plainPassword) + { + return Task.FromResult(plainPassword == Password); + } + + public Task CreateUserAsync(string userName, string providerName) + { + throw new NotSupportedException(); + } + + public Task UpdateUserAsync(IdentityUser user, string providerName) + { + return Task.CompletedTask; + } + + public Task IsEnabledAsync() + { + return Task.FromResult(true); + } +} diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo.Abp.AuditLogging.Domain.Shared.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo.Abp.AuditLogging.Domain.Shared.csproj index 3c3a7f8f06..1bf4d242d4 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo.Abp.AuditLogging.Domain.Shared.csproj +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo.Abp.AuditLogging.Domain.Shared.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 true diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ar.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ar.json index c67e0ed23f..72652d629e 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ar.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ar.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "تم إكمال تصدير سجل التدقيق", "DownloadLinkExplanation": "يمكنك تنزيل الملف باستخدام الرابط أدناه حتى {0} (UTC)", "DownloadNow": "تنزيل الآن", - "TryAgainMessage": "الرجاء المحاولة مرة أخرى. إذا استمرت المشكلة، يرجى الاتصال بالدعم." + "TryAgainMessage": "الرجاء المحاولة مرة أخرى. إذا استمرت المشكلة، يرجى الاتصال بالدعم.", + "Permission:SettingManagement": "إدارة الإعدادات", + "Action": "إجراء", + "NoActions": "لا توجد إجراءات", + "MinExecutionDuration": "الحد الأدنى للمدة", + "MaxExecutionDuration": "الحد الأقصى للمدة", + "NoDataAvailable": "لا توجد بيانات متاحة", + "AuditLogExportFailedSubject": "فشل تصدير سجل التدقيق", + "EntityChangeExportFailedSubject": "فشل تصدير تغييرات الكيان", + "FileNotFound": "الملف غير موجود: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/cs.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/cs.json index aa7deb165e..2802d043f1 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/cs.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/cs.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Export protokolu auditu dokončen", "DownloadLinkExplanation": "Soubor můžete stáhnout pomocí odkazu níže až do {0} (UTC)", "DownloadNow": "Stáhnout nyní", - "TryAgainMessage": "Zkuste to prosím znovu. Pokud problém přetrvává, kontaktujte podporu." + "TryAgainMessage": "Zkuste to prosím znovu. Pokud problém přetrvává, kontaktujte podporu.", + "Permission:SettingManagement": "Správa nastavení", + "Action": "Akce", + "NoActions": "Žádné akce", + "MinExecutionDuration": "Min. doba trvání", + "MaxExecutionDuration": "Max. doba trvání", + "NoDataAvailable": "Nejsou k dispozici žádná data", + "AuditLogExportFailedSubject": "Export protokolu auditu se nezdařil", + "EntityChangeExportFailedSubject": "Export změn entit se nezdařil", + "FileNotFound": "Soubor nebyl nalezen: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/de-DE.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/de-DE.json index 38a291b077..fb5d9626f5 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/de-DE.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/de-DE.json @@ -84,6 +84,15 @@ "TenantId": "Mandanten-ID", "DownloadLinkExplanation": "Sie können die Datei über den Link unten bis {0} (UTC) herunterladen", "DownloadNow": "Jetzt herunterladen", - "TryAgainMessage": "Bitte versuchen Sie es erneut. Wenn das Problem weiterhin besteht, wenden Sie sich bitte an den Support." + "TryAgainMessage": "Bitte versuchen Sie es erneut. Wenn das Problem weiterhin besteht, wenden Sie sich bitte an den Support.", + "Permission:SettingManagement": "Einstellungsverwaltung", + "Action": "Aktion", + "NoActions": "Keine Aktionen", + "MinExecutionDuration": "Min. Dauer", + "MaxExecutionDuration": "Max. Dauer", + "NoDataAvailable": "Keine Daten verfügbar", + "AuditLogExportFailedSubject": "Audit-Log-Export fehlgeschlagen", + "EntityChangeExportFailedSubject": "Entity-Änderungsexport fehlgeschlagen", + "FileNotFound": "Datei nicht gefunden: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/de.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/de.json index 0f236d0393..6ce83de32b 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/de.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/de.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Audit-Log-Export abgeschlossen", "DownloadLinkExplanation": "Sie können die Datei über den Link unten bis {0} (UTC) herunterladen", "DownloadNow": "Jetzt herunterladen", - "TryAgainMessage": "Bitte versuchen Sie es erneut. Wenn das Problem weiterhin besteht, wenden Sie sich bitte an den Support." + "TryAgainMessage": "Bitte versuchen Sie es erneut. Wenn das Problem weiterhin besteht, wenden Sie sich bitte an den Support.", + "Permission:SettingManagement": "Einstellungsverwaltung", + "Action": "Aktion", + "NoActions": "Keine Aktionen", + "MinExecutionDuration": "Min. Dauer", + "MaxExecutionDuration": "Max. Dauer", + "NoDataAvailable": "Keine Daten verfügbar", + "AuditLogExportFailedSubject": "Audit-Log-Export fehlgeschlagen", + "EntityChangeExportFailedSubject": "Entity-Änderungsexport fehlgeschlagen", + "FileNotFound": "Datei nicht gefunden: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/en.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/en.json index 9c9052e06a..8ce3333e35 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/en.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/en.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Audit log export completed", "DownloadLinkExplanation": "You can download the file using the link below until {0} (UTC)", "DownloadNow": "Download now", - "TryAgainMessage": "Please try again. If the problem persists, please contact support." + "TryAgainMessage": "Please try again. If the problem persists, please contact support.", + "Permission:SettingManagement": "Setting management", + "Action": "Action", + "NoActions": "No actions", + "MinExecutionDuration": "Min. duration", + "MaxExecutionDuration": "Max. duration", + "NoDataAvailable": "No data available", + "AuditLogExportFailedSubject": "Audit log export failed", + "EntityChangeExportFailedSubject": "Entity change export failed", + "FileNotFound": "File not found: {0}" } } diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/es.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/es.json index 5cd28646af..d60675e4ea 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/es.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/es.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Exportación de registro de auditoría completada", "DownloadLinkExplanation": "Puede descargar el archivo usando el enlace a continuación hasta {0} (UTC)", "DownloadNow": "Descargar ahora", - "TryAgainMessage": "Por favor, inténtelo de nuevo. Si el problema persiste, contacte con soporte." + "TryAgainMessage": "Por favor, inténtelo de nuevo. Si el problema persiste, contacte con soporte.", + "Permission:SettingManagement": "Administración de configuraciones", + "Action": "Acción", + "NoActions": "No hay acciones", + "MinExecutionDuration": "Duración mín.", + "MaxExecutionDuration": "Duración máx.", + "NoDataAvailable": "No hay datos disponibles", + "AuditLogExportFailedSubject": "Exportación de registro de auditoría fallida", + "EntityChangeExportFailedSubject": "Exportación de cambios de entidad fallida", + "FileNotFound": "Archivo no encontrado: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/fi.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/fi.json index 6f28446bd3..279e7a65c2 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/fi.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/fi.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Tarkastuslokin vienti valmis", "DownloadLinkExplanation": "Voit ladata tiedoston alla olevan linkin kautta {0} (UTC) asti", "DownloadNow": "Lataa nyt", - "TryAgainMessage": "Yritä uudelleen. Jos ongelma jatkuu, ota yhteyttä tukeen." + "TryAgainMessage": "Yritä uudelleen. Jos ongelma jatkuu, ota yhteyttä tukeen.", + "Permission:SettingManagement": "Asetusten hallinta", + "Action": "Toiminto", + "NoActions": "Ei toimintoja", + "MinExecutionDuration": "Min. kesto", + "MaxExecutionDuration": "Maks. kesto", + "NoDataAvailable": "Tietoja ei ole saatavilla", + "AuditLogExportFailedSubject": "Tarkastuslokin vienti epäonnistui", + "EntityChangeExportFailedSubject": "Entiteettimuutosten vienti epäonnistui", + "FileNotFound": "Tiedostoa ei löytynyt: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/fr.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/fr.json index 92e912036b..77618f21dc 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/fr.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/fr.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Exportation du journal d'audit terminée", "DownloadLinkExplanation": "Vous pouvez télécharger le fichier en utilisant le lien ci-dessous jusqu'au {0} (UTC)", "DownloadNow": "Télécharger maintenant", - "TryAgainMessage": "Veuillez réessayer. Si le problème persiste, veuillez contacter le support." + "TryAgainMessage": "Veuillez réessayer. Si le problème persiste, veuillez contacter le support.", + "Permission:SettingManagement": "Gestion des paramètres", + "Action": "Action", + "NoActions": "Aucune action", + "MinExecutionDuration": "Durée min.", + "MaxExecutionDuration": "Durée max.", + "NoDataAvailable": "Aucune donnée disponible", + "AuditLogExportFailedSubject": "Échec de l'exportation du journal d'audit", + "EntityChangeExportFailedSubject": "Échec de l'exportation des changements d'entité", + "FileNotFound": "Fichier introuvable : {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/he.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/he.json new file mode 100644 index 0000000000..bd44e9f7dd --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/he.json @@ -0,0 +1,127 @@ +{ + "culture": "he", + "texts": { + "Permission:AuditLogging": "רישום ביקורת", + "Permission:AuditLogs": "יומני ביקורת", + "Menu:AuditLogging": "יומני ביקורת", + "AuditLogs": "יומני ביקורת", + "HttpStatus": "סטטוס HTTP", + "HttpMethod": "מתודת HTTP", + "HttpMethodFilter": "סינון לפי מתודת HTTP", + "HttpRequest": "בקשת HTTP", + "User": "משתמש", + "UserNameFilter": "סינון לפי משתמש", + "HasException": "עם חריגה", + "IpAddress": "כתובת IP", + "Time": "זמן", + "Date": "תאריך", + "Duration": "משך", + "Detail": "פרטים", + "Overall": "כללי", + "Actions": "פעולות", + "ClientIpAddress": "כתובת ה-IP של הלקוח", + "ClientName": "שם הלקוח", + "BrowserInfo": "פרטי הדפדפן", + "Url": "כתובת URL", + "UserName": "שם משתמש", + "TenantImpersonator": "דייר שביצע כניסה בשם", + "UserImpersonator": "משתמש שביצע כניסה בשם", + "UrlFilter": "סינון לפי URL", + "Exceptions": "חריגות", + "Comments": "הערות", + "HttpStatusCode": "קוד סטטוס HTTP", + "HttpStatusCodeFilter": "סינון לפי קוד סטטוס HTTP", + "ServiceName": "שירות", + "MethodName": "מתודה", + "CorrelationId": "מזהה קורלציה", + "ApplicationName": "שם היישום", + "ExecutionDuration": "משך", + "ExtraProperties": "מאפיינים נוספים", + "MaxDuration": "משך מרבי", + "MinDuration": "משך מינימלי", + "MinMaxDuration": "משך (מינימום - מקסימום)", + "{0}Milliseconds": "{0} אלפיות שנייה", + "ExecutionTime": "זמן", + "Parameters": "פרמטרים", + "EntityTypeFullName": "השם המלא של סוג הישות", + "Entity": "ישות", + "ChangeType": "סוג השינוי", + "ChangeTime": "זמן", + "NewValue": "ערך חדש", + "OriginalValue": "ערך קודם", + "PropertyName": "שם המאפיין", + "PropertyTypeFullName": "השם המלא של סוג המאפיין", + "Yes": "כן", + "No": "לא", + "Changes": "שינויים", + "AverageExecutionDurationInLogsPerDay": "משך ביצוע ממוצע", + "AverageExecutionDurationInMilliseconds": "משך ביצוע ממוצע באלפיות שנייה", + "ErrorRateInLogs": "שיעור השגיאות ביומנים", + "Success": "הצלחה", + "Fault": "כשל", + "NoChanges": "אין שינויים", + "EntityChanges": "שינויי ישויות", + "EntityId": "מזהה ישות", + "EntityChangeStartTime": "תאריך השינוי המוקדם ביותר", + "EntityChangeEndTime": "תאריך השינוי המאוחר ביותר", + "EntityHistory": "היסטוריית ישות", + "DaysAgoTitle": "{0} {1}.", + "DaysAgoWithUserTitle": "{0} {1} על ידי {2}.", + "MinutesAgo": "לפני {0} דקות", + "HoursAgo": "לפני {0} שעות", + "DaysAgo": "לפני {0} ימים", + "Created": "נוצר", + "Updated": "עודכן", + "Deleted": "נמחק", + "ChangeHistory": "היסטוריית שינויים", + "FullChangeHistory": "היסטוריית שינויים מלאה", + "ChangeDetails": "פרטי השינוי", + "DurationMs": "משך (ms)", + "StartDate": "תאריך התחלה", + "EndDate": "תאריך סיום", + "Feature:AuditLoggingGroup": "רישום ביקורת", + "Feature:AuditLoggingEnable": "הפעלת דף יומני הביקורת", + "Feature:AuditLoggingEnableDescription": "הפעלת דף יומני הביקורת ביישום.", + "Feature:AuditLoggingSettingManagementEnable": "הפעלת ניהול הגדרות יומן הביקורת", + "Feature:AuditLoggingSettingManagementEnableDescription": "הפעלת ניהול ההגדרות של יומן הביקורת ביישום.", + "InvalidAuditLogDeletionSettings": "הגדרות המחיקה של יומן הביקורת אינן תקינות. כשהמחיקה מופעלת, התקופה חייבת להיות גדולה מ-0 ימים.", + "AuditLogSettingsGeneral": "כללי", + "AuditLogSettingsGlobal": "גלובלי", + "DisplayName:IsPeriodicDeleterEnabled": "הפעלת שירות הניקוי בכל המערכת", + "Description:IsPeriodicDeleterEnabled": "אם אפשרות זו כבויה, המחיקה התקופתית לא תפעל ויומני הביקורת לא יימחקו אוטומטית.", + "DisplayName:GlobalIsExpiredDeleterEnabled": "הפעלת שירות הניקוי לכל הדיירים ולמארח", + "Description:GlobalIsExpiredDeleterEnabled": "אם אפשרות זו מופעלת, פריטים שתוקפם פג יימחקו אוטומטית אצל כל הדיירים ואצל המארח, אלא אם יש להם הגדרה ספציפית.", + "DisplayName:IsExpiredDeleterEnabled": "הפעלת שירות הניקוי", + "Description:IsExpiredDeleterEnabled": "אם אפשרות זו מופעלת, פריטים שתוקפם פג יימחקו אוטומטית.", + "DisplayName:ExpiredDeleterPeriod": "תקופת המחיקה של פריטים שתוקפם פג", + "Description:ExpiredDeleterPeriod": "מספר הימים שאחריהם פריטים שתוקפם פג יימחקו אוטומטית.", + "ExpiredDeleterPeriodUnit": "ימים", + "AuditLogsBeforeXWillBeDeleted": "יומני ביקורת מלפני {0} יימחקו.", + "TenantId": "מזהה דייר", + "Permission:Export": "ייצוא יומני ביקורת", + "ExportToExcel": "ייצוא ל-Excel", + "Exporting": "מייצא", + "ExportCompleted": "הייצוא הושלם בהצלחה", + "ExportFailed": "הייצוא נכשל", + "ThereWereNoRecordsToExport": "אין רשומות לייצוא.", + "ExportJobQueued": "משימת הייצוא של {0} רשומות נוספה לתור. אימייל יישלח כשהייצוא יסתיים.", + "ExportReady": "הייצוא של {0} רשומות הושלם והקובץ מוכן להורדה.", + "FileName": "שם הקובץ", + "TotalRecords": "סך הרשומות", + "ExcelFileAttachedMessage": "קובץ ה-Excel מצורף לאימייל זה.", + "EntityChangeExportCompletedSubject": "ייצוא שינויי הישויות הושלם", + "AuditLogExportCompletedSubject": "ייצוא יומן הביקורת הושלם", + "DownloadLinkExplanation": "אפשר להוריד את הקובץ בקישור שלמטה עד {0} (UTC)", + "DownloadNow": "הורדה עכשיו", + "TryAgainMessage": "נסו שוב. אם הבעיה נמשכת, פנו לתמיכה.", + "Permission:SettingManagement": "ניהול הגדרות", + "Action": "פעולה", + "NoActions": "אין פעולות", + "MinExecutionDuration": "משך מינימלי", + "MaxExecutionDuration": "משך מרבי", + "NoDataAvailable": "אין נתונים זמינים", + "AuditLogExportFailedSubject": "ייצוא יומן הביקורת נכשל", + "EntityChangeExportFailedSubject": "ייצוא שינויי הישויות נכשל", + "FileNotFound": "הקובץ לא נמצא: {0}" + } +} diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hi.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hi.json index b2e2788e52..d0407e14e3 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hi.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hi.json @@ -85,6 +85,15 @@ "TenantId": "किरायेदार आईडी", "DownloadLinkExplanation": "आप {0} (UTC) तक नीचे दिए गए लिंक का उपयोग करके फ़ाइल डाउनलोड कर सकते हैं", "DownloadNow": "अभी डाउनलोड करें", - "TryAgainMessage": "कृपया पुनः प्रयास करें। यदि समस्या बनी रहती है, तो कृपया सहायता से संपर्क करें।" + "TryAgainMessage": "कृपया पुनः प्रयास करें। यदि समस्या बनी रहती है, तो कृपया सहायता से संपर्क करें।", + "Permission:SettingManagement": "सेटिंग प्रबंधन", + "Action": "कार्रवाई", + "NoActions": "कोई कार्रवाई नहीं", + "MinExecutionDuration": "न्यूनतम अवधि", + "MaxExecutionDuration": "अधिकतम अवधि", + "NoDataAvailable": "कोई डेटा उपलब्ध नहीं है", + "AuditLogExportFailedSubject": "ऑडिट लॉग निर्यात विफल रहा", + "EntityChangeExportFailedSubject": "एंटिटी परिवर्तन निर्यात विफल रहा", + "FileNotFound": "फ़ाइल नहीं मिली: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hr.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hr.json index 7d4a3f57b6..62751442c6 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hr.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hr.json @@ -85,6 +85,15 @@ "TenantId": "ID stanara", "DownloadLinkExplanation": "Datoteku možete preuzeti pomoću veze u nastavku do {0} (UTC)", "DownloadNow": "Preuzmi odmah", - "TryAgainMessage": "Molimo pokušajte ponovno. Ako se problem nastavi, obratite se podršci." + "TryAgainMessage": "Molimo pokušajte ponovno. Ako se problem nastavi, obratite se podršci.", + "Permission:SettingManagement": "Upravljanje postavkama", + "Action": "Radnja", + "NoActions": "Nema radnji", + "MinExecutionDuration": "Min. trajanje", + "MaxExecutionDuration": "Maks. trajanje", + "NoDataAvailable": "Nema dostupnih podataka", + "AuditLogExportFailedSubject": "Izvoz zapisnika revizije nije uspio", + "EntityChangeExportFailedSubject": "Izvoz promjena entiteta nije uspio", + "FileNotFound": "Datoteka nije pronađena: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hu.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hu.json index 706842c89e..ed935c9ef5 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hu.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/hu.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Audit napló exportálás befejezve", "DownloadLinkExplanation": "A fájlt letöltheti az alábbi linken keresztül {0} (UTC) időpontig", "DownloadNow": "Letöltés most", - "TryAgainMessage": "Kérjük, próbálja újra. Ha a probléma továbbra is fennáll, forduljon az ügyfélszolgálathoz." + "TryAgainMessage": "Kérjük, próbálja újra. Ha a probléma továbbra is fennáll, forduljon az ügyfélszolgálathoz.", + "Permission:SettingManagement": "Beállításkezelés", + "Action": "Művelet", + "NoActions": "Nincsenek műveletek", + "MinExecutionDuration": "Min. időtartam", + "MaxExecutionDuration": "Max. időtartam", + "NoDataAvailable": "Nincs elérhető adat", + "AuditLogExportFailedSubject": "Audit napló exportálás sikertelen", + "EntityChangeExportFailedSubject": "Entitás változás exportálás sikertelen", + "FileNotFound": "A fájl nem található: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/is.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/is.json index 2d2f8915f3..84970545de 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/is.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/is.json @@ -85,6 +85,15 @@ "TenantId": "Leigutakaauðkenni", "DownloadLinkExplanation": "Þú getur sótt skrána með tenglinum hér að neðan til {0} (UTC)", "DownloadNow": "Sækja núna", - "TryAgainMessage": "Vinsamlegast reyndu aftur. Ef vandamálið er viðvarandi, hafðu samband við þjónustuaðila." + "TryAgainMessage": "Vinsamlegast reyndu aftur. Ef vandamálið er viðvarandi, hafðu samband við þjónustuaðila.", + "Permission:SettingManagement": "Stillingastjórnun", + "Action": "Aðgerð", + "NoActions": "Engar aðgerðir", + "MinExecutionDuration": "Lágm. lengd", + "MaxExecutionDuration": "Hám. lengd", + "NoDataAvailable": "Engin gögn tiltæk", + "AuditLogExportFailedSubject": "Útflutningur endurskoðunarskrár mistókst", + "EntityChangeExportFailedSubject": "Útflutningur einingabreytinga mistókst", + "FileNotFound": "Skrá fannst ekki: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/it.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/it.json index b43511d03b..acea6e32e5 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/it.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/it.json @@ -112,6 +112,15 @@ "AuditLogExportCompletedSubject": "Esportazione log di audit completata", "DownloadLinkExplanation": "Puoi scaricare il file utilizzando il link qui sotto fino a {0} (UTC)", "DownloadNow": "Scarica ora", - "TryAgainMessage": "Per favore riprova. Se il problema persiste, contatta il supporto." + "TryAgainMessage": "Per favore riprova. Se il problema persiste, contatta il supporto.", + "Permission:SettingManagement": "Gestione delle impostazioni", + "Action": "Azione", + "NoActions": "Nessuna azione", + "MinExecutionDuration": "Durata min.", + "MaxExecutionDuration": "Durata max.", + "NoDataAvailable": "Nessun dato disponibile", + "AuditLogExportFailedSubject": "Esportazione log di audit fallita", + "EntityChangeExportFailedSubject": "Esportazione modifiche entità fallita", + "FileNotFound": "File non trovato: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/nl.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/nl.json index 34715b6c0e..15348b4e80 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/nl.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/nl.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Auditlog export voltooid", "DownloadLinkExplanation": "U kunt het bestand downloaden via de onderstaande link tot {0} (UTC)", "DownloadNow": "Download nu", - "TryAgainMessage": "Probeer het opnieuw. Als het probleem aanhoudt, neem dan contact op met de ondersteuning." + "TryAgainMessage": "Probeer het opnieuw. Als het probleem aanhoudt, neem dan contact op met de ondersteuning.", + "Permission:SettingManagement": "Instellingenbeheer", + "Action": "Actie", + "NoActions": "Geen acties", + "MinExecutionDuration": "Min. duur", + "MaxExecutionDuration": "Max. duur", + "NoDataAvailable": "Geen gegevens beschikbaar", + "AuditLogExportFailedSubject": "Auditlog export mislukt", + "EntityChangeExportFailedSubject": "Export van entiteitswijzigingen mislukt", + "FileNotFound": "Bestand niet gevonden: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pl-PL.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pl-PL.json index 9fb0f61251..5a3e1252f7 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pl-PL.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pl-PL.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Eksport dziennika audytu zakończony", "DownloadLinkExplanation": "Możesz pobrać plik, korzystając z poniższego łącza do {0} (UTC)", "DownloadNow": "Pobierz teraz", - "TryAgainMessage": "Proszę spróbuj ponownie. Jeśli problem nie ustąpi, skontaktuj się z pomocą techniczną." + "TryAgainMessage": "Proszę spróbuj ponownie. Jeśli problem nie ustąpi, skontaktuj się z pomocą techniczną.", + "Permission:SettingManagement": "Zarządzanie ustawieniami", + "Action": "Działanie", + "NoActions": "Brak działań", + "MinExecutionDuration": "Min. czas trwania", + "MaxExecutionDuration": "Maks. czas trwania", + "NoDataAvailable": "Brak dostępnych danych", + "AuditLogExportFailedSubject": "Eksport dziennika audytu nie powiódł się", + "EntityChangeExportFailedSubject": "Eksport zmian encji nie powiódł się", + "FileNotFound": "Nie znaleziono pliku: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pt-BR.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pt-BR.json index da63715a57..d8df5c6e9d 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pt-BR.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pt-BR.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Exportação de log de auditoria concluída", "DownloadLinkExplanation": "Você pode baixar o arquivo usando o link abaixo até {0} (UTC)", "DownloadNow": "Baixar agora", - "TryAgainMessage": "Por favor, tente novamente. Se o problema persistir, entre em contato com o suporte." + "TryAgainMessage": "Por favor, tente novamente. Se o problema persistir, entre em contato com o suporte.", + "Permission:SettingManagement": "Gerenciamento de configuração", + "Action": "Ação", + "NoActions": "Nenhuma ação", + "MinExecutionDuration": "Duração mín.", + "MaxExecutionDuration": "Duração máx.", + "NoDataAvailable": "Nenhum dado disponível", + "AuditLogExportFailedSubject": "Falha na exportação do log de auditoria", + "EntityChangeExportFailedSubject": "Falha na exportação de mudanças de entidade", + "FileNotFound": "Arquivo não encontrado: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pt.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pt.json index 74b88c873b..9f396ede4d 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pt.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/pt.json @@ -1,7 +1,7 @@ { "culture": "pt", "texts": { - "Permission:AuditLogging": "Registo de auditoria", + "Permission:AuditLogging": "Registos de auditoria", "Permission:AuditLogs": "Registos de auditoria", "Menu:AuditLogging": "Registos de auditoria", "AuditLogs": "Registos de auditoria", @@ -24,8 +24,8 @@ "BrowserInfo": "Informação do navegador", "Url": "URL", "UserName": "Nome de utilizador", - "TenantImpersonator": "Personificador de cliente", - "UserImpersonator": "Personificador de utilizador", + "TenantImpersonator": "Cliente representante", + "UserImpersonator": "Utilizador representante", "UrlFilter": "Filtro de URL", "Exceptions": "Exceções", "Comments": "Comentários", @@ -60,7 +60,7 @@ "Success": "Sucesso", "Fault": "Falha", "NoChanges": "Sem alteração(ões)", - "EntityChanges": "Alterações de entidade", + "EntityChanges": "Alterações de registos", "EntityId": "Id da entidade", "EntityChangeStartTime": "Data mínima de alteração", "EntityChangeEndTime": "Data máxima de alteração", @@ -79,7 +79,7 @@ "DurationMs": "Duração (ms)", "StartDate": "Data de início", "EndDate": "Data de fim", - "Feature:AuditLoggingGroup": "Registo de auditoria", + "Feature:AuditLoggingGroup": "Registos de auditoria", "Feature:AuditLoggingEnable": "Ativar página de registo de auditoria", "Feature:AuditLoggingEnableDescription": "Ativar a página de registo de auditoria na aplicação.", "Feature:AuditLoggingSettingManagementEnable": "Ativar a gestão de definições de registo de auditoria", @@ -89,8 +89,8 @@ "AuditLogSettingsGlobal": "Global", "DisplayName:IsPeriodicDeleterEnabled": "Ativar serviço de limpeza para todo o sistema", "Description:IsPeriodicDeleterEnabled": "Se esta opção estiver desativada, o eliminador periódico não funcionará. Os registos de auditoria não serão eliminados automaticamente.", - "DisplayName:GlobalIsExpiredDeleterEnabled": "Ativar serviço de limpeza para todos os clientes e o anfitrião", - "Description:GlobalIsExpiredDeleterEnabled": "Se esta opção estiver ativada, os itens expirados de todos os clientes e do anfitrião serão eliminados automaticamente, exceto se existir uma definição específica.", + "DisplayName:GlobalIsExpiredDeleterEnabled": "Ativar serviço de limpeza para todos os clientes e o host", + "Description:GlobalIsExpiredDeleterEnabled": "Se esta opção estiver ativada, os itens expirados de todos os clientes e do host serão eliminados automaticamente, exceto se existir uma definição específica.", "DisplayName:IsExpiredDeleterEnabled": "Ativar serviço de limpeza", "Description:IsExpiredDeleterEnabled": "Se esta opção estiver ativada, os itens expirados serão eliminados automaticamente.", "DisplayName:ExpiredDeleterPeriod": "Período de eliminação de itens expirados", @@ -104,15 +104,24 @@ "ExportCompleted": "Exportação concluída com sucesso", "ExportFailed": "Falha na exportação", "ThereWereNoRecordsToExport": "Não existiam registos para exportar.", - "ExportJobQueued": "A tarefa de exportação foi colocada em fila para {0} registos. Receberá um e-mail quando a exportação estiver concluída.", + "ExportJobQueued": "A tarefa de exportação foi colocada em fila para {0} registos. Receberá um email quando a exportação estiver concluída.", "ExportReady": "Exportação concluída para {0} registos e está pronta para transferência.", "FileName": "Nome do ficheiro", "TotalRecords": "Total de registos", - "ExcelFileAttachedMessage": "O ficheiro Excel está anexado a este e-mail.", - "EntityChangeExportCompletedSubject": "Exportação de alterações de entidade concluída", + "ExcelFileAttachedMessage": "O ficheiro Excel está anexado a este email.", + "EntityChangeExportCompletedSubject": "Exportação de alterações de registos concluída", "AuditLogExportCompletedSubject": "Exportação de registos de auditoria concluída", "DownloadLinkExplanation": "Pode transferir o ficheiro através do link abaixo até {0} (UTC)", "DownloadNow": "Transferir agora", - "TryAgainMessage": "Tente novamente. Se o problema persistir, contacte o suporte." + "TryAgainMessage": "Tente novamente. Se o problema persistir, contacte o suporte.", + "Permission:SettingManagement": "Gestão de definições", + "Action": "Ação", + "NoActions": "Sem ações", + "MinExecutionDuration": "Duração mín.", + "MaxExecutionDuration": "Duração máx.", + "NoDataAvailable": "Não existem dados disponíveis", + "AuditLogExportFailedSubject": "Falha na exportação de registos de auditoria", + "EntityChangeExportFailedSubject": "Falha na exportação de alterações de registos", + "FileNotFound": "Ficheiro não encontrado: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ro-RO.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ro-RO.json index 2cc471a1e4..28d6d8f644 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ro-RO.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ro-RO.json @@ -85,6 +85,15 @@ "TenantId": "ID chiriaș", "DownloadLinkExplanation": "Puteți descărca fișierul folosind link-ul de mai jos până la {0} (UTC)", "DownloadNow": "Descărcați acum", - "TryAgainMessage": "Vă rugăm să încercați din nou. Dacă problema persistă, vă rugăm să contactați asistența." + "TryAgainMessage": "Vă rugăm să încercați din nou. Dacă problema persistă, vă rugăm să contactați asistența.", + "Permission:SettingManagement": "Gestionarea setărilor", + "Action": "Acțiune", + "NoActions": "Nicio acțiune", + "MinExecutionDuration": "Durată min.", + "MaxExecutionDuration": "Durată max.", + "NoDataAvailable": "Nu există date disponibile", + "AuditLogExportFailedSubject": "Exportul jurnalului de audit a eșuat", + "EntityChangeExportFailedSubject": "Exportul modificărilor entității a eșuat", + "FileNotFound": "Fișierul nu a fost găsit: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ru.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ru.json index 9a2817f1fd..98d2f58539 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ru.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/ru.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Экспорт журнала аудита завершен", "DownloadLinkExplanation": "Вы можете скачать файл по ссылке ниже до {0} (UTC)", "DownloadNow": "Скачать сейчас", - "TryAgainMessage": "Пожалуйста, попробуйте еще раз. Если проблема не исчезнет, обратитесь в службу поддержки." + "TryAgainMessage": "Пожалуйста, попробуйте еще раз. Если проблема не исчезнет, обратитесь в службу поддержки.", + "Permission:SettingManagement": "Управление настройками", + "Action": "Действие", + "NoActions": "Нет действий", + "MinExecutionDuration": "Мин. продолжительность", + "MaxExecutionDuration": "Макс. продолжительность", + "NoDataAvailable": "Нет доступных данных", + "AuditLogExportFailedSubject": "Экспорт журнала аудита не удался", + "EntityChangeExportFailedSubject": "Экспорт изменений сущности не удался", + "FileNotFound": "Файл не найден: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sk.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sk.json index 54ec9409cd..98cc92a987 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sk.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sk.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Export protokolu auditu dokončený", "DownloadLinkExplanation": "Súbor si môžete stiahnuť pomocou odkazu nižšie do {0} (UTC)", "DownloadNow": "Stiahnuť teraz", - "TryAgainMessage": "Skúste to prosím znova. Ak problém pretrváva, kontaktujte podporu." + "TryAgainMessage": "Skúste to prosím znova. Ak problém pretrváva, kontaktujte podporu.", + "Permission:SettingManagement": "Správa nastavení", + "Action": "Akcia", + "NoActions": "Žiadne akcie", + "MinExecutionDuration": "Min. trvanie", + "MaxExecutionDuration": "Max. trvanie", + "NoDataAvailable": "Nie sú k dispozícii žiadne údaje", + "AuditLogExportFailedSubject": "Export protokolu auditu sa nepodaril", + "EntityChangeExportFailedSubject": "Export zmien entít sa nepodaril", + "FileNotFound": "Súbor sa nenašiel: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sl.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sl.json index 2ddca7cf3d..0a68f3991e 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sl.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sl.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Izvoz dnevnika revizije dokončan", "DownloadLinkExplanation": "Datoteko lahko prenesete s spodnjo povezavo do {0} (UTC)", "DownloadNow": "Prenesi zdaj", - "TryAgainMessage": "Prosimo, poskusite znova. Če težava vztraja, se obrnite na podporo." + "TryAgainMessage": "Prosimo, poskusite znova. Če težava vztraja, se obrnite na podporo.", + "Permission:SettingManagement": "Upravljanje nastavitev", + "Action": "Dejanje", + "NoActions": "Ni dejanj", + "MinExecutionDuration": "Najk. trajanje", + "MaxExecutionDuration": "Najd. trajanje", + "NoDataAvailable": "Ni razpoložljivih podatkov", + "AuditLogExportFailedSubject": "Izvoz dnevnika revizije ni uspel", + "EntityChangeExportFailedSubject": "Izvoz sprememb entitet ni uspel", + "FileNotFound": "Datoteke ni mogoče najti: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sv.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sv.json index f1f547aa6e..332576eb01 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sv.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/sv.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "Export av granskningslogg slutförd", "DownloadLinkExplanation": "Du kan ladda ner filen via länken nedan fram till {0} (UTC)", "DownloadNow": "Ladda ner nu", - "TryAgainMessage": "Försök igen. Om problemet kvarstår, kontakta support." + "TryAgainMessage": "Försök igen. Om problemet kvarstår, kontakta support.", + "Permission:SettingManagement": "Hantering av inställningar", + "Action": "Åtgärd", + "NoActions": "Inga åtgärder", + "MinExecutionDuration": "Min. varaktighet", + "MaxExecutionDuration": "Max. varaktighet", + "NoDataAvailable": "Inga data tillgängliga", + "AuditLogExportFailedSubject": "Export av granskningslogg misslyckades", + "EntityChangeExportFailedSubject": "Export av entitetsändringar misslyckades", + "FileNotFound": "Filen hittades inte: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/tr.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/tr.json index 3aa2abdf25..4146510c83 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/tr.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/tr.json @@ -98,6 +98,15 @@ "AuditLogExportCompletedSubject": "İşlem log dışa aktarma tamamlandı", "DownloadLinkExplanation": "Dosyayı aşağıdaki bağlantıyı kullanarak {0} (UTC) tarihine kadar indirebilirsiniz", "DownloadNow": "Şimdi İndir", - "TryAgainMessage": "Lütfen tekrar deneyin. Sorun devam ederse, lütfen destek ekibiyle iletişime geçin." + "TryAgainMessage": "Lütfen tekrar deneyin. Sorun devam ederse, lütfen destek ekibiyle iletişime geçin.", + "Permission:SettingManagement": "Ayar yönetimi", + "Action": "Aksiyon", + "NoActions": "Aksiyon yok", + "MinExecutionDuration": "Min. süre", + "MaxExecutionDuration": "Max. süre", + "NoDataAvailable": "Veri bulunamadı", + "AuditLogExportFailedSubject": "İşlem log dışa aktarma başarısız", + "EntityChangeExportFailedSubject": "Entity değişiklik dışa aktarma başarısız", + "FileNotFound": "Dosya bulunamadı: {0}" } } diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/vi.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/vi.json index ad4f040a96..877f89f5f1 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/vi.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/vi.json @@ -85,6 +85,15 @@ "TenantId": "ID người thuê", "DownloadLinkExplanation": "Bạn có thể tải xuống tệp bằng liên kết bên dưới cho đến {0} (UTC)", "DownloadNow": "Tải xuống ngay", - "TryAgainMessage": "Vui lòng thử lại. Nếu sự cố vẫn tiếp diễn, vui lòng liên hệ bộ phận hỗ trợ." + "TryAgainMessage": "Vui lòng thử lại. Nếu sự cố vẫn tiếp diễn, vui lòng liên hệ bộ phận hỗ trợ.", + "Permission:SettingManagement": "Quản lý cài đặt", + "Action": "Hành động", + "NoActions": "Không có hành động", + "MinExecutionDuration": "Thời lượng tối thiểu", + "MaxExecutionDuration": "Thời lượng tối đa", + "NoDataAvailable": "Không có dữ liệu", + "AuditLogExportFailedSubject": "Xuất nhật ký kiểm tra thất bại", + "EntityChangeExportFailedSubject": "Xuất thay đổi thực thể thất bại", + "FileNotFound": "Không tìm thấy tệp: {0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/zh-Hans.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/zh-Hans.json index b02fc0e26d..625593bd65 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/zh-Hans.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/zh-Hans.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "审计日志导出已完成", "DownloadLinkExplanation": "您可以使用下面的链接下载文件,直到{0}(UTC)", "DownloadNow": "立即下载", - "TryAgainMessage": "请再试一次。如果问题仍然存在,请联系支持人员。" + "TryAgainMessage": "请再试一次。如果问题仍然存在,请联系支持人员。", + "Permission:SettingManagement": "设置管理", + "Action": "操作", + "NoActions": "无操作", + "MinExecutionDuration": "最小持续时间", + "MaxExecutionDuration": "最大持续时间", + "NoDataAvailable": "无可用数据", + "AuditLogExportFailedSubject": "审计日志导出失败", + "EntityChangeExportFailedSubject": "实体变更导出失败", + "FileNotFound": "未找到文件:{0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/zh-Hant.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/zh-Hant.json index 46f2c9e495..59b635c7a2 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/zh-Hant.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/zh-Hant.json @@ -113,6 +113,15 @@ "AuditLogExportCompletedSubject": "稽核日誌匯出已完成", "DownloadLinkExplanation": "您可以使用下面的連結下載檔案,直到{0}(UTC)", "DownloadNow": "立即下載", - "TryAgainMessage": "請再試一次。如果問題仍然存在,請聯絡支援人員。" + "TryAgainMessage": "請再試一次。如果問題仍然存在,請聯絡支援人員。", + "Permission:SettingManagement": "設定管理", + "Action": "操作", + "NoActions": "無操作", + "MinExecutionDuration": "最小持續時間", + "MaxExecutionDuration": "最大持續時間", + "NoDataAvailable": "無可用資料", + "AuditLogExportFailedSubject": "稽核日誌匯出失敗", + "EntityChangeExportFailedSubject": "實體變更匯出失敗", + "FileNotFound": "找不到檔案:{0}" } } \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj index 336a274d89..88d6ad59a7 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj index eeafcf35d8..1d6735fb0e 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo.Abp.AuditLogging.Installer.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo.Abp.AuditLogging.Installer.csproj index 1dca5f910e..0152962677 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo.Abp.AuditLogging.Installer.csproj +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo.Abp.AuditLogging.Installer.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 true diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo.Abp.AuditLogging.MongoDB.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo.Abp.AuditLogging.MongoDB.csproj index d397a54821..d926edf2e2 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo.Abp.AuditLogging.MongoDB.csproj +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo.Abp.AuditLogging.MongoDB.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj index eabd7f2b38..fd5b2c8bf7 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj index ad50af2f64..077485b7c0 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj index 137cc6bf67..c02d07d489 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj index 18e114f790..25b211d503 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj index c59e3afac9..35ff90d3b4 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Quartz/Volo.Abp.BackgroundJobs.DemoApp.Quartz.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Quartz/Volo.Abp.BackgroundJobs.DemoApp.Quartz.csproj index 5f2be2b49b..26f6579c74 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Quartz/Volo.Abp.BackgroundJobs.DemoApp.Quartz.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Quartz/Volo.Abp.BackgroundJobs.DemoApp.Quartz.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj index cc77f67dd0..f506d0a9c7 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj index edc565f591..534897cbc9 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj @@ -3,7 +3,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.TickerQ/Volo.Abp.BackgroundJobs.DemoApp.TickerQ.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.TickerQ/Volo.Abp.BackgroundJobs.DemoApp.TickerQ.csproj index f30eba83dd..2026322545 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.TickerQ/Volo.Abp.BackgroundJobs.DemoApp.TickerQ.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.TickerQ/Volo.Abp.BackgroundJobs.DemoApp.TickerQ.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj index f6a170daff..d4b85644b3 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 @@ -10,6 +10,10 @@ all runtime; build; native; contentfiles; analyzers + + all + runtime; build; native; contentfiles; analyzers + diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo.Abp.BackgroundJobs.Domain.Shared.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo.Abp.BackgroundJobs.Domain.Shared.csproj index 2a491b41b7..6550e04113 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo.Abp.BackgroundJobs.Domain.Shared.csproj +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo.Abp.BackgroundJobs.Domain.Shared.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj index b18fcaf03b..46c0db7da3 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj index e6122c30d9..9fba845950 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo.Abp.BackgroundJobs.Installer.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo.Abp.BackgroundJobs.Installer.csproj index bd1f45cd66..cb11130f15 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo.Abp.BackgroundJobs.Installer.csproj +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo.Abp.BackgroundJobs.Installer.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 true diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo.Abp.BackgroundJobs.MongoDB.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo.Abp.BackgroundJobs.MongoDB.csproj index a40ebefa88..e7407cfa80 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo.Abp.BackgroundJobs.MongoDB.csproj +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo.Abp.BackgroundJobs.MongoDB.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj index d1075eef8f..afc7b037f3 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj index 671de5851c..2fba8e91a9 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj index e962bbbf14..ebf334f172 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj index 11f87aea2a..cc179c372f 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LanguageSwitch.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LanguageSwitch.razor index afa3521d01..7cb95a7d02 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LanguageSwitch.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LanguageSwitch.razor @@ -7,22 +7,25 @@ @inject IAbpRequestLocalizationOptionsProvider RequestLocalizationOptionsProvider @if (_otherLanguages != null && _otherLanguages.Any()) { - - + + @_currentLanguage.DisplayName - - + + @foreach (var language in _otherLanguages) { - @language.DisplayName + @language.DisplayName } - - + + } @code { private IReadOnlyList _otherLanguages; private LanguageInfo _currentLanguage; + // Blazorise's dropdown-menu-end sets right: 0, which wins over the computed left offset in an RTL layout + private static string MenuStyle => CultureHelper.IsRtl ? "right: auto" : null; + protected override async Task OnInitializedAsync() { var languages = await LanguageProvider.GetLanguagesAsync(); diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor index f3b2c41779..0944722a5b 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor @@ -1,4 +1,5 @@ @namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme.Themes.Basic +@using Volo.Abp.AspNetCore.Components.Web @using Volo.Abp.Users @using Volo.Abp.MultiTenancy @using Volo.Abp.UI.Navigation @@ -22,7 +23,7 @@ @CurrentUser.UserName } - + @if (Menu != null) { @foreach (var menuItem in Menu.Items) @@ -34,7 +35,7 @@ } else { - @menuItem.DisplayName + @menuItem.DisplayName } } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor.cs index 0ce5132a25..3e2f4a8c4f 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Routing; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.RequestLocalization; +using Volo.Abp.Localization; using Volo.Abp.UI.Navigation; namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme.Themes.Basic; @@ -18,6 +19,9 @@ public partial class LoginDisplay : IDisposable protected ApplicationMenu Menu { get; set; } + // Blazorise's dropdown-menu-end sets right: 0, which wins over the computed left offset in an RTL layout + protected static string MenuStyle => CultureHelper.IsRtl ? "right: auto" : null; + protected override async Task OnInitializedAsync() { Menu = await MenuManager.GetAsync(StandardMenus.User); diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Volo.Abp.AspNetCore.Components.Server.BasicTheme.csproj b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Volo.Abp.AspNetCore.Components.Server.BasicTheme.csproj index 34a0bb1ea3..07c55b5ed3 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Volo.Abp.AspNetCore.Components.Server.BasicTheme.csproj +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Volo.Abp.AspNetCore.Components.Server.BasicTheme.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor index ee05fab1c8..3f24cb195b 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor @@ -1,4 +1,5 @@ @namespace Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme.Themes.Basic +@using Volo.Abp.AspNetCore.Components.Web @using Volo.Abp.Users @using Volo.Abp.MultiTenancy @using Microsoft.Extensions.Localization @@ -39,7 +40,7 @@ } else { - @menuItem.DisplayName + @menuItem.DisplayName } } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme.csproj b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme.csproj index 82741a876a..cc9f8752bb 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme.csproj +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor index 32de8507cb..9bb8f0f0c6 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor @@ -17,7 +17,7 @@ else @if (MenuItem.Url != null) { - var url = MenuItem.Url == null ? "#" : MenuItem.Url.TrimStart('/', '~'); + var url = MenuItemUrlHelper.ToBaseRelativeUrl(MenuItem.Url) ?? "#"; @if (MenuItem.Icon != null && MenuItem.Icon.StartsWith("fa")) { @@ -50,7 +50,7 @@ else } else { - var itemUrl = item.Url == null ? "#" : item.Url.TrimStart('/', '~'); + var itemUrl = MenuItemUrlHelper.ToBaseRelativeUrl(item.Url) ?? "#"; @if (item.Icon != null) { diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor index 2e6f783556..0f70bbabba 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor @@ -31,7 +31,7 @@ else } else { - var itemUrl = item.Url == null ? "#" : item.Url.TrimStart('/', '~'); + var itemUrl = MenuItemUrlHelper.ToBaseRelativeUrl(item.Url) ?? "#"; @if (item.Icon != null) { diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Volo.Abp.AspNetCore.Components.Web.BasicTheme.csproj b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Volo.Abp.AspNetCore.Components.Web.BasicTheme.csproj index f2c2c5f074..8343480cae 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Volo.Abp.AspNetCore.Components.Web.BasicTheme.csproj +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Volo.Abp.AspNetCore.Components.Web.BasicTheme.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Themes/Basic/NavMenu.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Themes/Basic/NavMenu.razor index 1ffc0db3a3..f2ceb1eef8 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Themes/Basic/NavMenu.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Themes/Basic/NavMenu.razor @@ -5,7 +5,7 @@ { if (menuItem.Items.IsNullOrEmpty()) { - + @menuItem.DisplayName diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Themes/Basic/NavMenuItem.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Themes/Basic/NavMenuItem.razor index 20d854dcd4..6df5378165 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Themes/Basic/NavMenuItem.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Themes/Basic/NavMenuItem.razor @@ -28,7 +28,7 @@ else } else { - + @item.DisplayName diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme.csproj b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme.csproj index 03c8c3477a..2985d40b08 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme.csproj +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Bundling.csproj b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Bundling.csproj index 5a3eec11c3..1a541568c3 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Bundling.csproj +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Bundling.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Bundling diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LanguageSwitch.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LanguageSwitch.razor index 86a74a5929..1cb6193f93 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LanguageSwitch.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LanguageSwitch.razor @@ -12,23 +12,26 @@ @inject IRouteBasedCultureNavigationHelper CultureNavigationHelper @if (_otherLanguages != null && _otherLanguages.Any()) { - - + + @_currentLanguage.DisplayName - - + + @foreach (var language in _otherLanguages) { - @language.DisplayName + @language.DisplayName } - - + + } @code { private IReadOnlyList _otherLanguages; private LanguageInfo _currentLanguage; private bool _useRouteBasedCulture; + // Blazorise's dropdown-menu-end sets right: 0, which wins over the computed left offset in an RTL layout + private static string MenuStyle => CultureHelper.IsRtl ? "right: auto" : null; + protected override async Task OnInitializedAsync() { var config = await ConfigurationClient.GetAsync(); diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor index 3fcd75ab8e..d98ff315e6 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor @@ -22,7 +22,7 @@ @CurrentUser.UserName } - + @if (Menu != null) { @foreach (var menuItem in Menu.Items) diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor.cs index 7fe86a6ecc..cb4d24735f 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor.cs @@ -4,8 +4,10 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Routing; using Microsoft.AspNetCore.Components.WebAssembly.Authentication; using Microsoft.JSInterop; +using Volo.Abp.AspNetCore.Components.Web; using Volo.Abp.AspNetCore.Components.Web.Security; using Volo.Abp.AspNetCore.Components.WebAssembly; +using Volo.Abp.Localization; using Volo.Abp.UI.Navigation; namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Themes.Basic; @@ -23,6 +25,9 @@ public partial class LoginDisplay : IDisposable protected ApplicationMenu Menu { get; set; } + // Blazorise's dropdown-menu-end sets right: 0, which wins over the computed left offset in an RTL layout + protected static string MenuStyle => CultureHelper.IsRtl ? "right: auto" : null; + protected string LoginUrl { get; set; } = string.Empty; protected string LogoutUrl { get; set; } = string.Empty; @@ -60,7 +65,7 @@ public partial class LoginDisplay : IDisposable private async Task NavigateToAsync(string uri, string target = null) { - uri = uri?.TrimStart('~', '/') ?? uri; + uri = MenuItemUrlHelper.ToBaseRelativeUrl(uri); if (target == "_blank") { diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj index d384af12cf..31d682c4a8 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling.csproj b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling.csproj index c71770c813..788a9ab304 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling.csproj +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor.cs index 32c60bd407..ec997023e3 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Routing; using Microsoft.AspNetCore.Components.WebAssembly.Authentication; using Microsoft.JSInterop; +using Volo.Abp.AspNetCore.Components.Web; using Volo.Abp.AspNetCore.Components.Web.Security; using Volo.Abp.UI.Navigation; @@ -47,9 +48,11 @@ public partial class LoginDisplay : IDisposable private async Task NavigateToAsync(string uri, string target = null) { + uri = MenuItemUrlHelper.ToBaseRelativeUrl(uri); + if (target == "_blank") { - await JsRuntime.InvokeVoidAsync("open", uri, target); + await JsRuntime.InvokeVoidAsync("open", Navigation.ToAbsoluteUri(uri).ToString(), target); } else { diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.csproj b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.csproj index ef36174d1b..331c93767d 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.csproj +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj index fb98549f64..6c748f21f7 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 true Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic diff --git a/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo.Abp.BasicTheme.Installer.csproj b/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo.Abp.BasicTheme.Installer.csproj index 028f7e1a37..b61e4b7fdf 100644 --- a/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo.Abp.BasicTheme.Installer.csproj +++ b/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo.Abp.BasicTheme.Installer.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 true diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj index 77e6c3d61b..163d76dd47 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile index 8cc9715280..bf079b5bf2 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:11.0 AS base WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile.azure b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile.azure index d09db13290..989c0999c8 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile.azure +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile.azure @@ -1,6 +1,6 @@ FROM node:16 AS nodebase -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build COPY --from=nodebase /usr/local/bin /usr/local/bin COPY --from=nodebase /usr/local/lib /usr/local/lib @@ -14,7 +14,7 @@ WORKDIR /app/abp/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.D RUN abp install-libs RUN dotnet publish -c Release -o bin/Release/publish -FROM mcr.microsoft.com/dotnet/aspnet:10.0 +FROM mcr.microsoft.com/dotnet/aspnet:11.0 WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj index bb6c9c0fd6..09cdeb75b6 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 true diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json index 5eb4437162..90ffec345d 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json @@ -3,8 +3,8 @@ "name": "asp.net", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.shared": "~10.7.0", - "@abp/prismjs": "~10.7.0", - "@abp/highlight.js": "~10.7.0" + "@abp/aspnetcore.mvc.ui.theme.shared": "~11.0.0-rc.1", + "@abp/prismjs": "~11.0.0-rc.1", + "@abp/highlight.js": "~11.0.0-rc.1" } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock index b21f860bcc..8444d28e81 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock @@ -2,205 +2,198 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.shared@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.7.0-rc.4.tgz#353aaa338ab0841d042c4df2ce7af9913f5d8eed" - integrity sha512-CeVeaxH1D8FFtySSXvhrKBm2t9VVDdy+bbk51WFi54rQlicxFdQixYQogYTvs9e4/XaOvDpOC2T4SIVPbiC94Q== - dependencies: - "@abp/aspnetcore.mvc.ui" "~10.7.0-rc.4" - "@abp/bootstrap" "~10.7.0-rc.4" - "@abp/bootstrap-datepicker" "~10.7.0-rc.4" - "@abp/bootstrap-daterangepicker" "~10.7.0-rc.4" - "@abp/datatables.net-bs5" "~10.7.0-rc.4" - "@abp/font-awesome" "~10.7.0-rc.4" - "@abp/jquery-validation-unobtrusive" "~10.7.0-rc.4" - "@abp/lodash" "~10.7.0-rc.4" - "@abp/luxon" "~10.7.0-rc.4" - "@abp/malihu-custom-scrollbar-plugin" "~10.7.0-rc.4" - "@abp/moment" "~10.7.0-rc.4" - "@abp/select2" "~10.7.0-rc.4" - "@abp/sweetalert2" "~10.7.0-rc.4" - "@abp/timeago" "~10.7.0-rc.4" - -"@abp/aspnetcore.mvc.ui@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.7.0-rc.4.tgz#fb34369f924ce07866c731dec474d05bc7c1cc8e" - integrity sha512-JSz40zPIxcbkoYKZKvbTs32UfR7nbMoUe20g66tVHbN1Tn2fd2VMFD8elm4L03Tc+iZoLPXi5AsF9QD7zM7YJA== +"@abp/aspnetcore.mvc.ui.theme.shared@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-11.0.0-rc.1.tgz#77ac0fa4f15e2055981a8e78a986caf4d5b24717" + integrity sha512-fb44VGo5FnBGbgYl5n5HoXJmpv3YW3rIKTH8CJ0FemVc+DkxAcHxdUx5jb2YhWG2IXaCdKKzwxzr+0ksIbKAWA== + dependencies: + "@abp/aspnetcore.mvc.ui" "~11.0.0-rc.1" + "@abp/bootstrap" "~11.0.0-rc.1" + "@abp/bootstrap-datepicker" "~11.0.0-rc.1" + "@abp/bootstrap-daterangepicker" "~11.0.0-rc.1" + "@abp/datatables.net-bs5" "~11.0.0-rc.1" + "@abp/font-awesome" "~11.0.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~11.0.0-rc.1" + "@abp/lodash" "~11.0.0-rc.1" + "@abp/luxon" "~11.0.0-rc.1" + "@abp/moment" "~11.0.0-rc.1" + "@abp/select2" "~11.0.0-rc.1" + "@abp/sweetalert2" "~11.0.0-rc.1" + "@abp/timeago" "~11.0.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-11.0.0-rc.1.tgz#45d83b3a3f16dbac155c0e9258a14cb26365acf4" + integrity sha512-VfVt8r13yOg/fp+DjUNsTmv56UWcDIySA9qdVfMgiIbiomwguKx0aaokqNf6yCRB7wA21TQHgLbrS71IpV9uWA== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.7.0-rc.4.tgz#9f2f9ba0590e01739d6ee68824e69eae275c7962" - integrity sha512-T5sIxswsQIwm20xfuymji5xud5GphO+c1hKQ6tYpPAtUhg1g8ABDY1pGBdWbxCJh3uOuhlF8grp9pT+xUy9i1w== +"@abp/bootstrap-datepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-11.0.0-rc.1.tgz#6fa5a9345db1a94d2466907c2a85341287ef77ba" + integrity sha512-E4GaKtllZ5L4uz0uPSaaHLIucpC6dw4kAqM+n+rLk4txoqUdAPs+vzjHnICgp/YnSWWhAmuOhYnWfny6TD3HXw== dependencies: - bootstrap-datepicker "^1.10.1" + bootstrap-datepicker "1.10.1" + jquery "~4.0.0" -"@abp/bootstrap-daterangepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.7.0-rc.4.tgz#0cc427a9320211bc2ae4383dc228747f03d8b132" - integrity sha512-p2qiX8FuplFS/8mUbnSVc2ZgoSpU6DkLL/4yuXIwA3rLhR9dcqyRxqpFzj8H5nQ1AKaEzddylFNzzhV0sCB8lw== +"@abp/bootstrap-daterangepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-11.0.0-rc.1.tgz#3c06aa2c6a4860a7a23874491d33a12393d907aa" + integrity sha512-uDj2Pc7ksZbLCfoJKixt3zbvA7jASvLd4ndqjkhgTsMrRXh4atgaFcvjCs0NKkCqGjyI5xJoGDTTc38HToWnLQ== dependencies: - "@abp/moment" "~10.7.0-rc.4" - bootstrap-daterangepicker "^3.1.0" + "@abp/moment" "~11.0.0-rc.1" + jquery "~4.0.0" + moment "^2.30.1" -"@abp/bootstrap@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.7.0-rc.4.tgz#1916f312c6b46b0d17591b514e12d1fd93bcaf2c" - integrity sha512-CqmKWa2McXnJj0U9NOraxTdJyadfm1lQnc0WisiSg6HllvMmE3KUf7GgpiM4nxQlQt9Z0/8hWPhq5cLiLLc8dA== +"@abp/bootstrap@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-11.0.0-rc.1.tgz#ac127a386437aa6a62b2e7188837a40f4f0dd036" + integrity sha512-lYhyk6qlt6QsJgb+HBccryB9g9Tw+/qLJ5bYmgsJyoBYGUt74jtdNVi6JDy+7O7+k4aRvvA3XDNOfnS1DbfNvg== dependencies: - "@abp/core" "~10.7.0-rc.4" - "@abp/popper.js" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" + "@abp/popper.js" "~11.0.0-rc.1" bootstrap "^5.3.8" -"@abp/clipboard@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-10.7.0-rc.4.tgz#5b8b8264775de9ba3f1e86f12ab2eb98fe932e33" - integrity sha512-wqX9L6Y9YCtzXBYxVyM+k+SGFhCKMtV4r1JMAwj8cmuAvEKcuBhJ1hQojVWXLzjoYQPbNu9vW7ypmE/+trcwtQ== +"@abp/clipboard@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-11.0.0-rc.1.tgz#45565ea7ad5fe54d9a17f158a2c666150fcb5de5" + integrity sha512-C/FHYR19n1cpcKmDPiSBUG5umxbddTX6p6m0QMVopQV235li54L8nNUlZzKjYdjc1ESgFKoJhtmegdspPjvysA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" clipboard "^2.0.11" -"@abp/core@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.7.0-rc.4.tgz#e1d8a7c378a807cde22cdf0f8b7ba21ec4e2d7cd" - integrity sha512-uZuJywMXK4W3YoQKZVbHLG4OekXhElnpJHOI78a1o2ESDz7bMP2Nfs8n8KSSXGz8b5yRCIlyf9/G7majYnjAcw== +"@abp/core@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-11.0.0-rc.1.tgz#5db5e442b9cd5dc0f654ffe858865b6dbcb7f61e" + integrity sha512-iw7qPkNpeMrjd0kVVVrVHuFzVlgbuvscZsEvLMT8YEhvUD0ABmGfTxChuuIcgV1R4hpXegvfsUDiVIKcY1YcVg== dependencies: - "@abp/utils" "~10.7.0-rc.4" + "@abp/utils" "~11.0.0-rc.1" -"@abp/datatables.net-bs5@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.7.0-rc.4.tgz#d87c26ab7604971d969ccda27c78795475af793a" - integrity sha512-SPlNc9zzzmDCENf6dQtpKAxXEIpHRaidZEDsx7MUcdcnGEI8xs0Wg3vXzNMhz65OhSoW2FYQKapdAa0uzB02Dg== +"@abp/datatables.net-bs5@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-11.0.0-rc.1.tgz#1d7e9471c68c0eb64e9476967670d69fa897b7f3" + integrity sha512-VsQBlEx+ga8/X10i29XMs9Mjj2W83hSPsYftgByq09NiwtUVfX6t7yiGf4wF9+rk7fiRt3XQ4sXi6G1Ji9nqyQ== dependencies: - "@abp/datatables.net" "~10.7.0-rc.4" + "@abp/datatables.net" "~11.0.0-rc.1" datatables.net-bs5 "^2.3.4" -"@abp/datatables.net@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.7.0-rc.4.tgz#d64f7fe7e3adea76b238fd3ff59cd63a4445b2fe" - integrity sha512-4JtMRiQAvLY+IOqofHE6tNRwjG4ONyiFikgoKmNPfnue7wXIIA6BUgdUAeABan4S0kSwHOttM7MHyZkQLjzTHw== +"@abp/datatables.net@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-11.0.0-rc.1.tgz#2402b8192d41e4cd435b4e212604c32013b7d142" + integrity sha512-fNpr2eo9ZUghWiESK5QouB8rZoNGFFE+c+6BwcqchTnc9wcGj0wz+UEYtWZFitpHniWV2RRcVSoMM8waKzSl7w== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" datatables.net "^2.3.4" -"@abp/font-awesome@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.7.0-rc.4.tgz#9ce20b82685facea8564965ab3ad07764b29eccc" - integrity sha512-oalR5fBPImD4q0yYPbscJ858sDo8kJhFgixpViPc3bbaN41M5JPBpVR+K3UXQYfO93a0mhLoVb20bRMggWyhQQ== +"@abp/font-awesome@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-11.0.0-rc.1.tgz#0accc6fb2168515688f5a36f8dd3d4d4236f533d" + integrity sha512-/u4oXQGjet8VE/L1SZDsNCK4q6D9m9B50Em+Mkp8F7W/F6uLnyXGcWNyuHR3DMqvjEOXUc1WHE/zJQx8gsAFDw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@fortawesome/fontawesome-free" "^7.0.1" -"@abp/highlight.js@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-10.7.0-rc.4.tgz#48d88816b70322f801c607bbb853a6d7c73f2f57" - integrity sha512-OZMYoVu3u2R/rNxS+286h1iMT0JaLgbez9hfvKDwS9ddXFALcXPSM1UsymT2tmqljZflt/Cffk02xCwN1Xov6Q== +"@abp/highlight.js@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-11.0.0-rc.1.tgz#49befae8da1c93df88fab649340cd4720dbc12af" + integrity sha512-om2f5p9YhXtDJuDv6bPBS1KojN5it619Wn4VtFZPgJUw9gQzsBH5eZtL/wW1BY727Lnt3MkhABPW0y2hs24Ieg== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@highlightjs/cdn-assets" "~11.11.1" -"@abp/jquery-validation-unobtrusive@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.7.0-rc.4.tgz#a8c7daa832d72780e9b601ba0c667fe58433a817" - integrity sha512-VCnTyd3nvafI3A4XHM8jWhBCJ+0B3N6H4LeVW5AK0wyvk38q78tWAqI0ZaYgz3ObTKMuCTa+gCbmq9B/zrkT3Q== +"@abp/jquery-validation-unobtrusive@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-11.0.0-rc.1.tgz#8bd71ad4f2882b02a12a8c36443361d23f62e386" + integrity sha512-FF2pBceeNP9cUA1mj5T/fYpG5nq1DvrSyL7iOwrtqixDV8R9jgpZFCA146K0UMiqkzdtH9WiFRwL6690QAmkEg== dependencies: - "@abp/jquery-validation" "~10.7.0-rc.4" - jquery-validation-unobtrusive "^4.0.0" + "@abp/jquery-validation" "~11.0.0-rc.1" + jquery-validation "^1.22.1" -"@abp/jquery-validation@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.7.0-rc.4.tgz#5309e6f4b9b61124855df83268b8b1b99bd91eb6" - integrity sha512-TtIQWMWzI8ucPWwI2Jx9wyXH0Tl3m2h4r98T+wFlQ3UlDUn3x1SfLxhDPH7IX1RYMaa/3go1HlL/JRgK5yeIxw== +"@abp/jquery-validation@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-11.0.0-rc.1.tgz#fcc4fd82904750de70bbfc3f28b165768de7f992" + integrity sha512-JOxpgQoRi6dx12si3ArXdc8ElS2yaHlKxpYz4lgBlUschJoljsx0z2hhZzopJMhSaXFABHWGQmH9ssjmZaerlQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" jquery-validation "^1.22.1" -"@abp/jquery@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.7.0-rc.4.tgz#4aa75a520186a74303a2de511c19115310c7e2a4" - integrity sha512-YcXWXpsCGMUxMWg1QakOWmTjFJLpN+/QxfVuCjNJiHZJrHN0Ea5CPDWnLMqM46RhgoUAxg22EWYRi83j7mlYdg== +"@abp/jquery@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-11.0.0-rc.1.tgz#7d6df2229760e5b2cfdc9aa7746b37a95a3e2001" + integrity sha512-87tkbkRp4xQ3ih9Ri1nxTxqmd424nAFT1WFpWld1Aq1GYUg64mgPMc3CrTxUa8yYfMZdSJbWBsT7gh0C+7XVjg== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" jquery "~4.0.0" jquery-migrate "~4.0.2" -"@abp/lodash@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.7.0-rc.4.tgz#77069cfb8a2d3496c03475a18ef6ef442b29de9e" - integrity sha512-g+C3bjjjpas4VZPAt2o1b+DLr31pCn7U61rpYGjT6BoI6rPmu8WX8yFImyRB8S2QJ7FQT/Dr3p6GxPNn2mAE4A== +"@abp/lodash@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-11.0.0-rc.1.tgz#5b77df8d96905024442040cd352db4bfb863c2f4" + integrity sha512-uEvbpUPogY0VLzyFDIeo2JdsUxs1imX4aDbm8Jj2BKrFf1kfQ3dQUFtzwfDE4y+9dYvxtHXZkYsV2VA/9qaRTA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" lodash "^4.18.1" -"@abp/luxon@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.7.0-rc.4.tgz#d5fab55855d88aec6d9fcc3eb27805b64ccb5942" - integrity sha512-IyihWt3NInSMmV+kFKbPPyxf9ajHNwEuLUk3VCfmHy01ef/GjFS4RaEJ2xd8U0OiuGm0ZnTi6yqjm1sOQ0quNQ== +"@abp/luxon@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-11.0.0-rc.1.tgz#b2b2feb15b5e2ebabfb4d84146611011b5bb300e" + integrity sha512-e2zaTkoKDxm/ZJUuBPoxCXWpQyeWjkZuCMEtXGKcgrtEaukkhP9chwHk1mwC5WIW7AardmQl8Ozoy1xypgcveA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" luxon "^3.7.2" -"@abp/malihu-custom-scrollbar-plugin@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.7.0-rc.4.tgz#33b67b4daa41e32680f392e66bcb147f7a8595d9" - integrity sha512-OXTlbuy+5R2xEfNnnphzPjvCNi5FD7FF7YBH3gnLnDG8RiNvcfma8KrLvha6YCzDmKB1AuLGMfrOrE0GuQvEBQ== - dependencies: - "@abp/core" "~10.7.0-rc.4" - malihu-custom-scrollbar-plugin "^3.1.5" - -"@abp/moment@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.7.0-rc.4.tgz#2f68b427e5b033719411958a9008400739b971d9" - integrity sha512-XwFRFpaOfGSwnXk/eUg2GigSLQ1OxqunmvawDSj0V5wc9xnqazNGiCOOUrUm/jpi/ozWCj7TgOWkQHM+xKHezA== +"@abp/moment@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-11.0.0-rc.1.tgz#5ffdbe14cd24f28b2f0209e9dfcb7e19794b5f78" + integrity sha512-KQqmquSme6N7nX/7omqiLh+yf0zDA5zJDdqWI12iqJGwifL9K8e/pW6EncDimX+4pwvGm7hzaBUR1j2l+lG0lg== dependencies: moment "^2.30.1" -"@abp/popper.js@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-10.7.0-rc.4.tgz#bc7a5375c1f2608c5c3ec2ea65df0e6e8aaadb29" - integrity sha512-kgoxInvffZfqvdmHHPVe39Tc/iQCvcl/RFNsAT+Ow6pGEB2A5CUABRHZn/5raP2pufYmfK3eAxtKS7M9kmv9YA== +"@abp/popper.js@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-11.0.0-rc.1.tgz#52744f487f9b302ce9ae9180970ccf47011b9461" + integrity sha512-b2nCsrhxxNzfnV7MpeRLcmUPDaPQkNIXVC0g0V1jyTx8NjU1MT09XHkwOQJxuNiUlnX8XZ+dqcq7HRdZYedu9w== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@popperjs/core" "^2.11.8" -"@abp/prismjs@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-10.7.0-rc.4.tgz#260ebb79700a3f46358523ae13c2d51dd5e79e7f" - integrity sha512-p/SoVXPvcsQN+57vZTzvff3JTgBFRoFk1PdoBTipQzukUEjOb7MRuDsiPI5uUK+xoQ5UD6Pu0i7Xbiyo9II6/Q== +"@abp/prismjs@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-11.0.0-rc.1.tgz#b664d55ef8c6d858a8aa7521bcb900259692a7ff" + integrity sha512-Z8KzFcaDFchXNZ3QWVkkReWS7u3GgzaoS47HWt7BLgsxu7FqLz1v4zEzKRiEy5I4sqcociESjMHltzGn4sinoQ== dependencies: - "@abp/clipboard" "~10.7.0-rc.4" - "@abp/core" "~10.7.0-rc.4" + "@abp/clipboard" "~11.0.0-rc.1" + "@abp/core" "~11.0.0-rc.1" prismjs "^1.30.0" -"@abp/select2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.7.0-rc.4.tgz#233fa8ba11093726b8646d61c874edcc8e84b5ef" - integrity sha512-jxVBtqcMJROQ4wU9MmqwpQ4fRt/t5ZITieC7Fy0rfCwOmJB2ihkbNyjnLxhUsevmjurmw6yyUxv5N3WP3BmHHw== +"@abp/select2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-11.0.0-rc.1.tgz#4c4a5a7315e31755ca4d4e4b1d6738910e68bbbb" + integrity sha512-XfFbMdwl5iRM+5mGKTB3rCoH+isaFGBqbcP9e67IXOkhHsZie1fEGFBomTDwvVK48q9DQhSr8gsDyJKgD9B+JQ== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" select2 "4.0.13" -"@abp/sweetalert2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.7.0-rc.4.tgz#e745a1eb7a1beeaad4c1f5db7a4faf810cf22af4" - integrity sha512-uLy/1OiOTwGwCmgfwwXSqBtjozdbhmPLwUw9YbJKxojxX09VNjMWhzB4+6p1bf+JN+EPxI+HbSDCbXFDqQFA6w== +"@abp/sweetalert2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-11.0.0-rc.1.tgz#1a6b508ed85d78f4bb843532816428dab77354b4" + integrity sha512-c0sKYRb6aCzRB+e0jl61OEqdic2FZ3ODcHoqWVBfwmn9Gc17nGr/tTCGksU5UGY5uO2+ILhdUYHdxPU/wAVsPw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" sweetalert2 "^11.23.0" -"@abp/timeago@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.7.0-rc.4.tgz#165bd42c431c0e38c1f0b3423fb38dc469b74fdf" - integrity sha512-jgOXWL0S7PL2I30kUnIYEMCtrvUwj3xR38r2XzV5xW9OKwpHL+abzccb47ZGvqvETztdzRKFX7T8AzIZ/Cxqcw== +"@abp/timeago@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-11.0.0-rc.1.tgz#6093578ed4d00e8b18fcf36b1cf92e24c5a0830d" + integrity sha512-RpWkVGD4q2BcuG6T2cMjIQXWUdwHScVUAmJSXNknHuUrEXEe4GRSpIi0HxYjfrvCGTGkAwbRwXTE5/U6XbMuRQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" - timeago "^1.6.7" + "@abp/jquery" "~11.0.0-rc.1" + timeago.js "^4.0.2" -"@abp/utils@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.7.0-rc.4.tgz#36711ccca8b20fc0fce8a0d347645948ac32a35d" - integrity sha512-9S8bMSd/XPV4bjvcXEPTqJclcjRkcpeFEqUx8iQnZkhHjhuq5B7++RpCQ/j1mzX1lBzsvCliteqUKvjtUjOY1Q== +"@abp/utils@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-11.0.0-rc.1.tgz#91ca25e687b0d49195adf808029ba94978156c4a" + integrity sha512-WjujeW5j9Iqr5kR+8jF4lMk1E2FD9SMsOvivLOinQOE2tdipd7OlmPGX+8cwSXJXXhWJ7Y2TRqzlvn7BoZP0Yw== dependencies: just-compare "^2.3.0" @@ -224,21 +217,13 @@ ansi-colors@^4.1.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -bootstrap-datepicker@^1.10.1: +bootstrap-datepicker@1.10.1: version "1.10.1" resolved "https://registry.yarnpkg.com/bootstrap-datepicker/-/bootstrap-datepicker-1.10.1.tgz#0a8bec42957ea1ce1272b91bcf2b53696629fb86" integrity sha512-GIe+fsLp9Hi30oW7L2v2Q9/a4+aojrIA2p4ZagtLuKw2lpfQgjJjM0L6vl/lYQydGXWUbpoKbEC/O5tzWIkEKQ== dependencies: jquery ">=3.4.0 <4.0.0" -bootstrap-daterangepicker@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz#632e6fb2de4b6360c5c0a9d5f6adb9aace051fe8" - integrity sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g== - dependencies: - jquery ">=1.10" - moment "^2.9.0" - bootstrap@^5.3.8: version "5.3.8" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.8.tgz#6401a10057a22752d21f4e19055508980656aeed" @@ -285,30 +270,12 @@ jquery-migrate@~4.0.2: resolved "https://registry.yarnpkg.com/jquery-migrate/-/jquery-migrate-4.0.2.tgz#d296a64e05073017c54877462ac563f1927ee21f" integrity sha512-J15ilpECoAsObLv2robklj0qf1qt9QCnZwwNcJAXkM7dIiOgcac2dqC3HgDtUF0fmRwKZa/ggTkxTj9S4Vk+HQ== -jquery-mousewheel@>=3.0.6: - version "3.1.13" - resolved "https://registry.yarnpkg.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz#06f0335f16e353a695e7206bf50503cb523a6ee5" - integrity sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg== - -jquery-validation-unobtrusive@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.0.0.tgz#dfcf25a558496a2c883db6021d10f5398d15f99d" - integrity sha512-1ervYFFv6LX/rp7ktuLnMakHNG0piNRDyROI8Ir3hL1vPIwylAehB1AY3BPrYJnzW3WmwWryZq+Bz4sazZK9iQ== - dependencies: - jquery "^3.6.0" - jquery-validation ">=1.19" - -jquery-validation@>=1.19: - version "1.21.0" - resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.21.0.tgz#78fc05ab76020912a246af3661b3f54a438bca93" - integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w== - jquery-validation@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.22.1.tgz#fc1ae3256110332c929245a44d69ee76fee0e481" integrity sha512-ePLXLWK7Rh5eR652YsuIu7YPeGlCXrsJUteVw5iZopiU17yaMd3FaDggs6yyNMl56p8TYVeDRmKGK3fPZrMeQw== -jquery@>=1.10, "jquery@>=1.5.0 <4.0", jquery@>=1.7, "jquery@>=3.4.0 <4.0.0", jquery@^3.6.0: +jquery@>=1.7, "jquery@>=3.4.0 <4.0.0": version "3.7.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de" integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg== @@ -333,14 +300,7 @@ luxon@^3.7.2: resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.7.2.tgz#d697e48f478553cca187a0f8436aff468e3ba0ba" integrity sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew== -malihu-custom-scrollbar-plugin@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz#310cecc5e59415a1c29e9dfb5d2b6e01d66a29ef" - integrity sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ== - dependencies: - jquery-mousewheel ">=3.0.6" - -moment@^2.30.1, moment@^2.9.0: +moment@^2.30.1: version "2.30.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== @@ -365,12 +325,10 @@ sweetalert2@^11.23.0: resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.26.3.tgz#6e8188cf71818af34d62fe33a2465690cde9836d" integrity sha512-VU0hGw/WfI9h7Mh+SCsDlWgtxDwWZ6ccqS7QcO8zEeWnwplN1GptcLstq76OluUBSLUza6ldvKd3558OhjpJ9A== -timeago@^1.6.7: - version "1.6.7" - resolved "https://registry.yarnpkg.com/timeago/-/timeago-1.6.7.tgz#afd467c29a911e697fc22a81888c7c3022783cb5" - integrity sha512-FikcjN98+ij0siKH4VO4dZ358PR3oDDq4Vdl1+sN9gWz1/+JXGr3uZbUShYH/hL7bMhcTpPbplJU5Tej4b4jbQ== - dependencies: - jquery ">=1.5.0 <4.0" +timeago.js@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/timeago.js/-/timeago.js-4.0.2.tgz#724e8c8833e3490676c7bb0a75f5daf20e558028" + integrity sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w== tiny-emitter@^2.0.0: version "2.1.0" diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj index 9cb31d2476..aafdead94b 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 true diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json index 1385034b6f..58d4634d76 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json @@ -3,8 +3,8 @@ "name": "asp.net", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~10.7.0", - "@abp/prismjs": "~10.7.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "~11.0.0-rc.1", + "@abp/prismjs": "~11.0.0-rc.1" }, "devDependencies": {} } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock index d3d19017b1..7ac1c2c71b 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock @@ -2,204 +2,197 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.7.0-rc.4.tgz#0f9eacc9bb9807553ca0465d24fccee5805db2fc" - integrity sha512-v2RabyrSXPN2H4eByd3mSxxjjutUvH5LnKVRuffFZ4kA7Em7ZhD9hfKeBxYY+OuWfwVhEeKX/Rvd6jyAhbVf6Q== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~10.7.0-rc.4" - -"@abp/aspnetcore.mvc.ui.theme.shared@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.7.0-rc.4.tgz#353aaa338ab0841d042c4df2ce7af9913f5d8eed" - integrity sha512-CeVeaxH1D8FFtySSXvhrKBm2t9VVDdy+bbk51WFi54rQlicxFdQixYQogYTvs9e4/XaOvDpOC2T4SIVPbiC94Q== - dependencies: - "@abp/aspnetcore.mvc.ui" "~10.7.0-rc.4" - "@abp/bootstrap" "~10.7.0-rc.4" - "@abp/bootstrap-datepicker" "~10.7.0-rc.4" - "@abp/bootstrap-daterangepicker" "~10.7.0-rc.4" - "@abp/datatables.net-bs5" "~10.7.0-rc.4" - "@abp/font-awesome" "~10.7.0-rc.4" - "@abp/jquery-validation-unobtrusive" "~10.7.0-rc.4" - "@abp/lodash" "~10.7.0-rc.4" - "@abp/luxon" "~10.7.0-rc.4" - "@abp/malihu-custom-scrollbar-plugin" "~10.7.0-rc.4" - "@abp/moment" "~10.7.0-rc.4" - "@abp/select2" "~10.7.0-rc.4" - "@abp/sweetalert2" "~10.7.0-rc.4" - "@abp/timeago" "~10.7.0-rc.4" - -"@abp/aspnetcore.mvc.ui@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.7.0-rc.4.tgz#fb34369f924ce07866c731dec474d05bc7c1cc8e" - integrity sha512-JSz40zPIxcbkoYKZKvbTs32UfR7nbMoUe20g66tVHbN1Tn2fd2VMFD8elm4L03Tc+iZoLPXi5AsF9QD7zM7YJA== +"@abp/aspnetcore.mvc.ui.theme.basic@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-11.0.0-rc.1.tgz#f3f6157708b225aaf93567e6cce031740af1e4cf" + integrity sha512-EyeC+rt1pbnRquE8DEsL9ZR/xrEQFwqLdactTifCrcjF9gSXwKhJ5GJKccEFscoLvoy/EdPnWtylGlcHOF7yFA== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~11.0.0-rc.1" + +"@abp/aspnetcore.mvc.ui.theme.shared@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-11.0.0-rc.1.tgz#77ac0fa4f15e2055981a8e78a986caf4d5b24717" + integrity sha512-fb44VGo5FnBGbgYl5n5HoXJmpv3YW3rIKTH8CJ0FemVc+DkxAcHxdUx5jb2YhWG2IXaCdKKzwxzr+0ksIbKAWA== + dependencies: + "@abp/aspnetcore.mvc.ui" "~11.0.0-rc.1" + "@abp/bootstrap" "~11.0.0-rc.1" + "@abp/bootstrap-datepicker" "~11.0.0-rc.1" + "@abp/bootstrap-daterangepicker" "~11.0.0-rc.1" + "@abp/datatables.net-bs5" "~11.0.0-rc.1" + "@abp/font-awesome" "~11.0.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~11.0.0-rc.1" + "@abp/lodash" "~11.0.0-rc.1" + "@abp/luxon" "~11.0.0-rc.1" + "@abp/moment" "~11.0.0-rc.1" + "@abp/select2" "~11.0.0-rc.1" + "@abp/sweetalert2" "~11.0.0-rc.1" + "@abp/timeago" "~11.0.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-11.0.0-rc.1.tgz#45d83b3a3f16dbac155c0e9258a14cb26365acf4" + integrity sha512-VfVt8r13yOg/fp+DjUNsTmv56UWcDIySA9qdVfMgiIbiomwguKx0aaokqNf6yCRB7wA21TQHgLbrS71IpV9uWA== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.7.0-rc.4.tgz#9f2f9ba0590e01739d6ee68824e69eae275c7962" - integrity sha512-T5sIxswsQIwm20xfuymji5xud5GphO+c1hKQ6tYpPAtUhg1g8ABDY1pGBdWbxCJh3uOuhlF8grp9pT+xUy9i1w== +"@abp/bootstrap-datepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-11.0.0-rc.1.tgz#6fa5a9345db1a94d2466907c2a85341287ef77ba" + integrity sha512-E4GaKtllZ5L4uz0uPSaaHLIucpC6dw4kAqM+n+rLk4txoqUdAPs+vzjHnICgp/YnSWWhAmuOhYnWfny6TD3HXw== dependencies: - bootstrap-datepicker "^1.10.1" + bootstrap-datepicker "1.10.1" + jquery "~4.0.0" -"@abp/bootstrap-daterangepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.7.0-rc.4.tgz#0cc427a9320211bc2ae4383dc228747f03d8b132" - integrity sha512-p2qiX8FuplFS/8mUbnSVc2ZgoSpU6DkLL/4yuXIwA3rLhR9dcqyRxqpFzj8H5nQ1AKaEzddylFNzzhV0sCB8lw== +"@abp/bootstrap-daterangepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-11.0.0-rc.1.tgz#3c06aa2c6a4860a7a23874491d33a12393d907aa" + integrity sha512-uDj2Pc7ksZbLCfoJKixt3zbvA7jASvLd4ndqjkhgTsMrRXh4atgaFcvjCs0NKkCqGjyI5xJoGDTTc38HToWnLQ== dependencies: - "@abp/moment" "~10.7.0-rc.4" - bootstrap-daterangepicker "^3.1.0" + "@abp/moment" "~11.0.0-rc.1" + jquery "~4.0.0" + moment "^2.30.1" -"@abp/bootstrap@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.7.0-rc.4.tgz#1916f312c6b46b0d17591b514e12d1fd93bcaf2c" - integrity sha512-CqmKWa2McXnJj0U9NOraxTdJyadfm1lQnc0WisiSg6HllvMmE3KUf7GgpiM4nxQlQt9Z0/8hWPhq5cLiLLc8dA== +"@abp/bootstrap@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-11.0.0-rc.1.tgz#ac127a386437aa6a62b2e7188837a40f4f0dd036" + integrity sha512-lYhyk6qlt6QsJgb+HBccryB9g9Tw+/qLJ5bYmgsJyoBYGUt74jtdNVi6JDy+7O7+k4aRvvA3XDNOfnS1DbfNvg== dependencies: - "@abp/core" "~10.7.0-rc.4" - "@abp/popper.js" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" + "@abp/popper.js" "~11.0.0-rc.1" bootstrap "^5.3.8" -"@abp/clipboard@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-10.7.0-rc.4.tgz#5b8b8264775de9ba3f1e86f12ab2eb98fe932e33" - integrity sha512-wqX9L6Y9YCtzXBYxVyM+k+SGFhCKMtV4r1JMAwj8cmuAvEKcuBhJ1hQojVWXLzjoYQPbNu9vW7ypmE/+trcwtQ== +"@abp/clipboard@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-11.0.0-rc.1.tgz#45565ea7ad5fe54d9a17f158a2c666150fcb5de5" + integrity sha512-C/FHYR19n1cpcKmDPiSBUG5umxbddTX6p6m0QMVopQV235li54L8nNUlZzKjYdjc1ESgFKoJhtmegdspPjvysA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" clipboard "^2.0.11" -"@abp/core@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.7.0-rc.4.tgz#e1d8a7c378a807cde22cdf0f8b7ba21ec4e2d7cd" - integrity sha512-uZuJywMXK4W3YoQKZVbHLG4OekXhElnpJHOI78a1o2ESDz7bMP2Nfs8n8KSSXGz8b5yRCIlyf9/G7majYnjAcw== +"@abp/core@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-11.0.0-rc.1.tgz#5db5e442b9cd5dc0f654ffe858865b6dbcb7f61e" + integrity sha512-iw7qPkNpeMrjd0kVVVrVHuFzVlgbuvscZsEvLMT8YEhvUD0ABmGfTxChuuIcgV1R4hpXegvfsUDiVIKcY1YcVg== dependencies: - "@abp/utils" "~10.7.0-rc.4" + "@abp/utils" "~11.0.0-rc.1" -"@abp/datatables.net-bs5@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.7.0-rc.4.tgz#d87c26ab7604971d969ccda27c78795475af793a" - integrity sha512-SPlNc9zzzmDCENf6dQtpKAxXEIpHRaidZEDsx7MUcdcnGEI8xs0Wg3vXzNMhz65OhSoW2FYQKapdAa0uzB02Dg== +"@abp/datatables.net-bs5@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-11.0.0-rc.1.tgz#1d7e9471c68c0eb64e9476967670d69fa897b7f3" + integrity sha512-VsQBlEx+ga8/X10i29XMs9Mjj2W83hSPsYftgByq09NiwtUVfX6t7yiGf4wF9+rk7fiRt3XQ4sXi6G1Ji9nqyQ== dependencies: - "@abp/datatables.net" "~10.7.0-rc.4" + "@abp/datatables.net" "~11.0.0-rc.1" datatables.net-bs5 "^2.3.4" -"@abp/datatables.net@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.7.0-rc.4.tgz#d64f7fe7e3adea76b238fd3ff59cd63a4445b2fe" - integrity sha512-4JtMRiQAvLY+IOqofHE6tNRwjG4ONyiFikgoKmNPfnue7wXIIA6BUgdUAeABan4S0kSwHOttM7MHyZkQLjzTHw== +"@abp/datatables.net@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-11.0.0-rc.1.tgz#2402b8192d41e4cd435b4e212604c32013b7d142" + integrity sha512-fNpr2eo9ZUghWiESK5QouB8rZoNGFFE+c+6BwcqchTnc9wcGj0wz+UEYtWZFitpHniWV2RRcVSoMM8waKzSl7w== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" datatables.net "^2.3.4" -"@abp/font-awesome@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.7.0-rc.4.tgz#9ce20b82685facea8564965ab3ad07764b29eccc" - integrity sha512-oalR5fBPImD4q0yYPbscJ858sDo8kJhFgixpViPc3bbaN41M5JPBpVR+K3UXQYfO93a0mhLoVb20bRMggWyhQQ== +"@abp/font-awesome@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-11.0.0-rc.1.tgz#0accc6fb2168515688f5a36f8dd3d4d4236f533d" + integrity sha512-/u4oXQGjet8VE/L1SZDsNCK4q6D9m9B50Em+Mkp8F7W/F6uLnyXGcWNyuHR3DMqvjEOXUc1WHE/zJQx8gsAFDw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@fortawesome/fontawesome-free" "^7.0.1" -"@abp/jquery-validation-unobtrusive@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.7.0-rc.4.tgz#a8c7daa832d72780e9b601ba0c667fe58433a817" - integrity sha512-VCnTyd3nvafI3A4XHM8jWhBCJ+0B3N6H4LeVW5AK0wyvk38q78tWAqI0ZaYgz3ObTKMuCTa+gCbmq9B/zrkT3Q== +"@abp/jquery-validation-unobtrusive@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-11.0.0-rc.1.tgz#8bd71ad4f2882b02a12a8c36443361d23f62e386" + integrity sha512-FF2pBceeNP9cUA1mj5T/fYpG5nq1DvrSyL7iOwrtqixDV8R9jgpZFCA146K0UMiqkzdtH9WiFRwL6690QAmkEg== dependencies: - "@abp/jquery-validation" "~10.7.0-rc.4" - jquery-validation-unobtrusive "^4.0.0" + "@abp/jquery-validation" "~11.0.0-rc.1" + jquery-validation "^1.22.1" -"@abp/jquery-validation@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.7.0-rc.4.tgz#5309e6f4b9b61124855df83268b8b1b99bd91eb6" - integrity sha512-TtIQWMWzI8ucPWwI2Jx9wyXH0Tl3m2h4r98T+wFlQ3UlDUn3x1SfLxhDPH7IX1RYMaa/3go1HlL/JRgK5yeIxw== +"@abp/jquery-validation@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-11.0.0-rc.1.tgz#fcc4fd82904750de70bbfc3f28b165768de7f992" + integrity sha512-JOxpgQoRi6dx12si3ArXdc8ElS2yaHlKxpYz4lgBlUschJoljsx0z2hhZzopJMhSaXFABHWGQmH9ssjmZaerlQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" jquery-validation "^1.22.1" -"@abp/jquery@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.7.0-rc.4.tgz#4aa75a520186a74303a2de511c19115310c7e2a4" - integrity sha512-YcXWXpsCGMUxMWg1QakOWmTjFJLpN+/QxfVuCjNJiHZJrHN0Ea5CPDWnLMqM46RhgoUAxg22EWYRi83j7mlYdg== +"@abp/jquery@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-11.0.0-rc.1.tgz#7d6df2229760e5b2cfdc9aa7746b37a95a3e2001" + integrity sha512-87tkbkRp4xQ3ih9Ri1nxTxqmd424nAFT1WFpWld1Aq1GYUg64mgPMc3CrTxUa8yYfMZdSJbWBsT7gh0C+7XVjg== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" jquery "~4.0.0" jquery-migrate "~4.0.2" -"@abp/lodash@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.7.0-rc.4.tgz#77069cfb8a2d3496c03475a18ef6ef442b29de9e" - integrity sha512-g+C3bjjjpas4VZPAt2o1b+DLr31pCn7U61rpYGjT6BoI6rPmu8WX8yFImyRB8S2QJ7FQT/Dr3p6GxPNn2mAE4A== +"@abp/lodash@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-11.0.0-rc.1.tgz#5b77df8d96905024442040cd352db4bfb863c2f4" + integrity sha512-uEvbpUPogY0VLzyFDIeo2JdsUxs1imX4aDbm8Jj2BKrFf1kfQ3dQUFtzwfDE4y+9dYvxtHXZkYsV2VA/9qaRTA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" lodash "^4.18.1" -"@abp/luxon@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.7.0-rc.4.tgz#d5fab55855d88aec6d9fcc3eb27805b64ccb5942" - integrity sha512-IyihWt3NInSMmV+kFKbPPyxf9ajHNwEuLUk3VCfmHy01ef/GjFS4RaEJ2xd8U0OiuGm0ZnTi6yqjm1sOQ0quNQ== +"@abp/luxon@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-11.0.0-rc.1.tgz#b2b2feb15b5e2ebabfb4d84146611011b5bb300e" + integrity sha512-e2zaTkoKDxm/ZJUuBPoxCXWpQyeWjkZuCMEtXGKcgrtEaukkhP9chwHk1mwC5WIW7AardmQl8Ozoy1xypgcveA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" luxon "^3.7.2" -"@abp/malihu-custom-scrollbar-plugin@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.7.0-rc.4.tgz#33b67b4daa41e32680f392e66bcb147f7a8595d9" - integrity sha512-OXTlbuy+5R2xEfNnnphzPjvCNi5FD7FF7YBH3gnLnDG8RiNvcfma8KrLvha6YCzDmKB1AuLGMfrOrE0GuQvEBQ== - dependencies: - "@abp/core" "~10.7.0-rc.4" - malihu-custom-scrollbar-plugin "^3.1.5" - -"@abp/moment@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.7.0-rc.4.tgz#2f68b427e5b033719411958a9008400739b971d9" - integrity sha512-XwFRFpaOfGSwnXk/eUg2GigSLQ1OxqunmvawDSj0V5wc9xnqazNGiCOOUrUm/jpi/ozWCj7TgOWkQHM+xKHezA== +"@abp/moment@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-11.0.0-rc.1.tgz#5ffdbe14cd24f28b2f0209e9dfcb7e19794b5f78" + integrity sha512-KQqmquSme6N7nX/7omqiLh+yf0zDA5zJDdqWI12iqJGwifL9K8e/pW6EncDimX+4pwvGm7hzaBUR1j2l+lG0lg== dependencies: moment "^2.30.1" -"@abp/popper.js@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-10.7.0-rc.4.tgz#bc7a5375c1f2608c5c3ec2ea65df0e6e8aaadb29" - integrity sha512-kgoxInvffZfqvdmHHPVe39Tc/iQCvcl/RFNsAT+Ow6pGEB2A5CUABRHZn/5raP2pufYmfK3eAxtKS7M9kmv9YA== +"@abp/popper.js@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-11.0.0-rc.1.tgz#52744f487f9b302ce9ae9180970ccf47011b9461" + integrity sha512-b2nCsrhxxNzfnV7MpeRLcmUPDaPQkNIXVC0g0V1jyTx8NjU1MT09XHkwOQJxuNiUlnX8XZ+dqcq7HRdZYedu9w== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@popperjs/core" "^2.11.8" -"@abp/prismjs@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-10.7.0-rc.4.tgz#260ebb79700a3f46358523ae13c2d51dd5e79e7f" - integrity sha512-p/SoVXPvcsQN+57vZTzvff3JTgBFRoFk1PdoBTipQzukUEjOb7MRuDsiPI5uUK+xoQ5UD6Pu0i7Xbiyo9II6/Q== +"@abp/prismjs@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-11.0.0-rc.1.tgz#b664d55ef8c6d858a8aa7521bcb900259692a7ff" + integrity sha512-Z8KzFcaDFchXNZ3QWVkkReWS7u3GgzaoS47HWt7BLgsxu7FqLz1v4zEzKRiEy5I4sqcociESjMHltzGn4sinoQ== dependencies: - "@abp/clipboard" "~10.7.0-rc.4" - "@abp/core" "~10.7.0-rc.4" + "@abp/clipboard" "~11.0.0-rc.1" + "@abp/core" "~11.0.0-rc.1" prismjs "^1.30.0" -"@abp/select2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.7.0-rc.4.tgz#233fa8ba11093726b8646d61c874edcc8e84b5ef" - integrity sha512-jxVBtqcMJROQ4wU9MmqwpQ4fRt/t5ZITieC7Fy0rfCwOmJB2ihkbNyjnLxhUsevmjurmw6yyUxv5N3WP3BmHHw== +"@abp/select2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-11.0.0-rc.1.tgz#4c4a5a7315e31755ca4d4e4b1d6738910e68bbbb" + integrity sha512-XfFbMdwl5iRM+5mGKTB3rCoH+isaFGBqbcP9e67IXOkhHsZie1fEGFBomTDwvVK48q9DQhSr8gsDyJKgD9B+JQ== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" select2 "4.0.13" -"@abp/sweetalert2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.7.0-rc.4.tgz#e745a1eb7a1beeaad4c1f5db7a4faf810cf22af4" - integrity sha512-uLy/1OiOTwGwCmgfwwXSqBtjozdbhmPLwUw9YbJKxojxX09VNjMWhzB4+6p1bf+JN+EPxI+HbSDCbXFDqQFA6w== +"@abp/sweetalert2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-11.0.0-rc.1.tgz#1a6b508ed85d78f4bb843532816428dab77354b4" + integrity sha512-c0sKYRb6aCzRB+e0jl61OEqdic2FZ3ODcHoqWVBfwmn9Gc17nGr/tTCGksU5UGY5uO2+ILhdUYHdxPU/wAVsPw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" sweetalert2 "^11.23.0" -"@abp/timeago@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.7.0-rc.4.tgz#165bd42c431c0e38c1f0b3423fb38dc469b74fdf" - integrity sha512-jgOXWL0S7PL2I30kUnIYEMCtrvUwj3xR38r2XzV5xW9OKwpHL+abzccb47ZGvqvETztdzRKFX7T8AzIZ/Cxqcw== +"@abp/timeago@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-11.0.0-rc.1.tgz#6093578ed4d00e8b18fcf36b1cf92e24c5a0830d" + integrity sha512-RpWkVGD4q2BcuG6T2cMjIQXWUdwHScVUAmJSXNknHuUrEXEe4GRSpIi0HxYjfrvCGTGkAwbRwXTE5/U6XbMuRQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" - timeago "^1.6.7" + "@abp/jquery" "~11.0.0-rc.1" + timeago.js "^4.0.2" -"@abp/utils@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.7.0-rc.4.tgz#36711ccca8b20fc0fce8a0d347645948ac32a35d" - integrity sha512-9S8bMSd/XPV4bjvcXEPTqJclcjRkcpeFEqUx8iQnZkhHjhuq5B7++RpCQ/j1mzX1lBzsvCliteqUKvjtUjOY1Q== +"@abp/utils@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-11.0.0-rc.1.tgz#91ca25e687b0d49195adf808029ba94978156c4a" + integrity sha512-WjujeW5j9Iqr5kR+8jF4lMk1E2FD9SMsOvivLOinQOE2tdipd7OlmPGX+8cwSXJXXhWJ7Y2TRqzlvn7BoZP0Yw== dependencies: just-compare "^2.3.0" @@ -218,21 +211,13 @@ ansi-colors@^4.1.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -bootstrap-datepicker@^1.10.1: +bootstrap-datepicker@1.10.1: version "1.10.1" resolved "https://registry.yarnpkg.com/bootstrap-datepicker/-/bootstrap-datepicker-1.10.1.tgz#0a8bec42957ea1ce1272b91bcf2b53696629fb86" integrity sha512-GIe+fsLp9Hi30oW7L2v2Q9/a4+aojrIA2p4ZagtLuKw2lpfQgjJjM0L6vl/lYQydGXWUbpoKbEC/O5tzWIkEKQ== dependencies: jquery ">=3.4.0 <4.0.0" -bootstrap-daterangepicker@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz#632e6fb2de4b6360c5c0a9d5f6adb9aace051fe8" - integrity sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g== - dependencies: - jquery ">=1.10" - moment "^2.9.0" - bootstrap@^5.3.8: version "5.3.8" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.8.tgz#6401a10057a22752d21f4e19055508980656aeed" @@ -279,35 +264,17 @@ jquery-migrate@~4.0.2: resolved "https://registry.yarnpkg.com/jquery-migrate/-/jquery-migrate-4.0.2.tgz#d296a64e05073017c54877462ac563f1927ee21f" integrity sha512-J15ilpECoAsObLv2robklj0qf1qt9QCnZwwNcJAXkM7dIiOgcac2dqC3HgDtUF0fmRwKZa/ggTkxTj9S4Vk+HQ== -jquery-mousewheel@>=3.0.6: - version "3.1.13" - resolved "https://registry.yarnpkg.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz#06f0335f16e353a695e7206bf50503cb523a6ee5" - integrity sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg== - -jquery-validation-unobtrusive@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.0.0.tgz#dfcf25a558496a2c883db6021d10f5398d15f99d" - integrity sha512-1ervYFFv6LX/rp7ktuLnMakHNG0piNRDyROI8Ir3hL1vPIwylAehB1AY3BPrYJnzW3WmwWryZq+Bz4sazZK9iQ== - dependencies: - jquery "^3.6.0" - jquery-validation ">=1.19" - -jquery-validation@>=1.19: - version "1.21.0" - resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.21.0.tgz#78fc05ab76020912a246af3661b3f54a438bca93" - integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w== - jquery-validation@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.22.1.tgz#fc1ae3256110332c929245a44d69ee76fee0e481" integrity sha512-ePLXLWK7Rh5eR652YsuIu7YPeGlCXrsJUteVw5iZopiU17yaMd3FaDggs6yyNMl56p8TYVeDRmKGK3fPZrMeQw== -jquery@>=1.10, "jquery@>=1.5.0 <4.0", jquery@>=1.7: +jquery@>=1.7: version "3.6.4" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.4.tgz#ba065c188142100be4833699852bf7c24dc0252f" integrity sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ== -"jquery@>=3.4.0 <4.0.0", jquery@^3.6.0: +"jquery@>=3.4.0 <4.0.0": version "3.7.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de" integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg== @@ -332,23 +299,11 @@ luxon@^3.7.2: resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.7.2.tgz#d697e48f478553cca187a0f8436aff468e3ba0ba" integrity sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew== -malihu-custom-scrollbar-plugin@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz#310cecc5e59415a1c29e9dfb5d2b6e01d66a29ef" - integrity sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ== - dependencies: - jquery-mousewheel ">=3.0.6" - moment@^2.30.1: version "2.30.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== -moment@^2.9.0: - version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" - integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== - prismjs@^1.30.0: version "1.30.0" resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.30.0.tgz#d9709969d9d4e16403f6f348c63553b19f0975a9" @@ -369,12 +324,10 @@ sweetalert2@^11.23.0: resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.26.3.tgz#6e8188cf71818af34d62fe33a2465690cde9836d" integrity sha512-VU0hGw/WfI9h7Mh+SCsDlWgtxDwWZ6ccqS7QcO8zEeWnwplN1GptcLstq76OluUBSLUza6ldvKd3558OhjpJ9A== -timeago@^1.6.7: - version "1.6.7" - resolved "https://registry.yarnpkg.com/timeago/-/timeago-1.6.7.tgz#afd467c29a911e697fc22a81888c7c3022783cb5" - integrity sha512-FikcjN98+ij0siKH4VO4dZ358PR3oDDq4Vdl1+sN9gWz1/+JXGr3uZbUShYH/hL7bMhcTpPbplJU5Tej4b4jbQ== - dependencies: - jquery ">=1.5.0 <4.0" +timeago.js@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/timeago.js/-/timeago.js-4.0.2.tgz#724e8c8833e3490676c7bb0a75f5daf20e558028" + integrity sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w== tiny-emitter@^2.0.0: version "2.1.0" diff --git a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/BlobStoring.Database.Host.ConsoleApp.ConsoleApp.csproj b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/BlobStoring.Database.Host.ConsoleApp.ConsoleApp.csproj index 6f48a934fa..6e6ed6d0e4 100644 --- a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/BlobStoring.Database.Host.ConsoleApp.ConsoleApp.csproj +++ b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/BlobStoring.Database.Host.ConsoleApp.ConsoleApp.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo.Abp.BlobStoring.Database.Domain.Shared.csproj b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo.Abp.BlobStoring.Database.Domain.Shared.csproj index ad9e60e2bc..3a3b27820a 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo.Abp.BlobStoring.Database.Domain.Shared.csproj +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo.Abp.BlobStoring.Database.Domain.Shared.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/he.json b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/he.json new file mode 100644 index 0000000000..1f4ef68bbb --- /dev/null +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/he.json @@ -0,0 +1,6 @@ +{ + "culture": "he", + "texts": { + "MyAccount": "החשבון שלי" + } +} diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo.Abp.BlobStoring.Database.Domain.csproj b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo.Abp.BlobStoring.Database.Domain.csproj index 1ec23e8812..e4ac4cb091 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo.Abp.BlobStoring.Database.Domain.csproj +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo.Abp.BlobStoring.Database.Domain.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.csproj b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.csproj index 9ee75bb1b1..74db6e1e39 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.csproj +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/Volo.Abp.BlobStoring.Database.Installer.csproj b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/Volo.Abp.BlobStoring.Database.Installer.csproj index b265f8632b..18b63f9fbb 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/Volo.Abp.BlobStoring.Database.Installer.csproj +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/Volo.Abp.BlobStoring.Database.Installer.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 true diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo.Abp.BlobStoring.Database.MongoDB.csproj b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo.Abp.BlobStoring.Database.MongoDB.csproj index d5856ec26a..cf9a5aa761 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo.Abp.BlobStoring.Database.MongoDB.csproj +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo.Abp.BlobStoring.Database.MongoDB.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.Domain.Tests/Volo.Abp.BlobStoring.Database.Domain.Tests.csproj b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.Domain.Tests/Volo.Abp.BlobStoring.Database.Domain.Tests.csproj index a8ae3bc24c..470929d513 100644 --- a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.Domain.Tests/Volo.Abp.BlobStoring.Database.Domain.Tests.csproj +++ b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.Domain.Tests/Volo.Abp.BlobStoring.Database.Domain.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.Abp.BlobStoring.Database diff --git a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests.csproj b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests.csproj index 3e1368f21f..7b22daecb2 100644 --- a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests.csproj +++ b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.Abp.BlobStoring.Database diff --git a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj index 82f8669a69..f11567ecdf 100644 --- a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj +++ b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.Abp.BlobStoring.Database diff --git a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.TestBase/Volo.Abp.BlobStoring.Database.TestBase.csproj b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.TestBase/Volo.Abp.BlobStoring.Database.TestBase.csproj index 4462944dd1..c4fa5e44f4 100644 --- a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.TestBase/Volo.Abp.BlobStoring.Database.TestBase.csproj +++ b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.TestBase/Volo.Abp.BlobStoring.Database.TestBase.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.Abp.BlobStoring.Database diff --git a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj index 83d90c096d..301149382f 100644 --- a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj b/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj index 05d90a27cb..5b3a759366 100644 --- a/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj index 5523ac697b..212ae1f42b 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 InProcess diff --git a/modules/blogging/app/Volo.BloggingTestApp/package.json b/modules/blogging/app/Volo.BloggingTestApp/package.json index f8687ccd03..d2c791ec1f 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/package.json +++ b/modules/blogging/app/Volo.BloggingTestApp/package.json @@ -3,7 +3,7 @@ "name": "volo.blogtestapp", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~10.7.0", - "@abp/blogging": "~10.7.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "~11.0.0-rc.1", + "@abp/blogging": "~11.0.0-rc.1" } } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo.Blogging.Admin.Application.Contracts.csproj b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo.Blogging.Admin.Application.Contracts.csproj index 3927447c06..079ca20dbf 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo.Blogging.Admin.Application.Contracts.csproj +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo.Blogging.Admin.Application.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Blogging.Admin.Application.Contracts Volo.Blogging.Admin.Application.Contracts true diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj index bcffdd8a59..141ead645d 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj @@ -4,16 +4,12 @@ - net10.0 + net11.0 Volo.Blogging.Admin.Application Volo.Blogging.Admin.Application - - - - diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo.Blogging.Admin.HttpApi.Client.csproj b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo.Blogging.Admin.HttpApi.Client.csproj index 63d0ca9914..4a0aaa8587 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo.Blogging.Admin.HttpApi.Client.csproj +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo.Blogging.Admin.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Blogging.Admin.HttpApi.Client Volo.Blogging.Admin.HttpApi.Client diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj index f9b564071c..783fe8ad6f 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Blogging.Admin.HttpApi Volo.Blogging.Admin.HttpApi diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj index 8d8e6943a2..d39e081b22 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Blogging.Admin.Web Volo.Blogging.Admin.Web 2.8 diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts.Shared/Volo.Blogging.Application.Contracts.Shared.csproj b/modules/blogging/src/Volo.Blogging.Application.Contracts.Shared/Volo.Blogging.Application.Contracts.Shared.csproj index df56875887..52deec53b4 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts.Shared/Volo.Blogging.Application.Contracts.Shared.csproj +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts.Shared/Volo.Blogging.Application.Contracts.Shared.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Blogging.Application.Contracts.Shared Volo.Blogging.Application.Contracts.Shared diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo.Blogging.Application.Contracts.csproj b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo.Blogging.Application.Contracts.csproj index 7b62408d4a..96e4ccf14e 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo.Blogging.Application.Contracts.csproj +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo.Blogging.Application.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Blogging.Application.Contracts Volo.Blogging.Application.Contracts true diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj b/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj index 0aa0ded30e..cedf9845ab 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj +++ b/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj @@ -4,14 +4,15 @@ - net10.0 + net11.0 Volo.Blogging.Application Volo.Blogging.Application - + + diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs index d2b8e79690..f9ac4df24d 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs @@ -5,6 +5,7 @@ using System.IO; using System.Net.Mime; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; +using SkiaSharp; using Volo.Abp; using Volo.Abp.Authorization; using Volo.Abp.BlobStoring; @@ -39,7 +40,7 @@ namespace Volo.Blogging.Files ValidateFileName(name); var fileStream = await BlobContainer.GetAsync(name); - return new RemoteStreamContent(fileStream, name, GetByExtension(Path.GetExtension(name)), disposeStream: true); + return new RemoteStreamContent(fileStream, name, GetContentType(Path.GetExtension(name)), disposeStream: true); } protected virtual void ValidateFileName(string name) @@ -53,7 +54,7 @@ namespace Volo.Blogging.Files } } - private static string GetByExtension(string extension) + protected virtual string GetContentType(string extension) { extension = extension.RemovePreFix(".").ToLowerInvariant(); @@ -66,6 +67,10 @@ namespace Volo.Blogging.Files case "jpg": case "jpeg": return "image/jpeg"; + case "bmp": + return "image/bmp"; + case "webp": + return "image/webp"; //TODO: Add other extensions too.. @@ -74,6 +79,13 @@ namespace Volo.Blogging.Files } } + protected virtual string GetExtension(SKEncodedImageFormat imageFormat) + { + return imageFormat == SKEncodedImageFormat.Jpeg + ? ".jpg" + : "." + imageFormat.ToString().ToLowerInvariant(); + } + public virtual async Task CreateAsync(FileUploadInputDto input) { if (!await AuthorizationService.IsGrantedAnyAsync(BloggingPermissions.Posts.Create, BloggingPermissions.Posts.Update)) @@ -93,18 +105,19 @@ namespace Volo.Blogging.Files var position = input.File.GetStream().Position; - if (!ImageFormatHelper.IsValidImage(input.File.GetStream(), FileUploadConsts.AllowedImageUploadFormats)) + var imageFormat = ImageFormatHelper.GetValidImageFormat(input.File.GetStream(), FileUploadConsts.AllowedImageUploadFormats); + if (imageFormat == null) { throw new UserFriendlyException("Invalid image format!"); } - // IsValidImage may change the position of the stream + // GetValidImageFormat may change the position of the stream if (input.File.GetStream().CanSeek) { input.File.GetStream().Position = position; } - var uniqueFileName = GenerateUniqueFileName(Path.GetExtension(input.Name)); + var uniqueFileName = GenerateUniqueFileName(GetExtension(imageFormat.Value)); ValidateFileName(uniqueFileName); await BlobContainer.SaveAsync(uniqueFileName, input.File.GetStream()); diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileUploadConsts.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileUploadConsts.cs index d7164dc261..745cee5f46 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileUploadConsts.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileUploadConsts.cs @@ -1,24 +1,20 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; -using SixLabors.ImageSharp.Formats; -using SixLabors.ImageSharp.Formats.Bmp; -using SixLabors.ImageSharp.Formats.Gif; -using SixLabors.ImageSharp.Formats.Jpeg; -using SixLabors.ImageSharp.Formats.Png; +using SkiaSharp; namespace Volo.Blogging.Files { public class FileUploadConsts { - public static readonly ICollection AllowedImageUploadFormats = new Collection + public static readonly ICollection AllowedImageUploadFormats = new Collection { - JpegFormat.Instance, - PngFormat.Instance, - GifFormat.Instance, - BmpFormat.Instance, + SKEncodedImageFormat.Jpeg, + SKEncodedImageFormat.Png, + SKEncodedImageFormat.Gif, + SKEncodedImageFormat.Bmp, }; - public static string AllowedImageFormatsJoint => string.Join(",", AllowedImageUploadFormats.Select(x => x.Name)); + public static string AllowedImageFormatsJoint => string.Join(",", AllowedImageUploadFormats.Select(x => x.ToString().ToUpperInvariant())); } } diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/ImageFormatHelper.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/ImageFormatHelper.cs index 32060bf501..b1ffc9831a 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/ImageFormatHelper.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/ImageFormatHelper.cs @@ -1,33 +1,54 @@ using System; using System.Collections.Generic; using System.IO; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Formats; +using SkiaSharp; namespace Volo.Blogging.Areas.Blog.Helpers { public class ImageFormatHelper { - public static IImageFormat GetImageRawFormat(Stream stream) + public static SKEncodedImageFormat? GetImageRawFormat(Stream stream) { - using (var image = Image.Load(stream)) + // Only the image header is parsed, the pixels are not decoded. + // SKCodec.Create(Stream) takes the ownership of the stream and disposes it, so the remaining bytes + // are copied to give the codec its own buffer and keep the stream open for the caller. + using (var memoryStream = new MemoryStream()) { - return image.Metadata.DecodedImageFormat; + stream.CopyTo(memoryStream); + + using (var data = SKData.CreateCopy(memoryStream.GetBuffer(), (ulong)memoryStream.Length)) + using (var codec = SKCodec.Create(data)) + { + return codec?.EncodedFormat; + } } } - public static bool IsValidImage(Stream stream, ICollection validFormats) + public static bool IsValidImage(Stream stream, ICollection validFormats) + { + return GetValidImageFormat(stream, validFormats).HasValue; + } + + public static SKEncodedImageFormat? GetValidImageFormat(Stream stream, ICollection validFormats) { try { var imageFormat = GetImageRawFormat(stream); - - return validFormats.Contains(imageFormat); + + return imageFormat.HasValue && validFormats.Contains(imageFormat.Value) ? imageFormat : null; } - catch (Exception e) + catch (Exception e) when (!IsNativeLibraryException(e)) { - return false; + return null; } } + + private static bool IsNativeLibraryException(Exception e) + { + return e is DllNotFoundException + or EntryPointNotFoundException + or BadImageFormatException + or TypeInitializationException; + } } } diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj index f06a7f376f..992a136e27 100644 --- a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Blogging.Domain.Shared Volo.Blogging.Domain.Shared true diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/he.json b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/he.json new file mode 100644 index 0000000000..6f079164b1 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/he.json @@ -0,0 +1,93 @@ +{ + "culture": "he", + "texts": { + "Menu:Blogs": "בלוגים", + "Menu:BlogManagement": "ניהול בלוגים", + "Permission:Management": "ניהול", + "Permission:Edit": "עריכה", + "Permission:Create": "יצירה", + "Permission:Delete": "מחיקה", + "Permission:Blogging": "בלוג", + "Permission:Blogs": "בלוגים", + "Permission:Posts": "פוסטים", + "Permission:Tags": "תגיות", + "Permission:Comments": "תגובות", + "Permission:ClearCache": "ניקוי מטמון", + "Title": "כותרת", + "Delete": "מחיקה", + "Reply": "תשובה", + "ReplyTo": "תשובה ל-{0}", + "ContinueReading": "להמשך קריאה", + "DaysAgo": "לפני {0} ימים", + "DayAgo": "לפני יום", + "YearsAgo": "לפני {0} שנים", + "YearAgo": "לפני שנה", + "MonthsAgo": "לפני {0} חודשים", + "MonthAgo": "לפני חודש", + "WeeksAgo": "לפני {0} שבועות", + "WeekAgo": "לפני שבוע", + "MinutesAgo": "לפני {0} דקות", + "MinuteAgo": "לפני דקה", + "SecondsAgo": "לפני {0} שניות", + "SecondAgo": "לפני שנייה", + "HoursAgo": "לפני {0} שעות", + "HourAgo": "לפני שעה", + "Now": "עכשיו", + "Content": "תוכן", + "SeeAll": "הצגת הכול", + "PopularTags": "תגיות פופולריות", + "WiewsWithCount": "{0} צפיות", + "LastPosts": "פוסטים אחרונים", + "LeaveComment": "הוספת תגובה", + "TagsInThisArticle": "תגיות במאמר זה", + "Posts": "פוסטים", + "Edit": "עריכה", + "BLOG": "בלוג", + "CommentDeletionWarningMessage": "התגובה תימחק.", + "PostDeletionWarningMessage": "הפוסט יימחק.", + "BlogDeletionWarningMessage": "הבלוג יימחק.", + "AreYouSure": "האם להמשיך?", + "CommentWithCount": "{0} תגובות", + "Comment": "תגובה", + "ShareOnTwitter": "שיתוף בטוויטר", + "CoverImage": "תמונת שער", + "CreateANewPost": "יצירת פוסט חדש", + "CreateANewBlog": "יצירת בלוג חדש", + "WhatIsNew": "מה חדש?", + "Name": "שם", + "ShortName": "שם מקוצר", + "CreationTime": "זמן יצירה", + "Description": "תיאור", + "Blogs": "בלוגים", + "Tags": "תגיות", + "ShareOn": "שיתוף:", + "TitleLengthWarning": "כדי שהכותרת תתאים ל-SEO, כדאי לשמור אותה קצרה מ-60 תווים!", + "ClearCache": "ניקוי מטמון", + "ClearCacheConfirmationMessage": "לנקות את המטמון?", + "MarkdownSupported": "יש תמיכה ב-Markdown", + "FileUploadInfo": "גררו ושחררו תמונה, או הדביקו תמונה שהועתקה.", + "PostDescriptionHint": "* יוצג בתצוגה המקדימה של הקישור למאמר, יש תמיכה ב-HTML", + "ReadMore": "להמשך קריאה", + "MemberNotPublishedPostYet": "עדיין אין פוסטים!", + "UpdateUserWebSiteInfo": "לדוגמה: https://johndoe.com", + "UpdateUserTwitterInfo": "לדוגמה: johndoe", + "UpdateUserGithubInfo": "לדוגמה: johndoe", + "UpdateUserLinkedinInfo": "לדוגמה: https://www.linkedin.com/...", + "UpdateUserCompanyInfo": "לדוגמה: Volosoft", + "UpdateUserJobTitleInfo": "לדוגמה: מפתח/ת תוכנה", + "WebSite": "אתר אינטרנט", + "UserName": "שם משתמש", + "FullURL": "כתובת URL מלאה", + "JobTitle": "תואר משרה", + "PersonalWebsite": "אתר אישי", + "EditProfile": "עריכת פרופיל", + "MoreFromBlog": "עוד מהבלוג", + "MoreFromUser": "עוד מאת {0}", + "BlogPosts": "פוסטים", + "Views": "צפיות", + "Biography": "ביוגרפיה", + "Social": "רשתות חברתיות", + "NewBlogPost": "פוסט חדש", + "BlogMemberMetaDescription": "בלוג ABP על פיתוח ב-.NET, פיתוח חוצה פלטפורמות, תבניות ליישומי ASP.NET, חדשות על ABP ועוד..." + } +} diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj b/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj index ba90d3c374..9cc74956b7 100644 --- a/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj +++ b/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Blogging.Domain Volo.Blogging.Domain diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj index c8003b7d47..01968f995b 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Blogging.EntityFrameworkCore Volo.Blogging.EntityFrameworkCore diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj index b2c9dee648..77aab0bade 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Blogging.HttpApi.Client Volo.Blogging.HttpApi.Client diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj b/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj index 151f87696b..2958f7ccaa 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj +++ b/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Blogging.HttpApi Volo.Blogging.HttpApi diff --git a/modules/blogging/src/Volo.Blogging.Installer/Volo.Blogging.Installer.csproj b/modules/blogging/src/Volo.Blogging.Installer/Volo.Blogging.Installer.csproj index 8d901bb264..036424be0d 100644 --- a/modules/blogging/src/Volo.Blogging.Installer/Volo.Blogging.Installer.csproj +++ b/modules/blogging/src/Volo.Blogging.Installer/Volo.Blogging.Installer.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 true diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo.Blogging.MongoDB.csproj b/modules/blogging/src/Volo.Blogging.MongoDB/Volo.Blogging.MongoDB.csproj index 561e6c2470..73e7e3dd52 100644 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo.Blogging.MongoDB.csproj +++ b/modules/blogging/src/Volo.Blogging.MongoDB/Volo.Blogging.MongoDB.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Blogging.MongoDB Volo.Blogging.MongoDB diff --git a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj index 0379bd280d..f626b88663 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Blogging.Web Volo.Blogging.Web 2.8 diff --git a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj index 4170262434..7c047ebd88 100644 --- a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 diff --git a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/FileAppService_Tests.cs b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/FileAppService_Tests.cs index 0ffd90a5f1..76f52cd908 100644 --- a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/FileAppService_Tests.cs +++ b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/FileAppService_Tests.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Security.Claims; +using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; @@ -9,11 +10,12 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using NSubstitute; using Shouldly; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.PixelFormats; +using SkiaSharp; +using Volo.Abp; using Volo.Abp.Authorization; using Volo.Abp.BlobStoring; using Volo.Abp.Content; +using Volo.Abp.DependencyInjection; using Volo.Abp.Validation; using Volo.Blogging.Files; using Xunit; @@ -22,6 +24,9 @@ namespace Volo.Blogging { public class FileAppService_Tests : BloggingApplicationTestBase { + private const string GifImageBase64 = "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; + private const string BmpImageBase64 = "Qk06AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABgAAAAAAAQAAAATCwAAEwsAAAAAAAAAAAAA/wAAAA=="; + private readonly IFileAppService _fileAppService; private IBlobContainer _blobContainer; private FakeAuthorizationService _authorizationService; @@ -75,45 +80,155 @@ namespace Volo.Blogging { _authorizationService.GrantedPolicies.Add(permission); - var output = await _fileAppService.CreateAsync(CreateUploadInput()); + byte[] savedBytes = null; + _blobContainer + .When(x => x.SaveAsync(Arg.Any(), Arg.Any(), Arg.Any(), Arg.Any())) + .Do(callInfo => + { + using var memoryStream = new MemoryStream(); + callInfo.ArgAt(1).CopyTo(memoryStream); + savedBytes = memoryStream.ToArray(); + }); + + var imageBytes = CreateImage(SKEncodedImageFormat.Png); + var output = await _fileAppService.CreateAsync(CreateUploadInput(imageBytes)); output.Name.ShouldEndWith(".png"); output.WebUrl.ShouldBe("/api/blogging/files/www/" + output.Name); await _blobContainer.Received(1).SaveAsync(output.Name, Arg.Any(), Arg.Any(), Arg.Any()); + savedBytes.ShouldBe(imageBytes); } [Fact] - public async Task Should_Not_Upload_Image_Without_Permission() + public async Task Should_Restore_Stream_Position_Before_Saving() { - _authorizationService.GrantedPolicies.Add(BloggingPermissions.Posts.Delete); + _authorizationService.GrantedPolicies.Add(BloggingPermissions.Posts.Create); - await Should.ThrowAsync(() => _fileAppService.CreateAsync(CreateUploadInput())); + long? positionOnSave = null; + _blobContainer + .When(x => x.SaveAsync(Arg.Any(), Arg.Any(), Arg.Any(), Arg.Any())) + .Do(callInfo => positionOnSave = callInfo.ArgAt(1).Position); + + using var stream = new MemoryStream(); + stream.Write(new byte[16]); + stream.Write(CreateImage(SKEncodedImageFormat.Png)); + stream.Position = 16; + + await _fileAppService.CreateAsync(new FileUploadInputDto + { + Name = "my-image.png", + File = new RemoteStreamContent(stream, "my-image.png", "image/png") + }); + + positionOnSave.ShouldBe(16L); + } + + [Theory] + [InlineData(SKEncodedImageFormat.Jpeg)] + [InlineData(SKEncodedImageFormat.Png)] + public async Task Should_Upload_Allowed_Image_Formats(SKEncodedImageFormat format) + { + _authorizationService.GrantedPolicies.Add(BloggingPermissions.Posts.Create); + + await _fileAppService.CreateAsync(CreateUploadInput(CreateImage(format))); + + await _blobContainer.ReceivedWithAnyArgs(1).SaveAsync(default, default(Stream), default, default); + } + + [Theory] + [InlineData(SKEncodedImageFormat.Png, "my-image.html", ".png", "image/png")] + [InlineData(SKEncodedImageFormat.Jpeg, "my-image.png", ".jpg", "image/jpeg")] + [InlineData(SKEncodedImageFormat.Jpeg, "my-image", ".jpg", "image/jpeg")] + [InlineData(SKEncodedImageFormat.Gif, "my-image.png", ".gif", "image/gif")] + [InlineData(SKEncodedImageFormat.Bmp, "my-image.png", ".bmp", "image/bmp")] + [InlineData(SKEncodedImageFormat.Png, "my-image.png\\my-folder", ".png", "image/png")] + [InlineData(SKEncodedImageFormat.Png, "my-image./../my-folder", ".png", "image/png")] + public async Task Should_Save_Image_With_Extension_Of_Detected_Format(SKEncodedImageFormat format, string name, string expectedExtension, string expectedContentType) + { + _authorizationService.GrantedPolicies.Add(BloggingPermissions.Posts.Create); + + var savedBlobs = new Dictionary(); + _blobContainer + .When(x => x.SaveAsync(Arg.Any(), Arg.Any(), Arg.Any(), Arg.Any())) + .Do(callInfo => + { + using var memoryStream = new MemoryStream(); + callInfo.ArgAt(1).CopyTo(memoryStream); + savedBlobs[callInfo.ArgAt(0)] = memoryStream.ToArray(); + }); + _blobContainer.GetAsync(Arg.Any(), Arg.Any()) + .Returns(callInfo => new MemoryStream(savedBlobs[callInfo.ArgAt(0)])); + + var imageBytes = GetImageBytes(format); + var input = CreateUploadInput(imageBytes); + input.Name = name; + + var output = await _fileAppService.CreateAsync(input); + + output.Name.ShouldMatch("^[0-9a-f]{32}\\.[a-z]+$"); + Path.GetExtension(output.Name).ShouldBe(expectedExtension); + savedBlobs.Keys.ShouldBe(new[] { output.Name }); + + (await _fileAppService.GetAsync(output.Name)).Bytes.ShouldBe(imageBytes); + + var file = await _fileAppService.GetFileAsync(output.Name); + file.ContentType.ShouldBe(expectedContentType); + using var downloadedStream = new MemoryStream(); + await file.GetStream().CopyToAsync(downloadedStream); + downloadedStream.ToArray().ShouldBe(imageBytes); + } + + [Theory] + [InlineData(SKEncodedImageFormat.Webp, ".webp", "image/webp")] + [InlineData(SKEncodedImageFormat.Ico, ".ico", "application/octet-stream")] + public void Should_Get_Extension_And_Content_Type_Of_Other_Image_Formats(SKEncodedImageFormat format, string expectedExtension, string expectedContentType) + { + var fileAppService = new TestFileAppService(_blobContainer); + + fileAppService.GetExtensionForTest(format).ShouldBe(expectedExtension); + fileAppService.GetContentTypeForTest(expectedExtension).ShouldBe(expectedContentType); + } + + [Fact] + public async Task Should_Not_Upload_Image_With_Not_Allowed_Format() + { + _authorizationService.GrantedPolicies.Add(BloggingPermissions.Posts.Create); + + await Should.ThrowAsync(() => _fileAppService.CreateAsync(CreateUploadInput(CreateImage(SKEncodedImageFormat.Webp)))); await _blobContainer.DidNotReceiveWithAnyArgs().SaveAsync(default, default(Stream), default, default); } [Fact] - public async Task Should_Not_Upload_Image_With_Invalid_Name() + public async Task Should_Not_Upload_Non_Image_File() { _authorizationService.GrantedPolicies.Add(BloggingPermissions.Posts.Create); - var input = CreateUploadInput(); - input.Name = "my-image.png\\my-folder"; + var input = CreateUploadInput(Encoding.UTF8.GetBytes("This is not an image")); - await Should.ThrowAsync(() => _fileAppService.CreateAsync(input)); + await Should.ThrowAsync(() => _fileAppService.CreateAsync(input)); + + await _blobContainer.DidNotReceiveWithAnyArgs().SaveAsync(default, default(Stream), default, default); + } + + [Fact] + public async Task Should_Not_Upload_Image_Without_Permission() + { + _authorizationService.GrantedPolicies.Add(BloggingPermissions.Posts.Delete); + + await Should.ThrowAsync(() => _fileAppService.CreateAsync(CreateUploadInput())); await _blobContainer.DidNotReceiveWithAnyArgs().SaveAsync(default, default(Stream), default, default); } private static FileUploadInputDto CreateUploadInput() { - var stream = new MemoryStream(); - using (var image = new Image(1, 1)) - { - image.SaveAsPng(stream); - } + return CreateUploadInput(CreateImage(SKEncodedImageFormat.Png)); + } - stream.Position = 0; + private static FileUploadInputDto CreateUploadInput(byte[] content) + { + var stream = new MemoryStream(content); return new FileUploadInputDto { @@ -122,6 +237,48 @@ namespace Volo.Blogging }; } + private static byte[] CreateImage(SKEncodedImageFormat format) + { + using (var bitmap = new SKBitmap(1, 1)) + using (var image = SKImage.FromBitmap(bitmap)) + using (var data = image.Encode(format, 100)) + { + return data.ToArray(); + } + } + + private static byte[] GetImageBytes(SKEncodedImageFormat format) + { + switch (format) + { + case SKEncodedImageFormat.Gif: + return Convert.FromBase64String(GifImageBase64); + case SKEncodedImageFormat.Bmp: + return Convert.FromBase64String(BmpImageBase64); + default: + return CreateImage(format); + } + } + + [DisableConventionalRegistration] + private class TestFileAppService : FileAppService + { + public TestFileAppService(IBlobContainer blobContainer) + : base(blobContainer) + { + } + + public string GetExtensionForTest(SKEncodedImageFormat imageFormat) + { + return GetExtension(imageFormat); + } + + public string GetContentTypeForTest(string extension) + { + return GetContentType(extension); + } + } + private class FakeAuthorizationService : IAbpAuthorizationService { public HashSet GrantedPolicies { get; } = new HashSet(); diff --git a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/ImageFormatHelper_Tests.cs b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/ImageFormatHelper_Tests.cs new file mode 100644 index 0000000000..bb8b88b25c --- /dev/null +++ b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/ImageFormatHelper_Tests.cs @@ -0,0 +1,170 @@ +using System; +using System.IO; +using Shouldly; +using SkiaSharp; +using Volo.Blogging.Areas.Blog.Helpers; +using Volo.Blogging.Files; +using Xunit; + +namespace Volo.Blogging +{ + public class ImageFormatHelper_Tests + { + [Theory] + [InlineData(SKEncodedImageFormat.Png, true)] + [InlineData(SKEncodedImageFormat.Jpeg, true)] + [InlineData(SKEncodedImageFormat.Webp, false)] + public void Should_Check_Image_From_Current_Stream_Position(SKEncodedImageFormat format, bool expected) + { + var image = CreateImage(format); + using var stream = new MemoryStream(); + stream.Write(new byte[16]); + stream.Write(image); + stream.Position = 16; + + ImageFormatHelper.IsValidImage(stream, FileUploadConsts.AllowedImageUploadFormats).ShouldBe(expected); + + stream.CanRead.ShouldBeTrue(); + } + + [Theory] + [InlineData(SKEncodedImageFormat.Png, true)] + [InlineData(SKEncodedImageFormat.Jpeg, true)] + [InlineData(SKEncodedImageFormat.Webp, false)] + public void Should_Check_Image_From_Non_Seekable_Stream(SKEncodedImageFormat format, bool expected) + { + using var stream = new NonSeekableStream(CreateImage(format)); + + ImageFormatHelper.IsValidImage(stream, FileUploadConsts.AllowedImageUploadFormats).ShouldBe(expected); + + stream.CanRead.ShouldBeTrue(); + } + + [Theory] + [InlineData(SKEncodedImageFormat.Png, SKEncodedImageFormat.Png)] + [InlineData(SKEncodedImageFormat.Jpeg, SKEncodedImageFormat.Jpeg)] + [InlineData(SKEncodedImageFormat.Webp, null)] + public void Should_Get_Valid_Image_Format(SKEncodedImageFormat format, SKEncodedImageFormat? expected) + { + using var stream = new MemoryStream(CreateImage(format)); + + ImageFormatHelper.GetValidImageFormat(stream, FileUploadConsts.AllowedImageUploadFormats).ShouldBe(expected); + } + + [Fact] + public void Should_Return_Null_For_Non_Image_Content() + { + using var stream = new MemoryStream(new byte[] { 1, 2, 3, 4 }); + + ImageFormatHelper.GetImageRawFormat(stream).ShouldBeNull(); + } + + [Fact] + public void Should_Return_Null_For_Empty_Stream() + { + using var stream = new MemoryStream(); + + ImageFormatHelper.GetImageRawFormat(stream).ShouldBeNull(); + } + + [Fact] + public void Should_Not_Be_Valid_When_Reading_Stream_Fails() + { + using var stream = new NonSeekableStream(CreateImage(SKEncodedImageFormat.Png), new IOException()); + + ImageFormatHelper.IsValidImage(stream, FileUploadConsts.AllowedImageUploadFormats).ShouldBeFalse(); + + stream.CanRead.ShouldBeTrue(); + } + + [Theory] + [InlineData(typeof(DllNotFoundException))] + [InlineData(typeof(EntryPointNotFoundException))] + [InlineData(typeof(BadImageFormatException))] + [InlineData(typeof(TypeInitializationException))] + public void Should_Not_Hide_Native_Library_Loading_Errors(Type exceptionType) + { + var exception = exceptionType == typeof(TypeInitializationException) + ? new TypeInitializationException("SkiaSharp.SKObject", new DllNotFoundException()) + : (Exception)Activator.CreateInstance(exceptionType); + using var stream = new NonSeekableStream(CreateImage(SKEncodedImageFormat.Png), exception); + + Should.Throw(() => ImageFormatHelper.IsValidImage(stream, FileUploadConsts.AllowedImageUploadFormats), exceptionType); + } + + private static byte[] CreateImage(SKEncodedImageFormat format) + { + using (var bitmap = new SKBitmap(1, 1)) + using (var image = SKImage.FromBitmap(bitmap)) + using (var data = image.Encode(format, 100)) + { + return data.ToArray(); + } + } + + private class NonSeekableStream : Stream + { + private readonly MemoryStream _innerStream; + private readonly Exception _readException; + + public NonSeekableStream(byte[] content, Exception readException = null) + { + _innerStream = new MemoryStream(content); + _readException = readException; + } + + public override bool CanRead => _innerStream.CanRead; + + public override bool CanSeek => false; + + public override bool CanWrite => false; + + public override long Length => throw new NotSupportedException(); + + public override long Position + { + get => throw new NotSupportedException(); + set => throw new NotSupportedException(); + } + + public override int Read(byte[] buffer, int offset, int count) + { + if (_readException != null && _innerStream.Position > 0) + { + throw _readException; + } + + return _innerStream.Read(buffer, offset, Math.Min(count, 7)); + } + + public override void Flush() + { + } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + _innerStream.Dispose(); + } + + base.Dispose(disposing); + } + + public override long Seek(long offset, SeekOrigin origin) + { + throw new NotSupportedException(); + } + + public override void SetLength(long value) + { + throw new NotSupportedException(); + } + + public override void Write(byte[] buffer, int offset, int count) + { + throw new NotSupportedException(); + } + } + } +} diff --git a/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj b/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj index 328a041f64..1e920e86aa 100644 --- a/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 diff --git a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj index 27301c22ee..539a507e25 100644 --- a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 diff --git a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj index 54050e0f31..27704b8809 100644 --- a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 diff --git a/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj b/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj index f005bd6d19..5d480a0890 100644 --- a/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj +++ b/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj index 1f4384314e..ad40f514f1 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 true diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json index c15e8594f2..0716a3a278 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json @@ -3,6 +3,6 @@ "name": "client-simulation-web", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~10.7.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "~11.0.0-rc.1" } } diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock index 526a1653c0..4a2591480f 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock @@ -2,187 +2,180 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.7.0-rc.4.tgz#0f9eacc9bb9807553ca0465d24fccee5805db2fc" - integrity sha512-v2RabyrSXPN2H4eByd3mSxxjjutUvH5LnKVRuffFZ4kA7Em7ZhD9hfKeBxYY+OuWfwVhEeKX/Rvd6jyAhbVf6Q== +"@abp/aspnetcore.mvc.ui.theme.basic@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-11.0.0-rc.1.tgz#f3f6157708b225aaf93567e6cce031740af1e4cf" + integrity sha512-EyeC+rt1pbnRquE8DEsL9ZR/xrEQFwqLdactTifCrcjF9gSXwKhJ5GJKccEFscoLvoy/EdPnWtylGlcHOF7yFA== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~10.7.0-rc.4" + "@abp/aspnetcore.mvc.ui.theme.shared" "~11.0.0-rc.1" -"@abp/aspnetcore.mvc.ui.theme.shared@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.7.0-rc.4.tgz#353aaa338ab0841d042c4df2ce7af9913f5d8eed" - integrity sha512-CeVeaxH1D8FFtySSXvhrKBm2t9VVDdy+bbk51WFi54rQlicxFdQixYQogYTvs9e4/XaOvDpOC2T4SIVPbiC94Q== +"@abp/aspnetcore.mvc.ui.theme.shared@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-11.0.0-rc.1.tgz#77ac0fa4f15e2055981a8e78a986caf4d5b24717" + integrity sha512-fb44VGo5FnBGbgYl5n5HoXJmpv3YW3rIKTH8CJ0FemVc+DkxAcHxdUx5jb2YhWG2IXaCdKKzwxzr+0ksIbKAWA== dependencies: - "@abp/aspnetcore.mvc.ui" "~10.7.0-rc.4" - "@abp/bootstrap" "~10.7.0-rc.4" - "@abp/bootstrap-datepicker" "~10.7.0-rc.4" - "@abp/bootstrap-daterangepicker" "~10.7.0-rc.4" - "@abp/datatables.net-bs5" "~10.7.0-rc.4" - "@abp/font-awesome" "~10.7.0-rc.4" - "@abp/jquery-validation-unobtrusive" "~10.7.0-rc.4" - "@abp/lodash" "~10.7.0-rc.4" - "@abp/luxon" "~10.7.0-rc.4" - "@abp/malihu-custom-scrollbar-plugin" "~10.7.0-rc.4" - "@abp/moment" "~10.7.0-rc.4" - "@abp/select2" "~10.7.0-rc.4" - "@abp/sweetalert2" "~10.7.0-rc.4" - "@abp/timeago" "~10.7.0-rc.4" - -"@abp/aspnetcore.mvc.ui@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.7.0-rc.4.tgz#fb34369f924ce07866c731dec474d05bc7c1cc8e" - integrity sha512-JSz40zPIxcbkoYKZKvbTs32UfR7nbMoUe20g66tVHbN1Tn2fd2VMFD8elm4L03Tc+iZoLPXi5AsF9QD7zM7YJA== + "@abp/aspnetcore.mvc.ui" "~11.0.0-rc.1" + "@abp/bootstrap" "~11.0.0-rc.1" + "@abp/bootstrap-datepicker" "~11.0.0-rc.1" + "@abp/bootstrap-daterangepicker" "~11.0.0-rc.1" + "@abp/datatables.net-bs5" "~11.0.0-rc.1" + "@abp/font-awesome" "~11.0.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~11.0.0-rc.1" + "@abp/lodash" "~11.0.0-rc.1" + "@abp/luxon" "~11.0.0-rc.1" + "@abp/moment" "~11.0.0-rc.1" + "@abp/select2" "~11.0.0-rc.1" + "@abp/sweetalert2" "~11.0.0-rc.1" + "@abp/timeago" "~11.0.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-11.0.0-rc.1.tgz#45d83b3a3f16dbac155c0e9258a14cb26365acf4" + integrity sha512-VfVt8r13yOg/fp+DjUNsTmv56UWcDIySA9qdVfMgiIbiomwguKx0aaokqNf6yCRB7wA21TQHgLbrS71IpV9uWA== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.7.0-rc.4.tgz#9f2f9ba0590e01739d6ee68824e69eae275c7962" - integrity sha512-T5sIxswsQIwm20xfuymji5xud5GphO+c1hKQ6tYpPAtUhg1g8ABDY1pGBdWbxCJh3uOuhlF8grp9pT+xUy9i1w== +"@abp/bootstrap-datepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-11.0.0-rc.1.tgz#6fa5a9345db1a94d2466907c2a85341287ef77ba" + integrity sha512-E4GaKtllZ5L4uz0uPSaaHLIucpC6dw4kAqM+n+rLk4txoqUdAPs+vzjHnICgp/YnSWWhAmuOhYnWfny6TD3HXw== dependencies: - bootstrap-datepicker "^1.10.1" + bootstrap-datepicker "1.10.1" + jquery "~4.0.0" -"@abp/bootstrap-daterangepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.7.0-rc.4.tgz#0cc427a9320211bc2ae4383dc228747f03d8b132" - integrity sha512-p2qiX8FuplFS/8mUbnSVc2ZgoSpU6DkLL/4yuXIwA3rLhR9dcqyRxqpFzj8H5nQ1AKaEzddylFNzzhV0sCB8lw== +"@abp/bootstrap-daterangepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-11.0.0-rc.1.tgz#3c06aa2c6a4860a7a23874491d33a12393d907aa" + integrity sha512-uDj2Pc7ksZbLCfoJKixt3zbvA7jASvLd4ndqjkhgTsMrRXh4atgaFcvjCs0NKkCqGjyI5xJoGDTTc38HToWnLQ== dependencies: - "@abp/moment" "~10.7.0-rc.4" - bootstrap-daterangepicker "^3.1.0" + "@abp/moment" "~11.0.0-rc.1" + jquery "~4.0.0" + moment "^2.30.1" -"@abp/bootstrap@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.7.0-rc.4.tgz#1916f312c6b46b0d17591b514e12d1fd93bcaf2c" - integrity sha512-CqmKWa2McXnJj0U9NOraxTdJyadfm1lQnc0WisiSg6HllvMmE3KUf7GgpiM4nxQlQt9Z0/8hWPhq5cLiLLc8dA== +"@abp/bootstrap@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-11.0.0-rc.1.tgz#ac127a386437aa6a62b2e7188837a40f4f0dd036" + integrity sha512-lYhyk6qlt6QsJgb+HBccryB9g9Tw+/qLJ5bYmgsJyoBYGUt74jtdNVi6JDy+7O7+k4aRvvA3XDNOfnS1DbfNvg== dependencies: - "@abp/core" "~10.7.0-rc.4" - "@abp/popper.js" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" + "@abp/popper.js" "~11.0.0-rc.1" bootstrap "^5.3.8" -"@abp/core@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.7.0-rc.4.tgz#e1d8a7c378a807cde22cdf0f8b7ba21ec4e2d7cd" - integrity sha512-uZuJywMXK4W3YoQKZVbHLG4OekXhElnpJHOI78a1o2ESDz7bMP2Nfs8n8KSSXGz8b5yRCIlyf9/G7majYnjAcw== +"@abp/core@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-11.0.0-rc.1.tgz#5db5e442b9cd5dc0f654ffe858865b6dbcb7f61e" + integrity sha512-iw7qPkNpeMrjd0kVVVrVHuFzVlgbuvscZsEvLMT8YEhvUD0ABmGfTxChuuIcgV1R4hpXegvfsUDiVIKcY1YcVg== dependencies: - "@abp/utils" "~10.7.0-rc.4" + "@abp/utils" "~11.0.0-rc.1" -"@abp/datatables.net-bs5@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.7.0-rc.4.tgz#d87c26ab7604971d969ccda27c78795475af793a" - integrity sha512-SPlNc9zzzmDCENf6dQtpKAxXEIpHRaidZEDsx7MUcdcnGEI8xs0Wg3vXzNMhz65OhSoW2FYQKapdAa0uzB02Dg== +"@abp/datatables.net-bs5@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-11.0.0-rc.1.tgz#1d7e9471c68c0eb64e9476967670d69fa897b7f3" + integrity sha512-VsQBlEx+ga8/X10i29XMs9Mjj2W83hSPsYftgByq09NiwtUVfX6t7yiGf4wF9+rk7fiRt3XQ4sXi6G1Ji9nqyQ== dependencies: - "@abp/datatables.net" "~10.7.0-rc.4" + "@abp/datatables.net" "~11.0.0-rc.1" datatables.net-bs5 "^2.3.4" -"@abp/datatables.net@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.7.0-rc.4.tgz#d64f7fe7e3adea76b238fd3ff59cd63a4445b2fe" - integrity sha512-4JtMRiQAvLY+IOqofHE6tNRwjG4ONyiFikgoKmNPfnue7wXIIA6BUgdUAeABan4S0kSwHOttM7MHyZkQLjzTHw== +"@abp/datatables.net@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-11.0.0-rc.1.tgz#2402b8192d41e4cd435b4e212604c32013b7d142" + integrity sha512-fNpr2eo9ZUghWiESK5QouB8rZoNGFFE+c+6BwcqchTnc9wcGj0wz+UEYtWZFitpHniWV2RRcVSoMM8waKzSl7w== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" datatables.net "^2.3.4" -"@abp/font-awesome@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.7.0-rc.4.tgz#9ce20b82685facea8564965ab3ad07764b29eccc" - integrity sha512-oalR5fBPImD4q0yYPbscJ858sDo8kJhFgixpViPc3bbaN41M5JPBpVR+K3UXQYfO93a0mhLoVb20bRMggWyhQQ== +"@abp/font-awesome@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-11.0.0-rc.1.tgz#0accc6fb2168515688f5a36f8dd3d4d4236f533d" + integrity sha512-/u4oXQGjet8VE/L1SZDsNCK4q6D9m9B50Em+Mkp8F7W/F6uLnyXGcWNyuHR3DMqvjEOXUc1WHE/zJQx8gsAFDw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@fortawesome/fontawesome-free" "^7.0.1" -"@abp/jquery-validation-unobtrusive@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.7.0-rc.4.tgz#a8c7daa832d72780e9b601ba0c667fe58433a817" - integrity sha512-VCnTyd3nvafI3A4XHM8jWhBCJ+0B3N6H4LeVW5AK0wyvk38q78tWAqI0ZaYgz3ObTKMuCTa+gCbmq9B/zrkT3Q== +"@abp/jquery-validation-unobtrusive@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-11.0.0-rc.1.tgz#8bd71ad4f2882b02a12a8c36443361d23f62e386" + integrity sha512-FF2pBceeNP9cUA1mj5T/fYpG5nq1DvrSyL7iOwrtqixDV8R9jgpZFCA146K0UMiqkzdtH9WiFRwL6690QAmkEg== dependencies: - "@abp/jquery-validation" "~10.7.0-rc.4" - jquery-validation-unobtrusive "^4.0.0" + "@abp/jquery-validation" "~11.0.0-rc.1" + jquery-validation "^1.22.1" -"@abp/jquery-validation@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.7.0-rc.4.tgz#5309e6f4b9b61124855df83268b8b1b99bd91eb6" - integrity sha512-TtIQWMWzI8ucPWwI2Jx9wyXH0Tl3m2h4r98T+wFlQ3UlDUn3x1SfLxhDPH7IX1RYMaa/3go1HlL/JRgK5yeIxw== +"@abp/jquery-validation@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-11.0.0-rc.1.tgz#fcc4fd82904750de70bbfc3f28b165768de7f992" + integrity sha512-JOxpgQoRi6dx12si3ArXdc8ElS2yaHlKxpYz4lgBlUschJoljsx0z2hhZzopJMhSaXFABHWGQmH9ssjmZaerlQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" jquery-validation "^1.22.1" -"@abp/jquery@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.7.0-rc.4.tgz#4aa75a520186a74303a2de511c19115310c7e2a4" - integrity sha512-YcXWXpsCGMUxMWg1QakOWmTjFJLpN+/QxfVuCjNJiHZJrHN0Ea5CPDWnLMqM46RhgoUAxg22EWYRi83j7mlYdg== +"@abp/jquery@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-11.0.0-rc.1.tgz#7d6df2229760e5b2cfdc9aa7746b37a95a3e2001" + integrity sha512-87tkbkRp4xQ3ih9Ri1nxTxqmd424nAFT1WFpWld1Aq1GYUg64mgPMc3CrTxUa8yYfMZdSJbWBsT7gh0C+7XVjg== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" jquery "~4.0.0" jquery-migrate "~4.0.2" -"@abp/lodash@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.7.0-rc.4.tgz#77069cfb8a2d3496c03475a18ef6ef442b29de9e" - integrity sha512-g+C3bjjjpas4VZPAt2o1b+DLr31pCn7U61rpYGjT6BoI6rPmu8WX8yFImyRB8S2QJ7FQT/Dr3p6GxPNn2mAE4A== +"@abp/lodash@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-11.0.0-rc.1.tgz#5b77df8d96905024442040cd352db4bfb863c2f4" + integrity sha512-uEvbpUPogY0VLzyFDIeo2JdsUxs1imX4aDbm8Jj2BKrFf1kfQ3dQUFtzwfDE4y+9dYvxtHXZkYsV2VA/9qaRTA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" lodash "^4.18.1" -"@abp/luxon@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.7.0-rc.4.tgz#d5fab55855d88aec6d9fcc3eb27805b64ccb5942" - integrity sha512-IyihWt3NInSMmV+kFKbPPyxf9ajHNwEuLUk3VCfmHy01ef/GjFS4RaEJ2xd8U0OiuGm0ZnTi6yqjm1sOQ0quNQ== +"@abp/luxon@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-11.0.0-rc.1.tgz#b2b2feb15b5e2ebabfb4d84146611011b5bb300e" + integrity sha512-e2zaTkoKDxm/ZJUuBPoxCXWpQyeWjkZuCMEtXGKcgrtEaukkhP9chwHk1mwC5WIW7AardmQl8Ozoy1xypgcveA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" luxon "^3.7.2" -"@abp/malihu-custom-scrollbar-plugin@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.7.0-rc.4.tgz#33b67b4daa41e32680f392e66bcb147f7a8595d9" - integrity sha512-OXTlbuy+5R2xEfNnnphzPjvCNi5FD7FF7YBH3gnLnDG8RiNvcfma8KrLvha6YCzDmKB1AuLGMfrOrE0GuQvEBQ== - dependencies: - "@abp/core" "~10.7.0-rc.4" - malihu-custom-scrollbar-plugin "^3.1.5" - -"@abp/moment@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.7.0-rc.4.tgz#2f68b427e5b033719411958a9008400739b971d9" - integrity sha512-XwFRFpaOfGSwnXk/eUg2GigSLQ1OxqunmvawDSj0V5wc9xnqazNGiCOOUrUm/jpi/ozWCj7TgOWkQHM+xKHezA== +"@abp/moment@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-11.0.0-rc.1.tgz#5ffdbe14cd24f28b2f0209e9dfcb7e19794b5f78" + integrity sha512-KQqmquSme6N7nX/7omqiLh+yf0zDA5zJDdqWI12iqJGwifL9K8e/pW6EncDimX+4pwvGm7hzaBUR1j2l+lG0lg== dependencies: moment "^2.30.1" -"@abp/popper.js@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-10.7.0-rc.4.tgz#bc7a5375c1f2608c5c3ec2ea65df0e6e8aaadb29" - integrity sha512-kgoxInvffZfqvdmHHPVe39Tc/iQCvcl/RFNsAT+Ow6pGEB2A5CUABRHZn/5raP2pufYmfK3eAxtKS7M9kmv9YA== +"@abp/popper.js@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-11.0.0-rc.1.tgz#52744f487f9b302ce9ae9180970ccf47011b9461" + integrity sha512-b2nCsrhxxNzfnV7MpeRLcmUPDaPQkNIXVC0g0V1jyTx8NjU1MT09XHkwOQJxuNiUlnX8XZ+dqcq7HRdZYedu9w== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@popperjs/core" "^2.11.8" -"@abp/select2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.7.0-rc.4.tgz#233fa8ba11093726b8646d61c874edcc8e84b5ef" - integrity sha512-jxVBtqcMJROQ4wU9MmqwpQ4fRt/t5ZITieC7Fy0rfCwOmJB2ihkbNyjnLxhUsevmjurmw6yyUxv5N3WP3BmHHw== +"@abp/select2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-11.0.0-rc.1.tgz#4c4a5a7315e31755ca4d4e4b1d6738910e68bbbb" + integrity sha512-XfFbMdwl5iRM+5mGKTB3rCoH+isaFGBqbcP9e67IXOkhHsZie1fEGFBomTDwvVK48q9DQhSr8gsDyJKgD9B+JQ== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" select2 "4.0.13" -"@abp/sweetalert2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.7.0-rc.4.tgz#e745a1eb7a1beeaad4c1f5db7a4faf810cf22af4" - integrity sha512-uLy/1OiOTwGwCmgfwwXSqBtjozdbhmPLwUw9YbJKxojxX09VNjMWhzB4+6p1bf+JN+EPxI+HbSDCbXFDqQFA6w== +"@abp/sweetalert2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-11.0.0-rc.1.tgz#1a6b508ed85d78f4bb843532816428dab77354b4" + integrity sha512-c0sKYRb6aCzRB+e0jl61OEqdic2FZ3ODcHoqWVBfwmn9Gc17nGr/tTCGksU5UGY5uO2+ILhdUYHdxPU/wAVsPw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" sweetalert2 "^11.23.0" -"@abp/timeago@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.7.0-rc.4.tgz#165bd42c431c0e38c1f0b3423fb38dc469b74fdf" - integrity sha512-jgOXWL0S7PL2I30kUnIYEMCtrvUwj3xR38r2XzV5xW9OKwpHL+abzccb47ZGvqvETztdzRKFX7T8AzIZ/Cxqcw== +"@abp/timeago@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-11.0.0-rc.1.tgz#6093578ed4d00e8b18fcf36b1cf92e24c5a0830d" + integrity sha512-RpWkVGD4q2BcuG6T2cMjIQXWUdwHScVUAmJSXNknHuUrEXEe4GRSpIi0HxYjfrvCGTGkAwbRwXTE5/U6XbMuRQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" - timeago "^1.6.7" + "@abp/jquery" "~11.0.0-rc.1" + timeago.js "^4.0.2" -"@abp/utils@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.7.0-rc.4.tgz#36711ccca8b20fc0fce8a0d347645948ac32a35d" - integrity sha512-9S8bMSd/XPV4bjvcXEPTqJclcjRkcpeFEqUx8iQnZkhHjhuq5B7++RpCQ/j1mzX1lBzsvCliteqUKvjtUjOY1Q== +"@abp/utils@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-11.0.0-rc.1.tgz#91ca25e687b0d49195adf808029ba94978156c4a" + integrity sha512-WjujeW5j9Iqr5kR+8jF4lMk1E2FD9SMsOvivLOinQOE2tdipd7OlmPGX+8cwSXJXXhWJ7Y2TRqzlvn7BoZP0Yw== dependencies: just-compare "^2.3.0" @@ -201,21 +194,13 @@ ansi-colors@^4.1.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -bootstrap-datepicker@^1.10.1: +bootstrap-datepicker@1.10.1: version "1.10.1" resolved "https://registry.yarnpkg.com/bootstrap-datepicker/-/bootstrap-datepicker-1.10.1.tgz#0a8bec42957ea1ce1272b91bcf2b53696629fb86" integrity sha512-GIe+fsLp9Hi30oW7L2v2Q9/a4+aojrIA2p4ZagtLuKw2lpfQgjJjM0L6vl/lYQydGXWUbpoKbEC/O5tzWIkEKQ== dependencies: jquery ">=3.4.0 <4.0.0" -bootstrap-daterangepicker@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz#632e6fb2de4b6360c5c0a9d5f6adb9aace051fe8" - integrity sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g== - dependencies: - jquery ">=1.10" - moment "^2.9.0" - bootstrap@^5.3.8: version "5.3.8" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.8.tgz#6401a10057a22752d21f4e19055508980656aeed" @@ -241,35 +226,17 @@ jquery-migrate@~4.0.2: resolved "https://registry.yarnpkg.com/jquery-migrate/-/jquery-migrate-4.0.2.tgz#d296a64e05073017c54877462ac563f1927ee21f" integrity sha512-J15ilpECoAsObLv2robklj0qf1qt9QCnZwwNcJAXkM7dIiOgcac2dqC3HgDtUF0fmRwKZa/ggTkxTj9S4Vk+HQ== -jquery-mousewheel@>=3.0.6: - version "3.1.13" - resolved "https://registry.yarnpkg.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz#06f0335f16e353a695e7206bf50503cb523a6ee5" - integrity sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg== - -jquery-validation-unobtrusive@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.0.0.tgz#dfcf25a558496a2c883db6021d10f5398d15f99d" - integrity sha512-1ervYFFv6LX/rp7ktuLnMakHNG0piNRDyROI8Ir3hL1vPIwylAehB1AY3BPrYJnzW3WmwWryZq+Bz4sazZK9iQ== - dependencies: - jquery "^3.6.0" - jquery-validation ">=1.19" - -jquery-validation@>=1.19: - version "1.21.0" - resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.21.0.tgz#78fc05ab76020912a246af3661b3f54a438bca93" - integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w== - jquery-validation@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.22.1.tgz#fc1ae3256110332c929245a44d69ee76fee0e481" integrity sha512-ePLXLWK7Rh5eR652YsuIu7YPeGlCXrsJUteVw5iZopiU17yaMd3FaDggs6yyNMl56p8TYVeDRmKGK3fPZrMeQw== -jquery@>=1.10, "jquery@>=1.5.0 <4.0", jquery@>=1.7: +jquery@>=1.7: version "3.6.4" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.4.tgz#ba065c188142100be4833699852bf7c24dc0252f" integrity sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ== -"jquery@>=3.4.0 <4.0.0", jquery@^3.6.0: +"jquery@>=3.4.0 <4.0.0": version "3.7.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de" integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg== @@ -294,23 +261,11 @@ luxon@^3.7.2: resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.7.2.tgz#d697e48f478553cca187a0f8436aff468e3ba0ba" integrity sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew== -malihu-custom-scrollbar-plugin@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz#310cecc5e59415a1c29e9dfb5d2b6e01d66a29ef" - integrity sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ== - dependencies: - jquery-mousewheel ">=3.0.6" - moment@^2.30.1: version "2.30.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== -moment@^2.9.0: - version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" - integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== - select2@4.0.13: version "4.0.13" resolved "https://registry.yarnpkg.com/select2/-/select2-4.0.13.tgz#0dbe377df3f96167c4c1626033e924372d8ef44d" @@ -321,9 +276,7 @@ sweetalert2@^11.23.0: resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.26.3.tgz#6e8188cf71818af34d62fe33a2465690cde9836d" integrity sha512-VU0hGw/WfI9h7Mh+SCsDlWgtxDwWZ6ccqS7QcO8zEeWnwplN1GptcLstq76OluUBSLUza6ldvKd3558OhjpJ9A== -timeago@^1.6.7: - version "1.6.7" - resolved "https://registry.yarnpkg.com/timeago/-/timeago-1.6.7.tgz#afd467c29a911e697fc22a81888c7c3022783cb5" - integrity sha512-FikcjN98+ij0siKH4VO4dZ358PR3oDDq4Vdl1+sN9gWz1/+JXGr3uZbUShYH/hL7bMhcTpPbplJU5Tej4b4jbQ== - dependencies: - jquery ">=1.5.0 <4.0" +timeago.js@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/timeago.js/-/timeago.js-4.0.2.tgz#724e8c8833e3490676c7bb0a75f5daf20e558028" + integrity sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w== diff --git a/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj b/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj index df46962520..49606560f7 100644 --- a/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj +++ b/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.ClientSimulation.Web Volo.ClientSimulation.Web Library diff --git a/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj b/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj index a6b4cac2e9..0fb2323132 100644 --- a/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj +++ b/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.ClientSimulation Volo.ClientSimulation diff --git a/modules/cms-kit/database/Dockerfile b/modules/cms-kit/database/Dockerfile index 90dd7e6fa3..c168d5643d 100644 --- a/modules/cms-kit/database/Dockerfile +++ b/modules/cms-kit/database/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build COPY . . WORKDIR /templates/service/host/IdentityServerHost diff --git a/modules/cms-kit/host/Volo.CmsKit.Host.Shared/Volo.CmsKit.Host.Shared.csproj b/modules/cms-kit/host/Volo.CmsKit.Host.Shared/Volo.CmsKit.Host.Shared.csproj index 36533efbda..65bf4645c6 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Host.Shared/Volo.CmsKit.Host.Shared.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.Host.Shared/Volo.CmsKit.Host.Shared.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.CmsKit diff --git a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Dockerfile b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Dockerfile index 46cd1cb964..f9fc0a1592 100644 --- a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Dockerfile +++ b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:11.0 AS base WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build WORKDIR /src COPY . . WORKDIR /src/templates/service/host/Volo.CmsKit.HttpApi.Host diff --git a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Volo.CmsKit.HttpApi.Host.csproj b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Volo.CmsKit.HttpApi.Host.csproj index ac7a454008..08edbef84b 100644 --- a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Volo.CmsKit.HttpApi.Host.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Volo.CmsKit.HttpApi.Host.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.CmsKit true Volo.CmsKit-c2d31439-b723-48e2-b061-5ebd7aeb6010 @@ -15,6 +15,7 @@ + diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Dockerfile b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Dockerfile index 3b8e04be3d..02b0827a9c 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Dockerfile +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:11.0 AS base WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build WORKDIR /src COPY . . WORKDIR /src/templates/service/host/Volo.CmsKit.IdentityServer diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Volo.CmsKit.IdentityServer.csproj b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Volo.CmsKit.IdentityServer.csproj index 093c4ffc88..8f2e817470 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Volo.CmsKit.IdentityServer.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Volo.CmsKit.IdentityServer.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.CmsKit true Volo.CmsKit-c2d31439-b723-48e2-b061-5ebd7aeb6010 @@ -13,6 +13,7 @@ + diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json index 4f27623381..ba04680713 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.7.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "~11.0.0-rc.1" } } diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock index 526a1653c0..4a2591480f 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock @@ -2,187 +2,180 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.7.0-rc.4.tgz#0f9eacc9bb9807553ca0465d24fccee5805db2fc" - integrity sha512-v2RabyrSXPN2H4eByd3mSxxjjutUvH5LnKVRuffFZ4kA7Em7ZhD9hfKeBxYY+OuWfwVhEeKX/Rvd6jyAhbVf6Q== +"@abp/aspnetcore.mvc.ui.theme.basic@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-11.0.0-rc.1.tgz#f3f6157708b225aaf93567e6cce031740af1e4cf" + integrity sha512-EyeC+rt1pbnRquE8DEsL9ZR/xrEQFwqLdactTifCrcjF9gSXwKhJ5GJKccEFscoLvoy/EdPnWtylGlcHOF7yFA== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~10.7.0-rc.4" + "@abp/aspnetcore.mvc.ui.theme.shared" "~11.0.0-rc.1" -"@abp/aspnetcore.mvc.ui.theme.shared@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.7.0-rc.4.tgz#353aaa338ab0841d042c4df2ce7af9913f5d8eed" - integrity sha512-CeVeaxH1D8FFtySSXvhrKBm2t9VVDdy+bbk51WFi54rQlicxFdQixYQogYTvs9e4/XaOvDpOC2T4SIVPbiC94Q== +"@abp/aspnetcore.mvc.ui.theme.shared@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-11.0.0-rc.1.tgz#77ac0fa4f15e2055981a8e78a986caf4d5b24717" + integrity sha512-fb44VGo5FnBGbgYl5n5HoXJmpv3YW3rIKTH8CJ0FemVc+DkxAcHxdUx5jb2YhWG2IXaCdKKzwxzr+0ksIbKAWA== dependencies: - "@abp/aspnetcore.mvc.ui" "~10.7.0-rc.4" - "@abp/bootstrap" "~10.7.0-rc.4" - "@abp/bootstrap-datepicker" "~10.7.0-rc.4" - "@abp/bootstrap-daterangepicker" "~10.7.0-rc.4" - "@abp/datatables.net-bs5" "~10.7.0-rc.4" - "@abp/font-awesome" "~10.7.0-rc.4" - "@abp/jquery-validation-unobtrusive" "~10.7.0-rc.4" - "@abp/lodash" "~10.7.0-rc.4" - "@abp/luxon" "~10.7.0-rc.4" - "@abp/malihu-custom-scrollbar-plugin" "~10.7.0-rc.4" - "@abp/moment" "~10.7.0-rc.4" - "@abp/select2" "~10.7.0-rc.4" - "@abp/sweetalert2" "~10.7.0-rc.4" - "@abp/timeago" "~10.7.0-rc.4" - -"@abp/aspnetcore.mvc.ui@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.7.0-rc.4.tgz#fb34369f924ce07866c731dec474d05bc7c1cc8e" - integrity sha512-JSz40zPIxcbkoYKZKvbTs32UfR7nbMoUe20g66tVHbN1Tn2fd2VMFD8elm4L03Tc+iZoLPXi5AsF9QD7zM7YJA== + "@abp/aspnetcore.mvc.ui" "~11.0.0-rc.1" + "@abp/bootstrap" "~11.0.0-rc.1" + "@abp/bootstrap-datepicker" "~11.0.0-rc.1" + "@abp/bootstrap-daterangepicker" "~11.0.0-rc.1" + "@abp/datatables.net-bs5" "~11.0.0-rc.1" + "@abp/font-awesome" "~11.0.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~11.0.0-rc.1" + "@abp/lodash" "~11.0.0-rc.1" + "@abp/luxon" "~11.0.0-rc.1" + "@abp/moment" "~11.0.0-rc.1" + "@abp/select2" "~11.0.0-rc.1" + "@abp/sweetalert2" "~11.0.0-rc.1" + "@abp/timeago" "~11.0.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-11.0.0-rc.1.tgz#45d83b3a3f16dbac155c0e9258a14cb26365acf4" + integrity sha512-VfVt8r13yOg/fp+DjUNsTmv56UWcDIySA9qdVfMgiIbiomwguKx0aaokqNf6yCRB7wA21TQHgLbrS71IpV9uWA== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.7.0-rc.4.tgz#9f2f9ba0590e01739d6ee68824e69eae275c7962" - integrity sha512-T5sIxswsQIwm20xfuymji5xud5GphO+c1hKQ6tYpPAtUhg1g8ABDY1pGBdWbxCJh3uOuhlF8grp9pT+xUy9i1w== +"@abp/bootstrap-datepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-11.0.0-rc.1.tgz#6fa5a9345db1a94d2466907c2a85341287ef77ba" + integrity sha512-E4GaKtllZ5L4uz0uPSaaHLIucpC6dw4kAqM+n+rLk4txoqUdAPs+vzjHnICgp/YnSWWhAmuOhYnWfny6TD3HXw== dependencies: - bootstrap-datepicker "^1.10.1" + bootstrap-datepicker "1.10.1" + jquery "~4.0.0" -"@abp/bootstrap-daterangepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.7.0-rc.4.tgz#0cc427a9320211bc2ae4383dc228747f03d8b132" - integrity sha512-p2qiX8FuplFS/8mUbnSVc2ZgoSpU6DkLL/4yuXIwA3rLhR9dcqyRxqpFzj8H5nQ1AKaEzddylFNzzhV0sCB8lw== +"@abp/bootstrap-daterangepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-11.0.0-rc.1.tgz#3c06aa2c6a4860a7a23874491d33a12393d907aa" + integrity sha512-uDj2Pc7ksZbLCfoJKixt3zbvA7jASvLd4ndqjkhgTsMrRXh4atgaFcvjCs0NKkCqGjyI5xJoGDTTc38HToWnLQ== dependencies: - "@abp/moment" "~10.7.0-rc.4" - bootstrap-daterangepicker "^3.1.0" + "@abp/moment" "~11.0.0-rc.1" + jquery "~4.0.0" + moment "^2.30.1" -"@abp/bootstrap@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.7.0-rc.4.tgz#1916f312c6b46b0d17591b514e12d1fd93bcaf2c" - integrity sha512-CqmKWa2McXnJj0U9NOraxTdJyadfm1lQnc0WisiSg6HllvMmE3KUf7GgpiM4nxQlQt9Z0/8hWPhq5cLiLLc8dA== +"@abp/bootstrap@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-11.0.0-rc.1.tgz#ac127a386437aa6a62b2e7188837a40f4f0dd036" + integrity sha512-lYhyk6qlt6QsJgb+HBccryB9g9Tw+/qLJ5bYmgsJyoBYGUt74jtdNVi6JDy+7O7+k4aRvvA3XDNOfnS1DbfNvg== dependencies: - "@abp/core" "~10.7.0-rc.4" - "@abp/popper.js" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" + "@abp/popper.js" "~11.0.0-rc.1" bootstrap "^5.3.8" -"@abp/core@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.7.0-rc.4.tgz#e1d8a7c378a807cde22cdf0f8b7ba21ec4e2d7cd" - integrity sha512-uZuJywMXK4W3YoQKZVbHLG4OekXhElnpJHOI78a1o2ESDz7bMP2Nfs8n8KSSXGz8b5yRCIlyf9/G7majYnjAcw== +"@abp/core@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-11.0.0-rc.1.tgz#5db5e442b9cd5dc0f654ffe858865b6dbcb7f61e" + integrity sha512-iw7qPkNpeMrjd0kVVVrVHuFzVlgbuvscZsEvLMT8YEhvUD0ABmGfTxChuuIcgV1R4hpXegvfsUDiVIKcY1YcVg== dependencies: - "@abp/utils" "~10.7.0-rc.4" + "@abp/utils" "~11.0.0-rc.1" -"@abp/datatables.net-bs5@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.7.0-rc.4.tgz#d87c26ab7604971d969ccda27c78795475af793a" - integrity sha512-SPlNc9zzzmDCENf6dQtpKAxXEIpHRaidZEDsx7MUcdcnGEI8xs0Wg3vXzNMhz65OhSoW2FYQKapdAa0uzB02Dg== +"@abp/datatables.net-bs5@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-11.0.0-rc.1.tgz#1d7e9471c68c0eb64e9476967670d69fa897b7f3" + integrity sha512-VsQBlEx+ga8/X10i29XMs9Mjj2W83hSPsYftgByq09NiwtUVfX6t7yiGf4wF9+rk7fiRt3XQ4sXi6G1Ji9nqyQ== dependencies: - "@abp/datatables.net" "~10.7.0-rc.4" + "@abp/datatables.net" "~11.0.0-rc.1" datatables.net-bs5 "^2.3.4" -"@abp/datatables.net@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.7.0-rc.4.tgz#d64f7fe7e3adea76b238fd3ff59cd63a4445b2fe" - integrity sha512-4JtMRiQAvLY+IOqofHE6tNRwjG4ONyiFikgoKmNPfnue7wXIIA6BUgdUAeABan4S0kSwHOttM7MHyZkQLjzTHw== +"@abp/datatables.net@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-11.0.0-rc.1.tgz#2402b8192d41e4cd435b4e212604c32013b7d142" + integrity sha512-fNpr2eo9ZUghWiESK5QouB8rZoNGFFE+c+6BwcqchTnc9wcGj0wz+UEYtWZFitpHniWV2RRcVSoMM8waKzSl7w== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" datatables.net "^2.3.4" -"@abp/font-awesome@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.7.0-rc.4.tgz#9ce20b82685facea8564965ab3ad07764b29eccc" - integrity sha512-oalR5fBPImD4q0yYPbscJ858sDo8kJhFgixpViPc3bbaN41M5JPBpVR+K3UXQYfO93a0mhLoVb20bRMggWyhQQ== +"@abp/font-awesome@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-11.0.0-rc.1.tgz#0accc6fb2168515688f5a36f8dd3d4d4236f533d" + integrity sha512-/u4oXQGjet8VE/L1SZDsNCK4q6D9m9B50Em+Mkp8F7W/F6uLnyXGcWNyuHR3DMqvjEOXUc1WHE/zJQx8gsAFDw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@fortawesome/fontawesome-free" "^7.0.1" -"@abp/jquery-validation-unobtrusive@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.7.0-rc.4.tgz#a8c7daa832d72780e9b601ba0c667fe58433a817" - integrity sha512-VCnTyd3nvafI3A4XHM8jWhBCJ+0B3N6H4LeVW5AK0wyvk38q78tWAqI0ZaYgz3ObTKMuCTa+gCbmq9B/zrkT3Q== +"@abp/jquery-validation-unobtrusive@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-11.0.0-rc.1.tgz#8bd71ad4f2882b02a12a8c36443361d23f62e386" + integrity sha512-FF2pBceeNP9cUA1mj5T/fYpG5nq1DvrSyL7iOwrtqixDV8R9jgpZFCA146K0UMiqkzdtH9WiFRwL6690QAmkEg== dependencies: - "@abp/jquery-validation" "~10.7.0-rc.4" - jquery-validation-unobtrusive "^4.0.0" + "@abp/jquery-validation" "~11.0.0-rc.1" + jquery-validation "^1.22.1" -"@abp/jquery-validation@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.7.0-rc.4.tgz#5309e6f4b9b61124855df83268b8b1b99bd91eb6" - integrity sha512-TtIQWMWzI8ucPWwI2Jx9wyXH0Tl3m2h4r98T+wFlQ3UlDUn3x1SfLxhDPH7IX1RYMaa/3go1HlL/JRgK5yeIxw== +"@abp/jquery-validation@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-11.0.0-rc.1.tgz#fcc4fd82904750de70bbfc3f28b165768de7f992" + integrity sha512-JOxpgQoRi6dx12si3ArXdc8ElS2yaHlKxpYz4lgBlUschJoljsx0z2hhZzopJMhSaXFABHWGQmH9ssjmZaerlQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" jquery-validation "^1.22.1" -"@abp/jquery@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.7.0-rc.4.tgz#4aa75a520186a74303a2de511c19115310c7e2a4" - integrity sha512-YcXWXpsCGMUxMWg1QakOWmTjFJLpN+/QxfVuCjNJiHZJrHN0Ea5CPDWnLMqM46RhgoUAxg22EWYRi83j7mlYdg== +"@abp/jquery@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-11.0.0-rc.1.tgz#7d6df2229760e5b2cfdc9aa7746b37a95a3e2001" + integrity sha512-87tkbkRp4xQ3ih9Ri1nxTxqmd424nAFT1WFpWld1Aq1GYUg64mgPMc3CrTxUa8yYfMZdSJbWBsT7gh0C+7XVjg== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" jquery "~4.0.0" jquery-migrate "~4.0.2" -"@abp/lodash@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.7.0-rc.4.tgz#77069cfb8a2d3496c03475a18ef6ef442b29de9e" - integrity sha512-g+C3bjjjpas4VZPAt2o1b+DLr31pCn7U61rpYGjT6BoI6rPmu8WX8yFImyRB8S2QJ7FQT/Dr3p6GxPNn2mAE4A== +"@abp/lodash@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-11.0.0-rc.1.tgz#5b77df8d96905024442040cd352db4bfb863c2f4" + integrity sha512-uEvbpUPogY0VLzyFDIeo2JdsUxs1imX4aDbm8Jj2BKrFf1kfQ3dQUFtzwfDE4y+9dYvxtHXZkYsV2VA/9qaRTA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" lodash "^4.18.1" -"@abp/luxon@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.7.0-rc.4.tgz#d5fab55855d88aec6d9fcc3eb27805b64ccb5942" - integrity sha512-IyihWt3NInSMmV+kFKbPPyxf9ajHNwEuLUk3VCfmHy01ef/GjFS4RaEJ2xd8U0OiuGm0ZnTi6yqjm1sOQ0quNQ== +"@abp/luxon@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-11.0.0-rc.1.tgz#b2b2feb15b5e2ebabfb4d84146611011b5bb300e" + integrity sha512-e2zaTkoKDxm/ZJUuBPoxCXWpQyeWjkZuCMEtXGKcgrtEaukkhP9chwHk1mwC5WIW7AardmQl8Ozoy1xypgcveA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" luxon "^3.7.2" -"@abp/malihu-custom-scrollbar-plugin@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.7.0-rc.4.tgz#33b67b4daa41e32680f392e66bcb147f7a8595d9" - integrity sha512-OXTlbuy+5R2xEfNnnphzPjvCNi5FD7FF7YBH3gnLnDG8RiNvcfma8KrLvha6YCzDmKB1AuLGMfrOrE0GuQvEBQ== - dependencies: - "@abp/core" "~10.7.0-rc.4" - malihu-custom-scrollbar-plugin "^3.1.5" - -"@abp/moment@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.7.0-rc.4.tgz#2f68b427e5b033719411958a9008400739b971d9" - integrity sha512-XwFRFpaOfGSwnXk/eUg2GigSLQ1OxqunmvawDSj0V5wc9xnqazNGiCOOUrUm/jpi/ozWCj7TgOWkQHM+xKHezA== +"@abp/moment@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-11.0.0-rc.1.tgz#5ffdbe14cd24f28b2f0209e9dfcb7e19794b5f78" + integrity sha512-KQqmquSme6N7nX/7omqiLh+yf0zDA5zJDdqWI12iqJGwifL9K8e/pW6EncDimX+4pwvGm7hzaBUR1j2l+lG0lg== dependencies: moment "^2.30.1" -"@abp/popper.js@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-10.7.0-rc.4.tgz#bc7a5375c1f2608c5c3ec2ea65df0e6e8aaadb29" - integrity sha512-kgoxInvffZfqvdmHHPVe39Tc/iQCvcl/RFNsAT+Ow6pGEB2A5CUABRHZn/5raP2pufYmfK3eAxtKS7M9kmv9YA== +"@abp/popper.js@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-11.0.0-rc.1.tgz#52744f487f9b302ce9ae9180970ccf47011b9461" + integrity sha512-b2nCsrhxxNzfnV7MpeRLcmUPDaPQkNIXVC0g0V1jyTx8NjU1MT09XHkwOQJxuNiUlnX8XZ+dqcq7HRdZYedu9w== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@popperjs/core" "^2.11.8" -"@abp/select2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.7.0-rc.4.tgz#233fa8ba11093726b8646d61c874edcc8e84b5ef" - integrity sha512-jxVBtqcMJROQ4wU9MmqwpQ4fRt/t5ZITieC7Fy0rfCwOmJB2ihkbNyjnLxhUsevmjurmw6yyUxv5N3WP3BmHHw== +"@abp/select2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-11.0.0-rc.1.tgz#4c4a5a7315e31755ca4d4e4b1d6738910e68bbbb" + integrity sha512-XfFbMdwl5iRM+5mGKTB3rCoH+isaFGBqbcP9e67IXOkhHsZie1fEGFBomTDwvVK48q9DQhSr8gsDyJKgD9B+JQ== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" select2 "4.0.13" -"@abp/sweetalert2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.7.0-rc.4.tgz#e745a1eb7a1beeaad4c1f5db7a4faf810cf22af4" - integrity sha512-uLy/1OiOTwGwCmgfwwXSqBtjozdbhmPLwUw9YbJKxojxX09VNjMWhzB4+6p1bf+JN+EPxI+HbSDCbXFDqQFA6w== +"@abp/sweetalert2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-11.0.0-rc.1.tgz#1a6b508ed85d78f4bb843532816428dab77354b4" + integrity sha512-c0sKYRb6aCzRB+e0jl61OEqdic2FZ3ODcHoqWVBfwmn9Gc17nGr/tTCGksU5UGY5uO2+ILhdUYHdxPU/wAVsPw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" sweetalert2 "^11.23.0" -"@abp/timeago@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.7.0-rc.4.tgz#165bd42c431c0e38c1f0b3423fb38dc469b74fdf" - integrity sha512-jgOXWL0S7PL2I30kUnIYEMCtrvUwj3xR38r2XzV5xW9OKwpHL+abzccb47ZGvqvETztdzRKFX7T8AzIZ/Cxqcw== +"@abp/timeago@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-11.0.0-rc.1.tgz#6093578ed4d00e8b18fcf36b1cf92e24c5a0830d" + integrity sha512-RpWkVGD4q2BcuG6T2cMjIQXWUdwHScVUAmJSXNknHuUrEXEe4GRSpIi0HxYjfrvCGTGkAwbRwXTE5/U6XbMuRQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" - timeago "^1.6.7" + "@abp/jquery" "~11.0.0-rc.1" + timeago.js "^4.0.2" -"@abp/utils@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.7.0-rc.4.tgz#36711ccca8b20fc0fce8a0d347645948ac32a35d" - integrity sha512-9S8bMSd/XPV4bjvcXEPTqJclcjRkcpeFEqUx8iQnZkhHjhuq5B7++RpCQ/j1mzX1lBzsvCliteqUKvjtUjOY1Q== +"@abp/utils@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-11.0.0-rc.1.tgz#91ca25e687b0d49195adf808029ba94978156c4a" + integrity sha512-WjujeW5j9Iqr5kR+8jF4lMk1E2FD9SMsOvivLOinQOE2tdipd7OlmPGX+8cwSXJXXhWJ7Y2TRqzlvn7BoZP0Yw== dependencies: just-compare "^2.3.0" @@ -201,21 +194,13 @@ ansi-colors@^4.1.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -bootstrap-datepicker@^1.10.1: +bootstrap-datepicker@1.10.1: version "1.10.1" resolved "https://registry.yarnpkg.com/bootstrap-datepicker/-/bootstrap-datepicker-1.10.1.tgz#0a8bec42957ea1ce1272b91bcf2b53696629fb86" integrity sha512-GIe+fsLp9Hi30oW7L2v2Q9/a4+aojrIA2p4ZagtLuKw2lpfQgjJjM0L6vl/lYQydGXWUbpoKbEC/O5tzWIkEKQ== dependencies: jquery ">=3.4.0 <4.0.0" -bootstrap-daterangepicker@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz#632e6fb2de4b6360c5c0a9d5f6adb9aace051fe8" - integrity sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g== - dependencies: - jquery ">=1.10" - moment "^2.9.0" - bootstrap@^5.3.8: version "5.3.8" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.8.tgz#6401a10057a22752d21f4e19055508980656aeed" @@ -241,35 +226,17 @@ jquery-migrate@~4.0.2: resolved "https://registry.yarnpkg.com/jquery-migrate/-/jquery-migrate-4.0.2.tgz#d296a64e05073017c54877462ac563f1927ee21f" integrity sha512-J15ilpECoAsObLv2robklj0qf1qt9QCnZwwNcJAXkM7dIiOgcac2dqC3HgDtUF0fmRwKZa/ggTkxTj9S4Vk+HQ== -jquery-mousewheel@>=3.0.6: - version "3.1.13" - resolved "https://registry.yarnpkg.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz#06f0335f16e353a695e7206bf50503cb523a6ee5" - integrity sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg== - -jquery-validation-unobtrusive@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.0.0.tgz#dfcf25a558496a2c883db6021d10f5398d15f99d" - integrity sha512-1ervYFFv6LX/rp7ktuLnMakHNG0piNRDyROI8Ir3hL1vPIwylAehB1AY3BPrYJnzW3WmwWryZq+Bz4sazZK9iQ== - dependencies: - jquery "^3.6.0" - jquery-validation ">=1.19" - -jquery-validation@>=1.19: - version "1.21.0" - resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.21.0.tgz#78fc05ab76020912a246af3661b3f54a438bca93" - integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w== - jquery-validation@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.22.1.tgz#fc1ae3256110332c929245a44d69ee76fee0e481" integrity sha512-ePLXLWK7Rh5eR652YsuIu7YPeGlCXrsJUteVw5iZopiU17yaMd3FaDggs6yyNMl56p8TYVeDRmKGK3fPZrMeQw== -jquery@>=1.10, "jquery@>=1.5.0 <4.0", jquery@>=1.7: +jquery@>=1.7: version "3.6.4" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.4.tgz#ba065c188142100be4833699852bf7c24dc0252f" integrity sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ== -"jquery@>=3.4.0 <4.0.0", jquery@^3.6.0: +"jquery@>=3.4.0 <4.0.0": version "3.7.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de" integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg== @@ -294,23 +261,11 @@ luxon@^3.7.2: resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.7.2.tgz#d697e48f478553cca187a0f8436aff468e3ba0ba" integrity sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew== -malihu-custom-scrollbar-plugin@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz#310cecc5e59415a1c29e9dfb5d2b6e01d66a29ef" - integrity sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ== - dependencies: - jquery-mousewheel ">=3.0.6" - moment@^2.30.1: version "2.30.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== -moment@^2.9.0: - version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" - integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== - select2@4.0.13: version "4.0.13" resolved "https://registry.yarnpkg.com/select2/-/select2-4.0.13.tgz#0dbe377df3f96167c4c1626033e924372d8ef44d" @@ -321,9 +276,7 @@ sweetalert2@^11.23.0: resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.26.3.tgz#6e8188cf71818af34d62fe33a2465690cde9836d" integrity sha512-VU0hGw/WfI9h7Mh+SCsDlWgtxDwWZ6ccqS7QcO8zEeWnwplN1GptcLstq76OluUBSLUza6ldvKd3558OhjpJ9A== -timeago@^1.6.7: - version "1.6.7" - resolved "https://registry.yarnpkg.com/timeago/-/timeago-1.6.7.tgz#afd467c29a911e697fc22a81888c7c3022783cb5" - integrity sha512-FikcjN98+ij0siKH4VO4dZ358PR3oDDq4Vdl1+sN9gWz1/+JXGr3uZbUShYH/hL7bMhcTpPbplJU5Tej4b4jbQ== - dependencies: - jquery ">=1.5.0 <4.0" +timeago.js@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/timeago.js/-/timeago.js-4.0.2.tgz#724e8c8833e3490676c7bb0a75f5daf20e558028" + integrity sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w== diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/Volo.CmsKit.Web.Host.csproj b/modules/cms-kit/host/Volo.CmsKit.Web.Host/Volo.CmsKit.Web.Host.csproj index 2f20551c2d..4315452b1e 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/Volo.CmsKit.Web.Host.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/Volo.CmsKit.Web.Host.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.CmsKit true Volo.CmsKit-c2d31439-b723-48e2-b061-5ebd7aeb6010 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 eb8ae933ec..c8226829c5 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.7.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "~11.0.0-rc.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 526a1653c0..4a2591480f 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock @@ -2,187 +2,180 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.7.0-rc.4.tgz#0f9eacc9bb9807553ca0465d24fccee5805db2fc" - integrity sha512-v2RabyrSXPN2H4eByd3mSxxjjutUvH5LnKVRuffFZ4kA7Em7ZhD9hfKeBxYY+OuWfwVhEeKX/Rvd6jyAhbVf6Q== +"@abp/aspnetcore.mvc.ui.theme.basic@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-11.0.0-rc.1.tgz#f3f6157708b225aaf93567e6cce031740af1e4cf" + integrity sha512-EyeC+rt1pbnRquE8DEsL9ZR/xrEQFwqLdactTifCrcjF9gSXwKhJ5GJKccEFscoLvoy/EdPnWtylGlcHOF7yFA== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~10.7.0-rc.4" + "@abp/aspnetcore.mvc.ui.theme.shared" "~11.0.0-rc.1" -"@abp/aspnetcore.mvc.ui.theme.shared@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.7.0-rc.4.tgz#353aaa338ab0841d042c4df2ce7af9913f5d8eed" - integrity sha512-CeVeaxH1D8FFtySSXvhrKBm2t9VVDdy+bbk51WFi54rQlicxFdQixYQogYTvs9e4/XaOvDpOC2T4SIVPbiC94Q== +"@abp/aspnetcore.mvc.ui.theme.shared@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-11.0.0-rc.1.tgz#77ac0fa4f15e2055981a8e78a986caf4d5b24717" + integrity sha512-fb44VGo5FnBGbgYl5n5HoXJmpv3YW3rIKTH8CJ0FemVc+DkxAcHxdUx5jb2YhWG2IXaCdKKzwxzr+0ksIbKAWA== dependencies: - "@abp/aspnetcore.mvc.ui" "~10.7.0-rc.4" - "@abp/bootstrap" "~10.7.0-rc.4" - "@abp/bootstrap-datepicker" "~10.7.0-rc.4" - "@abp/bootstrap-daterangepicker" "~10.7.0-rc.4" - "@abp/datatables.net-bs5" "~10.7.0-rc.4" - "@abp/font-awesome" "~10.7.0-rc.4" - "@abp/jquery-validation-unobtrusive" "~10.7.0-rc.4" - "@abp/lodash" "~10.7.0-rc.4" - "@abp/luxon" "~10.7.0-rc.4" - "@abp/malihu-custom-scrollbar-plugin" "~10.7.0-rc.4" - "@abp/moment" "~10.7.0-rc.4" - "@abp/select2" "~10.7.0-rc.4" - "@abp/sweetalert2" "~10.7.0-rc.4" - "@abp/timeago" "~10.7.0-rc.4" - -"@abp/aspnetcore.mvc.ui@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.7.0-rc.4.tgz#fb34369f924ce07866c731dec474d05bc7c1cc8e" - integrity sha512-JSz40zPIxcbkoYKZKvbTs32UfR7nbMoUe20g66tVHbN1Tn2fd2VMFD8elm4L03Tc+iZoLPXi5AsF9QD7zM7YJA== + "@abp/aspnetcore.mvc.ui" "~11.0.0-rc.1" + "@abp/bootstrap" "~11.0.0-rc.1" + "@abp/bootstrap-datepicker" "~11.0.0-rc.1" + "@abp/bootstrap-daterangepicker" "~11.0.0-rc.1" + "@abp/datatables.net-bs5" "~11.0.0-rc.1" + "@abp/font-awesome" "~11.0.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~11.0.0-rc.1" + "@abp/lodash" "~11.0.0-rc.1" + "@abp/luxon" "~11.0.0-rc.1" + "@abp/moment" "~11.0.0-rc.1" + "@abp/select2" "~11.0.0-rc.1" + "@abp/sweetalert2" "~11.0.0-rc.1" + "@abp/timeago" "~11.0.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-11.0.0-rc.1.tgz#45d83b3a3f16dbac155c0e9258a14cb26365acf4" + integrity sha512-VfVt8r13yOg/fp+DjUNsTmv56UWcDIySA9qdVfMgiIbiomwguKx0aaokqNf6yCRB7wA21TQHgLbrS71IpV9uWA== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.7.0-rc.4.tgz#9f2f9ba0590e01739d6ee68824e69eae275c7962" - integrity sha512-T5sIxswsQIwm20xfuymji5xud5GphO+c1hKQ6tYpPAtUhg1g8ABDY1pGBdWbxCJh3uOuhlF8grp9pT+xUy9i1w== +"@abp/bootstrap-datepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-11.0.0-rc.1.tgz#6fa5a9345db1a94d2466907c2a85341287ef77ba" + integrity sha512-E4GaKtllZ5L4uz0uPSaaHLIucpC6dw4kAqM+n+rLk4txoqUdAPs+vzjHnICgp/YnSWWhAmuOhYnWfny6TD3HXw== dependencies: - bootstrap-datepicker "^1.10.1" + bootstrap-datepicker "1.10.1" + jquery "~4.0.0" -"@abp/bootstrap-daterangepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.7.0-rc.4.tgz#0cc427a9320211bc2ae4383dc228747f03d8b132" - integrity sha512-p2qiX8FuplFS/8mUbnSVc2ZgoSpU6DkLL/4yuXIwA3rLhR9dcqyRxqpFzj8H5nQ1AKaEzddylFNzzhV0sCB8lw== +"@abp/bootstrap-daterangepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-11.0.0-rc.1.tgz#3c06aa2c6a4860a7a23874491d33a12393d907aa" + integrity sha512-uDj2Pc7ksZbLCfoJKixt3zbvA7jASvLd4ndqjkhgTsMrRXh4atgaFcvjCs0NKkCqGjyI5xJoGDTTc38HToWnLQ== dependencies: - "@abp/moment" "~10.7.0-rc.4" - bootstrap-daterangepicker "^3.1.0" + "@abp/moment" "~11.0.0-rc.1" + jquery "~4.0.0" + moment "^2.30.1" -"@abp/bootstrap@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.7.0-rc.4.tgz#1916f312c6b46b0d17591b514e12d1fd93bcaf2c" - integrity sha512-CqmKWa2McXnJj0U9NOraxTdJyadfm1lQnc0WisiSg6HllvMmE3KUf7GgpiM4nxQlQt9Z0/8hWPhq5cLiLLc8dA== +"@abp/bootstrap@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-11.0.0-rc.1.tgz#ac127a386437aa6a62b2e7188837a40f4f0dd036" + integrity sha512-lYhyk6qlt6QsJgb+HBccryB9g9Tw+/qLJ5bYmgsJyoBYGUt74jtdNVi6JDy+7O7+k4aRvvA3XDNOfnS1DbfNvg== dependencies: - "@abp/core" "~10.7.0-rc.4" - "@abp/popper.js" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" + "@abp/popper.js" "~11.0.0-rc.1" bootstrap "^5.3.8" -"@abp/core@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.7.0-rc.4.tgz#e1d8a7c378a807cde22cdf0f8b7ba21ec4e2d7cd" - integrity sha512-uZuJywMXK4W3YoQKZVbHLG4OekXhElnpJHOI78a1o2ESDz7bMP2Nfs8n8KSSXGz8b5yRCIlyf9/G7majYnjAcw== +"@abp/core@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-11.0.0-rc.1.tgz#5db5e442b9cd5dc0f654ffe858865b6dbcb7f61e" + integrity sha512-iw7qPkNpeMrjd0kVVVrVHuFzVlgbuvscZsEvLMT8YEhvUD0ABmGfTxChuuIcgV1R4hpXegvfsUDiVIKcY1YcVg== dependencies: - "@abp/utils" "~10.7.0-rc.4" + "@abp/utils" "~11.0.0-rc.1" -"@abp/datatables.net-bs5@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.7.0-rc.4.tgz#d87c26ab7604971d969ccda27c78795475af793a" - integrity sha512-SPlNc9zzzmDCENf6dQtpKAxXEIpHRaidZEDsx7MUcdcnGEI8xs0Wg3vXzNMhz65OhSoW2FYQKapdAa0uzB02Dg== +"@abp/datatables.net-bs5@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-11.0.0-rc.1.tgz#1d7e9471c68c0eb64e9476967670d69fa897b7f3" + integrity sha512-VsQBlEx+ga8/X10i29XMs9Mjj2W83hSPsYftgByq09NiwtUVfX6t7yiGf4wF9+rk7fiRt3XQ4sXi6G1Ji9nqyQ== dependencies: - "@abp/datatables.net" "~10.7.0-rc.4" + "@abp/datatables.net" "~11.0.0-rc.1" datatables.net-bs5 "^2.3.4" -"@abp/datatables.net@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.7.0-rc.4.tgz#d64f7fe7e3adea76b238fd3ff59cd63a4445b2fe" - integrity sha512-4JtMRiQAvLY+IOqofHE6tNRwjG4ONyiFikgoKmNPfnue7wXIIA6BUgdUAeABan4S0kSwHOttM7MHyZkQLjzTHw== +"@abp/datatables.net@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-11.0.0-rc.1.tgz#2402b8192d41e4cd435b4e212604c32013b7d142" + integrity sha512-fNpr2eo9ZUghWiESK5QouB8rZoNGFFE+c+6BwcqchTnc9wcGj0wz+UEYtWZFitpHniWV2RRcVSoMM8waKzSl7w== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" datatables.net "^2.3.4" -"@abp/font-awesome@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.7.0-rc.4.tgz#9ce20b82685facea8564965ab3ad07764b29eccc" - integrity sha512-oalR5fBPImD4q0yYPbscJ858sDo8kJhFgixpViPc3bbaN41M5JPBpVR+K3UXQYfO93a0mhLoVb20bRMggWyhQQ== +"@abp/font-awesome@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-11.0.0-rc.1.tgz#0accc6fb2168515688f5a36f8dd3d4d4236f533d" + integrity sha512-/u4oXQGjet8VE/L1SZDsNCK4q6D9m9B50Em+Mkp8F7W/F6uLnyXGcWNyuHR3DMqvjEOXUc1WHE/zJQx8gsAFDw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@fortawesome/fontawesome-free" "^7.0.1" -"@abp/jquery-validation-unobtrusive@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.7.0-rc.4.tgz#a8c7daa832d72780e9b601ba0c667fe58433a817" - integrity sha512-VCnTyd3nvafI3A4XHM8jWhBCJ+0B3N6H4LeVW5AK0wyvk38q78tWAqI0ZaYgz3ObTKMuCTa+gCbmq9B/zrkT3Q== +"@abp/jquery-validation-unobtrusive@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-11.0.0-rc.1.tgz#8bd71ad4f2882b02a12a8c36443361d23f62e386" + integrity sha512-FF2pBceeNP9cUA1mj5T/fYpG5nq1DvrSyL7iOwrtqixDV8R9jgpZFCA146K0UMiqkzdtH9WiFRwL6690QAmkEg== dependencies: - "@abp/jquery-validation" "~10.7.0-rc.4" - jquery-validation-unobtrusive "^4.0.0" + "@abp/jquery-validation" "~11.0.0-rc.1" + jquery-validation "^1.22.1" -"@abp/jquery-validation@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.7.0-rc.4.tgz#5309e6f4b9b61124855df83268b8b1b99bd91eb6" - integrity sha512-TtIQWMWzI8ucPWwI2Jx9wyXH0Tl3m2h4r98T+wFlQ3UlDUn3x1SfLxhDPH7IX1RYMaa/3go1HlL/JRgK5yeIxw== +"@abp/jquery-validation@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-11.0.0-rc.1.tgz#fcc4fd82904750de70bbfc3f28b165768de7f992" + integrity sha512-JOxpgQoRi6dx12si3ArXdc8ElS2yaHlKxpYz4lgBlUschJoljsx0z2hhZzopJMhSaXFABHWGQmH9ssjmZaerlQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" jquery-validation "^1.22.1" -"@abp/jquery@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.7.0-rc.4.tgz#4aa75a520186a74303a2de511c19115310c7e2a4" - integrity sha512-YcXWXpsCGMUxMWg1QakOWmTjFJLpN+/QxfVuCjNJiHZJrHN0Ea5CPDWnLMqM46RhgoUAxg22EWYRi83j7mlYdg== +"@abp/jquery@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-11.0.0-rc.1.tgz#7d6df2229760e5b2cfdc9aa7746b37a95a3e2001" + integrity sha512-87tkbkRp4xQ3ih9Ri1nxTxqmd424nAFT1WFpWld1Aq1GYUg64mgPMc3CrTxUa8yYfMZdSJbWBsT7gh0C+7XVjg== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" jquery "~4.0.0" jquery-migrate "~4.0.2" -"@abp/lodash@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.7.0-rc.4.tgz#77069cfb8a2d3496c03475a18ef6ef442b29de9e" - integrity sha512-g+C3bjjjpas4VZPAt2o1b+DLr31pCn7U61rpYGjT6BoI6rPmu8WX8yFImyRB8S2QJ7FQT/Dr3p6GxPNn2mAE4A== +"@abp/lodash@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-11.0.0-rc.1.tgz#5b77df8d96905024442040cd352db4bfb863c2f4" + integrity sha512-uEvbpUPogY0VLzyFDIeo2JdsUxs1imX4aDbm8Jj2BKrFf1kfQ3dQUFtzwfDE4y+9dYvxtHXZkYsV2VA/9qaRTA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" lodash "^4.18.1" -"@abp/luxon@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.7.0-rc.4.tgz#d5fab55855d88aec6d9fcc3eb27805b64ccb5942" - integrity sha512-IyihWt3NInSMmV+kFKbPPyxf9ajHNwEuLUk3VCfmHy01ef/GjFS4RaEJ2xd8U0OiuGm0ZnTi6yqjm1sOQ0quNQ== +"@abp/luxon@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-11.0.0-rc.1.tgz#b2b2feb15b5e2ebabfb4d84146611011b5bb300e" + integrity sha512-e2zaTkoKDxm/ZJUuBPoxCXWpQyeWjkZuCMEtXGKcgrtEaukkhP9chwHk1mwC5WIW7AardmQl8Ozoy1xypgcveA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" luxon "^3.7.2" -"@abp/malihu-custom-scrollbar-plugin@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.7.0-rc.4.tgz#33b67b4daa41e32680f392e66bcb147f7a8595d9" - integrity sha512-OXTlbuy+5R2xEfNnnphzPjvCNi5FD7FF7YBH3gnLnDG8RiNvcfma8KrLvha6YCzDmKB1AuLGMfrOrE0GuQvEBQ== - dependencies: - "@abp/core" "~10.7.0-rc.4" - malihu-custom-scrollbar-plugin "^3.1.5" - -"@abp/moment@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.7.0-rc.4.tgz#2f68b427e5b033719411958a9008400739b971d9" - integrity sha512-XwFRFpaOfGSwnXk/eUg2GigSLQ1OxqunmvawDSj0V5wc9xnqazNGiCOOUrUm/jpi/ozWCj7TgOWkQHM+xKHezA== +"@abp/moment@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-11.0.0-rc.1.tgz#5ffdbe14cd24f28b2f0209e9dfcb7e19794b5f78" + integrity sha512-KQqmquSme6N7nX/7omqiLh+yf0zDA5zJDdqWI12iqJGwifL9K8e/pW6EncDimX+4pwvGm7hzaBUR1j2l+lG0lg== dependencies: moment "^2.30.1" -"@abp/popper.js@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-10.7.0-rc.4.tgz#bc7a5375c1f2608c5c3ec2ea65df0e6e8aaadb29" - integrity sha512-kgoxInvffZfqvdmHHPVe39Tc/iQCvcl/RFNsAT+Ow6pGEB2A5CUABRHZn/5raP2pufYmfK3eAxtKS7M9kmv9YA== +"@abp/popper.js@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-11.0.0-rc.1.tgz#52744f487f9b302ce9ae9180970ccf47011b9461" + integrity sha512-b2nCsrhxxNzfnV7MpeRLcmUPDaPQkNIXVC0g0V1jyTx8NjU1MT09XHkwOQJxuNiUlnX8XZ+dqcq7HRdZYedu9w== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@popperjs/core" "^2.11.8" -"@abp/select2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.7.0-rc.4.tgz#233fa8ba11093726b8646d61c874edcc8e84b5ef" - integrity sha512-jxVBtqcMJROQ4wU9MmqwpQ4fRt/t5ZITieC7Fy0rfCwOmJB2ihkbNyjnLxhUsevmjurmw6yyUxv5N3WP3BmHHw== +"@abp/select2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-11.0.0-rc.1.tgz#4c4a5a7315e31755ca4d4e4b1d6738910e68bbbb" + integrity sha512-XfFbMdwl5iRM+5mGKTB3rCoH+isaFGBqbcP9e67IXOkhHsZie1fEGFBomTDwvVK48q9DQhSr8gsDyJKgD9B+JQ== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" select2 "4.0.13" -"@abp/sweetalert2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.7.0-rc.4.tgz#e745a1eb7a1beeaad4c1f5db7a4faf810cf22af4" - integrity sha512-uLy/1OiOTwGwCmgfwwXSqBtjozdbhmPLwUw9YbJKxojxX09VNjMWhzB4+6p1bf+JN+EPxI+HbSDCbXFDqQFA6w== +"@abp/sweetalert2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-11.0.0-rc.1.tgz#1a6b508ed85d78f4bb843532816428dab77354b4" + integrity sha512-c0sKYRb6aCzRB+e0jl61OEqdic2FZ3ODcHoqWVBfwmn9Gc17nGr/tTCGksU5UGY5uO2+ILhdUYHdxPU/wAVsPw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" sweetalert2 "^11.23.0" -"@abp/timeago@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.7.0-rc.4.tgz#165bd42c431c0e38c1f0b3423fb38dc469b74fdf" - integrity sha512-jgOXWL0S7PL2I30kUnIYEMCtrvUwj3xR38r2XzV5xW9OKwpHL+abzccb47ZGvqvETztdzRKFX7T8AzIZ/Cxqcw== +"@abp/timeago@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-11.0.0-rc.1.tgz#6093578ed4d00e8b18fcf36b1cf92e24c5a0830d" + integrity sha512-RpWkVGD4q2BcuG6T2cMjIQXWUdwHScVUAmJSXNknHuUrEXEe4GRSpIi0HxYjfrvCGTGkAwbRwXTE5/U6XbMuRQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" - timeago "^1.6.7" + "@abp/jquery" "~11.0.0-rc.1" + timeago.js "^4.0.2" -"@abp/utils@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.7.0-rc.4.tgz#36711ccca8b20fc0fce8a0d347645948ac32a35d" - integrity sha512-9S8bMSd/XPV4bjvcXEPTqJclcjRkcpeFEqUx8iQnZkhHjhuq5B7++RpCQ/j1mzX1lBzsvCliteqUKvjtUjOY1Q== +"@abp/utils@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-11.0.0-rc.1.tgz#91ca25e687b0d49195adf808029ba94978156c4a" + integrity sha512-WjujeW5j9Iqr5kR+8jF4lMk1E2FD9SMsOvivLOinQOE2tdipd7OlmPGX+8cwSXJXXhWJ7Y2TRqzlvn7BoZP0Yw== dependencies: just-compare "^2.3.0" @@ -201,21 +194,13 @@ ansi-colors@^4.1.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -bootstrap-datepicker@^1.10.1: +bootstrap-datepicker@1.10.1: version "1.10.1" resolved "https://registry.yarnpkg.com/bootstrap-datepicker/-/bootstrap-datepicker-1.10.1.tgz#0a8bec42957ea1ce1272b91bcf2b53696629fb86" integrity sha512-GIe+fsLp9Hi30oW7L2v2Q9/a4+aojrIA2p4ZagtLuKw2lpfQgjJjM0L6vl/lYQydGXWUbpoKbEC/O5tzWIkEKQ== dependencies: jquery ">=3.4.0 <4.0.0" -bootstrap-daterangepicker@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz#632e6fb2de4b6360c5c0a9d5f6adb9aace051fe8" - integrity sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g== - dependencies: - jquery ">=1.10" - moment "^2.9.0" - bootstrap@^5.3.8: version "5.3.8" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.8.tgz#6401a10057a22752d21f4e19055508980656aeed" @@ -241,35 +226,17 @@ jquery-migrate@~4.0.2: resolved "https://registry.yarnpkg.com/jquery-migrate/-/jquery-migrate-4.0.2.tgz#d296a64e05073017c54877462ac563f1927ee21f" integrity sha512-J15ilpECoAsObLv2robklj0qf1qt9QCnZwwNcJAXkM7dIiOgcac2dqC3HgDtUF0fmRwKZa/ggTkxTj9S4Vk+HQ== -jquery-mousewheel@>=3.0.6: - version "3.1.13" - resolved "https://registry.yarnpkg.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz#06f0335f16e353a695e7206bf50503cb523a6ee5" - integrity sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg== - -jquery-validation-unobtrusive@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.0.0.tgz#dfcf25a558496a2c883db6021d10f5398d15f99d" - integrity sha512-1ervYFFv6LX/rp7ktuLnMakHNG0piNRDyROI8Ir3hL1vPIwylAehB1AY3BPrYJnzW3WmwWryZq+Bz4sazZK9iQ== - dependencies: - jquery "^3.6.0" - jquery-validation ">=1.19" - -jquery-validation@>=1.19: - version "1.21.0" - resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.21.0.tgz#78fc05ab76020912a246af3661b3f54a438bca93" - integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w== - jquery-validation@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.22.1.tgz#fc1ae3256110332c929245a44d69ee76fee0e481" integrity sha512-ePLXLWK7Rh5eR652YsuIu7YPeGlCXrsJUteVw5iZopiU17yaMd3FaDggs6yyNMl56p8TYVeDRmKGK3fPZrMeQw== -jquery@>=1.10, "jquery@>=1.5.0 <4.0", jquery@>=1.7: +jquery@>=1.7: version "3.6.4" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.4.tgz#ba065c188142100be4833699852bf7c24dc0252f" integrity sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ== -"jquery@>=3.4.0 <4.0.0", jquery@^3.6.0: +"jquery@>=3.4.0 <4.0.0": version "3.7.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de" integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg== @@ -294,23 +261,11 @@ luxon@^3.7.2: resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.7.2.tgz#d697e48f478553cca187a0f8436aff468e3ba0ba" integrity sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew== -malihu-custom-scrollbar-plugin@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz#310cecc5e59415a1c29e9dfb5d2b6e01d66a29ef" - integrity sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ== - dependencies: - jquery-mousewheel ">=3.0.6" - moment@^2.30.1: version "2.30.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== -moment@^2.9.0: - version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" - integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== - select2@4.0.13: version "4.0.13" resolved "https://registry.yarnpkg.com/select2/-/select2-4.0.13.tgz#0dbe377df3f96167c4c1626033e924372d8ef44d" @@ -321,9 +276,7 @@ sweetalert2@^11.23.0: resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.26.3.tgz#6e8188cf71818af34d62fe33a2465690cde9836d" integrity sha512-VU0hGw/WfI9h7Mh+SCsDlWgtxDwWZ6ccqS7QcO8zEeWnwplN1GptcLstq76OluUBSLUza6ldvKd3558OhjpJ9A== -timeago@^1.6.7: - version "1.6.7" - resolved "https://registry.yarnpkg.com/timeago/-/timeago-1.6.7.tgz#afd467c29a911e697fc22a81888c7c3022783cb5" - integrity sha512-FikcjN98+ij0siKH4VO4dZ358PR3oDDq4Vdl1+sN9gWz1/+JXGr3uZbUShYH/hL7bMhcTpPbplJU5Tej4b4jbQ== - dependencies: - jquery ">=1.5.0 <4.0" +timeago.js@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/timeago.js/-/timeago.js-4.0.2.tgz#724e8c8833e3490676c7bb0a75f5daf20e558028" + integrity sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w== diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj index 827dfdfb83..0a0e43ba0b 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj @@ -1,7 +1,7 @@  - net10.0 + net11.0 Volo.CmsKit true Volo.CmsKit-c2d31439-b723-48e2-b061-5ebd7aeb6010 @@ -52,6 +52,7 @@ + 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 112578a148..528feaf47f 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~10.7.0", - "@abp/cms-kit": "10.7.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "~11.0.0-rc.1", + "@abp/cms-kit": "11.0.0-rc.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 64f0d2d1d1..efed2a4eab 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock @@ -2,299 +2,292 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.7.0-rc.4.tgz#0f9eacc9bb9807553ca0465d24fccee5805db2fc" - integrity sha512-v2RabyrSXPN2H4eByd3mSxxjjutUvH5LnKVRuffFZ4kA7Em7ZhD9hfKeBxYY+OuWfwVhEeKX/Rvd6jyAhbVf6Q== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~10.7.0-rc.4" - -"@abp/aspnetcore.mvc.ui.theme.shared@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.7.0-rc.4.tgz#353aaa338ab0841d042c4df2ce7af9913f5d8eed" - integrity sha512-CeVeaxH1D8FFtySSXvhrKBm2t9VVDdy+bbk51WFi54rQlicxFdQixYQogYTvs9e4/XaOvDpOC2T4SIVPbiC94Q== - dependencies: - "@abp/aspnetcore.mvc.ui" "~10.7.0-rc.4" - "@abp/bootstrap" "~10.7.0-rc.4" - "@abp/bootstrap-datepicker" "~10.7.0-rc.4" - "@abp/bootstrap-daterangepicker" "~10.7.0-rc.4" - "@abp/datatables.net-bs5" "~10.7.0-rc.4" - "@abp/font-awesome" "~10.7.0-rc.4" - "@abp/jquery-validation-unobtrusive" "~10.7.0-rc.4" - "@abp/lodash" "~10.7.0-rc.4" - "@abp/luxon" "~10.7.0-rc.4" - "@abp/malihu-custom-scrollbar-plugin" "~10.7.0-rc.4" - "@abp/moment" "~10.7.0-rc.4" - "@abp/select2" "~10.7.0-rc.4" - "@abp/sweetalert2" "~10.7.0-rc.4" - "@abp/timeago" "~10.7.0-rc.4" - -"@abp/aspnetcore.mvc.ui@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.7.0-rc.4.tgz#fb34369f924ce07866c731dec474d05bc7c1cc8e" - integrity sha512-JSz40zPIxcbkoYKZKvbTs32UfR7nbMoUe20g66tVHbN1Tn2fd2VMFD8elm4L03Tc+iZoLPXi5AsF9QD7zM7YJA== +"@abp/aspnetcore.mvc.ui.theme.basic@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-11.0.0-rc.1.tgz#f3f6157708b225aaf93567e6cce031740af1e4cf" + integrity sha512-EyeC+rt1pbnRquE8DEsL9ZR/xrEQFwqLdactTifCrcjF9gSXwKhJ5GJKccEFscoLvoy/EdPnWtylGlcHOF7yFA== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~11.0.0-rc.1" + +"@abp/aspnetcore.mvc.ui.theme.shared@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-11.0.0-rc.1.tgz#77ac0fa4f15e2055981a8e78a986caf4d5b24717" + integrity sha512-fb44VGo5FnBGbgYl5n5HoXJmpv3YW3rIKTH8CJ0FemVc+DkxAcHxdUx5jb2YhWG2IXaCdKKzwxzr+0ksIbKAWA== + dependencies: + "@abp/aspnetcore.mvc.ui" "~11.0.0-rc.1" + "@abp/bootstrap" "~11.0.0-rc.1" + "@abp/bootstrap-datepicker" "~11.0.0-rc.1" + "@abp/bootstrap-daterangepicker" "~11.0.0-rc.1" + "@abp/datatables.net-bs5" "~11.0.0-rc.1" + "@abp/font-awesome" "~11.0.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~11.0.0-rc.1" + "@abp/lodash" "~11.0.0-rc.1" + "@abp/luxon" "~11.0.0-rc.1" + "@abp/moment" "~11.0.0-rc.1" + "@abp/select2" "~11.0.0-rc.1" + "@abp/sweetalert2" "~11.0.0-rc.1" + "@abp/timeago" "~11.0.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-11.0.0-rc.1.tgz#45d83b3a3f16dbac155c0e9258a14cb26365acf4" + integrity sha512-VfVt8r13yOg/fp+DjUNsTmv56UWcDIySA9qdVfMgiIbiomwguKx0aaokqNf6yCRB7wA21TQHgLbrS71IpV9uWA== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.7.0-rc.4.tgz#9f2f9ba0590e01739d6ee68824e69eae275c7962" - integrity sha512-T5sIxswsQIwm20xfuymji5xud5GphO+c1hKQ6tYpPAtUhg1g8ABDY1pGBdWbxCJh3uOuhlF8grp9pT+xUy9i1w== +"@abp/bootstrap-datepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-11.0.0-rc.1.tgz#6fa5a9345db1a94d2466907c2a85341287ef77ba" + integrity sha512-E4GaKtllZ5L4uz0uPSaaHLIucpC6dw4kAqM+n+rLk4txoqUdAPs+vzjHnICgp/YnSWWhAmuOhYnWfny6TD3HXw== dependencies: - bootstrap-datepicker "^1.10.1" + bootstrap-datepicker "1.10.1" + jquery "~4.0.0" -"@abp/bootstrap-daterangepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.7.0-rc.4.tgz#0cc427a9320211bc2ae4383dc228747f03d8b132" - integrity sha512-p2qiX8FuplFS/8mUbnSVc2ZgoSpU6DkLL/4yuXIwA3rLhR9dcqyRxqpFzj8H5nQ1AKaEzddylFNzzhV0sCB8lw== +"@abp/bootstrap-daterangepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-11.0.0-rc.1.tgz#3c06aa2c6a4860a7a23874491d33a12393d907aa" + integrity sha512-uDj2Pc7ksZbLCfoJKixt3zbvA7jASvLd4ndqjkhgTsMrRXh4atgaFcvjCs0NKkCqGjyI5xJoGDTTc38HToWnLQ== dependencies: - "@abp/moment" "~10.7.0-rc.4" - bootstrap-daterangepicker "^3.1.0" + "@abp/moment" "~11.0.0-rc.1" + jquery "~4.0.0" + moment "^2.30.1" -"@abp/bootstrap@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.7.0-rc.4.tgz#1916f312c6b46b0d17591b514e12d1fd93bcaf2c" - integrity sha512-CqmKWa2McXnJj0U9NOraxTdJyadfm1lQnc0WisiSg6HllvMmE3KUf7GgpiM4nxQlQt9Z0/8hWPhq5cLiLLc8dA== +"@abp/bootstrap@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-11.0.0-rc.1.tgz#ac127a386437aa6a62b2e7188837a40f4f0dd036" + integrity sha512-lYhyk6qlt6QsJgb+HBccryB9g9Tw+/qLJ5bYmgsJyoBYGUt74jtdNVi6JDy+7O7+k4aRvvA3XDNOfnS1DbfNvg== dependencies: - "@abp/core" "~10.7.0-rc.4" - "@abp/popper.js" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" + "@abp/popper.js" "~11.0.0-rc.1" bootstrap "^5.3.8" -"@abp/clipboard@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-10.7.0-rc.4.tgz#5b8b8264775de9ba3f1e86f12ab2eb98fe932e33" - integrity sha512-wqX9L6Y9YCtzXBYxVyM+k+SGFhCKMtV4r1JMAwj8cmuAvEKcuBhJ1hQojVWXLzjoYQPbNu9vW7ypmE/+trcwtQ== +"@abp/clipboard@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-11.0.0-rc.1.tgz#45565ea7ad5fe54d9a17f158a2c666150fcb5de5" + integrity sha512-C/FHYR19n1cpcKmDPiSBUG5umxbddTX6p6m0QMVopQV235li54L8nNUlZzKjYdjc1ESgFKoJhtmegdspPjvysA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" clipboard "^2.0.11" -"@abp/cms-kit.admin@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/cms-kit.admin/-/cms-kit.admin-10.7.0-rc.4.tgz#8135fe70b619c704bf6417835b7953cd22046167" - integrity sha512-uPDZimLCioDY2kyhVUQFppaBAC8JCZuMQThEoZX4K5sa37x/jITfzxBCZy84c0C5z/IQenjjnTHcD9akbOKsog== +"@abp/cms-kit.admin@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/cms-kit.admin/-/cms-kit.admin-11.0.0-rc.1.tgz#bb5f2c432cf0d18e719f24228adfd611563070a0" + integrity sha512-/MBtrEgBh35bk6PH68lyD6HrsjD7lbGOiTLR2qt2O8B5nckrlPNKJHcL30rkEyKtEv+ATEJsKCKZJ7lBYcqmQA== dependencies: - "@abp/codemirror" "~10.7.0-rc.4" - "@abp/jstree" "~10.7.0-rc.4" - "@abp/markdown-it" "~10.7.0-rc.4" - "@abp/slugify" "~10.7.0-rc.4" - "@abp/tui-editor" "~10.7.0-rc.4" - "@abp/uppy" "~10.7.0-rc.4" + "@abp/codemirror" "~11.0.0-rc.1" + "@abp/jstree" "~11.0.0-rc.1" + "@abp/markdown-it" "~11.0.0-rc.1" + "@abp/slugify" "~11.0.0-rc.1" + "@abp/tui-editor" "~11.0.0-rc.1" + "@abp/uppy" "~11.0.0-rc.1" -"@abp/cms-kit.public@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/cms-kit.public/-/cms-kit.public-10.7.0-rc.4.tgz#f3a443d59e2573acb5fb41f32dfa3a788aa53de9" - integrity sha512-Iv8EOTVvF8g2gCO+ki1BJNmof/fUJzpxN/ot2nKhL8bS6n9ugh9sAooz3+UTKzZcrgIngVJ2W60YgzmU4Pen4g== +"@abp/cms-kit.public@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/cms-kit.public/-/cms-kit.public-11.0.0-rc.1.tgz#f5f13b14074c3b1ac65a68bf2ea269730778062e" + integrity sha512-vQEhF20NA+NDYjp13cGrCYtumbxomuHku7eYGNp9nY5TAgQ9Htw2O+5Sw04uUjpcYRMvsgOUAvIrZNbm/jwn0g== dependencies: - "@abp/highlight.js" "~10.7.0-rc.4" - "@abp/star-rating-svg" "~10.7.0-rc.4" + "@abp/highlight.js" "~11.0.0-rc.1" + "@abp/star-rating-svg" "~11.0.0-rc.1" -"@abp/cms-kit@10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/cms-kit/-/cms-kit-10.7.0-rc.4.tgz#771b1a09d6920cf01ebd58b894f92dbca1a328ed" - integrity sha512-7RhOW8cwvyKmvQwC/T3IRvhT/UREMeQ1hpt3kzrZqm10BGuvWV9XrHcO0t46oq13qUobHs8T6tLzGFVDYRvhuA== +"@abp/cms-kit@11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/cms-kit/-/cms-kit-11.0.0-rc.1.tgz#54ea10070b8f3ac976a1d329732a33f5b55fe6ef" + integrity sha512-8vfj4rKTOaxlJ+oFwCM2ZIC8EdQiolc0tE7h1ZgWixdAZZzYqkTtSIKT+g3DSUiwHZB4+I2u+VrfIderhipVFA== dependencies: - "@abp/cms-kit.admin" "~10.7.0-rc.4" - "@abp/cms-kit.public" "~10.7.0-rc.4" + "@abp/cms-kit.admin" "~11.0.0-rc.1" + "@abp/cms-kit.public" "~11.0.0-rc.1" -"@abp/codemirror@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/codemirror/-/codemirror-10.7.0-rc.4.tgz#4f8f3039b4c99c24da9d82f3be5ec6a99caf7a59" - integrity sha512-utMh8ehLJnsg5ELthn/EnLXBqzBeWl8Ybg3/aSrxq52mDjXqIILyQSakrG/p1UD+TaSmNk3x3Xww5tijEcmdeA== +"@abp/codemirror@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/codemirror/-/codemirror-11.0.0-rc.1.tgz#6966261151373fd1922e7833881ae192ca51dd71" + integrity sha512-XENrvZkCdlIkYTkAVWkBRBMArxpRO1mP3SPlYHLlwtS8b8o5FdGrMirc2nugdWLST0FJafg6Z54ZzRWuj7/tIg== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@codemirror/lang-css" "^6.0.0" "@codemirror/lang-javascript" "^6.0.0" "@codemirror/state" "^6.0.0" "@codemirror/view" "^6.0.0" codemirror "^6.0.2" -"@abp/core@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.7.0-rc.4.tgz#e1d8a7c378a807cde22cdf0f8b7ba21ec4e2d7cd" - integrity sha512-uZuJywMXK4W3YoQKZVbHLG4OekXhElnpJHOI78a1o2ESDz7bMP2Nfs8n8KSSXGz8b5yRCIlyf9/G7majYnjAcw== +"@abp/core@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-11.0.0-rc.1.tgz#5db5e442b9cd5dc0f654ffe858865b6dbcb7f61e" + integrity sha512-iw7qPkNpeMrjd0kVVVrVHuFzVlgbuvscZsEvLMT8YEhvUD0ABmGfTxChuuIcgV1R4hpXegvfsUDiVIKcY1YcVg== dependencies: - "@abp/utils" "~10.7.0-rc.4" + "@abp/utils" "~11.0.0-rc.1" -"@abp/datatables.net-bs5@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.7.0-rc.4.tgz#d87c26ab7604971d969ccda27c78795475af793a" - integrity sha512-SPlNc9zzzmDCENf6dQtpKAxXEIpHRaidZEDsx7MUcdcnGEI8xs0Wg3vXzNMhz65OhSoW2FYQKapdAa0uzB02Dg== +"@abp/datatables.net-bs5@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-11.0.0-rc.1.tgz#1d7e9471c68c0eb64e9476967670d69fa897b7f3" + integrity sha512-VsQBlEx+ga8/X10i29XMs9Mjj2W83hSPsYftgByq09NiwtUVfX6t7yiGf4wF9+rk7fiRt3XQ4sXi6G1Ji9nqyQ== dependencies: - "@abp/datatables.net" "~10.7.0-rc.4" + "@abp/datatables.net" "~11.0.0-rc.1" datatables.net-bs5 "^2.3.4" -"@abp/datatables.net@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.7.0-rc.4.tgz#d64f7fe7e3adea76b238fd3ff59cd63a4445b2fe" - integrity sha512-4JtMRiQAvLY+IOqofHE6tNRwjG4ONyiFikgoKmNPfnue7wXIIA6BUgdUAeABan4S0kSwHOttM7MHyZkQLjzTHw== +"@abp/datatables.net@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-11.0.0-rc.1.tgz#2402b8192d41e4cd435b4e212604c32013b7d142" + integrity sha512-fNpr2eo9ZUghWiESK5QouB8rZoNGFFE+c+6BwcqchTnc9wcGj0wz+UEYtWZFitpHniWV2RRcVSoMM8waKzSl7w== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" datatables.net "^2.3.4" -"@abp/font-awesome@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.7.0-rc.4.tgz#9ce20b82685facea8564965ab3ad07764b29eccc" - integrity sha512-oalR5fBPImD4q0yYPbscJ858sDo8kJhFgixpViPc3bbaN41M5JPBpVR+K3UXQYfO93a0mhLoVb20bRMggWyhQQ== +"@abp/font-awesome@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-11.0.0-rc.1.tgz#0accc6fb2168515688f5a36f8dd3d4d4236f533d" + integrity sha512-/u4oXQGjet8VE/L1SZDsNCK4q6D9m9B50Em+Mkp8F7W/F6uLnyXGcWNyuHR3DMqvjEOXUc1WHE/zJQx8gsAFDw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@fortawesome/fontawesome-free" "^7.0.1" -"@abp/highlight.js@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-10.7.0-rc.4.tgz#48d88816b70322f801c607bbb853a6d7c73f2f57" - integrity sha512-OZMYoVu3u2R/rNxS+286h1iMT0JaLgbez9hfvKDwS9ddXFALcXPSM1UsymT2tmqljZflt/Cffk02xCwN1Xov6Q== +"@abp/highlight.js@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-11.0.0-rc.1.tgz#49befae8da1c93df88fab649340cd4720dbc12af" + integrity sha512-om2f5p9YhXtDJuDv6bPBS1KojN5it619Wn4VtFZPgJUw9gQzsBH5eZtL/wW1BY727Lnt3MkhABPW0y2hs24Ieg== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@highlightjs/cdn-assets" "~11.11.1" -"@abp/jquery-validation-unobtrusive@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.7.0-rc.4.tgz#a8c7daa832d72780e9b601ba0c667fe58433a817" - integrity sha512-VCnTyd3nvafI3A4XHM8jWhBCJ+0B3N6H4LeVW5AK0wyvk38q78tWAqI0ZaYgz3ObTKMuCTa+gCbmq9B/zrkT3Q== +"@abp/jquery-validation-unobtrusive@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-11.0.0-rc.1.tgz#8bd71ad4f2882b02a12a8c36443361d23f62e386" + integrity sha512-FF2pBceeNP9cUA1mj5T/fYpG5nq1DvrSyL7iOwrtqixDV8R9jgpZFCA146K0UMiqkzdtH9WiFRwL6690QAmkEg== dependencies: - "@abp/jquery-validation" "~10.7.0-rc.4" - jquery-validation-unobtrusive "^4.0.0" + "@abp/jquery-validation" "~11.0.0-rc.1" + jquery-validation "^1.22.1" -"@abp/jquery-validation@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.7.0-rc.4.tgz#5309e6f4b9b61124855df83268b8b1b99bd91eb6" - integrity sha512-TtIQWMWzI8ucPWwI2Jx9wyXH0Tl3m2h4r98T+wFlQ3UlDUn3x1SfLxhDPH7IX1RYMaa/3go1HlL/JRgK5yeIxw== +"@abp/jquery-validation@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-11.0.0-rc.1.tgz#fcc4fd82904750de70bbfc3f28b165768de7f992" + integrity sha512-JOxpgQoRi6dx12si3ArXdc8ElS2yaHlKxpYz4lgBlUschJoljsx0z2hhZzopJMhSaXFABHWGQmH9ssjmZaerlQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" jquery-validation "^1.22.1" -"@abp/jquery@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.7.0-rc.4.tgz#4aa75a520186a74303a2de511c19115310c7e2a4" - integrity sha512-YcXWXpsCGMUxMWg1QakOWmTjFJLpN+/QxfVuCjNJiHZJrHN0Ea5CPDWnLMqM46RhgoUAxg22EWYRi83j7mlYdg== +"@abp/jquery@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-11.0.0-rc.1.tgz#7d6df2229760e5b2cfdc9aa7746b37a95a3e2001" + integrity sha512-87tkbkRp4xQ3ih9Ri1nxTxqmd424nAFT1WFpWld1Aq1GYUg64mgPMc3CrTxUa8yYfMZdSJbWBsT7gh0C+7XVjg== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" jquery "~4.0.0" jquery-migrate "~4.0.2" -"@abp/jstree@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jstree/-/jstree-10.7.0-rc.4.tgz#1c2b975778f3fac5fd395fcf76c2636965b0a65e" - integrity sha512-mRD6VybICzf+WyQ5q3d7W/iEEi6DgeJ/c2izuG+J3jgM9Z49ZEkz1sKHsDBmLF3rxJ1/2AMCEMzo5OlUZJEBKw== +"@abp/jstree@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jstree/-/jstree-11.0.0-rc.1.tgz#bf92b80418fce1aa228266714819db077aa97955" + integrity sha512-5lTdqQ04fIY8eQJFR5T9f388Kh681bsl2Spzo5nO+EXYvbRUkbWN/f5Nn6Q9LKnjDpEDmGzdv5N/kHm0XSHPFw== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" jstree "^3.3.17" -"@abp/lodash@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.7.0-rc.4.tgz#77069cfb8a2d3496c03475a18ef6ef442b29de9e" - integrity sha512-g+C3bjjjpas4VZPAt2o1b+DLr31pCn7U61rpYGjT6BoI6rPmu8WX8yFImyRB8S2QJ7FQT/Dr3p6GxPNn2mAE4A== +"@abp/lodash@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-11.0.0-rc.1.tgz#5b77df8d96905024442040cd352db4bfb863c2f4" + integrity sha512-uEvbpUPogY0VLzyFDIeo2JdsUxs1imX4aDbm8Jj2BKrFf1kfQ3dQUFtzwfDE4y+9dYvxtHXZkYsV2VA/9qaRTA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" lodash "^4.18.1" -"@abp/luxon@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.7.0-rc.4.tgz#d5fab55855d88aec6d9fcc3eb27805b64ccb5942" - integrity sha512-IyihWt3NInSMmV+kFKbPPyxf9ajHNwEuLUk3VCfmHy01ef/GjFS4RaEJ2xd8U0OiuGm0ZnTi6yqjm1sOQ0quNQ== +"@abp/luxon@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-11.0.0-rc.1.tgz#b2b2feb15b5e2ebabfb4d84146611011b5bb300e" + integrity sha512-e2zaTkoKDxm/ZJUuBPoxCXWpQyeWjkZuCMEtXGKcgrtEaukkhP9chwHk1mwC5WIW7AardmQl8Ozoy1xypgcveA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" luxon "^3.7.2" -"@abp/malihu-custom-scrollbar-plugin@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.7.0-rc.4.tgz#33b67b4daa41e32680f392e66bcb147f7a8595d9" - integrity sha512-OXTlbuy+5R2xEfNnnphzPjvCNi5FD7FF7YBH3gnLnDG8RiNvcfma8KrLvha6YCzDmKB1AuLGMfrOrE0GuQvEBQ== - dependencies: - "@abp/core" "~10.7.0-rc.4" - malihu-custom-scrollbar-plugin "^3.1.5" - -"@abp/markdown-it@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/markdown-it/-/markdown-it-10.7.0-rc.4.tgz#fbea30c75d7925aaaaa5f434b9bbe233597cea1a" - integrity sha512-BqcO1L/vE0vgz/JrZIX2WsYiA7OP0j5aXwvXt9tTkRUiL2pwQkIVyWXua53c+fCJ+icLZZnOabefhIK3KLyMKA== +"@abp/markdown-it@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/markdown-it/-/markdown-it-11.0.0-rc.1.tgz#e2da05ff95b554542cc965fc8311573777bd2058" + integrity sha512-/KBXdN+F+KjXlNb8O6Ek+hYrSPHoTeOHPfnv9jlH0XzzGVKQs3d6wmE6XUj3iWyC6bow7bljhfYllsMlUPU/9g== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" markdown-it "^14.1.0" -"@abp/moment@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.7.0-rc.4.tgz#2f68b427e5b033719411958a9008400739b971d9" - integrity sha512-XwFRFpaOfGSwnXk/eUg2GigSLQ1OxqunmvawDSj0V5wc9xnqazNGiCOOUrUm/jpi/ozWCj7TgOWkQHM+xKHezA== +"@abp/moment@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-11.0.0-rc.1.tgz#5ffdbe14cd24f28b2f0209e9dfcb7e19794b5f78" + integrity sha512-KQqmquSme6N7nX/7omqiLh+yf0zDA5zJDdqWI12iqJGwifL9K8e/pW6EncDimX+4pwvGm7hzaBUR1j2l+lG0lg== dependencies: moment "^2.30.1" -"@abp/popper.js@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-10.7.0-rc.4.tgz#bc7a5375c1f2608c5c3ec2ea65df0e6e8aaadb29" - integrity sha512-kgoxInvffZfqvdmHHPVe39Tc/iQCvcl/RFNsAT+Ow6pGEB2A5CUABRHZn/5raP2pufYmfK3eAxtKS7M9kmv9YA== +"@abp/popper.js@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-11.0.0-rc.1.tgz#52744f487f9b302ce9ae9180970ccf47011b9461" + integrity sha512-b2nCsrhxxNzfnV7MpeRLcmUPDaPQkNIXVC0g0V1jyTx8NjU1MT09XHkwOQJxuNiUlnX8XZ+dqcq7HRdZYedu9w== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@popperjs/core" "^2.11.8" -"@abp/prismjs@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-10.7.0-rc.4.tgz#260ebb79700a3f46358523ae13c2d51dd5e79e7f" - integrity sha512-p/SoVXPvcsQN+57vZTzvff3JTgBFRoFk1PdoBTipQzukUEjOb7MRuDsiPI5uUK+xoQ5UD6Pu0i7Xbiyo9II6/Q== +"@abp/prismjs@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-11.0.0-rc.1.tgz#b664d55ef8c6d858a8aa7521bcb900259692a7ff" + integrity sha512-Z8KzFcaDFchXNZ3QWVkkReWS7u3GgzaoS47HWt7BLgsxu7FqLz1v4zEzKRiEy5I4sqcociESjMHltzGn4sinoQ== dependencies: - "@abp/clipboard" "~10.7.0-rc.4" - "@abp/core" "~10.7.0-rc.4" + "@abp/clipboard" "~11.0.0-rc.1" + "@abp/core" "~11.0.0-rc.1" prismjs "^1.30.0" -"@abp/select2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.7.0-rc.4.tgz#233fa8ba11093726b8646d61c874edcc8e84b5ef" - integrity sha512-jxVBtqcMJROQ4wU9MmqwpQ4fRt/t5ZITieC7Fy0rfCwOmJB2ihkbNyjnLxhUsevmjurmw6yyUxv5N3WP3BmHHw== +"@abp/select2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-11.0.0-rc.1.tgz#4c4a5a7315e31755ca4d4e4b1d6738910e68bbbb" + integrity sha512-XfFbMdwl5iRM+5mGKTB3rCoH+isaFGBqbcP9e67IXOkhHsZie1fEGFBomTDwvVK48q9DQhSr8gsDyJKgD9B+JQ== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" select2 "4.0.13" -"@abp/slugify@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/slugify/-/slugify-10.7.0-rc.4.tgz#27b13d28aadba2115da39f612dd7f0b4b26d6d1a" - integrity sha512-Hl1SW1pylTIRg78QcIBpa52+WrZNVjcxWPxaC83Pe3YFEnyWtikQU3bNVX1CDchMagGpk7rYwWitfiCBcOekEA== +"@abp/slugify@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/slugify/-/slugify-11.0.0-rc.1.tgz#9806520fa9c160b50a8317c31ac500a4121fcfd1" + integrity sha512-R8xXzDkWtUgfEYp8c3HueT66EgDovwvGgY0+kr93qR5eSBRVu3T95mfHnM3f9tFMEDyjBSxZTWw6GQ9FysLljw== dependencies: slugify "^1.6.6" -"@abp/star-rating-svg@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/star-rating-svg/-/star-rating-svg-10.7.0-rc.4.tgz#c50aece335ab0ae95cac3134d25ccfbf487c7df7" - integrity sha512-441xW3nBxgxLjL7ALQ613iUN77u00Ynz71LDAb4ILYgAtFOBuqpiMFE1wIX481aOiRozR6qY6uvOZKlYE8ctRg== +"@abp/star-rating-svg@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/star-rating-svg/-/star-rating-svg-11.0.0-rc.1.tgz#fee8e388cc67c67a48084d84539d5eb528628995" + integrity sha512-lEwG1AMG+K/JrqzgmdVKtQA43mDq+N/O6Os/tbDnwNsTMz0xzSYMLt5yYJzErfe8aNVGnliE9IeVwU/zX7aFzw== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" star-rating-svg "^3.5.0" -"@abp/sweetalert2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.7.0-rc.4.tgz#e745a1eb7a1beeaad4c1f5db7a4faf810cf22af4" - integrity sha512-uLy/1OiOTwGwCmgfwwXSqBtjozdbhmPLwUw9YbJKxojxX09VNjMWhzB4+6p1bf+JN+EPxI+HbSDCbXFDqQFA6w== +"@abp/sweetalert2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-11.0.0-rc.1.tgz#1a6b508ed85d78f4bb843532816428dab77354b4" + integrity sha512-c0sKYRb6aCzRB+e0jl61OEqdic2FZ3ODcHoqWVBfwmn9Gc17nGr/tTCGksU5UGY5uO2+ILhdUYHdxPU/wAVsPw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" sweetalert2 "^11.23.0" -"@abp/timeago@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.7.0-rc.4.tgz#165bd42c431c0e38c1f0b3423fb38dc469b74fdf" - integrity sha512-jgOXWL0S7PL2I30kUnIYEMCtrvUwj3xR38r2XzV5xW9OKwpHL+abzccb47ZGvqvETztdzRKFX7T8AzIZ/Cxqcw== +"@abp/timeago@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-11.0.0-rc.1.tgz#6093578ed4d00e8b18fcf36b1cf92e24c5a0830d" + integrity sha512-RpWkVGD4q2BcuG6T2cMjIQXWUdwHScVUAmJSXNknHuUrEXEe4GRSpIi0HxYjfrvCGTGkAwbRwXTE5/U6XbMuRQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" - timeago "^1.6.7" + "@abp/jquery" "~11.0.0-rc.1" + timeago.js "^4.0.2" -"@abp/tui-editor@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/tui-editor/-/tui-editor-10.7.0-rc.4.tgz#54a685b7d8b75f4623af940078aedff2881c78d4" - integrity sha512-pOAddbNl1YP/Ge+q9FvkjugRV/OYbkCCbotV5m/D+GAuRY79SZDZRVy+t8ea/N8O7Q3Fw2sOtVafUpjykZD1YA== +"@abp/tui-editor@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/tui-editor/-/tui-editor-11.0.0-rc.1.tgz#0b8496cbf4d103b95330af28f90d1ed99c87dec5" + integrity sha512-+hcQ3T2XOPHD3vQUGf7E/wuqwz8xNPVIcVJNALP32L/gfShCEybghSN7VlkC15GZcvq5NV5xK8fmDh1gzTe8Rg== dependencies: - "@abp/jquery" "~10.7.0-rc.4" - "@abp/prismjs" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" + "@abp/prismjs" "~11.0.0-rc.1" -"@abp/uppy@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/uppy/-/uppy-10.7.0-rc.4.tgz#7ef6d00b9c624d2927d6f9568ba71c5bd6b3624e" - integrity sha512-AxYYBRMhLKENRf9UDipwIP9CgsIwDIG3KvIDFGoh2pqVR42ig/QTo9oedT41BXBNtsCqkXflfVUXEKzS19PPtA== +"@abp/uppy@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/uppy/-/uppy-11.0.0-rc.1.tgz#ef26f113656ce6fdd17aca36836e362d23380e37" + integrity sha512-j5pY29TUDkhwNseMP4U53ZmTFiq5LPK0UlU0rEel/AmmWZZEg36XNS04UljqvfQdbaQwM7QZ6teTymhw+Jdx4Q== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" uppy "^5.1.2" -"@abp/utils@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.7.0-rc.4.tgz#36711ccca8b20fc0fce8a0d347645948ac32a35d" - integrity sha512-9S8bMSd/XPV4bjvcXEPTqJclcjRkcpeFEqUx8iQnZkhHjhuq5B7++RpCQ/j1mzX1lBzsvCliteqUKvjtUjOY1Q== +"@abp/utils@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-11.0.0-rc.1.tgz#91ca25e687b0d49195adf808029ba94978156c4a" + integrity sha512-WjujeW5j9Iqr5kR+8jF4lMk1E2FD9SMsOvivLOinQOE2tdipd7OlmPGX+8cwSXJXXhWJ7Y2TRqzlvn7BoZP0Yw== dependencies: just-compare "^2.3.0" @@ -1925,21 +1918,13 @@ blueimp-canvas-to-blob@^3.29.0: resolved "https://registry.yarnpkg.com/blueimp-canvas-to-blob/-/blueimp-canvas-to-blob-3.29.0.tgz#d965f06cb1a67fdae207a2be56683f55ef531466" integrity sha512-0pcSSGxC0QxT+yVkivxIqW0Y4VlO2XSDPofBAqoJ1qJxgH9eiUDLv50Rixij2cDuEfx4M6DpD9UGZpRhT5Q8qg== -bootstrap-datepicker@^1.10.1: +bootstrap-datepicker@1.10.1: version "1.10.1" resolved "https://registry.yarnpkg.com/bootstrap-datepicker/-/bootstrap-datepicker-1.10.1.tgz#0a8bec42957ea1ce1272b91bcf2b53696629fb86" integrity sha512-GIe+fsLp9Hi30oW7L2v2Q9/a4+aojrIA2p4ZagtLuKw2lpfQgjJjM0L6vl/lYQydGXWUbpoKbEC/O5tzWIkEKQ== dependencies: jquery ">=3.4.0 <4.0.0" -bootstrap-daterangepicker@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz#632e6fb2de4b6360c5c0a9d5f6adb9aace051fe8" - integrity sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g== - dependencies: - jquery ">=1.10" - moment "^2.9.0" - bootstrap@^5.3.8: version "5.3.8" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.8.tgz#6401a10057a22752d21f4e19055508980656aeed" @@ -2312,35 +2297,17 @@ jquery-migrate@~4.0.2: resolved "https://registry.yarnpkg.com/jquery-migrate/-/jquery-migrate-4.0.2.tgz#d296a64e05073017c54877462ac563f1927ee21f" integrity sha512-J15ilpECoAsObLv2robklj0qf1qt9QCnZwwNcJAXkM7dIiOgcac2dqC3HgDtUF0fmRwKZa/ggTkxTj9S4Vk+HQ== -jquery-mousewheel@>=3.0.6: - version "3.1.13" - resolved "https://registry.yarnpkg.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz#06f0335f16e353a695e7206bf50503cb523a6ee5" - integrity sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg== - -jquery-validation-unobtrusive@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.0.0.tgz#dfcf25a558496a2c883db6021d10f5398d15f99d" - integrity sha512-1ervYFFv6LX/rp7ktuLnMakHNG0piNRDyROI8Ir3hL1vPIwylAehB1AY3BPrYJnzW3WmwWryZq+Bz4sazZK9iQ== - dependencies: - jquery "^3.6.0" - jquery-validation ">=1.19" - -jquery-validation@>=1.19: - version "1.21.0" - resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.21.0.tgz#78fc05ab76020912a246af3661b3f54a438bca93" - integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w== - jquery-validation@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.22.1.tgz#fc1ae3256110332c929245a44d69ee76fee0e481" integrity sha512-ePLXLWK7Rh5eR652YsuIu7YPeGlCXrsJUteVw5iZopiU17yaMd3FaDggs6yyNMl56p8TYVeDRmKGK3fPZrMeQw== -jquery@>=1.10, "jquery@>=1.5.0 <4.0", jquery@>=1.7, jquery@^3.5.0: +jquery@>=1.7, jquery@^3.5.0: version "3.6.4" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.4.tgz#ba065c188142100be4833699852bf7c24dc0252f" integrity sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ== -"jquery@>=3.4.0 <4.0.0", jquery@^3.6.0: +"jquery@>=3.4.0 <4.0.0": version "3.7.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de" integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg== @@ -2456,13 +2423,6 @@ luxon@^3.7.2: resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.7.2.tgz#d697e48f478553cca187a0f8436aff468e3ba0ba" integrity sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew== -malihu-custom-scrollbar-plugin@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz#310cecc5e59415a1c29e9dfb5d2b6e01d66a29ef" - integrity sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ== - dependencies: - jquery-mousewheel ">=3.0.6" - markdown-it@^14.1.0: version "14.1.0" resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-14.1.0.tgz#3c3c5992883c633db4714ccb4d7b5935d98b7d45" @@ -2519,11 +2479,6 @@ moment@^2.30.1: resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== -moment@^2.9.0: - version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" - integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== - ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" @@ -2687,12 +2642,10 @@ sweetalert2@^11.23.0: resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.26.3.tgz#6e8188cf71818af34d62fe33a2465690cde9836d" integrity sha512-VU0hGw/WfI9h7Mh+SCsDlWgtxDwWZ6ccqS7QcO8zEeWnwplN1GptcLstq76OluUBSLUza6ldvKd3558OhjpJ9A== -timeago@^1.6.7: - version "1.6.7" - resolved "https://registry.yarnpkg.com/timeago/-/timeago-1.6.7.tgz#afd467c29a911e697fc22a81888c7c3022783cb5" - integrity sha512-FikcjN98+ij0siKH4VO4dZ358PR3oDDq4Vdl1+sN9gWz1/+JXGr3uZbUShYH/hL7bMhcTpPbplJU5Tej4b4jbQ== - dependencies: - jquery ">=1.5.0 <4.0" +timeago.js@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/timeago.js/-/timeago.js-4.0.2.tgz#724e8c8833e3490676c7bb0a75f5daf20e558028" + integrity sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w== tiny-emitter@^2.0.0: version "2.1.0" diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo.CmsKit.Admin.Application.Contracts.csproj b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo.CmsKit.Admin.Application.Contracts.csproj index 349c9fcac3..dac075878d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo.CmsKit.Admin.Application.Contracts.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo.CmsKit.Admin.Application.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.csproj b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.csproj index d54b065631..9310ccb098 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/Volo.CmsKit.Admin.HttpApi.Client.csproj b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/Volo.CmsKit.Admin.HttpApi.Client.csproj index c2e15883b2..a19e1fefd1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/Volo.CmsKit.Admin.HttpApi.Client.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/Volo.CmsKit.Admin.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo.CmsKit.Admin.HttpApi.csproj b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo.CmsKit.Admin.HttpApi.csproj index 581d581d0a..c7c1fca5db 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo.CmsKit.Admin.HttpApi.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo.CmsKit.Admin.HttpApi.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj index 7732edd409..9569192ac6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; true Library diff --git a/modules/cms-kit/src/Volo.CmsKit.Application.Contracts/Volo.CmsKit.Application.Contracts.csproj b/modules/cms-kit/src/Volo.CmsKit.Application.Contracts/Volo.CmsKit.Application.Contracts.csproj index d2a8333872..5865bc7768 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Application.Contracts/Volo.CmsKit.Application.Contracts.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Application.Contracts/Volo.CmsKit.Application.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Application/Volo.CmsKit.Application.csproj b/modules/cms-kit/src/Volo.CmsKit.Application/Volo.CmsKit.Application.csproj index 124004a13e..a5e0022480 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Application/Volo.CmsKit.Application.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Application/Volo.CmsKit.Application.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo.CmsKit.Common.Application.Contracts.csproj b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo.CmsKit.Common.Application.Contracts.csproj index 35eaad3c5e..eae1839bd6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo.CmsKit.Common.Application.Contracts.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo.CmsKit.Common.Application.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj index 379a2ba1f3..5f97d3b5b6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/Volo.CmsKit.Common.HttpApi.Client.csproj b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/Volo.CmsKit.Common.HttpApi.Client.csproj index 806a9326b7..c500a7cb64 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/Volo.CmsKit.Common.HttpApi.Client.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/Volo.CmsKit.Common.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo.CmsKit.Common.HttpApi.csproj b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo.CmsKit.Common.HttpApi.csproj index d097dd1f3b..075b943b87 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo.CmsKit.Common.HttpApi.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo.CmsKit.Common.HttpApi.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj index 98659fb205..0ab87fd61f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; true Library diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo.CmsKit.Domain.Shared.csproj b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo.CmsKit.Domain.Shared.csproj index b8f482e29d..892af4f550 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo.CmsKit.Domain.Shared.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo.CmsKit.Domain.Shared.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 true diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/he.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/he.json new file mode 100644 index 0000000000..0c75592e37 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/he.json @@ -0,0 +1,290 @@ +{ + "culture": "he", + "texts": { + "AddSubMenuItem": "הוספת פריט משנה לתפריט", + "AreYouSure": "האם להמשיך?", + "AverageRating": "דירוג ממוצע", + "BlogDeletionConfirmationMessage": "הבלוג '{0}' יימחק. להמשיך?", + "BlogFeatureNotAvailable": "תכונה זו אינה זמינה כרגע. כדי להשתמש בה, הפעילו אותה באמצעות 'GlobalFeatureManager'.", + "BlogId": "בלוג", + "BlogPostDeletionConfirmationMessage": "הפוסט '{0}' יימחק. להמשיך?", + "BlogPosts": "פוסטים", + "Blogs": "בלוגים", + "ChoosePreference": "בחירת העדפה...", + "Cms": "CMS", + "CmsKit.Comments": "תגובות", + "CmsKit.Ratings": "דירוגים", + "CmsKit.Reactions": "ריאקציות", + "CmsKit.Tags": "תגיות", + "CmsKit.MarkedItems": "פריטים מסומנים", + "CmsKit:0002": "התוכן כבר קיים!", + "CmsKit:0003": "לא ניתן לתייג את הישות {0}.", + "CmsKit:Blog:0001": "ה-slug שצוין ({Slug}) כבר קיים!", + "CmsKit:BlogPost:0001": "ה-slug שצוין כבר קיים!", + "CmsKit:Comments:0001": "לא ניתן להגיב על הישות {EntityType}.", + "CmsKit:Media:0001": "'{Name}' אינו שם מדיה תקין.", + "CmsKit:Media:0002": "לא ניתן לצרף מדיה לישות.", + "CmsKit:Page:0001": "הכתובת שצוינה ({Slug}) כבר קיימת. נסו כתובת אחרת.", + "CmsKit:Rating:0001": "לא ניתן לדרג את הישות {EntityType}.", + "CmsKit:Reaction:0001": "לא ניתן להוסיף ריאקציות לישות {EntityType}.", + "CmsKit:Tag:0002": "לא ניתן לתייג את הישות!", + "CmsKit:MarkedItem:ToggleConfirmation": "לשנות את סימון הפריט?", + "ToggleFavorite": "הוספה למועדפים או הסרה מהם", + "FavoritesFilterMessage": "יש להתחבר כדי לסנן לפי המועדפים שלך", + "FilterOnFavorites": "סינון לפי מועדפים", + "CommentAuthorizationExceptionMessage": "תגובות אלה אינן מורשות להצגה ציבורית.", + "CmsKit:Modals:Login": "כניסה", + "CmsKit:Modals:LoginModalDefaultMessage": "יש להתחבר כדי להמשיך!", + "CmsKit:Modals:YouAreNotAuthenticated": "אין לך הרשאה לבצע פעולה זו.", + "CommentDeletionConfirmationMessage": "התגובה וכל התשובות אליה יימחקו!", + "CmsKit:MarkedItem:0001": "לא ניתן לסמן את הישות {EntityType}.", + "CmsKit:MarkedItem:0002": "לא נמצאה הגדרה לסוג הישות '{EntityType}'.", + "CmsKit:MarkedItem:0003": "כבר קיימת הגדרה לסוג הישות '{EntityType}'. לכל סוג ישות צריכה להיות הגדרה אחת בלבד.", + "CmsKit:MarkedItem:LoginMessage": "יש להתחבר כדי לסמן פריט זה.", + "Comments": "תגובות", + "Content": "תוכן", + "ContentDeletionConfirmationMessage": "למחוק את התוכן הזה?", + "Contents": "תכנים", + "CoverImage": "תמונת שער", + "CreateBlogPostPage": "פוסט חדש", + "CreationTime": "זמן יצירה", + "Delete": "מחיקה", + "Detail": "פרטים", + "Details": "פרטים", + "DisplayName": "שם תצוגה", + "DoYouPreferAdditionalEmails": "לקבל אימיילים נוספים?", + "Edit": "עריכה", + "EndDate": "תאריך סיום", + "EntityId": "מזהה ישות", + "EntityType": "סוג ישות", + "ExportCSV": "ייצוא ל-CSV", + "Features": "תכונות", + "GenericDeletionConfirmationMessage": "למחוק את '{0}'?", + "IsActive": "פעיל", + "LastModification": "שינוי אחרון", + "LastModificationTime": "זמן השינוי האחרון", + "LoginToAddComment": "יש להתחבר כדי להגיב", + "LoginToRate": "יש להתחבר כדי לדרג", + "LoginToReact": "יש להתחבר כדי להוסיף ריאקציה", + "LoginToReply": "יש להתחבר כדי להשיב", + "MainMenu": "תפריט ראשי", + "MakeMainMenu": "הגדרה כתפריט ראשי", + "Menu:CMS": "CMS", + "Menus": "תפריטים", + "MenuDeletionConfirmationMessage": "התפריט '{0}' יימחק. להמשיך?", + "MenuItemDeletionConfirmationMessage": "למחוק את פריט התפריט הזה?", + "MenuItemMoveConfirmMessage": "להעביר את '{0}' אל מתחת ל-'{1}'?", + "MenuItems": "פריטי תפריט", + "Message": "הודעה", + "MessageDeletionConfirmationMessage": "התגובה הזו תימחק לצמיתות.", + "NewBlog": "בלוג חדש", + "NewBlogPost": "פוסט חדש", + "NewMenu": "תפריט חדש", + "NewMenuItem": "פריט חדש ברמה העליונה של התפריט", + "NewPage": "דף חדש", + "NewTag": "תגית חדשה", + "NoMenuItems": "אין עדיין פריטי תפריט!", + "OK": "אישור", + "PageDeletionConfirmationMessage": "למחוק את הדף הזה?", + "PageId": "דף", + "Pages": "דפים", + "PageSlugInformation": "ה-slug משמש בכתובת ה-URL. הכתובת תהיה '/{{slug}}'.", + "BlogSlugInformation": "ה-slug משמש בכתובת ה-URL. הכתובת תהיה '/{0}/{{slug}}'.", + "Permission:BlogManagement": "ניהול בלוגים", + "Permission:BlogManagement.Create": "יצירה", + "Permission:BlogManagement.Delete": "מחיקה", + "Permission:BlogManagement.Features": "תכונות", + "Permission:BlogManagement.Update": "עדכון", + "Permission:BlogPostManagement": "ניהול פוסטים", + "Permission:BlogPostManagement.Create": "יצירה", + "Permission:BlogPostManagement.Delete": "מחיקה", + "Permission:BlogPostManagement.Update": "עדכון", + "Permission:BlogPostManagement.Publish": "פרסום", + "Permission:CmsKit": "ניהול CmsKit", + "Permission:Comments": "ניהול תגובות", + "Permission:Comments.Delete": "מחיקה", + "Permission:Comments.Update": "עדכון", + "Permission:Comments.SettingManagement": "ניהול הגדרות", + "Permission:Contents": "ניהול תוכן", + "Permission:Contents.Create": "יצירת תוכן", + "Permission:Contents.Delete": "מחיקת תוכן", + "Permission:Contents.Update": "עדכון תוכן", + "Permission:MediaDescriptorManagement": "ניהול מדיה", + "Permission:MediaDescriptorManagement:Create": "יצירה", + "Permission:MediaDescriptorManagement:Delete": "מחיקה", + "Permission:MenuItemManagement": "ניהול פריטי תפריט", + "Permission:MenuItemManagement.Create": "יצירה", + "Permission:MenuItemManagement.Delete": "מחיקה", + "Permission:MenuItemManagement.Update": "עדכון", + "Permission:MenuManagement": "ניהול תפריטים", + "Permission:MenuManagement.Create": "יצירה", + "Permission:MenuManagement.Delete": "מחיקה", + "Permission:MenuManagement.Update": "עדכון", + "Permission:Menus": "ניהול תפריטים", + "Permission:Menus.Create": "יצירה", + "Permission:Menus.Delete": "מחיקה", + "Permission:Menus.Update": "עדכון", + "Permission:PageManagement": "ניהול דפים", + "Permission:PageManagement:Create": "יצירה", + "Permission:PageManagement:Delete": "מחיקה", + "Permission:PageManagement:Update": "עדכון", + "Permission:PageManagement:SetAsHomePage": "הגדרה כדף הבית", + "Permission:TagManagement": "ניהול תגיות", + "Permission:TagManagement.Create": "יצירה", + "Permission:TagManagement.Delete": "מחיקה", + "Permission:TagManagement.Update": "עדכון", + "Permission:GlobalResources": "משאבים גלובליים", + "Permission:CmsKitPublic": "CmsKit ציבורי", + "Permission:Comments.DeleteAll": "מחיקת הכול", + "PickYourReaction": "בחירת ריאקציה", + "Rating": "דירוג", + "RatingUndoMessage": "הדירוג שלך יבוטל.", + "Reactions": "ריאקציות", + "Read": "קריאה", + "RepliesToThisComment": "תשובות לתגובה זו", + "Reply": "תשובה", + "ReplyTo": "תשובה אל", + "SamplePageMessage": "דף לדוגמה עבור מודול ה-Pro", + "SaveChanges": "שמירת השינויים", + "Script": "סקריפט", + "SelectLayout": "בחירת פריסה", + "SelectAll": "בחירת הכול", + "Send": "שליחה", + "SendMessage": "שליחת הודעה", + "SelectedAuthor": "מחבר", + "ShortDescription": "תיאור קצר", + "Slug": "Slug", + "Source": "מקור", + "SourceUrl": "כתובת המקור", + "Star": "כוכב", + "StartDate": "תאריך התחלה", + "Style": "סגנון", + "Subject": "נושא", + "SubjectPlaceholder": "הקלידו נושא", + "Submit": "שליחה", + "Subscribe": "הרשמה לעדכונים", + "SavedSuccessfully": "נשמר בהצלחה!", + "TagDeletionConfirmationMessage": "למחוק את התגית '{0}'?", + "Tags": "תגיות", + "Text": "טקסט", + "ThankYou": "תודה", + "Title": "כותרת", + "TotalRatings": "סך הדירוגים", + "Undo": "ביטול", + "Update": "עדכון", + "UpdatePreferenceSuccessMessage": "ההעדפות שלך נשמרו.", + "UpdateYourEmailPreferences": "עדכון העדפות האימייל", + "UnMakeMainMenu": "ביטול ההגדרה כתפריט ראשי", + "UploadFailedMessage": "ההעלאה נכשלה.", + "UserId": "מזהה משתמש", + "Username": "שם משתמש", + "YourComment": "התגובה שלך", + "YourEmailAddress": "כתובת האימייל שלך", + "YourFullName": "השם המלא שלך", + "YourMessage": "ההודעה שלך", + "YourReply": "התשובה שלך", + "MarkdownSupported": "יש תמיכה ב-Markdown.", + "GlobalResources": "משאבים גלובליים", + "CmsKit.BlogPost.Status.0": "טיוטה", + "CmsKit.BlogPost.Status.1": "פורסם", + "CmsKit.BlogPost.Status.2": "ממתין לבדיקה", + "BlogPostPublishConfirmationMessage": "לפרסם את הפוסט \"{0}\"?", + "SuccessfullyPublished": "פורסם בהצלחה!", + "Draft": "טיוטה", + "Publish": "פרסום", + "BlogPostDraftConfirmationMessage": "להעביר את הפוסט \"{0}\" לטיוטה?", + "BlogPostSendToReviewConfirmationMessage": "לשלוח את הפוסט \"{0}\" לבדיקת מנהל לפני הפרסום?", + "SaveAsDraft": "שמירה כטיוטה", + "SendToReview": "שליחה לבדיקה", + "SendToReviewToPublish": "שליחה לבדיקה לפני פרסום", + "BlogPostSendToReviewSuccessMessage": "הפוסט \"{0}\" נשלח לבדיקת מנהל לפני הפרסום.", + "HasBlogPostWaitingForReviewMessage": "יש לך פוסט שממתין לבדיקה. לחצו כדי להציג את הרשימה.", + "SelectAStatus": "בחירת סטטוס", + "Status": "סטטוס", + "CmsKit.BlogPost.ScrollIndex": "סרגל ניווט מהיר בפוסטים", + "CmsKit.BlogPost.PreventXssFeature": "מניעת XSS", + "Add": "הוספה", + "AddWidget": "הוספת ווידג'ט", + "PleaseConfigureWidgets": "יש להגדיר ווידג'טים", + "SelectAnAuthor": "בחירת מחבר", + "InThisDocument": "במסמך זה", + "GoToTop": "חזרה למעלה", + "SetAsHomePage": "שינוי ההגדרה כדף הבית", + "CompletedSettingAsHomePage": "הוגדר כדף הבית", + "IsHomePage": "דף הבית", + "RemovedSettingAsHomePage": "ההגדרה כדף הבית הוסרה", + "Feature:CmsKitGroup": "CMS Kit", + "Feature:BlogEnable": "בלוג", + "Feature:BlogEnableDescription": "מערכת הבלוגים של CMS Kit, שמאפשרת ליצור בלוגים ופוסטים ביישום באופן דינמי.", + "Feature:CommentEnable": "תגובות", + "Feature:CommentEnableDescription": "מערכת התגובות של CMS Kit, שמאפשרת להגיב על ישויות כמו BlogPost.", + "Feature:GlobalResourceEnable": "משאבים גלובליים", + "Feature:GlobalResourceEnableDescription": "תכונת המשאבים הגלובליים של CMS Kit, שמאפשרת לנהל סגנונות וסקריפטים גלובליים.", + "Feature:MenuEnable": "תפריט", + "Feature:MenuEnableDescription": "מערכת התפריטים הדינמית של CMS Kit, שמאפשרת להוסיף ולהסיר תפריטים ביישום באופן דינמי.", + "Feature:PageEnable": "דפים", + "Feature:PageEnableDescription": "מערכת הדפים של CMS Kit, שמאפשרת ליצור דפים סטטיים עם כתובת URL מוגדרת.", + "Feature:RatingEnable": "דירוג", + "Feature:RatingEnableDescription": "מערכת הדירוג של CMS Kit, שמאפשרת למשתמשים לדרג ישויות כמו BlogPost.", + "Feature:ReactionEnable": "ריאקציות", + "Feature:ReactionEnableDescription": "מערכת הריאקציות של CMS Kit, שמאפשרת למשתמשים להוסיף ריאקציות לישויות כמו BlogPost, תגובות ועוד.", + "Feature:TagEnable": "תגיות", + "Feature:TagEnableDescription": "מערכת התגיות של CMS Kit, שמאפשרת לתייג ישויות כמו BlogPost.", + "Feature:MarkedItemEnable": "פריטים מסומנים", + "Feature:MarkedItemEnableDescription": "מערכת הסימון של CMS Kit, שמאפשרת למשתמשים לסמן ישויות כמועדפות.", + "DeleteBlogPostMessage": "הבלוג יימחק. להמשיך?", + "CaptchaCode": "קוד CAPTCHA", + "CommentTextRequired": "יש לכתוב תגובה", + "CaptchaCodeErrorMessage": "התשובה ל-CAPTCHA שגויה. נסו שוב", + "CaptchaCodeMissingMessage": "חסר קוד CAPTCHA!", + "UnAllowedExternalUrlMessage": "התגובה כוללת כתובת URL חיצונית שאינה מותרת. נסו שוב בלי הכתובת החיצונית.", + "URL": "כתובת URL", + "PopularTags": "תגיות פופולריות", + "RemoveCoverImageConfirmationMessage": "להסיר את תמונת השער?", + "RemoveCoverImage": "הסרת תמונת השער", + "CssClass": "מחלקת CSS", + "TagsHelpText": "יש להפריד תגיות בפסיקים (לדוגמה: tag1, tag2, tag3)", + "ThisPartOfContentCouldntBeLoaded": "לא ניתן היה לטעון חלק זה של התוכן.", + "DuplicateCommentAttemptMessage": "זוהה ניסיון לשלוח תגובה כפולה. התגובה שלך כבר נשלחה.", + "NoBlogPostYet": "אין עדיין פוסטים!", + "CmsKit:Comment": "תגובה", + "CmsKitCommentOptions:RequireApprovement": "דרישת אישור לתגובות", + "CmsKitCommentOptions:RequireApprovementDescription": "כשהאפשרות מופעלת, תגובות יפורסמו רק אחרי שיאושרו.", + "CommentFilter:ApproveState": "מצב אישור", + "ApproveState": "מצב אישור", + "CommentFilter:0": "הכול", + "CommentFilter:1": "אושרו", + "CommentFilter:2": "נדחו", + "CommentFilter:4": "ממתינות", + "ApprovedSuccessfully": "אושר בהצלחה", + "ApprovalRevokedSuccessfully": "האישור בוטל בהצלחה", + "Approve": "אישור", + "Disapproved": "נדחה", + "CommentAlertMessage": "יש {0} תגובות שממתינות לאישור", + "Settings:Menu:CmsKit": "CMS", + "CommentsAwaitingApproval": "תגובות שממתינות לאישור", + "JustNow": "ממש עכשיו", + "MinuteAgo": "לפני דקה", + "MinutesAgo": "לפני {0} דקות", + "HourAgo": "לפני שעה", + "HoursAgo": "לפני {0} שעות", + "YesterdayAt": "אתמול ב-{0}", + "DayAt": "{0} ב-{1}", + "MonthDayAt": "{0} {1}, {2}", + "FullDate": "{0} {1} {2}", + "Minute": "ד'", + "Hour": "ש'", + "Day": "י'", + "Week": "שב'", + "CommentSubmittedForApproval": "התגובה שלך נשלחה לאישור.", + "ChooseAnActionForBlog": "בחירת פעולה לבלוג", + "AssignBlogPostsToOtherBlog": "שיוך הפוסטים לבלוג אחר", + "SelectAnBlogToAssign": "בחירת בלוג לשיוך", + "DeleteAllBlogPostsOfThisBlog": "מחיקת כל הפוסטים של הבלוג", + "RequiredPermissionName": "שם ההרשאה הנדרשת", + "Enum:PageStatus:0": "טיוטה", + "Enum:PageStatus:1": "פורסם", + "AllPosts": "כל הפוסטים", + "IsReadOnly": "לקריאה בלבד" + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo.CmsKit.Domain.csproj b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo.CmsKit.Domain.csproj index 07a0ecdc5c..e9849d8f4d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo.CmsKit.Domain.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo.CmsKit.Domain.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo.CmsKit.EntityFrameworkCore.csproj b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo.CmsKit.EntityFrameworkCore.csproj index e68b2d9ac2..30d4639a73 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo.CmsKit.EntityFrameworkCore.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo.CmsKit.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.HttpApi.Client/Volo.CmsKit.HttpApi.Client.csproj b/modules/cms-kit/src/Volo.CmsKit.HttpApi.Client/Volo.CmsKit.HttpApi.Client.csproj index 7d5a0af344..81a498f2e9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.HttpApi.Client/Volo.CmsKit.HttpApi.Client.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.HttpApi.Client/Volo.CmsKit.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.HttpApi/Volo.CmsKit.HttpApi.csproj b/modules/cms-kit/src/Volo.CmsKit.HttpApi/Volo.CmsKit.HttpApi.csproj index bdf0f22ebe..27c3bf05e6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.HttpApi/Volo.CmsKit.HttpApi.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.HttpApi/Volo.CmsKit.HttpApi.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Installer/Volo.CmsKit.Installer.csproj b/modules/cms-kit/src/Volo.CmsKit.Installer/Volo.CmsKit.Installer.csproj index 342c21858c..97c99e5557 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Installer/Volo.CmsKit.Installer.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Installer/Volo.CmsKit.Installer.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 true diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo.CmsKit.MongoDB.csproj b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo.CmsKit.MongoDB.csproj index 969a05763e..ef026d0d1b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo.CmsKit.MongoDB.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo.CmsKit.MongoDB.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo.CmsKit.Public.Application.Contracts.csproj b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo.CmsKit.Public.Application.Contracts.csproj index bb8278de7e..6fc255a64c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo.CmsKit.Public.Application.Contracts.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo.CmsKit.Public.Application.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj index 8fa00ef055..eed541a9e6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/Volo.CmsKit.Public.HttpApi.Client.csproj b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/Volo.CmsKit.Public.HttpApi.Client.csproj index cf59c83865..8cc0acd566 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/Volo.CmsKit.Public.HttpApi.Client.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/Volo.CmsKit.Public.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo.CmsKit.Public.HttpApi.csproj b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo.CmsKit.Public.HttpApi.csproj index 050b671885..c394705d88 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo.CmsKit.Public.HttpApi.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo.CmsKit.Public.HttpApi.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj index 5d7d2ba74e..5c81d741d6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; true Library diff --git a/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.csproj index f8327abe5e..a7d87ed9e5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; true Library diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Volo.CmsKit.Application.Tests.csproj b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Volo.CmsKit.Application.Tests.csproj index b142c53002..d1dc3e0e5a 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Volo.CmsKit.Application.Tests.csproj +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Volo.CmsKit.Application.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.CmsKit diff --git a/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Volo.CmsKit.Domain.Tests.csproj b/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Volo.CmsKit.Domain.Tests.csproj index cb7adf786b..5ead73d585 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Volo.CmsKit.Domain.Tests.csproj +++ b/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Volo.CmsKit.Domain.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.CmsKit diff --git a/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/Volo.CmsKit.EntityFrameworkCore.Tests.csproj b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/Volo.CmsKit.EntityFrameworkCore.Tests.csproj index 04a6e55260..8db10526ea 100644 --- a/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/Volo.CmsKit.EntityFrameworkCore.Tests.csproj +++ b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/Volo.CmsKit.EntityFrameworkCore.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.CmsKit diff --git a/modules/cms-kit/test/Volo.CmsKit.HttpApi.Client.ConsoleTestApp/Volo.CmsKit.HttpApi.Client.ConsoleTestApp.csproj b/modules/cms-kit/test/Volo.CmsKit.HttpApi.Client.ConsoleTestApp/Volo.CmsKit.HttpApi.Client.ConsoleTestApp.csproj index cde0230a07..781225195e 100644 --- a/modules/cms-kit/test/Volo.CmsKit.HttpApi.Client.ConsoleTestApp/Volo.CmsKit.HttpApi.Client.ConsoleTestApp.csproj +++ b/modules/cms-kit/test/Volo.CmsKit.HttpApi.Client.ConsoleTestApp/Volo.CmsKit.HttpApi.Client.ConsoleTestApp.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 Volo.CmsKit diff --git a/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/Volo.CmsKit.MongoDB.Tests.csproj b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/Volo.CmsKit.MongoDB.Tests.csproj index 15222835c2..0568e11222 100644 --- a/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/Volo.CmsKit.MongoDB.Tests.csproj +++ b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/Volo.CmsKit.MongoDB.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.CmsKit diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Volo.CmsKit.TestBase.csproj b/modules/cms-kit/test/Volo.CmsKit.TestBase/Volo.CmsKit.TestBase.csproj index b08025d5d6..662cab10e3 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Volo.CmsKit.TestBase.csproj +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Volo.CmsKit.TestBase.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 Volo.CmsKit diff --git a/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj b/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj index 1492f54702..ef3c47cca1 100644 --- a/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj +++ b/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 diff --git a/modules/docs/app/VoloDocs.Migrator/Dockerfile b/modules/docs/app/VoloDocs.Migrator/Dockerfile index c28d55f0f6..94c52176a1 100644 --- a/modules/docs/app/VoloDocs.Migrator/Dockerfile +++ b/modules/docs/app/VoloDocs.Migrator/Dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:11.0 AS base WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build WORKDIR /src COPY . . WORKDIR "/src/modules/docs/app/VoloDocs.Migrator" diff --git a/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj b/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj index 46e8617e36..8dac1e9b35 100644 --- a/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj +++ b/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 Exe win-x64;linux-x64;osx-x64 diff --git a/modules/docs/app/VoloDocs.Web/Dockerfile b/modules/docs/app/VoloDocs.Web/Dockerfile index f2cbcbc2e1..e0f6a1512f 100644 --- a/modules/docs/app/VoloDocs.Web/Dockerfile +++ b/modules/docs/app/VoloDocs.Web/Dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:11.0 AS base WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build WORKDIR /src COPY . . WORKDIR "/src/modules/docs/app/VoloDocs.Web" diff --git a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj index 31e944e8c7..7910879a4a 100644 --- a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj +++ b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj @@ -3,7 +3,7 @@ - net10.0 + net11.0 true true false diff --git a/modules/docs/app/VoloDocs.Web/package.json b/modules/docs/app/VoloDocs.Web/package.json index 64d75f01f0..3b8a67b2fa 100644 --- a/modules/docs/app/VoloDocs.Web/package.json +++ b/modules/docs/app/VoloDocs.Web/package.json @@ -3,7 +3,7 @@ "name": "volo.docstestapp", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~10.7.0", - "@abp/docs": "~10.7.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "~11.0.0-rc.1", + "@abp/docs": "~11.0.0-rc.1" } } diff --git a/modules/docs/app/VoloDocs.Web/yarn.lock b/modules/docs/app/VoloDocs.Web/yarn.lock index 9babc3105b..d636126e48 100644 --- a/modules/docs/app/VoloDocs.Web/yarn.lock +++ b/modules/docs/app/VoloDocs.Web/yarn.lock @@ -2,223 +2,215 @@ # yarn lockfile v1 -"@abp/anchor-js@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/anchor-js/-/anchor-js-10.7.0-rc.4.tgz#de5a73be91a8fc2f51b2f4e7a8eee93347c9d6ce" - integrity sha512-iDjdfGPHaGTdwoQgJhEojOi0BNZy9Nz1CShQgwlvu2wXiBLxCKw+eFkLISBSpqH0qHbJSSqsmZXKz3A8MVPu8w== +"@abp/anchor-js@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/anchor-js/-/anchor-js-11.0.0-rc.1.tgz#38692cd7c014f78313bae43504893e1f11702ede" + integrity sha512-SXJn4qjbxTWCGt/WvQjwBO0WQsIduY45ISiG6+8fmOgCV/Iizyusa7GCuE7fwtiXh8eYsiGkrhqhGuUdaXmK2w== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" anchor-js "^5.0.0" -"@abp/aspnetcore.mvc.ui.theme.basic@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-10.7.0-rc.4.tgz#0f9eacc9bb9807553ca0465d24fccee5805db2fc" - integrity sha512-v2RabyrSXPN2H4eByd3mSxxjjutUvH5LnKVRuffFZ4kA7Em7ZhD9hfKeBxYY+OuWfwVhEeKX/Rvd6jyAhbVf6Q== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~10.7.0-rc.4" - -"@abp/aspnetcore.mvc.ui.theme.shared@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-10.7.0-rc.4.tgz#353aaa338ab0841d042c4df2ce7af9913f5d8eed" - integrity sha512-CeVeaxH1D8FFtySSXvhrKBm2t9VVDdy+bbk51WFi54rQlicxFdQixYQogYTvs9e4/XaOvDpOC2T4SIVPbiC94Q== - dependencies: - "@abp/aspnetcore.mvc.ui" "~10.7.0-rc.4" - "@abp/bootstrap" "~10.7.0-rc.4" - "@abp/bootstrap-datepicker" "~10.7.0-rc.4" - "@abp/bootstrap-daterangepicker" "~10.7.0-rc.4" - "@abp/datatables.net-bs5" "~10.7.0-rc.4" - "@abp/font-awesome" "~10.7.0-rc.4" - "@abp/jquery-validation-unobtrusive" "~10.7.0-rc.4" - "@abp/lodash" "~10.7.0-rc.4" - "@abp/luxon" "~10.7.0-rc.4" - "@abp/malihu-custom-scrollbar-plugin" "~10.7.0-rc.4" - "@abp/moment" "~10.7.0-rc.4" - "@abp/select2" "~10.7.0-rc.4" - "@abp/sweetalert2" "~10.7.0-rc.4" - "@abp/timeago" "~10.7.0-rc.4" - -"@abp/aspnetcore.mvc.ui@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-10.7.0-rc.4.tgz#fb34369f924ce07866c731dec474d05bc7c1cc8e" - integrity sha512-JSz40zPIxcbkoYKZKvbTs32UfR7nbMoUe20g66tVHbN1Tn2fd2VMFD8elm4L03Tc+iZoLPXi5AsF9QD7zM7YJA== +"@abp/aspnetcore.mvc.ui.theme.basic@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-11.0.0-rc.1.tgz#f3f6157708b225aaf93567e6cce031740af1e4cf" + integrity sha512-EyeC+rt1pbnRquE8DEsL9ZR/xrEQFwqLdactTifCrcjF9gSXwKhJ5GJKccEFscoLvoy/EdPnWtylGlcHOF7yFA== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~11.0.0-rc.1" + +"@abp/aspnetcore.mvc.ui.theme.shared@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-11.0.0-rc.1.tgz#77ac0fa4f15e2055981a8e78a986caf4d5b24717" + integrity sha512-fb44VGo5FnBGbgYl5n5HoXJmpv3YW3rIKTH8CJ0FemVc+DkxAcHxdUx5jb2YhWG2IXaCdKKzwxzr+0ksIbKAWA== + dependencies: + "@abp/aspnetcore.mvc.ui" "~11.0.0-rc.1" + "@abp/bootstrap" "~11.0.0-rc.1" + "@abp/bootstrap-datepicker" "~11.0.0-rc.1" + "@abp/bootstrap-daterangepicker" "~11.0.0-rc.1" + "@abp/datatables.net-bs5" "~11.0.0-rc.1" + "@abp/font-awesome" "~11.0.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~11.0.0-rc.1" + "@abp/lodash" "~11.0.0-rc.1" + "@abp/luxon" "~11.0.0-rc.1" + "@abp/moment" "~11.0.0-rc.1" + "@abp/select2" "~11.0.0-rc.1" + "@abp/sweetalert2" "~11.0.0-rc.1" + "@abp/timeago" "~11.0.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-11.0.0-rc.1.tgz#45d83b3a3f16dbac155c0e9258a14cb26365acf4" + integrity sha512-VfVt8r13yOg/fp+DjUNsTmv56UWcDIySA9qdVfMgiIbiomwguKx0aaokqNf6yCRB7wA21TQHgLbrS71IpV9uWA== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-10.7.0-rc.4.tgz#9f2f9ba0590e01739d6ee68824e69eae275c7962" - integrity sha512-T5sIxswsQIwm20xfuymji5xud5GphO+c1hKQ6tYpPAtUhg1g8ABDY1pGBdWbxCJh3uOuhlF8grp9pT+xUy9i1w== +"@abp/bootstrap-datepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-11.0.0-rc.1.tgz#6fa5a9345db1a94d2466907c2a85341287ef77ba" + integrity sha512-E4GaKtllZ5L4uz0uPSaaHLIucpC6dw4kAqM+n+rLk4txoqUdAPs+vzjHnICgp/YnSWWhAmuOhYnWfny6TD3HXw== dependencies: - bootstrap-datepicker "^1.10.1" + bootstrap-datepicker "1.10.1" + jquery "~4.0.0" -"@abp/bootstrap-daterangepicker@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-10.7.0-rc.4.tgz#0cc427a9320211bc2ae4383dc228747f03d8b132" - integrity sha512-p2qiX8FuplFS/8mUbnSVc2ZgoSpU6DkLL/4yuXIwA3rLhR9dcqyRxqpFzj8H5nQ1AKaEzddylFNzzhV0sCB8lw== +"@abp/bootstrap-daterangepicker@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-11.0.0-rc.1.tgz#3c06aa2c6a4860a7a23874491d33a12393d907aa" + integrity sha512-uDj2Pc7ksZbLCfoJKixt3zbvA7jASvLd4ndqjkhgTsMrRXh4atgaFcvjCs0NKkCqGjyI5xJoGDTTc38HToWnLQ== dependencies: - "@abp/moment" "~10.7.0-rc.4" - bootstrap-daterangepicker "^3.1.0" + "@abp/moment" "~11.0.0-rc.1" + jquery "~4.0.0" + moment "^2.30.1" -"@abp/bootstrap@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-10.7.0-rc.4.tgz#1916f312c6b46b0d17591b514e12d1fd93bcaf2c" - integrity sha512-CqmKWa2McXnJj0U9NOraxTdJyadfm1lQnc0WisiSg6HllvMmE3KUf7GgpiM4nxQlQt9Z0/8hWPhq5cLiLLc8dA== +"@abp/bootstrap@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-11.0.0-rc.1.tgz#ac127a386437aa6a62b2e7188837a40f4f0dd036" + integrity sha512-lYhyk6qlt6QsJgb+HBccryB9g9Tw+/qLJ5bYmgsJyoBYGUt74jtdNVi6JDy+7O7+k4aRvvA3XDNOfnS1DbfNvg== dependencies: - "@abp/core" "~10.7.0-rc.4" - "@abp/popper.js" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" + "@abp/popper.js" "~11.0.0-rc.1" bootstrap "^5.3.8" -"@abp/clipboard@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-10.7.0-rc.4.tgz#5b8b8264775de9ba3f1e86f12ab2eb98fe932e33" - integrity sha512-wqX9L6Y9YCtzXBYxVyM+k+SGFhCKMtV4r1JMAwj8cmuAvEKcuBhJ1hQojVWXLzjoYQPbNu9vW7ypmE/+trcwtQ== +"@abp/clipboard@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-11.0.0-rc.1.tgz#45565ea7ad5fe54d9a17f158a2c666150fcb5de5" + integrity sha512-C/FHYR19n1cpcKmDPiSBUG5umxbddTX6p6m0QMVopQV235li54L8nNUlZzKjYdjc1ESgFKoJhtmegdspPjvysA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" clipboard "^2.0.11" -"@abp/core@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-10.7.0-rc.4.tgz#e1d8a7c378a807cde22cdf0f8b7ba21ec4e2d7cd" - integrity sha512-uZuJywMXK4W3YoQKZVbHLG4OekXhElnpJHOI78a1o2ESDz7bMP2Nfs8n8KSSXGz8b5yRCIlyf9/G7majYnjAcw== +"@abp/core@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-11.0.0-rc.1.tgz#5db5e442b9cd5dc0f654ffe858865b6dbcb7f61e" + integrity sha512-iw7qPkNpeMrjd0kVVVrVHuFzVlgbuvscZsEvLMT8YEhvUD0ABmGfTxChuuIcgV1R4hpXegvfsUDiVIKcY1YcVg== dependencies: - "@abp/utils" "~10.7.0-rc.4" + "@abp/utils" "~11.0.0-rc.1" -"@abp/datatables.net-bs5@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-10.7.0-rc.4.tgz#d87c26ab7604971d969ccda27c78795475af793a" - integrity sha512-SPlNc9zzzmDCENf6dQtpKAxXEIpHRaidZEDsx7MUcdcnGEI8xs0Wg3vXzNMhz65OhSoW2FYQKapdAa0uzB02Dg== +"@abp/datatables.net-bs5@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-11.0.0-rc.1.tgz#1d7e9471c68c0eb64e9476967670d69fa897b7f3" + integrity sha512-VsQBlEx+ga8/X10i29XMs9Mjj2W83hSPsYftgByq09NiwtUVfX6t7yiGf4wF9+rk7fiRt3XQ4sXi6G1Ji9nqyQ== dependencies: - "@abp/datatables.net" "~10.7.0-rc.4" + "@abp/datatables.net" "~11.0.0-rc.1" datatables.net-bs5 "^2.3.4" -"@abp/datatables.net@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-10.7.0-rc.4.tgz#d64f7fe7e3adea76b238fd3ff59cd63a4445b2fe" - integrity sha512-4JtMRiQAvLY+IOqofHE6tNRwjG4ONyiFikgoKmNPfnue7wXIIA6BUgdUAeABan4S0kSwHOttM7MHyZkQLjzTHw== +"@abp/datatables.net@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-11.0.0-rc.1.tgz#2402b8192d41e4cd435b4e212604c32013b7d142" + integrity sha512-fNpr2eo9ZUghWiESK5QouB8rZoNGFFE+c+6BwcqchTnc9wcGj0wz+UEYtWZFitpHniWV2RRcVSoMM8waKzSl7w== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" datatables.net "^2.3.4" -"@abp/docs@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/docs/-/docs-10.7.0-rc.4.tgz#b10fd05cb8301cb6c0928ef3cc793edb54d7c5da" - integrity sha512-92xJAucoMuOTUAjgbOJEIJtGlxyVL8An4N3JaSpGeIVkNozSM1Trm0QiIcyhtRXZcSjeiLKw8oU0g541PFDbVw== +"@abp/docs@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/docs/-/docs-11.0.0-rc.1.tgz#5874370c9659515ee1a9ce6831762f02fd6552a8" + integrity sha512-66/5ashY+ZQASiFW+O8Frvlzx+sq0EAQJfiOOP2roQAS64l2Tn0whIAdhskW+pFTaMDOQ5dyJQ/J4UYZwjPTxw== dependencies: - "@abp/anchor-js" "~10.7.0-rc.4" - "@abp/clipboard" "~10.7.0-rc.4" - "@abp/malihu-custom-scrollbar-plugin" "~10.7.0-rc.4" - "@abp/popper.js" "~10.7.0-rc.4" - "@abp/prismjs" "~10.7.0-rc.4" - -"@abp/font-awesome@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-10.7.0-rc.4.tgz#9ce20b82685facea8564965ab3ad07764b29eccc" - integrity sha512-oalR5fBPImD4q0yYPbscJ858sDo8kJhFgixpViPc3bbaN41M5JPBpVR+K3UXQYfO93a0mhLoVb20bRMggWyhQQ== + "@abp/anchor-js" "~11.0.0-rc.1" + "@abp/clipboard" "~11.0.0-rc.1" + "@abp/popper.js" "~11.0.0-rc.1" + "@abp/prismjs" "~11.0.0-rc.1" + +"@abp/font-awesome@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-11.0.0-rc.1.tgz#0accc6fb2168515688f5a36f8dd3d4d4236f533d" + integrity sha512-/u4oXQGjet8VE/L1SZDsNCK4q6D9m9B50Em+Mkp8F7W/F6uLnyXGcWNyuHR3DMqvjEOXUc1WHE/zJQx8gsAFDw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@fortawesome/fontawesome-free" "^7.0.1" -"@abp/jquery-validation-unobtrusive@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-10.7.0-rc.4.tgz#a8c7daa832d72780e9b601ba0c667fe58433a817" - integrity sha512-VCnTyd3nvafI3A4XHM8jWhBCJ+0B3N6H4LeVW5AK0wyvk38q78tWAqI0ZaYgz3ObTKMuCTa+gCbmq9B/zrkT3Q== +"@abp/jquery-validation-unobtrusive@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-11.0.0-rc.1.tgz#8bd71ad4f2882b02a12a8c36443361d23f62e386" + integrity sha512-FF2pBceeNP9cUA1mj5T/fYpG5nq1DvrSyL7iOwrtqixDV8R9jgpZFCA146K0UMiqkzdtH9WiFRwL6690QAmkEg== dependencies: - "@abp/jquery-validation" "~10.7.0-rc.4" - jquery-validation-unobtrusive "^4.0.0" + "@abp/jquery-validation" "~11.0.0-rc.1" + jquery-validation "^1.22.1" -"@abp/jquery-validation@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-10.7.0-rc.4.tgz#5309e6f4b9b61124855df83268b8b1b99bd91eb6" - integrity sha512-TtIQWMWzI8ucPWwI2Jx9wyXH0Tl3m2h4r98T+wFlQ3UlDUn3x1SfLxhDPH7IX1RYMaa/3go1HlL/JRgK5yeIxw== +"@abp/jquery-validation@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-11.0.0-rc.1.tgz#fcc4fd82904750de70bbfc3f28b165768de7f992" + integrity sha512-JOxpgQoRi6dx12si3ArXdc8ElS2yaHlKxpYz4lgBlUschJoljsx0z2hhZzopJMhSaXFABHWGQmH9ssjmZaerlQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" + "@abp/jquery" "~11.0.0-rc.1" jquery-validation "^1.22.1" -"@abp/jquery@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-10.7.0-rc.4.tgz#4aa75a520186a74303a2de511c19115310c7e2a4" - integrity sha512-YcXWXpsCGMUxMWg1QakOWmTjFJLpN+/QxfVuCjNJiHZJrHN0Ea5CPDWnLMqM46RhgoUAxg22EWYRi83j7mlYdg== +"@abp/jquery@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-11.0.0-rc.1.tgz#7d6df2229760e5b2cfdc9aa7746b37a95a3e2001" + integrity sha512-87tkbkRp4xQ3ih9Ri1nxTxqmd424nAFT1WFpWld1Aq1GYUg64mgPMc3CrTxUa8yYfMZdSJbWBsT7gh0C+7XVjg== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" jquery "~4.0.0" jquery-migrate "~4.0.2" -"@abp/lodash@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-10.7.0-rc.4.tgz#77069cfb8a2d3496c03475a18ef6ef442b29de9e" - integrity sha512-g+C3bjjjpas4VZPAt2o1b+DLr31pCn7U61rpYGjT6BoI6rPmu8WX8yFImyRB8S2QJ7FQT/Dr3p6GxPNn2mAE4A== +"@abp/lodash@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-11.0.0-rc.1.tgz#5b77df8d96905024442040cd352db4bfb863c2f4" + integrity sha512-uEvbpUPogY0VLzyFDIeo2JdsUxs1imX4aDbm8Jj2BKrFf1kfQ3dQUFtzwfDE4y+9dYvxtHXZkYsV2VA/9qaRTA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" lodash "^4.18.1" -"@abp/luxon@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-10.7.0-rc.4.tgz#d5fab55855d88aec6d9fcc3eb27805b64ccb5942" - integrity sha512-IyihWt3NInSMmV+kFKbPPyxf9ajHNwEuLUk3VCfmHy01ef/GjFS4RaEJ2xd8U0OiuGm0ZnTi6yqjm1sOQ0quNQ== +"@abp/luxon@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-11.0.0-rc.1.tgz#b2b2feb15b5e2ebabfb4d84146611011b5bb300e" + integrity sha512-e2zaTkoKDxm/ZJUuBPoxCXWpQyeWjkZuCMEtXGKcgrtEaukkhP9chwHk1mwC5WIW7AardmQl8Ozoy1xypgcveA== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" luxon "^3.7.2" -"@abp/malihu-custom-scrollbar-plugin@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-10.7.0-rc.4.tgz#33b67b4daa41e32680f392e66bcb147f7a8595d9" - integrity sha512-OXTlbuy+5R2xEfNnnphzPjvCNi5FD7FF7YBH3gnLnDG8RiNvcfma8KrLvha6YCzDmKB1AuLGMfrOrE0GuQvEBQ== - dependencies: - "@abp/core" "~10.7.0-rc.4" - malihu-custom-scrollbar-plugin "^3.1.5" - -"@abp/moment@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-10.7.0-rc.4.tgz#2f68b427e5b033719411958a9008400739b971d9" - integrity sha512-XwFRFpaOfGSwnXk/eUg2GigSLQ1OxqunmvawDSj0V5wc9xnqazNGiCOOUrUm/jpi/ozWCj7TgOWkQHM+xKHezA== +"@abp/moment@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-11.0.0-rc.1.tgz#5ffdbe14cd24f28b2f0209e9dfcb7e19794b5f78" + integrity sha512-KQqmquSme6N7nX/7omqiLh+yf0zDA5zJDdqWI12iqJGwifL9K8e/pW6EncDimX+4pwvGm7hzaBUR1j2l+lG0lg== dependencies: moment "^2.30.1" -"@abp/popper.js@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-10.7.0-rc.4.tgz#bc7a5375c1f2608c5c3ec2ea65df0e6e8aaadb29" - integrity sha512-kgoxInvffZfqvdmHHPVe39Tc/iQCvcl/RFNsAT+Ow6pGEB2A5CUABRHZn/5raP2pufYmfK3eAxtKS7M9kmv9YA== +"@abp/popper.js@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-11.0.0-rc.1.tgz#52744f487f9b302ce9ae9180970ccf47011b9461" + integrity sha512-b2nCsrhxxNzfnV7MpeRLcmUPDaPQkNIXVC0g0V1jyTx8NjU1MT09XHkwOQJxuNiUlnX8XZ+dqcq7HRdZYedu9w== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" "@popperjs/core" "^2.11.8" -"@abp/prismjs@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-10.7.0-rc.4.tgz#260ebb79700a3f46358523ae13c2d51dd5e79e7f" - integrity sha512-p/SoVXPvcsQN+57vZTzvff3JTgBFRoFk1PdoBTipQzukUEjOb7MRuDsiPI5uUK+xoQ5UD6Pu0i7Xbiyo9II6/Q== +"@abp/prismjs@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-11.0.0-rc.1.tgz#b664d55ef8c6d858a8aa7521bcb900259692a7ff" + integrity sha512-Z8KzFcaDFchXNZ3QWVkkReWS7u3GgzaoS47HWt7BLgsxu7FqLz1v4zEzKRiEy5I4sqcociESjMHltzGn4sinoQ== dependencies: - "@abp/clipboard" "~10.7.0-rc.4" - "@abp/core" "~10.7.0-rc.4" + "@abp/clipboard" "~11.0.0-rc.1" + "@abp/core" "~11.0.0-rc.1" prismjs "^1.30.0" -"@abp/select2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-10.7.0-rc.4.tgz#233fa8ba11093726b8646d61c874edcc8e84b5ef" - integrity sha512-jxVBtqcMJROQ4wU9MmqwpQ4fRt/t5ZITieC7Fy0rfCwOmJB2ihkbNyjnLxhUsevmjurmw6yyUxv5N3WP3BmHHw== +"@abp/select2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-11.0.0-rc.1.tgz#4c4a5a7315e31755ca4d4e4b1d6738910e68bbbb" + integrity sha512-XfFbMdwl5iRM+5mGKTB3rCoH+isaFGBqbcP9e67IXOkhHsZie1fEGFBomTDwvVK48q9DQhSr8gsDyJKgD9B+JQ== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" select2 "4.0.13" -"@abp/sweetalert2@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-10.7.0-rc.4.tgz#e745a1eb7a1beeaad4c1f5db7a4faf810cf22af4" - integrity sha512-uLy/1OiOTwGwCmgfwwXSqBtjozdbhmPLwUw9YbJKxojxX09VNjMWhzB4+6p1bf+JN+EPxI+HbSDCbXFDqQFA6w== +"@abp/sweetalert2@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-11.0.0-rc.1.tgz#1a6b508ed85d78f4bb843532816428dab77354b4" + integrity sha512-c0sKYRb6aCzRB+e0jl61OEqdic2FZ3ODcHoqWVBfwmn9Gc17nGr/tTCGksU5UGY5uO2+ILhdUYHdxPU/wAVsPw== dependencies: - "@abp/core" "~10.7.0-rc.4" + "@abp/core" "~11.0.0-rc.1" sweetalert2 "^11.23.0" -"@abp/timeago@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-10.7.0-rc.4.tgz#165bd42c431c0e38c1f0b3423fb38dc469b74fdf" - integrity sha512-jgOXWL0S7PL2I30kUnIYEMCtrvUwj3xR38r2XzV5xW9OKwpHL+abzccb47ZGvqvETztdzRKFX7T8AzIZ/Cxqcw== +"@abp/timeago@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-11.0.0-rc.1.tgz#6093578ed4d00e8b18fcf36b1cf92e24c5a0830d" + integrity sha512-RpWkVGD4q2BcuG6T2cMjIQXWUdwHScVUAmJSXNknHuUrEXEe4GRSpIi0HxYjfrvCGTGkAwbRwXTE5/U6XbMuRQ== dependencies: - "@abp/jquery" "~10.7.0-rc.4" - timeago "^1.6.7" + "@abp/jquery" "~11.0.0-rc.1" + timeago.js "^4.0.2" -"@abp/utils@~10.7.0-rc.4": - version "10.7.0-rc.4" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-10.7.0-rc.4.tgz#36711ccca8b20fc0fce8a0d347645948ac32a35d" - integrity sha512-9S8bMSd/XPV4bjvcXEPTqJclcjRkcpeFEqUx8iQnZkhHjhuq5B7++RpCQ/j1mzX1lBzsvCliteqUKvjtUjOY1Q== +"@abp/utils@~11.0.0-rc.1": + version "11.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-11.0.0-rc.1.tgz#91ca25e687b0d49195adf808029ba94978156c4a" + integrity sha512-WjujeW5j9Iqr5kR+8jF4lMk1E2FD9SMsOvivLOinQOE2tdipd7OlmPGX+8cwSXJXXhWJ7Y2TRqzlvn7BoZP0Yw== dependencies: just-compare "^2.3.0" @@ -242,21 +234,13 @@ ansi-colors@^4.1.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -bootstrap-datepicker@^1.10.1: +bootstrap-datepicker@1.10.1: version "1.10.1" resolved "https://registry.yarnpkg.com/bootstrap-datepicker/-/bootstrap-datepicker-1.10.1.tgz#0a8bec42957ea1ce1272b91bcf2b53696629fb86" integrity sha512-GIe+fsLp9Hi30oW7L2v2Q9/a4+aojrIA2p4ZagtLuKw2lpfQgjJjM0L6vl/lYQydGXWUbpoKbEC/O5tzWIkEKQ== dependencies: jquery ">=3.4.0 <4.0.0" -bootstrap-daterangepicker@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz#632e6fb2de4b6360c5c0a9d5f6adb9aace051fe8" - integrity sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g== - dependencies: - jquery ">=1.10" - moment "^2.9.0" - bootstrap@^5.3.8: version "5.3.8" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.8.tgz#6401a10057a22752d21f4e19055508980656aeed" @@ -303,35 +287,17 @@ jquery-migrate@~4.0.2: resolved "https://registry.yarnpkg.com/jquery-migrate/-/jquery-migrate-4.0.2.tgz#d296a64e05073017c54877462ac563f1927ee21f" integrity sha512-J15ilpECoAsObLv2robklj0qf1qt9QCnZwwNcJAXkM7dIiOgcac2dqC3HgDtUF0fmRwKZa/ggTkxTj9S4Vk+HQ== -jquery-mousewheel@>=3.0.6: - version "3.1.13" - resolved "https://registry.yarnpkg.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz#06f0335f16e353a695e7206bf50503cb523a6ee5" - integrity sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg== - -jquery-validation-unobtrusive@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.0.0.tgz#dfcf25a558496a2c883db6021d10f5398d15f99d" - integrity sha512-1ervYFFv6LX/rp7ktuLnMakHNG0piNRDyROI8Ir3hL1vPIwylAehB1AY3BPrYJnzW3WmwWryZq+Bz4sazZK9iQ== - dependencies: - jquery "^3.6.0" - jquery-validation ">=1.19" - -jquery-validation@>=1.19: - version "1.21.0" - resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.21.0.tgz#78fc05ab76020912a246af3661b3f54a438bca93" - integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w== - jquery-validation@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.22.1.tgz#fc1ae3256110332c929245a44d69ee76fee0e481" integrity sha512-ePLXLWK7Rh5eR652YsuIu7YPeGlCXrsJUteVw5iZopiU17yaMd3FaDggs6yyNMl56p8TYVeDRmKGK3fPZrMeQw== -jquery@>=1.10, "jquery@>=1.5.0 <4.0", jquery@>=1.7: +jquery@>=1.7: version "3.6.4" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.4.tgz#ba065c188142100be4833699852bf7c24dc0252f" integrity sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ== -"jquery@>=3.4.0 <4.0.0", jquery@^3.6.0: +"jquery@>=3.4.0 <4.0.0": version "3.7.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de" integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg== @@ -356,23 +322,11 @@ luxon@^3.7.2: resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.7.2.tgz#d697e48f478553cca187a0f8436aff468e3ba0ba" integrity sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew== -malihu-custom-scrollbar-plugin@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz#310cecc5e59415a1c29e9dfb5d2b6e01d66a29ef" - integrity sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ== - dependencies: - jquery-mousewheel ">=3.0.6" - moment@^2.30.1: version "2.30.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== -moment@^2.9.0: - version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" - integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== - prismjs@^1.30.0: version "1.30.0" resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.30.0.tgz#d9709969d9d4e16403f6f348c63553b19f0975a9" @@ -393,12 +347,10 @@ sweetalert2@^11.23.0: resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.26.3.tgz#6e8188cf71818af34d62fe33a2465690cde9836d" integrity sha512-VU0hGw/WfI9h7Mh+SCsDlWgtxDwWZ6ccqS7QcO8zEeWnwplN1GptcLstq76OluUBSLUza6ldvKd3558OhjpJ9A== -timeago@^1.6.7: - version "1.6.7" - resolved "https://registry.yarnpkg.com/timeago/-/timeago-1.6.7.tgz#afd467c29a911e697fc22a81888c7c3022783cb5" - integrity sha512-FikcjN98+ij0siKH4VO4dZ358PR3oDDq4Vdl1+sN9gWz1/+JXGr3uZbUShYH/hL7bMhcTpPbplJU5Tej4b4jbQ== - dependencies: - jquery ">=1.5.0 <4.0" +timeago.js@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/timeago.js/-/timeago.js-4.0.2.tgz#724e8c8833e3490676c7bb0a75f5daf20e558028" + integrity sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w== tiny-emitter@^2.0.0: version "2.1.0" diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj index a7722c5c99..a3d842bf6a 100644 --- a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Docs.Admin.Application.Contracts Volo.Docs.Admin.Application.Contracts true diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/he.json b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/he.json new file mode 100644 index 0000000000..6ba3a99002 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/he.json @@ -0,0 +1,74 @@ +{ + "culture": "he", + "texts": { + "Permission:DocumentManagement": "ניהול מסמכים", + "Permission:Projects": "פרויקטים", + "Permission:Edit": "עריכה", + "Permission:Delete": "מחיקה", + "Permission:Create": "יצירה", + "Permission:Documents": "מסמכים", + "Menu:Documents": "מסמכים", + "Menu:DocumentManagement": "מסמכים", + "Menu:ProjectManagement": "פרויקטים", + "CreateANewProject": "יצירת פרויקט חדש", + "Edit": "עריכה", + "Create": "יצירה", + "Pull": "משיכה", + "Projects": "פרויקטים", + "Name": "שם", + "ShortName": "שם מקוצר", + "DocumentStoreType": "סוג מאגר המסמכים", + "Format": "פורמט", + "ShortNameInfoText": "ישמש ליצירת כתובת URL ייחודית.", + "DisplayName:Name": "שם", + "DisplayName:ShortName": "שם מקוצר", + "DisplayName:Format": "פורמט", + "DisplayName:DefaultDocumentName": "שם מסמך ברירת המחדל", + "DisplayName:NavigationDocumentName": "שם מסמך הניווט", + "DisplayName:MinimumVersion": "גרסה מינימלית", + "DisplayName:MainWebsiteUrl": "כתובת ה-URL של האתר הראשי", + "DisplayName:LatestVersionBranchName": "שם הענף של הגרסה האחרונה", + "DisplayName:GitHubRootUrl": "כתובת ה-URL הבסיסית ב-GitHub", + "DisplayName:GitHubAccessToken": "אסימון גישה ל-GitHub", + "DisplayName:GitHubUserAgent": "User agent של GitHub", + "DisplayName:GithubVersionProviderSource": "מקור ספק הגרסאות ב-GitHub", + "DisplayName:VersionBranchPrefix": "קידומת ענף הגרסה", + "DisplayName:All": "משיכת הכול", + "DisplayName:LanguageCode": "קוד שפה", + "DisplayName:Version": "גרסה", + "Documents": "מסמכים", + "RemoveFromCache": "הסרה מהמטמון ואינדוקס מחדש", + "Reindex": "אינדוקס מחדש", + "ReindexCompleted": "האינדוקס מחדש הושלם", + "RemovedFromCache": "הוסר מהמטמון ואונדקס מחדש", + "RemoveFromCacheConfirmation": "להסיר את הפריט הזה מהמטמון?", + "ReIndexDocumentConfirmation": "לבצע אינדוקס מחדש ל-\"{0}\"?", + "DeleteFromDatabase": "מחיקה ממסד הנתונים", + "Deleted": "נמחק", + "Search": "חיפוש", + "StartDate": "תאריך התחלה", + "EndDate": "תאריך סיום", + "CreationTime": "זמן יצירה", + "LastUpdateTime": "עדכון אחרון", + "LastSignificantUpdateTime": "עדכון משמעותי אחרון", + "Version": "גרסה", + "LanguageCode": "קוד שפה", + "FileName": "שם הקובץ", + "LastCachedTime": "זמן השמירה במטמון", + "Project": "פרויקט", + "AdvancedFilters": "סינון מתקדם", + "RemoveCacheAndReIndexConfirmation": "המסמך \"{0}\" יוסר מהמטמון ויאונדקס מחדש. להמשיך?", + "GeneratePdf": "יצירת PDF", + "Generating": "יוצר...", + "Language": "שפה", + "ForceToGenerateNewPdf": "יצירת PDF חדש בכל מקרה", + "PdfGeneratedSuccessfully": "קובץ ה-PDF נוצר בהצלחה", + "GenerateAndDownloadPdf": "יצירה והורדה של PDF", + "PdfFileDeletionWarningMessage": "למחוק את קובץ ה-PDF \"{0}\"?", + "ManagePdfFiles": "ניהול קובצי PDF", + "Permission:ManagePdfFiles": "ניהול קובצי PDF", + "PdfDeletedSuccessfully": "קובץ ה-PDF נמחק בהצלחה", + "PdfGenerationStarted": "יצירת ה-PDF התחילה", + "PdfGenerationStartedInfoMessage": "יצירת ה-PDF התחילה. בסיום אפשר לבדוק אם הקובץ נוסף לאזור קובצי ה-PDF." + } +} diff --git a/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj b/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj index 9a61971adb..c433df3354 100644 --- a/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj +++ b/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Docs.Admin.Application Volo.Docs.Admin.Application diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj index 3eef37fcf7..2ca5eac624 100644 --- a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Docs.Admin.HttpApi.Client Volo.Docs.Admin.HttpApi.Client diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj b/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj index 8861a26d03..991f4a6868 100644 --- a/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Docs.Admin.HttpApi Volo.Docs.Admin.HttpApi diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj b/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj index 832ef7125f..1b801fb744 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj +++ b/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Docs.Admin.Web Volo.Docs.Admin.Web Library diff --git a/modules/docs/src/Volo.Docs.Application.Contracts/Volo.Docs.Application.Contracts.csproj b/modules/docs/src/Volo.Docs.Application.Contracts/Volo.Docs.Application.Contracts.csproj index 0c4719557b..99caf5e7fb 100644 --- a/modules/docs/src/Volo.Docs.Application.Contracts/Volo.Docs.Application.Contracts.csproj +++ b/modules/docs/src/Volo.Docs.Application.Contracts/Volo.Docs.Application.Contracts.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Docs.Application.Contracts Volo.Docs.Application.Contracts diff --git a/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj b/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj index f349e59e21..a9de8fd3ff 100644 --- a/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj +++ b/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Docs.Application Volo.Docs.Application diff --git a/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationMappers.cs b/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationMappers.cs index bd8474b7b9..e9cef7a6e9 100644 --- a/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationMappers.cs +++ b/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationMappers.cs @@ -1,6 +1,7 @@ using Riok.Mapperly.Abstractions; using Volo.Docs.Documents; using Volo.Abp.Mapperly; +using Volo.Abp.Data; using Volo.Docs.Common.Projects; using Volo.Docs.Projects; @@ -33,9 +34,16 @@ public partial class VersionInfoToVersionInfoDtoMapper : MapperBase { + [MapProperty(nameof(Project.ExtraProperties), nameof(ProjectDto.ExtraProperties), Use = nameof(MapPublicExtraProperties))] public override partial ProjectDto Map(Project source); + [MapProperty(nameof(Project.ExtraProperties), nameof(ProjectDto.ExtraProperties), Use = nameof(MapPublicExtraProperties))] public override partial void Map(Project source, ProjectDto destination); + + private static ExtraPropertyDictionary MapPublicExtraProperties(ExtraPropertyDictionary source) + { + return source.ToPublicProjectExtraProperties(); + } } [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] @@ -48,4 +56,4 @@ public partial class DocumentToDocumentWithDetailsDtoMapper : MapperBase - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Docs.Common.Application.Contracts Volo.Docs.Common.Application.Contracts true diff --git a/modules/docs/src/Volo.Docs.Common.Application.Contracts/Volo/Docs/Common/Localization/Resources/Docs/ApplicationContracts/he.json b/modules/docs/src/Volo.Docs.Common.Application.Contracts/Volo/Docs/Common/Localization/Resources/Docs/ApplicationContracts/he.json new file mode 100644 index 0000000000..9cf6530638 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Common.Application.Contracts/Volo/Docs/Common/Localization/Resources/Docs/ApplicationContracts/he.json @@ -0,0 +1,7 @@ +{ + "culture": "he", + "texts": { + "Permission:DocumentManagement.Common": "ניהול מסמכים משותף", + "Permission:PdfDownload": "הורדת PDF" + } +} diff --git a/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.csproj b/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.csproj index 2b097e70ba..6599819935 100644 --- a/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.csproj +++ b/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Docs.Common.Application Volo.Docs.Common.Application diff --git a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationMappers.cs b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationMappers.cs index 9c0874ecdd..f9785f5524 100644 --- a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationMappers.cs +++ b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationMappers.cs @@ -1,5 +1,6 @@ using Riok.Mapperly.Abstractions; using Volo.Abp.Mapperly; +using Volo.Abp.Data; using Volo.Docs.Common.Projects; using Volo.Docs.Projects; @@ -8,9 +9,16 @@ namespace Volo.Docs.Common; [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class ProjectToProjectDtoMapper : MapperBase { + [MapProperty(nameof(Project.ExtraProperties), nameof(ProjectDto.ExtraProperties), Use = nameof(MapPublicExtraProperties))] public override partial ProjectDto Map(Project source); + [MapProperty(nameof(Project.ExtraProperties), nameof(ProjectDto.ExtraProperties), Use = nameof(MapPublicExtraProperties))] public override partial void Map(Project source, ProjectDto destination); + + private static ExtraPropertyDictionary MapPublicExtraProperties(ExtraPropertyDictionary source) + { + return source.ToPublicProjectExtraProperties(); + } } [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] diff --git a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/Projects/ProjectAppService.cs b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/Projects/ProjectAppService.cs index eb5c9bc7db..0ee6a269b4 100644 --- a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/Projects/ProjectAppService.cs +++ b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/Projects/ProjectAppService.cs @@ -39,12 +39,8 @@ namespace Volo.Docs.Common.Projects { var projects = await _projectRepository.GetListAsync(); - var projectDtos = new List( - ObjectMapper.Map, List>(projects) - ); - return new ListResultDto( - projectDtos.Select(p => HidePrivateProperties(p)).ToList() + ObjectMapper.Map, List>(projects) ); } @@ -52,9 +48,7 @@ namespace Volo.Docs.Common.Projects { var project = await _projectRepository.GetByShortNameAsync(shortName); - var projectDto = ObjectMapper.Map(project); - - return HidePrivateProperties(projectDto); + return ObjectMapper.Map(project); } public virtual async Task> GetVersionsAsync(string shortName) @@ -159,20 +153,5 @@ namespace Volo.Docs.Common.Projects ? project.GetProperty("GithubVersionProviderSource") : GithubVersionProviderSource.Releases; } - - private ProjectDto HidePrivateProperties(ProjectDto project) - { - if (project.HasProperty("GitHubAccessToken")) - { - project.SetProperty("GitHubAccessToken", null); - } - - if (project.HasProperty("GitHubUserAgent")) - { - project.SetProperty("GitHubUserAgent", null); - } - - return project; - } } } diff --git a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/Projects/ProjectDtoExtensions.cs b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/Projects/ProjectDtoExtensions.cs new file mode 100644 index 0000000000..ab08bbf19c --- /dev/null +++ b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/Projects/ProjectDtoExtensions.cs @@ -0,0 +1,21 @@ +using Volo.Abp.Data; + +namespace Volo.Docs.Common.Projects; + +public static class ProjectDtoExtensions +{ + public static ExtraPropertyDictionary ToPublicProjectExtraProperties(this ExtraPropertyDictionary source) + { + var extraProperties = new ExtraPropertyDictionary(); + + foreach (var propertyName in new[] { "GithubVersionProviderSource", "VersionBranchPrefix" }) + { + if (source != null && source.TryGetValue(propertyName, out var value)) + { + extraProperties[propertyName] = value; + } + } + + return extraProperties; + } +} diff --git a/modules/docs/src/Volo.Docs.Common.HttpApi.Client/Volo.Docs.Common.HttpApi.Client.csproj b/modules/docs/src/Volo.Docs.Common.HttpApi.Client/Volo.Docs.Common.HttpApi.Client.csproj index 739a34675f..532bb7f404 100644 --- a/modules/docs/src/Volo.Docs.Common.HttpApi.Client/Volo.Docs.Common.HttpApi.Client.csproj +++ b/modules/docs/src/Volo.Docs.Common.HttpApi.Client/Volo.Docs.Common.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Docs.Common.HttpApi.Client Volo.Docs.Common.HttpApi.Client diff --git a/modules/docs/src/Volo.Docs.Common.HttpApi/Volo.Docs.Common.HttpApi.csproj b/modules/docs/src/Volo.Docs.Common.HttpApi/Volo.Docs.Common.HttpApi.csproj index e9273abfa2..27295764ac 100644 --- a/modules/docs/src/Volo.Docs.Common.HttpApi/Volo.Docs.Common.HttpApi.csproj +++ b/modules/docs/src/Volo.Docs.Common.HttpApi/Volo.Docs.Common.HttpApi.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Docs.Common.HttpApi Volo.Docs.Common.HttpApi diff --git a/modules/docs/src/Volo.Docs.Domain.Shared/Volo.Docs.Domain.Shared.csproj b/modules/docs/src/Volo.Docs.Domain.Shared/Volo.Docs.Domain.Shared.csproj index 894e97f8e9..75c9ae8fd8 100644 --- a/modules/docs/src/Volo.Docs.Domain.Shared/Volo.Docs.Domain.Shared.csproj +++ b/modules/docs/src/Volo.Docs.Domain.Shared/Volo.Docs.Domain.Shared.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Docs.Domain.Shared Volo.Docs.Domain.Shared diff --git a/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocsDomainErrorCodes.cs b/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocsDomainErrorCodes.cs index 1931343aad..381865f163 100644 --- a/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocsDomainErrorCodes.cs +++ b/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocsDomainErrorCodes.cs @@ -3,5 +3,7 @@ public static class DocsDomainErrorCodes { public const string ElasticSearchNotEnabled = "Volo.Docs.Domain:010001"; + + public const string DocumentNotFound = "Volo.Docs.Domain:010003"; } } \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocumentNotFoundException.cs b/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocumentNotFoundException.cs index a2f50e8f22..0a0141d3e8 100644 --- a/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocumentNotFoundException.cs +++ b/modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/DocumentNotFoundException.cs @@ -1,12 +1,16 @@ using Volo.Abp; +using Volo.Abp.ExceptionHandling; namespace Volo.Docs { - public class DocumentNotFoundException : BusinessException + public class DocumentNotFoundException : BusinessException, IHasHttpStatusCode { public string DocumentUrl { get; set; } + public int HttpStatusCode => (int)System.Net.HttpStatusCode.NotFound; + public DocumentNotFoundException(string documentUrl) + : base(DocsDomainErrorCodes.DocumentNotFound) { DocumentUrl = documentUrl; } diff --git a/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj b/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj index 0fb5d6bd7d..a47b0fe56b 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj +++ b/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Docs.Domain Volo.Docs.Domain true diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ar.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ar.json index 38b56e96b3..5740e8d0e6 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ar.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ar.json @@ -35,6 +35,7 @@ "NewExplanation": "تم إنشاؤه في الأسبوعين الماضيين.", "UpdatedExplanation": "تم التحديث في الأسبوعين الماضيين.", "Volo.Docs.Domain:010002": "الاسم المختصر {ShortName} موجود بالفعل.", + "Volo.Docs.Domain:010003": "عفواً، الوثيقة المطلوبة غير موجودة!", "Preview": "معاينة", "Search": "بحث", "SearchResults": "نتائج البحث", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/cs.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/cs.json index a4a16fc883..843208dece 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/cs.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/cs.json @@ -35,6 +35,7 @@ "NewExplanation": "Vytvořeno v posledních dvou týdnech.", "UpdatedExplanation": "Aktualizováno v posledních dvou týdnech.", "Volo.Docs.Domain:010002": "ShortName {ShortName} už existuje.", + "Volo.Docs.Domain:010003": "Ups, vyžádaný dokument nebyl nalezen!", "Preview": "náhled", "Search": "Vyhledávání", "SearchResults": "Výsledky vyhledávání", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/de.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/de.json index 10ff142b20..75c2ac6722 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/de.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/de.json @@ -35,6 +35,7 @@ "NewExplanation": "Erstellt in den letzten zwei Wochen.", "UpdatedExplanation": "Aktualisiert in den letzten zwei Wochen.", "Volo.Docs.Domain:010002": "Kurzname {ShortName} existiert bereits.", + "Volo.Docs.Domain:010003": "Hoppla, das angeforderte Dokument wurde nicht gefunden!", "Preview": "Vorschau", "Search": "Suchen", "SearchResults": "Suchergebnisse", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/el.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/el.json index e2c8ce222e..2165ea142e 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/el.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/el.json @@ -35,6 +35,7 @@ "NewExplanation": "Δημιουργήθηκε τις τελευταίες δύο εβδομάδες", "UpdatedExplanation": "Ενημερώθηκε τις τελευταίες δύο εβδομάδες.", "Volo.Docs.Domain:010002": "Το Μικρό όνομα {ShortName} υπάρχει ήδη.", + "Volo.Docs.Domain:010003": "Ωχ, το έγγραφο που ζητήθηκε δεν βρέθηκε!", "Preview": "προεπισκόπηση", "Search": "Αναζήτηση", "SearchResults": "Αποτελέσματα αναζήτησης", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en-GB.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en-GB.json index 884d9ce8ba..7038ba8fec 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en-GB.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en-GB.json @@ -35,6 +35,7 @@ "NewExplanation": "Created in the last two weeks.", "UpdatedExplanation": "Updated in the last two weeks.", "Volo.Docs.Domain:010002": "ShortName {ShortName} already exists.", + "Volo.Docs.Domain:010003": "Oops, the requested document was not found!", "Preview": "preview", "GoogleTranslate": "Google Translate", "DownloadPDF": "Download PDF" diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en.json index 9859a7a4a2..a870c32454 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en.json @@ -35,6 +35,7 @@ "NewExplanation": "Created in the last two weeks.", "UpdatedExplanation": "Updated in the last two weeks.", "Volo.Docs.Domain:010002": "ShortName {ShortName} already exists.", + "Volo.Docs.Domain:010003": "Oops, the requested document was not found!", "Preview": "preview", "Search": "Search", "SearchResults": "Search Results", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/es.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/es.json index 451cc363aa..64df1a6936 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/es.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/es.json @@ -35,6 +35,7 @@ "NewExplanation": "Creado en las últimas dos semanas.", "UpdatedExplanation": "Actualizo en las dos últimas semanas", "Volo.Docs.Domain:010002": "ShortName {ShortName} ya existe.", + "Volo.Docs.Domain:010003": "Oops, El documento solicitado no fue encontrado!", "Preview": "Previsualizar", "Search": "Buscar", "SearchResults": "Resultados de la búsqueda", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/fi.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/fi.json index 4abfa3082f..94df040481 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/fi.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/fi.json @@ -35,6 +35,7 @@ "NewExplanation": "Luotu kahden viime viikon aikana.", "UpdatedExplanation": "Päivitetty kahden viime viikon aikana.", "Volo.Docs.Domain:010002": "Lyhytnimi {ShortName} on jo olemassa.", + "Volo.Docs.Domain:010003": "Hups, pyydettyä asiakirjaa ei löytynyt!", "Preview": "esikatselu", "Search": "Hae", "SearchResults": "Hakutulokset", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/fr.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/fr.json index f337478461..ecf8e2fbe6 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/fr.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/fr.json @@ -35,6 +35,7 @@ "NewExplanation": "Créé au cours des deux dernières semaines.", "UpdatedExplanation": "Mis à jour au cours des deux dernières semaines.", "Volo.Docs.Domain:010002": "ShortName {ShortName} existe déjà.", + "Volo.Docs.Domain:010003": "Oups, le document demandé est introuvable!", "Preview": "Aperçu", "Search": "Rechercher", "SearchResults": "Résultats de recherche", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/he.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/he.json new file mode 100644 index 0000000000..665a5e72db --- /dev/null +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/he.json @@ -0,0 +1,52 @@ +{ + "culture": "he", + "texts": { + "Documents": "מסמכים", + "BackToWebsite": "חזרה לאתר", + "Contributors": "תורמים", + "ShareOn": "שיתוף:", + "Version": "גרסה", + "Edit": "עריכה", + "LastEditTime": "עריכה אחרונה", + "Delete": "מחיקה", + "ClearCache": "ניקוי מטמון", + "ClearCacheConfirmationMessage": "לנקות את כל המטמון של הפרויקט \"{0}\"?", + "ReIndexAllProjects": "אינדוקס מחדש של כל הפרויקטים", + "ReIndexProject": "אינדוקס מחדש של הפרויקט", + "ReIndexProjectConfirmationMessage": "לבצע אינדוקס מחדש לפרויקט \"{0}\"?", + "SuccessfullyReIndexProject": "האינדוקס מחדש הושלם בהצלחה: \"{0}\"", + "ReIndexAllProjectConfirmationMessage": "לבצע אינדוקס מחדש לכל הפרויקטים?", + "SuccessfullyReIndexAllProject": "האינדוקס מחדש של כל הפרויקטים הושלם בהצלחה", + "InThisDocument": "במסמך זה", + "GoToTop": "חזרה למעלה", + "Projects": "פרויקטים", + "NoProjectWarning": "אין עדיין פרויקטים!", + "DocumentNotFound": "אופס, המסמך המבוקש לא נמצא!", + "ProjectNotFound": "אופס, הפרויקט המבוקש לא נמצא!", + "NavigationDocumentNotFound": "לגרסה זו אין מסמך ניווט!", + "DocumentNotFoundInSelectedLanguage": "המסמך לא נמצא בשפה המבוקשת. מוצג המסמך בשפת ברירת המחדל.", + "FilterTopics": "סינון נושאים", + "FullSearch": "חיפוש במסמכים", + "Volo.Docs.Domain:010001": "Elasticsearch אינו מופעל.", + "MultipleVersionDocumentInfo": "למסמך זה יש כמה גרסאות. בחרו את האפשרויות המתאימות לכם.", + "DocumentOptions": "אפשרויות המסמך", + "New": "חדש", + "Upd": "עודכן", + "NewExplanation": "נוצר בשבועיים האחרונים.", + "UpdatedExplanation": "עודכן בשבועיים האחרונים.", + "Volo.Docs.Domain:010002": "השם המקוצר {ShortName} כבר קיים.", + "Volo.Docs.Domain:010003": "אופס, המסמך המבוקש לא נמצא!", + "Preview": "תצוגה מקדימה", + "Search": "חיפוש", + "SearchResults": "תוצאות החיפוש", + "SearchInTheAllDocuments": "חיפוש בכל המסמכים", + "Next": "הבא", + "Previous": "הקודם", + "ProjectDeletionWarningMessage": "הפרויקט יימחק.", + "Docs_Page_Title": "תיעוד ABP", + "Docs_Page_Description": "מדריכים מקיפים ותיעוד API בתיעוד של ABP, לעזרה בפיתוח ובפתרון תקלות.", + "GoogleTranslate": "Google Translate", + "DownloadPDF": "הורדת PDF", + "PdfFileGeneratedSuccessfully": "קובץ ה-PDF נוצר בהצלחה." + } +} diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hi.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hi.json index 19e0a89278..af97a23976 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hi.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hi.json @@ -35,6 +35,7 @@ "NewExplanation": "पिछले दो हफ्तों में बनाया गया।", "UpdatedExplanation": "पिछले दो हफ्तों में अपडेट किया गया।", "Volo.Docs.Domain:010002": "ShortName {ShortName} पहले से मौजूद है।", + "Volo.Docs.Domain:010003": "ओह, अनुरोधित दस्तावेज़ नहीं मिला!", "Preview": "पूर्व दर्शन", "Search": "खोज", "SearchResults": "खोज परिणाम", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hr.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hr.json index c699f2ba50..5af9376455 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hr.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hr.json @@ -35,6 +35,7 @@ "NewExplanation": "Stvoreno u posljednja dva tjedna.", "UpdatedExplanation": "Ažurirano u posljednja dva tjedna.", "Volo.Docs.Domain:010002": "Nadimak {ShortName} već postoji.", + "Volo.Docs.Domain:010003": "Ups, traženi dokument nije pronađen!", "Preview": "Pretpregled", "Search": "Pretraga", "SearchResults": "Rezultati pretrage", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hu.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hu.json index f61ad53e0c..6c00d4ed5d 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hu.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hu.json @@ -35,6 +35,7 @@ "NewExplanation": "Az elmúlt két hétben készült.", "UpdatedExplanation": "Az elmúlt két hétben frissült.", "Volo.Docs.Domain:010002": "Rövid név {ShortName} már létezik.", + "Volo.Docs.Domain:010003": "Hoppá, a kért dokumentum nem található!", "Preview": "előnézet", "Search": "Keresés", "SearchResults": "Keresési eredmények", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/is.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/is.json index ca4d3f184f..94c2ad6f0f 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/is.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/is.json @@ -35,6 +35,7 @@ "NewExplanation": "Búið til á síðustu tveimur vikum.", "UpdatedExplanation": "Uppfært síðustu tvær vikur.", "Volo.Docs.Domain:010002": "Skammnefni {ShortName} er þegar til. “", + "Volo.Docs.Domain:010003": "Úbbs, umbeðið skjal fannst ekki!", "Preview": "forskoðun", "Search": "Leit", "SearchResults": "Leitar niðurstöður", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/it.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/it.json index 05c3a1af8f..167741d7ea 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/it.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/it.json @@ -35,6 +35,7 @@ "NewExplanation": "Creato nelle ultime due settimane.", "UpdatedExplanation": "Aggiornato nelle ultime due settimane.", "Volo.Docs.Domain:010002": "Abbreviazione {ShortName} esiste già.", + "Volo.Docs.Domain:010003": "Ops, il documento richiesto non è stato trovato!", "Preview": "anteprima", "Search": "Ricerca", "SearchResults": "Risultati della ricerca", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/nl.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/nl.json index b6a47a9b6d..a0b06c264d 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/nl.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/nl.json @@ -35,6 +35,7 @@ "NewExplanation": "Gemaakt in de afgelopen twee weken.", "UpdatedExplanation": "Bewerkt in de afgelopen twee weken.", "Volo.Docs.Domain:010002": "KorteNaam {ShortName} bestaat al.", + "Volo.Docs.Domain:010003": "Oeps, het opgevraagde document is niet gevonden!", "Preview": "voorbeeld", "Search": "Zoeken", "SearchResults": "Zoekresultaten", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pl-PL.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pl-PL.json index 7ed8cf3aff..3af64c37a1 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pl-PL.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pl-PL.json @@ -35,6 +35,7 @@ "NewExplanation": "Utworzony w ciągu ostatnich dwóch tygodni.", "UpdatedExplanation": "Zaktualizowany w ciągu ostatnich dwóch tygodni.", "Volo.Docs.Domain:010002": "ShortName {ShortName} już istnieje.", + "Volo.Docs.Domain:010003": "Oops, żądany dokument nie istnieje!", "Preview": "zapowiedź", "Search": "Szukaj", "SearchResults": "Wyniki wyszukiwania", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pt-BR.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pt-BR.json index aab4f4f7d9..362abace7f 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pt-BR.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pt-BR.json @@ -35,6 +35,7 @@ "NewExplanation": "Criado nas últimas duas semanas.", "UpdatedExplanation": "Atualizado nas últimas duas semanas.", "Volo.Docs.Domain:010002": "Nome curto {ShortName} já existe.", + "Volo.Docs.Domain:010003": "Oops, o documento solicitado não foi encontrado", "Preview": "Previsualizar", "Search": "Procurar", "SearchResults": "Procurar Resultados", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pt.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pt.json index 344347b20c..189aac5a82 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pt.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pt.json @@ -35,6 +35,7 @@ "NewExplanation": "Criado nas últimas duas semanas.", "UpdatedExplanation": "Atualizado nas últimas duas semanas.", "Volo.Docs.Domain:010002": "O nome curto {ShortName} já existe.", + "Volo.Docs.Domain:010003": "Ups, o documento solicitado não foi encontrado!", "Preview": "pré-visualização", "Search": "Pesquisar", "SearchResults": "Resultados da pesquisa", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ro-RO.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ro-RO.json index e6b9afa522..ba0f527776 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ro-RO.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ro-RO.json @@ -35,6 +35,7 @@ "NewExplanation": "Creat în ultimele două săptămâni.", "UpdatedExplanation": "Actualizat în ultimele două săptămâni.", "Volo.Docs.Domain:010002": "Numele pe scurt {ShortName} există deja.", + "Volo.Docs.Domain:010003": "Oops, documentul dorit nu a fost găsit!", "Preview": "previzualizare", "Search": "Caută", "SearchResults": "Rezultatele căutării", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ru.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ru.json index aa124e4666..3e97416957 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ru.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ru.json @@ -35,6 +35,7 @@ "NewExplanation": "Создано за последние две недели.", "UpdatedExplanation": "Обновлено за последние две недели.", "Volo.Docs.Domain:010002": "ShortName {ShortName} уже существует.", + "Volo.Docs.Domain:010003": "К сожалению, запрошенный документ не найден!", "Preview": "предварительный просмотр", "Search": "Поиск", "SearchResults": "результаты поиска", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sk.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sk.json index 5f4ddcafe7..15ccf03ac7 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sk.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sk.json @@ -35,6 +35,7 @@ "NewExplanation": "Vytvorené za posledné dva týždne.", "UpdatedExplanation": "Aktualizované za posledné dva týždne.", "Volo.Docs.Domain:010002": "ShortName {ShortName} už existuje.", + "Volo.Docs.Domain:010003": "Ups, požadovaný dokument nebol nájdený!", "Preview": "náhľad", "Search": "Vyhľadať", "SearchResults": "Výsledky vyhľadávania", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sl.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sl.json index e8b559db6f..abbb15d579 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sl.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sl.json @@ -35,6 +35,7 @@ "NewExplanation": "Ustvarjeno v zadnjih dveh tednih.", "UpdatedExplanation": "Posodobljeno v zadnjih dveh tednih.", "Volo.Docs.Domain:010002": "ShortName {ShortName} že obstaja.", + "Volo.Docs.Domain:010003": "Ups, zahtevanega dokumenta ni bilo mogoče najti!", "Preview": "predogled", "Search": "Iskanje", "SearchResults": "Rezultati iskanja", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sv.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sv.json index 0c543da150..4856a83514 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sv.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sv.json @@ -35,6 +35,7 @@ "NewExplanation": "Skapad under de senaste två veckorna.", "UpdatedExplanation": "Uppdaterad under de senaste två veckorna.", "Volo.Docs.Domain:010002": "Kortnamn {Kortnamn} finns redan.", + "Volo.Docs.Domain:010003": "Oops, det begärda dokumentet hittades inte!", "Preview": "förhandsvisning", "Search": "Sök", "SearchResults": "Sökresultat", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/tr.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/tr.json index 763448fb00..82552cad29 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/tr.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/tr.json @@ -35,6 +35,7 @@ "NewExplanation": "Son iki hafta içinde oluşturuldu.", "UpdatedExplanation": "Son iki hafta içinde güncellendi.", "Volo.Docs.Domain:010002": "ShortName {ShortName} zaten var.", + "Volo.Docs.Domain:010003": "Aradığınız döküman bulunamadı!", "Preview": "ön izleme", "Search": "Arama", "SearchResults": "Arama Sonuçları", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/vi.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/vi.json index 0e50fd8569..7760b4ef36 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/vi.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/vi.json @@ -35,6 +35,7 @@ "NewExplanation": "Được tạo trong hai tuần qua.", "UpdatedExplanation": "Cập nhật trong hai tuần qua.", "Volo.Docs.Domain:010002": "Tên miền ngắn {ShortName} đã tồn tại.", + "Volo.Docs.Domain:010003": "Rất tiếc, tài liệu được yêu cầu không tìm thấy!", "Preview": "xem trước", "Search": "Tìm kiếm", "SearchResults": "kết quả tìm kiếm", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json index d462a22ae5..1fe05443a9 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json @@ -35,6 +35,7 @@ "NewExplanation": "最近两周创建。", "UpdatedExplanation": "最近两周更新。", "Volo.Docs.Domain:010002": "简称 {ShortName} 已经存在。", + "Volo.Docs.Domain:010003": "哎呀,没有找到所需的文档!", "Preview": "预览", "Search": "搜索", "SearchResults": "搜索结果", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hant.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hant.json index 9bc8aa6230..30776fea24 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hant.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hant.json @@ -35,6 +35,7 @@ "NewExplanation": "在最近兩周內創建.", "UpdatedExplanation": "在最近兩周內更新.", "Volo.Docs.Domain:010002": "簡稱 {ShortName} 已經存在.", + "Volo.Docs.Domain:010003": "找不到要求的文件!", "Preview": "預覽", "Search": "搜索", "SearchResults": "搜索結果", diff --git a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj index e4d1113181..c185c91428 100644 --- a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj +++ b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Docs.EntityFrameworkCore Volo.Docs.EntityFrameworkCore diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj index c5f1e90f45..0ecee414c5 100644 --- a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj @@ -4,7 +4,7 @@ - netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0 + netstandard2.0;netstandard2.1;net8.0;net9.0;net10.0;net11.0 Volo.Docs.HttpApi.Client Volo.Docs.HttpApi.Client diff --git a/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj b/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj index 85e5ac7534..1597f1565c 100644 --- a/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj +++ b/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Docs.HttpApi Volo.Docs.HttpApi diff --git a/modules/docs/src/Volo.Docs.Installer/Volo.Docs.Installer.csproj b/modules/docs/src/Volo.Docs.Installer/Volo.Docs.Installer.csproj index c8fffc9cee..54c428a252 100644 --- a/modules/docs/src/Volo.Docs.Installer/Volo.Docs.Installer.csproj +++ b/modules/docs/src/Volo.Docs.Installer/Volo.Docs.Installer.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 true diff --git a/modules/docs/src/Volo.Docs.MongoDB/Volo.Docs.MongoDB.csproj b/modules/docs/src/Volo.Docs.MongoDB/Volo.Docs.MongoDB.csproj index 2fa01b09ce..3a3c25925e 100644 --- a/modules/docs/src/Volo.Docs.MongoDB/Volo.Docs.MongoDB.csproj +++ b/modules/docs/src/Volo.Docs.MongoDB/Volo.Docs.MongoDB.csproj @@ -4,7 +4,7 @@ - net10.0 + net11.0 Volo.Docs.MongoDB Volo.Docs.MongoDB diff --git a/modules/docs/src/Volo.Docs.Web/Areas/Documents/TagHelpers/TreeTagHelper.cs b/modules/docs/src/Volo.Docs.Web/Areas/Documents/TagHelpers/TreeTagHelper.cs index 3aa9b85777..94a83f8fa0 100644 --- a/modules/docs/src/Volo.Docs.Web/Areas/Documents/TagHelpers/TreeTagHelper.cs +++ b/modules/docs/src/Volo.Docs.Web/Areas/Documents/TagHelpers/TreeTagHelper.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Text; using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.Extensions.Localization; @@ -24,7 +25,7 @@ namespace Volo.Docs.Areas.Documents.TagHelpers private const string LiItemTemplateWithLink = @"
  • {2}{3}
  • "; - private const string ListItemAnchor = @"{3}"; + private const string ListItemAnchor = @"{3}"; private const string ListItemSpan = @"{1}"; @@ -157,10 +158,11 @@ namespace Volo.Docs.Areas.Documents.TagHelpers sb.Clear(); var additionalAttributes = node.Keywords.IsNullOrEmpty() ? "" : "data-keywords=\"" + node.Keywords.JoinAsString(",") + "\""; - listInnerItem = string.Format(ListItemAnchor, NormalizePath(node.Path), additionalAttributes ,textCss, + listInnerItem = string.Format(ListItemAnchor, NormalizePath(node.Path), additionalAttributes, textCss, node.Text.IsNullOrEmpty() ? "?" - : sb.Append(node.Text).Append(badgeStringBuilder.ToString()).ToString()); + : sb.Append(node.Text).Append(badgeStringBuilder.ToString()).ToString(), + WebUtility.HtmlEncode(node.Text)); } sb.Clear(); diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs index 6eb3c02a8c..060576b95e 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs @@ -17,6 +17,7 @@ using Volo.Abp.Authorization.Permissions; using Volo.Abp.Data; using Volo.Abp.Domain.Entities; using Volo.Abp.EventBus.Local; +using Volo.Abp.Http.Client; using Volo.Docs.Common; using Volo.Docs.Common.Documents; using Volo.Docs.Common.Projects; @@ -200,7 +201,7 @@ namespace Volo.Docs.Pages.Documents.Project } } - catch (EntityNotFoundException e) + catch (Exception e) when (e is EntityNotFoundException || IsRemoteNotFound(e)) { Logger.LogWarning(e.Message); ProjectFound = false; @@ -516,11 +517,22 @@ namespace Volo.Docs.Pages.Documents.Project } ); } - catch (DocumentNotFoundException) //TODO: What if called on a remote service which may return 404 + catch (Exception e) when (IsDocumentNotFound(e)) { return; } } + + private static bool IsDocumentNotFound(Exception exception) + { + return exception is DocumentNotFoundException || + exception is AbpRemoteCallException { Code: DocsDomainErrorCodes.DocumentNotFound }; + } + + private static bool IsRemoteNotFound(Exception exception) + { + return exception is AbpRemoteCallException { HttpStatusCode: (int)HttpStatusCode.NotFound }; + } private void SetDocumentPageTitle() { @@ -571,7 +583,7 @@ namespace Volo.Docs.Pages.Documents.Project return true; } - catch (DocumentNotFoundException e) + catch (Exception e) when (IsDocumentNotFound(e)) { Logger.LogWarning(e.Message); } diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/TableOfContents.cshtml b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/TableOfContents.cshtml index 51a1bbe59c..78fcf168a1 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/TableOfContents.cshtml +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/TableOfContents.cshtml @@ -11,7 +11,7 @@ @foreach (var item in Model) {