Skip to content

Commit

Permalink
Merge pull request #91 from strem-app/feature/dotnet-8
Browse files Browse the repository at this point in the history
Feature/dotnet 8
  • Loading branch information
grofit authored Dec 8, 2023
2 parents 7f88a67 + cff66ca commit 44e42f7
Show file tree
Hide file tree
Showing 56 changed files with 246 additions and 169 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET 6.0
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Run Build Script
shell: pwsh
run: |
./build.ps1 --buildNo='0.8.${{github.run_number}}' --target='build-and-test'
./build.ps1 --buildNo='0.9.${{github.run_number}}' --target='build-and-test'
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
Expand All @@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@v3
- name: Package App Script
shell: pwsh
run: ./build.ps1 --buildNo='0.8.${{github.run_number}}' --target='publish'
run: ./build.ps1 --buildNo='0.9.${{github.run_number}}' --target='publish'
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand Down
3 changes: 2 additions & 1 deletion src/Strem.Build/Strem.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Strem.Core/Extensions/InputExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static KeyCode ToKeyCode(this ModifierMask modifier)
if(modifier == ModifierMask.LeftMeta) { return KeyCode.VcLeftMeta; }
if(modifier == ModifierMask.RightMeta) { return KeyCode.VcRightMeta; }

return KeyCode.CharUndefined;
return KeyCode.VcUndefined;
}

public static ModifierMask ToModifier(this KeyCode key)
Expand Down
9 changes: 5 additions & 4 deletions src/Strem.Core/Strem.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Library</OutputType>
<Version>0.0.0</Version>
<IsPackable>true</IsPackable>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="SharpHook.Reactive" Version="4.2.1" />
<PackageReference Include="SharpHook.Reactive" Version="5.1.2" />
<PackageReference Include="System.Reactive" Version="6.0.0" />
</ItemGroup>

Expand Down
5 changes: 3 additions & 2 deletions src/Strem.Data/Strem.Data.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<Version>0.0.0</Version>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LiteDB" Version="5.0.16" />
<PackageReference Include="LiteDB" Version="5.0.17" />
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 6 additions & 5 deletions src/Strem.Flows.Default/Strem.Flows.Default.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>Library</OutputType>
<Version>0.0.0</Version>
<IsPackable>true</IsPackable>
<LangVersion>12</LangVersion>
</PropertyGroup>


