Skip to content

Commit c5df413

Browse files
Dotnet 10
1 parent 9d0aede commit c5df413

File tree

76 files changed

+2059
-2516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2059
-2516
lines changed

.github/workflows/deploy.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
name: Nuget Build
2-
3-
on:
4-
push:
5-
branches:
6-
- 'main'
7-
pull_request:
8-
branches:
9-
- 'main'
10-
11-
jobs:
12-
build:
13-
runs-on: ubuntu-latest
14-
15-
steps:
16-
- uses: actions/checkout@v4.2.2
17-
18-
- name: setup dotnet
19-
id: dotnet
20-
uses: actions/setup-dotnet@v4.3.1
21-
with:
22-
dotnet-version: 8.0.x
23-
24-
# Note: Unless a concrete version is specified in the `global.json` file,
25-
# the latest .NET version installed on the runner (including preinstalled
26-
# versions) will be used by default. To control this behavior, you may want
27-
# to use temporary `global.json` files.
28-
# https://github.com/actions/setup-dotnet/blob/main/README.md#matrix-testing
29-
- name: Create `global.json`
30-
run: |
31-
echo '{"sdk":{"version": "${{ steps.dotnet.outputs.dotnet-version }}"}}' > ./global.json
32-
33-
- name: test
34-
timeout-minutes: 10
35-
run: |
36-
dotnet test --filter Category!=Dependencies
37-
38-
- name: pack
39-
run: |
40-
dotnet pack -c Release
41-
42-
- name: publish
43-
run: |
44-
dotnet nuget push **/*.nupkg --source 'https://api.nuget.org/v3/index.json' --skip-duplicate -k ${{ secrets.nuget }}
1+
name: Nuget Build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
branches:
9+
- 'main'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4.2.2
17+
18+
- name: setup dotnet
19+
id: dotnet
20+
uses: actions/setup-dotnet@v4.3.1
21+
with:
22+
dotnet-version: 10.0.x
23+
24+
# Note: Unless a concrete version is specified in the `global.json` file,
25+
# the latest .NET version installed on the runner (including preinstalled
26+
# versions) will be used by default. To control this behavior, you may want
27+
# to use temporary `global.json` files.
28+
# https://github.com/actions/setup-dotnet/blob/main/README.md#matrix-testing
29+
- name: Create `global.json`
30+
run: |
31+
echo '{"sdk":{"version": "${{ steps.dotnet.outputs.dotnet-version }}"}}' > ./global.json
32+
33+
- name: test
34+
timeout-minutes: 10
35+
run: |
36+
dotnet test --filter Category!=Dependencies
37+
38+
- name: pack
39+
run: |
40+
dotnet pack -c Release
41+
42+
- name: publish
43+
run: |
44+
dotnet nuget push **/*.nupkg --source 'https://api.nuget.org/v3/index.json' --skip-duplicate -k ${{ secrets.nuget }}

Squidex.Libs.sln

Lines changed: 0 additions & 381 deletions
This file was deleted.

