feat(scripting): 新建 scripting 模块三层骨架
- Scripting.Domain/Application/Infrastructure 三个 csproj - 三个 ABP Module 类 - 挂入 BuildFlowHostModule [DependsOn] - 加入 BuildFlow.slnx 解决方案 Task T1 of scripting module refactor
This commit is contained in:
parent
b0cf3949d0
commit
54648ca1ac
@ -28,6 +28,11 @@
|
|||||||
<Project Path="src/modules/workflow/Infrastructure/Workflow.Infrastructure.csproj" />
|
<Project Path="src/modules/workflow/Infrastructure/Workflow.Infrastructure.csproj" />
|
||||||
<Project Path="src/modules/workflow/Application/Workflow.Application.csproj" />
|
<Project Path="src/modules/workflow/Application/Workflow.Application.csproj" />
|
||||||
</Folder>
|
</Folder>
|
||||||
|
<Folder Name="/src/modules/scripting/">
|
||||||
|
<Project Path="src/modules/scripting/Domain/Scripting.Domain.csproj" />
|
||||||
|
<Project Path="src/modules/scripting/Infrastructure/Scripting.Infrastructure.csproj" />
|
||||||
|
<Project Path="src/modules/scripting/Application/Scripting.Application.csproj" />
|
||||||
|
</Folder>
|
||||||
<Folder Name="/tests/">
|
<Folder Name="/tests/">
|
||||||
<Project Path="tests/BuildFlow.Architecture.Tests/BuildFlow.Architecture.Tests.csproj" />
|
<Project Path="tests/BuildFlow.Architecture.Tests/BuildFlow.Architecture.Tests.csproj" />
|
||||||
<Project Path="tests/BuildFlow.Rag.Tests/BuildFlow.Rag.Tests.csproj" />
|
<Project Path="tests/BuildFlow.Rag.Tests/BuildFlow.Rag.Tests.csproj" />
|
||||||
|
|||||||
@ -25,6 +25,8 @@
|
|||||||
<ProjectReference Include="..\modules\im\Infrastructure\IM.Infrastructure.csproj" />
|
<ProjectReference Include="..\modules\im\Infrastructure\IM.Infrastructure.csproj" />
|
||||||
<ProjectReference Include="..\modules\workflow\Application\Workflow.Application.csproj" />
|
<ProjectReference Include="..\modules\workflow\Application\Workflow.Application.csproj" />
|
||||||
<ProjectReference Include="..\modules\workflow\Infrastructure\Workflow.Infrastructure.csproj" />
|
<ProjectReference Include="..\modules\workflow\Infrastructure\Workflow.Infrastructure.csproj" />
|
||||||
|
<ProjectReference Include="..\modules\scripting\Application\Scripting.Application.csproj" />
|
||||||
|
<ProjectReference Include="..\modules\scripting\Infrastructure\Scripting.Infrastructure.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- FastEndpoints / Swagger / ABP / OTel:合并 Api 层后显式声明(不再由 Api 项目传递) -->
|
<!-- FastEndpoints / Swagger / ABP / OTel:合并 Api 层后显式声明(不再由 Api 项目传递) -->
|
||||||
|
|||||||
@ -17,6 +17,8 @@ using IM.Domain.Common;
|
|||||||
using IM.Infrastructure;
|
using IM.Infrastructure;
|
||||||
using Workflow.Domain.Common;
|
using Workflow.Domain.Common;
|
||||||
using BuildFlow.Platform.Application;
|
using BuildFlow.Platform.Application;
|
||||||
|
using Scripting.Application;
|
||||||
|
using Scripting.Infrastructure;
|
||||||
using Volo.Abp;
|
using Volo.Abp;
|
||||||
using Volo.Abp.Modularity;
|
using Volo.Abp.Modularity;
|
||||||
using Workflow.Application;
|
using Workflow.Application;
|
||||||
@ -35,7 +37,9 @@ namespace BuildFlow.Host;
|
|||||||
typeof(IMApplicationModule),
|
typeof(IMApplicationModule),
|
||||||
typeof(IMInfrastructureModule),
|
typeof(IMInfrastructureModule),
|
||||||
typeof(WorkflowApplicationModule),
|
typeof(WorkflowApplicationModule),
|
||||||
typeof(WorkflowInfrastructureModule))]
|
typeof(WorkflowInfrastructureModule),
|
||||||
|
typeof(ScriptingApplicationModule),
|
||||||
|
typeof(ScriptingInfrastructureModule))]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// BuildFlow 主 Host 的 ABP 模块。通过 [DependsOn] 聚合 platform/rag/file/im/workflow 五个业务模块的
|
/// BuildFlow 主 Host 的 ABP 模块。通过 [DependsOn] 聚合 platform/rag/file/im/workflow 五个业务模块的
|
||||||
/// Application + Infrastructure 层,统一注册跨切面基础设施(OTel/FastEndpoints/SignalR/JWT/CORS/
|
/// Application + Infrastructure 层,统一注册跨切面基础设施(OTel/FastEndpoints/SignalR/JWT/CORS/
|
||||||
|
|||||||
@ -0,0 +1,18 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.Core" Version="10.3.0" />
|
||||||
|
<PackageReference Include="MediatR" Version="12.5.0" />
|
||||||
|
<PackageReference Include="FluentValidation" Version="12.1.1" />
|
||||||
|
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="12.1.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Infrastructure\Scripting.Infrastructure.csproj" />
|
||||||
|
<ProjectReference Include="..\..\platform\Application\Platform.Application.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
using BuildFlow.Platform.Application;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Scripting.Infrastructure;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
|
||||||
|
namespace Scripting.Application;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Scripting Application 层模块。注册 MediatR(自动发现 Handler)。
|
||||||
|
/// Roslyn 脚本引擎等服务注册留待 T3。
|
||||||
|
/// </summary>
|
||||||
|
[DependsOn(typeof(ScriptingInfrastructureModule), typeof(PlatformApplicationModule))]
|
||||||
|
public class ScriptingApplicationModule : AbpModule
|
||||||
|
{
|
||||||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
var services = context.Services;
|
||||||
|
var assembly = typeof(ScriptingApplicationModule).Assembly;
|
||||||
|
|
||||||
|
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(assembly));
|
||||||
|
}
|
||||||
|
}
|
||||||
14
src/modules/scripting/Domain/Scripting.Domain.csproj
Normal file
14
src/modules/scripting/Domain/Scripting.Domain.csproj
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.Core" Version="10.3.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\shared\BuildFlow.Shared\BuildFlow.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
8
src/modules/scripting/Domain/ScriptingDomainModule.cs
Normal file
8
src/modules/scripting/Domain/ScriptingDomainModule.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using Volo.Abp.Modularity;
|
||||||
|
|
||||||
|
namespace Scripting.Domain;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Scripting Domain 层模块,纯声明性模块。
|
||||||
|
/// </summary>
|
||||||
|
public class ScriptingDomainModule : AbpModule;
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.7" />
|
||||||
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.7" />
|
||||||
|
<PackageReference Include="EFCore.NamingConventions" Version="10.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.7">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Volo.Abp.Core" Version="10.3.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Domain\Scripting.Domain.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
using Scripting.Domain;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
|
||||||
|
namespace Scripting.Infrastructure;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Scripting Infrastructure 层模块。T1 骨架:仅声明对 Domain 的依赖,
|
||||||
|
/// DbContext 等基础设施注册留待后续任务。
|
||||||
|
/// </summary>
|
||||||
|
[DependsOn(typeof(ScriptingDomainModule))]
|
||||||
|
public class ScriptingInfrastructureModule : AbpModule;
|
||||||
Loading…
x
Reference in New Issue
Block a user