Skip to content

Commit 0ed4d78

Browse files
committed
4.2.2 release
1 parent 7faa40c commit 0ed4d78

File tree

22 files changed

+271
-161
lines changed

22 files changed

+271
-161
lines changed

.github/actions/test-source/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ runs:
1515
dotnet test `
1616
Karamem0.Commistant.Test/Karamem0.Commistant.Test.csproj `
1717
-p:AltCover=true `
18+
-p:AltCoverLocalSource=true `
1819
-- NUnit.TestOutputXml=${{github.workspace}}/source/server/test
1920
working-directory: source/server
2021
- name: Test results

.vscode/extensions.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"editorconfig.editorconfig",
5+
"github.vscode-github-actions",
6+
"ms-azuretools.vscode-azurefunctions",
7+
"ms-azuretools.vscode-bicep",
8+
"ms-dotnettools.csdevkit",
9+
"redhat.vscode-yaml",
10+
"redhat.vscode-xml",
11+
"styled-components.vscode-styled-components"
12+
]
13+
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"files.exclude": {
3+
"source/": true
4+
}
5+
}

source/client/.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"version": "1.0.0",
33
"configurations": [
44
{
5-
"name": "Launch Web",
6-
"type": "chrome",
5+
"name": "Launch Client",
6+
"type": "msedge",
77
"request": "launch",
88
"url": "https://localhost:5173",
99
"webRoot": "${workspaceFolder}",

source/server/.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ dotnet_naming_style.begins_with_i.required_suffix =
246246
dotnet_naming_style.begins_with_i.word_separator =
247247
dotnet_naming_style.begins_with_i.capitalization = pascal_case
248248

249+
#### .NET Code Analysis Rules ####
250+
251+
dotnet_diagnostic.IDE0005.severity = warning
252+
249253
#### ReSharper Code inspection Rules ####
250254

251255
resharper_redundant_attribute_parentheses_highlighting = none

source/server/.vscode/launch.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,10 @@
22
"version": "0.2.0",
33
"configurations": [
44
{
5-
"name": "Launch AppHost",
5+
"name": "Launch Server",
66
"type": "dotnet",
77
"request": "launch",
88
"projectPath": "${workspaceFolder}/Karamem0.Commistant.AppHost/Karamem0.Commistant.AppHost.csproj"
9-
},
10-
{
11-
"name": "Launch Function",
12-
"type": "coreclr",
13-
"request": "attach",
14-
"processId": "${command:azureFunctions.pickProcess}"
15-
},
16-
{
17-
"name": "Launch Web",
18-
"type": "dotnet",
19-
"request": "launch",
20-
"projectPath": "${workspaceFolder}/Karamem0.Commistant.Web/Karamem0.Commistant.Web.csproj"
219
}
2210
]
2311
}

source/server/.vscode/tasks.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
"command": "jb",
5656
"args": [
5757
"cleanupcode",
58-
"--profile=\"Built-in: Reformat Code\"",
58+
"--profile='Built-in: Reformat Code'",
59+
"--exclude='**/*.config'",
5960
"${workspaceFolder}/Karamem0.Commistant.sln"
6061
],
6162
"problemMatcher": []
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageVersion Include="AdaptiveCards" Version="3.1.0" />
9+
<PackageVersion Include="AdaptiveCards.Templating" Version="2.0.5" />
10+
<PackageVersion Include="AltCover" Version="9.0.102" />
11+
<PackageVersion Include="Aspire.AppHost.Sdk" Version="9.3.1" />
12+
<PackageVersion Include="Aspire.Azure.AI.OpenAI" Version="13.1.0-preview.1.25616.3" />
13+
<PackageVersion Include="Aspire.Azure.Storage.Blobs" Version="13.1.0" />
14+
<PackageVersion Include="Aspire.Hosting.AppHost" Version="13.1.0" />
15+
<PackageVersion Include="Aspire.Hosting.Azure.CognitiveServices" Version="13.1.0" />
16+
<PackageVersion Include="Aspire.Hosting.Azure.Functions" Version="13.1.0" />
17+
<PackageVersion Include="Aspire.Hosting.Azure.Storage" Version="13.1.0" />
18+
<PackageVersion Include="Azure.AI.OpenAI" Version="2.8.0-beta.1" />
19+
<PackageVersion Include="Azure.Identity" Version="1.17.1" />
20+
<PackageVersion Include="Azure.Storage.Blobs" Version="12.26.0" />
21+
<PackageVersion Include="Mapster" Version="7.4.0" />
22+
<PackageVersion Include="Mapster.DependencyInjection" Version="1.0.1" />
23+
<PackageVersion Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.23.0" />
24+
<PackageVersion Include="Microsoft.ApplicationInsights.WorkerService" Version="2.23.0" />
25+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.1" />
26+
<PackageVersion Include="Microsoft.Azure.Functions.Worker" Version="2.51.0" />
27+
<PackageVersion Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="2.50.0" />
28+
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.3.0" />
29+
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.1.0" />
30+
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.3.1" />
31+
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.7" />
32+
<PackageVersion Include="Microsoft.Bot.Builder.Azure.Blobs" Version="4.23.0" />
33+
<PackageVersion Include="Microsoft.Bot.Builder.Dialogs" Version="4.23.0" />
34+
<PackageVersion Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.23.0" />
35+
<PackageVersion Include="Microsoft.Bot.Builder.Testing" Version="4.23.0" />
36+
<PackageVersion Include="Microsoft.Bot.Connector" Version="4.23.0" />
37+
<PackageVersion Include="Microsoft.Bot.Schema" Version="4.23.0" />
38+
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="10.0.1" />
39+
<PackageVersion Include="Microsoft.Identity.Web" Version="4.2.0" />
40+
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.15.0" />
41+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
42+
<PackageVersion Include="NSubstitute" Version="5.3.0" />
43+
<PackageVersion Include="NUnit" Version="4.4.0" />
44+
<PackageVersion Include="NUnit.Analyzers" Version="4.11.2" />
45+
<PackageVersion Include="NUnit3TestAdapter" Version="6.0.0" />
46+
<PackageVersion Include="NunitXml.TestLogger" Version="7.1.0" />
47+
<PackageVersion Include="QRCoder" Version="1.7.0" />
48+
</ItemGroup>
49+
50+
</Project>

source/server/Karamem0.Commistant.AppHost/Karamem0.Commistant.AppHost.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
</PropertyGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.0.1" />
27-
<PackageReference Include="Aspire.Hosting.Azure.CognitiveServices" Version="13.0.1" />
28-
<PackageReference Include="Aspire.Hosting.Azure.Functions" Version="13.0.1-preview.1.25575.3" />
29-
<PackageReference Include="Aspire.Hosting.Azure.Storage" Version="13.0.1" />
26+
<PackageReference Include="Aspire.Hosting.AppHost" />
27+
<PackageReference Include="Aspire.Hosting.Azure.CognitiveServices" />
28+
<PackageReference Include="Aspire.Hosting.Azure.Functions" />
29+
<PackageReference Include="Aspire.Hosting.Azure.Storage" />
3030
</ItemGroup>
3131

3232
<ItemGroup>

source/server/Karamem0.Commistant.AppHost/Program.cs

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,67 @@
66
// https://github.com/karamem0/commistant/blob/main/LICENSE
77
//
88

9-
#pragma warning disable IDE0059
10-
119
using Aspire.Hosting;
1210

1311
var builder = DistributedApplication.CreateBuilder(args);
1412

13+
var azurite = builder
14+
.AddAzureStorage("azurite")
15+
.RunAsEmulator(azurite => azurite
16+
.WithBlobPort(10000)
17+
.WithQueuePort(10001)
18+
.WithTablePort(10002)
19+
);
20+
1521
var openAIName = builder.AddParameter("AzureOpenAIName");
1622
var openAIResourceGroup = builder.AddParameter("AzureOpenAIResourceGroup");
1723
var openAI = builder
1824
.AddAzureOpenAI("openai")
1925
.AsExisting(openAIName, openAIResourceGroup);
2026

27+
var storageAccountName = builder.AddParameter("AzureStorageAccountName");
28+
var storageAccountResourceGroup = builder.AddParameter("AzureStorageAccountResourceGroup");
2129
var storageAccount = builder
2230
.AddAzureStorage("storage")
23-
.RunAsEmulator(azurite => azurite
24-
.WithBlobPort(10000)
25-
.WithQueuePort(10001)
26-
.WithTablePort(10002)
27-
);
31+
.AsExisting(storageAccountName, storageAccountResourceGroup);
2832
var storageContainer = storageAccount.AddBlobContainer("container", "azure-bot-states");
2933

30-
var functionApp = builder
34+
var openAIDeploymentName = builder.AddParameter("AzureOpenAIDeploymentName");
35+
36+
var botFrameworkMicrosoftAppId = builder.AddParameter("BotFrameworkMicrosoftAppId");
37+
var botFrameworkMicrosoftAppPassword = builder.AddParameter("BotFrameworkMicrosoftAppPassword", secret: true);
38+
var botFrameworkMicrosoftAppTenantId = builder.AddParameter("BotFrameworkMicrosoftAppTenantId");
39+
40+
var microsoftIdentityClientId = builder.AddParameter("MicrosoftIdentityClientId");
41+
var microsoftIdentityClientSecret = builder.AddParameter("MicrosoftIdentityClientSecret");
42+
var microsoftIdentityTenantId = builder.AddParameter("MicrosoftIdentityTenantId");
43+
44+
_ = builder
3145
.AddAzureFunctionsProject<Projects.Karamem0_Commistant_Function>("function-app")
32-
.WithReference(storageContainer)
3346
.WaitFor(storageContainer)
34-
.WithHostStorage(storageAccount);
47+
.WaitFor(azurite)
48+
.WithHostStorage(azurite)
49+
.WithEnvironment("AzureStorageBlobs:Endpoint", storageAccount.Resource.BlobEndpoint)
50+
.WithEnvironment("AzureStorageBlobs:ContainerName", storageContainer.Resource.Name)
51+
.WithEnvironment("BotFramework:MicrosoftAppId", botFrameworkMicrosoftAppId)
52+
.WithEnvironment("BotFramework:MicrosoftAppPassword", botFrameworkMicrosoftAppPassword)
53+
.WithEnvironment("BotFramework:MicrosoftAppTenantId", botFrameworkMicrosoftAppTenantId)
54+
.WithEnvironment("MicrosoftIdentity:ClientId", microsoftIdentityClientId)
55+
.WithEnvironment("MicrosoftIdentity:ClientSecret", microsoftIdentityClientSecret)
56+
.WithEnvironment("MicrosoftIdentity:TenantId", microsoftIdentityTenantId);
3557

36-
var webApp = builder
58+
_ = builder
3759
.AddProject<Projects.Karamem0_Commistant_Web>("web-app")
38-
.WithReference(openAI)
3960
.WaitFor(openAI)
40-
.WithReference(storageContainer)
41-
.WaitFor(storageContainer);
61+
.WaitFor(storageContainer)
62+
.WithEnvironment("AzureOpenAI:Endpoint", $"https://{openAIName}.openai.azure.com/")
63+
.WithEnvironment("AzureOpenAI:DeploymentName", openAIDeploymentName)
64+
.WithEnvironment("AzureStorageBlobs:Endpoint", storageAccount.Resource.BlobEndpoint)
65+
.WithEnvironment("AzureStorageBlobs:ContainerName", storageContainer.Resource.BlobContainerName)
66+
.WithEnvironment("BotFramework:MicrosoftAppId", botFrameworkMicrosoftAppId)
67+
.WithEnvironment("BotFramework:MicrosoftAppPassword", botFrameworkMicrosoftAppPassword)
68+
.WithEnvironment("BotFramework:MicrosoftAppTenantId", botFrameworkMicrosoftAppTenantId);
4269

4370
var app = builder.Build();
4471

4572
await app.RunAsync();
46-
47-
#pragma warning restore IDE0059

0 commit comments

Comments
 (0)