Squidex.Libs.slnx

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<Solution>
2+
<Folder Name="/ai/">
3+
<Project Path="ai/Squidex.AI.EntityFramework/Squidex.AI.EntityFramework.csproj" />
4+
<Project Path="ai/Squidex.AI.Mongo/Squidex.AI.Mongo.csproj" />
5+
<Project Path="ai/Squidex.AI.Tests/Squidex.AI.Tests.csproj" />
6+
<Project Path="ai/Squidex.AI/Squidex.AI.csproj" />
7+
</Folder>
8+
<Folder Name="/assets/">
9+
<Project Path="assets/Benchmarks/Benchmarks.csproj" />
10+
<Project Path="assets/Squidex.Assets.Azure/Squidex.Assets.Azure.csproj" />
11+
<Project Path="assets/Squidex.Assets.EntityFramework/Squidex.Assets.EntityFramework.csproj" />
12+
<Project Path="assets/Squidex.Assets.FTP/Squidex.Assets.FTP.csproj" />
13+
<Project Path="assets/Squidex.Assets.GoogleCloud/Squidex.Assets.GoogleCloud.csproj" />
14+
<Project Path="assets/Squidex.Assets.ImageMagick/Squidex.Assets.ImageMagick.csproj" />
15+
<Project Path="assets/Squidex.Assets.ImageSharp/Squidex.Assets.ImageSharp.csproj" />
16+
<Project Path="assets/Squidex.Assets.Mongo/Squidex.Assets.Mongo.csproj" />
17+
<Project Path="assets/Squidex.Assets.ResizeService/Squidex.Assets.ResizeService.csproj" />
18+
<Project Path="assets/Squidex.Assets.S3/Squidex.Assets.S3.csproj" />
19+
<Project Path="assets/Squidex.Assets.Tests/Squidex.Assets.Tests.csproj" />
20+
<Project Path="assets/Squidex.Assets.TusAdapter/Squidex.Assets.TusAdapter.csproj" />
21+
<Project Path="assets/Squidex.Assets.TusClient/Squidex.Assets.TusClient.csproj" />
22+
<Project Path="assets/Squidex.Assets/Squidex.Assets.csproj" />
23+
<Project Path="assets/TusTestServer/TusTestServer.csproj" />
24+
</Folder>
25+
<Folder Name="/caching/">
26+
<Project Path="caching/Squidex.Caching.Tests/Squidex.Caching.Tests.csproj" />
27+
<Project Path="caching/Squidex.Caching/Squidex.Caching.csproj" />
28+
</Folder>
29+
<Folder Name="/events/">
30+
<Project Path="events/Squidex.Events.EntityFramework/Squidex.Events.EntityFramework.csproj" />
31+
<Project Path="events/Squidex.Events.Mongo/Squidex.Events.Mongo.csproj" />
32+
<Project Path="events/Squidex.Events.Tests/Squidex.Events.Tests.csproj" />
33+
<Project Path="events/Squidex.Events/Squidex.Events.csproj" />
34+
</Folder>
35+
<Folder Name="/flows/">
36+
<Project Path="flows/Squidex.Flows.EntityFramework/Squidex.Flows.EntityFramework.csproj" />
37+
<Project Path="flows/Squidex.Flows.Mongo/Squidex.Flows.Mongo.csproj" />
38+
<Project Path="flows/Squidex.Flows.Tests/Squidex.Flows.Tests.csproj" />
39+
<Project Path="flows/Squidex.Flows/Squidex.Flows.csproj" />
40+
</Folder>
41+
<Folder Name="/hosting/">
42+
<Project Path="hosting/Squidex.Hosting.Abstractions/Squidex.Hosting.Abstractions.csproj" />
43+
<Project Path="hosting/Squidex.Hosting.TestRunner/Squidex.Hosting.TestRunner.csproj" />
44+
<Project Path="hosting/Squidex.Hosting.Tests/Squidex.Hosting.Tests.csproj" />
45+
<Project Path="hosting/Squidex.Hosting/Squidex.Hosting.csproj" />
46+
</Folder>
47+
<Folder Name="/log/">
48+
<Project Path="log/Squidex.Log.Tests/Squidex.Log.Tests.csproj" />
49+
<Project Path="log/Squidex.Log/Squidex.Log.csproj" />
50+
</Folder>
51+
<Folder Name="/messaging/">
52+
<Project Path="messaging/Squidex.Messaging.All/Squidex.Messaging.All.csproj" />
53+
<Project Path="messaging/Squidex.Messaging.EntityFramework/Squidex.Messaging.EntityFramework.csproj" />
54+
<Project Path="messaging/Squidex.Messaging.GoogleCloud/Squidex.Messaging.GoogleCloud.csproj" />
55+
<Project Path="messaging/Squidex.Messaging.Kafka/Squidex.Messaging.Kafka.csproj" />
56+
<Project Path="messaging/Squidex.Messaging.Mongo/Squidex.Messaging.Mongo.csproj" />
57+
<Project Path="messaging/Squidex.Messaging.RabbitMq/Squidex.Messaging.RabbitMq.csproj" />
58+
<Project Path="messaging/Squidex.Messaging.Redis/Squidex.Messaging.Redis.csproj" />
59+
<Project Path="messaging/Squidex.Messaging.Subscriptions/Squidex.Messaging.Subscriptions.csproj" />
60+
<Project Path="messaging/Squidex.Messaging.Tests/Squidex.Messaging.Tests.csproj" />
61+
<Project Path="messaging/Squidex.Messaging/Squidex.Messaging.csproj" />
62+
</Folder>
63+
<Folder Name="/text/">
64+
<Project Path="text/Squidex.Text.Tests/Squidex.Text.Tests.csproj" />
65+
<Project Path="text/Squidex.Text/Squidex.Text.csproj" />
66+
</Folder>
67+
<Project Path="utils/TestHelpers/TestHelpers.csproj" />
68+
</Solution>

