Skip to content

Commit

Permalink
Update package json run code. Remove CG from ManagementSite backend
Browse files Browse the repository at this point in the history
Fixes: AFORM-4087
Story: AFORM-3507
  • Loading branch information
Linh Hoang committed May 13, 2024
1 parent 10dfa87 commit bd9bc62
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 19 deletions.
21 changes: 17 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"src/@episerver/forms-sdk",
"samples/sample-react-app",
"samples/managementsite",
"samples/musicfestival-frontend-react"
"samples/musicfestival-frontend-react",
"samples/musicfestival-backend-dotnet"
],
"author": "Optimizely",
"license": "ISC",
Expand Down Expand Up @@ -36,7 +37,7 @@
"build-musicfestival": "npm run build -w music-festival",
"start-musicfestival": "npm start -w music-festival",
"build-musicfestival-backend": "npm run build -w musicfestival-backend",
"start-musicfestival-backend": "npm start -w managementsite musicfestival-backend"
"start-musicfestival-backend": "npm start -w musicfestival-backend"

},
"dependencies": {
Expand Down
16 changes: 7 additions & 9 deletions samples/ManagementSite/Alloy.ManagementSite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,20 @@
</ItemGroup>
<ItemGroup Label="HeadlessForm">
<PackageReference Include="Optimizely.Cms.Preview1.Content.EPiServer" Version="$(ContentApiVersion)" />
<PackageReference Include="Optimizely.ContentGraph.Cms" Version="3.5.1" />
<PackageReference Include="Optimizely.Headless.Form.Service" Version="$(HeadlessFormVersion)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="EPiServer.ContentDefinitionsApi" Version="3.3.0" />
<PackageReference Include="EPiServer.ContentDeliveryApi.Cms" Version="3.9.1" />
<PackageReference Include="EPiServer.OpenIDConnect" Version="3.3.0" />
<PackageReference Include="EPiServer.CloudPlatform.Cms" Version="1.2.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.0" />
<PackageReference Include="Optimizely.Headless.Form.ContentGraph" Version="$(HeadlessFormVersion)" />
<PackageReference Include="Optimizely.Headless.Form.Service" Version="$(HeadlessFormVersion)" />
</ItemGroup>
<PropertyGroup>
<ApplicationIcon />
<StartupObject />
Expand Down
4 changes: 0 additions & 4 deletions samples/ManagementSite/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using EPiServer.Cms.UI.VisitorGroups;
using EPiServer.ContentApi.Core.DependencyInjection;
using EPiServer.Core;
using EPiServer.DependencyInjection;
using EPiServer.Shell.Telemetry;
using EPiServer.Web.Mvc.Html;
using EPiServer.Web.Routing;
Expand Down Expand Up @@ -152,9 +151,6 @@ public void ConfigureServices(IServiceCollection services)
o.FlattenPropertyModel = true;
o.IncludeNumericContentIdentifier = true;
});
services.AddContentGraph();

services.AddOptimizelyHeadlessFormContentGraph();
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
Expand Down
3 changes: 3 additions & 0 deletions samples/musicfestival-backend-dotnet/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
using OpenIddict.Server;
using Optimizely.Cms.DependencyInjection;
using Optimizely.Headless.Form;
using Optimizely.Headless.Form.DependencyInjection;

Expand Down Expand Up @@ -164,6 +165,8 @@ public void ConfigureServices(IServiceCollection services)
services.AddHostedService<ProvisionDatabase>();

services.AddOptimizelyHeadlessFormContentGraph();

services.AddOptimizelyCmsContentOnEPiServerPreview1();
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
Expand Down

0 comments on commit bd9bc62

Please sign in to comment.