Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ updates:
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
open-pull-requests-limit: 1
registries:
- nuget-feed-nuget-pkg-github-com-ashleighadams-index-json
- public
Expand All @@ -26,4 +26,4 @@ updates:
- "patch"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
update-types: ["version-update:semver-major"]
8 changes: 4 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
dotnet-version: 10.x

- name: Setup Verlite
run: |
#verlite_version="$(dotnet msbuild Directory.Build.props -getitem:PackageReference | jq -r '.Items.PackageReference[] | select(.Identity=="Verlite.MsBuild") .Version')"
verlite_version="2.5.0"
verlite_version="2.7.0"
dotnet tool install --global Verlite.CLI --version "$verlite_version"
verlite . --enable-shadow-repo --auto-fetch --verbosity verbatim

Expand Down Expand Up @@ -97,12 +97,12 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
dotnet-version: 10.x

- name: Setup Verlite
run: |
#verlite_version="$(dotnet msbuild Directory.Build.props -getitem:PackageReference | jq -r '.Items.PackageReference[] | select(.Identity=="Verlite.MsBuild") .Version')"
verlite_version="2.5.0"
verlite_version="2.7.0"
dotnet tool install --global Verlite.CLI --version "$verlite_version"
verlite . --enable-shadow-repo --auto-fetch --verbosity verbatim

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
# - rid: linux-arm64
# os: ubuntu-latest
# project: src/Keyden.Desktop.Unix
- rid: osx-x64
os: macos-13
project: src/Keyden.Desktop.Unix
#- rid: osx-x64
# os: macos-13
# project: src/Keyden.Desktop.Unix
# - rid: osx-arm64
# os: macos-13
# project: src/Keyden.Desktop.Unix
Expand All @@ -46,12 +46,12 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
dotnet-version: 10.x

- name: Setup Verlite
run: |
#verlite_version="$(dotnet msbuild Directory.Build.props -getitem:PackageReference | jq -r '.Items.PackageReference[] | select(.Identity=="Verlite.MsBuild") .Version')"
verlite_version="2.5.0"
verlite_version="2.7.0"
dotnet tool install --global Verlite.CLI --version "$verlite_version"
verlite . --enable-shadow-repo --auto-fetch --verbosity verbatim

Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- Enable the new nullability syntax and analyzing -->
<Nullable>enable</Nullable>
<!-- Allow using `init` and records in .NET Core versions prior to .NET 5 -->
<LangVersion Condition="'$(LangVersion)' == ''">13.0</LangVersion>
<LangVersion Condition="'$(LangVersion)' == ''">14.0</LangVersion>
<!--<Optimize>false</Optimize>-->
<!-- CA2007, RCS1090: Don't want ConfigureAwait(false), we *do* want to use the sync context! -->
<!-- 1591: Ignore missing inline documentation. -->
Expand All @@ -25,7 +25,7 @@
<!-- Ensure code style is followed, with heightened warnings -->
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel Condition="'$(AnalysisLevel)' == ''">9.0</AnalysisLevel>
<AnalysisLevel Condition="'$(AnalysisLevel)' == ''">10.0</AnalysisLevel>
<!-- Keep AOT compatibility and enable warnings -->
<IsAotCompatible Condition="'$(IsAotCompatible)'==''">true</IsAotCompatible>
<!-- Meta info -->
Expand Down Expand Up @@ -65,7 +65,7 @@
<RestoreLockedMode Condition="'$(CI)' != ''">true</RestoreLockedMode>
</PropertyGroup>
<ItemGroup>
<GlobalPackageReference Include="DotNet.ReproducibleBuilds" Version="1.2.25" />
<GlobalPackageReference Include="DotNet.ReproducibleBuilds" Version="2.0.2" />
</ItemGroup>

