Skip to content

Commit

Permalink
build(deps): Use Raiqub.T4Template (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
skarllot authored Jan 22, 2025
1 parent 4e11c9e commit 7b65c3c
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 52 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.deps.dev:443
api.github.com:443
api.securityscorecards.dev:443
github.com:443
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageVersion Include="Jab" Version="0.10.2" />
<PackageVersion Include="LibGit2Sharp" Version="0.31.0" />
<PackageVersion Include="Raiqub.Generators.EnumUtilities" Version="1.9.21" />
<PackageVersion Include="Raiqub.Generators.T4CodeWriter.Sources" Version="1.0.64" />
<PackageVersion Include="Raiqub.T4Template" Version="1.1.4" />
<PackageVersion Include="Spectre.Console" Version="0.49.1" />
<PackageVersion Include="TestableIO.System.IO.Abstractions.Wrappers" Version="21.2.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ namespace Raiqub.LlmTools.FlowPair.Agent.Operations.ReviewChanges
using System.Collections.Immutable;
using System.Text;
using Common;
using Raiqub.Generators.T4CodeWriter;
using v1;
using T4Template;
using System;

/// <summary>
/// Class to produce the template output
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")]
public partial class FeedbackHtmlTemplate : CodeWriterBase<ImmutableList<ReviewerFeedbackResponse>>
public partial class FeedbackHtmlTemplate : T4TemplateBase<ImmutableList<ReviewerFeedbackResponse>>
{
/// <summary>
/// Create the template output
Expand Down Expand Up @@ -81,8 +81,6 @@ public FeedbackHtmlTemplate(ImmutableList<ReviewerFeedbackResponse> model) : bas
Model = model;
}

public override string GetFileName() => Guid.NewGuid().ToString("N");

private static string GetRiskLevelCssClass(int number) => number switch{
0 => " is-white",
1 => " is-success",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<#@ template language="C#" debug="false" linePragmas="false" hostspecific="false" inherits="CodeWriterBase<ImmutableList<ReviewerFeedbackResponse>>" #>
<#@ template language="C#" debug="false" linePragmas="false" hostspecific="false" inherits="T4TemplateBase<ImmutableList<ReviewerFeedbackResponse>>" #>
<#@ import namespace="System.Collections.Immutable" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="Common" #>
<#@ import namespace="Raiqub.Generators.T4CodeWriter" #>
<#@ import namespace="v1" #>
<#@ import namespace="T4Template" #>
<!DOCTYPE html>
<html>
<head>
Expand Down Expand Up @@ -48,8 +48,6 @@
Model = model;
}

public override string GetFileName() => Guid.NewGuid().ToString("N");

private static string GetRiskLevelCssClass(int number) => number switch{
0 => " is-white",
1 => " is-success",
Expand Down
35 changes: 0 additions & 35 deletions src/FlowPair/Common/T4CodeWriterPolyfill.cs

This file was deleted.

5 changes: 1 addition & 4 deletions src/FlowPair/FlowPair.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
<PackageReference Include="Jab" />
<PackageReference Include="LibGit2Sharp" />
<PackageReference Include="Raiqub.Generators.EnumUtilities" />
<PackageReference Include="Raiqub.Generators.T4CodeWriter.Sources">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Raiqub.T4Template" />
<PackageReference Include="Spectre.Console" />
<PackageReference Include="TestableIO.System.IO.Abstractions.Wrappers" />
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/FlowPair/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@
"resolved": "1.9.21",
"contentHash": "zWpcPLpDwWczHfUqI4hV6YxJMKzsKH5mNbSuvv0NJ9NsM8pZ1oOEMPDvCcPbzlHDg4ZAddOFKXBcq2HouhsdNA=="
},
"Raiqub.Generators.T4CodeWriter.Sources": {
"Raiqub.T4Template": {
"type": "Direct",
"requested": "[1.0.64, )",
"resolved": "1.0.64",
"contentHash": "eEldrJOoau56Hu1KVcNb8+g0m4lMLcLU//XyYbem48hqYwFH9cAWbKpnwXymPXfVbM8F6SR+Z56DwXgHlMteKg=="
"requested": "[1.1.4, )",
"resolved": "1.1.4",
"contentHash": "2Pty8HHExwhK4AWH0e6PVSAxfmqa2a/j8CN66eI09uaw6sE57BzZ0KyzIAIonyCNLczLzZHO3XIhn/9bAEB2xA=="
},
"Spectre.Console": {
"type": "Direct",
Expand Down
6 changes: 6 additions & 0 deletions tests/FlowPair.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@
"resolved": "1.9.21",
"contentHash": "zWpcPLpDwWczHfUqI4hV6YxJMKzsKH5mNbSuvv0NJ9NsM8pZ1oOEMPDvCcPbzlHDg4ZAddOFKXBcq2HouhsdNA=="
},
"Raiqub.T4Template": {
"type": "Transitive",
"resolved": "1.1.4",
"contentHash": "2Pty8HHExwhK4AWH0e6PVSAxfmqa2a/j8CN66eI09uaw6sE57BzZ0KyzIAIonyCNLczLzZHO3XIhn/9bAEB2xA=="
},
"Spectre.Console": {
"type": "Transitive",
"resolved": "0.49.1",
Expand Down Expand Up @@ -305,6 +310,7 @@
"Jab": "[0.10.2, )",
"LibGit2Sharp": "[0.31.0, )",
"Raiqub.Generators.EnumUtilities": "[1.9.21, )",
"Raiqub.T4Template": "[1.1.4, )",
"Spectre.Console": "[0.49.1, )",
"TestableIO.System.IO.Abstractions.Wrappers": "[21.2.1, )"
}
Expand Down

0 comments on commit 7b65c3c

Please sign in to comment.