Expand All @@ -15,13 +16,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BlazorMonaco" Version="3.0.0" />
<PackageReference Include="BlazorMonaco" Version="3.1.0" />
<PackageReference Include="IronPython" Version="3.4.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.20" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.13" />
<PackageReference Include="RestSharp" Version="108.0.1" />
<PackageReference Include="SharpHook.Reactive" Version="4.2.1" />
<PackageReference Include="Westwind.Scripting" Version="1.3.2" />
<PackageReference Include="SharpHook.Reactive" Version="5.1.2" />
<PackageReference Include="Westwind.Scripting" Version="1.3.3" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 4 additions & 3 deletions src/Strem.Flows/Strem.Flows.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Library</OutputType>
<Version>0.0.0</Version>
<IsPackable>true</IsPackable>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Reactive" Version="6.0.0" />
</ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Strem.Infrastructure/Extensions/WebHostHackExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ public static class WebHostHackExtensions
public static void PublishAsyncEvent<T>(this ControllerBase controller, T eventArgs) => EventBus.PublishAsync(eventArgs);
public static T GetService<T>(this ControllerBase controller) => ServiceLocator.GetService<T>();
public static T GetService<T>(this ComponentBase component) => ServiceLocator.GetService<T>();
public static ILogger<T> GetLogger<T>(this ControllerBase controller) => ServiceLocator.GetService<ILogger<T>>();
public static ILogger<T> GetLogger<T>(this ComponentBase component) => ServiceLocator.GetService<ILogger<T>>();
}
10 changes: 2 additions & 8 deletions src/Strem.Infrastructure/Plugin/InfrastructurePluginStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public async Task StartPlugin()
AppState.UserVariables.OnVariableChanged
.Subscribe(x =>
{
Logger.Information($"User Variables [{x.Key.Name}|{x.Key.Context}] Changed");
if (AppState.UserVariables.Has(x.Key))
{ UserVariablesRepository.Upsert(x.Key, x); }
else
Expand All @@ -60,21 +61,14 @@ public async Task StartPlugin()
AppState.AppVariables.OnVariableChanged
.Subscribe(x =>
{
Logger.Information($"App Variables [{x.Key.Name}|{x.Key.Context}] Changed");
if (AppState.AppVariables.Has(x.Key))
{ AppVariablesRepository.Upsert(x.Key, x); }
else
{ AppVariablesRepository.Delete(x.Key); }
})
.AddTo(_subs);

AppState.UserVariables.OnVariableChanged
.Subscribe(x => Logger.Information($"User Variables [{x.Key.Name}|{x.Key.Context}] Changed"))
.AddTo(_subs);

AppState.AppVariables.OnVariableChanged
.Subscribe(x => Logger.Information($"App Variables [{x.Key.Name}|{x.Key.Context}] Changed"))
.AddTo(_subs);

EventBus.Receive<ErrorEvent>().Subscribe(x => Logger.Error($"[{x.Source}]: {x.Message}"));

Logger.Information("Setting Up Integration Registries");
Expand Down
5 changes: 3 additions & 2 deletions src/Strem.Infrastructure/Strem.Infrastructure.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Library</OutputType>
<Version>0.0.0</Version>
<IsPackable>true</IsPackable>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,7 +18,7 @@

<ItemGroup>
<PackageReference Include="Glob" Version="1.1.9" />
<PackageReference Include="LiteDB" Version="5.0.16" />
<PackageReference Include="LiteDB" Version="5.0.17" />
<PackageReference Include="Persistity.Flow" Version="2.0.47" />
<PackageReference Include="Persistity.Serializers.Json" Version="2.0.47" />
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
Expand Down
5 changes: 3 additions & 2 deletions src/Strem.OBS/Strem.OBS.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>12</LangVersion>
</PropertyGroup>


Expand All @@ -12,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.20" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
<PackageReference Include="Obs.v5.WebSocket.Reactive" Version="1.0.9" />
<PackageReference Include="Persistity" Version="2.0.47" />
</ItemGroup>
Expand Down
7 changes: 4 additions & 3 deletions src/Strem.Platforms.Windows/Strem.Platforms.Windows.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NativeFileDialogSharp" Version="0.5.0" />
<PackageReference Include="NAudio" Version="2.1.0" />
<PackageReference Include="System.Speech" Version="7.0.0" />
<PackageReference Include="NAudio" Version="2.2.1" />
<PackageReference Include="System.Speech" Version="8.0.0" />
<PackageReference Include="TextCopy" Version="6.2.1" />
</ItemGroup>

Expand Down
5 changes: 3 additions & 2 deletions src/Strem.Portals/Strem.Portals.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>Library</OutputType>
<Version>0.0.0</Version>
<IsPackable>true</IsPackable>
<LangVersion>12</LangVersion>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>


Expand All @@ -15,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.20" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Strem.StreamElements/Extensions/IAppStateExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ namespace Strem.StreamElements.Extensions;

public static class IAppStateExtensions
{
public static bool HasJwtToken(this IAppState state) => state.AppVariables.Has(StreamElementsVars.JwtToken);
public static bool HasStreamElementsJwtToken(this IAppState state) => state.AppVariables.Has(StreamElementsVars.JwtToken);
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public class OnStreamElementsCheerTrigger : FlowTrigger<OnStreamElementsCheerTri
public override string Code => OnStreamElementsCheerTriggerData.TriggerCode;
public override string Version => OnStreamElementsCheerTriggerData.TriggerVersion;

public static VariableEntry CheerUsernameVariable = new("cheer.username", StreamElementsVars.StreamElementsContext);
public static VariableEntry CheerMessageVariable = new("cheer.message", StreamElementsVars.StreamElementsContext);
public static VariableEntry CheerAmountVariable = new("cheer.amount", StreamElementsVars.StreamElementsContext);
public static VariableEntry CheerDisplayNameVariable = new("cheer.displayname", StreamElementsVars.StreamElementsContext);
public static VariableEntry CheerUsernameVariable = new("cheer.username", StreamElementsVars.Context);
public static VariableEntry CheerMessageVariable = new("cheer.message", StreamElementsVars.Context);
public static VariableEntry CheerAmountVariable = new("cheer.amount", StreamElementsVars.Context);
public static VariableEntry CheerDisplayNameVariable = new("cheer.displayname", StreamElementsVars.Context);

public override string Name => "On StreamElements Cheer";
public override string Category => "StreamElements";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public class OnStreamElementsRedemptionTrigger : FlowTrigger<OnStreamElementsRed
public override string Code => OnStreamElementsRedemptionTriggerData.TriggerCode;
public override string Version => OnStreamElementsRedemptionTriggerData.TriggerVersion;

public static VariableEntry RedemptionUserVariable = new("redemption.user", StreamElementsVars.StreamElementsContext);
public static VariableEntry RedemptionStoreItemVariable = new("redemption.item-name", StreamElementsVars.StreamElementsContext);
public static VariableEntry RedemptionMessageVariable = new("redemption.message", StreamElementsVars.StreamElementsContext);
public static VariableEntry RedemptionStoreItemIdVariable = new("redemption.item-id", StreamElementsVars.StreamElementsContext);
public static VariableEntry RedemptionUserVariable = new("redemption.user", StreamElementsVars.Context);
public static VariableEntry RedemptionStoreItemVariable = new("redemption.item-name", StreamElementsVars.Context);
public static VariableEntry RedemptionMessageVariable = new("redemption.message", StreamElementsVars.Context);
public static VariableEntry RedemptionStoreItemIdVariable = new("redemption.item-id", StreamElementsVars.Context);

public override string Name => "On StreamElements Redemption";
public override string Category => "StreamElements";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public class OnStreamElementsTipTrigger : FlowTrigger<OnStreamElementsTipTrigger
public override string Code => OnStreamElementsTipTriggerData.TriggerCode;
public override string Version => OnStreamElementsTipTriggerData.TriggerVersion;

public static VariableEntry TipUsernameVariable = new("tip.username", StreamElementsVars.StreamElementsContext);
public static VariableEntry TipMessageVariable = new("tip.message", StreamElementsVars.StreamElementsContext);
public static VariableEntry TipAmountVariable = new("tip.amount", StreamElementsVars.StreamElementsContext);
public static VariableEntry TipCurrencyVariable = new("tip.currency", StreamElementsVars.StreamElementsContext);
public static VariableEntry TipUsernameVariable = new("tip.username", StreamElementsVars.Context);
public static VariableEntry TipMessageVariable = new("tip.message", StreamElementsVars.Context);
public static VariableEntry TipAmountVariable = new("tip.amount", StreamElementsVars.Context);
public static VariableEntry TipCurrencyVariable = new("tip.currency", StreamElementsVars.Context);

public override string Name => "On StreamElements Tip";
public override string Category => "StreamElements";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public async Task StartPlugin()
.Subscribe(x => Logger.LogError(x.Exception, "StreamElements error reported"))
.AddTo(_subs);

if (AppState.HasJwtToken())
if (AppState.HasStreamElementsJwtToken())
{ await AttemptConnect(); }
}

Expand Down
5 changes: 3 additions & 2 deletions src/Strem.StreamElements/Strem.StreamElements.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.0.0</Version>
<IsPackable>false</IsPackable>
<LangVersion>12</LangVersion>
</PropertyGroup>


Expand All @@ -14,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.20" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="StreamElements.WebSocket.Reactive" Version="1.0.2" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace Strem.StreamElements.Variables;
public class StreamElementsVars
{
// Generic
public static readonly string StreamElementsContext = "stream-elements";
public static readonly string Context = "stream-elements";

// OAuth (app)
public static readonly VariableEntry JwtToken = new("jwt-token", StreamElementsContext);
public static readonly VariableEntry JwtToken = new("jwt-token", Context);
}
5 changes: 3 additions & 2 deletions src/Strem.Todos/Strem.Todos.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>true</IsPackable>
<Version>0.0.0</Version>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.20" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 44e42f7

Please sign in to comment.