Skip to content

Commit 2c208aa

Browse files
authored
Merge pull request #93 from Gml-Launcher/develop
Develop
2 parents 26fb344 + dbf3686 commit 2c208aa

9 files changed

Lines changed: 32 additions & 27 deletions

File tree

src/Gml.Core.Interfaces/Gml.Core.Interfaces.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55
<LangVersion>latest</LangVersion>
66
<RootNamespace>GmlCore.Interfaces</RootNamespace>
77
<TargetFrameworks>net8.0;netstandard2.1</TargetFrameworks>
8-
<Version>2025.1.2</Version>
8+
<Version>2025.1.3</Version>
99
<Title>Gml.Core.Interfaces</Title>
1010
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="2.2.0" />
15-
<PackageReference Include="System.Text.Json" Version="8.0.5" />
14+
<PackageReference Include="System.Text.Json" Version="8.0.6" />
15+
</ItemGroup>
16+
17+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
18+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1619
</ItemGroup>
1720

1821
</Project>

src/Gml.Core.Interfaces/Procedures/IFileStorageProcedures.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
using System.IO;
33
using System.Threading.Tasks;
44
using GmlCore.Interfaces.System;
5-
using Microsoft.AspNetCore.Http;
65

76
namespace GmlCore.Interfaces.Procedures
87
{
98
public interface IFileStorageProcedures
109
{
11-
Task<IFileInfo?> DownloadFileStream(string fileHash, Stream outputStream, IHeaderDictionary headers);
10+
Task<IFileInfo?> DownloadFileStream(string fileHash, Stream outputStream);
1211
Task<string> LoadFile(
1312
Stream fileStream,
1413
string? folder = null,

src/Gml.Core/Core/Helpers/Files/FileStorageProcedures.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
using GmlCore.Interfaces.System;
1313
using Microsoft.AspNetCore.Http;
1414
using Minio;
15-
using Minio.DataModel.Args;
1615
using Minio.DataModel.Tags;
1716

1817
namespace Gml.Core.Helpers.Files
@@ -63,8 +62,7 @@ private void SettingsUpdated(IStorageSettings settings)
6362

6463
public async Task<IFileInfo?> DownloadFileStream(
6564
string fileHash,
66-
Stream outputStream,
67-
IHeaderDictionary headers)
65+
Stream outputStream)
6866
{
6967
LocalFileInfo? localFileInfo = default;
7068

@@ -116,7 +114,7 @@ private void SettingsUpdated(IStorageSettings settings)
116114

117115
if (metadata is not null)
118116
{
119-
headers.Add("Content-Disposition", $"attachment; filename={metadata.Tags["file-name"]}");
117+
// headers.Add("Content-Disposition", $"attachment; filename={metadata.Tags["file-name"]}");
120118
await MinioClient.GetObjectAsync(getObjectArgs);
121119
}
122120
else
@@ -127,7 +125,7 @@ private void SettingsUpdated(IStorageSettings settings)
127125
.WithCallbackStream(async (stream, token) =>
128126
await stream.CopyToAsync(outputStream, token));
129127

130-
headers.Add("Content-Disposition", $"attachment; filename={fileHash}");
128+
// headers.Add("Content-Disposition", $"attachment; filename={fileHash}");
131129
await MinioClient.GetObjectAsync(getObjectArgs);
132130
}
133131

src/Gml.Core/Core/Helpers/Profiles/ProfileProcedures.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
using CmlLib.Core.ModLoaders.LiteLoader;
1818
using CmlLib.Core.ModLoaders.QuiltMC;
1919
using CmlLib.Core.VersionMetadata;
20-
using CommunityToolkit.Diagnostics;
2120
using Gml.Common;
2221
using Gml.Core.Constants;
2322
using Gml.Core.Exceptions;
@@ -106,10 +105,10 @@ public async Task AddProfile(IGameProfile? profile)
106105
string description)
107106
{
108107
if (string.IsNullOrEmpty(name))
109-
ThrowHelper.ThrowArgumentNullException<string>(name);
108+
throw new ArgumentNullException(nameof(name));
110109

111110
if (string.IsNullOrEmpty(version))
112-
ThrowHelper.ThrowArgumentNullException<string>(version);
111+
throw new ArgumentNullException(nameof(name));
113112

114113
var profile = new GameProfile(name, displayName, version, loader)
115114
{

src/Gml.Core/Gml.Core.csproj

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,19 @@
55
<Nullable>enable</Nullable>
66
<LangVersion>latest</LangVersion>
77
<PackageId>Gml.Core</PackageId>
8-
<TargetFrameworks>net8.0;netstandard2.1</TargetFrameworks>
8+
<TargetFramework>net8.0</TargetFramework>
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.2.2"/>
1312
<PackageReference Include="CurseForge.APIClient" Version="3.0.0" />
14-
<PackageReference Include="Gml.Web.Api.Domains" Version="2025.1.1" />
15-
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.1.2" />
16-
<PackageReference Include="Minio" Version="6.0.2" />
13+
<PackageReference Include="Gml.Web.Api.Domains" Version="2025.1.3" />
14+
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.14.0" />
1715
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
18-
<PackageReference Include="Spectre.Console" Version="0.48.1-preview.0.11"/>
19-
<PackageReference Include="sqlite-net-pcl" Version="1.8.116"/>
20-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.1.2" />
16+
<PackageReference Include="Spectre.Console" Version="0.50.0" />
17+
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
18+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.14.0" />
2119
<PackageReference Include="System.Runtime.Loader" Version="4.3.0"/>
22-
<PackageReference Include="System.Text.Json" Version="8.0.5" />
20+
<PackageReference Include="System.Text.Json" Version="8.0.6" />
2321
</ItemGroup>
2422

2523
<ItemGroup>
@@ -37,4 +35,13 @@
3735
</Compile>
3836
</ItemGroup>
3937

38+
<ItemGroup>
39+
<Reference Include="Microsoft.AspNetCore.Http.Features">
40+
<HintPath>C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\8.0.14\Microsoft.AspNetCore.Http.Features.dll</HintPath>
41+
</Reference>
42+
</ItemGroup>
43+
44+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
45+
<PackageReference Include="Minio" Version="5.0.2" />
46+
</ItemGroup>
4047
</Project>

src/Gml.Core/Models/Mods/CurseForgeModVersion.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Collections.Generic;
33
using CurseForge.APIClient.Models.Files;
44
using GmlCore.Interfaces.Mods;
5-
using Modrinth.Api.Models.Dto.Entities;
65

76
namespace Gml.Models.Mods;
87

src/Modrinth.Api

src/Pingo

tests/GmlCore.Tests/GmlCore.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0"/>
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
1414
<PackageReference Include="NUnit" Version="3.13.3"/>
15-
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1"/>
15+
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
1616
<PackageReference Include="NUnit.Analyzers" Version="3.6.1"/>
1717
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
1818
</ItemGroup>

0 commit comments

Comments
 (0)