Skip to content

Commit

Permalink
Merge pull request #18 from Kentico/fix/build-admin-js
Browse files Browse the repository at this point in the history
  • Loading branch information
seangwright authored Sep 22, 2023
2 parents 2d9e05a + 767c4cd commit c2dd3be
Show file tree
Hide file tree
Showing 11 changed files with 162 additions and 132 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</PropertyGroup>

<ItemGroup Label="StaticCodeAnalysis">
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.6.0.74858">
<PackageReference Include="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
22 changes: 22 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Kentico.Xperience.Admin" Version="26.4.0" />
<PackageVersion Include="Kentico.Xperience.WebApp" Version="26.4.0" />
<PackageVersion Include="kentico.xperience.azurestorage" Version="26.4.0" />
<PackageVersion Include="kentico.xperience.graphql" Version="26.4.0" />
<PackageVersion Include="kentico.xperience.imageprocessing" Version="26.4.0" />
<PackageVersion Include="Lucene.Net" Version="4.8.0-beta00016" />
<PackageVersion Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00016" />
<PackageVersion Include="Lucene.Net.Facet" Version="4.8.0-beta00016" />
<PackageVersion Include="Microsoft.AspNetCore.Html.Abstractions" Version="2.2.0" />
<PackageVersion Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="2.2.0" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.6.0.74858" />
</ItemGroup>
</Project>
10 changes: 5 additions & 5 deletions src/Kentico.Xperience.Lucene.Sample/DancingGoat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
<ProjectReference Include="..\Kentico.Xperience.Lucene\Kentico.Xperience.Lucene.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="kentico.xperience.admin" Version="26.4.0" Condition="'$(SeparatedAdmin)' == 'false'" />
<PackageReference Include="kentico.xperience.azurestorage" Version="26.4.0" />
<PackageReference Include="kentico.xperience.graphql" Version="26.4.0" />
<PackageReference Include="kentico.xperience.imageprocessing" Version="26.4.0" />
<PackageReference Include="kentico.xperience.webapp" Version="26.4.0" />
<PackageReference Include="kentico.xperience.admin" Condition="'$(SeparatedAdmin)' == 'false'" />
<PackageReference Include="kentico.xperience.azurestorage"/>
<PackageReference Include="kentico.xperience.graphql"/>
<PackageReference Include="kentico.xperience.imageprocessing"/>
<PackageReference Include="kentico.xperience.webapp"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@

namespace DancingGoat.Search;

