Skip to content

Commit 65434a7

Browse files
committed
4.1.2 release
1 parent 5a7d27d commit 65434a7

24 files changed

+277
-176
lines changed

source/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"type": "module",
55
"version": "0.0.0",
66
"scripts": {
7-
"start": "tsc && vite",
8-
"build": "tsc && vite build",
7+
"dev": "tsc && vite",
8+
"build": "tsc -b && vite build",
99
"eslint": "eslint src",
1010
"eslint:fix": "eslint src --fix",
1111
"stylelint": "stylelint 'src/**/*.{css,scss,jsx,tsx}'",

source/client/vite.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export default defineConfig({
4545
'cert': fs.readFileSync('./cert/localhost.crt'),
4646
'key': fs.readFileSync('./cert/localhost.key')
4747
},
48+
'port': process.env.PORT ? Number(process.env.PORT) : 5173,
4849
'proxy': {
4950
'/api': {
5051
'changeOrigin': true,

source/server/.vscode/launch.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"version": "0.2.0",
33
"configurations": [
4+
{
5+
"name": "Launch AppHost",
6+
"type": "dotnet",
7+
"request": "launch",
8+
"projectPath": "${workspaceFolder}/Karamem0.Commistant.AppHost/Karamem0.Commistant.AppHost.csproj"
9+
},
410
{
511
"name": "Launch Function",
612
"type": "coreclr",
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<Sdk Name="Aspire.AppHost.Sdk" Version="9.3.1" />
4+
5+
<PropertyGroup>
6+
<TargetFramework>net8.0</TargetFramework>
7+
<LangVersion>latest</LangVersion>
8+
<OutputType>Exe</OutputType>
9+
<PackageId>Karamem0.Commistant.AppHost</PackageId>
10+
<Version>0.0.0</Version>
11+
<Authors>karamem0</Authors>
12+
<Company>karamem0</Company>
13+
<Product>Commistant</Product>
14+
<Copyright>Copyright (c) 2022-2025 karamem0</Copyright>
15+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
16+
<PackageProjectUrl>https://github.com/karamem0/commistant</PackageProjectUrl>
17+
<AssemblyVersion>0.0.0</AssemblyVersion>
18+
<FileVersion>0.0.0</FileVersion>
19+
<RootNamespace>Karamem0.Commistant</RootNamespace>
20+
<Nullable>enable</Nullable>
21+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
22+
<UserSecretsId>2eb68d98-313d-4456-9ea3-adf0ea7044d9</UserSecretsId>
23+
</PropertyGroup>
24+
25+
<ItemGroup>
26+
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.3.1" />
27+
<PackageReference Include="Aspire.Hosting.Azure.Storage" Version="9.3.1" />
28+
<PackageReference Include="Aspire.Hosting.NodeJs" Version="9.3.1" />
29+
<PackageReference Include="CommunityToolkit.Aspire.Hosting.NodeJS.Extensions" Version="9.5.0" />
30+
</ItemGroup>
31+
32+
</Project>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// Copyright (c) 2022-2025 karamem0
3+
//
4+
// This software is released under the MIT License.
5+
//
6+
// https://github.com/karamem0/commistant/blob/main/LICENSE
7+
//
8+
9+
using Aspire.Hosting;
10+
using Projects;
11+
using System;
12+
using System.Collections.Generic;
13+
using System.Linq;
14+
using System.Text;
15+
using System.Threading.Tasks;
16+
17+
var builder = DistributedApplication.CreateBuilder(args);
18+
19+
var storage = builder
20+
.AddAzureStorage("storage")
21+
.RunAsEmulator();
22+
var blobs = storage.AddBlobs("blobs");
23+
24+
_ = builder.AddProject("server", "../Karamem0.Commistant.Web/Karamem0.Commistant.Web.csproj")
25+
.WithReference(blobs)
26+
.WaitFor(blobs);
27+
_ = builder
28+
.AddViteApp(
29+
"client",
30+
"../../client",
31+
useHttps: true
32+
)
33+
.WithNpmPackageInstallation()
34+
.WithExternalHttpEndpoints();
35+
36+
var app = builder.Build();
37+
38+
await app.RunAsync();
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://json.schemastore.org/launchsettings.json",
3+
"profiles": {
4+
"Karamem0.Commistant.AppHost": {
5+
"commandName": "Project",
6+
"dotnetRunMessages": true,
7+
"launchBrowser": true,
8+
"applicationUrl": "https://localhost:17208;http://localhost:15189",
9+
"environmentVariables": {
10+
"ASPNETCORE_ENVIRONMENT": "Development",
11+
"DOTNET_ENVIRONMENT": "Development",
12+
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21064",
13+
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22246"
14+
}
15+
}
16+
}
17+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
}
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning",
6+
"Aspire.Hosting.Dcp": "Warning"
7+
}
8+
}
9+
}

source/server/Karamem0.Commistant.Function/Extensions/HttpRequestDataExtensions.cs renamed to source/server/Karamem0.Commistant.Function/Extensions/HttpRequestExtensions.cs

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

9-
using Microsoft.Azure.Functions.Worker.Http;
9+
using Microsoft.AspNetCore.Http;
1010
using System;
1111
using System.Collections.Generic;
1212
using System.Linq;
@@ -15,16 +15,16 @@
1515

1616
namespace Karamem0.Commistant.Extensions;
1717

18-
public static partial class HttpRequestDataExtensions
18+
public static partial class HttpRequestExtensions
1919
{
2020

21-
public static string? GetUserId(this HttpRequestData target)
21+
public static string? GetUserId(this HttpRequest target)
2222
{
23-
if (target.Headers.TryGetValues("X-MS-CLIENT-PRINCIPAL-ID", out var headerValues) is false)
23+
if (target.Headers.TryGetValue("X-MS-CLIENT-PRINCIPAL-ID", out var headerValues))
2424
{
25-
return null;
25+
return headerValues.Single();
2626
}
27-
return headerValues.Single();
27+
return null;
2828
}
2929

3030
}

source/server/Karamem0.Commistant.Function/Functions/ExecuteCommandFunction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ILogger<ExecuteCommandFunction> logger
3939

4040
#pragma warning disable IDE0060
4141
[Function("ExecuteCommand")]
42-
public async Task RunAsync([TimerTrigger("0 */1 * * * *")] TimerInfo timerInfo, CancellationToken cancellationToken)
42+
public async Task RunAsync([TimerTrigger("0 */1 * * * *")] TimerInfo timerInfo, CancellationToken cancellationToken = default)
4343
{
4444
try
4545
{

0 commit comments

Comments
 (0)