Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Migrated .net core projects from legacy structure to habitat struct…
…ure.
  • Loading branch information
Kaz committed Mar 24, 2017
1 parent 731a26c commit ffa626e
Show file tree
Hide file tree
Showing 113 changed files with 1,223 additions and 7,785 deletions.
86 changes: 45 additions & 41 deletions Sitecore.Demo.Retail.sln
Expand Up @@ -50,27 +50,32 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitecore.Foundation.Depende
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{C01BE502-C648-4368-84FC-3F2B212541BC}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Sitecore.Foundation.Commerce.Engine", "src\Foundation\Commerce\Engine\code\Sitecore.Foundation.Commerce.Engine.xproj", "{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Commerce.Entitlements", "Commerce.Entitlements", "{717FA6E0-F01B-4491-9254-48620F5A44A7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugin", "Plugin", "{9633DAAE-84BB-48E3-9F39-BAC6E9133CC1}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Sitecore.Foundation.Commerce.Engine.Plugin.Habitat", "src\Foundation\Commerce\Engine\Plugin\Code\Sitecore.Foundation.Commerce.Engine.Plugin.Habitat.xproj", "{16A75548-B717-41D9-A55A-D1E68765E530}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Sitecore.Commerce.Plugin.AdventureWorks", "src\Foundation\Commerce\legacyCommerce\Sitecore.Commerce.Plugin.AdventureWorks\Sitecore.Commerce.Plugin.AdventureWorks.xproj", "{45E1A5F7-861D-4929-A4C4-E3FD9D898F23}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Plugin.Sample.Payments.Braintree", "src\Foundation\Commerce\legacyCommerce\Plugin.Sample.Payments.Braintree\Plugin.Sample.Payments.Braintree.xproj", "{0296F347-F76D-4A81-9FB1-AE9CA0F0C064}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Plugin.Sample.Habitat", "src\Foundation\Commerce\legacyCommerce\Plugin.Sample.Habitat\Plugin.Sample.Habitat.xproj", "{72203E4B-DA74-405C-9D33-193B38A0AA33}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Commerce.Payments", "Commerce.Payments", "{2247437C-D41C-4E67-A509-E2870B1BB3E2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitecore.Feature.Commerce.Orders", "src\Feature\Orders\code\Sitecore.Feature.Commerce.Orders.csproj", "{9CC4BF07-1259-43FF-B205-AFD1E59E5834}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Database", "Database", "{BA71DDCB-F72A-42A8-86EE-E81669BC5F1A}"
ProjectSection(SolutionItems) = preProject
src\Foundation\Commerce\Database\CommerceServicesDbScript.sql = src\Foundation\Commerce\Database\CommerceServicesDbScript.sql
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Databases", "Databases", "{8B1B7EE8-17D0-4D90-BABD-249C971EBDFB}"
ProjectSection(SolutionItems) = preProject
src\Project\Retail\Database\Catalog.xml = src\Project\Retail\Database\Catalog.xml
src\Project\Retail\Database\Inventory.xml = src\Project\Retail\Database\Inventory.xml
src\Project\Retail\Database\Profiles.xml = src\Project\Retail\Database\Profiles.xml
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Sitecore.Project.Commerce.Engine.Plugin.HabitatData", "src\Project\Retail\Engine.HabitatData\Sitecore.Project.Commerce.Engine.Plugin.HabitatData.xproj", "{B02C5772-DF1E-48E5-B5EC-084ECF8A0B42}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Sitecore.Foundation.Commerce.Engine", "src\Foundation\Commerce\Engine\Sitecore.Foundation.Commerce.Engine.xproj", "{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Sitecore.Foundation.Commerce.Engine.Plugin.Entitlements", "src\Foundation\Commerce.Entitlements\Engine.Entitlements\Sitecore.Foundation.Commerce.Engine.Plugin.Entitlements.xproj", "{47A05070-727E-444F-85A8-CF50620ACE04}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Sitecore.Foundation.Commerce.Engine.Plugin.Payments", "src\Foundation\Commerce.Payments\Engine.Payments\Sitecore.Foundation.Commerce.Engine.Plugin.Payments.xproj", "{7AC44B7F-641E-4284-A182-C962E5D56C3F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -115,37 +120,36 @@ Global
{366148B7-2392-4F42-80D6-786B7A3682AE}.Demo-Retail|Any CPU.Build.0 = Demo-Retail|Any CPU
{366148B7-2392-4F42-80D6-786B7A3682AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{366148B7-2392-4F42-80D6-786B7A3682AE}.Release|Any CPU.Build.0 = Release|Any CPU
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}.Demo-Retail|Any CPU.ActiveCfg = Demo-Retail|Any CPU
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}.Release|Any CPU.Build.0 = Release|Any CPU
{16A75548-B717-41D9-A55A-D1E68765E530}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16A75548-B717-41D9-A55A-D1E68765E530}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16A75548-B717-41D9-A55A-D1E68765E530}.Demo-Retail|Any CPU.ActiveCfg = Demo-Retail|Any CPU
{16A75548-B717-41D9-A55A-D1E68765E530}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16A75548-B717-41D9-A55A-D1E68765E530}.Release|Any CPU.Build.0 = Release|Any CPU
{45E1A5F7-861D-4929-A4C4-E3FD9D898F23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{45E1A5F7-861D-4929-A4C4-E3FD9D898F23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{45E1A5F7-861D-4929-A4C4-E3FD9D898F23}.Demo-Retail|Any CPU.ActiveCfg = Demo-Retail|Any CPU
{45E1A5F7-861D-4929-A4C4-E3FD9D898F23}.Release|Any CPU.ActiveCfg = Release|Any CPU
{45E1A5F7-861D-4929-A4C4-E3FD9D898F23}.Release|Any CPU.Build.0 = Release|Any CPU
{0296F347-F76D-4A81-9FB1-AE9CA0F0C064}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0296F347-F76D-4A81-9FB1-AE9CA0F0C064}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0296F347-F76D-4A81-9FB1-AE9CA0F0C064}.Demo-Retail|Any CPU.ActiveCfg = Demo-Retail|Any CPU
{0296F347-F76D-4A81-9FB1-AE9CA0F0C064}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0296F347-F76D-4A81-9FB1-AE9CA0F0C064}.Release|Any CPU.Build.0 = Release|Any CPU
{72203E4B-DA74-405C-9D33-193B38A0AA33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72203E4B-DA74-405C-9D33-193B38A0AA33}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72203E4B-DA74-405C-9D33-193B38A0AA33}.Demo-Retail|Any CPU.ActiveCfg = Demo-Retail|Any CPU
{72203E4B-DA74-405C-9D33-193B38A0AA33}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72203E4B-DA74-405C-9D33-193B38A0AA33}.Release|Any CPU.Build.0 = Release|Any CPU
{9CC4BF07-1259-43FF-B205-AFD1E59E5834}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9CC4BF07-1259-43FF-B205-AFD1E59E5834}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CC4BF07-1259-43FF-B205-AFD1E59E5834}.Demo-Retail|Any CPU.ActiveCfg = Demo-Retail|Any CPU
{9CC4BF07-1259-43FF-B205-AFD1E59E5834}.Demo-Retail|Any CPU.Build.0 = Demo-Retail|Any CPU
{9CC4BF07-1259-43FF-B205-AFD1E59E5834}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9CC4BF07-1259-43FF-B205-AFD1E59E5834}.Release|Any CPU.Build.0 = Release|Any CPU
{B02C5772-DF1E-48E5-B5EC-084ECF8A0B42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B02C5772-DF1E-48E5-B5EC-084ECF8A0B42}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B02C5772-DF1E-48E5-B5EC-084ECF8A0B42}.Demo-Retail|Any CPU.ActiveCfg = Debug|Any CPU
{B02C5772-DF1E-48E5-B5EC-084ECF8A0B42}.Demo-Retail|Any CPU.Build.0 = Debug|Any CPU
{B02C5772-DF1E-48E5-B5EC-084ECF8A0B42}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B02C5772-DF1E-48E5-B5EC-084ECF8A0B42}.Release|Any CPU.Build.0 = Release|Any CPU
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}.Demo-Retail|Any CPU.ActiveCfg = Demo-Retail|Any CPU
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}.Demo-Retail|Any CPU.Build.0 = Demo-Retail|Any CPU
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2}.Release|Any CPU.Build.0 = Release|Any CPU
{47A05070-727E-444F-85A8-CF50620ACE04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47A05070-727E-444F-85A8-CF50620ACE04}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47A05070-727E-444F-85A8-CF50620ACE04}.Demo-Retail|Any CPU.ActiveCfg = Debug|Any CPU
{47A05070-727E-444F-85A8-CF50620ACE04}.Demo-Retail|Any CPU.Build.0 = Debug|Any CPU
{47A05070-727E-444F-85A8-CF50620ACE04}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47A05070-727E-444F-85A8-CF50620ACE04}.Release|Any CPU.Build.0 = Release|Any CPU
{7AC44B7F-641E-4284-A182-C962E5D56C3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7AC44B7F-641E-4284-A182-C962E5D56C3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7AC44B7F-641E-4284-A182-C962E5D56C3F}.Demo-Retail|Any CPU.ActiveCfg = Debug|Any CPU
{7AC44B7F-641E-4284-A182-C962E5D56C3F}.Demo-Retail|Any CPU.Build.0 = Debug|Any CPU
{7AC44B7F-641E-4284-A182-C962E5D56C3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7AC44B7F-641E-4284-A182-C962E5D56C3F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -165,13 +169,13 @@ Global
{A17F2B02-CD42-43C7-BAF6-823A87E3CA5B} = {A65C1E2B-A56A-4E86-B928-23176FC86DB8}
{366148B7-2392-4F42-80D6-786B7A3682AE} = {A17F2B02-CD42-43C7-BAF6-823A87E3CA5B}
{C01BE502-C648-4368-84FC-3F2B212541BC} = {F12F210F-76B3-4142-8AB9-06677BCAED1E}
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2} = {C01BE502-C648-4368-84FC-3F2B212541BC}
{9633DAAE-84BB-48E3-9F39-BAC6E9133CC1} = {C01BE502-C648-4368-84FC-3F2B212541BC}
{16A75548-B717-41D9-A55A-D1E68765E530} = {9633DAAE-84BB-48E3-9F39-BAC6E9133CC1}
{45E1A5F7-861D-4929-A4C4-E3FD9D898F23} = {0639A703-FE73-43C9-8F19-5E62FA008BC3}
{0296F347-F76D-4A81-9FB1-AE9CA0F0C064} = {0639A703-FE73-43C9-8F19-5E62FA008BC3}
{72203E4B-DA74-405C-9D33-193B38A0AA33} = {0639A703-FE73-43C9-8F19-5E62FA008BC3}
{717FA6E0-F01B-4491-9254-48620F5A44A7} = {A65C1E2B-A56A-4E86-B928-23176FC86DB8}
{2247437C-D41C-4E67-A509-E2870B1BB3E2} = {A65C1E2B-A56A-4E86-B928-23176FC86DB8}
{9CC4BF07-1259-43FF-B205-AFD1E59E5834} = {A796DED4-AE86-4E8F-BBAF-B57960008D59}
{8B1B7EE8-17D0-4D90-BABD-249C971EBDFB} = {B3C10EC2-6B18-480D-8C75-CE4929838289}
{B02C5772-DF1E-48E5-B5EC-084ECF8A0B42} = {B3C10EC2-6B18-480D-8C75-CE4929838289}
{7F35C803-0290-4BFD-A806-F1EDDF1E24D2} = {C01BE502-C648-4368-84FC-3F2B212541BC}
{47A05070-727E-444F-85A8-CF50620ACE04} = {717FA6E0-F01B-4491-9254-48620F5A44A7}
{7AC44B7F-641E-4284-A182-C962E5D56C3F} = {2247437C-D41C-4E67-A509-E2870B1BB3E2}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion global.json
@@ -1,5 +1,5 @@
{
"projects": [ "src/Foundation/Commerce/legacyCommerce" ],
"projects": [ "src/Foundation/Commerce/legacyCommerce", "src/Project/Retail", "src/Foundation/Commerce.Payments", "src/Foundation/Commerce.Entitlements" ],
"sdk": {
"version": "1.0.0-preview2-003131"
}
Expand Down
37 changes: 36 additions & 1 deletion gulpfile.js
Expand Up @@ -152,6 +152,7 @@ var publishProjects = function (location, dest) {
};

gulp.task("Build-Solution", function () {
console.log("Building Solution");
var targets = ["Build"];
if (config.runCleanBuilds) {
targets = ["Clean", "Build"];
Expand All @@ -171,6 +172,7 @@ gulp.task("Build-Solution", function () {
});

gulp.task("Publish-Storefront-Projects", function () {
console.log("Publishing Storefront Projects");
return publishProjects("./src/Foundation/Commerce/storefront/{CommonSettings,CF/CSF}");
});

Expand Down Expand Up @@ -363,7 +365,7 @@ gulp.task("CE-01-Nuget-Restore", function (callback) {
});

gulp.task("CE-02-Publish-CommerceEngine-Projects", function (callback) {
var cmd = "dotnet publish ./src/Foundation/Commerce/Engine/code -o " + config.commerceEngineRoot
var cmd = "dotnet publish ./src/Foundation/Commerce/Engine -o " + config.commerceEngineRoot
var options = { maxBuffer: 1024 * 1024 };
console.log("cmd: " + cmd);
return exec(cmd, options, function (err, stdout, stderr) {
Expand Down Expand Up @@ -424,4 +426,37 @@ gulp.task("CE-Import-CSInventory", function (callback) {
console.log("stderr: " + stderr);
callback();
});
});

/*****************************
Kill Tasks
*****************************/
gulp.task("Kill-w3wp-Tasks", function (callback) {
var cmd = "@tskill w3wp /a /v"
var options = { maxBuffer: 1024 * 1024 };
console.log("cmd: " + cmd);
return exec(cmd, options, function (err, stdout, stderr) {
if ((err) && (!stderr.includes("Could not find process"))) {
console.error("exec error: " + err);
throw err;
}
console.log("stdout: " + stdout);
console.log("stderr: " + stderr);
callback();
});
});

gulp.task("Kill-iisexpress-Tasks", function (callback) {
var cmd = "@tskill iisexpress /a /v"
var options = { maxBuffer: 1024 * 1024 };
console.log("cmd: " + cmd);
return exec(cmd, options, function (err, stdout, stderr) {
if ((err) && (!stderr.includes("Could not find process"))) {
console.error("exec error: " + err);
throw err;
}
console.log("stdout: " + stdout);
console.log("stderr: " + stderr);
callback();
});
});
2 changes: 1 addition & 1 deletion install-commerce-config.json
Expand Up @@ -38,7 +38,7 @@
}
],
[ { "id": "commerceEngineProject",
"path": ".\\src\\Foundation\\Commerce\\Engine\\code",
"path": ".\\src\\Foundation\\Commerce\\Engine",
"files": []
}
],
Expand Down
@@ -0,0 +1,46 @@
using System.Reflection;

using Microsoft.Extensions.DependencyInjection;

using Sitecore.Framework.Configuration;
using Sitecore.Framework.Pipelines.Definitions.Extensions;
using Sitecore.Commerce.Core;
using Sitecore.Commerce.Plugin.Entitlements;
using Sitecore.Commerce.EntityViews;

using Sitecore.Foundation.Commerce.Engine.Plugin.Entitlements.Pipelines.Blocks.EntityViews;
using Sitecore.Foundation.Commerce.Engine.Plugin.Entitlements.Pipelines.Blocks;


namespace Sitecore.Foundation.Commerce.Engine.Plugin.Entitlements
{
public class ConfigureSitecore : IConfigureSitecore
{
public void ConfigureServices(IServiceCollection services)
{
var assembly = Assembly.GetExecutingAssembly();
services.RegisterAllPipelineBlocks(assembly);
services.RegisterAllCommands(assembly);

services.Sitecore().Pipelines(config => config
.ConfigurePipeline<IProvisionEntitlementsPipeline>(c =>
{
c.Add<ProvisionWarrantyEntitlementsBlock>().After<ProvisionEntitlementsBlock>()
.Add<ProvisionDigitalProductEntitlementsBlock>().After<ProvisionEntitlementsBlock>()
.Add<ProvisionInstallationEntitlementsBlock>().After<ProvisionEntitlementsBlock>();
})
.ConfigurePipeline<IGetEntityViewPipeline>(c =>
{
c.Add<GetOrderDigitalProductEntitlementDetailsViewBlock>().After<GetOrderEntitlementsViewBlock>()
.Add<GetCustomerDigitalProductEntitlementDetailsViewBlock>().After<GetCustomerEntitlementsViewBlock>()
.Add<GetOrderWarrantyEntitlementDetailsViewBlock>().After<GetOrderEntitlementsViewBlock>()
.Add<GetCustomerWarrantyEntitlementDetailsViewBlock>().After<GetCustomerEntitlementsViewBlock>()
.Add<GetOrderInstallationEntitlementDetailsViewBlock>().After<GetOrderEntitlementsViewBlock>()
.Add<GetCustomerInstallationEntitlementDetailsViewBlock>().After<GetCustomerEntitlementsViewBlock>();
})
);
}
}
}
@@ -0,0 +1,6 @@
using Sitecore.Commerce.Plugin.Entitlements;

namespace Sitecore.Foundation.Commerce.Engine.Plugin.Entitlements.Entities
{
public class DigitalProduct : Entitlement {}
}
@@ -0,0 +1,6 @@
using Sitecore.Commerce.Plugin.Entitlements;

namespace Sitecore.Foundation.Commerce.Engine.Plugin.Entitlements.Entities
{
public class Installation : Entitlement {}
}
@@ -0,0 +1,6 @@
using Sitecore.Commerce.Plugin.Entitlements;

namespace Sitecore.Foundation.Commerce.Engine.Plugin.Entitlements.Entities
{
public class Warranty : Entitlement {}
}
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sitecore.Foundation.Commerce.Engine.Plugin.Entitlements
{
public static class EntitlementsConstants
{
public static class Pipelines
{
public static class Blocks
{
public const string ProvisionWarrantyEntitlementsBlock = "Entitlements.block.ProvisionWarrantyEntitlements";
public const string ProvisionInstallationEntitlementsBlock = "Entitlements.block.ProvisionInstallationEntitlements";
public const string ProvisionDigitalProductEntitlementsBlock = "Entitlements.block.ProvisionDigitalProductEntitlements";
public const string GetOrderWarrantyEntitlementDetailsViewBlock = "Entitlements.block.GetOrderWarrantyEntitlementDetailsView";
public const string GetCustomerWarrantyEntitlementDetailsViewBlock = "Entitlements.block.GetCustomerWarrantyEntitlementDetailsView";
public const string GetOrderInstallationEntitlementDetailsViewBlock = "Entitlements.block.GetOrderInstallationEntitlementDetailsView";
public const string GetCustomerInstallationEntitlementDetailsViewBlock = "Entitlements.block.GetCustomerInstallationEntitlementDetailsView";
public const string GetOrderDigitalProductEntitlementDetailsViewBlock = "Entitlements.block.GetOrderDigitalProductEntitlementDetailsView";
public const string GetCustomerDigitalProductEntitlementDetailsViewBlock = "Entitlements.block.GetCustomerDigitalProductEntitlementDetailsView";
}
}
}
}

0 comments on commit ffa626e

Please sign in to comment.