public class CafeSearchController: Controller
public class CafeSearchController : Controller
{

public record SearchRequest(string Query = "", int PageSize = 20, int Page = 1);
public record RebuildSearchIndexRequest(string IndexName, string Secret);

// replace with real secret loaded from config
private const string REBUILD_SECRET = "1234567890aaabbbccc";
private readonly CafeSearchService searchService;
Expand All @@ -25,7 +24,7 @@ public CafeSearchController(CafeSearchService searchService, ILuceneClient lucen
}

[HttpGet]
public IActionResult Index(string query, int pageSize = 10, int page = 1, string? facet = null)
public IActionResult Index(string query, int pageSize = 10, int page = 1, string facet = null)
{
var results = searchService.Search(query, pageSize, page, facet);

Expand Down
143 changes: 75 additions & 68 deletions src/Kentico.Xperience.Lucene.Sample/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"dependencies": {
"net6.0": {
"Kentico.Xperience.Admin": {
Expand Down Expand Up @@ -427,32 +427,6 @@
"System.Configuration.ConfigurationManager": "6.0.1"
}
},
"Lucene.Net": {
"type": "Transitive",
"resolved": "4.8.0-beta00016",
"contentHash": "DCtUbE/NIrisNI7hRwU+UKS3Cr6S2vH1XB9wvEHHI3anu5OUpX1Fkr/PDC7oFCaol/QCvzVLbLZVizAT1aTLpA==",
"dependencies": {
"J2N": "2.0.0",
"Microsoft.Extensions.Configuration.Abstractions": "2.0.0"
}
},
"Lucene.Net.Analysis.Common": {
"type": "Transitive",
"resolved": "4.8.0-beta00016",
"contentHash": "7pjEAIliWdih6E3I0hCE8hKcKKRx1LLzeQBslF1fhvzE1Sal4NyHd8RFJHV1Z+yHlBw4gCyyVIDZADiIoyqwxg==",
"dependencies": {
"Lucene.Net": "4.8.0-beta00016"
}
},
"Lucene.Net.Facet": {
"type": "Transitive",
"resolved": "4.8.0-beta00016",
"contentHash": "O1MrRfhb9BMfRQHooyEFrkgNwYbTEbK/AkKhz26sy+xO+zAldJ8YKS/IsydHsE+frklIAWT0jyv0c3Dh9qBXSA==",
"dependencies": {
"Lucene.Net.Join": "4.8.0-beta00016",
"Lucene.Net.Queries": "4.8.0-beta00016"
}
},
"Lucene.Net.Grouping": {
"type": "Transitive",
"resolved": "4.8.0-beta00016",
Expand Down Expand Up @@ -586,14 +560,6 @@
"Microsoft.Extensions.Configuration.Abstractions": "2.2.0"
}
},
"Microsoft.AspNetCore.Html.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "Y4rs5aMEXY8G7wJo5S3EEt6ltqyOTr/qOeZzfn+hw/fuQj5GppGckMY5psGLETo1U9hcT5MmAhaT5xtusM1b5g==",
"dependencies": {
"System.Text.Encodings.Web": "4.5.0"
}
},
"Microsoft.AspNetCore.Http": {
"type": "Transitive",
"resolved": "2.2.0",
Expand All @@ -606,15 +572,6 @@
"Microsoft.Net.Http.Headers": "2.2.0"
}
},
"Microsoft.AspNetCore.Http.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "Nxs7Z1q3f1STfLYKJSVXCs1iBl+Ya6E8o4Oy1bCxJ/rNI44E/0f6tbsrVqAWfB7jlnJfyaAtIalBVxPKUPQb4Q==",
"dependencies": {
"Microsoft.AspNetCore.Http.Features": "2.2.0",
"System.Text.Encodings.Web": "4.5.0"
}
},
"Microsoft.AspNetCore.Http.Extensions": {
"type": "Transitive",
"resolved": "2.2.0",
Expand Down Expand Up @@ -693,21 +650,6 @@
"Microsoft.AspNetCore.Mvc.Core": "2.2.0"
}
},
"Microsoft.AspNetCore.Mvc.ViewFeatures": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "dt7MGkzCFVTAD5oesI8UeVVeiSgaZ0tPdFstQjG6YLJSCiq1koOUSHMpf0PASGdOW/H9hxXkolIBhT5dWqJi7g==",
"dependencies": {
"Microsoft.AspNetCore.Antiforgery": "2.2.0",
"Microsoft.AspNetCore.Diagnostics.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Html.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Mvc.Core": "2.2.0",
"Microsoft.AspNetCore.Mvc.DataAnnotations": "2.2.0",
"Microsoft.AspNetCore.Mvc.Formatters.Json": "2.2.0",
"Microsoft.Extensions.WebEncoders": "2.2.0",
"Newtonsoft.Json.Bson": "1.0.1"
}
},
"Microsoft.AspNetCore.ResponseCaching.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
Expand Down Expand Up @@ -1383,15 +1325,6 @@
"resolved": "4.7.0",
"contentHash": "0YFqjhp/mYkDGpU0Ye1GjE53HMp9UVfGN7seGpAMttAC0C40v5gw598jCgpbBLMmCo0E5YRLBv5Z2doypO49ZQ=="
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
}
},
"System.Console": {
"type": "Transitive",
"resolved": "4.3.0",
Expand Down Expand Up @@ -2233,6 +2166,80 @@
"Microsoft.AspNetCore.Mvc.ViewFeatures": "[2.2.0, )",
"System.Configuration.ConfigurationManager": "[6.0.1, )"
}
},
"Lucene.Net": {
"type": "CentralTransitive",
"requested": "[4.8.0-beta00016, )",
"resolved": "4.8.0-beta00016",
"contentHash": "DCtUbE/NIrisNI7hRwU+UKS3Cr6S2vH1XB9wvEHHI3anu5OUpX1Fkr/PDC7oFCaol/QCvzVLbLZVizAT1aTLpA==",
"dependencies": {
"J2N": "2.0.0",
"Microsoft.Extensions.Configuration.Abstractions": "2.0.0"
}
},
"Lucene.Net.Analysis.Common": {
"type": "CentralTransitive",
"requested": "[4.8.0-beta00016, )",
"resolved": "4.8.0-beta00016",
"contentHash": "7pjEAIliWdih6E3I0hCE8hKcKKRx1LLzeQBslF1fhvzE1Sal4NyHd8RFJHV1Z+yHlBw4gCyyVIDZADiIoyqwxg==",
"dependencies": {
"Lucene.Net": "4.8.0-beta00016"
}
},
"Lucene.Net.Facet": {
"type": "CentralTransitive",
"requested": "[4.8.0-beta00016, )",
"resolved": "4.8.0-beta00016",
"contentHash": "O1MrRfhb9BMfRQHooyEFrkgNwYbTEbK/AkKhz26sy+xO+zAldJ8YKS/IsydHsE+frklIAWT0jyv0c3Dh9qBXSA==",
"dependencies": {
"Lucene.Net.Join": "4.8.0-beta00016",
"Lucene.Net.Queries": "4.8.0-beta00016"
}
},
"Microsoft.AspNetCore.Html.Abstractions": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Y4rs5aMEXY8G7wJo5S3EEt6ltqyOTr/qOeZzfn+hw/fuQj5GppGckMY5psGLETo1U9hcT5MmAhaT5xtusM1b5g==",
"dependencies": {
"System.Text.Encodings.Web": "4.5.0"
}
},
"Microsoft.AspNetCore.Http.Abstractions": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Nxs7Z1q3f1STfLYKJSVXCs1iBl+Ya6E8o4Oy1bCxJ/rNI44E/0f6tbsrVqAWfB7jlnJfyaAtIalBVxPKUPQb4Q==",
"dependencies": {
"Microsoft.AspNetCore.Http.Features": "2.2.0",
"System.Text.Encodings.Web": "4.5.0"
}
},
"Microsoft.AspNetCore.Mvc.ViewFeatures": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "dt7MGkzCFVTAD5oesI8UeVVeiSgaZ0tPdFstQjG6YLJSCiq1koOUSHMpf0PASGdOW/H9hxXkolIBhT5dWqJi7g==",
"dependencies": {
"Microsoft.AspNetCore.Antiforgery": "2.2.0",
"Microsoft.AspNetCore.Diagnostics.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Html.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Mvc.Core": "2.2.0",
"Microsoft.AspNetCore.Mvc.DataAnnotations": "2.2.0",
"Microsoft.AspNetCore.Mvc.Formatters.Json": "2.2.0",
"Microsoft.Extensions.WebEncoders": "2.2.0",
"Newtonsoft.Json.Bson": "1.0.1"
}
},
"System.Configuration.ConfigurationManager": {
"type": "CentralTransitive",
"requested": "[6.0.1, )",
"resolved": "6.0.1",
"contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
}
}
}
}
Expand Down
29 changes: 16 additions & 13 deletions src/Kentico.Xperience.Lucene/Kentico.Xperience.Lucene.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
<ItemGroup>
<AssemblyAttribute Include="CMS.AssemblyDiscoverableAttribute">
</AssemblyAttribute>
<AdminClientPath Include="Admin\Client\dist\**">
<ProjectName>xperience-integrations-lucene</ProjectName>
</AdminClientPath>
</ItemGroup>