</Project>
39 changes: 20 additions & 19 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,31 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Verlite.MsBuild" Version="2.6.0" />
<PackageVersion Include="System.Text.Json" Version="9.0.9" />
<PackageVersion Include="SSH.NET" Version="2025.0.0" />
<PackageVersion Include="Avalonia" Version="11.3.6" />
<PackageVersion Include="Avalonia.Desktop" Version="11.3.6" />
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.6" />
<PackageVersion Include="Avalonia.Fonts.Inter" Version="11.3.6" />
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.3.6" />
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.3.6" />
<PackageVersion Include="Avalonia.Native" Version="11.3.6" />
<PackageVersion Include="Avalonia.Skia" Version="11.3.6" />
<PackageVersion Include="Avalonia.Win32" Version="11.3.6" />
<PackageVersion Include="NSec.Cryptography" Version="25.4.0" />
<PackageVersion Include="Verlite.MsBuild" Version="2.7.0" />
<PackageVersion Include="System.Text.Json" Version="10.0.5" />
<PackageVersion Include="SSH.NET" Version="2025.1.0" />
<PackageVersion Include="Avalonia" Version="11.3.12" />
<PackageVersion Include="Avalonia.Desktop" Version="11.3.12" />
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.12" />
<PackageVersion Include="Avalonia.Fonts.Inter" Version="11.3.12" />
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.3.8" />
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.3.12" />
<PackageVersion Include="Avalonia.Native" Version="11.3.12" />
<PackageVersion Include="Avalonia.Skia" Version="11.3.12" />
<PackageVersion Include="Avalonia.Win32" Version="11.3.12" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.9" />
<PackageVersion Include="Microsoft.Win32.SystemEvents" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.5" />
<PackageVersion Include="Microsoft.Win32.SystemEvents" Version="10.0.5" />
<PackageVersion Include="Projektanker.Icons.Avalonia" Version="9.6.2" />
<PackageVersion Include="Projektanker.Icons.Avalonia.FontAwesome" Version="9.6.2" />
<PackageVersion Include="Projektanker.Icons.Avalonia.MaterialDesign" Version="9.6.2" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
<PackageVersion Include="FluentAssertions" Version="7.2.0" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageVersion Include="coverlet.msbuild" Version="8.0.0" />
<PackageVersion Include="FluentAssertions" Version="[7.2.1]" />
<PackageVersion Include="GitHubActionsTestLogger" Version="3.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="coverlet.collector" Version="8.0.0" />
</ItemGroup>
</Project>
22 changes: 22 additions & 0 deletions Keyden.sln
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub", "GitHub", "{7CFFD7
.github\workflows\deploy-release.yml = .github\workflows\deploy-release.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Keyden.1Password.Sdk", "src\Keyden.1Password.Sdk\Keyden.1Password.Sdk.csproj", "{10A5765F-A07B-33D4-F164-85AAFF3181E3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -168,6 +170,26 @@ Global
{9D7AA409-A924-484E-9E25-85795D1D013F}.Release|x64.Build.0 = Release|x64
{9D7AA409-A924-484E-9E25-85795D1D013F}.Release|x86.ActiveCfg = Release|x86
{9D7AA409-A924-484E-9E25-85795D1D013F}.Release|x86.Build.0 = Release|x86
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Debug|ARM.ActiveCfg = Debug|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Debug|ARM.Build.0 = Debug|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Debug|ARM64.Build.0 = Debug|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Debug|x64.ActiveCfg = Debug|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Debug|x64.Build.0 = Debug|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Debug|x86.ActiveCfg = Debug|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Debug|x86.Build.0 = Debug|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Release|Any CPU.Build.0 = Release|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Release|ARM.ActiveCfg = Release|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Release|ARM.Build.0 = Release|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Release|ARM64.ActiveCfg = Release|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Release|ARM64.Build.0 = Release|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Release|x64.ActiveCfg = Release|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Release|x64.Build.0 = Release|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Release|x86.ActiveCfg = Release|Any CPU
{10A5765F-A07B-33D4-F164-85AAFF3181E3}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.0",
"version": "10.0.0",
"rollForward": "latestFeature"
}
}
18 changes: 18 additions & 0 deletions src/Keyden.1Password.Sdk/Base64JsonConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Keyden.OnePassword.SDK;

internal class Base64JsonConverter : JsonConverter<string>
{
public override string? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return OnePassSdkNative.Utf8.GetString(reader.GetBytesFromBase64());
}

public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
{
writer.WriteBase64StringValue(OnePassSdkNative.Utf8.GetBytes(value));
}
}
40 changes: 40 additions & 0 deletions src/Keyden.1Password.Sdk/ByteArrayJsonConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using System;
using System.IO;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Keyden.OnePassword.SDK;

internal class ByteArrayJsonConverter : JsonConverter<string>
{
public override string? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
using var ms = new MemoryStream();

if (reader.TokenType != JsonTokenType.StartArray)
throw new JsonException($"Expected start array, got {reader.TokenType}", null, null, reader.TokenStartIndex);

while (reader.Read() && reader.TokenType == JsonTokenType.Number)
{
if (!reader.TryGetByte(out byte x))
throw new JsonException($"Expected number between [0..255]", null, null, reader.TokenStartIndex);
ms.WriteByte(x);
}

if (reader.TokenType != JsonTokenType.EndArray)
throw new JsonException($"Expected end array, got {reader.TokenType}", null, null, reader.TokenStartIndex);

ms.Flush();
return OnePassSdkNative.Utf8.GetString(ms.ToArray());
}

public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
{
var bytes = OnePassSdkNative.Utf8.GetBytes(value);

writer.WriteStartArray();
foreach (byte x in bytes)
writer.WriteNumberValue(x);
writer.WriteEndArray();
}
}
13 changes: 13 additions & 0 deletions src/Keyden.1Password.Sdk/Keyden.1Password.Sdk.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>Keyden.OnePassword.SDK</RootNamespace>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" />
</ItemGroup>

</Project>
Loading
Loading