<commit_before><Project Sdk="Microsoft.NET.Sdk.Web">
  <Import Project="../../build/Version.props" />

  <PropertyGroup>
    <TargetFramework>$(TgsNetVersion)</TargetFramework>
    <DebugType>Full</DebugType>
    <Version>$(TgsCoreVersion)</Version>
    <LangVersion>latest</LangVersion>
    <CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
    <IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
    <DocumentationFile>bin\$(Configuration)\net6.0\Tgstation.Server.Host.xml</DocumentationFile>
    <EnableNETAnalyzers>true</EnableNETAnalyzers>
    <NoWarn>API1000</NoWarn>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)'=='Release'">
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <WarningsAsErrors />
  </PropertyGroup>

  <PropertyGroup>
    <NodeModulesFolder>ClientApp/node_modules</NodeModulesFolder>
    <NpmInstallStampFile>ClientApp/node_modules/.install-stamp</NpmInstallStampFile>
    <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
    <DockerfileContext>..\..</DockerfileContext>
  </PropertyGroup>

  <Target Name="ClientInstall" BeforeTargets="ResolveAssemblyReferences" Inputs="../../build/ControlPanelVersion.props" Outputs="$(NpmInstallStampFile)">
    <Message Text="Pulling web control panel..." Importance="high" />
    <RemoveDir Directories="ClientApp" />
    <Exec Command="git clone https://github.com/tgstation/tgstation-server-webpanel --branch v$(TgsControlPanelVersion) --depth 1 ClientApp" />
    <Message Text="Restoring yarn packages..." Importance="high" />
    <Exec WorkingDirectory="ClientApp" Command="yarn install --immutable" />
    <Touch Files="$(NpmInstallStampFile)" AlwaysCreate="true" />
  </Target>

  <Target Name="NpmBuild" BeforeTargets="BeforeBuild" DependsOnTargets="ClientInstall" Inputs="../../build/ControlPanelVersion.props" Outputs="wwwroot\index.html">
    <Message Text="Building web control panel..." Importance="high" />
    <Exec WorkingDirectory="ClientApp" Command="yarn run msbuild" />
  </Target>

  <Target Name="NpmClean" AfterTargets="Clean">
    <Message Text="Cleaning web control panel..." Importance="high" />
    <RemoveDir Directories="wwwroot" />
  </Target>

  <Target Name="ApplyMasterVersionsAttribute" BeforeTargets="CoreCompile">
    <ItemGroup>
      <AssemblyAttributes Include="Tgstation.Server.Host.Properties.MasterVersionsAttribute">
        <_Parameter1>$(TgsConfigVersion)</_Parameter1>
        <_Parameter2>$(TgsInteropVersion)</_Parameter2>
        <_Parameter3>$(TgsControlPanelVersion)</_Parameter3>
        <_Parameter4>$(TgsHostWatchdogVersion)</_Parameter4>
      </AssemblyAttributes>
    </ItemGroup>

    <WriteCodeFragment AssemblyAttributes="@(AssemblyAttributes)" Language="C#" OutputDirectory="$(IntermediateOutputPath)" OutputFile="MasterVersionsAssemblyInfo.cs">
      <Output TaskParameter="OutputFile" ItemName="Compile" />
      <Output TaskParameter="OutputFile" ItemName="FileWrites" />
    </WriteCodeFragment>
  </Target>

  <ItemGroup>
    <PackageReference Include="BetterWin32Errors" Version="0.2.0" />
    <PackageReference Include="Byond.TopicSender" Version="5.0.0" />
    <PackageReference Include="Cyberboss.AspNetCore.AsyncInitializer" Version="1.2.0" />
    <PackageReference Include="Cyberboss.SmartIrc4net.Standard" Version="0.4.7" />
    <PackageReference Include="Elastic.CommonSchema.Serilog" Version="1.5.3" />
    <PackageReference Include="GitLabApiClient" Version="1.8.0" />
    <PackageReference Include="LibGit2Sharp" Version="0.27.0-preview-0034" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.9" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.9" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.9">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.9" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.9" />
    <!-- Required for https://github.com/coverlet-coverage/coverlet/issues/1381 -->
    <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
    <PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
    <PackageReference Include="NetEscapades.Configuration.Yaml" Version="2.2.0" />
    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.7" />
    <PackageReference Include="Octokit" Version="3.0.0" />
    <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.2" />
    <PackageReference Include="Remora.Discord" Version="2022.48.0" />
    <PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
    <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
    <PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
    <PackageReference Include="Serilog.Sinks.Elasticsearch" Version="8.4.1" />
    <PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
    <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
    <PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.4.0" />
    <PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
    <PackageReference Include="System.DirectoryServices.AccountManagement" Version="6.0.0" />
    <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.23.1" /><commit_msg>Fix SqlClient vulnerability<commit_after><Project Sdk="Microsoft.NET.Sdk.Web">
  <Import Project="../../build/Version.props" />

  <PropertyGroup>
    <TargetFramework>$(TgsNetVersion)</TargetFramework>
    <DebugType>Full</DebugType>
    <Version>$(TgsCoreVersion)</Version>
    <LangVersion>latest</LangVersion>
    <CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
    <IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
    <DocumentationFile>bin\$(Configuration)\net6.0\Tgstation.Server.Host.xml</DocumentationFile>
    <EnableNETAnalyzers>true</EnableNETAnalyzers>
    <NoWarn>API1000</NoWarn>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)'=='Release'">
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <WarningsAsErrors />
  </PropertyGroup>

  <PropertyGroup>
    <NodeModulesFolder>ClientApp/node_modules</NodeModulesFolder>
    <NpmInstallStampFile>ClientApp/node_modules/.install-stamp</NpmInstallStampFile>
    <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
    <DockerfileContext>..\..</DockerfileContext>
  </PropertyGroup>

  <Target Name="ClientInstall" BeforeTargets="ResolveAssemblyReferences" Inputs="../../build/ControlPanelVersion.props" Outputs="$(NpmInstallStampFile)">
    <Message Text="Pulling web control panel..." Importance="high" />
    <RemoveDir Directories="ClientApp" />
    <Exec Command="git clone https://github.com/tgstation/tgstation-server-webpanel --branch v$(TgsControlPanelVersion) --depth 1 ClientApp" />
    <Message Text="Restoring yarn packages..." Importance="high" />
    <Exec WorkingDirectory="ClientApp" Command="yarn install --immutable" />
    <Touch Files="$(NpmInstallStampFile)" AlwaysCreate="true" />
  </Target>

  <Target Name="NpmBuild" BeforeTargets="BeforeBuild" DependsOnTargets="ClientInstall" Inputs="../../build/ControlPanelVersion.props" Outputs="wwwroot\index.html">
    <Message Text="Building web control panel..." Importance="high" />
    <Exec WorkingDirectory="ClientApp" Command="yarn run msbuild" />
  </Target>

  <Target Name="NpmClean" AfterTargets="Clean">
    <Message Text="Cleaning web control panel..." Importance="high" />
    <RemoveDir Directories="wwwroot" />
  </Target>

  <Target Name="ApplyMasterVersionsAttribute" BeforeTargets="CoreCompile">
    <ItemGroup>
      <AssemblyAttributes Include="Tgstation.Server.Host.Properties.MasterVersionsAttribute">
        <_Parameter1>$(TgsConfigVersion)</_Parameter1>
        <_Parameter2>$(TgsInteropVersion)</_Parameter2>
        <_Parameter3>$(TgsControlPanelVersion)</_Parameter3>
        <_Parameter4>$(TgsHostWatchdogVersion)</_Parameter4>
      </AssemblyAttributes>
    </ItemGroup>

    <WriteCodeFragment AssemblyAttributes="@(AssemblyAttributes)" Language="C#" OutputDirectory="$(IntermediateOutputPath)" OutputFile="MasterVersionsAssemblyInfo.cs">
      <Output TaskParameter="OutputFile" ItemName="Compile" />
      <Output TaskParameter="OutputFile" ItemName="FileWrites" />
    </WriteCodeFragment>
  </Target>

  <ItemGroup>
    <PackageReference Include="BetterWin32Errors" Version="0.2.0" />
    <PackageReference Include="Byond.TopicSender" Version="5.0.0" />
    <PackageReference Include="Cyberboss.AspNetCore.AsyncInitializer" Version="1.2.0" />
    <PackageReference Include="Cyberboss.SmartIrc4net.Standard" Version="0.4.7" />
    <PackageReference Include="Elastic.CommonSchema.Serilog" Version="1.5.3" />
    <PackageReference Include="GitLabApiClient" Version="1.8.0" />
    <PackageReference Include="LibGit2Sharp" Version="0.27.0-preview-0034" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.9" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.9" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.9">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.9" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.9" />
    <!-- Required for https://github.com/coverlet-coverage/coverlet/issues/1381 -->
    <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
    <PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
    <PackageReference Include="NetEscapades.Configuration.Yaml" Version="2.2.0" />
    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.7" />
    <PackageReference Include="Octokit" Version="3.0.0" />
    <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.2" />
    <PackageReference Include="Remora.Discord" Version="2022.48.0" />
    <PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
    <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
    <PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
    <PackageReference Include="Serilog.Sinks.Elasticsearch" Version="8.4.1" />
    <PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
    <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
    <PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.4.0" />
    <PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
    <PackageReference Include="System.DirectoryServices.AccountManagement" Version="6.0.0" />
    <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.23.1" />
{'fraction_non_alphanumeric': 0.15067567567567566, 'fraction_numerical': 0.021621621621621623, 'mean_word_length': 5.308470964304742, 'pattern_counts': {'":': 0, '<': 231, '<?xml version=': 0, '>': 231, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '823227', 'n_tokens_mistral': 3677, 'n_tokens_neox': 3504, 'n_words': 462}