ai/Squidex.AI.EntityFramework/Squidex.AI.EntityFramework.csproj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<LangVersion>Latest</LangVersion>
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
@@ -12,19 +12,17 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Meziantou.Analyzer" Version="2.0.179">
15+
<PackageReference Include="Meziantou.Analyzer" Version="3.0.25">
1616
<PrivateAssets>all</PrivateAssets>
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
</PackageReference>
19-
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.16" />
20-
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
21-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
19+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.5" />
20+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.201">
2221
<PrivateAssets>all</PrivateAssets>
2322
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2423
</PackageReference>
2524
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
2625
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
27-
<PackageReference Include="System.Text.Json" Version="8.0.6" />
2826
</ItemGroup>
2927

3028
<ItemGroup>

ai/Squidex.AI.Mongo/Squidex.AI.Mongo.csproj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<LangVersion>Latest</LangVersion>
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
@@ -12,19 +12,17 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Meziantou.Analyzer" Version="2.0.179">
15+
<PackageReference Include="Meziantou.Analyzer" Version="3.0.25">
1616
<PrivateAssets>all</PrivateAssets>
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
</PackageReference>
19-
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
20-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
19+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.201">
2120
<PrivateAssets>all</PrivateAssets>
2221
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2322
</PackageReference>
24-
<PackageReference Include="MongoDB.Driver" Version="2.30.0" />
23+
<PackageReference Include="MongoDB.Driver" Version="3.7.1" />
2524
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
2625
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
27-
<PackageReference Include="System.Text.Json" Version="8.0.6" />
2826
</ItemGroup>
2927

3028
<ItemGroup>

ai/Squidex.AI.Tests/Squidex.AI.Tests.csproj

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<LangVersion>Latest</LangVersion>
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
@@ -11,24 +11,22 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="coverlet.collector" Version="6.0.4">
14+
<PackageReference Include="coverlet.collector" Version="8.0.1">
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>
18-
<PackageReference Include="FakeItEasy" Version="8.3.0" />
19-
<PackageReference Include="FluentAssertions" Version="8.2.0" />
20-
<PackageReference Include="Markdig" Version="0.38.0" />
21-
<PackageReference Include="Meziantou.Analyzer" Version="2.0.179">
18+
<PackageReference Include="FakeItEasy" Version="9.0.1" />
19+
<PackageReference Include="FluentAssertions" Version="8.9.0" />
20+
<PackageReference Include="Markdig" Version="1.1.1" />
21+
<PackageReference Include="Meziantou.Analyzer" Version="3.0.25">
2222
<PrivateAssets>all</PrivateAssets>
2323
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2424
</PackageReference>
25-
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
26-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
25+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
2726
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
2827
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
29-
<PackageReference Include="System.Text.Json" Version="8.0.6" />
3028
<PackageReference Include="xunit" Version="2.9.3" />
31-
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
29+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
3230
<PrivateAssets>all</PrivateAssets>
3331
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3432
</PackageReference>
Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
// ==========================================================================
2-
// Squidex Headless CMS
3-
// ==========================================================================
4-
// Copyright (c) Squidex UG (haftungsbeschraenkt)
5-
// All rights reserved. Licensed under the MIT license.
6-
// ==========================================================================
7-
8-
using Betalgo.Ranul.OpenAI;
9-
using Betalgo.Ranul.OpenAI.ObjectModels;
10-
11-
namespace Squidex.AI.Implementation.OpenAI;
12-
13-
public sealed class DallEOptions : OpenAIOptions
14-
{
15-
public string? Model { get; set; } = Models.Dall_e_3;
16-
17-
public string? Style { get; set; }
18-
19-
public string? Size { get; set; }
20-
21-
public string? Quality { get; set; }
22-
23-
public string DefaultResult { get; set; } = "{ \"url\": \"{url}\" }";
24-
25-
public string PlainResult { get; set; } = "![{name}]({url})";
26-
27-
public string ImageNamePattern { get; set; } = "Generate a slugified file name for an image from the following query <QUERY>{query}</QUERY>.\\nDo not return other content.";
28-
29-
public string ImagePathPattern { get; set; } = "dall-e/{IMAGE_ID}";
30-
31-
public bool DownloadImage { get; set; } = false;
32-
}
1+
// ==========================================================================
2+
// Squidex Headless CMS
3+
// ==========================================================================
4+
// Copyright (c) Squidex UG (haftungsbeschraenkt)
5+
// All rights reserved. Licensed under the MIT license.
6+
// ==========================================================================
7+
8+
using Betalgo.Ranul.OpenAI;
9+
using Betalgo.Ranul.OpenAI.Contracts.Enums.Image;
10+
using Betalgo.Ranul.OpenAI.ObjectModels;
11+
12+
namespace Squidex.AI.Implementation.OpenAI;
13+
14+
public sealed class DallEOptions : OpenAIOptions
15+
{
16+
public string Model { get; set; } = Models.Dall_e_3;
17+
18+
public string Style { get; set; } = ImageStyle.Natural;
19+
20+
public string Size { get; set; } = ImageSize.Size1792x1024;
21+
22+
public string Quality { get; set; } = ImageQuality.Medium;
23+
24+
public string DefaultResult { get; set; } = "{ \"url\": \"{url}\" }";
25+
26+
public string PlainResult { get; set; } = "![{name}]({url})";
27+
28+
public string ImageNamePattern { get; set; } = "Generate a slugified file name for an image from the following query <QUERY>{query}</QUERY>.\\nDo not return other content.";
29+
30+
public string ImagePathPattern { get; set; } = "dall-e/{IMAGE_ID}";
31+
32+
public bool DownloadImage { get; set; } = false;
33+
}