<ItemGroup>
Expand All @@ -34,19 +31,25 @@
</Target>
<Target Name="NpmBuildClient" BeforeTargets="BeforeBuild" Condition=" '$(Configuration)|$(Platform)' != 'Debug|AnyCPU' ">
<Exec Command="npm run build" WorkingDirectory="$(MSBuildProjectDirectory)\Admin\Client" />

<ItemGroup>
<AdminClientPath Include="Admin\Client\dist\**">
<ProjectName>xperience-integrations-lucene</ProjectName>
</AdminClientPath>
</ItemGroup>
</Target>

<ItemGroup>
<PackageReference Include="Kentico.Xperience.Admin" Version="26.4.0" />
<PackageReference Include="Kentico.Xperience.WebApp" Version="26.4.0" />
<PackageReference Include="Lucene.Net" Version="4.8.0-beta00016" />
<PackageReference Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00016" />
<PackageReference Include="Lucene.Net.Facet" Version="4.8.0-beta00016" />
<PackageReference Include="Microsoft.AspNetCore.Html.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="2.2.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PackageReference Include="Kentico.Xperience.Admin" />
<PackageReference Include="Kentico.Xperience.WebApp" />
<PackageReference Include="Lucene.Net" />
<PackageReference Include="Lucene.Net.Analysis.Common"/>
<PackageReference Include="Lucene.Net.Facet"/>
<PackageReference Include="Microsoft.AspNetCore.Html.Abstractions" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" />
<PackageReference Include="System.Configuration.ConfigurationManager" />
<PackageReference Include="Microsoft.SourceLink.GitHub">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
3 changes: 3 additions & 0 deletions src/Kentico.Xperience.Lucene/Resources/LuceneResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ namespace Kentico.Xperience.Lucene.Resources;

internal class LuceneResources
{
public LuceneResources()
{
}
}
Loading

0 comments on commit c2dd3be

Please sign in to comment.