ai/Squidex.AI/Implementation/OpenAI/DallETool.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// All rights reserved. Licensed under the MIT license.
66
// ==========================================================================
77

8+
using Betalgo.Ranul.OpenAI.Contracts.Requests.Image;
89
using Betalgo.Ranul.OpenAI.Managers;
910
using Betalgo.Ranul.OpenAI.ObjectModels.RequestModels;
1011
using Microsoft.Extensions.Options;
@@ -78,7 +79,7 @@ public async Task<string> ExecuteAsync(ToolContext toolContext,
7879
throw new ChatException("Missing argument 'query'.");
7980
}
8081

81-
var request = new ImageCreateRequest(queryArg.ToString())
82+
var request = new CreateImageRequest(queryArg.ToString())
8283
{
8384
Model = options.Model,
8485
Size = options.Size,
@@ -98,9 +99,9 @@ public async Task<string> ExecuteAsync(ToolContext toolContext,
9899
throw new ChatException($"Request failed with unknown error. HTTP {response.HttpStatusCode}.");
99100
}
100101

101-
var url = response.Results[0].Url;
102+
var url = response.Data[0].Url;
102103

103-
if (options.DownloadImage)
104+
if (options.DownloadImage && !string.IsNullOrWhiteSpace(url))
104105
{
105106
url = await DownloadImageAsync(url, null, ct);
106107
}

ai/Squidex.AI/Squidex.AI.csproj

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<LangVersion>Latest</LangVersion>
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
@@ -12,22 +12,20 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Betalgo.Ranul.OpenAI" Version="8.10.1" />
16-
<PackageReference Include="Meziantou.Analyzer" Version="2.0.179">
15+
<PackageReference Include="Betalgo.Ranul.OpenAI" Version="9.2.6" />
16+
<PackageReference Include="Meziantou.Analyzer" Version="3.0.25">
1717
<PrivateAssets>all</PrivateAssets>
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
</PackageReference>
20-
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
21-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
20+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.201">
2221
<PrivateAssets>all</PrivateAssets>
2322
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2423
</PackageReference>
2524
<PackageReference Include="Pinecone.NET" Version="3.0.0" />
2625
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
2726
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
28-
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
29-
<PackageReference Include="System.Reactive" Version="6.0.1" />
30-
<PackageReference Include="System.Text.Json" Version="8.0.6" />
27+
<PackageReference Include="System.Interactive.Async" Version="7.0.0" />
28+
<PackageReference Include="System.Reactive" Version="6.1.0" />
3129
</ItemGroup>
3230

3331
<ItemGroup>

0 commit comments

Comments
 (0)