diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100755 index 00000000..77f1912f --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,19 @@ +init: +- git config --global core.autocrlf true +install: +- ps: Install-Product node 6.9.2 x64 +branches: + only: + - master + - /^release\/.*$/ + - /^(.*\/)?ci-.*$/ +build_script: +- ps: .\run.ps1 default-build +clone_depth: 1 +environment: + global: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 +test: 'off' +deploy: 'off' +os: Visual Studio 2017 diff --git a/.gitignore b/.gitignore index 6453872e..79812ddb 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ PublishProfiles/ *.docstates _ReSharper.* nuget.exe -project.lock.json *net45.csproj *net451.csproj *k10.csproj @@ -25,17 +24,8 @@ project.lock.json *.ncrunchsolution *.*sdf *.ipch - .vs/ npm-debug.log /.build/ - -# The templates can't contain their own .gitignore files, because Yeoman has strange default handling for -# files with that name (https://github.com/npm/npm/issues/1862). So, each template instead has a template_gitignore -# file which gets renamed after the files are copied. And so any files that need to be excluded in the source -# repo have to be excluded here. -/templates/*/node_modules/ -/templates/*/wwwroot/dist/ -/templates/*/ClientApp/dist/ -/templates/*/yarn.lock .vscode/ +global.json diff --git a/.travis.yml b/.travis.yml index d2d8dfdd..d974c566 100755 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,15 @@ addons: - libssl-dev - libunwind8 - zlib1g -mono: - - 4.0.5 +mono: none os: - - linux - - osx +- linux +- osx osx_image: xcode7.1 script: - - ./build.sh verify +- ./build.sh +branches: + only: + - master + - /^release\/.*$/ + - /^(.*\/)?ci-.*$/ diff --git a/.vsts-pipelines/builds/ci-internal.yml b/.vsts-pipelines/builds/ci-internal.yml new file mode 100644 index 00000000..c2c5336f --- /dev/null +++ b/.vsts-pipelines/builds/ci-internal.yml @@ -0,0 +1,13 @@ +trigger: +- master +- release/* + +resources: + repositories: + - repository: buildtools + type: git + name: aspnet-BuildTools + ref: refs/heads/master + +phases: +- template: .vsts-pipelines/templates/project-ci.yml@buildtools diff --git a/.vsts-pipelines/builds/ci-public.yml b/.vsts-pipelines/builds/ci-public.yml new file mode 100644 index 00000000..507c89b0 --- /dev/null +++ b/.vsts-pipelines/builds/ci-public.yml @@ -0,0 +1,15 @@ +trigger: +- master +- release/* + +# See https://github.com/aspnet/BuildTools +resources: + repositories: + - repository: buildtools + type: github + endpoint: DotNet-Bot GitHub Connection + name: aspnet/BuildTools + ref: refs/heads/master + +phases: +- template: .vsts-pipelines/templates/project-ci.yml@buildtools diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 64ff041d..eac4268e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ Contributing ====== -Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md) in the Home repo. +Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/master/CONTRIBUTING.md) in the Home repo. diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 00000000..cec8e3da --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,15 @@ + + + + + + + Microsoft ASP.NET Core + https://github.com/aspnet/javascriptservices + git + $(MSBuildThisFileDirectory) + $(MSBuildThisFileDirectory)build\Key.snk + true + true + + diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 00000000..7e3f8df9 --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,6 @@ + + + $(MicrosoftNETCoreAppPackageVersion) + $(NETStandardLibrary20PackageVersion) + + diff --git a/JavaScriptServices.sln b/JavaScriptServices.sln index 55338882..f01aa1a9 100644 --- a/JavaScriptServices.sln +++ b/JavaScriptServices.sln @@ -1,50 +1,43 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{E6E88944-4800-40BA-8AF5-069EA3ADFEB8}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.NodeServices", "src\Microsoft.AspNetCore.NodeServices\Microsoft.AspNetCore.NodeServices.xproj", "{B0FA4175-8B29-4904-9780-28B3C24B0567}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "NodeServicesExamples", "samples\misc\NodeServicesExamples\NodeServicesExamples.xproj", "{6D4BCDD6-7951-449B-BE55-CB7F014B7430}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{78DAC76C-1092-45AB-BF0D-594B8C7B6569}" +# Visual Studio 15 +VisualStudioVersion = 15.0.26730.16 +MinimumVisualStudioVersion = 15.0.26730.03 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{27304DDE-AFB2-4F8B-B765-E3E2F11E886C}" ProjectSection(SolutionItems) = preProject - global.json = global.json + src\Directory.Build.props = src\Directory.Build.props EndProjectSection EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MusicStore", "samples\angular\MusicStore\MusicStore.xproj", "{1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReactGrid", "samples\react\ReactGrid\ReactGrid.xproj", "{ABF90A5B-F4E0-438C-A6E4-9549FB43690B}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.AngularServices", "src\Microsoft.AspNetCore.AngularServices\Microsoft.AspNetCore.AngularServices.xproj", "{421807E6-B62C-417B-B901-46C5DEDAA8F1}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.ReactServices", "src\Microsoft.AspNetCore.ReactServices\Microsoft.AspNetCore.ReactServices.xproj", "{B04381DE-991F-4831-A0B5-FE1BD3EF80C4}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.SpaServices", "src\Microsoft.AspNetCore.SpaServices\Microsoft.AspNetCore.SpaServices.xproj", "{4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.NodeServices", "src\Microsoft.AspNetCore.NodeServices\Microsoft.AspNetCore.NodeServices.csproj", "{66B77203-1469-41DF-92F2-2BE6900BD36F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{727E6D58-6830-4792-96C6-E138A33959FB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.NodeServices.Sockets", "src\Microsoft.AspNetCore.NodeServices.Sockets\Microsoft.AspNetCore.NodeServices.Sockets.csproj", "{F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Angular2Spa", "templates\Angular2Spa\Angular2Spa.xproj", "{8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaServices", "src\Microsoft.AspNetCore.SpaServices\Microsoft.AspNetCore.SpaServices.csproj", "{66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReactReduxSpa", "templates\ReactReduxSpa\ReactReduxSpa.xproj", "{DBFC6DB0-A6D1-4694-A108-1C604B988DA3}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReactSpa", "templates\ReactSpa\ReactSpa.xproj", "{E9D1A695-F0E6-46F2-B5E3-72F4AF805387}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{99EAF1FE-22C8-4526-BE78-74B24125D37F}" + ProjectSection(SolutionItems) = preProject + .gitignore = .gitignore + global.json = global.json + README.md = README.md + EndProjectSection EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "WebApplicationBasic", "templates\WebApplicationBasic\WebApplicationBasic.xproj", "{CB4398D6-B7F1-449A-AE02-828769679232}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{23836492-E7F4-4376-85BF-A635C304AC46}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{E0771531-BE20-40CD-A1B0-A57E09511060}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{E6A161EA-646C-4033-9090-95BE809AB8D9}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Webpack", "samples\misc\Webpack\Webpack.xproj", "{A8905301-8492-42FD-9E83-F715A0FDC3A2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LatencyTest", "samples\misc\LatencyTest\LatencyTest.csproj", "{1931B19A-EC42-4D56-B2D0-FB06D17244DA}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LatencyTest", "samples\misc\LatencyTest\LatencyTest.xproj", "{A64AF9D9-72AA-4433-BE1D-DC2524B6808A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Webpack", "samples\misc\Webpack\Webpack.csproj", "{DE479DC3-1461-4EAD-A188-4AF7AA4AE344}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "React", "React", "{E0EBA813-4478-4C02-B11D-FB3793113FE4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NodeServicesExamples", "samples\misc\NodeServicesExamples\NodeServicesExamples.csproj", "{93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MusicStore", "samples\react\MusicStore\MusicStore.xproj", "{C870A92C-9E3F-4BF2-82B8-5758545A8B7C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{645F7363-1240-4FB6-9422-B32A327C979F}" + ProjectSection(SolutionItems) = preProject + Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets + EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Angular", "Angular", "{4867A616-83D6-48DC-964D-6AE743596631}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaServices.Extensions", "src\Microsoft.AspNetCore.SpaServices.Extensions\Microsoft.AspNetCore.SpaServices.Extensions.csproj", "{D40BD1C4-6A6F-4213-8535-1057F3EB3400}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -52,79 +45,49 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B0FA4175-8B29-4904-9780-28B3C24B0567}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B0FA4175-8B29-4904-9780-28B3C24B0567}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B0FA4175-8B29-4904-9780-28B3C24B0567}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B0FA4175-8B29-4904-9780-28B3C24B0567}.Release|Any CPU.Build.0 = Release|Any CPU - {6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Release|Any CPU.Build.0 = Release|Any CPU - {1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Release|Any CPU.Build.0 = Release|Any CPU - {ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Release|Any CPU.Build.0 = Release|Any CPU - {421807E6-B62C-417B-B901-46C5DEDAA8F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {421807E6-B62C-417B-B901-46C5DEDAA8F1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {421807E6-B62C-417B-B901-46C5DEDAA8F1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {421807E6-B62C-417B-B901-46C5DEDAA8F1}.Release|Any CPU.Build.0 = Release|Any CPU - {B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Release|Any CPU.Build.0 = Release|Any CPU - {4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Release|Any CPU.Build.0 = Release|Any CPU - {8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Release|Any CPU.Build.0 = Release|Any CPU - {DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Release|Any CPU.Build.0 = Release|Any CPU - {E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Release|Any CPU.Build.0 = Release|Any CPU - {CB4398D6-B7F1-449A-AE02-828769679232}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CB4398D6-B7F1-449A-AE02-828769679232}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB4398D6-B7F1-449A-AE02-828769679232}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CB4398D6-B7F1-449A-AE02-828769679232}.Release|Any CPU.Build.0 = Release|Any CPU - {A8905301-8492-42FD-9E83-F715A0FDC3A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A8905301-8492-42FD-9E83-F715A0FDC3A2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A8905301-8492-42FD-9E83-F715A0FDC3A2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A8905301-8492-42FD-9E83-F715A0FDC3A2}.Release|Any CPU.Build.0 = Release|Any CPU - {A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Release|Any CPU.Build.0 = Release|Any CPU - {C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Release|Any CPU.Build.0 = Release|Any CPU + {66B77203-1469-41DF-92F2-2BE6900BD36F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66B77203-1469-41DF-92F2-2BE6900BD36F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66B77203-1469-41DF-92F2-2BE6900BD36F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66B77203-1469-41DF-92F2-2BE6900BD36F}.Release|Any CPU.Build.0 = Release|Any CPU + {F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Release|Any CPU.Build.0 = Release|Any CPU + {66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Release|Any CPU.Build.0 = Release|Any CPU + {1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Release|Any CPU.Build.0 = Release|Any CPU + {DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Release|Any CPU.Build.0 = Release|Any CPU + {93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Release|Any CPU.Build.0 = Release|Any CPU + {D40BD1C4-6A6F-4213-8535-1057F3EB3400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D40BD1C4-6A6F-4213-8535-1057F3EB3400}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D40BD1C4-6A6F-4213-8535-1057F3EB3400}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D40BD1C4-6A6F-4213-8535-1057F3EB3400}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {6D4BCDD6-7951-449B-BE55-CB7F014B7430} = {E0771531-BE20-40CD-A1B0-A57E09511060} - {1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B} = {4867A616-83D6-48DC-964D-6AE743596631} - {ABF90A5B-F4E0-438C-A6E4-9549FB43690B} = {E0EBA813-4478-4C02-B11D-FB3793113FE4} - {8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11} = {727E6D58-6830-4792-96C6-E138A33959FB} - {DBFC6DB0-A6D1-4694-A108-1C604B988DA3} = {727E6D58-6830-4792-96C6-E138A33959FB} - {E9D1A695-F0E6-46F2-B5E3-72F4AF805387} = {727E6D58-6830-4792-96C6-E138A33959FB} - {CB4398D6-B7F1-449A-AE02-828769679232} = {727E6D58-6830-4792-96C6-E138A33959FB} - {E0771531-BE20-40CD-A1B0-A57E09511060} = {E6E88944-4800-40BA-8AF5-069EA3ADFEB8} - {A8905301-8492-42FD-9E83-F715A0FDC3A2} = {E0771531-BE20-40CD-A1B0-A57E09511060} - {A64AF9D9-72AA-4433-BE1D-DC2524B6808A} = {E0771531-BE20-40CD-A1B0-A57E09511060} - {E0EBA813-4478-4C02-B11D-FB3793113FE4} = {E6E88944-4800-40BA-8AF5-069EA3ADFEB8} - {C870A92C-9E3F-4BF2-82B8-5758545A8B7C} = {E0EBA813-4478-4C02-B11D-FB3793113FE4} - {4867A616-83D6-48DC-964D-6AE743596631} = {E6E88944-4800-40BA-8AF5-069EA3ADFEB8} + {66B77203-1469-41DF-92F2-2BE6900BD36F} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C} + {F46DEF99-6FAA-4406-B5D8-6FF34EF669E3} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C} + {66B071A8-EFC8-4A06-BEF6-06B99AE27EEC} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C} + {E6A161EA-646C-4033-9090-95BE809AB8D9} = {23836492-E7F4-4376-85BF-A635C304AC46} + {1931B19A-EC42-4D56-B2D0-FB06D17244DA} = {E6A161EA-646C-4033-9090-95BE809AB8D9} + {DE479DC3-1461-4EAD-A188-4AF7AA4AE344} = {E6A161EA-646C-4033-9090-95BE809AB8D9} + {93EFCC5F-C6EE-4623-894F-A42B22C0B6FE} = {E6A161EA-646C-4033-9090-95BE809AB8D9} + {D40BD1C4-6A6F-4213-8535-1057F3EB3400} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DDF59B0D-2DEC-45D6-8667-DCB767487101} EndGlobalSection EndGlobal diff --git a/LICENSE.txt b/LICENSE.txt index 0bdc1962..b3b180cd 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,12 +1,201 @@ -Copyright (c) .NET Foundation. All rights reserved. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -these files except in compliance with the License. You may obtain a copy of the -License at + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -http://www.apache.org/licenses/LICENSE-2.0 + 1. Definitions. -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) .NET Foundation and Contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 00000000..e32bddfd --- /dev/null +++ b/NuGet.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/NuGet.master.config b/NuGet.master.config deleted file mode 100755 index 1ff3c9aa..00000000 --- a/NuGet.master.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/NuGetPackageVerifier.json b/NuGetPackageVerifier.json new file mode 100644 index 00000000..22ef3c09 --- /dev/null +++ b/NuGetPackageVerifier.json @@ -0,0 +1,7 @@ +{ + "Default": { + "rules": [ + "DefaultCompositeRule" + ] + } +} diff --git a/README.md b/README.md index 752a18ac..dfa67285 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,61 @@ -# JavaScriptServices +# JavaScriptServices [Archived] + +## IMPORTANT + +The features described in this article are obsolete as of ASP.NET Core 3.0. A simpler SPA frameworks integration mechanism is available in the [Microsoft.AspNetCore.SpaServices.Extensions](https://www.nuget.org/packages/Microsoft.AspNetCore.SpaServices.Extensions) NuGet package. For more information, see [[Announcement] Obsoleting Microsoft.AspNetCore.SpaServices and Microsoft.AspNetCore.NodeServices](https://github.com/dotnet/AspNetCore/issues/12890). -This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo. ## What is this? -`JavaScriptServices` is a set of technologies for ASP.NET Core developers. It provides infrastructure that you'll find useful if you use Angular 2 / React / Knockout / etc. on the client, or if you build your client-side resources using Webpack, or otherwise want to execute JavaScript on the server at runtime. +`JavaScriptServices` is a set of client-side technologies for ASP.NET Core. It provides infrastructure that you'll find useful if you: + +- Use Angular / React / Vue / Aurelia / Knockout / etc. +- Build your client-side resources using Webpack. +- Execute JavaScript on the server at runtime. + +Read [Building Single Page Applications on ASP.NET Core with JavaScriptServices](https://blogs.msdn.microsoft.com/webdev/2017/02/14/building-single-page-applications-on-asp-net-core-with-javascriptservices/) for more details. This repo contains: * A set of NuGet/NPM packages that implement functionality for: - * Invoking arbitrary NPM packages at runtime from .NET code ([docs](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.NodeServices#simple-usage-example)) - * Server-side prerendering of SPA components ([docs](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#server-side-prerendering)) - * Webpack dev middleware ([docs](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#webpack-dev-middleware)) - * Hot module replacement (HMR) ([docs](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#webpack-hot-module-replacement)) - * Server-side and client-side routing integration ([docs](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#routing-helper-mapspafallbackroute)) + * Invoking arbitrary NPM packages at runtime from .NET code ([docs](/src/Microsoft.AspNetCore.NodeServices#simple-usage-example)) + * Server-side prerendering of SPA components ([docs](/src/Microsoft.AspNetCore.SpaServices#server-side-prerendering)) + * Webpack dev middleware ([docs](/src/Microsoft.AspNetCore.SpaServices#webpack-dev-middleware)) + * Hot module replacement (HMR) ([docs](/src/Microsoft.AspNetCore.SpaServices#webpack-hot-module-replacement)) + * Server-side and client-side routing integration ([docs](/src/Microsoft.AspNetCore.SpaServices#routing-helper-mapspafallbackroute)) * Server-side and client-side validation integration - * "Cache priming" for Angular 2 apps * "Lazy loading" for Knockout apps - * A Yeoman generator that creates preconfigured app starting points ([guide](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/)) * Samples and docs -Everything here is cross-platform, and works with .NET Core 1.0.1 or later on Windows, Linux, or OS X. +It's cross-platform (Windows, Linux, or macOS) and works with .NET Core 2.0 or later. ## Creating new applications -If you want to build a brand-new ASP.NET Core app that uses Angular 2 / React / Knockout on the client, consider starting with the `aspnetcore-spa` generator. This lets you choose your client-side framework, and generates a starting point that includes applicable features such as Webpack dev middleware, server-side prerendering, and efficient production builds. It's much easier than configuring everything to work together manually! +Prerequisites: + +* [.NET Core 2.0](https://www.microsoft.com/net/core) (or later) SDK +* [Node.js](https://nodejs.org/) version 6 (or later) + +With these prerequisites, you can immediately create new ASP.NET Core applications that use Angular, React, or React+Redux without having to install anything extra. -To do this, first install Yeoman and these generator templates: +### Option 1: Creating Angular/React/Redux applications from the command line (cross-platform) - npm install -g yo generator-aspnetcore-spa +In an empty directory, run (for example) `dotnet new angular`. Other supported SPA frameworks include React and React+Redux. You can see the list of available SPA templates by running `dotnet new spa`. -Then you can generate your new application starting point: +Once the generator has run and restored all the dependencies, you can start up your new ASP.NET Core SPA: - cd some-empty-directory - yo aspnetcore-spa + npm install + dotnet run -Finally, once the generator has run and restored all the dependencies, you can start up your new ASP.NET Core Single Page Application: +### Option 2: Creating Angular/React/Redux applications using Visual Studio 2017 Update 3 or later (Windows only) - dotnet run +Using the `File`->`New Project` dialog, select *ASP.NET Core Web Application*. You will then be offered the option to create an application with Angular, React, or React+Redux. When the application is created, you can build and run it in the normal way. -For a more detailed walkthrough, see [getting started with the `aspnetcore-spa` generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/). +### More info and other SPA frameworks + +For a more detailed (albeit somewhat outdated) walkthrough, see [getting started with the `aspnetcore-spa` generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/). + +If you want to build an ASP.NET Core application with Aurelia, Knockout, or Vue, you can use the `Microsoft.AspNetCore.SpaTemplates` package. On the command line, run `dotnet new --install Microsoft.AspNetCore.SpaTemplates`. Then you will be able to run `dotnet new aurelia` (or `dotnet new vue`, etc.) to create your new application. ## Adding to existing applications @@ -48,42 +64,28 @@ If you have an existing ASP.NET Core application, or if you just want to use the * `Microsoft.AspNetCore.NodeServices` * This provides a fast and robust way for .NET code to run JavaScript on the server inside a Node.js environment. You can use this to consume arbitrary functionality from NPM packages at runtime in your ASP.NET Core app. * Most applications developers don't need to use this directly, but you can do so if you want to implement your own functionality that involves calling Node.js code from .NET at runtime. - * Find [documentation and usage examples here](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.NodeServices#microsoftaspnetcorenodeservices). + * Find [documentation and usage examples here](/src/Microsoft.AspNetCore.NodeServices#microsoftaspnetcorenodeservices). * `Microsoft.AspNetCore.SpaServices` - * This provides infrastructure that's generally useful when building Single Page Applications (SPAs) with technologies such as Angular 2 or React (for example, server-side prerendering and webpack middleware). Internally, it uses the `NodeServices` package to implement its features. - * Find [documentation and usage examples here](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#microsoftaspnetcorespaservices). - * `Microsoft.AspNetCore.AngularServices` - * This builds on the `SpaServices` package and includes features specific to Angular 2. Currently, this includes validation helpers and a "cache priming" feature, which let you pre-evaluate ajax requests on the server so that client-side code doesn't need to make network calls once it's loaded. - * The code is [here](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.AngularServices), and you'll find a usage example for [the validation helper here](https://github.com/aspnet/JavaScriptServices/blob/dev/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts), and for the [cache priming here](https://github.com/aspnet/JavaScriptServices/blob/dev/samples/angular/MusicStore/Views/Home/Index.cshtml#L7-8). Full docs are to be written. + * This provides infrastructure that's generally useful when building Single Page Applications (SPAs) with technologies such as Angular or React (for example, server-side prerendering and webpack middleware). Internally, it uses the `NodeServices` package to implement its features. + * Find [documentation and usage examples here](/src/Microsoft.AspNetCore.SpaServices#microsoftaspnetcorespaservices) -There was previously a `Microsoft.AspNetCore.ReactServices` but this is not currently needed - all applicable functionality is in `Microsoft.AspNetCore.SpaServices`, because it's sufficiently general. We might add a new `Microsoft.AspNetCore.ReactServices` package in the future if new React-specific requirements emerge. +There were previously other packages called `Microsoft.AspNetCore.AngularServices` and `Microsoft.AspNetCore.ReactServices` but these are not currently needed - all applicable functionality is in `Microsoft.AspNetCore.SpaServices`, because it's sufficiently general. If you want to build a helper library for some other SPA framework, you can do so by taking a dependency on `Microsoft.AspNetCore.SpaServices` and wrapping its functionality in whatever way is most useful for your SPA framework. -## Samples and templates +## Samples -Inside this repo, [the `templates` directory](https://github.com/aspnet/JavaScriptServices/tree/dev/templates) contains the application starting points that the `aspnetcore-spa` generator emits. If you want, you can clone this repo and run those applications directly. But it's easier to [use the Yeoman tool to run the generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/). +The [`samples` directory](/samples) contains examples of: -Also in this repo, [the `samples` directory](https://github.com/aspnet/JavaScriptServices/tree/dev/samples) contains examples of using the JavaScript services family of packages with Angular 2 and React, plus examples of standalone `NodeServices` usage for runtime code transpilation and image processing. +- Using the JavaScript services family of packages with Angular and React. +- A standalone `NodeServices` usage for runtime code transpilation and image processing. **To run the samples:** * Clone this repo * At the repo's root directory (the one containing `src`, `samples`, etc.), run `dotnet restore` - * Change directory to the sample you want to run (e.g., `cd samples/angular/MusicStore`) + * Change directory to the sample you want to run (for example, `cd samples/angular/MusicStore`) * Restore Node dependencies by running `npm install` - * If you're trying to run the Angular 2 "Music Store" sample, then also run `gulp` (which you need to have installed globally). None of the other samples require this. + * If you're trying to run the Angular "Music Store" sample, then also run `gulp` (which you need to have installed globally). None of the other samples require this. * Run the application (`dotnet run`) * Browse to [http://localhost:5000](http://localhost:5000) - -## Contributing - -If you're interested in contributing to the various packages, samples, and project templates in this repo, that's great! You can run the code in this repo just by: - - * Cloning the repo - * Running `dotnet restore` at the repo root dir - * Going to whatever sample or template you want to run (e.g., `cd templates/Angular2Spa`) - * Restoring NPM dependencies (run `npm install`) - * Launching it (`dotnet run`) - -If you're planning to submit a pull request, and if it's more than a trivial fix (e.g., for a typo), it's usually a good idea first to file an issue describing what you're proposing to do and how it will work. Then you can find out if it's likely that such a pull request will be accepted, and how it fits into wider ongoing plans. diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100755 index eb246166..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,7 +0,0 @@ -init: - - git config --global core.autocrlf true -build_script: - - build.cmd verify -clone_depth: 1 -test: off -deploy: off diff --git a/build.cmd b/build.cmd index 7d4894cb..c0050bda 100755 --- a/build.cmd +++ b/build.cmd @@ -1,2 +1,2 @@ @ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE" \ No newline at end of file +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' default-build %*; exit $LASTEXITCODE" diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index 8f2f9969..00000000 --- a/build.ps1 +++ /dev/null @@ -1,67 +0,0 @@ -$ErrorActionPreference = "Stop" - -function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries) -{ - while($true) - { - try - { - Invoke-WebRequest $url -OutFile $downloadLocation - break - } - catch - { - $exceptionMessage = $_.Exception.Message - Write-Host "Failed to download '$url': $exceptionMessage" - if ($retries -gt 0) { - $retries-- - Write-Host "Waiting 10 seconds before retrying. Retries left: $retries" - Start-Sleep -Seconds 10 - - } - else - { - $exception = $_.Exception - throw $exception - } - } - } -} - -cd $PSScriptRoot - -$repoFolder = $PSScriptRoot -$env:REPO_FOLDER = $repoFolder - -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" -if ($env:KOREBUILD_ZIP) -{ - $koreBuildZip=$env:KOREBUILD_ZIP -} - -$buildFolder = ".build" -$buildFile="$buildFolder\KoreBuild.ps1" - -if (!(Test-Path $buildFolder)) { - Write-Host "Downloading KoreBuild from $koreBuildZip" - - $tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid() - New-Item -Path "$tempFolder" -Type directory | Out-Null - - $localZipFile="$tempFolder\korebuild.zip" - - DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6 - - Add-Type -AssemblyName System.IO.Compression.FileSystem - [System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder) - - New-Item -Path "$buildFolder" -Type directory | Out-Null - copy-item "$tempFolder\**\build\*" $buildFolder -Recurse - - # Cleanup - if (Test-Path $tempFolder) { - Remove-Item -Recurse -Force $tempFolder - } -} - -&"$buildFile" $args \ No newline at end of file diff --git a/build.sh b/build.sh index f4208100..98a4b227 100755 --- a/build.sh +++ b/build.sh @@ -1,46 +1,8 @@ #!/usr/bin/env bash -repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" -if [ ! -z $KOREBUILD_ZIP ]; then - koreBuildZip=$KOREBUILD_ZIP -fi +set -euo pipefail +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -buildFolder=".build" -buildFile="$buildFolder/KoreBuild.sh" - -if test ! -d $buildFolder; then - echo "Downloading KoreBuild from $koreBuildZip" - - tempFolder="/tmp/KoreBuild-$(uuidgen)" - mkdir $tempFolder - - localZipFile="$tempFolder/korebuild.zip" - - retries=6 - until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null) - do - echo "Failed to download '$koreBuildZip'" - if [ "$retries" -le 0 ]; then - exit 1 - fi - retries=$((retries - 1)) - echo "Waiting 10 seconds before retrying. Retries left: $retries" - sleep 10s - done - - unzip -q -d $tempFolder $localZipFile - - mkdir $buildFolder - cp -r $tempFolder/**/build/** $buildFolder - - chmod +x $buildFile - - # Cleanup - if test ! -d $tempFolder; then - rm -rf $tempFolder - fi -fi - -$buildFile -r $repoFolder "$@" \ No newline at end of file +# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs) +chmod +x "$DIR/run.sh"; sync +"$DIR/run.sh" default-build "$@" diff --git a/tools/Key.snk b/build/Key.snk similarity index 100% rename from tools/Key.snk rename to build/Key.snk diff --git a/build/dependencies.props b/build/dependencies.props new file mode 100644 index 00000000..40e13eba --- /dev/null +++ b/build/dependencies.props @@ -0,0 +1,30 @@ + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + 3.0.0-build-20181114.5 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-alpha1-10742 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview-181113-11 + 3.0.0-preview1-26907-05 + 3.0.0-alpha1-10742 + 2.0.3 + 11.0.2 + 4.10.0-preview1-26907-04 + + + + diff --git a/build/repo.props b/build/repo.props new file mode 100644 index 00000000..4402da1d --- /dev/null +++ b/build/repo.props @@ -0,0 +1,13 @@ + + + + + + Internal.AspNetCore.Universe.Lineup + https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json + + + + + + diff --git a/build/sources.props b/build/sources.props new file mode 100644 index 00000000..9215df97 --- /dev/null +++ b/build/sources.props @@ -0,0 +1,17 @@ + + + + + $(DotNetRestoreSources) + + $(RestoreSources); + https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; + + + $(RestoreSources); + https://api.nuget.org/v3/index.json; + + + diff --git a/global.json b/global.json deleted file mode 100644 index 983ba040..00000000 --- a/global.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "projects": ["src"] -} diff --git a/korebuild-lock.txt b/korebuild-lock.txt new file mode 100644 index 00000000..73613543 --- /dev/null +++ b/korebuild-lock.txt @@ -0,0 +1,2 @@ +version:3.0.0-build-20181114.5 +commithash:880e9a204d4ee4a18dfd83c9fb05a192a28bca60 diff --git a/korebuild.json b/korebuild.json new file mode 100644 index 00000000..f098e7f9 --- /dev/null +++ b/korebuild.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", + "channel": "master", + "toolsets": { + "nodejs": { + "required": true, + "minVersion": "6.9" + } + } +} diff --git a/makefile.shade b/makefile.shade deleted file mode 100755 index 4e9c487c..00000000 --- a/makefile.shade +++ /dev/null @@ -1,8 +0,0 @@ - -var VERSION='0.1' -var FULL_VERSION='0.1' -var AUTHORS='Microsoft Open Technologies, Inc.' -var SAMPLES_PROJECT_GLOB='templates/*/project.json' - -use-standard-lifecycle -k-standard-goals diff --git a/pack-local.sh b/pack-local.sh deleted file mode 100755 index f807152a..00000000 --- a/pack-local.sh +++ /dev/null @@ -1,22 +0,0 @@ -versionSuffix=$1 -dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -projects=( - ./src/Microsoft.AspNetCore.NodeServices - ./src/Microsoft.AspNetCore.SpaServices - ./src/Microsoft.AspNetCore.AngularServices - ./src/Microsoft.AspNetCore.ReactServices -) - -if [ -z "$versionSuffix" ]; then - echo "Usage: pack-local.sh " - echo "Example: pack-local.sh beta-000001" - exit 1 -fi - -pushd $dir > /dev/null - -for proj in "${projects[@]}"; do - dotnet pack $proj --version-suffix $versionSuffix -o ./artifacts/ -done - -popd > /dev/null diff --git a/run.cmd b/run.cmd new file mode 100644 index 00000000..d52d5c7e --- /dev/null +++ b/run.cmd @@ -0,0 +1,2 @@ +@ECHO OFF +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' %*; exit $LASTEXITCODE" diff --git a/run.ps1 b/run.ps1 new file mode 100644 index 00000000..34604c71 --- /dev/null +++ b/run.ps1 @@ -0,0 +1,209 @@ +#!/usr/bin/env powershell +#requires -version 4 + +<# +.SYNOPSIS +Executes KoreBuild commands. + +.DESCRIPTION +Downloads korebuild if required. Then executes the KoreBuild command. To see available commands, execute with `-Command help`. + +.PARAMETER Command +The KoreBuild command to run. + +.PARAMETER Path +The folder to build. Defaults to the folder containing this script. + +.PARAMETER Channel +The channel of KoreBuild to download. Overrides the value from the config file. + +.PARAMETER DotNetHome +The directory where .NET Core tools will be stored. + +.PARAMETER ToolsSource +The base url where build tools can be downloaded. Overrides the value from the config file. + +.PARAMETER Update +Updates KoreBuild to the latest version even if a lock file is present. + +.PARAMETER Reinstall +Re-installs KoreBuild + +.PARAMETER ConfigFile +The path to the configuration file that stores values. Defaults to korebuild.json. + +.PARAMETER ToolsSourceSuffix +The Suffix to append to the end of the ToolsSource. Useful for query strings in blob stores. + +.PARAMETER CI +Sets up CI specific settings and variables. + +.PARAMETER Arguments +Arguments to be passed to the command + +.NOTES +This function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be. +When the lockfile is not present, KoreBuild will create one using latest available version from $Channel. + +The $ConfigFile is expected to be an JSON file. It is optional, and the configuration values in it are optional as well. Any options set +in the file are overridden by command line parameters. + +.EXAMPLE +Example config file: +```json +{ + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", + "channel": "master", + "toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools" +} +``` +#> +[CmdletBinding(PositionalBinding = $false)] +param( + [Parameter(Mandatory = $true, Position = 0)] + [string]$Command, + [string]$Path = $PSScriptRoot, + [Alias('c')] + [string]$Channel, + [Alias('d')] + [string]$DotNetHome, + [Alias('s')] + [string]$ToolsSource, + [Alias('u')] + [switch]$Update, + [switch]$Reinstall, + [string]$ToolsSourceSuffix, + [string]$ConfigFile = $null, + [switch]$CI, + [Parameter(ValueFromRemainingArguments = $true)] + [string[]]$Arguments +) + +Set-StrictMode -Version 2 +$ErrorActionPreference = 'Stop' + +# +# Functions +# + +function Get-KoreBuild { + + $lockFile = Join-Path $Path 'korebuild-lock.txt' + + if (!(Test-Path $lockFile) -or $Update) { + Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $lockFile $ToolsSourceSuffix + } + + $version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1 + if (!$version) { + Write-Error "Failed to parse version from $lockFile. Expected a line that begins with 'version:'" + } + $version = $version.TrimStart('version:').Trim() + $korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version) + + if ($Reinstall -and (Test-Path $korebuildPath)) { + Remove-Item -Force -Recurse $korebuildPath + } + + if (!(Test-Path $korebuildPath)) { + Write-Host -ForegroundColor Magenta "Downloading KoreBuild $version" + New-Item -ItemType Directory -Path $korebuildPath | Out-Null + $remotePath = "$ToolsSource/korebuild/artifacts/$version/korebuild.$version.zip" + + try { + $tmpfile = Join-Path ([IO.Path]::GetTempPath()) "KoreBuild-$([guid]::NewGuid()).zip" + Get-RemoteFile $remotePath $tmpfile $ToolsSourceSuffix + if (Get-Command -Name 'Microsoft.PowerShell.Archive\Expand-Archive' -ErrorAction Ignore) { + # Use built-in commands where possible as they are cross-plat compatible + Microsoft.PowerShell.Archive\Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath + } + else { + # Fallback to old approach for old installations of PowerShell + Add-Type -AssemblyName System.IO.Compression.FileSystem + [System.IO.Compression.ZipFile]::ExtractToDirectory($tmpfile, $korebuildPath) + } + } + catch { + Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore + throw + } + finally { + Remove-Item $tmpfile -ErrorAction Ignore + } + } + + return $korebuildPath +} + +function Join-Paths([string]$path, [string[]]$childPaths) { + $childPaths | ForEach-Object { $path = Join-Path $path $_ } + return $path +} + +function Get-RemoteFile([string]$RemotePath, [string]$LocalPath, [string]$RemoteSuffix) { + if ($RemotePath -notlike 'http*') { + Copy-Item $RemotePath $LocalPath + return + } + + $retries = 10 + while ($retries -gt 0) { + $retries -= 1 + try { + Invoke-WebRequest -UseBasicParsing -Uri $($RemotePath + $RemoteSuffix) -OutFile $LocalPath + return + } + catch { + Write-Verbose "Request failed. $retries retries remaining" + } + } + + Write-Error "Download failed: '$RemotePath'." +} + +# +# Main +# + +# Load configuration or set defaults + +$Path = Resolve-Path $Path +if (!$ConfigFile) { $ConfigFile = Join-Path $Path 'korebuild.json' } + +if (Test-Path $ConfigFile) { + try { + $config = Get-Content -Raw -Encoding UTF8 -Path $ConfigFile | ConvertFrom-Json + if ($config) { + if (!($Channel) -and (Get-Member -Name 'channel' -InputObject $config)) { [string] $Channel = $config.channel } + if (!($ToolsSource) -and (Get-Member -Name 'toolsSource' -InputObject $config)) { [string] $ToolsSource = $config.toolsSource} + } + } + catch { + Write-Host -ForegroundColor Red $Error[0] + Write-Error "$ConfigFile contains invalid JSON." + exit 1 + } +} + +if (!$DotNetHome) { + $DotNetHome = if ($env:DOTNET_HOME) { $env:DOTNET_HOME } ` + elseif ($env:USERPROFILE) { Join-Path $env:USERPROFILE '.dotnet'} ` + elseif ($env:HOME) {Join-Path $env:HOME '.dotnet'}` + else { Join-Path $PSScriptRoot '.dotnet'} +} + +if (!$Channel) { $Channel = 'master' } +if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' } + +# Execute + +$korebuildPath = Get-KoreBuild +Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') + +try { + Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile -CI:$CI + Invoke-KoreBuildCommand $Command @Arguments +} +finally { + Remove-Module 'KoreBuild' -ErrorAction Ignore +} diff --git a/run.sh b/run.sh new file mode 100755 index 00000000..4c1fed56 --- /dev/null +++ b/run.sh @@ -0,0 +1,256 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# +# variables +# + +RESET="\033[0m" +RED="\033[0;31m" +YELLOW="\033[0;33m" +MAGENTA="\033[0;95m" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +[ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet" +verbose=false +update=false +reinstall=false +repo_path="$DIR" +channel='' +tools_source='' +tools_source_suffix='' +ci=false + +# +# Functions +# +__usage() { + echo "Usage: $(basename "${BASH_SOURCE[0]}") command [options] [[--] ...]" + echo "" + echo "Arguments:" + echo " command The command to be run." + echo " ... Arguments passed to the command. Variable number of arguments allowed." + echo "" + echo "Options:" + echo " --verbose Show verbose output." + echo " -c|--channel The channel of KoreBuild to download. Overrides the value from the config file.." + echo " --config-file The path to the configuration file that stores values. Defaults to korebuild.json." + echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet." + echo " --path The directory to build. Defaults to the directory containing the script." + echo " -s|--tools-source|-ToolsSource The base url where build tools can be downloaded. Overrides the value from the config file." + echo " --tools-source-suffix|-ToolsSourceSuffix The suffix to append to tools-source. Useful for query strings." + echo " -u|--update Update to the latest KoreBuild even if the lock file is present." + echo " --reinstall Reinstall KoreBuild." + echo " --ci Apply CI specific settings and environment variables." + echo "" + echo "Description:" + echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be." + echo " When the lockfile is not present, KoreBuild will create one using latest available version from \$channel." + + if [[ "${1:-}" != '--no-exit' ]]; then + exit 2 + fi +} + +get_korebuild() { + local version + local lock_file="$repo_path/korebuild-lock.txt" + if [ ! -f "$lock_file" ] || [ "$update" = true ]; then + __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" "$tools_source_suffix" + fi + version="$(grep 'version:*' -m 1 "$lock_file")" + if [[ "$version" == '' ]]; then + __error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'" + return 1 + fi + version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" + + if [ "$reinstall" = true ] && [ -d "$korebuild_path" ]; then + rm -rf "$korebuild_path" + fi + + { + if [ ! -d "$korebuild_path" ]; then + mkdir -p "$korebuild_path" + local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" + tmpfile="$(mktemp)" + echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" + if __get_remote_file "$remote_path" "$tmpfile" "$tools_source_suffix"; then + unzip -q -d "$korebuild_path" "$tmpfile" + fi + rm "$tmpfile" || true + fi + + source "$korebuild_path/KoreBuild.sh" + } || { + if [ -d "$korebuild_path" ]; then + echo "Cleaning up after failed installation" + rm -rf "$korebuild_path" || true + fi + return 1 + } +} + +__error() { + echo -e "${RED}error: $*${RESET}" 1>&2 +} + +__warn() { + echo -e "${YELLOW}warning: $*${RESET}" +} + +__machine_has() { + hash "$1" > /dev/null 2>&1 + return $? +} + +__get_remote_file() { + local remote_path=$1 + local local_path=$2 + local remote_path_suffix=$3 + + if [[ "$remote_path" != 'http'* ]]; then + cp "$remote_path" "$local_path" + return 0 + fi + + local failed=false + if __machine_has wget; then + wget --tries 10 --quiet -O "$local_path" "${remote_path}${remote_path_suffix}" || failed=true + else + failed=true + fi + + if [ "$failed" = true ] && __machine_has curl; then + failed=false + curl --retry 10 -sSL -f --create-dirs -o "$local_path" "${remote_path}${remote_path_suffix}" || failed=true + fi + + if [ "$failed" = true ]; then + __error "Download failed: $remote_path" 1>&2 + return 1 + fi +} + +# +# main +# + +command="${1:-}" +shift + +while [[ $# -gt 0 ]]; do + case $1 in + -\?|-h|--help) + __usage --no-exit + exit 0 + ;; + -c|--channel|-Channel) + shift + channel="${1:-}" + [ -z "$channel" ] && __usage + ;; + --config-file|-ConfigFile) + shift + config_file="${1:-}" + [ -z "$config_file" ] && __usage + if [ ! -f "$config_file" ]; then + __error "Invalid value for --config-file. $config_file does not exist." + exit 1 + fi + ;; + -d|--dotnet-home|-DotNetHome) + shift + DOTNET_HOME="${1:-}" + [ -z "$DOTNET_HOME" ] && __usage + ;; + --path|-Path) + shift + repo_path="${1:-}" + [ -z "$repo_path" ] && __usage + ;; + -s|--tools-source|-ToolsSource) + shift + tools_source="${1:-}" + [ -z "$tools_source" ] && __usage + ;; + --tools-source-suffix|-ToolsSourceSuffix) + shift + tools_source_suffix="${1:-}" + [ -z "$tools_source_suffix" ] && __usage + ;; + -u|--update|-Update) + update=true + ;; + --reinstall|-[Rr]einstall) + reinstall=true + ;; + --ci|-[Cc][Ii]) + ci=true + ;; + --verbose|-Verbose) + verbose=true + ;; + --) + shift + break + ;; + *) + break + ;; + esac + shift +done + +if ! __machine_has unzip; then + __error 'Missing required command: unzip' + exit 1 +fi + +if ! __machine_has curl && ! __machine_has wget; then + __error 'Missing required command. Either wget or curl is required.' + exit 1 +fi + +[ -z "${config_file:-}" ] && config_file="$repo_path/korebuild.json" +if [ -f "$config_file" ]; then + if __machine_has jq ; then + if jq '.' "$config_file" >/dev/null ; then + config_channel="$(jq -r 'select(.channel!=null) | .channel' "$config_file")" + config_tools_source="$(jq -r 'select(.toolsSource!=null) | .toolsSource' "$config_file")" + else + __error "$config_file contains invalid JSON." + exit 1 + fi + elif __machine_has python ; then + if python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then + config_channel="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" + config_tools_source="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" + else + __error "$config_file contains invalid JSON." + exit 1 + fi + elif __machine_has python3 ; then + if python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then + config_channel="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" + config_tools_source="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" + else + __error "$config_file contains invalid JSON." + exit 1 + fi + else + __error 'Missing required command: jq or python. Could not parse the JSON file.' + exit 1 + fi + + [ ! -z "${config_channel:-}" ] && channel="$config_channel" + [ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source" +fi + +[ -z "$channel" ] && channel='master' +[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' + +get_korebuild +set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" "$ci" +invoke_korebuild_command "$command" "$@" diff --git a/samples/angular/MusicStore/.gitignore b/samples/angular/MusicStore/.gitignore deleted file mode 100644 index 762a3e6c..00000000 --- a/samples/angular/MusicStore/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/node_modules/ -/wwwroot/lib/ -/wwwroot/ng-app/**/*.js -/project.lock.json -/music-db.sqlite -/Properties/launchSettings.json - -# Obviously you don't really want your DB to go in wwwroot, but due to https://github.com/aspnet/Microsoft.Data.Sqlite/issues/188 -# it currently does when run from IIS Express. Will resolve this once RC2 is out, which is supposed to eliminate the inconsistency. -/wwwroot/music-db.sqlite diff --git a/samples/angular/MusicStore/Apis/AlbumsApiController.cs b/samples/angular/MusicStore/Apis/AlbumsApiController.cs deleted file mode 100644 index 3b98a1eb..00000000 --- a/samples/angular/MusicStore/Apis/AlbumsApiController.cs +++ /dev/null @@ -1,216 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; -using AutoMapper; -using MusicStore.Models; -using MusicStore.Infrastructure; - -namespace MusicStore.Apis -{ - [Route("api/albums")] - public class AlbumsApiController : Controller - { - private readonly MusicStoreContext _storeContext; - - public AlbumsApiController(MusicStoreContext storeContext) - { - _storeContext = storeContext; - } - - [HttpGet] - [NoCache] - public async Task Paged(int page = 1, int pageSize = 50, string sortBy = null) - { - await _storeContext.Genres.LoadAsync(); - await _storeContext.Artists.LoadAsync(); - - var albums = await _storeContext.Albums - .Include(a => a.Genre) - .Include(a => a.Artist) - .ToPagedListAsync(page, pageSize, sortBy, - a => a.Title, // sortExpression - SortDirection.Ascending, // defaultSortDirection - a => Mapper.Map(a, new AlbumResultDto())); // selector - - return Json(albums); - } - - [HttpGet("all")] - [NoCache] - public async Task All() - { - var albums = await _storeContext.Albums - .Include(a => a.Genre) - .Include(a => a.Artist) - .OrderBy(a => a.Title) - .ToListAsync(); - - return Json(albums.Select(a => Mapper.Map(a, new AlbumResultDto()))); - } - - [HttpGet("mostPopular")] - [NoCache] - public async Task MostPopular(int count = 6) - { - count = count > 0 && count < 20 ? count : 6; - var albums = await _storeContext.Albums - .OrderByDescending(a => a.OrderDetails.Count()) - .Take(count) - .ToListAsync(); - - // TODO: Move the .Select() to end of albums query when EF supports it - return Json(albums.Select(a => Mapper.Map(a, new AlbumResultDto()))); - } - - [HttpGet("{albumId:int}")] - [NoCache] - public async Task Details(int albumId) - { - await _storeContext.Genres.LoadAsync(); - await _storeContext.Artists.LoadAsync(); - - var album = await _storeContext.Albums - .Include(a => a.Artist) - .Include(a => a.Genre) - .Where(a => a.AlbumId == albumId) - .SingleOrDefaultAsync(); - - var albumResult = Mapper.Map(album, new AlbumResultDto()); - - // TODO: Add null checking and return 404 in that case - - return Json(albumResult); - } - - [HttpPost] - [Authorize("app-ManageStore")] - public async Task CreateAlbum([FromBody]AlbumChangeDto album) - { - if (!ModelState.IsValid) - { - // Return the model errors - return BadRequest(ModelState); - } - - // Save the changes to the DB - var dbAlbum = new Album(); - _storeContext.Albums.Add(Mapper.Map(album, dbAlbum)); - await _storeContext.SaveChangesAsync(); - - // TODO: Handle missing record, key violations, concurrency issues, etc. - - return new ObjectResult(new { - Data = dbAlbum.AlbumId, - Message = "Album created successfully." - }); - } - - [HttpPut("{albumId:int}/update")] - public async Task UpdateAlbum(int albumId, [FromBody] AlbumChangeDto album) - { - if (!ModelState.IsValid) - { - // Return the model errors - return BadRequest(ModelState); - } - - var dbAlbum = await _storeContext.Albums.SingleOrDefaultAsync(a => a.AlbumId == albumId); - - if (dbAlbum == null) - { - return new ObjectResult(new { - Message = string.Format("The album with ID {0} was not found.", albumId) - }) { StatusCode = 404 }; - } - - // Save the changes to the DB - Mapper.Map(album, dbAlbum); - await _storeContext.SaveChangesAsync(); - - // TODO: Handle missing record, key violations, concurrency issues, etc. - - return new ObjectResult (new { - Message = "Album updated successfully." - }); - } - - [HttpDelete("{albumId:int}")] - [Authorize("app-ManageStore")] - public async Task DeleteAlbum(int albumId) - { - var album = await _storeContext.Albums.SingleOrDefaultAsync(a => a.AlbumId == albumId); - - if (album != null) - { - _storeContext.Albums.Remove(album); - - // Save the changes to the DB - await _storeContext.SaveChangesAsync(); - - // TODO: Handle missing record, key violations, concurrency issues, etc. - } - - return new ObjectResult (new { - Message = "Album deleted successfully." - }); - } - } - - [ModelMetadataType(typeof(Album))] - public class AlbumChangeDto : IValidatableObject - { - public int GenreId { get; set; } - - public int ArtistId { get; set; } - - public string Title { get; set; } - - public decimal Price { get; set; } - - public string AlbumArtUrl { get; set; } - - public IEnumerable Validate(ValidationContext validationContext) - { - // An example of object-level (i.e., multi-property) validation - if (this.GenreId == 13 /* Indie */) { - switch (SentimentAnalysis.GetSentiment(Title)) { - case SentimentAnalysis.SentimentResult.Positive: - yield return new ValidationResult("Sounds too positive. Indie music requires more ambiguity."); - break; - case SentimentAnalysis.SentimentResult.Negative: - yield return new ValidationResult("Sounds too negative. Indie music requires more ambiguity."); - break; - } - } - } - } - - public class AlbumResultDto : AlbumChangeDto - { - public AlbumResultDto() - { - Artist = new ArtistResultDto(); - Genre = new GenreResultDto(); - } - - public int AlbumId { get; set; } - - public ArtistResultDto Artist { get; private set; } - - public GenreResultDto Genre { get; private set; } - } - - public class ArtistResultDto - { - public string Name { get; set; } - } - - public class GenreResultDto - { - public string Name { get; set; } - } -} diff --git a/samples/angular/MusicStore/Apis/ArtistsApiController.cs b/samples/angular/MusicStore/Apis/ArtistsApiController.cs deleted file mode 100644 index f3568aeb..00000000 --- a/samples/angular/MusicStore/Apis/ArtistsApiController.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; -using MusicStore.Models; - -namespace MusicStore.Apis -{ - [Route("api/artists")] - public class ArtistsApiController : Controller - { - private readonly MusicStoreContext _storeContext; - - public ArtistsApiController(MusicStoreContext storeContext) - { - _storeContext = storeContext; - } - - [HttpGet("lookup")] - public async Task Lookup() - { - var artists = await _storeContext.Artists - .OrderBy(a => a.Name) - .ToListAsync(); - - return Json(artists); - } - } -} diff --git a/samples/angular/MusicStore/Apis/GenresApiController.cs b/samples/angular/MusicStore/Apis/GenresApiController.cs deleted file mode 100644 index 338ca2fc..00000000 --- a/samples/angular/MusicStore/Apis/GenresApiController.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; -using MusicStore.Models; -using MusicStore.Infrastructure; - -namespace MusicStore.Apis -{ - [Route("api/genres")] - public class GenresApiController : Controller - { - private readonly MusicStoreContext _storeContext; - - public GenresApiController(MusicStoreContext storeContext) - { - _storeContext = storeContext; - } - - [HttpGet] - public async Task GenreList() - { - var genres = await _storeContext.Genres - //.Include(g => g.Albums) - .OrderBy(g => g.Name) - .ToListAsync(); - - return Json(genres); - } - - [HttpGet("genre-lookup")] - public async Task Lookup() - { - var genres = await _storeContext.Genres - .Select(g => new { g.GenreId, g.Name }) - .ToListAsync(); - - return Json(genres); - } - - [HttpGet("menu")] - public async Task GenreMenuList(int count = 9) - { - count = count > 0 && count < 20 ? count : 9; - - var genres = await _storeContext.Genres - .OrderByDescending(g => - g.Albums.Sum(a => - a.OrderDetails.Sum(od => od.Quantity))) - .Take(count) - .ToListAsync(); - - return Json(genres); - } - - [HttpGet("{genreId:int}/albums")] - [NoCache] - public async Task GenreAlbums(int genreId) - { - var albums = await _storeContext.Albums - .Where(a => a.GenreId == genreId) - //.Include(a => a.Genre) - //.Include(a => a.Artist) - //.OrderBy(a => a.Genre.Name) - .ToListAsync(); - - return Json(albums); - } - } -} diff --git a/samples/angular/MusicStore/Apis/Models/AccountViewModels.cs b/samples/angular/MusicStore/Apis/Models/AccountViewModels.cs deleted file mode 100644 index 831978a5..00000000 --- a/samples/angular/MusicStore/Apis/Models/AccountViewModels.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace MusicStore.Models -{ - public class ExternalLoginConfirmationViewModel - { - [Required] - [Display(Name = "User name")] - public string UserName { get; set; } - } - - public class ManageUserViewModel - { - [Required] - [DataType(DataType.Password)] - [Display(Name = "Current password")] - public string OldPassword { get; set; } - - [Required] - [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] - [DataType(DataType.Password)] - [Display(Name = "New password")] - public string NewPassword { get; set; } - - [DataType(DataType.Password)] - [Display(Name = "Confirm new password")] - [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] - public string ConfirmPassword { get; set; } - } - - public class LoginViewModel - { - [Required] - [Display(Name = "User name")] - public string UserName { get; set; } - - [Required] - [DataType(DataType.Password)] - [Display(Name = "Password")] - public string Password { get; set; } - - [Display(Name = "Remember me?")] - public bool RememberMe { get; set; } - } - - public class RegisterViewModel - { - [Required] - [Display(Name = "User name")] - public string UserName { get; set; } - - [Required] - [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] - [DataType(DataType.Password)] - [Display(Name = "Password")] - public string Password { get; set; } - - [DataType(DataType.Password)] - [Display(Name = "Confirm password")] - [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] - public string ConfirmPassword { get; set; } - } -} diff --git a/samples/angular/MusicStore/Apis/Models/Album.cs b/samples/angular/MusicStore/Apis/Models/Album.cs deleted file mode 100644 index b4495f34..00000000 --- a/samples/angular/MusicStore/Apis/Models/Album.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; - -namespace MusicStore.Models -{ - public class Album - { - public Album() - { - // TODO: Temporary hack to populate the orderdetails until EF does this automatically. - OrderDetails = new List(); - } - - [ScaffoldColumn(false)] - public int AlbumId { get; set; } - - public int GenreId { get; set; } - - public int ArtistId { get; set; } - - [Required] - [StringLength(160, MinimumLength = 2)] - public string Title { get; set; } - - [Required] - [RangeAttribute(typeof(decimal), "0.01", "100")] // Long-form constructor to work around https://github.com/dotnet/coreclr/issues/2172 - [DataType(DataType.Currency)] - public decimal Price { get; set; } - - [Display(Name = "Album Art URL")] - [StringLength(1024)] - public string AlbumArtUrl { get; set; } - - public virtual Genre Genre { get; set; } - - public virtual Artist Artist { get; set; } - - public virtual ICollection OrderDetails { get; set; } - } -} diff --git a/samples/angular/MusicStore/Apis/Models/Artist.cs b/samples/angular/MusicStore/Apis/Models/Artist.cs deleted file mode 100644 index b364a898..00000000 --- a/samples/angular/MusicStore/Apis/Models/Artist.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace MusicStore.Models -{ - public class Artist - { - public int ArtistId { get; set; } - - [Required] - public string Name { get; set; } - } -} diff --git a/samples/angular/MusicStore/Apis/Models/CartItem.cs b/samples/angular/MusicStore/Apis/Models/CartItem.cs deleted file mode 100644 index 7209462d..00000000 --- a/samples/angular/MusicStore/Apis/Models/CartItem.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace MusicStore.Models -{ - public class CartItem - { - [Key] - public int CartItemId { get; set; } - - [Required] - public string CartId { get; set; } - public int AlbumId { get; set; } - public int Count { get; set; } - - [DataType(DataType.DateTime)] - public DateTime DateCreated { get; set; } - - public virtual Album Album { get; set; } - } -} diff --git a/samples/angular/MusicStore/Apis/Models/Genre.cs b/samples/angular/MusicStore/Apis/Models/Genre.cs deleted file mode 100644 index eed5616c..00000000 --- a/samples/angular/MusicStore/Apis/Models/Genre.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using Newtonsoft.Json; - -namespace MusicStore.Models -{ - public class Genre - { - public Genre() - { - Albums = new List(); - } - - public int GenreId { get; set; } - - [Required] - public string Name { get; set; } - - public string Description { get; set; } - - [JsonIgnore] - public virtual ICollection Albums { get; set; } - } -} diff --git a/samples/angular/MusicStore/Apis/Models/MusicStoreContext.cs b/samples/angular/MusicStore/Apis/Models/MusicStoreContext.cs deleted file mode 100644 index aee7aedd..00000000 --- a/samples/angular/MusicStore/Apis/Models/MusicStoreContext.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; - -namespace MusicStore.Models -{ - public class ApplicationUser : IdentityUser { } - - public class MusicStoreContext : IdentityDbContext - { - public MusicStoreContext(DbContextOptions options) : base(options) - { - } - - public DbSet Albums { get; set; } - public DbSet Artists { get; set; } - public DbSet Orders { get; set; } - public DbSet Genres { get; set; } - public DbSet CartItems { get; set; } - public DbSet OrderDetails { get; set; } - - protected override void OnModelCreating(ModelBuilder builder) - { - // Configure pluralization - builder.Entity().ToTable("Albums"); - builder.Entity().ToTable("Artists"); - builder.Entity().ToTable("Orders"); - builder.Entity().ToTable("Genres"); - builder.Entity().ToTable("CartItems"); - builder.Entity().ToTable("OrderDetails"); - - base.OnModelCreating(builder); - } - } -} diff --git a/samples/angular/MusicStore/Apis/Models/Order.cs b/samples/angular/MusicStore/Apis/Models/Order.cs deleted file mode 100644 index 110a77d8..00000000 --- a/samples/angular/MusicStore/Apis/Models/Order.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; - -namespace MusicStore.Models -{ - //[Bind(Include = "FirstName,LastName,Address,City,State,PostalCode,Country,Phone,Email")] - public class Order - { - public Order() - { - OrderDetails = new List(); - } - - [ScaffoldColumn(false)] - public int OrderId { get; set; } - - [ScaffoldColumn(false)] - public DateTime OrderDate { get; set; } - - [Required] - [ScaffoldColumn(false)] - public string Username { get; set; } - - [Required] - [Display(Name = "First Name")] - [StringLength(160)] - public string FirstName { get; set; } - - [Required] - [Display(Name = "Last Name")] - [StringLength(160)] - public string LastName { get; set; } - - [Required] - [StringLength(70, MinimumLength = 3)] - public string Address { get; set; } - - [Required] - [StringLength(40)] - public string City { get; set; } - - [Required] - [StringLength(40)] - public string State { get; set; } - - [Required] - [Display(Name = "Postal Code")] - [StringLength(10, MinimumLength = 5)] - public string PostalCode { get; set; } - - [Required] - [StringLength(40)] - public string Country { get; set; } - - [Required] - [StringLength(24)] - [DataType(DataType.PhoneNumber)] - public string Phone { get; set; } - - [Required] - [Display(Name = "Email Address")] - [RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}", - ErrorMessage = "Email is not valid.")] - [DataType(DataType.EmailAddress)] - public string Email { get; set; } - - [ScaffoldColumn(false)] - public decimal Total { get; set; } - - public ICollection OrderDetails { get; set; } - } -} diff --git a/samples/angular/MusicStore/Apis/Models/OrderDetail.cs b/samples/angular/MusicStore/Apis/Models/OrderDetail.cs deleted file mode 100644 index cb1e6930..00000000 --- a/samples/angular/MusicStore/Apis/Models/OrderDetail.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace MusicStore.Models -{ - public class OrderDetail - { - public int OrderDetailId { get; set; } - public int OrderId { get; set; } - public int AlbumId { get; set; } - public int Quantity { get; set; } - public decimal UnitPrice { get; set; } - - public virtual Album Album { get; set; } - public virtual Order Order { get; set; } - } -} diff --git a/samples/angular/MusicStore/Apis/Models/SampleData.cs b/samples/angular/MusicStore/Apis/Models/SampleData.cs deleted file mode 100644 index b1d98a7c..00000000 --- a/samples/angular/MusicStore/Apis/Models/SampleData.cs +++ /dev/null @@ -1,915 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Options; - -namespace MusicStore.Models -{ - public static class SampleData - { - const string imgUrl = "/images/placeholder.png"; - - public static async Task InitializeMusicStoreDatabaseAsync(IServiceProvider serviceProvider) - { - using (var db = serviceProvider.GetService()) - { - if (await db.Database.EnsureCreatedAsync()) - { - await InsertTestData(serviceProvider); - } - } - } - - private static async Task InsertTestData(IServiceProvider serviceProvider) - { - var albums = GetAlbums(imgUrl, Genres, Artists); - await AddOrUpdateAsync(serviceProvider, g => g.GenreId, Genres.Select(genre => genre.Value)); - await AddOrUpdateAsync(serviceProvider, a => a.ArtistId, Artists.Select(artist => artist.Value)); - await AddOrUpdateAsync(serviceProvider, a => a.AlbumId, albums); - } - - // TODO [EF] This may be replaced by a first class mechanism in EF - private static async Task AddOrUpdateAsync( - IServiceProvider serviceProvider, - Func propertyToMatch, IEnumerable entities) - where TEntity : class - { - // Query in a separate context so that we can attach existing entities as modified - List existingData; - - using (var scope = serviceProvider.GetRequiredService().CreateScope()) - using (var db = scope.ServiceProvider.GetService()) - { - existingData = db.Set().ToList(); - } - - using (var scope = serviceProvider.GetRequiredService().CreateScope()) - using (var db = scope.ServiceProvider.GetService()) - { - foreach (var item in entities) - { - db.Entry(item).State = existingData.Any(g => propertyToMatch(g).Equals(propertyToMatch(item))) - ? EntityState.Modified - : EntityState.Added; - } - - await db.SaveChangesAsync(); - } - } - - private static Album[] GetAlbums(string imgUrl, Dictionary genres, Dictionary artists) - { - var albums = new Album[] - { - new Album { Title = "The Best Of The Men At Work", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Men At Work"], AlbumArtUrl = imgUrl }, - new Album { Title = "...And Justice For All", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "עד גבול האור", Genre = genres["World"], Price = 8.99M, Artist = artists["אריק אינשטיין"], AlbumArtUrl = imgUrl }, - new Album { Title = "Black Light Syndrome", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Terry Bozzio, Tony Levin & Steve Stevens"], AlbumArtUrl = imgUrl }, - new Album { Title = "10,000 Days", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl }, - new Album { Title = "11i", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Supreme Beings of Leisure"], AlbumArtUrl = imgUrl }, - new Album { Title = "1960", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Soul-Junk"], AlbumArtUrl = imgUrl }, - new Album { Title = "4x4=12 ", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["deadmau5"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Copland Celebration, Vol. I", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Symphony Orchestra"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Lively Mind", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Paul Oakenfold"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Matter of Life and Death", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Real Dead One", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Real Live One", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Rush of Blood to the Head", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Coldplay"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Soprano Inspired", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Britten Sinfonia, Ivor Bolton & Lesley Garrett"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Winter Symphony", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Abbey Road", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ace Of Spades", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Motörhead"], AlbumArtUrl = imgUrl }, - new Album { Title = "Achtung Baby", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Acústico MTV", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl }, - new Album { Title = "Adams, John: The Chairman Dances", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Edo de Waart & San Francisco Symphony"], AlbumArtUrl = imgUrl }, - new Album { Title = "Adrenaline", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deftones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ænima", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl }, - new Album { Title = "Afrociberdelia", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Science & Nação Zumbi"], AlbumArtUrl = imgUrl }, - new Album { Title = "After the Goldrush", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Neil Young"], AlbumArtUrl = imgUrl }, - new Album { Title = "Airdrawn Dagger", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Sasha"], AlbumArtUrl = imgUrl }, - new Album { Title = "Album Title Goes Here", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["deadmau5"], AlbumArtUrl = imgUrl }, - new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 1]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Label Society"], AlbumArtUrl = imgUrl }, - new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 2]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Label Society"], AlbumArtUrl = imgUrl }, - new Album { Title = "Alive 2007", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Daft Punk"], AlbumArtUrl = imgUrl }, - new Album { Title = "All I Ask of You", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Amen (So Be It)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paddy Casey"], AlbumArtUrl = imgUrl }, - new Album { Title = "Animal Vehicle", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Axis of Awesome"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ao Vivo [IMPORT]", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Zeca Pagodinho"], AlbumArtUrl = imgUrl }, - new Album { Title = "Apocalyptic Love", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Slash"], AlbumArtUrl = imgUrl }, - new Album { Title = "Appetite for Destruction", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "Are You Experienced?", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Jimi Hendrix"], AlbumArtUrl = imgUrl }, - new Album { Title = "Arquivo II", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl }, - new Album { Title = "Arquivo Os Paralamas Do Sucesso", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl }, - new Album { Title = "A-Sides", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Soundgarden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Audioslave", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Audioslave"], AlbumArtUrl = imgUrl }, - new Album { Title = "Automatic for the People", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["R.E.M."], AlbumArtUrl = imgUrl }, - new Album { Title = "Axé Bahia 2001", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl }, - new Album { Title = "Babel", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Mumford & Sons"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bach: Goldberg Variations", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Wilhelm Kempff"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bach: The Brandenburg Concertos", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Orchestra of The Age of Enlightenment"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bach: The Cello Suites", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Yo-Yo Ma"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bach: Toccata & Fugue in D Minor", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Ton Koopman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bad Motorfinger", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Soundgarden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Balls to the Wall", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Accept"], AlbumArtUrl = imgUrl }, - new Album { Title = "Banadeek Ta'ala", Genre = genres["World"], Price = 8.99M, Artist = artists["Amr Diab"], AlbumArtUrl = imgUrl }, - new Album { Title = "Barbie Girl", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Aqua"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bark at the Moon (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bartok: Violin & Viola Concertos", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Yehudi Menuhin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Barulhinho Bom", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Marisa Monte"], AlbumArtUrl = imgUrl }, - new Album { Title = "BBC Sessions [Disc 1] [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "BBC Sessions [Disc 2] [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Be Here Now", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Oasis"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bedrock 11 Compiled & Mixed", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["John Digweed"], AlbumArtUrl = imgUrl }, - new Album { Title = "Berlioz: Symphonie Fantastique", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Michael Tilson Thomas"], AlbumArtUrl = imgUrl }, - new Album { Title = "Beyond Good And Evil", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Cult"], AlbumArtUrl = imgUrl }, - new Album { Title = "Big Bad Wolf ", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Armand Van Helden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Big Ones", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Aerosmith"], AlbumArtUrl = imgUrl }, - new Album { Title = "Black Album", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Black Sabbath Vol. 4 (Remaster)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Sabbath"], AlbumArtUrl = imgUrl }, - new Album { Title = "Black Sabbath", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Sabbath"], AlbumArtUrl = imgUrl }, - new Album { Title = "Black", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Blackwater Park", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Opeth"], AlbumArtUrl = imgUrl }, - new Album { Title = "Blizzard of Ozz", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Blood", Genre = genres["Rock"], Price = 8.99M, Artist = artists["In This Moment"], AlbumArtUrl = imgUrl }, - new Album { Title = "Blue Moods", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Incognito"], AlbumArtUrl = imgUrl }, - new Album { Title = "Blue", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Weezer"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bongo Fury", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Frank Zappa & Captain Beefheart"], AlbumArtUrl = imgUrl }, - new Album { Title = "Boys & Girls", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alabama Shakes"], AlbumArtUrl = imgUrl }, - new Album { Title = "Brave New World", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "B-Sides 1980-1990", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bunkka", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Paul Oakenfold"], AlbumArtUrl = imgUrl }, - new Album { Title = "By The Way", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Red Hot Chili Peppers"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cake: B-Sides and Rarities", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Cake"], AlbumArtUrl = imgUrl }, - new Album { Title = "Californication", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Red Hot Chili Peppers"], AlbumArtUrl = imgUrl }, - new Album { Title = "Carmina Burana", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Boston Symphony Orchestra & Seiji Ozawa"], AlbumArtUrl = imgUrl }, - new Album { Title = "Carried to Dust (Bonus Track Version)", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Calexico"], AlbumArtUrl = imgUrl }, - new Album { Title = "Carry On", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Chris Cornell"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cássia Eller - Sem Limite [Disc 1]", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cássia Eller"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chemical Wedding", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Bruce Dickinson"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chill: Brazil (Disc 1)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Marcos Valle"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chill: Brazil (Disc 2)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Antônio Carlos Jobim"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chocolate Starfish And The Hot Dog Flavored Water", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Limp Bizkit"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chronicle, Vol. 1", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Creedence Clearwater Revival"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chronicle, Vol. 2", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Creedence Clearwater Revival"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ciao, Baby", Genre = genres["Rock"], Price = 8.99M, Artist = artists["TheStart"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cidade Negra - Hits", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cidade Negra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Classic Munkle: Turbo Edition", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Munkle"], AlbumArtUrl = imgUrl }, - new Album { Title = "Classics: The Best of Sarah Brightman", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Coda", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Come Away With Me", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Norah Jones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Come Taste The Band", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Comfort Eagle", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Cake"], AlbumArtUrl = imgUrl }, - new Album { Title = "Common Reaction", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Uh Huh Her "], AlbumArtUrl = imgUrl }, - new Album { Title = "Compositores", Genre = genres["Rock"], Price = 8.99M, Artist = artists["O Terço"], AlbumArtUrl = imgUrl }, - new Album { Title = "Contraband", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Velvet Revolver"], AlbumArtUrl = imgUrl }, - new Album { Title = "Core", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Stone Temple Pilots"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cornerstone", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Styx"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cosmicolor", Genre = genres["Rap"], Price = 8.99M, Artist = artists["M-Flo"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cross", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Justice"], AlbumArtUrl = imgUrl }, - new Album { Title = "Culture of Fear", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Thievery Corporation"], AlbumArtUrl = imgUrl }, - new Album { Title = "Da Lama Ao Caos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Science & Nação Zumbi"], AlbumArtUrl = imgUrl }, - new Album { Title = "Dakshina", Genre = genres["World"], Price = 8.99M, Artist = artists["Deva Premal"], AlbumArtUrl = imgUrl }, - new Album { Title = "Dark Side of the Moon", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl }, - new Album { Title = "Death Magnetic", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Deep End of Down", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Above the Fold"], AlbumArtUrl = imgUrl }, - new Album { Title = "Deep Purple In Rock", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Deixa Entrar", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Falamansa"], AlbumArtUrl = imgUrl }, - new Album { Title = "Deja Vu", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Crosby, Stills, Nash, and Young"], AlbumArtUrl = imgUrl }, - new Album { Title = "Di Korpu Ku Alma", Genre = genres["World"], Price = 8.99M, Artist = artists["Lura"], AlbumArtUrl = imgUrl }, - new Album { Title = "Diary of a Madman (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Diary of a Madman", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Dirt", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alice in Chains"], AlbumArtUrl = imgUrl }, - new Album { Title = "Diver Down", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Djavan Ao Vivo - Vol. 02", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Djavan"], AlbumArtUrl = imgUrl }, - new Album { Title = "Djavan Ao Vivo - Vol. 1", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Djavan"], AlbumArtUrl = imgUrl }, - new Album { Title = "Drum'n'bass for Papa", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Plug"], AlbumArtUrl = imgUrl }, - new Album { Title = "Duluth", Genre = genres["Country"], Price = 8.99M, Artist = artists["Trampled By Turtles"], AlbumArtUrl = imgUrl }, - new Album { Title = "Dummy", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Portishead"], AlbumArtUrl = imgUrl }, - new Album { Title = "Duos II", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Luciana Souza/Romero Lubambo"], AlbumArtUrl = imgUrl }, - new Album { Title = "Earl Scruggs and Friends", Genre = genres["Country"], Price = 8.99M, Artist = artists["Earl Scruggs"], AlbumArtUrl = imgUrl }, - new Album { Title = "Eden", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "El Camino", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Black Keys"], AlbumArtUrl = imgUrl }, - new Album { Title = "Elegant Gypsy", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Al di Meola"], AlbumArtUrl = imgUrl }, - new Album { Title = "Elements Of Life", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Tiësto"], AlbumArtUrl = imgUrl }, - new Album { Title = "Elis Regina-Minha História", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Elis Regina"], AlbumArtUrl = imgUrl }, - new Album { Title = "Emergency On Planet Earth", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Jamiroquai"], AlbumArtUrl = imgUrl }, - new Album { Title = "Emotion", Genre = genres["World"], Price = 8.99M, Artist = artists["Papa Wemba"], AlbumArtUrl = imgUrl }, - new Album { Title = "English Renaissance", Genre = genres["Classical"], Price = 8.99M, Artist = artists["The King's Singers"], AlbumArtUrl = imgUrl }, - new Album { Title = "Every Kind of Light", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Posies"], AlbumArtUrl = imgUrl }, - new Album { Title = "Faceless", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Godsmack"], AlbumArtUrl = imgUrl }, - new Album { Title = "Facelift", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alice in Chains"], AlbumArtUrl = imgUrl }, - new Album { Title = "Fair Warning", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Fear of a Black Planet", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Public Enemy"], AlbumArtUrl = imgUrl }, - new Album { Title = "Fear Of The Dark", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Feels Like Home", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Norah Jones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Fireball", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Fly", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "For Those About To Rock We Salute You", Genre = genres["Rock"], Price = 8.99M, Artist = artists["AC/DC"], AlbumArtUrl = imgUrl }, - new Album { Title = "Four", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Blues Traveler"], AlbumArtUrl = imgUrl }, - new Album { Title = "Frank", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Amy Winehouse"], AlbumArtUrl = imgUrl }, - new Album { Title = "Further Down the Spiral", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Nine Inch Nails"], AlbumArtUrl = imgUrl }, - new Album { Title = "Garage Inc. (Disc 1)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Garage Inc. (Disc 2)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Garbage", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Garbage"], AlbumArtUrl = imgUrl }, - new Album { Title = "Good News For People Who Love Bad News", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Modest Mouse"], AlbumArtUrl = imgUrl }, - new Album { Title = "Gordon", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Barenaked Ladies"], AlbumArtUrl = imgUrl }, - new Album { Title = "Górecki: Symphony No. 3", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Adrian Leaper & Doreen de Feis"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Hits I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Hits II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Hits", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Duck Sauce"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Hits", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Lenny Kravitz"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Hits", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Lenny Kravitz"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Kiss", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Kiss"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greetings from Michigan", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Sufjan Stevens"], AlbumArtUrl = imgUrl }, - new Album { Title = "Group Therapy", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Above & Beyond"], AlbumArtUrl = imgUrl }, - new Album { Title = "Handel: The Messiah (Highlights)", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Scholars Baroque Ensemble"], AlbumArtUrl = imgUrl }, - new Album { Title = "Haydn: Symphonies 99 - 104", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Royal Philharmonic Orchestra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Heart of the Night", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Spyro Gyra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Heart On", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Eagles of Death Metal"], AlbumArtUrl = imgUrl }, - new Album { Title = "Holy Diver", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Dio"], AlbumArtUrl = imgUrl }, - new Album { Title = "Homework", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Daft Punk"], AlbumArtUrl = imgUrl }, - new Album { Title = "Hot Rocks, 1964-1971 (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Houses Of The Holy", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "How To Dismantle An Atomic Bomb", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Human", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Projected"], AlbumArtUrl = imgUrl }, - new Album { Title = "Hunky Dory", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Bowie"], AlbumArtUrl = imgUrl }, - new Album { Title = "Hymns", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Projected"], AlbumArtUrl = imgUrl }, - new Album { Title = "Hysteria", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Def Leppard"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Absentia", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Porcupine Tree"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Between", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Paul Van Dyk"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Rainbows", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Radiohead"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Step", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Stevie Ray Vaughan & Double Trouble"], AlbumArtUrl = imgUrl }, - new Album { Title = "In the court of the Crimson King", Genre = genres["Rock"], Price = 8.99M, Artist = artists["King Crimson"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Through The Out Door", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Your Honor [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Your Honor [Disc 2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl }, - new Album { Title = "Indestructible", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rancid"], AlbumArtUrl = imgUrl }, - new Album { Title = "Infinity", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Journey"], AlbumArtUrl = imgUrl }, - new Album { Title = "Into The Light", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Coverdale"], AlbumArtUrl = imgUrl }, - new Album { Title = "Introspective", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Pet Shop Boys"], AlbumArtUrl = imgUrl }, - new Album { Title = "Iron Maiden", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "ISAM", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Amon Tobin"], AlbumArtUrl = imgUrl }, - new Album { Title = "IV", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Jagged Little Pill", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Alanis Morissette"], AlbumArtUrl = imgUrl }, - new Album { Title = "Jagged Little Pill", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alanis Morissette"], AlbumArtUrl = imgUrl }, - new Album { Title = "Jorge Ben Jor 25 Anos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Jorge Ben"], AlbumArtUrl = imgUrl }, - new Album { Title = "Jota Quest-1995", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Jota Quest"], AlbumArtUrl = imgUrl }, - new Album { Title = "Kick", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["INXS"], AlbumArtUrl = imgUrl }, - new Album { Title = "Kill 'Em All", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Kind of Blue", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl }, - new Album { Title = "King For A Day Fool For A Lifetime", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Faith No More"], AlbumArtUrl = imgUrl }, - new Album { Title = "Kiss", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Carly Rae Jepsen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Last Call", Genre = genres["Country"], Price = 8.99M, Artist = artists["Cayouche"], AlbumArtUrl = imgUrl }, - new Album { Title = "Le Freak", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Chic"], AlbumArtUrl = imgUrl }, - new Album { Title = "Le Tigre", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Le Tigre"], AlbumArtUrl = imgUrl }, - new Album { Title = "Led Zeppelin I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Led Zeppelin II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Led Zeppelin III", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Let There Be Rock", Genre = genres["Rock"], Price = 8.99M, Artist = artists["AC/DC"], AlbumArtUrl = imgUrl }, - new Album { Title = "Little Earthquakes", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Tori Amos"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live [Disc 1]", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live [Disc 2]", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live After Death", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live At Donington 1992 (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live At Donington 1992 (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live on Earth", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["The Cat Empire"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live On Two Legs [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl }, - new Album { Title = "Living After Midnight", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Judas Priest"], AlbumArtUrl = imgUrl }, - new Album { Title = "Living", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paddy Casey"], AlbumArtUrl = imgUrl }, - new Album { Title = "Load", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Love Changes Everything", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "MacArthur Park Suite", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Donna Summer"], AlbumArtUrl = imgUrl }, - new Album { Title = "Machine Head", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Magical Mystery Tour", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mais Do Mesmo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Legião Urbana"], AlbumArtUrl = imgUrl }, - new Album { Title = "Maquinarama", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Skank"], AlbumArtUrl = imgUrl }, - new Album { Title = "Marasim", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Jagjit Singh"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mascagni: Cavalleria Rusticana", Genre = genres["Classical"], Price = 8.99M, Artist = artists["James Levine"], AlbumArtUrl = imgUrl }, - new Album { Title = "Master of Puppets", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mechanics & Mathematics", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Venus Hum"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mental Jewelry", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Live"], AlbumArtUrl = imgUrl }, - new Album { Title = "Metallics", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "meteora", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Linkin Park"], AlbumArtUrl = imgUrl }, - new Album { Title = "Meus Momentos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Gonzaguinha"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mezmerize", Genre = genres["Metal"], Price = 8.99M, Artist = artists["System Of A Down"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mezzanine", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Massive Attack"], AlbumArtUrl = imgUrl }, - new Album { Title = "Miles Ahead", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl }, - new Album { Title = "Milton Nascimento Ao Vivo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Milton Nascimento"], AlbumArtUrl = imgUrl }, - new Album { Title = "Minas", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Milton Nascimento"], AlbumArtUrl = imgUrl }, - new Album { Title = "Minha Historia", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Buarque"], AlbumArtUrl = imgUrl }, - new Album { Title = "Misplaced Childhood", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Marillion"], AlbumArtUrl = imgUrl }, - new Album { Title = "MK III The Final Concerts [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Morning Dance", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Spyro Gyra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Motley Crue Greatest Hits", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Mötley Crüe"], AlbumArtUrl = imgUrl }, - new Album { Title = "Moving Pictures", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rush"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mozart: Chamber Music", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Nash Ensemble"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mozart: Symphonies Nos. 40 & 41", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Berliner Philharmoniker"], AlbumArtUrl = imgUrl }, - new Album { Title = "Murder Ballads", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Nick Cave and the Bad Seeds"], AlbumArtUrl = imgUrl }, - new Album { Title = "Music For The Jilted Generation", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["The Prodigy"], AlbumArtUrl = imgUrl }, - new Album { Title = "My Generation - The Very Best Of The Who", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Who"], AlbumArtUrl = imgUrl }, - new Album { Title = "My Name is Skrillex", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Skrillex"], AlbumArtUrl = imgUrl }, - new Album { Title = "Na Pista", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cláudio Zoli"], AlbumArtUrl = imgUrl }, - new Album { Title = "Nevermind", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Nirvana"], AlbumArtUrl = imgUrl }, - new Album { Title = "New Adventures In Hi-Fi", Genre = genres["Rock"], Price = 8.99M, Artist = artists["R.E.M."], AlbumArtUrl = imgUrl }, - new Album { Title = "New Divide", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Linkin Park"], AlbumArtUrl = imgUrl }, - new Album { Title = "New York Dolls", Genre = genres["Punk"], Price = 8.99M, Artist = artists["New York Dolls"], AlbumArtUrl = imgUrl }, - new Album { Title = "News Of The World", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Nielsen: The Six Symphonies", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Göteborgs Symfoniker & Neeme Järvi"], AlbumArtUrl = imgUrl }, - new Album { Title = "Night At The Opera", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Night Castle", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Trans-Siberian Orchestra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Nkolo", Genre = genres["World"], Price = 8.99M, Artist = artists["Lokua Kanza"], AlbumArtUrl = imgUrl }, - new Album { Title = "No More Tears (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "No Prayer For The Dying", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "No Security", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl }, - new Album { Title = "O Brother, Where Art Thou?", Genre = genres["Country"], Price = 8.99M, Artist = artists["Alison Krauss"], AlbumArtUrl = imgUrl }, - new Album { Title = "O Samba Poconé", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Skank"], AlbumArtUrl = imgUrl }, - new Album { Title = "O(+>", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Prince"], AlbumArtUrl = imgUrl }, - new Album { Title = "Oceania", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Smashing Pumpkins"], AlbumArtUrl = imgUrl }, - new Album { Title = "Off the Deep End", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Weird Al"], AlbumArtUrl = imgUrl }, - new Album { Title = "OK Computer", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Radiohead"], AlbumArtUrl = imgUrl }, - new Album { Title = "Olodum", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Olodum"], AlbumArtUrl = imgUrl }, - new Album { Title = "One Love", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["David Guetta"], AlbumArtUrl = imgUrl }, - new Album { Title = "Operation: Mindcrime", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Queensrÿche"], AlbumArtUrl = imgUrl }, - new Album { Title = "Opiate", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl }, - new Album { Title = "Outbreak", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Dennis Chambers"], AlbumArtUrl = imgUrl }, - new Album { Title = "Pachelbel: Canon & Gigue", Genre = genres["Classical"], Price = 8.99M, Artist = artists["English Concert & Trevor Pinnock"], AlbumArtUrl = imgUrl }, - new Album { Title = "Paid in Full", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Eric B. and Rakim"], AlbumArtUrl = imgUrl }, - new Album { Title = "Para Siempre", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Vicente Fernandez"], AlbumArtUrl = imgUrl }, - new Album { Title = "Pause", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Four Tet"], AlbumArtUrl = imgUrl }, - new Album { Title = "Peace Sells... but Who's Buying", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Megadeth"], AlbumArtUrl = imgUrl }, - new Album { Title = "Physical Graffiti [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Physical Graffiti [Disc 2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Physical Graffiti", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Piece Of Mind", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Pinkerton", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Weezer"], AlbumArtUrl = imgUrl }, - new Album { Title = "Plays Metallica By Four Cellos", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Apocalyptica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Pop", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Powerslave", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Prenda Minha", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Caetano Veloso"], AlbumArtUrl = imgUrl }, - new Album { Title = "Presence", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Pretty Hate Machine", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Nine Inch Nails"], AlbumArtUrl = imgUrl }, - new Album { Title = "Prisoner", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Jezabels"], AlbumArtUrl = imgUrl }, - new Album { Title = "Privateering", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Mark Knopfler"], AlbumArtUrl = imgUrl }, - new Album { Title = "Prokofiev: Romeo & Juliet", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Michael Tilson Thomas"], AlbumArtUrl = imgUrl }, - new Album { Title = "Prokofiev: Symphony No.1", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sergei Prokofiev & Yuri Temirkanov"], AlbumArtUrl = imgUrl }, - new Album { Title = "PSY's Best 6th Part 1", Genre = genres["Pop"], Price = 8.99M, Artist = artists["PSY"], AlbumArtUrl = imgUrl }, - new Album { Title = "Purcell: The Fairy Queen", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Classical Players"], AlbumArtUrl = imgUrl }, - new Album { Title = "Purpendicular", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Purple", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Stone Temple Pilots"], AlbumArtUrl = imgUrl }, - new Album { Title = "Quanta Gente Veio Ver (Live)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Gilberto Gil"], AlbumArtUrl = imgUrl }, - new Album { Title = "Quanta Gente Veio ver--Bônus De Carnaval", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Gilberto Gil"], AlbumArtUrl = imgUrl }, - new Album { Title = "Quiet Songs", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Aisha Duo"], AlbumArtUrl = imgUrl }, - new Album { Title = "Raices", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Los Tigres del Norte"], AlbumArtUrl = imgUrl }, - new Album { Title = "Raising Hell", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Run DMC"], AlbumArtUrl = imgUrl }, - new Album { Title = "Raoul and the Kings of Spain ", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tears For Fears"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rattle And Hum", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Raul Seixas", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Raul Seixas"], AlbumArtUrl = imgUrl }, - new Album { Title = "Recovery [Explicit]", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Eminem"], AlbumArtUrl = imgUrl }, - new Album { Title = "Reign In Blood", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Slayer"], AlbumArtUrl = imgUrl }, - new Album { Title = "Relayed", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Yes"], AlbumArtUrl = imgUrl }, - new Album { Title = "ReLoad", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Respighi:Pines of Rome", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Eugene Ormandy"], AlbumArtUrl = imgUrl }, - new Album { Title = "Restless and Wild", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Accept"], AlbumArtUrl = imgUrl }, - new Album { Title = "Retrospective I (1974-1980)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rush"], AlbumArtUrl = imgUrl }, - new Album { Title = "Revelations", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Audioslave"], AlbumArtUrl = imgUrl }, - new Album { Title = "Revolver", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ride the Lighting ", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ride The Lightning", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ring My Bell", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Anita Ward"], AlbumArtUrl = imgUrl }, - new Album { Title = "Riot Act", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rise of the Phoenix", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Before the Dawn"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rock In Rio [CD1]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rock In Rio [CD2]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rock In Rio [CD2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Roda De Funk", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Funk Como Le Gusta"], AlbumArtUrl = imgUrl }, - new Album { Title = "Room for Squares", Genre = genres["Pop"], Price = 8.99M, Artist = artists["John Mayer"], AlbumArtUrl = imgUrl }, - new Album { Title = "Root Down", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Jimmy Smith"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rounds", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Four Tet"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rubber Factory", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Black Keys"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rust in Peace", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Megadeth"], AlbumArtUrl = imgUrl }, - new Album { Title = "Sambas De Enredo 2001", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl }, - new Album { Title = "Santana - As Years Go By", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl }, - new Album { Title = "Santana Live", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl }, - new Album { Title = "Saturday Night Fever", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Bee Gees"], AlbumArtUrl = imgUrl }, - new Album { Title = "Scary Monsters and Nice Sprites", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Skrillex"], AlbumArtUrl = imgUrl }, - new Album { Title = "Scheherazade", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Chicago Symphony Orchestra & Fritz Reiner"], AlbumArtUrl = imgUrl }, - new Album { Title = "SCRIABIN: Vers la flamme", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Christopher O'Riley"], AlbumArtUrl = imgUrl }, - new Album { Title = "Second Coming", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Stone Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "Serie Sem Limite (Disc 1)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Tim Maia"], AlbumArtUrl = imgUrl }, - new Album { Title = "Serie Sem Limite (Disc 2)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Tim Maia"], AlbumArtUrl = imgUrl }, - new Album { Title = "Serious About Men", Genre = genres["Rap"], Price = 8.99M, Artist = artists["The Rubberbandits"], AlbumArtUrl = imgUrl }, - new Album { Title = "Seventh Son of a Seventh Son", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Short Bus", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Filter"], AlbumArtUrl = imgUrl }, - new Album { Title = "Sibelius: Finlandia", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Berliner Philharmoniker"], AlbumArtUrl = imgUrl }, - new Album { Title = "Singles Collection", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Bowie"], AlbumArtUrl = imgUrl }, - new Album { Title = "Six Degrees of Inner Turbulence", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Dream Theater"], AlbumArtUrl = imgUrl }, - new Album { Title = "Slave To The Empire", Genre = genres["Metal"], Price = 8.99M, Artist = artists["T&N"], AlbumArtUrl = imgUrl }, - new Album { Title = "Slaves And Masters", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Slouching Towards Bethlehem", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Robert James"], AlbumArtUrl = imgUrl }, - new Album { Title = "Smash", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Offspring"], AlbumArtUrl = imgUrl }, - new Album { Title = "Something Special", Genre = genres["Country"], Price = 8.99M, Artist = artists["Dolly Parton"], AlbumArtUrl = imgUrl }, - new Album { Title = "Somewhere in Time", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Song(s) You Know By Heart", Genre = genres["Country"], Price = 8.99M, Artist = artists["Jimmy Buffett"], AlbumArtUrl = imgUrl }, - new Album { Title = "Sound of Music", Genre = genres["Punk"], Price = 8.99M, Artist = artists["Adicts"], AlbumArtUrl = imgUrl }, - new Album { Title = "South American Getaway", Genre = genres["Classical"], Price = 8.99M, Artist = artists["The 12 Cellists of The Berlin Philharmonic"], AlbumArtUrl = imgUrl }, - new Album { Title = "Sozinho Remix Ao Vivo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Caetano Veloso"], AlbumArtUrl = imgUrl }, - new Album { Title = "Speak of the Devil", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Spiritual State", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Nujabes"], AlbumArtUrl = imgUrl }, - new Album { Title = "St. Anger", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Still Life", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Opeth"], AlbumArtUrl = imgUrl }, - new Album { Title = "Stop Making Sense", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Talking Heads"], AlbumArtUrl = imgUrl }, - new Album { Title = "Stormbringer", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Stranger than Fiction", Genre = genres["Punk"], Price = 8.99M, Artist = artists["Bad Religion"], AlbumArtUrl = imgUrl }, - new Album { Title = "Strauss: Waltzes", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Eugene Ormandy"], AlbumArtUrl = imgUrl }, - new Album { Title = "Supermodified", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Amon Tobin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Supernatural", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl }, - new Album { Title = "Surfing with the Alien (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Joe Satriani"], AlbumArtUrl = imgUrl }, - new Album { Title = "Switched-On Bach", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Wendy Carlos"], AlbumArtUrl = imgUrl }, - new Album { Title = "Symphony", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Szymanowski: Piano Works, Vol. 1", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Martin Roscoe"], AlbumArtUrl = imgUrl }, - new Album { Title = "Tchaikovsky: The Nutcracker", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Symphony Orchestra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ted Nugent", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ted Nugent"], AlbumArtUrl = imgUrl }, - new Album { Title = "Teflon Don", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Rick Ross"], AlbumArtUrl = imgUrl }, - new Album { Title = "Tell Another Joke at the Ol' Choppin' Block", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Danielson Famile"], AlbumArtUrl = imgUrl }, - new Album { Title = "Temple of the Dog", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Temple of the Dog"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ten", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl }, - new Album { Title = "Texas Flood", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Stevie Ray Vaughan"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Battle Rages On", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Beast Live", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paul D'Ianno"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best Of 1980-1990", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best of 1990–2000", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best of Beethoven", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Nicolaus Esterhazy Sinfonia"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best Of Billy Cobham", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Billy Cobham"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best of Ed Motta", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Ed Motta"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best Of Van Halen, Vol. I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Bridge", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Melanie Fiona"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Cage", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tygers of Pan Tang"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Chicago Transit Authority", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Chicago "], AlbumArtUrl = imgUrl }, - new Album { Title = "The Chronic", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Dr. Dre"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Colour And The Shape", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Crane Wife", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["The Decemberists"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Cream Of Clapton", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Cure", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Cure"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Dark Side Of The Moon", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Divine Conspiracy", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Epica"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Doors", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Doors"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Dream of the Blue Turtles", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Sting"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Essential Miles Davis [Disc 1]", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Essential Miles Davis [Disc 2]", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Final Concerts (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Final Frontier", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Head and the Heart", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Head and the Heart"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Joshua Tree", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Last Night of the Proms", Genre = genres["Classical"], Price = 8.99M, Artist = artists["BBC Concert Orchestra"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Lumineers", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Lumineers"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Number of The Beast", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Number of The Beast", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Police Greatest Hits", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Police"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Song Remains The Same (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Song Remains The Same (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Southern Harmony and Musical Companion", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Spade", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Butch Walker & The Black Widows"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Stone Roses", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Stone Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Suburbs", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Arcade Fire"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Three Tenors Disc1/Disc2", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Carreras, Pavarotti, Domingo"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Trees They Grow So High", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Wall", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl }, - new Album { Title = "The X Factor", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Them Crooked Vultures", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Them Crooked Vultures"], AlbumArtUrl = imgUrl }, - new Album { Title = "This Is Happening", Genre = genres["Rock"], Price = 8.99M, Artist = artists["LCD Soundsystem"], AlbumArtUrl = imgUrl }, - new Album { Title = "Thunder, Lightning, Strike", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Go! Team"], AlbumArtUrl = imgUrl }, - new Album { Title = "Time to Say Goodbye", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Time, Love & Tenderness", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Michael Bolton"], AlbumArtUrl = imgUrl }, - new Album { Title = "Tomorrow Starts Today", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Mobile"], AlbumArtUrl = imgUrl }, - new Album { Title = "Tribute", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Tuesday Night Music Club", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Sheryl Crow"], AlbumArtUrl = imgUrl }, - new Album { Title = "Umoja", Genre = genres["Rock"], Price = 8.99M, Artist = artists["BLØF"], AlbumArtUrl = imgUrl }, - new Album { Title = "Under the Pink", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Tori Amos"], AlbumArtUrl = imgUrl }, - new Album { Title = "Undertow", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl }, - new Album { Title = "Un-Led-Ed", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Dread Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Unplugged [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Kiss"], AlbumArtUrl = imgUrl }, - new Album { Title = "Unplugged", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl }, - new Album { Title = "Unplugged", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl }, - new Album { Title = "Untrue", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Burial"], AlbumArtUrl = imgUrl }, - new Album { Title = "Use Your Illusion I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "Use Your Illusion II", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "Use Your Illusion II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "Van Halen III", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Van Halen", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Version 2.0", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Garbage"], AlbumArtUrl = imgUrl }, - new Album { Title = "Vinicius De Moraes", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Vinícius De Moraes"], AlbumArtUrl = imgUrl }, - new Album { Title = "Virtual XI", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Voodoo Lounge", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Vozes do MPB", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl }, - new Album { Title = "Vs.", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl }, - new Album { Title = "Wagner: Favourite Overtures", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sir Georg Solti & Wiener Philharmoniker"], AlbumArtUrl = imgUrl }, - new Album { Title = "Walking Into Clarksdale", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Page & Plant"], AlbumArtUrl = imgUrl }, - new Album { Title = "Wapi Yo", Genre = genres["World"], Price = 8.99M, Artist = artists["Lokua Kanza"], AlbumArtUrl = imgUrl }, - new Album { Title = "War", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Warner 25 Anos", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Antônio Carlos Jobim"], AlbumArtUrl = imgUrl }, - new Album { Title = "Wasteland R&Btheque", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Raunchy"], AlbumArtUrl = imgUrl }, - new Album { Title = "Watermark", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Enya"], AlbumArtUrl = imgUrl }, - new Album { Title = "We Were Exploding Anyway", Genre = genres["Rock"], Price = 8.99M, Artist = artists["65daysofstatic"], AlbumArtUrl = imgUrl }, - new Album { Title = "Weill: The Seven Deadly Sins", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Orchestre de l'Opéra de Lyon"], AlbumArtUrl = imgUrl }, - new Album { Title = "White Pony", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deftones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Who's Next", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Who"], AlbumArtUrl = imgUrl }, - new Album { Title = "Wish You Were Here", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl }, - new Album { Title = "With Oden on Our Side", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Amon Amarth"], AlbumArtUrl = imgUrl }, - new Album { Title = "Worlds", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Aaron Goldberg"], AlbumArtUrl = imgUrl }, - new Album { Title = "Worship Music", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Anthrax"], AlbumArtUrl = imgUrl }, - new Album { Title = "X&Y", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Coldplay"], AlbumArtUrl = imgUrl }, - new Album { Title = "Xinti", Genre = genres["World"], Price = 8.99M, Artist = artists["Sara Tavares"], AlbumArtUrl = imgUrl }, - new Album { Title = "Yano", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Yano"], AlbumArtUrl = imgUrl }, - new Album { Title = "Yesterday Once More Disc 1/Disc 2", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Carpenters"], AlbumArtUrl = imgUrl }, - new Album { Title = "Zooropa", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Zoso", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - }; - - foreach (var album in albums) - { - album.ArtistId = album.Artist.ArtistId; - album.GenreId = album.Genre.GenreId; - } - - return albums; - } - - private static Dictionary artists; - public static Dictionary Artists - { - get - { - if (artists == null) - { - var artistsList = new Artist[] - { - new Artist { Name = "65daysofstatic" }, - new Artist { Name = "Aaron Goldberg" }, - new Artist { Name = "Above & Beyond" }, - new Artist { Name = "Above the Fold" }, - new Artist { Name = "AC/DC" }, - new Artist { Name = "Accept" }, - new Artist { Name = "Adicts" }, - new Artist { Name = "Adrian Leaper & Doreen de Feis" }, - new Artist { Name = "Aerosmith" }, - new Artist { Name = "Aisha Duo" }, - new Artist { Name = "Al di Meola" }, - new Artist { Name = "Alabama Shakes" }, - new Artist { Name = "Alanis Morissette" }, - new Artist { Name = "Alberto Turco & Nova Schola Gregoriana" }, - new Artist { Name = "Alice in Chains" }, - new Artist { Name = "Alison Krauss" }, - new Artist { Name = "Amon Amarth" }, - new Artist { Name = "Amon Tobin" }, - new Artist { Name = "Amr Diab" }, - new Artist { Name = "Amy Winehouse" }, - new Artist { Name = "Anita Ward" }, - new Artist { Name = "Anthrax" }, - new Artist { Name = "Antônio Carlos Jobim" }, - new Artist { Name = "Apocalyptica" }, - new Artist { Name = "Aqua" }, - new Artist { Name = "Armand Van Helden" }, - new Artist { Name = "Arcade Fire" }, - new Artist { Name = "Audioslave" }, - new Artist { Name = "Bad Religion" }, - new Artist { Name = "Barenaked Ladies" }, - new Artist { Name = "BBC Concert Orchestra" }, - new Artist { Name = "Bee Gees" }, - new Artist { Name = "Before the Dawn" }, - new Artist { Name = "Berliner Philharmoniker" }, - new Artist { Name = "Billy Cobham" }, - new Artist { Name = "Black Label Society" }, - new Artist { Name = "Black Sabbath" }, - new Artist { Name = "BLØF" }, - new Artist { Name = "Blues Traveler" }, - new Artist { Name = "Boston Symphony Orchestra & Seiji Ozawa" }, - new Artist { Name = "Britten Sinfonia, Ivor Bolton & Lesley Garrett" }, - new Artist { Name = "Bruce Dickinson" }, - new Artist { Name = "Buddy Guy" }, - new Artist { Name = "Burial" }, - new Artist { Name = "Butch Walker & The Black Widows" }, - new Artist { Name = "Caetano Veloso" }, - new Artist { Name = "Cake" }, - new Artist { Name = "Calexico" }, - new Artist { Name = "Carly Rae Jepsen" }, - new Artist { Name = "Carreras, Pavarotti, Domingo" }, - new Artist { Name = "Cássia Eller" }, - new Artist { Name = "Cayouche" }, - new Artist { Name = "Chic" }, - new Artist { Name = "Chicago " }, - new Artist { Name = "Chicago Symphony Orchestra & Fritz Reiner" }, - new Artist { Name = "Chico Buarque" }, - new Artist { Name = "Chico Science & Nação Zumbi" }, - new Artist { Name = "Choir Of Westminster Abbey & Simon Preston" }, - new Artist { Name = "Chris Cornell" }, - new Artist { Name = "Christopher O'Riley" }, - new Artist { Name = "Cidade Negra" }, - new Artist { Name = "Cláudio Zoli" }, - new Artist { Name = "Coldplay" }, - new Artist { Name = "Creedence Clearwater Revival" }, - new Artist { Name = "Crosby, Stills, Nash, and Young" }, - new Artist { Name = "Daft Punk" }, - new Artist { Name = "Danielson Famile" }, - new Artist { Name = "David Bowie" }, - new Artist { Name = "David Coverdale" }, - new Artist { Name = "David Guetta" }, - new Artist { Name = "deadmau5" }, - new Artist { Name = "Deep Purple" }, - new Artist { Name = "Def Leppard" }, - new Artist { Name = "Deftones" }, - new Artist { Name = "Dennis Chambers" }, - new Artist { Name = "Deva Premal" }, - new Artist { Name = "Dio" }, - new Artist { Name = "Djavan" }, - new Artist { Name = "Dolly Parton" }, - new Artist { Name = "Donna Summer" }, - new Artist { Name = "Dr. Dre" }, - new Artist { Name = "Dread Zeppelin" }, - new Artist { Name = "Dream Theater" }, - new Artist { Name = "Duck Sauce" }, - new Artist { Name = "Earl Scruggs" }, - new Artist { Name = "Ed Motta" }, - new Artist { Name = "Edo de Waart & San Francisco Symphony" }, - new Artist { Name = "Elis Regina" }, - new Artist { Name = "Eminem" }, - new Artist { Name = "English Concert & Trevor Pinnock" }, - new Artist { Name = "Enya" }, - new Artist { Name = "Epica" }, - new Artist { Name = "Eric B. and Rakim" }, - new Artist { Name = "Eric Clapton" }, - new Artist { Name = "Eugene Ormandy" }, - new Artist { Name = "Faith No More" }, - new Artist { Name = "Falamansa" }, - new Artist { Name = "Filter" }, - new Artist { Name = "Foo Fighters" }, - new Artist { Name = "Four Tet" }, - new Artist { Name = "Frank Zappa & Captain Beefheart" }, - new Artist { Name = "Fretwork" }, - new Artist { Name = "Funk Como Le Gusta" }, - new Artist { Name = "Garbage" }, - new Artist { Name = "Gerald Moore" }, - new Artist { Name = "Gilberto Gil" }, - new Artist { Name = "Godsmack" }, - new Artist { Name = "Gonzaguinha" }, - new Artist { Name = "Göteborgs Symfoniker & Neeme Järvi" }, - new Artist { Name = "Guns N' Roses" }, - new Artist { Name = "Gustav Mahler" }, - new Artist { Name = "In This Moment" }, - new Artist { Name = "Incognito" }, - new Artist { Name = "INXS" }, - new Artist { Name = "Iron Maiden" }, - new Artist { Name = "Jagjit Singh" }, - new Artist { Name = "James Levine" }, - new Artist { Name = "Jamiroquai" }, - new Artist { Name = "Jimi Hendrix" }, - new Artist { Name = "Jimmy Buffett" }, - new Artist { Name = "Jimmy Smith" }, - new Artist { Name = "Joe Satriani" }, - new Artist { Name = "John Digweed" }, - new Artist { Name = "John Mayer" }, - new Artist { Name = "Jorge Ben" }, - new Artist { Name = "Jota Quest" }, - new Artist { Name = "Journey" }, - new Artist { Name = "Judas Priest" }, - new Artist { Name = "Julian Bream" }, - new Artist { Name = "Justice" }, - new Artist { Name = "Orchestre de l'Opéra de Lyon" }, - new Artist { Name = "King Crimson" }, - new Artist { Name = "Kiss" }, - new Artist { Name = "LCD Soundsystem" }, - new Artist { Name = "Le Tigre" }, - new Artist { Name = "Led Zeppelin" }, - new Artist { Name = "Legião Urbana" }, - new Artist { Name = "Lenny Kravitz" }, - new Artist { Name = "Les Arts Florissants & William Christie" }, - new Artist { Name = "Limp Bizkit" }, - new Artist { Name = "Linkin Park" }, - new Artist { Name = "Live" }, - new Artist { Name = "Lokua Kanza" }, - new Artist { Name = "London Symphony Orchestra" }, - new Artist { Name = "Los Tigres del Norte" }, - new Artist { Name = "Luciana Souza/Romero Lubambo" }, - new Artist { Name = "Lulu Santos" }, - new Artist { Name = "Lura" }, - new Artist { Name = "Marcos Valle" }, - new Artist { Name = "Marillion" }, - new Artist { Name = "Marisa Monte" }, - new Artist { Name = "Mark Knopfler" }, - new Artist { Name = "Martin Roscoe" }, - new Artist { Name = "Massive Attack" }, - new Artist { Name = "Maurizio Pollini" }, - new Artist { Name = "Megadeth" }, - new Artist { Name = "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" }, - new Artist { Name = "Melanie Fiona" }, - new Artist { Name = "Men At Work" }, - new Artist { Name = "Metallica" }, - new Artist { Name = "M-Flo" }, - new Artist { Name = "Michael Bolton" }, - new Artist { Name = "Michael Tilson Thomas" }, - new Artist { Name = "Miles Davis" }, - new Artist { Name = "Milton Nascimento" }, - new Artist { Name = "Mobile" }, - new Artist { Name = "Modest Mouse" }, - new Artist { Name = "Mötley Crüe" }, - new Artist { Name = "Motörhead" }, - new Artist { Name = "Mumford & Sons" }, - new Artist { Name = "Munkle" }, - new Artist { Name = "Nash Ensemble" }, - new Artist { Name = "Neil Young" }, - new Artist { Name = "New York Dolls" }, - new Artist { Name = "Nick Cave and the Bad Seeds" }, - new Artist { Name = "Nicolaus Esterhazy Sinfonia" }, - new Artist { Name = "Nine Inch Nails" }, - new Artist { Name = "Nirvana" }, - new Artist { Name = "Norah Jones" }, - new Artist { Name = "Nujabes" }, - new Artist { Name = "O Terço" }, - new Artist { Name = "Oasis" }, - new Artist { Name = "Olodum" }, - new Artist { Name = "Opeth" }, - new Artist { Name = "Orchestra of The Age of Enlightenment" }, - new Artist { Name = "Os Paralamas Do Sucesso" }, - new Artist { Name = "Ozzy Osbourne" }, - new Artist { Name = "Paddy Casey" }, - new Artist { Name = "Page & Plant" }, - new Artist { Name = "Papa Wemba" }, - new Artist { Name = "Paul D'Ianno" }, - new Artist { Name = "Paul Oakenfold" }, - new Artist { Name = "Paul Van Dyk" }, - new Artist { Name = "Pearl Jam" }, - new Artist { Name = "Pet Shop Boys" }, - new Artist { Name = "Pink Floyd" }, - new Artist { Name = "Plug" }, - new Artist { Name = "Porcupine Tree" }, - new Artist { Name = "Portishead" }, - new Artist { Name = "Prince" }, - new Artist { Name = "Projected" }, - new Artist { Name = "PSY" }, - new Artist { Name = "Public Enemy" }, - new Artist { Name = "Queen" }, - new Artist { Name = "Queensrÿche" }, - new Artist { Name = "R.E.M." }, - new Artist { Name = "Radiohead" }, - new Artist { Name = "Rancid" }, - new Artist { Name = "Raul Seixas" }, - new Artist { Name = "Raunchy" }, - new Artist { Name = "Red Hot Chili Peppers" }, - new Artist { Name = "Rick Ross" }, - new Artist { Name = "Robert James" }, - new Artist { Name = "London Classical Players" }, - new Artist { Name = "Royal Philharmonic Orchestra" }, - new Artist { Name = "Run DMC" }, - new Artist { Name = "Rush" }, - new Artist { Name = "Santana" }, - new Artist { Name = "Sara Tavares" }, - new Artist { Name = "Sarah Brightman" }, - new Artist { Name = "Sasha" }, - new Artist { Name = "Scholars Baroque Ensemble" }, - new Artist { Name = "Scorpions" }, - new Artist { Name = "Sergei Prokofiev & Yuri Temirkanov" }, - new Artist { Name = "Sheryl Crow" }, - new Artist { Name = "Sir Georg Solti & Wiener Philharmoniker" }, - new Artist { Name = "Skank" }, - new Artist { Name = "Skrillex" }, - new Artist { Name = "Slash" }, - new Artist { Name = "Slayer" }, - new Artist { Name = "Soul-Junk" }, - new Artist { Name = "Soundgarden" }, - new Artist { Name = "Spyro Gyra" }, - new Artist { Name = "Stevie Ray Vaughan & Double Trouble" }, - new Artist { Name = "Stevie Ray Vaughan" }, - new Artist { Name = "Sting" }, - new Artist { Name = "Stone Temple Pilots" }, - new Artist { Name = "Styx" }, - new Artist { Name = "Sufjan Stevens" }, - new Artist { Name = "Supreme Beings of Leisure" }, - new Artist { Name = "System Of A Down" }, - new Artist { Name = "T&N" }, - new Artist { Name = "Talking Heads" }, - new Artist { Name = "Tears For Fears" }, - new Artist { Name = "Ted Nugent" }, - new Artist { Name = "Temple of the Dog" }, - new Artist { Name = "Terry Bozzio, Tony Levin & Steve Stevens" }, - new Artist { Name = "The 12 Cellists of The Berlin Philharmonic" }, - new Artist { Name = "The Axis of Awesome" }, - new Artist { Name = "The Beatles" }, - new Artist { Name = "The Black Crowes" }, - new Artist { Name = "The Black Keys" }, - new Artist { Name = "The Carpenters" }, - new Artist { Name = "The Cat Empire" }, - new Artist { Name = "The Cult" }, - new Artist { Name = "The Cure" }, - new Artist { Name = "The Decemberists" }, - new Artist { Name = "The Doors" }, - new Artist { Name = "The Eagles of Death Metal" }, - new Artist { Name = "The Go! Team" }, - new Artist { Name = "The Head and the Heart" }, - new Artist { Name = "The Jezabels" }, - new Artist { Name = "The King's Singers" }, - new Artist { Name = "The Lumineers" }, - new Artist { Name = "The Offspring" }, - new Artist { Name = "The Police" }, - new Artist { Name = "The Posies" }, - new Artist { Name = "The Prodigy" }, - new Artist { Name = "The Rolling Stones" }, - new Artist { Name = "The Rubberbandits" }, - new Artist { Name = "The Smashing Pumpkins" }, - new Artist { Name = "The Stone Roses" }, - new Artist { Name = "The Who" }, - new Artist { Name = "Them Crooked Vultures" }, - new Artist { Name = "TheStart" }, - new Artist { Name = "Thievery Corporation" }, - new Artist { Name = "Tiësto" }, - new Artist { Name = "Tim Maia" }, - new Artist { Name = "Ton Koopman" }, - new Artist { Name = "Tool" }, - new Artist { Name = "Tori Amos" }, - new Artist { Name = "Trampled By Turtles" }, - new Artist { Name = "Trans-Siberian Orchestra" }, - new Artist { Name = "Tygers of Pan Tang" }, - new Artist { Name = "U2" }, - new Artist { Name = "UB40" }, - new Artist { Name = "Uh Huh Her " }, - new Artist { Name = "Van Halen" }, - new Artist { Name = "Various Artists" }, - new Artist { Name = "Velvet Revolver" }, - new Artist { Name = "Venus Hum" }, - new Artist { Name = "Vicente Fernandez" }, - new Artist { Name = "Vinícius De Moraes" }, - new Artist { Name = "Weezer" }, - new Artist { Name = "Weird Al" }, - new Artist { Name = "Wendy Carlos" }, - new Artist { Name = "Wilhelm Kempff" }, - new Artist { Name = "Yano" }, - new Artist { Name = "Yehudi Menuhin" }, - new Artist { Name = "Yes" }, - new Artist { Name = "Yo-Yo Ma" }, - new Artist { Name = "Zeca Pagodinho" }, - new Artist { Name = "אריק אינשטיין"} - }; - - // TODO [EF] Swap to store generated keys when available - int artistId = 1; - artists = new Dictionary(); - foreach (Artist artist in artistsList) - { - artist.ArtistId = artistId++; - artists.Add(artist.Name, artist); - } - } - - return artists; - } - } - - private static Dictionary genres; - public static Dictionary Genres - { - get - { - if (genres == null) - { - var genresList = new Genre[] - { - new Genre { Name = "Pop" }, - new Genre { Name = "Rock" }, - new Genre { Name = "Jazz" }, - new Genre { Name = "Metal" }, - new Genre { Name = "Electronic" }, - new Genre { Name = "Blues" }, - new Genre { Name = "Latin" }, - new Genre { Name = "Rap" }, - new Genre { Name = "Classical" }, - new Genre { Name = "Alternative" }, - new Genre { Name = "Country" }, - new Genre { Name = "R&B" }, - new Genre { Name = "Indie" }, - new Genre { Name = "Punk" }, - new Genre { Name = "World" } - }; - - genres = new Dictionary(); - // TODO [EF] Swap to store generated keys when available - int genreId = 1; - foreach (Genre genre in genresList) - { - genre.GenreId = genreId++; - - // TODO [EF] Remove when null values are supported by update pipeline - genre.Description = genre.Name + " is great music (if you like it)."; - - genres.Add(genre.Name, genre); - } - } - - return genres; - } - } - } -} diff --git a/samples/angular/MusicStore/Apis/Models/SentimentAnalysis.cs b/samples/angular/MusicStore/Apis/Models/SentimentAnalysis.cs deleted file mode 100644 index 8167ec3d..00000000 --- a/samples/angular/MusicStore/Apis/Models/SentimentAnalysis.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Linq; -using System.Text.RegularExpressions; - -namespace MusicStore.Models -{ - // Obviously this is not a serious sentiment analyser. It is only here to provide an amusing demonstration of cross-property - // validation in AlbumsApiController. - public static class SentimentAnalysis - { - private static string[] positiveSentimentWords = new[] { "happy", "fun", "joy", "love", "delight", "bunny", "bunnies", "asp.net" }; - - private static string[] negativeSentimentWords = new[] { "sad", "pain", "despair", "hate", "scorn", "death", "package management" }; - - public static SentimentResult GetSentiment(string text) { - var numPositiveWords = CountWordOccurrences(text, positiveSentimentWords); - var numNegativeWords = CountWordOccurrences(text, negativeSentimentWords); - if (numPositiveWords > numNegativeWords) { - return SentimentResult.Positive; - } else if (numNegativeWords > numPositiveWords) { - return SentimentResult.Negative; - } else { - return SentimentResult.Neutral; - } - } - - private static int CountWordOccurrences(string text, string[] words) - { - // Very simplistic matching technique for this sample. Not scalable and not really even correct. - return new Regex(string.Join("|", words), RegexOptions.IgnoreCase).Matches(text).Count; - } - - public enum SentimentResult { - Negative, - Neutral, - Positive, - } - } -} diff --git a/samples/angular/MusicStore/Apis/Models/ShoppingCart.cs b/samples/angular/MusicStore/Apis/Models/ShoppingCart.cs deleted file mode 100644 index 1d2465ab..00000000 --- a/samples/angular/MusicStore/Apis/Models/ShoppingCart.cs +++ /dev/null @@ -1,207 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Linq; - -namespace MusicStore.Models -{ - public partial class ShoppingCart - { - MusicStoreContext _db; - string ShoppingCartId { get; set; } - - public ShoppingCart(MusicStoreContext db) - { - _db = db; - } - - public static ShoppingCart GetCart(MusicStoreContext db, HttpContext context) - { - var cart = new ShoppingCart(db); - cart.ShoppingCartId = cart.GetCartId(context); - return cart; - } - - public void AddToCart(Album album) - { - // Get the matching cart and album instances - var cartItem = _db.CartItems.SingleOrDefault( - c => c.CartId == ShoppingCartId - && c.AlbumId == album.AlbumId); - - if (cartItem == null) - { - // TODO [EF] Swap to store generated key once we support identity pattern - var nextCartItemId = _db.CartItems.Any() - ? _db.CartItems.Max(c => c.CartItemId) + 1 - : 1; - - // Create a new cart item if no cart item exists - cartItem = new CartItem - { - CartItemId = nextCartItemId, - AlbumId = album.AlbumId, - CartId = ShoppingCartId, - Count = 1, - DateCreated = DateTime.Now - }; - - _db.CartItems.Add(cartItem); - } - else - { - // If the item does exist in the cart, then add one to the quantity - cartItem.Count++; - - // TODO [EF] Remove this line once change detection is available - _db.Update(cartItem); - } - } - - public int RemoveFromCart(int id) - { - // Get the cart - var cartItem = _db.CartItems.Single( - cart => cart.CartId == ShoppingCartId - && cart.CartItemId == id); - - int itemCount = 0; - - if (cartItem != null) - { - if (cartItem.Count > 1) - { - cartItem.Count--; - - // TODO [EF] Remove this line once change detection is available - _db.Update(cartItem); - - itemCount = cartItem.Count; - } - else - { - _db.CartItems.Remove(cartItem); - } - } - - return itemCount; - } - - public void EmptyCart() - { - var cartItems = _db.CartItems.Where(cart => cart.CartId == ShoppingCartId); - - foreach (var cartItem in cartItems) - { - _db.Remove(cartItem); - } - } - - public List GetCartItems() - { - var cartItems = _db.CartItems.Where(cart => cart.CartId == ShoppingCartId).ToList(); - //TODO: Auto population of the related album data not available until EF feature is lighted up. - foreach (var cartItem in cartItems) - { - cartItem.Album = _db.Albums.Single(a => a.AlbumId == cartItem.AlbumId); - } - - return cartItems; - } - - public int GetCount() - { - // Get the count of each item in the cart and sum them up - int? count = (from cartItems in _db.CartItems - where cartItems.CartId == ShoppingCartId - select (int?)cartItems.Count).Sum(); - - // Return 0 if all entries are null - return count ?? 0; - } - - public decimal GetTotal() - { - // Multiply album price by count of that album to get - // the current price for each of those albums in the cart - // sum all album price totals to get the cart total - - // TODO Collapse to a single query once EF supports querying related data - decimal total = 0; - foreach (var item in _db.CartItems.Where(c => c.CartId == ShoppingCartId)) - { - var album = _db.Albums.Single(a => a.AlbumId == item.AlbumId); - total += item.Count * album.Price; - } - - return total; - } - - public int CreateOrder(Order order) - { - decimal orderTotal = 0; - - var cartItems = GetCartItems(); - - // TODO [EF] Swap to store generated identity key when supported - var nextId = _db.OrderDetails.Any() - ? _db.OrderDetails.Max(o => o.OrderDetailId) + 1 - : 1; - - // Iterate over the items in the cart, adding the order details for each - foreach (var item in cartItems) - { - //var album = _db.Albums.Find(item.AlbumId); - var album = _db.Albums.Single(a => a.AlbumId == item.AlbumId); - - var orderDetail = new OrderDetail - { - OrderDetailId = nextId, - AlbumId = item.AlbumId, - OrderId = order.OrderId, - UnitPrice = album.Price, - Quantity = item.Count, - }; - - // Set the order total of the shopping cart - orderTotal += (item.Count * album.Price); - - _db.OrderDetails.Add(orderDetail); - - nextId++; - } - - // Set the order's total to the orderTotal count - order.Total = orderTotal; - - // Empty the shopping cart - EmptyCart(); - - // Return the OrderId as the confirmation number - return order.OrderId; - } - - // We're using HttpContextBase to allow access to cookies. - public string GetCartId(HttpContext context) - { - var sessionCookie = context.Request.Cookies["Session"]; - string cartId = null; - - if (string.IsNullOrWhiteSpace(sessionCookie)) - { - //A GUID to hold the cartId. - cartId = Guid.NewGuid().ToString(); - - // Send cart Id as a cookie to the client. - context.Response.Cookies.Append("Session", cartId); - } - else - { - cartId = sessionCookie; - } - - return cartId; - } - } -} diff --git a/samples/angular/MusicStore/Controllers/HomeController.cs b/samples/angular/MusicStore/Controllers/HomeController.cs deleted file mode 100755 index 07e97022..00000000 --- a/samples/angular/MusicStore/Controllers/HomeController.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace MusicStore.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - - public IActionResult Error() - { - return View("~/Views/Shared/Error.cshtml"); - } - } -} diff --git a/samples/angular/MusicStore/Infrastructure/NoCacheAttribute.cs b/samples/angular/MusicStore/Infrastructure/NoCacheAttribute.cs deleted file mode 100644 index 856023a8..00000000 --- a/samples/angular/MusicStore/Infrastructure/NoCacheAttribute.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using System; -using Microsoft.AspNetCore.Mvc.Filters; - -namespace MusicStore.Infrastructure -{ - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] - public sealed class NoCacheAttribute : ActionFilterAttribute - { - public override void OnResultExecuting(ResultExecutingContext context) - { - context.HttpContext.Response.Headers["Cache-Control"] = "no-cache, no-store, max-age=0"; - context.HttpContext.Response.Headers["Pragma"] = "no-cache"; - context.HttpContext.Response.Headers["Expires"] = "-1"; - - base.OnResultExecuting(context); - } - } -} diff --git a/samples/angular/MusicStore/Infrastructure/PagedList.cs b/samples/angular/MusicStore/Infrastructure/PagedList.cs deleted file mode 100644 index b2cb2c57..00000000 --- a/samples/angular/MusicStore/Infrastructure/PagedList.cs +++ /dev/null @@ -1,150 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Threading.Tasks; - -namespace MusicStore.Infrastructure -{ - public interface IPagedList - { - IEnumerable Data { get; } - - int Page { get; } - - int PageSize { get; } - - int TotalCount { get; } - } - - internal class PagedList : IPagedList - { - public PagedList(IEnumerable data, int page, int pageSize, int totalCount) - { - Data = data; - Page = page; - PageSize = pageSize; - TotalCount = totalCount; - } - - public IEnumerable Data { get; private set; } - - public int Page { get; private set; } - - public int PageSize { get; private set; } - - public int TotalCount { get; private set; } - } - - public static class PagedListExtensions - { - public static IPagedList ToPagedList(this IQueryable query, int page, int pageSize) - { - if (query == null) - { - throw new ArgumentNullException("query"); - } - - var pagingConfig = new PagingConfig(page, pageSize); - var skipCount = ValidatePagePropertiesAndGetSkipCount(pagingConfig); - - var data = query - .Skip(skipCount) - .Take(pagingConfig.PageSize) - .ToList(); - - if (skipCount > 0 && data.Count == 0) - { - // Requested page has no records, just return the first page - pagingConfig.Page = 1; - data = query - .Take(pagingConfig.PageSize) - .ToList(); - } - - return new PagedList(data, pagingConfig.Page, pagingConfig.PageSize, query.Count()); - } - - public static Task> ToPagedListAsync(this IQueryable query, int page, int pageSize, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection = SortDirection.Ascending) - where TModel : class - { - return ToPagedListAsync(query, page, pageSize, sortExpression, defaultSortExpression, defaultSortDirection, null); - } - - public static async Task> ToPagedListAsync(this IQueryable query, int page, int pageSize, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection, Func selector) - where TModel : class - where TResult : class - { - if (query == null) - { - throw new ArgumentNullException("query"); - } - - var pagingConfig = new PagingConfig(page, pageSize); - var skipCount = ValidatePagePropertiesAndGetSkipCount(pagingConfig); - var dataQuery = query; - - if (defaultSortExpression != null) - { - dataQuery = dataQuery - .SortBy(sortExpression, defaultSortExpression); - } - - var data = await dataQuery - .Skip(skipCount) - .Take(pagingConfig.PageSize) - .ToListAsync(); - - if (skipCount > 0 && data.Count == 0) - { - // Requested page has no records, just return the first page - pagingConfig.Page = 1; - data = await dataQuery - .Take(pagingConfig.PageSize) - .ToListAsync(); - } - - var count = await query.CountAsync(); - - var resultData = selector != null - ? data.Select(selector) - : data.Cast(); - - return new PagedList(resultData, pagingConfig.Page, pagingConfig.PageSize, count); - } - - private static int ValidatePagePropertiesAndGetSkipCount(PagingConfig pagingConfig) - { - if (pagingConfig.Page < 1) - { - pagingConfig.Page = 1; - } - - if (pagingConfig.PageSize < 10) - { - pagingConfig.PageSize = 10; - } - - if (pagingConfig.PageSize > 100) - { - pagingConfig.PageSize = 100; - } - - return pagingConfig.PageSize * (pagingConfig.Page - 1); - } - - internal class PagingConfig - { - public PagingConfig(int page, int pageSize) - { - Page = page; - PageSize = pageSize; - } - - public int Page { get; set; } - - public int PageSize { get; set; } - } - } -} diff --git a/samples/angular/MusicStore/Infrastructure/SortDirection.cs b/samples/angular/MusicStore/Infrastructure/SortDirection.cs deleted file mode 100644 index 28f7e86c..00000000 --- a/samples/angular/MusicStore/Infrastructure/SortDirection.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace MusicStore.Infrastructure -{ - public enum SortDirection - { - Ascending, - Descending - } -} diff --git a/samples/angular/MusicStore/Infrastructure/SortExpression.cs b/samples/angular/MusicStore/Infrastructure/SortExpression.cs deleted file mode 100644 index 88ba312c..00000000 --- a/samples/angular/MusicStore/Infrastructure/SortExpression.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal; - -namespace MusicStore.Infrastructure -{ - public static class SortExpression - { - private const string SORT_DIRECTION_DESC = " DESC"; - - public static IQueryable SortBy(this IQueryable query, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection = SortDirection.Ascending) where TModel : class - { - return SortBy(query, sortExpression ?? Create(defaultSortExpression, defaultSortDirection)); - } - - public static string Create(Expression> expression, SortDirection sortDirection = SortDirection.Ascending) where TModel : class - { - var expressionText = ExpressionHelper.GetExpressionText(expression); - // TODO: Validate the expression depth, etc. - - var sortExpression = expressionText; - - if (sortDirection == SortDirection.Descending) - { - sortExpression += SORT_DIRECTION_DESC; - } - - return sortExpression; - } - - public static IQueryable SortBy(this IQueryable source, string sortExpression) where T : class - { - if (source == null) - { - throw new ArgumentNullException("source"); - } - - if (String.IsNullOrWhiteSpace(sortExpression)) - { - return source; - } - - sortExpression = sortExpression.Trim(); - var isDescending = false; - - // DataSource control passes the sort parameter with a direction - // if the direction is descending - if (sortExpression.EndsWith(SORT_DIRECTION_DESC, StringComparison.OrdinalIgnoreCase)) - { - isDescending = true; - var descIndex = sortExpression.Length - SORT_DIRECTION_DESC.Length; - sortExpression = sortExpression.Substring(0, descIndex).Trim(); - } - - if (string.IsNullOrEmpty(sortExpression)) - { - return source; - } - - ParameterExpression parameter = Expression.Parameter(source.ElementType, String.Empty); - - // Build up the property expression, e.g.: (m => m.Foo.Bar) - var sortExpressionParts = sortExpression.Split('.'); - Expression propertyExpression = parameter; - foreach (var property in sortExpressionParts) - { - propertyExpression = Expression.Property(propertyExpression, property); - } - - LambdaExpression lambda = Expression.Lambda(propertyExpression, parameter); - - var methodName = (isDescending) ? "OrderByDescending" : "OrderBy"; - - Expression methodCallExpression = Expression.Call( - typeof(Queryable), - methodName, - new[] { source.ElementType, propertyExpression.Type }, - source.Expression, - Expression.Quote(lambda)); - - return (IQueryable)source.Provider.CreateQuery(methodCallExpression); - } - } -} diff --git a/samples/angular/MusicStore/MusicStore.xproj b/samples/angular/MusicStore/MusicStore.xproj deleted file mode 100644 index 93efb5ea..00000000 --- a/samples/angular/MusicStore/MusicStore.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - true - - - - 1a74148f-9dc0-435d-b5ac-7d1b0d3d5e0b - MusicStore - ..\artifacts\obj\$(MSBuildProjectName) - .\bin\ - - - 2.0 - 5068 - - - \ No newline at end of file diff --git a/samples/angular/MusicStore/Startup.cs b/samples/angular/MusicStore/Startup.cs deleted file mode 100755 index c4e37bff..00000000 --- a/samples/angular/MusicStore/Startup.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.PlatformAbstractions; -using AutoMapper; -using MusicStore.Apis; -using MusicStore.Models; - -namespace MusicStore -{ - public class Startup - { - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddMvc().AddJsonOptions(options => - { - options.SerializerSettings.ContractResolver = null; - }); - - // Add EF services to the service container - services.AddEntityFramework() - .AddEntityFrameworkSqlite() - .AddDbContext(options => { - options.UseSqlite("Data Source=music-db.sqlite"); - }); - - // Add Identity services to the services container - services.AddIdentity() - .AddEntityFrameworkStores() - .AddDefaultTokenProviders(); - - // Configure Auth - services.Configure(options => - { - options.AddPolicy("app-ManageStore", new AuthorizationPolicyBuilder().RequireClaim("app-ManageStore", "Allowed").Build()); - }); - - Mapper.Initialize(cfg => - { - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - }); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHostingEnvironment env) - { - app.UseDeveloperExceptionPage(); - - // Initialize the sample data - SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait(); - - app.UseStaticFiles(); - loggerFactory.AddConsole(); - - // Add MVC to the request pipeline. - app.UseMvc(routes => - { - // Matches requests that correspond to an existent controller/action pair - routes.MapRoute( - name: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - - // Matches any other request that doesn't appear to have a filename extension (defined as 'having a dot in the last URI segment'). - // This means you'll correctly get 404s for /some/dir/non-existent-image.png instead of returning the SPA HTML. - // However, it means requests like /customers/isaac.newton will *not* be mapped into the SPA, so if you need to accept - // URIs like that you'll need to match all URIs, e.g.: - // routes.MapRoute("spa-fallback", "{*anything}", new { controller = "Home", action = "Index" }); - // (which of course will match /customers/isaac.png too, so in that case it would serve the PNG image at that URL if one is on disk, - // or the SPA HTML if not). - routes.MapSpaFallbackRoute("spa-fallback", new { controller = "Home", action = "Index" }); - }); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/samples/angular/MusicStore/Views/Home/Index.cshtml b/samples/angular/MusicStore/Views/Home/Index.cshtml deleted file mode 100755 index a2799f70..00000000 --- a/samples/angular/MusicStore/Views/Home/Index.cshtml +++ /dev/null @@ -1,23 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - - - Loading... - @await Html.PrimeCacheAsync(Url.Action("GenreMenuList", "GenresApi")) - @await Html.PrimeCacheAsync(Url.Action("MostPopular", "AlbumsApi")) - - -@section scripts { - - - - - - - - - - - -} diff --git a/samples/angular/MusicStore/Views/Shared/Error.cshtml b/samples/angular/MusicStore/Views/Shared/Error.cshtml deleted file mode 100755 index 473b35d6..00000000 --- a/samples/angular/MusicStore/Views/Shared/Error.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

diff --git a/samples/angular/MusicStore/Views/Shared/_Layout.cshtml b/samples/angular/MusicStore/Views/Shared/_Layout.cshtml deleted file mode 100755 index 562ccf83..00000000 --- a/samples/angular/MusicStore/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Music Store - - - - - - - - - - - - - @RenderBody() - - - - - - - - - - - @RenderSection("scripts", required: false) - - diff --git a/samples/angular/MusicStore/Views/_ViewImports.cshtml b/samples/angular/MusicStore/Views/_ViewImports.cshtml deleted file mode 100755 index 3e7a43a3..00000000 --- a/samples/angular/MusicStore/Views/_ViewImports.cshtml +++ /dev/null @@ -1,4 +0,0 @@ -@using MusicStore -@using Microsoft.AspNetCore.AngularServices -@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" -@addTagHelper "*, Microsoft.AspNetCore.SpaServices" diff --git a/samples/angular/MusicStore/Views/_ViewStart.cshtml b/samples/angular/MusicStore/Views/_ViewStart.cshtml deleted file mode 100755 index 820a2f6e..00000000 --- a/samples/angular/MusicStore/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/samples/angular/MusicStore/gulpfile.js b/samples/angular/MusicStore/gulpfile.js deleted file mode 100755 index 215f9932..00000000 --- a/samples/angular/MusicStore/gulpfile.js +++ /dev/null @@ -1,53 +0,0 @@ -/// - -"use strict"; - -var path = require('path'); -var gulp = require('gulp'); -var del = require('del'); -var typescript = require('gulp-typescript'); -var inlineNg2Template = require('gulp-inline-ng2-template'); -var sourcemaps = require('gulp-sourcemaps'); - -var webroot = "./wwwroot/"; - -var config = { - libBase: 'node_modules', - lib: [ - require.resolve('bootstrap/dist/css/bootstrap.css'), - path.dirname(require.resolve('bootstrap/dist/fonts/glyphicons-halflings-regular.woff')) + '/**', - require.resolve('angular2/bundles/angular2-polyfills.js'), - require.resolve('traceur/bin/traceur-runtime.js'), - require.resolve('es6-module-loader/dist/es6-module-loader-sans-promises.js'), - require.resolve('systemjs/dist/system.src.js'), - require.resolve('angular2/bundles/angular2.dev.js'), - require.resolve('angular2/bundles/router.dev.js'), - require.resolve('angular2/bundles/http.dev.js'), - require.resolve('angular2-aspnet/bundles/angular2-aspnet.js'), - require.resolve('jquery/dist/jquery.js'), - require.resolve('bootstrap/dist/js/bootstrap.js'), - require.resolve('rxjs/bundles/Rx.js') - ] -}; - -gulp.task('build.lib', function () { - return gulp.src(config.lib, { base: config.libBase }) - .pipe(gulp.dest(webroot + 'lib')); -}); - -gulp.task('build', ['build.lib'], function () { - var tsProject = typescript.createProject('./tsconfig.json', { typescript: require('typescript') }); - var tsSrcInlined = gulp.src([webroot + '**/*.ts', 'typings/**/*.d.ts'], { base: webroot }) - .pipe(inlineNg2Template({ base: webroot })); - return tsSrcInlined - .pipe(sourcemaps.init()) - .pipe(typescript(tsProject)) - .pipe(sourcemaps.write()) - .pipe(gulp.dest(webroot)); -}); - -gulp.task('clean', function () { - return del([webroot + 'lib']); -}); - -gulp.task('default', ['build']); diff --git a/samples/angular/MusicStore/package.json b/samples/angular/MusicStore/package.json deleted file mode 100644 index 9946fcbb..00000000 --- a/samples/angular/MusicStore/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "MusicStore", - "version": "0.0.0", - "dependencies": { - "angular2": "2.0.0-beta.15", - "angular2-aspnet": "^0.0.6", - "angular2-universal": "0.98.1", - "angular2-express-engine": "0.11.1", - "angular2-hapi-engine": "0.11.1", - "aspnet-prerendering": "^1.0.1", - "bootstrap": "^3.3.5", - "css": "^2.2.1", - "es6-module-loader": "0.15.0", - "es6-shim": "^0.35.0", - "isomorphic-fetch": "^2.2.1", - "jquery": "^2.1.4", - "less": "^2.5.3", - "preboot": "2.0.5", - "rxjs": "5.0.0-beta.2", - "systemjs": "^0.19.3", - "traceur": "0.0.106", - "zone.js": "^0.6.10" - }, - "devDependencies": { - "del": "^2.0.2", - "gulp": "^3.9.0", - "gulp-inline-ng2-template": "0.0.7", - "gulp-sourcemaps": "^1.6.0", - "gulp-typescript": "^2.9.0", - "typescript": "^1.6.2" - } -} diff --git a/samples/angular/MusicStore/project.json b/samples/angular/MusicStore/project.json deleted file mode 100755 index ceede625..00000000 --- a/samples/angular/MusicStore/project.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "version": "1.0.0-*", - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "runtimeOptions": { - "configProperties": { - "System.GC.Server": true - } - }, - "tooling": { - "defaultNamespace": "MusicStore" - }, - - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.1", - "type": "platform" - }, - "Microsoft.AspNetCore.AngularServices": "1.0.0-*", - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0", - "Microsoft.AspNetCore.Mvc": "1.0.1", - "Microsoft.AspNetCore.Razor.Tools": { - "version": "1.0.0-preview2-final", - "type": "build" - }, - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.EntityFrameworkCore.SQLite": "1.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", - "Microsoft.Extensions.Configuration.Json": "1.0.0", - "Microsoft.Extensions.Configuration.CommandLine": "1.0.0", - "Microsoft.Extensions.Logging": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0", - "Microsoft.Extensions.Logging.Debug": "1.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0", - "AutoMapper": "5.0.2" - }, - - "tools": { - "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", - "Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final" - }, - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "portable-net45+win8" - ] - } - }, - - "publishOptions": { - "include": [ - "appsettings.json", - "ClientApp", - "node_modules", - "typings", - "Views", - "tsconfig.json", - "tsd.json", - "web.config", - "webpack.*.js", - "wwwroot" - ] - }, - "scripts": { - "prepublish": [ - "npm install", - "gulp" - ], - "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] - } -} diff --git a/samples/angular/MusicStore/tsconfig.json b/samples/angular/MusicStore/tsconfig.json deleted file mode 100644 index a4c5eeb7..00000000 --- a/samples/angular/MusicStore/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "sourceMap": false, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "noLib": false - }, - "exclude": [ - "node_modules" - ] -} diff --git a/samples/angular/MusicStore/tsd.json b/samples/angular/MusicStore/tsd.json deleted file mode 100644 index dc2f9671..00000000 --- a/samples/angular/MusicStore/tsd.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": "v4", - "repo": "borisyankov/DefinitelyTyped", - "ref": "master", - "path": "typings", - "bundle": "typings/tsd.d.ts", - "installed": { - "es6-shim/es6-shim.d.ts": { - "commit": "ec9eb4b28c74665a602c22db3457f0a76fa0fa23" - } - } -} diff --git a/samples/angular/MusicStore/typings/es6-shim/es6-shim.d.ts b/samples/angular/MusicStore/typings/es6-shim/es6-shim.d.ts deleted file mode 100644 index 1c3df0ed..00000000 --- a/samples/angular/MusicStore/typings/es6-shim/es6-shim.d.ts +++ /dev/null @@ -1,668 +0,0 @@ -// Type definitions for es6-shim v0.31.2 -// Project: https://github.com/paulmillr/es6-shim -// Definitions by: Ron Buckton -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare type PropertyKey = string | number | symbol; - -interface IteratorResult { - done: boolean; - value?: T; -} - -interface IterableShim { - /** - * Shim for an ES6 iterable. Not intended for direct use by user code. - */ - "_es6-shim iterator_"(): Iterator; -} - -interface Iterator { - next(value?: any): IteratorResult; - return?(value?: any): IteratorResult; - throw?(e?: any): IteratorResult; -} - -interface IterableIteratorShim extends IterableShim, Iterator { - /** - * Shim for an ES6 iterable iterator. Not intended for direct use by user code. - */ - "_es6-shim iterator_"(): IterableIteratorShim; -} - -interface StringConstructor { - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - fromCodePoint(...codePoints: number[]): string; - - /** - * String.raw is intended for use as a tag function of a Tagged Template String. When called - * as such the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - raw(template: TemplateStringsArray, ...substitutions: any[]): string; -} - -interface String { - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - */ - codePointAt(pos: number): number; - - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - includes(searchString: string, position?: number): boolean; - - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; - - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * T is the empty String is returned. - * @param count number of copies to append - */ - repeat(count: number): string; - - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; - - /** - * Returns an HTML anchor element and sets the name attribute to the text value - * @param name - */ - anchor(name: string): string; - - /** Returns a HTML element */ - big(): string; - - /** Returns a HTML element */ - blink(): string; - - /** Returns a HTML element */ - bold(): string; - - /** Returns a HTML element */ - fixed(): string - - /** Returns a HTML element and sets the color attribute value */ - fontcolor(color: string): string - - /** Returns a HTML element and sets the size attribute value */ - fontsize(size: number): string; - - /** Returns a HTML element and sets the size attribute value */ - fontsize(size: string): string; - - /** Returns an HTML element */ - italics(): string; - - /** Returns an HTML element and sets the href attribute value */ - link(url: string): string; - - /** Returns a HTML element */ - small(): string; - - /** Returns a HTML element */ - strike(): string; - - /** Returns a HTML element */ - sub(): string; - - /** Returns a HTML element */ - sup(): string; - - /** - * Shim for an ES6 iterable. Not intended for direct use by user code. - */ - "_es6-shim iterator_"(): IterableIteratorShim; -} - -interface ArrayConstructor { - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array; - - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: IterableShim, mapfn: (v: T, k: number) => U, thisArg?: any): Array; - - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Array; - - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: IterableShim): Array; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: T[]): Array; -} - -interface Array { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T) => boolean, thisArg?: any): number; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): T[]; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): T[]; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIteratorShim<[number, T]>; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIteratorShim; - - /** - * Returns an list of values in the array - */ - values(): IterableIteratorShim; - - /** - * Shim for an ES6 iterable. Not intended for direct use by user code. - */ - "_es6-shim iterator_"(): IterableIteratorShim; -} - -interface NumberConstructor { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. - */ - EPSILON: number; - - /** - * Returns true if passed value is finite. - * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param number A numeric value. - */ - isFinite(number: number): boolean; - - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: number): boolean; - - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. - */ - isNaN(number: number): boolean; - - /** - * Returns true if the value passed is a safe integer. - * @param number A numeric value. - */ - isSafeInteger(number: number): boolean; - - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1. - */ - MAX_SAFE_INTEGER: number; - - /** - * The value of the smallest integer n such that n and n − 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). - */ - MIN_SAFE_INTEGER: number; - - /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ - parseFloat(string: string): number; - - /** - * Converts A string to an integer. - * @param s A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in numString. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - parseInt(string: string, radix?: number): number; -} - -interface ObjectConstructor { - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects to copy properties from. - */ - assign(target: any, ...sources: any[]): any; - - /** - * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. - */ - is(value1: any, value2: any): boolean; - - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - * @remarks Requires `__proto__` support. - */ - setPrototypeOf(o: any, proto: any): any; -} - -interface RegExp { - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - flags: string; -} - -interface Math { - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number; - - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number; - - /** - * Returns the sign of the x, indicating whether x is positive, negative or zero. - * @param x The numeric expression to test - */ - sign(x: number): number; - - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number; - - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number; - - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number; - - /** - * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of - * the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number; - - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number; - - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number; - - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number; - - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number; - - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number; - - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number; - - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or −0, the result is +0. - */ - hypot(...values: number[]): number; - - /** - * Returns the integral part of the a numeric expression, x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number; - - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number; - - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number; -} - -interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike; -} - -/** - * Represents the completion of an asynchronous operation - */ -interface Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): Promise; - - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: (reason: any) => T | PromiseLike): Promise; - catch(onrejected?: (reason: any) => void): Promise; -} - -interface PromiseConstructor { - /** - * A reference to the prototype. - */ - prototype: Promise; - - /** - * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used resolve the promise with a value or the result of another promise, - * and a reject callback used to reject the promise with a provided reason or error. - */ - new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; - - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - all(values: IterableShim>): Promise; - - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - race(values: IterableShim>): Promise; - - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason: any): Promise; - - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason: any): Promise; - - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T | PromiseLike): Promise; - - /** - * Creates a new resolved promise . - * @returns A resolved promise. - */ - resolve(): Promise; -} - -declare var Promise: PromiseConstructor; - -interface Map { - clear(): void; - delete(key: K): boolean; - forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void; - get(key: K): V; - has(key: K): boolean; - set(key: K, value?: V): Map; - size: number; - entries(): IterableIteratorShim<[K, V]>; - keys(): IterableIteratorShim; - values(): IterableIteratorShim; -} - -interface MapConstructor { - new (): Map; - new (iterable: IterableShim<[K, V]>): Map; - prototype: Map; -} - -declare var Map: MapConstructor; - -interface Set { - add(value: T): Set; - clear(): void; - delete(value: T): boolean; - forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void; - has(value: T): boolean; - size: number; - entries(): IterableIteratorShim<[T, T]>; - keys(): IterableIteratorShim; - values(): IterableIteratorShim; -} - -interface SetConstructor { - new (): Set; - new (iterable: IterableShim): Set; - prototype: Set; -} - -declare var Set: SetConstructor; - -interface WeakMap { - delete(key: K): boolean; - get(key: K): V; - has(key: K): boolean; - set(key: K, value?: V): WeakMap; -} - -interface WeakMapConstructor { - new (): WeakMap; - new (iterable: IterableShim<[K, V]>): WeakMap; - prototype: WeakMap; -} - -declare var WeakMap: WeakMapConstructor; - -interface WeakSet { - add(value: T): WeakSet; - delete(value: T): boolean; - has(value: T): boolean; -} - -interface WeakSetConstructor { - new (): WeakSet; - new (iterable: IterableShim): WeakSet; - prototype: WeakSet; -} - -declare var WeakSet: WeakSetConstructor; - -declare namespace Reflect { - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - function construct(target: Function, argumentsList: ArrayLike): any; - function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; - function deleteProperty(target: any, propertyKey: PropertyKey): boolean; - function enumerate(target: any): IterableIteratorShim; - function get(target: any, propertyKey: PropertyKey, receiver?: any): any; - function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; - function getPrototypeOf(target: any): any; - function has(target: any, propertyKey: PropertyKey): boolean; - function isExtensible(target: any): boolean; - function ownKeys(target: any): Array; - function preventExtensions(target: any): boolean; - function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; - function setPrototypeOf(target: any, proto: any): boolean; -} - -declare module "es6-shim" { - var String: StringConstructor; - var Array: ArrayConstructor; - var Number: NumberConstructor; - var Math: Math; - var Object: ObjectConstructor; - var Map: MapConstructor; - var Set: SetConstructor; - var WeakMap: WeakMapConstructor; - var WeakSet: WeakSetConstructor; - var Promise: PromiseConstructor; - namespace Reflect { - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - function construct(target: Function, argumentsList: ArrayLike): any; - function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; - function deleteProperty(target: any, propertyKey: PropertyKey): boolean; - function enumerate(target: any): Iterator; - function get(target: any, propertyKey: PropertyKey, receiver?: any): any; - function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; - function getPrototypeOf(target: any): any; - function has(target: any, propertyKey: PropertyKey): boolean; - function isExtensible(target: any): boolean; - function ownKeys(target: any): Array; - function preventExtensions(target: any): boolean; - function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; - function setPrototypeOf(target: any, proto: any): boolean; - } -} diff --git a/samples/angular/MusicStore/typings/tsd.d.ts b/samples/angular/MusicStore/typings/tsd.d.ts deleted file mode 100644 index 8b614f9a..00000000 --- a/samples/angular/MusicStore/typings/tsd.d.ts +++ /dev/null @@ -1,2 +0,0 @@ - -/// diff --git a/samples/angular/MusicStore/typings/url-workaround.d.ts b/samples/angular/MusicStore/typings/url-workaround.d.ts deleted file mode 100644 index 9d167602..00000000 --- a/samples/angular/MusicStore/typings/url-workaround.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// This file is a workaround for angular2-universal-preview version 0.84.2 relying on the declaration of -// Node's 'url' module. Ideally it would not declare dependencies on Node APIs except where it also supplies -// the definitions itself. - -declare module 'url' { - export interface Url {} -} diff --git a/samples/angular/MusicStore/wwwroot/css/site.css b/samples/angular/MusicStore/wwwroot/css/site.css deleted file mode 100644 index 952e03fb..00000000 --- a/samples/angular/MusicStore/wwwroot/css/site.css +++ /dev/null @@ -1,3 +0,0 @@ -body { - padding-top: 50px; -} diff --git a/samples/angular/MusicStore/wwwroot/css/styles.less b/samples/angular/MusicStore/wwwroot/css/styles.less deleted file mode 100644 index 564f8f40..00000000 --- a/samples/angular/MusicStore/wwwroot/css/styles.less +++ /dev/null @@ -1,14 +0,0 @@ -@base: #f938ab; - -.box-shadow(@style, @c) when (iscolor(@c)) { - -webkit-box-shadow: @style @c; - box-shadow: @style @c; -} -.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) { - .box-shadow(@style, rgba(0, 0, 0, @alpha)); -} -.box { - color: saturate(@base, 5%); - border-color: lighten(@base, 30%); - div { .box-shadow(0 0 5px, 30%) } -} diff --git a/samples/angular/MusicStore/wwwroot/images/home-showcase.png b/samples/angular/MusicStore/wwwroot/images/home-showcase.png deleted file mode 100644 index 258c19d3..00000000 Binary files a/samples/angular/MusicStore/wwwroot/images/home-showcase.png and /dev/null differ diff --git a/samples/angular/MusicStore/wwwroot/images/logo.png b/samples/angular/MusicStore/wwwroot/images/logo.png deleted file mode 100644 index d334c862..00000000 Binary files a/samples/angular/MusicStore/wwwroot/images/logo.png and /dev/null differ diff --git a/samples/angular/MusicStore/wwwroot/images/placeholder.png b/samples/angular/MusicStore/wwwroot/images/placeholder.png deleted file mode 100644 index 1f73dbb4..00000000 Binary files a/samples/angular/MusicStore/wwwroot/images/placeholder.png and /dev/null differ diff --git a/samples/angular/MusicStore/wwwroot/ng-app/boot-client.ts b/samples/angular/MusicStore/wwwroot/ng-app/boot-client.ts deleted file mode 100644 index 65e24a06..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/boot-client.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { bootstrap } from 'angular2/platform/browser'; -import { FormBuilder } from 'angular2/common'; -import * as router from 'angular2/router'; -import { Http, HTTP_PROVIDERS } from 'angular2/http'; -import { CACHE_PRIMED_HTTP_PROVIDERS } from 'angular2-aspnet'; -import { App } from './components/app/app'; - -bootstrap(App, [router.ROUTER_BINDINGS, HTTP_PROVIDERS, CACHE_PRIMED_HTTP_PROVIDERS, FormBuilder]); diff --git a/samples/angular/MusicStore/wwwroot/ng-app/boot-server.ts b/samples/angular/MusicStore/wwwroot/ng-app/boot-server.ts deleted file mode 100644 index 10578a13..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/boot-server.ts +++ /dev/null @@ -1,30 +0,0 @@ -import 'angular2-universal/polyfills'; -import { FormBuilder } from 'angular2/common'; -import * as ngCore from 'angular2/core'; -import * as ngRouter from 'angular2/router'; -import * as ngUniversal from 'angular2-universal'; -import { BASE_URL, ORIGIN_URL, REQUEST_URL } from 'angular2-universal/common'; -import { App } from './components/app/app'; - -export default function (params: any): Promise<{ html: string, globals?: any }> { - const serverBindings = [ - ngCore.provide(BASE_URL, { useValue: '/' }), - ngCore.provide(ORIGIN_URL, { useValue: params.origin }), - ngCore.provide(REQUEST_URL, { useValue: params.url }), - ngUniversal.NODE_HTTP_PROVIDERS, - ngUniversal.NODE_ROUTER_PROVIDERS, - FormBuilder - ]; - - return ngUniversal.bootloader({ - directives: [App], - providers: serverBindings, - async: true, - preboot: false, - // TODO: Render just the component instead of wrapping it inside an extra HTML document - // Waiting on https://github.com/angular/universal/issues/347 - template: '\n' - }).serializeApplication().then(html => { - return { html }; - }); -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/admin-home/admin-home.html b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/admin-home/admin-home.html deleted file mode 100644 index 79e4fcdd..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/admin-home/admin-home.html +++ /dev/null @@ -1,3 +0,0 @@ -

Store Manager

- - diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/admin-home/admin-home.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/admin-home/admin-home.ts deleted file mode 100644 index 47a501a0..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/admin-home/admin-home.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as ng from 'angular2/core'; -import * as router from 'angular2/router'; -import { AlbumsList } from '../albums-list/albums-list'; -import { AlbumDetails } from '../album-details/album-details'; -import { AlbumEdit } from '../album-edit/album-edit'; - -@ng.Component({ - selector: 'admin-home', - templateUrl: './ng-app/components/admin/admin-home/admin-home.html', - directives: [router.ROUTER_DIRECTIVES] -}) -@router.RouteConfig([ - { path: 'albums', name: 'Albums', component: AlbumsList }, - { path: 'album/details/:albumId', name: 'AlbumDetails', component: AlbumDetails }, - { path: 'album/edit/:albumId', name: 'AlbumEdit', component: AlbumEdit } -]) -export class AdminHome { - -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-delete-prompt/album-delete-prompt.html b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-delete-prompt/album-delete-prompt.html deleted file mode 100644 index 2f6b0ba6..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-delete-prompt/album-delete-prompt.html +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-delete-prompt/album-delete-prompt.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-delete-prompt/album-delete-prompt.ts deleted file mode 100644 index a3039560..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-delete-prompt/album-delete-prompt.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as ng from 'angular2/core'; -import * as models from '../../../models/models'; - -@ng.Component({ - selector: 'album-delete-prompt', - templateUrl: './ng-app/components/admin/album-delete-prompt/album-delete-prompt.html' -}) -export class AlbumDeletePrompt { - public album: models.Album; - - constructor(@ng.Inject(ng.ElementRef) private _elementRef: ng.ElementRef) { - } - - public show(album: models.Album) { - this.album = album; - - // Consider rewriting this using Angular 2's "Renderer" API so as to avoid direct DOM access - (window).jQuery(".modal", this._elementRef.nativeElement).modal(); - } -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.html b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.html deleted file mode 100644 index a13e0d1d..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.html +++ /dev/null @@ -1,50 +0,0 @@ -

Album Details

-
- -
- - diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.ts deleted file mode 100644 index 05ac4da6..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as ng from 'angular2/core'; -import * as router from 'angular2/router'; -import * as models from '../../../models/models'; -import { Http, HTTP_BINDINGS } from 'angular2/http'; -import { AlbumDeletePrompt } from '../album-delete-prompt/album-delete-prompt'; - -@ng.Component({ - selector: 'album-details', - templateUrl: './ng-app/components/admin/album-details/album-details.html', - directives: [router.ROUTER_DIRECTIVES, AlbumDeletePrompt] -}) -export class AlbumDetails { - public albumData: models.Album; - - constructor(http: Http, routeParam: router.RouteParams) { - http.get('/api/albums/' + routeParam.params['albumId']).subscribe(result => { - this.albumData = result.json(); - }); - } -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.html b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.html deleted file mode 100644 index 3b09db19..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.html +++ /dev/null @@ -1,47 +0,0 @@ -

Album Edit

-
- -
- - - - - - - - - - - - - -
- $ - -
-
- - - - - - - - - - -
Done! Your changes were saved.
-
{{ errorMessage }}
- - - Back to List -
-
- - diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts deleted file mode 100644 index 4b83c3b4..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts +++ /dev/null @@ -1,94 +0,0 @@ -import * as ng from 'angular2/core'; -import { Observable } from 'rxjs'; -import { Control, ControlGroup, FormBuilder, Validators, FORM_DIRECTIVES } from 'angular2/common'; -import * as router from 'angular2/router'; -import * as models from '../../../models/models'; -import { Http, HTTP_BINDINGS, Headers, Response } from 'angular2/http'; -import { AlbumDeletePrompt } from '../album-delete-prompt/album-delete-prompt'; -import { FormField } from '../form-field/form-field'; -import * as AspNet from 'angular2-aspnet'; - -@ng.Component({ - selector: 'album-edit', - templateUrl: './ng-app/components/admin/album-edit/album-edit.html', - directives: [router.ROUTER_DIRECTIVES, AlbumDeletePrompt, FormField, FORM_DIRECTIVES] -}) -export class AlbumEdit { - public form: ControlGroup; - public artists: models.Artist[]; - public genres: models.Genre[]; - public originalAlbum: models.Album; - public changesSaved: boolean; - public formErrors: string[] = []; - - private _http: Http; - - constructor(fb: FormBuilder, http: Http, routeParam: router.RouteParams) { - this._http = http; - - var albumId = parseInt(routeParam.params['albumId']); - http.get('/api/albums/' + albumId).subscribe(result => { - var json = result.json(); - this.originalAlbum = json; - (this.form.controls['Title']).updateValue(json.Title); - (this.form.controls['Price']).updateValue(json.Price); - (this.form.controls['ArtistId']).updateValue(json.ArtistId); - (this.form.controls['GenreId']).updateValue(json.GenreId); - (this.form.controls['AlbumArtUrl']).updateValue(json.AlbumArtUrl); - }); - - http.get('/api/artists/lookup').subscribe(result => { - this.artists = result.json(); - }); - - http.get('/api/genres/genre-lookup').subscribe(result => { - this.genres = result.json(); - }); - - this.form = fb.group({ - AlbumId: fb.control(albumId), - ArtistId: fb.control(0, Validators.required), - GenreId: fb.control(0, Validators.required), - Title: fb.control('', Validators.required), - Price: fb.control('', Validators.compose([Validators.required, AlbumEdit._validatePrice])), - AlbumArtUrl: fb.control('', Validators.required) - }); - - this.form.valueChanges.subscribe(() => { - this.changesSaved = false; - }); - } - - public onSubmitModelBased() { - // Force all fields to show any validation errors even if they haven't been touched - Object.keys(this.form.controls).forEach(controlName => { - this.form.controls[controlName].markAsTouched(); - }); - - if (this.form.valid) { - var controls = this.form.controls; - var albumId = this.originalAlbum.AlbumId; - - this._putJson(`/api/albums/${ albumId }/update`, this.form.value).subscribe(successResponse => { - this.changesSaved = true; - }, errorResponse => { - AspNet.Validation.showValidationErrors(errorResponse, this.form); - }); - } - } - - private static _validatePrice(control: Control): { [key: string]: boolean } { - return /^\d+\.\d+$/.test(control.value) ? null : { Price: true }; - } - - // Need feedback on whether this really is the easiest way to PUT some JSON - private _putJson(url: string, body: any): Observable { - return this._http.put(url, JSON.stringify(body), { - headers: new Headers({ 'Content-Type': 'application/json' }) - }); - } - - private ngDoCheck() { - this.formErrors = this.form.dirty ? Object.keys(this.form.errors || {}) : []; - } -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.html b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.html deleted file mode 100644 index 51889e7d..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.html +++ /dev/null @@ -1,44 +0,0 @@ -

Albums

- - - - - - - - - - - - - - - - - - - - - - -
GenreArtistTitlePrice
{{ row.Genre.Name }}{{ row.Artist.Name }}{{ row.Title }}{{ row.Price | currency:'USD':true }} -
- Details - Edit - Delete -
-
- -
- - - - - -
- -

{{ totalCount }} total albums

diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.ts deleted file mode 100644 index 989d6e97..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.ts +++ /dev/null @@ -1,68 +0,0 @@ -import * as ng from 'angular2/core'; -import * as router from 'angular2/router'; -import { Http, HTTP_BINDINGS } from 'angular2/http'; -import * as models from '../../../models/models'; -import { AlbumDeletePrompt } from '../album-delete-prompt/album-delete-prompt'; - -@ng.Component({ - selector: 'albums-list', - templateUrl: './ng-app/components/admin/albums-list/albums-list.html', - directives: [router.ROUTER_DIRECTIVES, AlbumDeletePrompt] -}) -export class AlbumsList { - public rows: models.Album[]; - public canGoBack: boolean; - public canGoForward: boolean; - public pageLinks: any[]; - public totalCount: number; - public get pageIndex() { - return this._pageIndex; - } - - private _http: Http; - private _pageIndex = 1; - private _sortBy = "Title"; - private _sortByDesc = false; - - constructor(http: Http) { - this._http = http; - this.refreshData(); - } - - public sortBy(col: string) { - this._sortByDesc = col === this._sortBy ? !this._sortByDesc : false; - this._sortBy = col; - this.refreshData(); - } - - public goToPage(pageIndex: number) { - this._pageIndex = pageIndex; - this.refreshData(); - } - - public goToLast() { - this.goToPage(this.pageLinks[this.pageLinks.length - 1].index); - } - - refreshData() { - var sortBy = this._sortBy + (this._sortByDesc ? ' DESC' : ''); - this._http.get(`/api/albums?page=${ this._pageIndex }&pageSize=50&sortBy=${ sortBy }`).subscribe(result => { - var json = result.json(); - this.rows = json.Data; - - var numPages = Math.ceil(json.TotalCount / json.PageSize); - this.pageLinks = []; - for (var i = 1; i <= numPages; i++) { - this.pageLinks.push({ - index: i, - text: i.toString(), - isCurrent: i === json.Page - }); - } - - this.canGoBack = this.pageLinks.length && !this.pageLinks[0].isCurrent; - this.canGoForward = this.pageLinks.length && !this.pageLinks[this.pageLinks.length - 1].isCurrent; - this.totalCount = json.TotalCount; - }); - } -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/form-field/form-field.html b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/form-field/form-field.html deleted file mode 100644 index 82e773b0..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/form-field/form-field.html +++ /dev/null @@ -1,9 +0,0 @@ -
- -
- - -
-
diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/form-field/form-field.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/form-field/form-field.ts deleted file mode 100644 index 267d7784..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/form-field/form-field.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as ng from 'angular2/core'; -import { AbstractControl } from 'angular2/common'; - -@ng.Component({ - selector: 'form-field', - properties: ['label', 'validate'], - templateUrl: './ng-app/components/admin/form-field/form-field.html' -}) -export class FormField { - public errorMessages: string[] = []; - private validate: AbstractControl; - - private ngDoCheck() { - var errors = (this.validate && this.validate.dirty && this.validate.errors) || {}; - this.errorMessages = Object.keys(errors).map(key => { - return 'Error: ' + key; - }); - } -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.css b/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.css deleted file mode 100644 index e69de29b..00000000 diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.html b/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.html deleted file mode 100644 index a257b202..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.html +++ /dev/null @@ -1,30 +0,0 @@ - -
- -
diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.ts deleted file mode 100644 index cd83aa45..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as ng from 'angular2/core'; -import * as router from 'angular2/router'; -import { Http, HTTP_BINDINGS } from 'angular2/http'; -import { Home } from '../public/home/home'; -import { AlbumDetails } from '../public/album-details/album-details'; -import { GenreContents } from '../public/genre-contents/genre-contents'; -import { GenresList } from '../public/genres-list/genres-list'; -import { AdminHome } from '../admin/admin-home/admin-home'; -import * as models from '../../models/models'; - -@ng.Component({ - selector: 'app', - templateUrl: './ng-app/components/app/app.html', - styleUrls: ['./ng-app/components/app/app.css'], - directives: [router.ROUTER_DIRECTIVES] -}) -@router.RouteConfig([ - { path: '/', component: Home, name: 'Home' }, - { path: '/album/:albumId', component: AlbumDetails, name: 'Album' }, - { path: '/genre/:genreId', component: GenreContents, name: 'Genre' }, - { path: '/genres', component: GenresList, name: 'GenresList' }, - { path: '/admin/...', component: AdminHome, name: 'Admin' } -]) -export class App { - public genres: models.Genre[]; - - constructor(http: Http) { - http.get('/api/genres/menu').subscribe(result => { - this.genres = result.json(); - }); - } -} - diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.html b/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.html deleted file mode 100644 index d015364e..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.html +++ /dev/null @@ -1,26 +0,0 @@ -
-

{{ albumData.Title }}

- -

- {{ albumData.Title }} -

- -
-

- Genre: - {{ albumData.Genre.Name }} -

-

- Artist: - {{ albumData.Artist.Name }} -

-

- Price: - {{ albumData.Price | currency:'USD':true }} -

-

- - Add to cart -

-
-
diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.ts deleted file mode 100644 index 61d7d4ea..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as ng from 'angular2/core'; -import * as router from 'angular2/router'; -import { Http } from 'angular2/http'; -import * as models from '../../../models/models'; - -@ng.Component({ - selector: 'album-details', - templateUrl: './ng-app/components/public/album-details/album-details.html' -}) -export class AlbumDetails { - public albumData: models.Album; - - constructor(http: Http, routeParam: router.RouteParams) { - http.get('/api/albums/' + routeParam.params['albumId']).subscribe(result => { - this.albumData = result.json(); - }); - } -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-tile/album-tile.html b/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-tile/album-tile.html deleted file mode 100644 index 0df947d1..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-tile/album-tile.html +++ /dev/null @@ -1,4 +0,0 @@ - - {{ albumData.Title }} -

{{ albumData.Title }}

-
diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-tile/album-tile.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-tile/album-tile.ts deleted file mode 100644 index d289ec96..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-tile/album-tile.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as ng from 'angular2/core'; -import * as router from 'angular2/router'; -import * as models from '../../../models/models'; - -@ng.Component({ - selector: 'album-tile', - properties: ['albumData'], - templateUrl: './ng-app/components/public/album-tile/album-tile.html', - directives: [router.ROUTER_DIRECTIVES] -}) -export class AlbumTile { -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.html b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.html deleted file mode 100644 index 7738ce5e..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.html +++ /dev/null @@ -1,7 +0,0 @@ -

Albums

- -
    -
  • - -
  • -
diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.ts deleted file mode 100644 index 0571cc8a..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as ng from 'angular2/core'; -import * as router from 'angular2/router'; -import { Http } from 'angular2/http'; -import * as models from '../../../models/models'; -import { AlbumTile } from '../album-tile/album-tile'; - -@ng.Component({ - selector: 'genre-contents', - templateUrl: './ng-app/components/public/genre-contents/genre-contents.html', - directives: [AlbumTile] -}) -export class GenreContents { - public albums: models.Album[]; - - constructor(http: Http, routeParam: router.RouteParams) { - http.get(`/api/genres/${ routeParam.params['genreId'] }/albums`).subscribe(result => { - this.albums = result.json(); - }); - } -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.html b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.html deleted file mode 100644 index e91d6f3a..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.html +++ /dev/null @@ -1,13 +0,0 @@ -

Browse Genres

- -

- Select from {{ genres.length }} genres: -

- - diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.ts deleted file mode 100644 index f45b77a3..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as ng from 'angular2/core'; -import * as router from 'angular2/router'; -import { Http } from 'angular2/http'; -import * as models from '../../../models/models'; - -@ng.Component({ - selector: 'genres-list', - templateUrl: './ng-app/components/public/genres-list/genres-list.html', - directives: [router.ROUTER_DIRECTIVES] -}) -export class GenresList { - public genres: models.Genre[]; - - constructor(http: Http) { - http.get('/api/genres').subscribe(result => { - this.genres = result.json(); - }); - } -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.html b/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.html deleted file mode 100644 index 133a495c..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.html +++ /dev/null @@ -1,10 +0,0 @@ -
-

MVC Music Store

- -
- -
    -
  • - -
  • -
diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.ts deleted file mode 100644 index 51989da6..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as ng from 'angular2/core'; -import { Http } from 'angular2/http'; -import { AlbumTile } from '../album-tile/album-tile'; -import * as models from '../../../models/models'; - -@ng.Component({ - selector: 'home', - templateUrl: './ng-app/components/public/home/home.html', - directives: [AlbumTile] -}) -export class Home { - public mostPopular: models.Album[]; - - constructor(http: Http) { - http.get('/api/albums/mostPopular').subscribe(result => { - this.mostPopular = result.json(); - }); - } -} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/models/models.ts b/samples/angular/MusicStore/wwwroot/ng-app/models/models.ts deleted file mode 100644 index 44c705af..00000000 --- a/samples/angular/MusicStore/wwwroot/ng-app/models/models.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface Album { - AlbumId: number; - Title: string; - AlbumArtUrl: string; -} - -export interface Genre { - GenreId: number; - Name: string; - Description: string; -} - -export interface Artist { - ArtistId: number; - Name: string; -} diff --git a/samples/angular/MusicStore/wwwroot/system.config.js b/samples/angular/MusicStore/wwwroot/system.config.js deleted file mode 100644 index 400211f4..00000000 --- a/samples/angular/MusicStore/wwwroot/system.config.js +++ /dev/null @@ -1,3 +0,0 @@ -System.config({ - defaultJSExtensions: true -}); diff --git a/samples/angular/MusicStore/wwwroot/web.config b/samples/angular/MusicStore/wwwroot/web.config deleted file mode 100644 index bb50c716..00000000 --- a/samples/angular/MusicStore/wwwroot/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/samples/misc/LatencyTest/LatencyTest.csproj b/samples/misc/LatencyTest/LatencyTest.csproj new file mode 100644 index 00000000..c146eb6a --- /dev/null +++ b/samples/misc/LatencyTest/LatencyTest.csproj @@ -0,0 +1,19 @@ + + + + netcoreapp3.0 + false + exe + + + + + + + + + + + + + diff --git a/samples/misc/LatencyTest/LatencyTest.xproj b/samples/misc/LatencyTest/LatencyTest.xproj deleted file mode 100644 index 310b3bac..00000000 --- a/samples/misc/LatencyTest/LatencyTest.xproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - 14.0.25123 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - a64af9d9-72aa-4433-be1d-dc2524b6808a - LatencyTest - .\obj - .\bin\ - - - - 2.0 - - - \ No newline at end of file diff --git a/samples/misc/LatencyTest/Program.cs b/samples/misc/LatencyTest/Program.cs index e435d374..bafe4b9f 100755 --- a/samples/misc/LatencyTest/Program.cs +++ b/samples/misc/LatencyTest/Program.cs @@ -3,6 +3,7 @@ using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.NodeServices; +using Microsoft.AspNetCore.NodeServices.Sockets; using Microsoft.Extensions.DependencyInjection; namespace ConsoleApplication @@ -16,8 +17,10 @@ public static void Main(string[] args) { // Set up the DI system var services = new ServiceCollection(); services.AddNodeServices(options => { - options.HostingModel = NodeServicesOptions.DefaultNodeHostingModel; - options.ProjectPath = Directory.GetCurrentDirectory(); + // To compare with Socket hosting, uncomment the following line + // Since .NET Core 1.1, the HTTP hosting model has become basically as fast as the Socket hosting model + //options.UseSocketHosting(); + options.WatchFileExtensions = new string[] {}; // Don't watch anything }); var serviceProvider = services.BuildServiceProvider(); diff --git a/samples/misc/LatencyTest/project.json b/samples/misc/LatencyTest/project.json deleted file mode 100755 index 15e349ca..00000000 --- a/samples/misc/LatencyTest/project.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "1.0.0-*", - "buildOptions": { - "emitEntryPoint": true - }, - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0", - "type": "platform" - }, - "Microsoft.AspNetCore.NodeServices": "1.0.0-*", - "Microsoft.Extensions.DependencyInjection": "1.0.0" - }, - "frameworks": { - "netcoreapp1.0": { - "imports": "dnxcore50" - } - } -} diff --git a/samples/misc/NodeServicesExamples/Controllers/HomeController.cs b/samples/misc/NodeServicesExamples/Controllers/HomeController.cs index 34ce07c6..d9f32410 100755 --- a/samples/misc/NodeServicesExamples/Controllers/HomeController.cs +++ b/samples/misc/NodeServicesExamples/Controllers/HomeController.cs @@ -1,5 +1,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.NodeServices; +using Microsoft.AspNetCore.SpaServices.Prerendering; namespace NodeServicesExamples.Controllers { @@ -15,8 +17,35 @@ public IActionResult ES2015Transpilation() return View(); } - public IActionResult ImageResizing() + public async Task Chart([FromServices] INodeServices nodeServices) { + var options = new { width = 400, height = 200, showArea = true, showPoint = true, fullWidth = true }; + var data = new + { + labels = new[] { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }, + series = new[] { + new[] { 1, 5, 2, 5, 4, 3 }, + new[] { 2, 3, 4, 8, 1, 2 }, + new[] { 5, 4, 3, 2, 1, 0 } + } + }; + + ViewData["ChartMarkup"] = await nodeServices.InvokeAsync("./Node/renderChart", "line", options, data); + + return View(); + } + + public async Task Prerendering([FromServices] ISpaPrerenderer prerenderer) + { + var result = await prerenderer.RenderToString("./Node/prerenderPage"); + + if (!string.IsNullOrEmpty(result.RedirectUrl)) + { + return Redirect(result.RedirectUrl); + } + + ViewData["PrerenderedHtml"] = result.Html; + ViewData["PrerenderedGlobals"] = result.CreateGlobalsAssignmentScript(); return View(); } diff --git a/samples/misc/NodeServicesExamples/Controllers/ResizeImage.cs b/samples/misc/NodeServicesExamples/Controllers/ResizeImage.cs deleted file mode 100644 index 43f45df3..00000000 --- a/samples/misc/NodeServicesExamples/Controllers/ResizeImage.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.IO; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.NodeServices; -using Microsoft.AspNetCore.StaticFiles; - -namespace NodeServicesExamples.Controllers -{ - public class ResizeImageController : Controller - { - private const int MaxDimension = 1000; - private static string[] AllowedMimeTypes = new[] { "image/jpeg", "image/png", "image/gif" }; - - private IHostingEnvironment _environment; - private INodeServices _nodeServices; - - public ResizeImageController(IHostingEnvironment environment, INodeServices nodeServices) - { - _environment = environment; - _nodeServices = nodeServices; - } - - [Route("resize/{*imagePath}")] - public async Task Index(string imagePath, int maxWidth, int maxHeight) - { - // Validate incoming params - if (maxWidth < 0 || maxHeight < 0 || maxWidth > MaxDimension || maxHeight > MaxDimension - || (maxWidth + maxHeight) == 0) - { - return BadRequest("Invalid dimensions"); - } - - var mimeType = GetContentType(imagePath); - if (Array.IndexOf(AllowedMimeTypes, mimeType) < 0) - { - return BadRequest("Disallowed image format"); - } - - // Locate source image on disk - var fileInfo = _environment.WebRootFileProvider.GetFileInfo(imagePath); - if (!fileInfo.Exists) - { - return NotFound(); - } - - // Invoke Node and pipe the result to the response - var imageStream = await _nodeServices.InvokeAsync( - "./Node/resizeImage", - fileInfo.PhysicalPath, - mimeType, - maxWidth, - maxHeight); - return File(imageStream, mimeType); - } - - private string GetContentType(string path) - { - string result; - return new FileExtensionContentTypeProvider().TryGetContentType(path, out result) ? result : null; - } - } -} diff --git a/samples/misc/NodeServicesExamples/Node/prerenderPage.js b/samples/misc/NodeServicesExamples/Node/prerenderPage.js new file mode 100644 index 00000000..7912a6f3 --- /dev/null +++ b/samples/misc/NodeServicesExamples/Node/prerenderPage.js @@ -0,0 +1,14 @@ +var createServerRenderer = require('aspnet-prerendering').createServerRenderer; + +module.exports = createServerRenderer(function(params) { + return new Promise(function (resolve, reject) { + var message = 'The HTML was returned by the prerendering boot function. ' + + 'The boot function received the following params:' + + '
' + JSON.stringify(params, null, 4) + '
'; + + resolve({ + html: '

Hello, world!

' + message, + globals: { sampleData: { nodeVersion: process.version } } + }); + }); +}); diff --git a/samples/misc/NodeServicesExamples/Node/renderChart.js b/samples/misc/NodeServicesExamples/Node/renderChart.js new file mode 100644 index 00000000..370df766 --- /dev/null +++ b/samples/misc/NodeServicesExamples/Node/renderChart.js @@ -0,0 +1,8 @@ +var generate = require('node-chartist'); + +module.exports = function (callback, type, options, data) { + generate(type, options, data).then( + result => callback(null, result), // Success case + error => callback(error) // Error case + ); +}; diff --git a/samples/misc/NodeServicesExamples/Node/resizeImage.js b/samples/misc/NodeServicesExamples/Node/resizeImage.js deleted file mode 100644 index 207b149f..00000000 --- a/samples/misc/NodeServicesExamples/Node/resizeImage.js +++ /dev/null @@ -1,8 +0,0 @@ -var sharp = require('sharp'); - -module.exports = function(result, physicalPath, mimeType, maxWidth, maxHeight) { - // Invoke the 'sharp' NPM module, and have it pipe the resulting image data back to .NET - sharp(physicalPath) - .resize(maxWidth || null, maxHeight || null) - .pipe(result.stream); -} diff --git a/samples/misc/NodeServicesExamples/NodeServicesExamples.csproj b/samples/misc/NodeServicesExamples/NodeServicesExamples.csproj new file mode 100644 index 00000000..874807b9 --- /dev/null +++ b/samples/misc/NodeServicesExamples/NodeServicesExamples.csproj @@ -0,0 +1,29 @@ + + + + netcoreapp3.0 + true + false + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/misc/NodeServicesExamples/NodeServicesExamples.xproj b/samples/misc/NodeServicesExamples/NodeServicesExamples.xproj deleted file mode 100644 index 2cd1742b..00000000 --- a/samples/misc/NodeServicesExamples/NodeServicesExamples.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - true - - - - 6d4bcdd6-7951-449b-be55-cb7f014b7430 - NodeServicesExamples - ..\..\..\JavaScriptServices.sln\artifacts\obj\$(MSBuildProjectName) - .\bin\ - - - 2.0 - 2018 - - - \ No newline at end of file diff --git a/samples/misc/NodeServicesExamples/Startup.cs b/samples/misc/NodeServicesExamples/Startup.cs index 1c38c60a..26f2ae86 100755 --- a/samples/misc/NodeServicesExamples/Startup.cs +++ b/samples/misc/NodeServicesExamples/Startup.cs @@ -17,6 +17,7 @@ public void ConfigureServices(IServiceCollection services) // Enable Node Services services.AddNodeServices(); + services.AddSpaPrerenderer(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -41,7 +42,6 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHo }); app.UseStaticFiles(); - loggerFactory.AddConsole(); app.UseMvc(routes => { routes.MapRoute( @@ -53,6 +53,11 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHo public static void Main(string[] args) { var host = new WebHostBuilder() + .ConfigureLogging(factory => + { + factory.AddConsole(); + factory.AddDebug(); + }) .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseKestrel() diff --git a/samples/misc/NodeServicesExamples/Views/Home/Chart.cshtml b/samples/misc/NodeServicesExamples/Views/Home/Chart.cshtml new file mode 100644 index 00000000..2775261e --- /dev/null +++ b/samples/misc/NodeServicesExamples/Views/Home/Chart.cshtml @@ -0,0 +1,12 @@ +

Server-rendered chart

+ +

+ This sample demonstrates how arbitrary NPM modules can be invoked from .NET code. +

+

+ In this case, we use node-chartist to render the following chart on the server. The output is + identical to what you'd get if you used chartist.js + on the client, except that in this example, we're not executing any client-side code at all. +

+ +@Html.Raw(ViewData["ChartMarkup"]) diff --git a/samples/misc/NodeServicesExamples/Views/Home/ImageResizing.cshtml b/samples/misc/NodeServicesExamples/Views/Home/ImageResizing.cshtml deleted file mode 100644 index ff1ae6b6..00000000 --- a/samples/misc/NodeServicesExamples/Views/Home/ImageResizing.cshtml +++ /dev/null @@ -1,34 +0,0 @@ -

Image Resizing

- -

- This sample shows how the NPM module sharp - can be used for dynamic image resizing from within an ASP.NET Core application. There is one copy of the - following image on disk, but we can set up an MVC action method that returns it resized to fit within an - arbitrary width and height. -

- -

- Dependencies: On Windows and Linux, there are no native dependencies. Just running - npm install is enough. On OS X, however, you need to have libvips installed, - which you can get through Homebrew by running - brew install homebrew/science/vips. -

- -

100px wide [open]

- - -

200px wide [open]

- - -

400px wide [open]

- - -

800px wide [open]

- - -

- Credit: - Parrot - by D Coetzee - is dedicated to the public domain (CC0) -

diff --git a/samples/misc/NodeServicesExamples/Views/Home/Index.cshtml b/samples/misc/NodeServicesExamples/Views/Home/Index.cshtml index 50d388c5..bbdc5631 100644 --- a/samples/misc/NodeServicesExamples/Views/Home/Index.cshtml +++ b/samples/misc/NodeServicesExamples/Views/Home/Index.cshtml @@ -7,7 +7,7 @@

diff --git a/samples/misc/NodeServicesExamples/Views/Home/Prerendering.cshtml b/samples/misc/NodeServicesExamples/Views/Home/Prerendering.cshtml new file mode 100644 index 00000000..bd5fff9d --- /dev/null +++ b/samples/misc/NodeServicesExamples/Views/Home/Prerendering.cshtml @@ -0,0 +1,21 @@ +

Server-side prerendering

+ +

+ This sample demonstrates how you can invoke a JavaScript module that contains + prerendering logic for a Single-Page Application framework. +

+

+ Your prerendering boot function will receive parameters that describe the page + being rendered and any data supplied by the .NET code. The return value should be + a promise that resolves with data to be injected into the page, such as the + rendered HTML and any global data that should be made available to client-side code. +

+ +@Html.Raw(ViewData["PrerenderedHtml"]) + + + + diff --git a/samples/misc/NodeServicesExamples/Views/Shared/_Layout.cshtml b/samples/misc/NodeServicesExamples/Views/Shared/_Layout.cshtml index 23ebe30d..93314312 100755 --- a/samples/misc/NodeServicesExamples/Views/Shared/_Layout.cshtml +++ b/samples/misc/NodeServicesExamples/Views/Shared/_Layout.cshtml @@ -1,8 +1,9 @@ - + NodeServices Examples + @RenderBody() diff --git a/samples/misc/NodeServicesExamples/package.json b/samples/misc/NodeServicesExamples/package.json index 6f6640d2..9787758b 100644 --- a/samples/misc/NodeServicesExamples/package.json +++ b/samples/misc/NodeServicesExamples/package.json @@ -2,8 +2,9 @@ "name": "nodeservicesexamples", "version": "0.0.0", "dependencies": { + "aspnet-prerendering": "^2.0.6", "babel-core": "^6.7.4", "babel-preset-es2015": "^6.6.0", - "sharp": "^0.15.0" + "node-chartist": "^1.0.2" } } diff --git a/samples/misc/NodeServicesExamples/project.json b/samples/misc/NodeServicesExamples/project.json deleted file mode 100755 index eb168a66..00000000 --- a/samples/misc/NodeServicesExamples/project.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "version": "1.0.0-*", - "tooling": { - "defaultNamespace": "NodeServicesExamples" - }, - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "runtimeOptions": { - "gcServer": true - }, - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0", - "type": "platform" - }, - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Mvc": "1.0.0", - "Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.Extensions.Configuration.Json": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0", - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.Extensions.Logging.Debug": "1.0.0", - "Microsoft.AspNetCore.NodeServices": "1.0.0-*" - }, - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "dnxcore50", - "portable-net45+win8" - ] - } - }, - "publishExclude": [ - "node_modules", - "bower_components", - "**.xproj", - "**.user", - "**.vspscc" - ], - "scripts": { - "prepublish": [ "npm install" ], - "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] - } -} diff --git a/samples/misc/NodeServicesExamples/wwwroot/css/chartist.min.css b/samples/misc/NodeServicesExamples/wwwroot/css/chartist.min.css new file mode 100644 index 00000000..9f9b908e --- /dev/null +++ b/samples/misc/NodeServicesExamples/wwwroot/css/chartist.min.css @@ -0,0 +1 @@ +.ct-double-octave:after,.ct-major-eleventh:after,.ct-major-second:after,.ct-major-seventh:after,.ct-major-sixth:after,.ct-major-tenth:after,.ct-major-third:after,.ct-major-twelfth:after,.ct-minor-second:after,.ct-minor-seventh:after,.ct-minor-sixth:after,.ct-minor-third:after,.ct-octave:after,.ct-perfect-fifth:after,.ct-perfect-fourth:after,.ct-square:after{content:"";clear:both}.ct-label{fill:rgba(0,0,0,.4);color:rgba(0,0,0,.4);font-size:.75rem;line-height:1}.ct-grid-background,.ct-line{fill:none}.ct-chart-bar .ct-label,.ct-chart-line .ct-label{display:block;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{dominant-baseline:central}.ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-vertical.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-end;-webkit-justify-content:flex-end;-ms-flex-pack:flex-end;justify-content:flex-end;text-align:right;text-anchor:end}.ct-label.ct-vertical.ct-end{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-webkit-justify-content:flex-end;-ms-flex-pack:flex-end;justify-content:flex-end;text-align:right;text-anchor:end}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:end}.ct-grid{stroke:rgba(0,0,0,.2);stroke-width:1px;stroke-dasharray:2px}.ct-point{stroke-width:10px;stroke-linecap:round}.ct-line{stroke-width:4px}.ct-area{stroke:none;fill-opacity:.1}.ct-bar{fill:none;stroke-width:10px}.ct-slice-donut{fill:none;stroke-width:60px}.ct-series-a .ct-bar,.ct-series-a .ct-line,.ct-series-a .ct-point,.ct-series-a .ct-slice-donut{stroke:#d70206}.ct-series-a .ct-area,.ct-series-a .ct-slice-pie{fill:#d70206}.ct-series-b .ct-bar,.ct-series-b .ct-line,.ct-series-b .ct-point,.ct-series-b .ct-slice-donut{stroke:#f05b4f}.ct-series-b .ct-area,.ct-series-b .ct-slice-pie{fill:#f05b4f}.ct-series-c .ct-bar,.ct-series-c .ct-line,.ct-series-c .ct-point,.ct-series-c .ct-slice-donut{stroke:#f4c63d}.ct-series-c .ct-area,.ct-series-c .ct-slice-pie{fill:#f4c63d}.ct-series-d .ct-bar,.ct-series-d .ct-line,.ct-series-d .ct-point,.ct-series-d .ct-slice-donut{stroke:#d17905}.ct-series-d .ct-area,.ct-series-d .ct-slice-pie{fill:#d17905}.ct-series-e .ct-bar,.ct-series-e .ct-line,.ct-series-e .ct-point,.ct-series-e .ct-slice-donut{stroke:#453d3f}.ct-series-e .ct-area,.ct-series-e .ct-slice-pie{fill:#453d3f}.ct-series-f .ct-bar,.ct-series-f .ct-line,.ct-series-f .ct-point,.ct-series-f .ct-slice-donut{stroke:#59922b}.ct-series-f .ct-area,.ct-series-f .ct-slice-pie{fill:#59922b}.ct-series-g .ct-bar,.ct-series-g .ct-line,.ct-series-g .ct-point,.ct-series-g .ct-slice-donut{stroke:#0544d3}.ct-series-g .ct-area,.ct-series-g .ct-slice-pie{fill:#0544d3}.ct-series-h .ct-bar,.ct-series-h .ct-line,.ct-series-h .ct-point,.ct-series-h .ct-slice-donut{stroke:#6b0392}.ct-series-h .ct-area,.ct-series-h .ct-slice-pie{fill:#6b0392}.ct-series-i .ct-bar,.ct-series-i .ct-line,.ct-series-i .ct-point,.ct-series-i .ct-slice-donut{stroke:#f05b4f}.ct-series-i .ct-area,.ct-series-i .ct-slice-pie{fill:#f05b4f}.ct-series-j .ct-bar,.ct-series-j .ct-line,.ct-series-j .ct-point,.ct-series-j .ct-slice-donut{stroke:#dda458}.ct-series-j .ct-area,.ct-series-j .ct-slice-pie{fill:#dda458}.ct-series-k .ct-bar,.ct-series-k .ct-line,.ct-series-k .ct-point,.ct-series-k .ct-slice-donut{stroke:#eacf7d}.ct-series-k .ct-area,.ct-series-k .ct-slice-pie{fill:#eacf7d}.ct-series-l .ct-bar,.ct-series-l .ct-line,.ct-series-l .ct-point,.ct-series-l .ct-slice-donut{stroke:#86797d}.ct-series-l .ct-area,.ct-series-l .ct-slice-pie{fill:#86797d}.ct-series-m .ct-bar,.ct-series-m .ct-line,.ct-series-m .ct-point,.ct-series-m .ct-slice-donut{stroke:#b2c326}.ct-series-m .ct-area,.ct-series-m .ct-slice-pie{fill:#b2c326}.ct-series-n .ct-bar,.ct-series-n .ct-line,.ct-series-n .ct-point,.ct-series-n .ct-slice-donut{stroke:#6188e2}.ct-series-n .ct-area,.ct-series-n .ct-slice-pie{fill:#6188e2}.ct-series-o .ct-bar,.ct-series-o .ct-line,.ct-series-o .ct-point,.ct-series-o .ct-slice-donut{stroke:#a748ca}.ct-series-o .ct-area,.ct-series-o .ct-slice-pie{fill:#a748ca}.ct-square{display:block;position:relative;width:100%}.ct-square:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:100%}.ct-square:after{display:table}.ct-square>svg{display:block;position:absolute;top:0;left:0}.ct-minor-second{display:block;position:relative;width:100%}.ct-minor-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:93.75%}.ct-minor-second:after{display:table}.ct-minor-second>svg{display:block;position:absolute;top:0;left:0}.ct-major-second{display:block;position:relative;width:100%}.ct-major-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:88.8888888889%}.ct-major-second:after{display:table}.ct-major-second>svg{display:block;position:absolute;top:0;left:0}.ct-minor-third{display:block;position:relative;width:100%}.ct-minor-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:83.3333333333%}.ct-minor-third:after{display:table}.ct-minor-third>svg{display:block;position:absolute;top:0;left:0}.ct-major-third{display:block;position:relative;width:100%}.ct-major-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:80%}.ct-major-third:after{display:table}.ct-major-third>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fourth{display:block;position:relative;width:100%}.ct-perfect-fourth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:75%}.ct-perfect-fourth:after{display:table}.ct-perfect-fourth>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fifth{display:block;position:relative;width:100%}.ct-perfect-fifth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:66.6666666667%}.ct-perfect-fifth:after{display:table}.ct-perfect-fifth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-sixth{display:block;position:relative;width:100%}.ct-minor-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:62.5%}.ct-minor-sixth:after{display:table}.ct-minor-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-golden-section{display:block;position:relative;width:100%}.ct-golden-section:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:61.804697157%}.ct-golden-section:after{content:"";display:table;clear:both}.ct-golden-section>svg{display:block;position:absolute;top:0;left:0}.ct-major-sixth{display:block;position:relative;width:100%}.ct-major-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:60%}.ct-major-sixth:after{display:table}.ct-major-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-seventh{display:block;position:relative;width:100%}.ct-minor-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:56.25%}.ct-minor-seventh:after{display:table}.ct-minor-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-seventh{display:block;position:relative;width:100%}.ct-major-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:53.3333333333%}.ct-major-seventh:after{display:table}.ct-major-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-octave{display:block;position:relative;width:100%}.ct-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:50%}.ct-octave:after{display:table}.ct-octave>svg{display:block;position:absolute;top:0;left:0}.ct-major-tenth{display:block;position:relative;width:100%}.ct-major-tenth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:40%}.ct-major-tenth:after{display:table}.ct-major-tenth>svg{display:block;position:absolute;top:0;left:0}.ct-major-eleventh{display:block;position:relative;width:100%}.ct-major-eleventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:37.5%}.ct-major-eleventh:after{display:table}.ct-major-eleventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-twelfth{display:block;position:relative;width:100%}.ct-major-twelfth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:33.3333333333%}.ct-major-twelfth:after{display:table}.ct-major-twelfth>svg{display:block;position:absolute;top:0;left:0}.ct-double-octave{display:block;position:relative;width:100%}.ct-double-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:25%}.ct-double-octave:after{display:table}.ct-double-octave>svg{display:block;position:absolute;top:0;left:0} \ No newline at end of file diff --git a/samples/misc/NodeServicesExamples/wwwroot/images/parrot.jpg b/samples/misc/NodeServicesExamples/wwwroot/images/parrot.jpg deleted file mode 100644 index 828a55b2..00000000 Binary files a/samples/misc/NodeServicesExamples/wwwroot/images/parrot.jpg and /dev/null differ diff --git a/samples/misc/Webpack/.gitignore b/samples/misc/Webpack/.gitignore index 0ca27f04..13634919 100644 --- a/samples/misc/Webpack/.gitignore +++ b/samples/misc/Webpack/.gitignore @@ -1,6 +1,9 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. +yarn.lock +wwwroot/dist + # User-specific files *.suo *.user @@ -40,10 +43,6 @@ TestResult.xml [Rr]eleasePS/ dlldata.c -# DNX -project.lock.json -artifacts/ - *_i.c *_p.c *_i.h diff --git a/samples/misc/Webpack/ActionResults/PrerenderResult.cs b/samples/misc/Webpack/ActionResults/PrerenderResult.cs index d038157e..4f2c8f50 100644 --- a/samples/misc/Webpack/ActionResults/PrerenderResult.cs +++ b/samples/misc/Webpack/ActionResults/PrerenderResult.cs @@ -27,6 +27,7 @@ public override async Task ExecuteResultAsync(ActionContext context) { var nodeServices = context.HttpContext.RequestServices.GetRequiredService(); var hostEnv = context.HttpContext.RequestServices.GetRequiredService(); + var applicationLifetime = context.HttpContext.RequestServices.GetRequiredService(); var applicationBasePath = hostEnv.ContentRootPath; var request = context.HttpContext.Request; var response = context.HttpContext.Response; @@ -34,11 +35,13 @@ public override async Task ExecuteResultAsync(ActionContext context) var prerenderedHtml = await Prerenderer.RenderToString( applicationBasePath, nodeServices, + applicationLifetime.ApplicationStopping, _moduleExport, request.GetEncodedUrl(), request.Path + request.QueryString.Value, _dataToSupply, - /* timeoutMilliseconds */ 30000 + /* timeoutMilliseconds */ 30000, + /* requestPathBase */ "/" ); response.ContentType = "text/html"; diff --git a/samples/misc/Webpack/Clientside/PrerenderingSample.ts b/samples/misc/Webpack/Clientside/PrerenderingSample.ts deleted file mode 100644 index 143ddd04..00000000 --- a/samples/misc/Webpack/Clientside/PrerenderingSample.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default function (params: any): Promise<{ html: string, globals?: any }> { - return new Promise((resolve, reject) => { - - // Here, you could put any logic that synchronously or asynchronously prerenders - // your SPA components. For example, see the boot-server.ts files in the Angular2Spa - // and ReactReduxSpa templates for ways to prerender Angular 2 and React components. - // - // If you wanted, you could use a property on the 'params.data' object to specify - // which SPA component or template to render. - - const html = ` -

Hello

- It works! You passed ${ JSON.stringify(params.data) } - and are currently requesting ${ params.location.path }`; - resolve({ html }); - }); -}; diff --git a/samples/misc/Webpack/Controllers/FullPagePrerenderingController.cs b/samples/misc/Webpack/Controllers/FullPagePrerenderingController.cs deleted file mode 100644 index 48935459..00000000 --- a/samples/misc/Webpack/Controllers/FullPagePrerenderingController.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.SpaServices.Prerendering; -using Webpack.ActionResults; - -namespace Webpack.Controllers -{ - // This sample shows how you could invoke the prerendering APIs directly from an MVC - // action result. - public class FullPagePrerenderingController : Controller - { - private static JavaScriptModuleExport BootModule = new JavaScriptModuleExport("Clientside/PrerenderingSample") - { - // Because the boot module is written in TypeScript, we need to specify a webpack - // config so it can be built. If it was written in JavaScript, this would not be needed. - WebpackConfig = "webpack.config.js" - }; - - public IActionResult Index() - { - var dataToSupply = new { nowTime = DateTime.Now.Ticks }; - return this.Prerender(BootModule, dataToSupply); - } - } -} diff --git a/samples/misc/Webpack/Dockerfile b/samples/misc/Webpack/Dockerfile deleted file mode 100644 index 63d7c456..00000000 --- a/samples/misc/Webpack/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM microsoft/aspnet:1.0.0-rc1-update1 - -RUN printf "deb http://ftp.us.debian.org/debian jessie main\n" >> /etc/apt/sources.list -RUN apt-get -qq update && apt-get install -qqy sqlite3 libsqlite3-dev && rm -rf /var/lib/apt/lists/* - -COPY . /app -WORKDIR /app -RUN ["dnu", "restore"] - -EXPOSE 5000/tcp -ENTRYPOINT ["dnx", "-p", "project.json", "web"] diff --git a/samples/misc/Webpack/Startup.cs b/samples/misc/Webpack/Startup.cs index c81e5c0d..a471781e 100755 --- a/samples/misc/Webpack/Startup.cs +++ b/samples/misc/Webpack/Startup.cs @@ -32,7 +32,6 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHo }); app.UseStaticFiles(); - loggerFactory.AddConsole(); app.UseMvc(routes => { routes.MapRoute( @@ -44,6 +43,11 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHo public static void Main(string[] args) { var host = new WebHostBuilder() + .ConfigureLogging(factory => + { + factory.AddConsole(); + factory.AddDebug(); + }) .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseKestrel() diff --git a/samples/misc/Webpack/Views/Home/Index.cshtml b/samples/misc/Webpack/Views/Home/Index.cshtml index 365dfaad..7828ec19 100755 --- a/samples/misc/Webpack/Views/Home/Index.cshtml +++ b/samples/misc/Webpack/Views/Home/Index.cshtml @@ -5,9 +5,6 @@

Hello

Hi there. Enter some text: -
-See also: Full-page prerendering example - @section scripts { } diff --git a/samples/misc/Webpack/Webpack.csproj b/samples/misc/Webpack/Webpack.csproj new file mode 100644 index 00000000..874807b9 --- /dev/null +++ b/samples/misc/Webpack/Webpack.csproj @@ -0,0 +1,29 @@ + + + + netcoreapp3.0 + true + false + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/misc/Webpack/Webpack.xproj b/samples/misc/Webpack/Webpack.xproj deleted file mode 100644 index 49bc6e47..00000000 --- a/samples/misc/Webpack/Webpack.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - true - - - - a8905301-8492-42fd-9e83-f715a0fdc3a2 - Webpack - ..\..\..\JavaScriptServices.sln\artifacts\obj\$(MSBuildProjectName) - .\bin\ - - - 2.0 - 2018 - - - \ No newline at end of file diff --git a/samples/misc/Webpack/package.json b/samples/misc/Webpack/package.json index e894a076..3216132b 100644 --- a/samples/misc/Webpack/package.json +++ b/samples/misc/Webpack/package.json @@ -11,9 +11,10 @@ "webpack-hot-middleware": "^2.7.1" }, "dependencies": { - "aspnet-webpack": "^1.0.3", "aspnet-prerendering": "^1.0.4", + "aspnet-webpack": "^1.0.3", "ts-loader": "^0.8.1", - "typescript": "^1.7.5" + "typescript": "^2.0.0", + "webpack": "^1.13.3" } } diff --git a/samples/misc/Webpack/project.json b/samples/misc/Webpack/project.json deleted file mode 100755 index 1b02246b..00000000 --- a/samples/misc/Webpack/project.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": "1.0.0-*", - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "runtimeOptions": { - "gcServer": true - }, - "tooling": { - "defaultNamespace": "Webpack" - }, - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0", - "type": "platform" - }, - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Mvc": "1.0.0", - "Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.Extensions.Configuration.Json": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0", - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.Extensions.Logging.Debug": "1.0.0", - "Microsoft.AspNetCore.SpaServices": "1.0.0-*" - }, - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "dnxcore50", - "portable-net45+win8" - ] - } - }, - "publishOptions": { - "exclude": [ - "node_modules", - "bower_components", - "**.xproj", - "**.user", - "**.vspscc" - ] - }, - "scripts": { - "prepublish": [ "npm install" ], - "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] - } -} diff --git a/samples/misc/Webpack/tsconfig.json b/samples/misc/Webpack/tsconfig.json index bb577c55..453b7a33 100644 --- a/samples/misc/Webpack/tsconfig.json +++ b/samples/misc/Webpack/tsconfig.json @@ -2,9 +2,10 @@ "compilerOptions": { "moduleResolution": "node", "module": "commonjs", - "target": "es6", + "target": "es5", "jsx": "preserve", - "sourceMap": true + "sourceMap": true, + "lib": ["es6", "dom"] }, "exclude": [ "node_modules" diff --git a/samples/misc/Webpack/webpack.config.dev.js b/samples/misc/Webpack/webpack.config.dev.js index 08e05f4b..fc339d2e 100644 --- a/samples/misc/Webpack/webpack.config.dev.js +++ b/samples/misc/Webpack/webpack.config.dev.js @@ -2,7 +2,7 @@ module.exports = { devtool: 'inline-source-map', module: { loaders: [ - { test: /\.less$/, loader: 'style!css!less' } + { test: /\.less$/, loader: 'style-loader!css-loader!less-loader' } ] } }; diff --git a/samples/misc/Webpack/webpack.config.prod.js b/samples/misc/Webpack/webpack.config.prod.js index 5dbe0c8f..56203448 100644 --- a/samples/misc/Webpack/webpack.config.prod.js +++ b/samples/misc/Webpack/webpack.config.prod.js @@ -5,11 +5,11 @@ var extractLESS = new ExtractTextPlugin('my-styles.css'); module.exports = { module: { loaders: [ - { test: /\.less$/, loader: extractLESS.extract(['css', 'less']) }, + { test: /\.less$/, loader: extractLESS.extract(['css-loader', 'less-loader']) }, ] }, plugins: [ extractLESS, - new webpack.optimize.UglifyJsPlugin({ minimize: true }) + new webpack.optimize.UglifyJsPlugin({ minimize: true, compressor: { warnings: false } }) ] }; diff --git a/samples/react/MusicStore/.babelrc b/samples/react/MusicStore/.babelrc deleted file mode 100644 index 86c445f5..00000000 --- a/samples/react/MusicStore/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015", "react"] -} diff --git a/samples/react/MusicStore/.gitignore b/samples/react/MusicStore/.gitignore deleted file mode 100644 index 8d1beebe..00000000 --- a/samples/react/MusicStore/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -music-db.sqlite -/wwwroot/dist/ -/node_modules/ -yarn.lock diff --git a/samples/react/MusicStore/Apis/AlbumsApiController.cs b/samples/react/MusicStore/Apis/AlbumsApiController.cs deleted file mode 100644 index 511f63c8..00000000 --- a/samples/react/MusicStore/Apis/AlbumsApiController.cs +++ /dev/null @@ -1,201 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; -using AutoMapper; -using MusicStore.Models; -using MusicStore.Infrastructure; - -namespace MusicStore.Apis -{ - [Route("api/albums")] - public class AlbumsApiController : Controller - { - private readonly MusicStoreContext _storeContext; - - public AlbumsApiController(MusicStoreContext storeContext) - { - _storeContext = storeContext; - } - - [HttpGet] - [NoCache] - public async Task Paged(int page = 1, int pageSize = 50, string sortBy = null) - { - await _storeContext.Genres.LoadAsync(); - await _storeContext.Artists.LoadAsync(); - - var albums = await _storeContext.Albums - .Include(a => a.Genre) - .Include(a => a.Artist) - .ToPagedListAsync(page, pageSize, sortBy, - a => a.Title, // sortExpression - SortDirection.Ascending, // defaultSortDirection - a => Mapper.Map(a, new AlbumResultDto())); // selector - - return Json(albums); - } - - [HttpGet("all")] - [NoCache] - public async Task All() - { - var albums = await _storeContext.Albums - .Include(a => a.Genre) - .Include(a => a.Artist) - .OrderBy(a => a.Title) - .ToListAsync(); - - return Json(albums.Select(a => Mapper.Map(a, new AlbumResultDto()))); - } - - [HttpGet("mostPopular")] - [NoCache] - public async Task MostPopular(int count = 6) - { - count = count > 0 && count < 20 ? count : 6; - var albums = await _storeContext.Albums - .OrderByDescending(a => a.OrderDetails.Count()) - .Take(count) - .ToListAsync(); - - // TODO: Move the .Select() to end of albums query when EF supports it - return Json(albums.Select(a => Mapper.Map(a, new AlbumResultDto()))); - } - - [HttpGet("{albumId:int}")] - [NoCache] - public async Task Details(int albumId) - { - await _storeContext.Genres.LoadAsync(); - await _storeContext.Artists.LoadAsync(); - - var album = await _storeContext.Albums - .Include(a => a.Artist) - .Include(a => a.Genre) - .Where(a => a.AlbumId == albumId) - .SingleOrDefaultAsync(); - - var albumResult = Mapper.Map(album, new AlbumResultDto()); - - // TODO: Add null checking and return 404 in that case - - return Json(albumResult); - } - - [HttpPost] - [Authorize("app-ManageStore")] - public async Task CreateAlbum([FromBody]AlbumChangeDto album) - { - if (!ModelState.IsValid) - { - // Return the model errors - return BadRequest(ModelState); - } - - // Save the changes to the DB - var dbAlbum = new Album(); - _storeContext.Albums.Add(Mapper.Map(album, dbAlbum)); - await _storeContext.SaveChangesAsync(); - - // TODO: Handle missing record, key violations, concurrency issues, etc. - - return new ObjectResult(new { - Data = dbAlbum.AlbumId, - Message = "Album created successfully." - }); - } - - [HttpPut("{albumId:int}/update")] - public async Task UpdateAlbum(int albumId, [FromBody] AlbumChangeDto album) - { - if (!ModelState.IsValid) - { - // Return the model errors - return BadRequest(ModelState); - } - - var dbAlbum = await _storeContext.Albums.SingleOrDefaultAsync(a => a.AlbumId == albumId); - - if (dbAlbum == null) - { - return new ObjectResult(new { - Message = string.Format("The album with ID {0} was not found.", albumId) - }) { StatusCode = 404 }; - } - - // Save the changes to the DB - Mapper.Map(album, dbAlbum); - await _storeContext.SaveChangesAsync(); - - // TODO: Handle missing record, key violations, concurrency issues, etc. - - return new ObjectResult (new { - Message = "Album updated successfully." - }); - } - - [HttpDelete("{albumId:int}")] - [Authorize("app-ManageStore")] - public async Task DeleteAlbum(int albumId) - { - var album = await _storeContext.Albums.SingleOrDefaultAsync(a => a.AlbumId == albumId); - - if (album != null) - { - _storeContext.Albums.Remove(album); - - // Save the changes to the DB - await _storeContext.SaveChangesAsync(); - - // TODO: Handle missing record, key violations, concurrency issues, etc. - } - - return new ObjectResult (new { - Message = "Album deleted successfully." - }); - } - } - - [ModelMetadataType(typeof(Album))] - public class AlbumChangeDto - { - public int GenreId { get; set; } - - public int ArtistId { get; set; } - - public string Title { get; set; } - - public decimal Price { get; set; } - - public string AlbumArtUrl { get; set; } - } - - public class AlbumResultDto : AlbumChangeDto - { - public AlbumResultDto() - { - Artist = new ArtistResultDto(); - Genre = new GenreResultDto(); - } - - public int AlbumId { get; set; } - - public ArtistResultDto Artist { get; private set; } - - public GenreResultDto Genre { get; private set; } - } - - public class ArtistResultDto - { - public string Name { get; set; } - } - - public class GenreResultDto - { - public string Name { get; set; } - } -} diff --git a/samples/react/MusicStore/Apis/ArtistsApiController.cs b/samples/react/MusicStore/Apis/ArtistsApiController.cs deleted file mode 100644 index f3568aeb..00000000 --- a/samples/react/MusicStore/Apis/ArtistsApiController.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; -using MusicStore.Models; - -namespace MusicStore.Apis -{ - [Route("api/artists")] - public class ArtistsApiController : Controller - { - private readonly MusicStoreContext _storeContext; - - public ArtistsApiController(MusicStoreContext storeContext) - { - _storeContext = storeContext; - } - - [HttpGet("lookup")] - public async Task Lookup() - { - var artists = await _storeContext.Artists - .OrderBy(a => a.Name) - .ToListAsync(); - - return Json(artists); - } - } -} diff --git a/samples/react/MusicStore/Apis/GenresApiController.cs b/samples/react/MusicStore/Apis/GenresApiController.cs deleted file mode 100644 index 338ca2fc..00000000 --- a/samples/react/MusicStore/Apis/GenresApiController.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; -using MusicStore.Models; -using MusicStore.Infrastructure; - -namespace MusicStore.Apis -{ - [Route("api/genres")] - public class GenresApiController : Controller - { - private readonly MusicStoreContext _storeContext; - - public GenresApiController(MusicStoreContext storeContext) - { - _storeContext = storeContext; - } - - [HttpGet] - public async Task GenreList() - { - var genres = await _storeContext.Genres - //.Include(g => g.Albums) - .OrderBy(g => g.Name) - .ToListAsync(); - - return Json(genres); - } - - [HttpGet("genre-lookup")] - public async Task Lookup() - { - var genres = await _storeContext.Genres - .Select(g => new { g.GenreId, g.Name }) - .ToListAsync(); - - return Json(genres); - } - - [HttpGet("menu")] - public async Task GenreMenuList(int count = 9) - { - count = count > 0 && count < 20 ? count : 9; - - var genres = await _storeContext.Genres - .OrderByDescending(g => - g.Albums.Sum(a => - a.OrderDetails.Sum(od => od.Quantity))) - .Take(count) - .ToListAsync(); - - return Json(genres); - } - - [HttpGet("{genreId:int}/albums")] - [NoCache] - public async Task GenreAlbums(int genreId) - { - var albums = await _storeContext.Albums - .Where(a => a.GenreId == genreId) - //.Include(a => a.Genre) - //.Include(a => a.Artist) - //.OrderBy(a => a.Genre.Name) - .ToListAsync(); - - return Json(albums); - } - } -} diff --git a/samples/react/MusicStore/Apis/Models/AccountViewModels.cs b/samples/react/MusicStore/Apis/Models/AccountViewModels.cs deleted file mode 100644 index 831978a5..00000000 --- a/samples/react/MusicStore/Apis/Models/AccountViewModels.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace MusicStore.Models -{ - public class ExternalLoginConfirmationViewModel - { - [Required] - [Display(Name = "User name")] - public string UserName { get; set; } - } - - public class ManageUserViewModel - { - [Required] - [DataType(DataType.Password)] - [Display(Name = "Current password")] - public string OldPassword { get; set; } - - [Required] - [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] - [DataType(DataType.Password)] - [Display(Name = "New password")] - public string NewPassword { get; set; } - - [DataType(DataType.Password)] - [Display(Name = "Confirm new password")] - [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] - public string ConfirmPassword { get; set; } - } - - public class LoginViewModel - { - [Required] - [Display(Name = "User name")] - public string UserName { get; set; } - - [Required] - [DataType(DataType.Password)] - [Display(Name = "Password")] - public string Password { get; set; } - - [Display(Name = "Remember me?")] - public bool RememberMe { get; set; } - } - - public class RegisterViewModel - { - [Required] - [Display(Name = "User name")] - public string UserName { get; set; } - - [Required] - [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] - [DataType(DataType.Password)] - [Display(Name = "Password")] - public string Password { get; set; } - - [DataType(DataType.Password)] - [Display(Name = "Confirm password")] - [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] - public string ConfirmPassword { get; set; } - } -} diff --git a/samples/react/MusicStore/Apis/Models/Album.cs b/samples/react/MusicStore/Apis/Models/Album.cs deleted file mode 100644 index 68e26ff9..00000000 --- a/samples/react/MusicStore/Apis/Models/Album.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; - -namespace MusicStore.Models -{ - public class Album - { - public Album() - { - // TODO: Temporary hack to populate the orderdetails until EF does this automatically. - OrderDetails = new List(); - } - - [ScaffoldColumn(false)] - public int AlbumId { get; set; } - - public int GenreId { get; set; } - - public int ArtistId { get; set; } - - [Required] - [StringLength(160, MinimumLength = 2)] - public string Title { get; set; } - - [Required] - [RangeAttribute(typeof(double), "0.01", "100")] // Long-form constructor to work around https://github.com/dotnet/coreclr/issues/2172 - [DataType(DataType.Currency)] - public decimal Price { get; set; } - - [Display(Name = "Album Art URL")] - [StringLength(1024)] - public string AlbumArtUrl { get; set; } - - public virtual Genre Genre { get; set; } - - public virtual Artist Artist { get; set; } - - public virtual ICollection OrderDetails { get; set; } - } -} diff --git a/samples/react/MusicStore/Apis/Models/Artist.cs b/samples/react/MusicStore/Apis/Models/Artist.cs deleted file mode 100644 index b364a898..00000000 --- a/samples/react/MusicStore/Apis/Models/Artist.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace MusicStore.Models -{ - public class Artist - { - public int ArtistId { get; set; } - - [Required] - public string Name { get; set; } - } -} diff --git a/samples/react/MusicStore/Apis/Models/CartItem.cs b/samples/react/MusicStore/Apis/Models/CartItem.cs deleted file mode 100644 index 7209462d..00000000 --- a/samples/react/MusicStore/Apis/Models/CartItem.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace MusicStore.Models -{ - public class CartItem - { - [Key] - public int CartItemId { get; set; } - - [Required] - public string CartId { get; set; } - public int AlbumId { get; set; } - public int Count { get; set; } - - [DataType(DataType.DateTime)] - public DateTime DateCreated { get; set; } - - public virtual Album Album { get; set; } - } -} diff --git a/samples/react/MusicStore/Apis/Models/Genre.cs b/samples/react/MusicStore/Apis/Models/Genre.cs deleted file mode 100644 index eed5616c..00000000 --- a/samples/react/MusicStore/Apis/Models/Genre.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using Newtonsoft.Json; - -namespace MusicStore.Models -{ - public class Genre - { - public Genre() - { - Albums = new List(); - } - - public int GenreId { get; set; } - - [Required] - public string Name { get; set; } - - public string Description { get; set; } - - [JsonIgnore] - public virtual ICollection Albums { get; set; } - } -} diff --git a/samples/react/MusicStore/Apis/Models/MusicStoreContext.cs b/samples/react/MusicStore/Apis/Models/MusicStoreContext.cs deleted file mode 100644 index aee7aedd..00000000 --- a/samples/react/MusicStore/Apis/Models/MusicStoreContext.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; - -namespace MusicStore.Models -{ - public class ApplicationUser : IdentityUser { } - - public class MusicStoreContext : IdentityDbContext - { - public MusicStoreContext(DbContextOptions options) : base(options) - { - } - - public DbSet Albums { get; set; } - public DbSet Artists { get; set; } - public DbSet Orders { get; set; } - public DbSet Genres { get; set; } - public DbSet CartItems { get; set; } - public DbSet OrderDetails { get; set; } - - protected override void OnModelCreating(ModelBuilder builder) - { - // Configure pluralization - builder.Entity().ToTable("Albums"); - builder.Entity().ToTable("Artists"); - builder.Entity().ToTable("Orders"); - builder.Entity().ToTable("Genres"); - builder.Entity().ToTable("CartItems"); - builder.Entity().ToTable("OrderDetails"); - - base.OnModelCreating(builder); - } - } -} diff --git a/samples/react/MusicStore/Apis/Models/Order.cs b/samples/react/MusicStore/Apis/Models/Order.cs deleted file mode 100644 index 110a77d8..00000000 --- a/samples/react/MusicStore/Apis/Models/Order.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; - -namespace MusicStore.Models -{ - //[Bind(Include = "FirstName,LastName,Address,City,State,PostalCode,Country,Phone,Email")] - public class Order - { - public Order() - { - OrderDetails = new List(); - } - - [ScaffoldColumn(false)] - public int OrderId { get; set; } - - [ScaffoldColumn(false)] - public DateTime OrderDate { get; set; } - - [Required] - [ScaffoldColumn(false)] - public string Username { get; set; } - - [Required] - [Display(Name = "First Name")] - [StringLength(160)] - public string FirstName { get; set; } - - [Required] - [Display(Name = "Last Name")] - [StringLength(160)] - public string LastName { get; set; } - - [Required] - [StringLength(70, MinimumLength = 3)] - public string Address { get; set; } - - [Required] - [StringLength(40)] - public string City { get; set; } - - [Required] - [StringLength(40)] - public string State { get; set; } - - [Required] - [Display(Name = "Postal Code")] - [StringLength(10, MinimumLength = 5)] - public string PostalCode { get; set; } - - [Required] - [StringLength(40)] - public string Country { get; set; } - - [Required] - [StringLength(24)] - [DataType(DataType.PhoneNumber)] - public string Phone { get; set; } - - [Required] - [Display(Name = "Email Address")] - [RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}", - ErrorMessage = "Email is not valid.")] - [DataType(DataType.EmailAddress)] - public string Email { get; set; } - - [ScaffoldColumn(false)] - public decimal Total { get; set; } - - public ICollection OrderDetails { get; set; } - } -} diff --git a/samples/react/MusicStore/Apis/Models/OrderDetail.cs b/samples/react/MusicStore/Apis/Models/OrderDetail.cs deleted file mode 100644 index cb1e6930..00000000 --- a/samples/react/MusicStore/Apis/Models/OrderDetail.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace MusicStore.Models -{ - public class OrderDetail - { - public int OrderDetailId { get; set; } - public int OrderId { get; set; } - public int AlbumId { get; set; } - public int Quantity { get; set; } - public decimal UnitPrice { get; set; } - - public virtual Album Album { get; set; } - public virtual Order Order { get; set; } - } -} diff --git a/samples/react/MusicStore/Apis/Models/SampleData.cs b/samples/react/MusicStore/Apis/Models/SampleData.cs deleted file mode 100644 index b1d98a7c..00000000 --- a/samples/react/MusicStore/Apis/Models/SampleData.cs +++ /dev/null @@ -1,915 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Options; - -namespace MusicStore.Models -{ - public static class SampleData - { - const string imgUrl = "/images/placeholder.png"; - - public static async Task InitializeMusicStoreDatabaseAsync(IServiceProvider serviceProvider) - { - using (var db = serviceProvider.GetService()) - { - if (await db.Database.EnsureCreatedAsync()) - { - await InsertTestData(serviceProvider); - } - } - } - - private static async Task InsertTestData(IServiceProvider serviceProvider) - { - var albums = GetAlbums(imgUrl, Genres, Artists); - await AddOrUpdateAsync(serviceProvider, g => g.GenreId, Genres.Select(genre => genre.Value)); - await AddOrUpdateAsync(serviceProvider, a => a.ArtistId, Artists.Select(artist => artist.Value)); - await AddOrUpdateAsync(serviceProvider, a => a.AlbumId, albums); - } - - // TODO [EF] This may be replaced by a first class mechanism in EF - private static async Task AddOrUpdateAsync( - IServiceProvider serviceProvider, - Func propertyToMatch, IEnumerable entities) - where TEntity : class - { - // Query in a separate context so that we can attach existing entities as modified - List existingData; - - using (var scope = serviceProvider.GetRequiredService().CreateScope()) - using (var db = scope.ServiceProvider.GetService()) - { - existingData = db.Set().ToList(); - } - - using (var scope = serviceProvider.GetRequiredService().CreateScope()) - using (var db = scope.ServiceProvider.GetService()) - { - foreach (var item in entities) - { - db.Entry(item).State = existingData.Any(g => propertyToMatch(g).Equals(propertyToMatch(item))) - ? EntityState.Modified - : EntityState.Added; - } - - await db.SaveChangesAsync(); - } - } - - private static Album[] GetAlbums(string imgUrl, Dictionary genres, Dictionary artists) - { - var albums = new Album[] - { - new Album { Title = "The Best Of The Men At Work", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Men At Work"], AlbumArtUrl = imgUrl }, - new Album { Title = "...And Justice For All", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "עד גבול האור", Genre = genres["World"], Price = 8.99M, Artist = artists["אריק אינשטיין"], AlbumArtUrl = imgUrl }, - new Album { Title = "Black Light Syndrome", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Terry Bozzio, Tony Levin & Steve Stevens"], AlbumArtUrl = imgUrl }, - new Album { Title = "10,000 Days", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl }, - new Album { Title = "11i", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Supreme Beings of Leisure"], AlbumArtUrl = imgUrl }, - new Album { Title = "1960", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Soul-Junk"], AlbumArtUrl = imgUrl }, - new Album { Title = "4x4=12 ", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["deadmau5"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Copland Celebration, Vol. I", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Symphony Orchestra"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Lively Mind", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Paul Oakenfold"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Matter of Life and Death", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Real Dead One", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Real Live One", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Rush of Blood to the Head", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Coldplay"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Soprano Inspired", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Britten Sinfonia, Ivor Bolton & Lesley Garrett"], AlbumArtUrl = imgUrl }, - new Album { Title = "A Winter Symphony", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Abbey Road", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ace Of Spades", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Motörhead"], AlbumArtUrl = imgUrl }, - new Album { Title = "Achtung Baby", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Acústico MTV", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl }, - new Album { Title = "Adams, John: The Chairman Dances", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Edo de Waart & San Francisco Symphony"], AlbumArtUrl = imgUrl }, - new Album { Title = "Adrenaline", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deftones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ænima", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl }, - new Album { Title = "Afrociberdelia", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Science & Nação Zumbi"], AlbumArtUrl = imgUrl }, - new Album { Title = "After the Goldrush", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Neil Young"], AlbumArtUrl = imgUrl }, - new Album { Title = "Airdrawn Dagger", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Sasha"], AlbumArtUrl = imgUrl }, - new Album { Title = "Album Title Goes Here", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["deadmau5"], AlbumArtUrl = imgUrl }, - new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 1]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Label Society"], AlbumArtUrl = imgUrl }, - new Album { Title = "Alcohol Fueled Brewtality Live! [Disc 2]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Label Society"], AlbumArtUrl = imgUrl }, - new Album { Title = "Alive 2007", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Daft Punk"], AlbumArtUrl = imgUrl }, - new Album { Title = "All I Ask of You", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Amen (So Be It)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paddy Casey"], AlbumArtUrl = imgUrl }, - new Album { Title = "Animal Vehicle", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Axis of Awesome"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ao Vivo [IMPORT]", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Zeca Pagodinho"], AlbumArtUrl = imgUrl }, - new Album { Title = "Apocalyptic Love", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Slash"], AlbumArtUrl = imgUrl }, - new Album { Title = "Appetite for Destruction", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "Are You Experienced?", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Jimi Hendrix"], AlbumArtUrl = imgUrl }, - new Album { Title = "Arquivo II", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl }, - new Album { Title = "Arquivo Os Paralamas Do Sucesso", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Os Paralamas Do Sucesso"], AlbumArtUrl = imgUrl }, - new Album { Title = "A-Sides", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Soundgarden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Audioslave", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Audioslave"], AlbumArtUrl = imgUrl }, - new Album { Title = "Automatic for the People", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["R.E.M."], AlbumArtUrl = imgUrl }, - new Album { Title = "Axé Bahia 2001", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl }, - new Album { Title = "Babel", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Mumford & Sons"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bach: Goldberg Variations", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Wilhelm Kempff"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bach: The Brandenburg Concertos", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Orchestra of The Age of Enlightenment"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bach: The Cello Suites", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Yo-Yo Ma"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bach: Toccata & Fugue in D Minor", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Ton Koopman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bad Motorfinger", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Soundgarden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Balls to the Wall", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Accept"], AlbumArtUrl = imgUrl }, - new Album { Title = "Banadeek Ta'ala", Genre = genres["World"], Price = 8.99M, Artist = artists["Amr Diab"], AlbumArtUrl = imgUrl }, - new Album { Title = "Barbie Girl", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Aqua"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bark at the Moon (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bartok: Violin & Viola Concertos", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Yehudi Menuhin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Barulhinho Bom", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Marisa Monte"], AlbumArtUrl = imgUrl }, - new Album { Title = "BBC Sessions [Disc 1] [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "BBC Sessions [Disc 2] [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Be Here Now", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Oasis"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bedrock 11 Compiled & Mixed", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["John Digweed"], AlbumArtUrl = imgUrl }, - new Album { Title = "Berlioz: Symphonie Fantastique", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Michael Tilson Thomas"], AlbumArtUrl = imgUrl }, - new Album { Title = "Beyond Good And Evil", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Cult"], AlbumArtUrl = imgUrl }, - new Album { Title = "Big Bad Wolf ", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Armand Van Helden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Big Ones", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Aerosmith"], AlbumArtUrl = imgUrl }, - new Album { Title = "Black Album", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Black Sabbath Vol. 4 (Remaster)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Sabbath"], AlbumArtUrl = imgUrl }, - new Album { Title = "Black Sabbath", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Black Sabbath"], AlbumArtUrl = imgUrl }, - new Album { Title = "Black", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Blackwater Park", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Opeth"], AlbumArtUrl = imgUrl }, - new Album { Title = "Blizzard of Ozz", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Blood", Genre = genres["Rock"], Price = 8.99M, Artist = artists["In This Moment"], AlbumArtUrl = imgUrl }, - new Album { Title = "Blue Moods", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Incognito"], AlbumArtUrl = imgUrl }, - new Album { Title = "Blue", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Weezer"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bongo Fury", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Frank Zappa & Captain Beefheart"], AlbumArtUrl = imgUrl }, - new Album { Title = "Boys & Girls", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alabama Shakes"], AlbumArtUrl = imgUrl }, - new Album { Title = "Brave New World", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "B-Sides 1980-1990", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Bunkka", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Paul Oakenfold"], AlbumArtUrl = imgUrl }, - new Album { Title = "By The Way", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Red Hot Chili Peppers"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cake: B-Sides and Rarities", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Cake"], AlbumArtUrl = imgUrl }, - new Album { Title = "Californication", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Red Hot Chili Peppers"], AlbumArtUrl = imgUrl }, - new Album { Title = "Carmina Burana", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Boston Symphony Orchestra & Seiji Ozawa"], AlbumArtUrl = imgUrl }, - new Album { Title = "Carried to Dust (Bonus Track Version)", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Calexico"], AlbumArtUrl = imgUrl }, - new Album { Title = "Carry On", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Chris Cornell"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cássia Eller - Sem Limite [Disc 1]", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cássia Eller"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chemical Wedding", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Bruce Dickinson"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chill: Brazil (Disc 1)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Marcos Valle"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chill: Brazil (Disc 2)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Antônio Carlos Jobim"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chocolate Starfish And The Hot Dog Flavored Water", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Limp Bizkit"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chronicle, Vol. 1", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Creedence Clearwater Revival"], AlbumArtUrl = imgUrl }, - new Album { Title = "Chronicle, Vol. 2", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Creedence Clearwater Revival"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ciao, Baby", Genre = genres["Rock"], Price = 8.99M, Artist = artists["TheStart"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cidade Negra - Hits", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cidade Negra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Classic Munkle: Turbo Edition", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Munkle"], AlbumArtUrl = imgUrl }, - new Album { Title = "Classics: The Best of Sarah Brightman", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Coda", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Come Away With Me", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Norah Jones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Come Taste The Band", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Comfort Eagle", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Cake"], AlbumArtUrl = imgUrl }, - new Album { Title = "Common Reaction", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Uh Huh Her "], AlbumArtUrl = imgUrl }, - new Album { Title = "Compositores", Genre = genres["Rock"], Price = 8.99M, Artist = artists["O Terço"], AlbumArtUrl = imgUrl }, - new Album { Title = "Contraband", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Velvet Revolver"], AlbumArtUrl = imgUrl }, - new Album { Title = "Core", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Stone Temple Pilots"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cornerstone", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Styx"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cosmicolor", Genre = genres["Rap"], Price = 8.99M, Artist = artists["M-Flo"], AlbumArtUrl = imgUrl }, - new Album { Title = "Cross", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Justice"], AlbumArtUrl = imgUrl }, - new Album { Title = "Culture of Fear", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Thievery Corporation"], AlbumArtUrl = imgUrl }, - new Album { Title = "Da Lama Ao Caos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Science & Nação Zumbi"], AlbumArtUrl = imgUrl }, - new Album { Title = "Dakshina", Genre = genres["World"], Price = 8.99M, Artist = artists["Deva Premal"], AlbumArtUrl = imgUrl }, - new Album { Title = "Dark Side of the Moon", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl }, - new Album { Title = "Death Magnetic", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Deep End of Down", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Above the Fold"], AlbumArtUrl = imgUrl }, - new Album { Title = "Deep Purple In Rock", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Deixa Entrar", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Falamansa"], AlbumArtUrl = imgUrl }, - new Album { Title = "Deja Vu", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Crosby, Stills, Nash, and Young"], AlbumArtUrl = imgUrl }, - new Album { Title = "Di Korpu Ku Alma", Genre = genres["World"], Price = 8.99M, Artist = artists["Lura"], AlbumArtUrl = imgUrl }, - new Album { Title = "Diary of a Madman (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Diary of a Madman", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Dirt", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alice in Chains"], AlbumArtUrl = imgUrl }, - new Album { Title = "Diver Down", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Djavan Ao Vivo - Vol. 02", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Djavan"], AlbumArtUrl = imgUrl }, - new Album { Title = "Djavan Ao Vivo - Vol. 1", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Djavan"], AlbumArtUrl = imgUrl }, - new Album { Title = "Drum'n'bass for Papa", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Plug"], AlbumArtUrl = imgUrl }, - new Album { Title = "Duluth", Genre = genres["Country"], Price = 8.99M, Artist = artists["Trampled By Turtles"], AlbumArtUrl = imgUrl }, - new Album { Title = "Dummy", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Portishead"], AlbumArtUrl = imgUrl }, - new Album { Title = "Duos II", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Luciana Souza/Romero Lubambo"], AlbumArtUrl = imgUrl }, - new Album { Title = "Earl Scruggs and Friends", Genre = genres["Country"], Price = 8.99M, Artist = artists["Earl Scruggs"], AlbumArtUrl = imgUrl }, - new Album { Title = "Eden", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "El Camino", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Black Keys"], AlbumArtUrl = imgUrl }, - new Album { Title = "Elegant Gypsy", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Al di Meola"], AlbumArtUrl = imgUrl }, - new Album { Title = "Elements Of Life", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Tiësto"], AlbumArtUrl = imgUrl }, - new Album { Title = "Elis Regina-Minha História", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Elis Regina"], AlbumArtUrl = imgUrl }, - new Album { Title = "Emergency On Planet Earth", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Jamiroquai"], AlbumArtUrl = imgUrl }, - new Album { Title = "Emotion", Genre = genres["World"], Price = 8.99M, Artist = artists["Papa Wemba"], AlbumArtUrl = imgUrl }, - new Album { Title = "English Renaissance", Genre = genres["Classical"], Price = 8.99M, Artist = artists["The King's Singers"], AlbumArtUrl = imgUrl }, - new Album { Title = "Every Kind of Light", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Posies"], AlbumArtUrl = imgUrl }, - new Album { Title = "Faceless", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Godsmack"], AlbumArtUrl = imgUrl }, - new Album { Title = "Facelift", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alice in Chains"], AlbumArtUrl = imgUrl }, - new Album { Title = "Fair Warning", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Fear of a Black Planet", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Public Enemy"], AlbumArtUrl = imgUrl }, - new Album { Title = "Fear Of The Dark", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Feels Like Home", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Norah Jones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Fireball", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Fly", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "For Those About To Rock We Salute You", Genre = genres["Rock"], Price = 8.99M, Artist = artists["AC/DC"], AlbumArtUrl = imgUrl }, - new Album { Title = "Four", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Blues Traveler"], AlbumArtUrl = imgUrl }, - new Album { Title = "Frank", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Amy Winehouse"], AlbumArtUrl = imgUrl }, - new Album { Title = "Further Down the Spiral", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Nine Inch Nails"], AlbumArtUrl = imgUrl }, - new Album { Title = "Garage Inc. (Disc 1)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Garage Inc. (Disc 2)", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Garbage", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Garbage"], AlbumArtUrl = imgUrl }, - new Album { Title = "Good News For People Who Love Bad News", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Modest Mouse"], AlbumArtUrl = imgUrl }, - new Album { Title = "Gordon", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Barenaked Ladies"], AlbumArtUrl = imgUrl }, - new Album { Title = "Górecki: Symphony No. 3", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Adrian Leaper & Doreen de Feis"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Hits I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Hits II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Hits", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Duck Sauce"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Hits", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Lenny Kravitz"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Hits", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Lenny Kravitz"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greatest Kiss", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Kiss"], AlbumArtUrl = imgUrl }, - new Album { Title = "Greetings from Michigan", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Sufjan Stevens"], AlbumArtUrl = imgUrl }, - new Album { Title = "Group Therapy", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Above & Beyond"], AlbumArtUrl = imgUrl }, - new Album { Title = "Handel: The Messiah (Highlights)", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Scholars Baroque Ensemble"], AlbumArtUrl = imgUrl }, - new Album { Title = "Haydn: Symphonies 99 - 104", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Royal Philharmonic Orchestra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Heart of the Night", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Spyro Gyra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Heart On", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Eagles of Death Metal"], AlbumArtUrl = imgUrl }, - new Album { Title = "Holy Diver", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Dio"], AlbumArtUrl = imgUrl }, - new Album { Title = "Homework", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Daft Punk"], AlbumArtUrl = imgUrl }, - new Album { Title = "Hot Rocks, 1964-1971 (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Houses Of The Holy", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "How To Dismantle An Atomic Bomb", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Human", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Projected"], AlbumArtUrl = imgUrl }, - new Album { Title = "Hunky Dory", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Bowie"], AlbumArtUrl = imgUrl }, - new Album { Title = "Hymns", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Projected"], AlbumArtUrl = imgUrl }, - new Album { Title = "Hysteria", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Def Leppard"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Absentia", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Porcupine Tree"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Between", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Paul Van Dyk"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Rainbows", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Radiohead"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Step", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Stevie Ray Vaughan & Double Trouble"], AlbumArtUrl = imgUrl }, - new Album { Title = "In the court of the Crimson King", Genre = genres["Rock"], Price = 8.99M, Artist = artists["King Crimson"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Through The Out Door", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Your Honor [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl }, - new Album { Title = "In Your Honor [Disc 2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl }, - new Album { Title = "Indestructible", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rancid"], AlbumArtUrl = imgUrl }, - new Album { Title = "Infinity", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Journey"], AlbumArtUrl = imgUrl }, - new Album { Title = "Into The Light", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Coverdale"], AlbumArtUrl = imgUrl }, - new Album { Title = "Introspective", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Pet Shop Boys"], AlbumArtUrl = imgUrl }, - new Album { Title = "Iron Maiden", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "ISAM", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Amon Tobin"], AlbumArtUrl = imgUrl }, - new Album { Title = "IV", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Jagged Little Pill", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Alanis Morissette"], AlbumArtUrl = imgUrl }, - new Album { Title = "Jagged Little Pill", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Alanis Morissette"], AlbumArtUrl = imgUrl }, - new Album { Title = "Jorge Ben Jor 25 Anos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Jorge Ben"], AlbumArtUrl = imgUrl }, - new Album { Title = "Jota Quest-1995", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Jota Quest"], AlbumArtUrl = imgUrl }, - new Album { Title = "Kick", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["INXS"], AlbumArtUrl = imgUrl }, - new Album { Title = "Kill 'Em All", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Kind of Blue", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl }, - new Album { Title = "King For A Day Fool For A Lifetime", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Faith No More"], AlbumArtUrl = imgUrl }, - new Album { Title = "Kiss", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Carly Rae Jepsen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Last Call", Genre = genres["Country"], Price = 8.99M, Artist = artists["Cayouche"], AlbumArtUrl = imgUrl }, - new Album { Title = "Le Freak", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Chic"], AlbumArtUrl = imgUrl }, - new Album { Title = "Le Tigre", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Le Tigre"], AlbumArtUrl = imgUrl }, - new Album { Title = "Led Zeppelin I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Led Zeppelin II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Led Zeppelin III", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Let There Be Rock", Genre = genres["Rock"], Price = 8.99M, Artist = artists["AC/DC"], AlbumArtUrl = imgUrl }, - new Album { Title = "Little Earthquakes", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Tori Amos"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live [Disc 1]", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live [Disc 2]", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live After Death", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live At Donington 1992 (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live At Donington 1992 (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live on Earth", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["The Cat Empire"], AlbumArtUrl = imgUrl }, - new Album { Title = "Live On Two Legs [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl }, - new Album { Title = "Living After Midnight", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Judas Priest"], AlbumArtUrl = imgUrl }, - new Album { Title = "Living", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paddy Casey"], AlbumArtUrl = imgUrl }, - new Album { Title = "Load", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Love Changes Everything", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "MacArthur Park Suite", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Donna Summer"], AlbumArtUrl = imgUrl }, - new Album { Title = "Machine Head", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Magical Mystery Tour", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mais Do Mesmo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Legião Urbana"], AlbumArtUrl = imgUrl }, - new Album { Title = "Maquinarama", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Skank"], AlbumArtUrl = imgUrl }, - new Album { Title = "Marasim", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Jagjit Singh"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mascagni: Cavalleria Rusticana", Genre = genres["Classical"], Price = 8.99M, Artist = artists["James Levine"], AlbumArtUrl = imgUrl }, - new Album { Title = "Master of Puppets", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mechanics & Mathematics", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Venus Hum"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mental Jewelry", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Live"], AlbumArtUrl = imgUrl }, - new Album { Title = "Metallics", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "meteora", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Linkin Park"], AlbumArtUrl = imgUrl }, - new Album { Title = "Meus Momentos", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Gonzaguinha"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mezmerize", Genre = genres["Metal"], Price = 8.99M, Artist = artists["System Of A Down"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mezzanine", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Massive Attack"], AlbumArtUrl = imgUrl }, - new Album { Title = "Miles Ahead", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl }, - new Album { Title = "Milton Nascimento Ao Vivo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Milton Nascimento"], AlbumArtUrl = imgUrl }, - new Album { Title = "Minas", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Milton Nascimento"], AlbumArtUrl = imgUrl }, - new Album { Title = "Minha Historia", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Chico Buarque"], AlbumArtUrl = imgUrl }, - new Album { Title = "Misplaced Childhood", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Marillion"], AlbumArtUrl = imgUrl }, - new Album { Title = "MK III The Final Concerts [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Morning Dance", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Spyro Gyra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Motley Crue Greatest Hits", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Mötley Crüe"], AlbumArtUrl = imgUrl }, - new Album { Title = "Moving Pictures", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rush"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mozart: Chamber Music", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Nash Ensemble"], AlbumArtUrl = imgUrl }, - new Album { Title = "Mozart: Symphonies Nos. 40 & 41", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Berliner Philharmoniker"], AlbumArtUrl = imgUrl }, - new Album { Title = "Murder Ballads", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Nick Cave and the Bad Seeds"], AlbumArtUrl = imgUrl }, - new Album { Title = "Music For The Jilted Generation", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["The Prodigy"], AlbumArtUrl = imgUrl }, - new Album { Title = "My Generation - The Very Best Of The Who", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Who"], AlbumArtUrl = imgUrl }, - new Album { Title = "My Name is Skrillex", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Skrillex"], AlbumArtUrl = imgUrl }, - new Album { Title = "Na Pista", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Cláudio Zoli"], AlbumArtUrl = imgUrl }, - new Album { Title = "Nevermind", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Nirvana"], AlbumArtUrl = imgUrl }, - new Album { Title = "New Adventures In Hi-Fi", Genre = genres["Rock"], Price = 8.99M, Artist = artists["R.E.M."], AlbumArtUrl = imgUrl }, - new Album { Title = "New Divide", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Linkin Park"], AlbumArtUrl = imgUrl }, - new Album { Title = "New York Dolls", Genre = genres["Punk"], Price = 8.99M, Artist = artists["New York Dolls"], AlbumArtUrl = imgUrl }, - new Album { Title = "News Of The World", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Nielsen: The Six Symphonies", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Göteborgs Symfoniker & Neeme Järvi"], AlbumArtUrl = imgUrl }, - new Album { Title = "Night At The Opera", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Queen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Night Castle", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Trans-Siberian Orchestra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Nkolo", Genre = genres["World"], Price = 8.99M, Artist = artists["Lokua Kanza"], AlbumArtUrl = imgUrl }, - new Album { Title = "No More Tears (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "No Prayer For The Dying", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "No Security", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl }, - new Album { Title = "O Brother, Where Art Thou?", Genre = genres["Country"], Price = 8.99M, Artist = artists["Alison Krauss"], AlbumArtUrl = imgUrl }, - new Album { Title = "O Samba Poconé", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Skank"], AlbumArtUrl = imgUrl }, - new Album { Title = "O(+>", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Prince"], AlbumArtUrl = imgUrl }, - new Album { Title = "Oceania", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Smashing Pumpkins"], AlbumArtUrl = imgUrl }, - new Album { Title = "Off the Deep End", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Weird Al"], AlbumArtUrl = imgUrl }, - new Album { Title = "OK Computer", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Radiohead"], AlbumArtUrl = imgUrl }, - new Album { Title = "Olodum", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Olodum"], AlbumArtUrl = imgUrl }, - new Album { Title = "One Love", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["David Guetta"], AlbumArtUrl = imgUrl }, - new Album { Title = "Operation: Mindcrime", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Queensrÿche"], AlbumArtUrl = imgUrl }, - new Album { Title = "Opiate", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl }, - new Album { Title = "Outbreak", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Dennis Chambers"], AlbumArtUrl = imgUrl }, - new Album { Title = "Pachelbel: Canon & Gigue", Genre = genres["Classical"], Price = 8.99M, Artist = artists["English Concert & Trevor Pinnock"], AlbumArtUrl = imgUrl }, - new Album { Title = "Paid in Full", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Eric B. and Rakim"], AlbumArtUrl = imgUrl }, - new Album { Title = "Para Siempre", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Vicente Fernandez"], AlbumArtUrl = imgUrl }, - new Album { Title = "Pause", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Four Tet"], AlbumArtUrl = imgUrl }, - new Album { Title = "Peace Sells... but Who's Buying", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Megadeth"], AlbumArtUrl = imgUrl }, - new Album { Title = "Physical Graffiti [Disc 1]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Physical Graffiti [Disc 2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Physical Graffiti", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Piece Of Mind", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Pinkerton", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Weezer"], AlbumArtUrl = imgUrl }, - new Album { Title = "Plays Metallica By Four Cellos", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Apocalyptica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Pop", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Powerslave", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Prenda Minha", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Caetano Veloso"], AlbumArtUrl = imgUrl }, - new Album { Title = "Presence", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Pretty Hate Machine", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Nine Inch Nails"], AlbumArtUrl = imgUrl }, - new Album { Title = "Prisoner", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Jezabels"], AlbumArtUrl = imgUrl }, - new Album { Title = "Privateering", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Mark Knopfler"], AlbumArtUrl = imgUrl }, - new Album { Title = "Prokofiev: Romeo & Juliet", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Michael Tilson Thomas"], AlbumArtUrl = imgUrl }, - new Album { Title = "Prokofiev: Symphony No.1", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sergei Prokofiev & Yuri Temirkanov"], AlbumArtUrl = imgUrl }, - new Album { Title = "PSY's Best 6th Part 1", Genre = genres["Pop"], Price = 8.99M, Artist = artists["PSY"], AlbumArtUrl = imgUrl }, - new Album { Title = "Purcell: The Fairy Queen", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Classical Players"], AlbumArtUrl = imgUrl }, - new Album { Title = "Purpendicular", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Purple", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Stone Temple Pilots"], AlbumArtUrl = imgUrl }, - new Album { Title = "Quanta Gente Veio Ver (Live)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Gilberto Gil"], AlbumArtUrl = imgUrl }, - new Album { Title = "Quanta Gente Veio ver--Bônus De Carnaval", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Gilberto Gil"], AlbumArtUrl = imgUrl }, - new Album { Title = "Quiet Songs", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Aisha Duo"], AlbumArtUrl = imgUrl }, - new Album { Title = "Raices", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Los Tigres del Norte"], AlbumArtUrl = imgUrl }, - new Album { Title = "Raising Hell", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Run DMC"], AlbumArtUrl = imgUrl }, - new Album { Title = "Raoul and the Kings of Spain ", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tears For Fears"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rattle And Hum", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Raul Seixas", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Raul Seixas"], AlbumArtUrl = imgUrl }, - new Album { Title = "Recovery [Explicit]", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Eminem"], AlbumArtUrl = imgUrl }, - new Album { Title = "Reign In Blood", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Slayer"], AlbumArtUrl = imgUrl }, - new Album { Title = "Relayed", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Yes"], AlbumArtUrl = imgUrl }, - new Album { Title = "ReLoad", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Respighi:Pines of Rome", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Eugene Ormandy"], AlbumArtUrl = imgUrl }, - new Album { Title = "Restless and Wild", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Accept"], AlbumArtUrl = imgUrl }, - new Album { Title = "Retrospective I (1974-1980)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Rush"], AlbumArtUrl = imgUrl }, - new Album { Title = "Revelations", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Audioslave"], AlbumArtUrl = imgUrl }, - new Album { Title = "Revolver", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Beatles"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ride the Lighting ", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ride The Lightning", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ring My Bell", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Anita Ward"], AlbumArtUrl = imgUrl }, - new Album { Title = "Riot Act", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rise of the Phoenix", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Before the Dawn"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rock In Rio [CD1]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rock In Rio [CD2]", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rock In Rio [CD2]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Roda De Funk", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Funk Como Le Gusta"], AlbumArtUrl = imgUrl }, - new Album { Title = "Room for Squares", Genre = genres["Pop"], Price = 8.99M, Artist = artists["John Mayer"], AlbumArtUrl = imgUrl }, - new Album { Title = "Root Down", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Jimmy Smith"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rounds", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Four Tet"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rubber Factory", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Black Keys"], AlbumArtUrl = imgUrl }, - new Album { Title = "Rust in Peace", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Megadeth"], AlbumArtUrl = imgUrl }, - new Album { Title = "Sambas De Enredo 2001", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl }, - new Album { Title = "Santana - As Years Go By", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl }, - new Album { Title = "Santana Live", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl }, - new Album { Title = "Saturday Night Fever", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Bee Gees"], AlbumArtUrl = imgUrl }, - new Album { Title = "Scary Monsters and Nice Sprites", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Skrillex"], AlbumArtUrl = imgUrl }, - new Album { Title = "Scheherazade", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Chicago Symphony Orchestra & Fritz Reiner"], AlbumArtUrl = imgUrl }, - new Album { Title = "SCRIABIN: Vers la flamme", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Christopher O'Riley"], AlbumArtUrl = imgUrl }, - new Album { Title = "Second Coming", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Stone Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "Serie Sem Limite (Disc 1)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Tim Maia"], AlbumArtUrl = imgUrl }, - new Album { Title = "Serie Sem Limite (Disc 2)", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Tim Maia"], AlbumArtUrl = imgUrl }, - new Album { Title = "Serious About Men", Genre = genres["Rap"], Price = 8.99M, Artist = artists["The Rubberbandits"], AlbumArtUrl = imgUrl }, - new Album { Title = "Seventh Son of a Seventh Son", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Short Bus", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Filter"], AlbumArtUrl = imgUrl }, - new Album { Title = "Sibelius: Finlandia", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Berliner Philharmoniker"], AlbumArtUrl = imgUrl }, - new Album { Title = "Singles Collection", Genre = genres["Rock"], Price = 8.99M, Artist = artists["David Bowie"], AlbumArtUrl = imgUrl }, - new Album { Title = "Six Degrees of Inner Turbulence", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Dream Theater"], AlbumArtUrl = imgUrl }, - new Album { Title = "Slave To The Empire", Genre = genres["Metal"], Price = 8.99M, Artist = artists["T&N"], AlbumArtUrl = imgUrl }, - new Album { Title = "Slaves And Masters", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Slouching Towards Bethlehem", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Robert James"], AlbumArtUrl = imgUrl }, - new Album { Title = "Smash", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Offspring"], AlbumArtUrl = imgUrl }, - new Album { Title = "Something Special", Genre = genres["Country"], Price = 8.99M, Artist = artists["Dolly Parton"], AlbumArtUrl = imgUrl }, - new Album { Title = "Somewhere in Time", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Song(s) You Know By Heart", Genre = genres["Country"], Price = 8.99M, Artist = artists["Jimmy Buffett"], AlbumArtUrl = imgUrl }, - new Album { Title = "Sound of Music", Genre = genres["Punk"], Price = 8.99M, Artist = artists["Adicts"], AlbumArtUrl = imgUrl }, - new Album { Title = "South American Getaway", Genre = genres["Classical"], Price = 8.99M, Artist = artists["The 12 Cellists of The Berlin Philharmonic"], AlbumArtUrl = imgUrl }, - new Album { Title = "Sozinho Remix Ao Vivo", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Caetano Veloso"], AlbumArtUrl = imgUrl }, - new Album { Title = "Speak of the Devil", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Spiritual State", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Nujabes"], AlbumArtUrl = imgUrl }, - new Album { Title = "St. Anger", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, - new Album { Title = "Still Life", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Opeth"], AlbumArtUrl = imgUrl }, - new Album { Title = "Stop Making Sense", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Talking Heads"], AlbumArtUrl = imgUrl }, - new Album { Title = "Stormbringer", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "Stranger than Fiction", Genre = genres["Punk"], Price = 8.99M, Artist = artists["Bad Religion"], AlbumArtUrl = imgUrl }, - new Album { Title = "Strauss: Waltzes", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Eugene Ormandy"], AlbumArtUrl = imgUrl }, - new Album { Title = "Supermodified", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Amon Tobin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Supernatural", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Santana"], AlbumArtUrl = imgUrl }, - new Album { Title = "Surfing with the Alien (Remastered)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Joe Satriani"], AlbumArtUrl = imgUrl }, - new Album { Title = "Switched-On Bach", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Wendy Carlos"], AlbumArtUrl = imgUrl }, - new Album { Title = "Symphony", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Szymanowski: Piano Works, Vol. 1", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Martin Roscoe"], AlbumArtUrl = imgUrl }, - new Album { Title = "Tchaikovsky: The Nutcracker", Genre = genres["Classical"], Price = 8.99M, Artist = artists["London Symphony Orchestra"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ted Nugent", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Ted Nugent"], AlbumArtUrl = imgUrl }, - new Album { Title = "Teflon Don", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Rick Ross"], AlbumArtUrl = imgUrl }, - new Album { Title = "Tell Another Joke at the Ol' Choppin' Block", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Danielson Famile"], AlbumArtUrl = imgUrl }, - new Album { Title = "Temple of the Dog", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Temple of the Dog"], AlbumArtUrl = imgUrl }, - new Album { Title = "Ten", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl }, - new Album { Title = "Texas Flood", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Stevie Ray Vaughan"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Battle Rages On", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Beast Live", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Paul D'Ianno"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best Of 1980-1990", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best of 1990–2000", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best of Beethoven", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Nicolaus Esterhazy Sinfonia"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best Of Billy Cobham", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Billy Cobham"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best of Ed Motta", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Ed Motta"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Best Of Van Halen, Vol. I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Bridge", Genre = genres["R&B"], Price = 8.99M, Artist = artists["Melanie Fiona"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Cage", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tygers of Pan Tang"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Chicago Transit Authority", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Chicago "], AlbumArtUrl = imgUrl }, - new Album { Title = "The Chronic", Genre = genres["Rap"], Price = 8.99M, Artist = artists["Dr. Dre"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Colour And The Shape", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Foo Fighters"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Crane Wife", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["The Decemberists"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Cream Of Clapton", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Cure", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Cure"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Dark Side Of The Moon", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Divine Conspiracy", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Epica"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Doors", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Doors"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Dream of the Blue Turtles", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Sting"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Essential Miles Davis [Disc 1]", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Essential Miles Davis [Disc 2]", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Miles Davis"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Final Concerts (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deep Purple"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Final Frontier", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Head and the Heart", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Head and the Heart"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Joshua Tree", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Last Night of the Proms", Genre = genres["Classical"], Price = 8.99M, Artist = artists["BBC Concert Orchestra"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Lumineers", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Lumineers"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Number of The Beast", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Number of The Beast", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Police Greatest Hits", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Police"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Song Remains The Same (Disc 1)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Song Remains The Same (Disc 2)", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Southern Harmony and Musical Companion", Genre = genres["Blues"], Price = 8.99M, Artist = artists["The Black Crowes"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Spade", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Butch Walker & The Black Widows"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Stone Roses", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Stone Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Suburbs", Genre = genres["Indie"], Price = 8.99M, Artist = artists["Arcade Fire"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Three Tenors Disc1/Disc2", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Carreras, Pavarotti, Domingo"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Trees They Grow So High", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "The Wall", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl }, - new Album { Title = "The X Factor", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Them Crooked Vultures", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Them Crooked Vultures"], AlbumArtUrl = imgUrl }, - new Album { Title = "This Is Happening", Genre = genres["Rock"], Price = 8.99M, Artist = artists["LCD Soundsystem"], AlbumArtUrl = imgUrl }, - new Album { Title = "Thunder, Lightning, Strike", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Go! Team"], AlbumArtUrl = imgUrl }, - new Album { Title = "Time to Say Goodbye", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sarah Brightman"], AlbumArtUrl = imgUrl }, - new Album { Title = "Time, Love & Tenderness", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Michael Bolton"], AlbumArtUrl = imgUrl }, - new Album { Title = "Tomorrow Starts Today", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Mobile"], AlbumArtUrl = imgUrl }, - new Album { Title = "Tribute", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Ozzy Osbourne"], AlbumArtUrl = imgUrl }, - new Album { Title = "Tuesday Night Music Club", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Sheryl Crow"], AlbumArtUrl = imgUrl }, - new Album { Title = "Umoja", Genre = genres["Rock"], Price = 8.99M, Artist = artists["BLØF"], AlbumArtUrl = imgUrl }, - new Album { Title = "Under the Pink", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Tori Amos"], AlbumArtUrl = imgUrl }, - new Album { Title = "Undertow", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Tool"], AlbumArtUrl = imgUrl }, - new Album { Title = "Un-Led-Ed", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Dread Zeppelin"], AlbumArtUrl = imgUrl }, - new Album { Title = "Unplugged [Live]", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Kiss"], AlbumArtUrl = imgUrl }, - new Album { Title = "Unplugged", Genre = genres["Blues"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl }, - new Album { Title = "Unplugged", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Eric Clapton"], AlbumArtUrl = imgUrl }, - new Album { Title = "Untrue", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Burial"], AlbumArtUrl = imgUrl }, - new Album { Title = "Use Your Illusion I", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "Use Your Illusion II", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "Use Your Illusion II", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Guns N' Roses"], AlbumArtUrl = imgUrl }, - new Album { Title = "Van Halen III", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Van Halen", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Van Halen"], AlbumArtUrl = imgUrl }, - new Album { Title = "Version 2.0", Genre = genres["Alternative"], Price = 8.99M, Artist = artists["Garbage"], AlbumArtUrl = imgUrl }, - new Album { Title = "Vinicius De Moraes", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Vinícius De Moraes"], AlbumArtUrl = imgUrl }, - new Album { Title = "Virtual XI", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Iron Maiden"], AlbumArtUrl = imgUrl }, - new Album { Title = "Voodoo Lounge", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Rolling Stones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Vozes do MPB", Genre = genres["Latin"], Price = 8.99M, Artist = artists["Various Artists"], AlbumArtUrl = imgUrl }, - new Album { Title = "Vs.", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pearl Jam"], AlbumArtUrl = imgUrl }, - new Album { Title = "Wagner: Favourite Overtures", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Sir Georg Solti & Wiener Philharmoniker"], AlbumArtUrl = imgUrl }, - new Album { Title = "Walking Into Clarksdale", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Page & Plant"], AlbumArtUrl = imgUrl }, - new Album { Title = "Wapi Yo", Genre = genres["World"], Price = 8.99M, Artist = artists["Lokua Kanza"], AlbumArtUrl = imgUrl }, - new Album { Title = "War", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Warner 25 Anos", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Antônio Carlos Jobim"], AlbumArtUrl = imgUrl }, - new Album { Title = "Wasteland R&Btheque", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Raunchy"], AlbumArtUrl = imgUrl }, - new Album { Title = "Watermark", Genre = genres["Electronic"], Price = 8.99M, Artist = artists["Enya"], AlbumArtUrl = imgUrl }, - new Album { Title = "We Were Exploding Anyway", Genre = genres["Rock"], Price = 8.99M, Artist = artists["65daysofstatic"], AlbumArtUrl = imgUrl }, - new Album { Title = "Weill: The Seven Deadly Sins", Genre = genres["Classical"], Price = 8.99M, Artist = artists["Orchestre de l'Opéra de Lyon"], AlbumArtUrl = imgUrl }, - new Album { Title = "White Pony", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Deftones"], AlbumArtUrl = imgUrl }, - new Album { Title = "Who's Next", Genre = genres["Rock"], Price = 8.99M, Artist = artists["The Who"], AlbumArtUrl = imgUrl }, - new Album { Title = "Wish You Were Here", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Pink Floyd"], AlbumArtUrl = imgUrl }, - new Album { Title = "With Oden on Our Side", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Amon Amarth"], AlbumArtUrl = imgUrl }, - new Album { Title = "Worlds", Genre = genres["Jazz"], Price = 8.99M, Artist = artists["Aaron Goldberg"], AlbumArtUrl = imgUrl }, - new Album { Title = "Worship Music", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Anthrax"], AlbumArtUrl = imgUrl }, - new Album { Title = "X&Y", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Coldplay"], AlbumArtUrl = imgUrl }, - new Album { Title = "Xinti", Genre = genres["World"], Price = 8.99M, Artist = artists["Sara Tavares"], AlbumArtUrl = imgUrl }, - new Album { Title = "Yano", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Yano"], AlbumArtUrl = imgUrl }, - new Album { Title = "Yesterday Once More Disc 1/Disc 2", Genre = genres["Pop"], Price = 8.99M, Artist = artists["The Carpenters"], AlbumArtUrl = imgUrl }, - new Album { Title = "Zooropa", Genre = genres["Rock"], Price = 8.99M, Artist = artists["U2"], AlbumArtUrl = imgUrl }, - new Album { Title = "Zoso", Genre = genres["Rock"], Price = 8.99M, Artist = artists["Led Zeppelin"], AlbumArtUrl = imgUrl }, - }; - - foreach (var album in albums) - { - album.ArtistId = album.Artist.ArtistId; - album.GenreId = album.Genre.GenreId; - } - - return albums; - } - - private static Dictionary artists; - public static Dictionary Artists - { - get - { - if (artists == null) - { - var artistsList = new Artist[] - { - new Artist { Name = "65daysofstatic" }, - new Artist { Name = "Aaron Goldberg" }, - new Artist { Name = "Above & Beyond" }, - new Artist { Name = "Above the Fold" }, - new Artist { Name = "AC/DC" }, - new Artist { Name = "Accept" }, - new Artist { Name = "Adicts" }, - new Artist { Name = "Adrian Leaper & Doreen de Feis" }, - new Artist { Name = "Aerosmith" }, - new Artist { Name = "Aisha Duo" }, - new Artist { Name = "Al di Meola" }, - new Artist { Name = "Alabama Shakes" }, - new Artist { Name = "Alanis Morissette" }, - new Artist { Name = "Alberto Turco & Nova Schola Gregoriana" }, - new Artist { Name = "Alice in Chains" }, - new Artist { Name = "Alison Krauss" }, - new Artist { Name = "Amon Amarth" }, - new Artist { Name = "Amon Tobin" }, - new Artist { Name = "Amr Diab" }, - new Artist { Name = "Amy Winehouse" }, - new Artist { Name = "Anita Ward" }, - new Artist { Name = "Anthrax" }, - new Artist { Name = "Antônio Carlos Jobim" }, - new Artist { Name = "Apocalyptica" }, - new Artist { Name = "Aqua" }, - new Artist { Name = "Armand Van Helden" }, - new Artist { Name = "Arcade Fire" }, - new Artist { Name = "Audioslave" }, - new Artist { Name = "Bad Religion" }, - new Artist { Name = "Barenaked Ladies" }, - new Artist { Name = "BBC Concert Orchestra" }, - new Artist { Name = "Bee Gees" }, - new Artist { Name = "Before the Dawn" }, - new Artist { Name = "Berliner Philharmoniker" }, - new Artist { Name = "Billy Cobham" }, - new Artist { Name = "Black Label Society" }, - new Artist { Name = "Black Sabbath" }, - new Artist { Name = "BLØF" }, - new Artist { Name = "Blues Traveler" }, - new Artist { Name = "Boston Symphony Orchestra & Seiji Ozawa" }, - new Artist { Name = "Britten Sinfonia, Ivor Bolton & Lesley Garrett" }, - new Artist { Name = "Bruce Dickinson" }, - new Artist { Name = "Buddy Guy" }, - new Artist { Name = "Burial" }, - new Artist { Name = "Butch Walker & The Black Widows" }, - new Artist { Name = "Caetano Veloso" }, - new Artist { Name = "Cake" }, - new Artist { Name = "Calexico" }, - new Artist { Name = "Carly Rae Jepsen" }, - new Artist { Name = "Carreras, Pavarotti, Domingo" }, - new Artist { Name = "Cássia Eller" }, - new Artist { Name = "Cayouche" }, - new Artist { Name = "Chic" }, - new Artist { Name = "Chicago " }, - new Artist { Name = "Chicago Symphony Orchestra & Fritz Reiner" }, - new Artist { Name = "Chico Buarque" }, - new Artist { Name = "Chico Science & Nação Zumbi" }, - new Artist { Name = "Choir Of Westminster Abbey & Simon Preston" }, - new Artist { Name = "Chris Cornell" }, - new Artist { Name = "Christopher O'Riley" }, - new Artist { Name = "Cidade Negra" }, - new Artist { Name = "Cláudio Zoli" }, - new Artist { Name = "Coldplay" }, - new Artist { Name = "Creedence Clearwater Revival" }, - new Artist { Name = "Crosby, Stills, Nash, and Young" }, - new Artist { Name = "Daft Punk" }, - new Artist { Name = "Danielson Famile" }, - new Artist { Name = "David Bowie" }, - new Artist { Name = "David Coverdale" }, - new Artist { Name = "David Guetta" }, - new Artist { Name = "deadmau5" }, - new Artist { Name = "Deep Purple" }, - new Artist { Name = "Def Leppard" }, - new Artist { Name = "Deftones" }, - new Artist { Name = "Dennis Chambers" }, - new Artist { Name = "Deva Premal" }, - new Artist { Name = "Dio" }, - new Artist { Name = "Djavan" }, - new Artist { Name = "Dolly Parton" }, - new Artist { Name = "Donna Summer" }, - new Artist { Name = "Dr. Dre" }, - new Artist { Name = "Dread Zeppelin" }, - new Artist { Name = "Dream Theater" }, - new Artist { Name = "Duck Sauce" }, - new Artist { Name = "Earl Scruggs" }, - new Artist { Name = "Ed Motta" }, - new Artist { Name = "Edo de Waart & San Francisco Symphony" }, - new Artist { Name = "Elis Regina" }, - new Artist { Name = "Eminem" }, - new Artist { Name = "English Concert & Trevor Pinnock" }, - new Artist { Name = "Enya" }, - new Artist { Name = "Epica" }, - new Artist { Name = "Eric B. and Rakim" }, - new Artist { Name = "Eric Clapton" }, - new Artist { Name = "Eugene Ormandy" }, - new Artist { Name = "Faith No More" }, - new Artist { Name = "Falamansa" }, - new Artist { Name = "Filter" }, - new Artist { Name = "Foo Fighters" }, - new Artist { Name = "Four Tet" }, - new Artist { Name = "Frank Zappa & Captain Beefheart" }, - new Artist { Name = "Fretwork" }, - new Artist { Name = "Funk Como Le Gusta" }, - new Artist { Name = "Garbage" }, - new Artist { Name = "Gerald Moore" }, - new Artist { Name = "Gilberto Gil" }, - new Artist { Name = "Godsmack" }, - new Artist { Name = "Gonzaguinha" }, - new Artist { Name = "Göteborgs Symfoniker & Neeme Järvi" }, - new Artist { Name = "Guns N' Roses" }, - new Artist { Name = "Gustav Mahler" }, - new Artist { Name = "In This Moment" }, - new Artist { Name = "Incognito" }, - new Artist { Name = "INXS" }, - new Artist { Name = "Iron Maiden" }, - new Artist { Name = "Jagjit Singh" }, - new Artist { Name = "James Levine" }, - new Artist { Name = "Jamiroquai" }, - new Artist { Name = "Jimi Hendrix" }, - new Artist { Name = "Jimmy Buffett" }, - new Artist { Name = "Jimmy Smith" }, - new Artist { Name = "Joe Satriani" }, - new Artist { Name = "John Digweed" }, - new Artist { Name = "John Mayer" }, - new Artist { Name = "Jorge Ben" }, - new Artist { Name = "Jota Quest" }, - new Artist { Name = "Journey" }, - new Artist { Name = "Judas Priest" }, - new Artist { Name = "Julian Bream" }, - new Artist { Name = "Justice" }, - new Artist { Name = "Orchestre de l'Opéra de Lyon" }, - new Artist { Name = "King Crimson" }, - new Artist { Name = "Kiss" }, - new Artist { Name = "LCD Soundsystem" }, - new Artist { Name = "Le Tigre" }, - new Artist { Name = "Led Zeppelin" }, - new Artist { Name = "Legião Urbana" }, - new Artist { Name = "Lenny Kravitz" }, - new Artist { Name = "Les Arts Florissants & William Christie" }, - new Artist { Name = "Limp Bizkit" }, - new Artist { Name = "Linkin Park" }, - new Artist { Name = "Live" }, - new Artist { Name = "Lokua Kanza" }, - new Artist { Name = "London Symphony Orchestra" }, - new Artist { Name = "Los Tigres del Norte" }, - new Artist { Name = "Luciana Souza/Romero Lubambo" }, - new Artist { Name = "Lulu Santos" }, - new Artist { Name = "Lura" }, - new Artist { Name = "Marcos Valle" }, - new Artist { Name = "Marillion" }, - new Artist { Name = "Marisa Monte" }, - new Artist { Name = "Mark Knopfler" }, - new Artist { Name = "Martin Roscoe" }, - new Artist { Name = "Massive Attack" }, - new Artist { Name = "Maurizio Pollini" }, - new Artist { Name = "Megadeth" }, - new Artist { Name = "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" }, - new Artist { Name = "Melanie Fiona" }, - new Artist { Name = "Men At Work" }, - new Artist { Name = "Metallica" }, - new Artist { Name = "M-Flo" }, - new Artist { Name = "Michael Bolton" }, - new Artist { Name = "Michael Tilson Thomas" }, - new Artist { Name = "Miles Davis" }, - new Artist { Name = "Milton Nascimento" }, - new Artist { Name = "Mobile" }, - new Artist { Name = "Modest Mouse" }, - new Artist { Name = "Mötley Crüe" }, - new Artist { Name = "Motörhead" }, - new Artist { Name = "Mumford & Sons" }, - new Artist { Name = "Munkle" }, - new Artist { Name = "Nash Ensemble" }, - new Artist { Name = "Neil Young" }, - new Artist { Name = "New York Dolls" }, - new Artist { Name = "Nick Cave and the Bad Seeds" }, - new Artist { Name = "Nicolaus Esterhazy Sinfonia" }, - new Artist { Name = "Nine Inch Nails" }, - new Artist { Name = "Nirvana" }, - new Artist { Name = "Norah Jones" }, - new Artist { Name = "Nujabes" }, - new Artist { Name = "O Terço" }, - new Artist { Name = "Oasis" }, - new Artist { Name = "Olodum" }, - new Artist { Name = "Opeth" }, - new Artist { Name = "Orchestra of The Age of Enlightenment" }, - new Artist { Name = "Os Paralamas Do Sucesso" }, - new Artist { Name = "Ozzy Osbourne" }, - new Artist { Name = "Paddy Casey" }, - new Artist { Name = "Page & Plant" }, - new Artist { Name = "Papa Wemba" }, - new Artist { Name = "Paul D'Ianno" }, - new Artist { Name = "Paul Oakenfold" }, - new Artist { Name = "Paul Van Dyk" }, - new Artist { Name = "Pearl Jam" }, - new Artist { Name = "Pet Shop Boys" }, - new Artist { Name = "Pink Floyd" }, - new Artist { Name = "Plug" }, - new Artist { Name = "Porcupine Tree" }, - new Artist { Name = "Portishead" }, - new Artist { Name = "Prince" }, - new Artist { Name = "Projected" }, - new Artist { Name = "PSY" }, - new Artist { Name = "Public Enemy" }, - new Artist { Name = "Queen" }, - new Artist { Name = "Queensrÿche" }, - new Artist { Name = "R.E.M." }, - new Artist { Name = "Radiohead" }, - new Artist { Name = "Rancid" }, - new Artist { Name = "Raul Seixas" }, - new Artist { Name = "Raunchy" }, - new Artist { Name = "Red Hot Chili Peppers" }, - new Artist { Name = "Rick Ross" }, - new Artist { Name = "Robert James" }, - new Artist { Name = "London Classical Players" }, - new Artist { Name = "Royal Philharmonic Orchestra" }, - new Artist { Name = "Run DMC" }, - new Artist { Name = "Rush" }, - new Artist { Name = "Santana" }, - new Artist { Name = "Sara Tavares" }, - new Artist { Name = "Sarah Brightman" }, - new Artist { Name = "Sasha" }, - new Artist { Name = "Scholars Baroque Ensemble" }, - new Artist { Name = "Scorpions" }, - new Artist { Name = "Sergei Prokofiev & Yuri Temirkanov" }, - new Artist { Name = "Sheryl Crow" }, - new Artist { Name = "Sir Georg Solti & Wiener Philharmoniker" }, - new Artist { Name = "Skank" }, - new Artist { Name = "Skrillex" }, - new Artist { Name = "Slash" }, - new Artist { Name = "Slayer" }, - new Artist { Name = "Soul-Junk" }, - new Artist { Name = "Soundgarden" }, - new Artist { Name = "Spyro Gyra" }, - new Artist { Name = "Stevie Ray Vaughan & Double Trouble" }, - new Artist { Name = "Stevie Ray Vaughan" }, - new Artist { Name = "Sting" }, - new Artist { Name = "Stone Temple Pilots" }, - new Artist { Name = "Styx" }, - new Artist { Name = "Sufjan Stevens" }, - new Artist { Name = "Supreme Beings of Leisure" }, - new Artist { Name = "System Of A Down" }, - new Artist { Name = "T&N" }, - new Artist { Name = "Talking Heads" }, - new Artist { Name = "Tears For Fears" }, - new Artist { Name = "Ted Nugent" }, - new Artist { Name = "Temple of the Dog" }, - new Artist { Name = "Terry Bozzio, Tony Levin & Steve Stevens" }, - new Artist { Name = "The 12 Cellists of The Berlin Philharmonic" }, - new Artist { Name = "The Axis of Awesome" }, - new Artist { Name = "The Beatles" }, - new Artist { Name = "The Black Crowes" }, - new Artist { Name = "The Black Keys" }, - new Artist { Name = "The Carpenters" }, - new Artist { Name = "The Cat Empire" }, - new Artist { Name = "The Cult" }, - new Artist { Name = "The Cure" }, - new Artist { Name = "The Decemberists" }, - new Artist { Name = "The Doors" }, - new Artist { Name = "The Eagles of Death Metal" }, - new Artist { Name = "The Go! Team" }, - new Artist { Name = "The Head and the Heart" }, - new Artist { Name = "The Jezabels" }, - new Artist { Name = "The King's Singers" }, - new Artist { Name = "The Lumineers" }, - new Artist { Name = "The Offspring" }, - new Artist { Name = "The Police" }, - new Artist { Name = "The Posies" }, - new Artist { Name = "The Prodigy" }, - new Artist { Name = "The Rolling Stones" }, - new Artist { Name = "The Rubberbandits" }, - new Artist { Name = "The Smashing Pumpkins" }, - new Artist { Name = "The Stone Roses" }, - new Artist { Name = "The Who" }, - new Artist { Name = "Them Crooked Vultures" }, - new Artist { Name = "TheStart" }, - new Artist { Name = "Thievery Corporation" }, - new Artist { Name = "Tiësto" }, - new Artist { Name = "Tim Maia" }, - new Artist { Name = "Ton Koopman" }, - new Artist { Name = "Tool" }, - new Artist { Name = "Tori Amos" }, - new Artist { Name = "Trampled By Turtles" }, - new Artist { Name = "Trans-Siberian Orchestra" }, - new Artist { Name = "Tygers of Pan Tang" }, - new Artist { Name = "U2" }, - new Artist { Name = "UB40" }, - new Artist { Name = "Uh Huh Her " }, - new Artist { Name = "Van Halen" }, - new Artist { Name = "Various Artists" }, - new Artist { Name = "Velvet Revolver" }, - new Artist { Name = "Venus Hum" }, - new Artist { Name = "Vicente Fernandez" }, - new Artist { Name = "Vinícius De Moraes" }, - new Artist { Name = "Weezer" }, - new Artist { Name = "Weird Al" }, - new Artist { Name = "Wendy Carlos" }, - new Artist { Name = "Wilhelm Kempff" }, - new Artist { Name = "Yano" }, - new Artist { Name = "Yehudi Menuhin" }, - new Artist { Name = "Yes" }, - new Artist { Name = "Yo-Yo Ma" }, - new Artist { Name = "Zeca Pagodinho" }, - new Artist { Name = "אריק אינשטיין"} - }; - - // TODO [EF] Swap to store generated keys when available - int artistId = 1; - artists = new Dictionary(); - foreach (Artist artist in artistsList) - { - artist.ArtistId = artistId++; - artists.Add(artist.Name, artist); - } - } - - return artists; - } - } - - private static Dictionary genres; - public static Dictionary Genres - { - get - { - if (genres == null) - { - var genresList = new Genre[] - { - new Genre { Name = "Pop" }, - new Genre { Name = "Rock" }, - new Genre { Name = "Jazz" }, - new Genre { Name = "Metal" }, - new Genre { Name = "Electronic" }, - new Genre { Name = "Blues" }, - new Genre { Name = "Latin" }, - new Genre { Name = "Rap" }, - new Genre { Name = "Classical" }, - new Genre { Name = "Alternative" }, - new Genre { Name = "Country" }, - new Genre { Name = "R&B" }, - new Genre { Name = "Indie" }, - new Genre { Name = "Punk" }, - new Genre { Name = "World" } - }; - - genres = new Dictionary(); - // TODO [EF] Swap to store generated keys when available - int genreId = 1; - foreach (Genre genre in genresList) - { - genre.GenreId = genreId++; - - // TODO [EF] Remove when null values are supported by update pipeline - genre.Description = genre.Name + " is great music (if you like it)."; - - genres.Add(genre.Name, genre); - } - } - - return genres; - } - } - } -} diff --git a/samples/react/MusicStore/Apis/Models/ShoppingCart.cs b/samples/react/MusicStore/Apis/Models/ShoppingCart.cs deleted file mode 100644 index 1d2465ab..00000000 --- a/samples/react/MusicStore/Apis/Models/ShoppingCart.cs +++ /dev/null @@ -1,207 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Linq; - -namespace MusicStore.Models -{ - public partial class ShoppingCart - { - MusicStoreContext _db; - string ShoppingCartId { get; set; } - - public ShoppingCart(MusicStoreContext db) - { - _db = db; - } - - public static ShoppingCart GetCart(MusicStoreContext db, HttpContext context) - { - var cart = new ShoppingCart(db); - cart.ShoppingCartId = cart.GetCartId(context); - return cart; - } - - public void AddToCart(Album album) - { - // Get the matching cart and album instances - var cartItem = _db.CartItems.SingleOrDefault( - c => c.CartId == ShoppingCartId - && c.AlbumId == album.AlbumId); - - if (cartItem == null) - { - // TODO [EF] Swap to store generated key once we support identity pattern - var nextCartItemId = _db.CartItems.Any() - ? _db.CartItems.Max(c => c.CartItemId) + 1 - : 1; - - // Create a new cart item if no cart item exists - cartItem = new CartItem - { - CartItemId = nextCartItemId, - AlbumId = album.AlbumId, - CartId = ShoppingCartId, - Count = 1, - DateCreated = DateTime.Now - }; - - _db.CartItems.Add(cartItem); - } - else - { - // If the item does exist in the cart, then add one to the quantity - cartItem.Count++; - - // TODO [EF] Remove this line once change detection is available - _db.Update(cartItem); - } - } - - public int RemoveFromCart(int id) - { - // Get the cart - var cartItem = _db.CartItems.Single( - cart => cart.CartId == ShoppingCartId - && cart.CartItemId == id); - - int itemCount = 0; - - if (cartItem != null) - { - if (cartItem.Count > 1) - { - cartItem.Count--; - - // TODO [EF] Remove this line once change detection is available - _db.Update(cartItem); - - itemCount = cartItem.Count; - } - else - { - _db.CartItems.Remove(cartItem); - } - } - - return itemCount; - } - - public void EmptyCart() - { - var cartItems = _db.CartItems.Where(cart => cart.CartId == ShoppingCartId); - - foreach (var cartItem in cartItems) - { - _db.Remove(cartItem); - } - } - - public List GetCartItems() - { - var cartItems = _db.CartItems.Where(cart => cart.CartId == ShoppingCartId).ToList(); - //TODO: Auto population of the related album data not available until EF feature is lighted up. - foreach (var cartItem in cartItems) - { - cartItem.Album = _db.Albums.Single(a => a.AlbumId == cartItem.AlbumId); - } - - return cartItems; - } - - public int GetCount() - { - // Get the count of each item in the cart and sum them up - int? count = (from cartItems in _db.CartItems - where cartItems.CartId == ShoppingCartId - select (int?)cartItems.Count).Sum(); - - // Return 0 if all entries are null - return count ?? 0; - } - - public decimal GetTotal() - { - // Multiply album price by count of that album to get - // the current price for each of those albums in the cart - // sum all album price totals to get the cart total - - // TODO Collapse to a single query once EF supports querying related data - decimal total = 0; - foreach (var item in _db.CartItems.Where(c => c.CartId == ShoppingCartId)) - { - var album = _db.Albums.Single(a => a.AlbumId == item.AlbumId); - total += item.Count * album.Price; - } - - return total; - } - - public int CreateOrder(Order order) - { - decimal orderTotal = 0; - - var cartItems = GetCartItems(); - - // TODO [EF] Swap to store generated identity key when supported - var nextId = _db.OrderDetails.Any() - ? _db.OrderDetails.Max(o => o.OrderDetailId) + 1 - : 1; - - // Iterate over the items in the cart, adding the order details for each - foreach (var item in cartItems) - { - //var album = _db.Albums.Find(item.AlbumId); - var album = _db.Albums.Single(a => a.AlbumId == item.AlbumId); - - var orderDetail = new OrderDetail - { - OrderDetailId = nextId, - AlbumId = item.AlbumId, - OrderId = order.OrderId, - UnitPrice = album.Price, - Quantity = item.Count, - }; - - // Set the order total of the shopping cart - orderTotal += (item.Count * album.Price); - - _db.OrderDetails.Add(orderDetail); - - nextId++; - } - - // Set the order's total to the orderTotal count - order.Total = orderTotal; - - // Empty the shopping cart - EmptyCart(); - - // Return the OrderId as the confirmation number - return order.OrderId; - } - - // We're using HttpContextBase to allow access to cookies. - public string GetCartId(HttpContext context) - { - var sessionCookie = context.Request.Cookies["Session"]; - string cartId = null; - - if (string.IsNullOrWhiteSpace(sessionCookie)) - { - //A GUID to hold the cartId. - cartId = Guid.NewGuid().ToString(); - - // Send cart Id as a cookie to the client. - context.Response.Cookies.Append("Session", cartId); - } - else - { - cartId = sessionCookie; - } - - return cartId; - } - } -} diff --git a/samples/react/MusicStore/Controllers/HomeController.cs b/samples/react/MusicStore/Controllers/HomeController.cs deleted file mode 100755 index 1048e083..00000000 --- a/samples/react/MusicStore/Controllers/HomeController.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace MusicStore.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - } -} diff --git a/samples/react/MusicStore/Infrastructure/NoCacheAttribute.cs b/samples/react/MusicStore/Infrastructure/NoCacheAttribute.cs deleted file mode 100644 index 856023a8..00000000 --- a/samples/react/MusicStore/Infrastructure/NoCacheAttribute.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using System; -using Microsoft.AspNetCore.Mvc.Filters; - -namespace MusicStore.Infrastructure -{ - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] - public sealed class NoCacheAttribute : ActionFilterAttribute - { - public override void OnResultExecuting(ResultExecutingContext context) - { - context.HttpContext.Response.Headers["Cache-Control"] = "no-cache, no-store, max-age=0"; - context.HttpContext.Response.Headers["Pragma"] = "no-cache"; - context.HttpContext.Response.Headers["Expires"] = "-1"; - - base.OnResultExecuting(context); - } - } -} diff --git a/samples/react/MusicStore/Infrastructure/PagedList.cs b/samples/react/MusicStore/Infrastructure/PagedList.cs deleted file mode 100644 index b2cb2c57..00000000 --- a/samples/react/MusicStore/Infrastructure/PagedList.cs +++ /dev/null @@ -1,150 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Threading.Tasks; - -namespace MusicStore.Infrastructure -{ - public interface IPagedList - { - IEnumerable Data { get; } - - int Page { get; } - - int PageSize { get; } - - int TotalCount { get; } - } - - internal class PagedList : IPagedList - { - public PagedList(IEnumerable data, int page, int pageSize, int totalCount) - { - Data = data; - Page = page; - PageSize = pageSize; - TotalCount = totalCount; - } - - public IEnumerable Data { get; private set; } - - public int Page { get; private set; } - - public int PageSize { get; private set; } - - public int TotalCount { get; private set; } - } - - public static class PagedListExtensions - { - public static IPagedList ToPagedList(this IQueryable query, int page, int pageSize) - { - if (query == null) - { - throw new ArgumentNullException("query"); - } - - var pagingConfig = new PagingConfig(page, pageSize); - var skipCount = ValidatePagePropertiesAndGetSkipCount(pagingConfig); - - var data = query - .Skip(skipCount) - .Take(pagingConfig.PageSize) - .ToList(); - - if (skipCount > 0 && data.Count == 0) - { - // Requested page has no records, just return the first page - pagingConfig.Page = 1; - data = query - .Take(pagingConfig.PageSize) - .ToList(); - } - - return new PagedList(data, pagingConfig.Page, pagingConfig.PageSize, query.Count()); - } - - public static Task> ToPagedListAsync(this IQueryable query, int page, int pageSize, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection = SortDirection.Ascending) - where TModel : class - { - return ToPagedListAsync(query, page, pageSize, sortExpression, defaultSortExpression, defaultSortDirection, null); - } - - public static async Task> ToPagedListAsync(this IQueryable query, int page, int pageSize, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection, Func selector) - where TModel : class - where TResult : class - { - if (query == null) - { - throw new ArgumentNullException("query"); - } - - var pagingConfig = new PagingConfig(page, pageSize); - var skipCount = ValidatePagePropertiesAndGetSkipCount(pagingConfig); - var dataQuery = query; - - if (defaultSortExpression != null) - { - dataQuery = dataQuery - .SortBy(sortExpression, defaultSortExpression); - } - - var data = await dataQuery - .Skip(skipCount) - .Take(pagingConfig.PageSize) - .ToListAsync(); - - if (skipCount > 0 && data.Count == 0) - { - // Requested page has no records, just return the first page - pagingConfig.Page = 1; - data = await dataQuery - .Take(pagingConfig.PageSize) - .ToListAsync(); - } - - var count = await query.CountAsync(); - - var resultData = selector != null - ? data.Select(selector) - : data.Cast(); - - return new PagedList(resultData, pagingConfig.Page, pagingConfig.PageSize, count); - } - - private static int ValidatePagePropertiesAndGetSkipCount(PagingConfig pagingConfig) - { - if (pagingConfig.Page < 1) - { - pagingConfig.Page = 1; - } - - if (pagingConfig.PageSize < 10) - { - pagingConfig.PageSize = 10; - } - - if (pagingConfig.PageSize > 100) - { - pagingConfig.PageSize = 100; - } - - return pagingConfig.PageSize * (pagingConfig.Page - 1); - } - - internal class PagingConfig - { - public PagingConfig(int page, int pageSize) - { - Page = page; - PageSize = pageSize; - } - - public int Page { get; set; } - - public int PageSize { get; set; } - } - } -} diff --git a/samples/react/MusicStore/Infrastructure/SortDirection.cs b/samples/react/MusicStore/Infrastructure/SortDirection.cs deleted file mode 100644 index 28f7e86c..00000000 --- a/samples/react/MusicStore/Infrastructure/SortDirection.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace MusicStore.Infrastructure -{ - public enum SortDirection - { - Ascending, - Descending - } -} diff --git a/samples/react/MusicStore/Infrastructure/SortExpression.cs b/samples/react/MusicStore/Infrastructure/SortExpression.cs deleted file mode 100644 index 88ba312c..00000000 --- a/samples/react/MusicStore/Infrastructure/SortExpression.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal; - -namespace MusicStore.Infrastructure -{ - public static class SortExpression - { - private const string SORT_DIRECTION_DESC = " DESC"; - - public static IQueryable SortBy(this IQueryable query, string sortExpression, Expression> defaultSortExpression, SortDirection defaultSortDirection = SortDirection.Ascending) where TModel : class - { - return SortBy(query, sortExpression ?? Create(defaultSortExpression, defaultSortDirection)); - } - - public static string Create(Expression> expression, SortDirection sortDirection = SortDirection.Ascending) where TModel : class - { - var expressionText = ExpressionHelper.GetExpressionText(expression); - // TODO: Validate the expression depth, etc. - - var sortExpression = expressionText; - - if (sortDirection == SortDirection.Descending) - { - sortExpression += SORT_DIRECTION_DESC; - } - - return sortExpression; - } - - public static IQueryable SortBy(this IQueryable source, string sortExpression) where T : class - { - if (source == null) - { - throw new ArgumentNullException("source"); - } - - if (String.IsNullOrWhiteSpace(sortExpression)) - { - return source; - } - - sortExpression = sortExpression.Trim(); - var isDescending = false; - - // DataSource control passes the sort parameter with a direction - // if the direction is descending - if (sortExpression.EndsWith(SORT_DIRECTION_DESC, StringComparison.OrdinalIgnoreCase)) - { - isDescending = true; - var descIndex = sortExpression.Length - SORT_DIRECTION_DESC.Length; - sortExpression = sortExpression.Substring(0, descIndex).Trim(); - } - - if (string.IsNullOrEmpty(sortExpression)) - { - return source; - } - - ParameterExpression parameter = Expression.Parameter(source.ElementType, String.Empty); - - // Build up the property expression, e.g.: (m => m.Foo.Bar) - var sortExpressionParts = sortExpression.Split('.'); - Expression propertyExpression = parameter; - foreach (var property in sortExpressionParts) - { - propertyExpression = Expression.Property(propertyExpression, property); - } - - LambdaExpression lambda = Expression.Lambda(propertyExpression, parameter); - - var methodName = (isDescending) ? "OrderByDescending" : "OrderBy"; - - Expression methodCallExpression = Expression.Call( - typeof(Queryable), - methodName, - new[] { source.ElementType, propertyExpression.Type }, - source.Expression, - Expression.Quote(lambda)); - - return (IQueryable)source.Provider.CreateQuery(methodCallExpression); - } - } -} diff --git a/samples/react/MusicStore/MusicStore.xproj b/samples/react/MusicStore/MusicStore.xproj deleted file mode 100644 index 672fd3fc..00000000 --- a/samples/react/MusicStore/MusicStore.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - true - - - - c870a92c-9e3f-4bf2-82b8-5758545a8b7c - MusicStore - ..\..\..\JavaScriptServices.sln\artifacts\obj\$(MSBuildProjectName) - .\bin\ - - - 2.0 - 2018 - - - \ No newline at end of file diff --git a/samples/react/MusicStore/Properties/launchSettings.json b/samples/react/MusicStore/Properties/launchSettings.json deleted file mode 100644 index e4360431..00000000 --- a/samples/react/MusicStore/Properties/launchSettings.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:51586/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "dotnet cli": { - "commandName": "Project", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/samples/react/MusicStore/ReactApp/boot-server.tsx b/samples/react/MusicStore/ReactApp/boot-server.tsx deleted file mode 100644 index 7aaa1f11..00000000 --- a/samples/react/MusicStore/ReactApp/boot-server.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import * as React from 'react'; -import { Provider } from 'react-redux'; -import { renderToString } from 'react-dom/server'; -import { match, RouterContext } from 'react-router'; -import createMemoryHistory from 'history/lib/createMemoryHistory'; -import { routes } from './routes'; -import configureStore from './configureStore'; -type BootResult = { html?: string, globals?: { [key: string]: any }, redirectUrl?: string}; - -export default function (params: any): Promise<{ html: string }> { - return new Promise((resolve, reject) => { - // Match the incoming request against the list of client-side routes - match({ routes, location: params.location }, (error, redirectLocation, renderProps: any) => { - if (error) { - throw error; - } - - // If there's a redirection, just send this information back to the host application - if (redirectLocation) { - resolve({ redirectUrl: redirectLocation.pathname }); - return; - } - - // If it didn't match any route, renderProps will be undefined - if (!renderProps) { - throw new Error(`The location '${ params.url }' doesn't match any route configured in react-router.`); - } - - // Build an instance of the application - const store = configureStore(); - const app = ( - - - - ); - - // Perform an initial render that will cause any async tasks (e.g., data access) to begin - renderToString(app); - - // Once the tasks are done, we can perform the final render - // We also send the redux store state, so the client can continue execution where the server left off - params.domainTasks.then(() => { - resolve({ - html: renderToString(app), - globals: { initialReduxState: store.getState() } - }); - }, reject); // Also propagate any errors back into the host application - }); - }); -} diff --git a/samples/react/MusicStore/ReactApp/boot.tsx b/samples/react/MusicStore/ReactApp/boot.tsx deleted file mode 100644 index ea3807db..00000000 --- a/samples/react/MusicStore/ReactApp/boot.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import './styles/styles.css'; -import 'bootstrap/dist/css/bootstrap.css'; - -import * as React from 'react'; -import * as ReactDOM from 'react-dom'; -import { browserHistory, Router } from 'react-router'; -import { Provider } from 'react-redux'; -import { syncHistoryWithStore } from 'react-router-redux'; -import { routes } from './routes'; -import configureStore from './configureStore'; -import { ApplicationState } from './store'; - -// Get the application-wide store instance, prepopulating with state from the server where available. -const initialState = (window as any).initialReduxState as ApplicationState; -const store = configureStore(initialState); -const history = syncHistoryWithStore(browserHistory, store); - -// This code starts up the React app when it runs in a browser. It sets up the routing configuration -// and injects the app into a DOM element. -ReactDOM.render( - - - , - document.getElementById('react-app') -); diff --git a/samples/react/MusicStore/ReactApp/components/NavMenu.tsx b/samples/react/MusicStore/ReactApp/components/NavMenu.tsx deleted file mode 100644 index 6e85da85..00000000 --- a/samples/react/MusicStore/ReactApp/components/NavMenu.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import * as React from 'react'; -import { Navbar, Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap'; -import { Link } from 'react-router'; -import { LinkContainer } from 'react-router-bootstrap'; -import { provide } from 'redux-typed'; -import { ApplicationState } from '../store'; -import * as GenreList from '../store/GenreList'; - -class NavMenu extends React.Component { - componentWillMount() { - this.props.requestGenresList(); - } - - public render() { - const genres = this.props.genres.slice(0, 5); - return ( - - - Music Store - - - - - - - ); - } -} - -// Selects which part of global state maps to this component, and defines a type for the resulting props -const provider = provide( - (state: ApplicationState) => state.genreList, - GenreList.actionCreators -); -type NavMenuProps = typeof provider.allProps; -export default provider.connect(NavMenu); diff --git a/samples/react/MusicStore/ReactApp/components/public/AlbumDetails.tsx b/samples/react/MusicStore/ReactApp/components/public/AlbumDetails.tsx deleted file mode 100644 index 6e6fab2e..00000000 --- a/samples/react/MusicStore/ReactApp/components/public/AlbumDetails.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import * as React from 'react'; -import { Link } from 'react-router'; -import { provide } from 'redux-typed'; -import { ApplicationState } from '../../store'; -import * as AlbumDetailsState from '../../store/AlbumDetails'; - -interface RouteParams { - albumId: string; -} - -class AlbumDetails extends React.Component { - componentWillMount() { - this.props.requestAlbumDetails(parseInt(this.props.params.albumId)); - } - - componentWillReceiveProps(nextProps: AlbumDetailsProps) { - this.props.requestAlbumDetails(parseInt(nextProps.params.albumId)); - } - - public render() { - if (this.props.album) { - const albumData = this.props.album; - return
-

{ albumData.Title }

- -

{

- -
-

- Genre: - { albumData.Genre.Name } -

-

- Artist: - { albumData.Artist.Name } -

-

- Price: - ${ albumData.Price.toFixed(2) } -

-

- Add to cart -

-
-
; - } else { - return

Loading...

; - } - } -} - -// Selects which part of global state maps to this component, and defines a type for the resulting props -const provider = provide( - (state: ApplicationState) => state.albumDetails, - AlbumDetailsState.actionCreators -).withExternalProps<{ params: RouteParams }>(); -type AlbumDetailsProps = typeof provider.allProps; -export default provider.connect(AlbumDetails); diff --git a/samples/react/MusicStore/ReactApp/components/public/AlbumTile.tsx b/samples/react/MusicStore/ReactApp/components/public/AlbumTile.tsx deleted file mode 100644 index 04b74d54..00000000 --- a/samples/react/MusicStore/ReactApp/components/public/AlbumTile.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import * as React from 'react'; -import { Link } from 'react-router'; -import { Album } from '../../store/FeaturedAlbums'; - -export class AlbumTile extends React.Component<{ album: Album, key?: any }, void> { - public render() { - const { album } = this.props; - return ( -
  • - - { -

    { album.Title }

    - -
  • - ); - } -} diff --git a/samples/react/MusicStore/ReactApp/components/public/GenreDetails.tsx b/samples/react/MusicStore/ReactApp/components/public/GenreDetails.tsx deleted file mode 100644 index 59dc50b5..00000000 --- a/samples/react/MusicStore/ReactApp/components/public/GenreDetails.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import * as React from 'react'; -import { Link } from 'react-router'; -import { provide } from 'redux-typed'; -import { ApplicationState } from '../../store'; -import * as GenreDetailsStore from '../../store/GenreDetails'; -import { AlbumTile } from './AlbumTile'; - -interface RouteParams { - genreId: string -} - -class GenreDetails extends React.Component { - componentWillMount() { - this.props.requestGenreDetails(parseInt(this.props.params.genreId)); - } - - componentWillReceiveProps(nextProps: GenreDetailsProps) { - this.props.requestGenreDetails(parseInt(nextProps.params.genreId)); - } - - public render() { - if (this.props.isLoaded) { - return
    -

    Albums

    - -
      - {this.props.albums.map(album => - - )} -
    -
    ; - } else { - return

    Loading...

    ; - } - } -} - -// Selects which part of global state maps to this component, and defines a type for the resulting props -const provider = provide( - (state: ApplicationState) => state.genreDetails, - GenreDetailsStore.actionCreators -).withExternalProps<{ params: RouteParams }>(); - -type GenreDetailsProps = typeof provider.allProps; -export default provider.connect(GenreDetails); diff --git a/samples/react/MusicStore/ReactApp/components/public/Genres.tsx b/samples/react/MusicStore/ReactApp/components/public/Genres.tsx deleted file mode 100644 index 1e03789b..00000000 --- a/samples/react/MusicStore/ReactApp/components/public/Genres.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import * as React from 'react'; -import { Link } from 'react-router'; -import { provide } from 'redux-typed'; -import { ApplicationState } from '../../store'; -import * as GenreList from '../../store/GenreList'; - -class Genres extends React.Component { - componentWillMount() { - this.props.requestGenresList(); - } - - public render() { - const { genres } = this.props; - return
    -

    Browse Genres

    - -

    Select from { this.props.isLoaded ? genres.length : '...' } genres:

    - -
      - {genres.map(genre => -
    • - - { genre.Name } - -
    • - )} -
    -
    ; - } -} - -// Selects which part of global state maps to this component, and defines a type for the resulting props -const provider = provide( - (state: ApplicationState) => state.genreList, - GenreList.actionCreators -); -type GenresProps = typeof provider.allProps; -export default provider.connect(Genres); diff --git a/samples/react/MusicStore/ReactApp/components/public/Home.tsx b/samples/react/MusicStore/ReactApp/components/public/Home.tsx deleted file mode 100644 index b0f03d80..00000000 --- a/samples/react/MusicStore/ReactApp/components/public/Home.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import * as React from 'react'; -import { Link } from 'react-router'; -import { provide } from 'redux-typed'; -import { ApplicationState } from '../../store'; -import { actionCreators } from '../../store/FeaturedAlbums'; -import { AlbumTile } from './AlbumTile'; - -class Home extends React.Component { - componentWillMount() { - this.props.requestFeaturedAlbums(); - } - - public render() { - return
    -
    -

    MVC Music Store

    - -
    -
      - {this.props.albums.map(album => - - )} -
    -
    ; - } -} - -// Selects which part of global state maps to this component, and defines a type for the resulting props -const provider = provide( - (state: ApplicationState) => state.featuredAlbums, - actionCreators -); -type HomeProps = typeof provider.allProps; -export default provider.connect(Home); diff --git a/samples/react/MusicStore/ReactApp/configureStore.ts b/samples/react/MusicStore/ReactApp/configureStore.ts deleted file mode 100644 index b7788452..00000000 --- a/samples/react/MusicStore/ReactApp/configureStore.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { createStore, applyMiddleware, compose, combineReducers, GenericStoreEnhancer } from 'redux'; -import thunk from 'redux-thunk'; -import { routerReducer } from 'react-router-redux'; -import * as Store from './store'; -import { typedToPlain } from 'redux-typed'; - -export default function configureStore(initialState?: Store.ApplicationState) { - // Build middleware. These are functions that can process the actions before they reach the store. - const windowIfDefined = typeof window === 'undefined' ? null : window as any; - // If devTools is installed, connect to it - const devToolsExtension = windowIfDefined && windowIfDefined.devToolsExtension as () => GenericStoreEnhancer; - const createStoreWithMiddleware = compose( - applyMiddleware(thunk, typedToPlain), - devToolsExtension ? devToolsExtension() : f => f - )(createStore); - - // Combine all reducers and instantiate the app-wide store instance - const allReducers = buildRootReducer(Store.reducers); - const store = createStoreWithMiddleware(allReducers, initialState) as Redux.Store; - - // Enable Webpack hot module replacement for reducers - if (module.hot) { - module.hot.accept('./store', () => { - const nextRootReducer = require('./store'); - store.replaceReducer(buildRootReducer(nextRootReducer.reducers)); - }); - } - - return store; -} - -function buildRootReducer(allReducers) { - return combineReducers(Object.assign({}, allReducers, { routing: routerReducer })); -} diff --git a/samples/react/MusicStore/ReactApp/routes.tsx b/samples/react/MusicStore/ReactApp/routes.tsx deleted file mode 100644 index bf4f5fca..00000000 --- a/samples/react/MusicStore/ReactApp/routes.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from 'react'; -import { Router, Route, HistoryBase } from 'react-router'; -import NavMenu from './components/NavMenu'; -import Home from './components/public/Home'; -import Genres from './components/public/Genres'; -import GenreDetails from './components/public/GenreDetails'; -import AlbumDetails from './components/public/AlbumDetails'; - -class Layout extends React.Component<{ body: React.ReactElement }, void> { - public render() { - return
    - -
    - { this.props.body } -
    -
    ; - } -} - -export const routes = - - - - -; diff --git a/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts b/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts deleted file mode 100644 index ad3f458e..00000000 --- a/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { fetch, addTask } from 'domain-task'; -import { typeName, isActionType, Action, Reducer } from 'redux-typed'; -import { ActionCreator } from './'; -import { Genre } from './GenreList'; - -// ----------------- -// STATE - This defines the type of data maintained in the Redux store. - -export interface AlbumDetailsState { - album: AlbumDetails; - requestedAlbumId: number; -} - -export interface AlbumDetails { - AlbumId: number; - Title: string; - AlbumArtUrl: string; - Genre: Genre; - Artist: Artist; - Price: number; -} - -interface Artist { - Name: string; -} - -// ----------------- -// ACTIONS - These are serializable (hence replayable) descriptions of state transitions. -// They do not themselves have any side-effects; they just describe something that is going to happen. -// Use @typeName and isActionType for type detection that works even after serialization/deserialization. - -@typeName("REQUEST_ALBUM_DETAILS") -class RequestAlbumDetails extends Action { - constructor(public albumId: number) { - super(); - } -} - -@typeName("RECEIVE_ALBUM_DETAILS") -class ReceiveAlbumDetails extends Action { - constructor(public album: AlbumDetails) { - super(); - } -} - -// ---------------- -// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition. -// They don't directly mutate state, but they can have external side-effects (such as loading data). - -export const actionCreators = { - requestAlbumDetails: (albumId: number): ActionCreator => (dispatch, getState) => { - // Only load if it's not already loaded (or currently being loaded) - if (albumId !== getState().albumDetails.requestedAlbumId) { - let fetchTask = fetch(`/api/albums/${ albumId }`) - .then(results => results.json()) - .then(album => { - // Only replace state if it's still the most recent request - if (albumId === getState().albumDetails.requestedAlbumId) { - dispatch(new ReceiveAlbumDetails(album)); - } - }); - - addTask(fetchTask); // Ensure server-side prerendering waits for this to complete - dispatch(new RequestAlbumDetails(albumId)); - } - } -}; - -// ---------------- -// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state. -// For unrecognized actions, must return the existing state (or default initial state if none was supplied). -const unloadedState: AlbumDetailsState = { requestedAlbumId: null as number, album: null }; -export const reducer: Reducer = (state, action) => { - if (isActionType(action, RequestAlbumDetails)) { - return { requestedAlbumId: action.albumId, album: null }; - } else if (isActionType(action, ReceiveAlbumDetails)) { - return { requestedAlbumId: action.album.AlbumId, album: action.album }; - } else { - return state || unloadedState; - } -}; diff --git a/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts b/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts deleted file mode 100644 index f9e78282..00000000 --- a/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { fetch, addTask } from 'domain-task'; -import { typeName, isActionType, Action, Reducer } from 'redux-typed'; -import { ActionCreator } from './'; - -// ----------------- -// STATE - This defines the type of data maintained in the Redux store. - -export interface FeaturedAlbumsState { - albums: Album[]; - isLoaded: boolean; -} - -export interface Album { - AlbumId: number; - Title: string; - AlbumArtUrl: string; -} - -// ----------------- -// ACTIONS - These are serializable (hence replayable) descriptions of state transitions. -// They do not themselves have any side-effects; they just describe something that is going to happen. -// Use @typeName and isActionType for type detection that works even after serialization/deserialization. - -@typeName("REQUEST_FEATURED_ALBUMS") -class RequestFeaturedAlbums extends Action { -} - -@typeName("RECEIVE_FEATURED_ALBUMS") -class ReceiveFeaturedAlbums extends Action { - constructor(public albums: Album[]) { - super(); - } -} - -// ---------------- -// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition. -// They don't directly mutate state, but they can have external side-effects (such as loading data). - -export const actionCreators = { - requestFeaturedAlbums: (): ActionCreator => (dispatch, getState) => { - if (!getState().featuredAlbums.isLoaded) { - let fetchTask = fetch('/api/albums/mostPopular') - .then(results => results.json()) - .then(albums => dispatch(new ReceiveFeaturedAlbums(albums))); - - addTask(fetchTask); // Ensure server-side prerendering waits for this to complete - return dispatch(new RequestFeaturedAlbums()); - } - } -}; - -// ---------------- -// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state. -// For unrecognized actions, must return the existing state (or default initial state if none was supplied). - -export const reducer: Reducer = (state, action) => { - if (isActionType(action, ReceiveFeaturedAlbums)) { - return { albums: action.albums, isLoaded: true }; - } else { - return state || { albums: [], isLoaded: false }; - } -}; diff --git a/samples/react/MusicStore/ReactApp/store/GenreDetails.ts b/samples/react/MusicStore/ReactApp/store/GenreDetails.ts deleted file mode 100644 index 24848a10..00000000 --- a/samples/react/MusicStore/ReactApp/store/GenreDetails.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { fetch, addTask } from 'domain-task'; -import { typeName, isActionType, Action, Reducer } from 'redux-typed'; -import { ActionCreator } from './'; -import { Album } from './FeaturedAlbums'; - -// ----------------- -// STATE - This defines the type of data maintained in the Redux store. - -export interface GenreDetailsState { - requestedGenreId: number; - albums: Album[]; - isLoaded: boolean; -} - -// ----------------- -// ACTIONS - These are serializable (hence replayable) descriptions of state transitions. -// They do not themselves have any side-effects; they just describe something that is going to happen. -// Use @typeName and isActionType for type detection that works even after serialization/deserialization. - -@typeName("REQUEST_GENRE_DETAILS") -class RequestGenreDetails extends Action { - constructor(public genreId: number) { - super(); - } -} - -@typeName("RECEIVE_GENRE_DETAILS") -class ReceiveGenreDetails extends Action { - constructor(public genreId: number, public albums: Album[]) { - super(); - } -} - -// ---------------- -// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition. -// They don't directly mutate state, but they can have external side-effects (such as loading data). - -export const actionCreators = { - requestGenreDetails: (genreId: number): ActionCreator => (dispatch, getState) => { - // Only load if it's not already loaded (or currently being loaded) - if (genreId !== getState().genreDetails.requestedGenreId) { - let fetchTask = fetch(`/api/genres/${ genreId }/albums`) - .then(results => results.json()) - .then(albums => { - // Only replace state if it's still the most recent request - if (genreId === getState().genreDetails.requestedGenreId) { - dispatch(new ReceiveGenreDetails(genreId, albums)); - } - }); - - addTask(fetchTask); // Ensure server-side prerendering waits for this to complete - dispatch(new RequestGenreDetails(genreId)); - } - } -}; - -// ---------------- -// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state. -// For unrecognized actions, must return the existing state (or default initial state if none was supplied). -export const reducer: Reducer = (state, action) => { - if (isActionType(action, RequestGenreDetails)) { - return { requestedGenreId: action.genreId, albums: [], isLoaded: false }; - } else if (isActionType(action, ReceiveGenreDetails)) { - return { requestedGenreId: action.genreId, albums: action.albums, isLoaded: true }; - } else { - return state || { requestedGenreId: null as number, albums: [], isLoaded: false }; - } -}; diff --git a/samples/react/MusicStore/ReactApp/store/GenreList.ts b/samples/react/MusicStore/ReactApp/store/GenreList.ts deleted file mode 100644 index 8843f22e..00000000 --- a/samples/react/MusicStore/ReactApp/store/GenreList.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { fetch, addTask } from 'domain-task'; -import { typeName, isActionType, Action, Reducer } from 'redux-typed'; -import { ActionCreator } from './'; - -// ----------------- -// STATE - This defines the type of data maintained in the Redux store. - -export interface GenresListState { - genres: Genre[]; - isLoaded: boolean; -} - -export interface Genre { - GenreId: string; - Name: string; -} - -// ----------------- -// ACTIONS - These are serializable (hence replayable) descriptions of state transitions. -// They do not themselves have any side-effects; they just describe something that is going to happen. -// Use @typeName and isActionType for type detection that works even after serialization/deserialization. - -@typeName("RECEIVE_GENRES_LIST") -class ReceiveGenresList extends Action { - constructor(public genres: Genre[]) { - super(); - } -} - -// ---------------- -// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition. -// They don't directly mutate state, but they can have external side-effects (such as loading data). - -export const actionCreators = { - requestGenresList: (): ActionCreator => (dispatch, getState) => { - if (!getState().genreList.isLoaded) { - let fetchTask = fetch('/api/genres') - .then(results => results.json()) - .then(genres => dispatch(new ReceiveGenresList(genres))); - addTask(fetchTask); // Ensure server-side prerendering waits for this to complete - } - } -}; - -// ---------------- -// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state. -// For unrecognized actions, must return the existing state (or default initial state if none was supplied). - -export const reducer: Reducer = (state, action) => { - if (isActionType(action, ReceiveGenresList)) { - return { genres: action.genres, isLoaded: true }; - } else { - return state || { genres: [], isLoaded: false }; - } -}; diff --git a/samples/react/MusicStore/ReactApp/store/index.ts b/samples/react/MusicStore/ReactApp/store/index.ts deleted file mode 100644 index 50f6178c..00000000 --- a/samples/react/MusicStore/ReactApp/store/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ActionCreatorGeneric } from 'redux-typed'; -import * as FeaturedAlbums from './FeaturedAlbums'; -import * as GenreList from './GenreList'; -import * as GenreDetails from './GenreDetails'; -import * as AlbumDetails from './AlbumDetails'; - -// The top-level state object -export interface ApplicationState { - featuredAlbums: FeaturedAlbums.FeaturedAlbumsState; - genreList: GenreList.GenresListState, - genreDetails: GenreDetails.GenreDetailsState, - albumDetails: AlbumDetails.AlbumDetailsState -} - -// Whenever an action is dispatched, Redux will update each top-level application state property using -// the reducer with the matching name. It's important that the names match exactly, and that the reducer -// acts on the corresponding ApplicationState property type. -export const reducers = { - featuredAlbums: FeaturedAlbums.reducer, - genreList: GenreList.reducer, - genreDetails: GenreDetails.reducer, - albumDetails: AlbumDetails.reducer -}; - -// This type can be used as a hint on action creators so that its 'dispatch' and 'getState' params are -// correctly typed to match your store. -export type ActionCreator = ActionCreatorGeneric; diff --git a/samples/react/MusicStore/ReactApp/styles/styles.css b/samples/react/MusicStore/ReactApp/styles/styles.css deleted file mode 100644 index a8fc8a14..00000000 --- a/samples/react/MusicStore/ReactApp/styles/styles.css +++ /dev/null @@ -1,3 +0,0 @@ -body { - padding-top: 50px; -} diff --git a/samples/react/MusicStore/SiteSettings.cs b/samples/react/MusicStore/SiteSettings.cs deleted file mode 100644 index 50a86c24..00000000 --- a/samples/react/MusicStore/SiteSettings.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace MusicStore -{ - public class SiteSettings - { - public string DefaultAdminUsername { get; set; } - public string DefaultAdminPassword { get; set; } - } -} diff --git a/samples/react/MusicStore/Startup.cs b/samples/react/MusicStore/Startup.cs deleted file mode 100755 index 1bc6003d..00000000 --- a/samples/react/MusicStore/Startup.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; -using Microsoft.AspNetCore.SpaServices.Webpack; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.PlatformAbstractions; -using AutoMapper; -using MusicStore.Apis; -using MusicStore.Models; -using Newtonsoft.Json.Serialization; - -namespace MusicStore -{ - public class Startup - { - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddMvc().AddJsonOptions(options => - { - options.SerializerSettings.ContractResolver = null; - }); - - // Add EF services to the service container - services.AddEntityFramework() - .AddEntityFrameworkSqlite() - .AddDbContext(options => { - options.UseSqlite("Data Source=music-db.sqlite"); - }); - - // Add Identity services to the services container - services.AddIdentity() - .AddEntityFrameworkStores() - .AddDefaultTokenProviders(); - - // Configure Auth - services.Configure(options => - { - options.AddPolicy("app-ManageStore", new AuthorizationPolicyBuilder().RequireClaim("app-ManageStore", "Allowed").Build()); - }); - - Mapper.Initialize(cfg => - { - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - cfg.CreateMap(); - }); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHostingEnvironment env) - { - app.UseDeveloperExceptionPage(); - - // Initialize the sample data - SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait(); - - // In dev mode, the JS/TS/etc is compiled and served dynamically and supports hot replacement. - // In production, we assume you've used webpack to emit the prebuilt content to disk. - if (env.IsDevelopment()) { - app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { - HotModuleReplacement = true, - ReactHotModuleReplacement = true - }); - } - - app.UseStaticFiles(); - loggerFactory.AddConsole(); - - // Add MVC to the request pipeline. - app.UseMvc(routes => - { - // Matches requests that correspond to an existent controller/action pair - routes.MapRoute( - name: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - - // Matches any other request that doesn't appear to have a filename extension (defined as 'having a dot in the last URI segment'). - // This means you'll correctly get 404s for /some/dir/non-existent-image.png instead of returning the SPA HTML. - // However, it means requests like /customers/isaac.newton will *not* be mapped into the SPA, so if you need to accept - // URIs like that you'll need to match all URIs, e.g.: - // routes.MapRoute("spa-fallback", "{*anything}", new { controller = "Home", action = "Index" }); - // (which of course will match /customers/isaac.png too, so in that case it would serve the PNG image at that URL if one is on disk, - // or the SPA HTML if not). - routes.MapSpaFallbackRoute("spa-fallback", new { controller = "Home", action = "Index" }); - }); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/samples/react/MusicStore/Views/Home/Index.cshtml b/samples/react/MusicStore/Views/Home/Index.cshtml deleted file mode 100755 index 9595e016..00000000 --- a/samples/react/MusicStore/Views/Home/Index.cshtml +++ /dev/null @@ -1,11 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -
    - -@section scripts { - - -} diff --git a/samples/react/MusicStore/Views/Shared/Error.cshtml b/samples/react/MusicStore/Views/Shared/Error.cshtml deleted file mode 100755 index 473b35d6..00000000 --- a/samples/react/MusicStore/Views/Shared/Error.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Error"; -} - -

    Error.

    -

    An error occurred while processing your request.

    diff --git a/samples/react/MusicStore/Views/Shared/_Layout.cshtml b/samples/react/MusicStore/Views/Shared/_Layout.cshtml deleted file mode 100755 index 47e4e48f..00000000 --- a/samples/react/MusicStore/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - @ViewData["Title"] - - - - @RenderBody() - @RenderSection("scripts", required: false) - - diff --git a/samples/react/MusicStore/Views/_ViewImports.cshtml b/samples/react/MusicStore/Views/_ViewImports.cshtml deleted file mode 100755 index 17302928..00000000 --- a/samples/react/MusicStore/Views/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using MusicStore -@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" -@addTagHelper "*, Microsoft.AspNetCore.SpaServices" diff --git a/samples/react/MusicStore/Views/_ViewStart.cshtml b/samples/react/MusicStore/Views/_ViewStart.cshtml deleted file mode 100755 index 820a2f6e..00000000 --- a/samples/react/MusicStore/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/samples/react/MusicStore/package.json b/samples/react/MusicStore/package.json deleted file mode 100644 index 9d0a7cc0..00000000 --- a/samples/react/MusicStore/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "music-store", - "version": "0.0.0", - "dependencies": { - "@types/react": "^0.14.29", - "@types/react-bootstrap": "^0.0.35", - "@types/react-dom": "^0.14.14", - "@types/react-redux": "^4.4.29", - "@types/react-router": "^2.0.30", - "@types/react-router-bootstrap": "^0.0.27", - "@types/react-router-redux": "^4.0.30", - "@types/redux": "3.5.27", - "@types/redux-thunk": "^2.1.28", - "@types/source-map": "^0.1.28", - "@types/uglify-js": "^2.0.27", - "@types/webpack": "^1.12.35", - "@types/webpack-env": "^1.12.1", - "@types/whatwg-fetch": "0.0.28", - "aspnet-prerendering": "^1.0.7", - "aspnet-webpack": "^1.0.17", - "aspnet-webpack-react": "^1.0.2", - "babel-core": "^6.5.2", - "babel-loader": "^6.2.3", - "babel-preset-es2015": "^6.5.0", - "babel-preset-react": "^6.5.0", - "bootstrap": "^3.3.6", - "css-loader": "^0.23.1", - "domain-task": "^2.0.1", - "event-source-polyfill": "^0.0.7", - "extract-text-webpack-plugin": "^1.0.1", - "file-loader": "^0.8.5", - "jquery": "^2.2.1", - "react": "^15.3.2", - "react-bootstrap": "^0.30.6", - "react-dom": "^15.3.2", - "react-redux": "^4.4.5", - "react-router": "^2.8.1", - "react-router-bootstrap": "^0.23.1", - "react-router-redux": "^4.0.6", - "redux": "^3.6.0", - "redux-thunk": "^2.1.0", - "redux-typed": "^2.0.0", - "style-loader": "^0.13.0", - "ts-loader": "^0.8.1", - "typescript": "2.0.3", - "url-loader": "^0.5.7", - "webpack": "^1.13.2", - "webpack-hot-middleware": "^2.12.2", - "webpack-merge": "^0.14.1", - "webpack-node-externals": "^1.4.3" - } -} diff --git a/samples/react/MusicStore/project.json b/samples/react/MusicStore/project.json deleted file mode 100755 index 423d3138..00000000 --- a/samples/react/MusicStore/project.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.1", - "type": "platform" - }, - "Microsoft.AspNetCore.ReactServices": "1.0.0-*", - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0", - "Microsoft.AspNetCore.Mvc": "1.0.1", - "Microsoft.AspNetCore.Razor.Tools": { - "version": "1.0.0-preview2-final", - "type": "build" - }, - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.EntityFrameworkCore.SQLite": "1.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", - "Microsoft.Extensions.Configuration.Json": "1.0.0", - "Microsoft.Extensions.Configuration.CommandLine": "1.0.0", - "Microsoft.Extensions.Logging": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0", - "Microsoft.Extensions.Logging.Debug": "1.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0", - "AutoMapper": "5.0.2" - }, - - "tools": { - "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", - "Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final" - }, - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "portable-net45+win8" - ] - } - }, - - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true, - "compile": { - "exclude": ["node_modules"] - } - }, - - "runtimeOptions": { - "configProperties": { - "System.GC.Server": true - } - }, - - "publishOptions": { - "include": [ - "appsettings.json", - "ClientApp/dist", - "node_modules", - "Views", - "web.config", - "wwwroot" - ], - "exclude": [ - "wwwroot/dist/*.map" - ] - }, - - "scripts": { - "prepublish": [ - "npm install", - "node node_modules/webpack/bin/webpack.js" - ], - "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] - }, - - "tooling": { - "defaultNamespace": "MusicStore" - } -} diff --git a/samples/react/MusicStore/tsconfig.json b/samples/react/MusicStore/tsconfig.json deleted file mode 100644 index f5bad2ca..00000000 --- a/samples/react/MusicStore/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node", - "target": "es6", - "jsx": "preserve", - "sourceMap": true, - "experimentalDecorators": true, - "types": [ "webpack-env", "whatwg-fetch" ] - }, - "exclude": [ - "node_modules" - ] -} diff --git a/samples/react/MusicStore/webpack.config.js b/samples/react/MusicStore/webpack.config.js deleted file mode 100644 index c6446129..00000000 --- a/samples/react/MusicStore/webpack.config.js +++ /dev/null @@ -1,32 +0,0 @@ -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); - -module.exports = { - devtool: 'inline-source-map', - resolve: { - extensions: [ '', '.js', '.jsx', '.ts', '.tsx' ] - }, - module: { - loaders: [ - { test: /\.ts(x?)$/, include: /ReactApp/, exclude: /node_modules/, loader: 'babel-loader' }, - { test: /\.ts(x?)$/, include: /ReactApp/, exclude: /node_modules/, loader: 'ts-loader' }, - { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') }, - { test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' } - ] - }, - entry: { - main: ['./ReactApp/boot.tsx'], - vendor: ['react'] - }, - output: { - path: path.join(__dirname, 'wwwroot', 'dist'), - filename: '[name].js', - publicPath: '/dist/' - }, - plugins: [ - new webpack.optimize.OccurenceOrderPlugin(), - new ExtractTextPlugin('main.css'), - new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.bundle.js') // Moves vendor content out of other bundles - ] -}; diff --git a/samples/react/MusicStore/wwwroot/favicon.ico b/samples/react/MusicStore/wwwroot/favicon.ico deleted file mode 100755 index a3a79998..00000000 Binary files a/samples/react/MusicStore/wwwroot/favicon.ico and /dev/null differ diff --git a/samples/react/MusicStore/wwwroot/images/home-showcase.png b/samples/react/MusicStore/wwwroot/images/home-showcase.png deleted file mode 100644 index 258c19d3..00000000 Binary files a/samples/react/MusicStore/wwwroot/images/home-showcase.png and /dev/null differ diff --git a/samples/react/MusicStore/wwwroot/images/logo.png b/samples/react/MusicStore/wwwroot/images/logo.png deleted file mode 100644 index d334c862..00000000 Binary files a/samples/react/MusicStore/wwwroot/images/logo.png and /dev/null differ diff --git a/samples/react/MusicStore/wwwroot/images/placeholder.png b/samples/react/MusicStore/wwwroot/images/placeholder.png deleted file mode 100644 index 1f73dbb4..00000000 Binary files a/samples/react/MusicStore/wwwroot/images/placeholder.png and /dev/null differ diff --git a/samples/react/MusicStore/wwwroot/web.config b/samples/react/MusicStore/wwwroot/web.config deleted file mode 100644 index e70a7778..00000000 --- a/samples/react/MusicStore/wwwroot/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/samples/react/ReactGrid/.babelrc b/samples/react/ReactGrid/.babelrc deleted file mode 100644 index d4e5f8d4..00000000 --- a/samples/react/ReactGrid/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015", "react"] -} diff --git a/samples/react/ReactGrid/.gitignore b/samples/react/ReactGrid/.gitignore deleted file mode 100644 index 22ae0ea2..00000000 --- a/samples/react/ReactGrid/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/node_modules/ -project.lock.json -/wwwroot/dist/ -/Properties/launchSettings.json diff --git a/samples/react/ReactGrid/Controllers/HomeController.cs b/samples/react/ReactGrid/Controllers/HomeController.cs deleted file mode 100755 index b7a48c4f..00000000 --- a/samples/react/ReactGrid/Controllers/HomeController.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace ReactExample.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - - public IActionResult Error() - { - return View("~/Views/Shared/Error.cshtml"); - } - } -} diff --git a/samples/react/ReactGrid/Controllers/PeopleApiController.cs b/samples/react/ReactGrid/Controllers/PeopleApiController.cs deleted file mode 100644 index fd3e29c2..00000000 --- a/samples/react/ReactGrid/Controllers/PeopleApiController.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace ReactExample.Controllers -{ - public class PeopleApiController : Controller - { - [HttpPut("api/people/{personId:int}")] - public ActionResult UpdatePerson([FromBody] PersonDto person) - { - if (!ModelState.IsValid) { - return BadRequest(ModelState); - } else { - return new OkResult(); - } - } - } - - public class PersonDto { - public string name { get; set; } - public string city { get; set; } - public string state { get; set; } - public string country { get; set; } - public string company { get; set; } - - [Range(1, 10)] - public int favoriteNumber { get; set; } - } -} diff --git a/samples/react/ReactGrid/README.txt b/samples/react/ReactGrid/README.txt deleted file mode 100644 index e702b308..00000000 --- a/samples/react/ReactGrid/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Portions of this sample application (particularly, the fake data) are based -on https://github.com/DavidWells/isomorphic-react-example diff --git a/samples/react/ReactGrid/ReactApp/boot-client.jsx b/samples/react/ReactGrid/ReactApp/boot-client.jsx deleted file mode 100644 index d109cdf0..00000000 --- a/samples/react/ReactGrid/ReactApp/boot-client.jsx +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import { browserHistory } from 'react-router'; -import { ReactApp } from './components/ReactApp.jsx'; -import 'bootstrap/dist/css/bootstrap.css'; - -// In the browser, we render into a DOM node and hook up to the browser's history APIs -ReactDOM.render(, document.getElementById('react-app')); diff --git a/samples/react/ReactGrid/ReactApp/boot-server.jsx b/samples/react/ReactGrid/ReactApp/boot-server.jsx deleted file mode 100644 index b41e0c7a..00000000 --- a/samples/react/ReactGrid/ReactApp/boot-server.jsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react'; -import { renderToString } from 'react-dom/server'; -import { match, RouterContext } from 'react-router'; -import { routes } from './components/ReactApp'; -React; - -export default function renderApp (params) { - return new Promise((resolve, reject) => { - // Match the incoming request against the list of client-side routes - match({ routes, location: params.location }, (error, redirectLocation, renderProps) => { - if (error) { - throw error; - } - - // Build an instance of the application - const app = ; - - // Render it as an HTML string which can be injected into the response - const html = renderToString(app); - resolve({ html }); - }); - }); -} diff --git a/samples/react/ReactGrid/ReactApp/components/CustomPager.jsx b/samples/react/ReactGrid/ReactApp/components/CustomPager.jsx deleted file mode 100644 index 50a30088..00000000 --- a/samples/react/ReactGrid/ReactApp/components/CustomPager.jsx +++ /dev/null @@ -1,50 +0,0 @@ -import * as React from 'react'; -import { Link } from 'react-router'; - -export class CustomPager extends React.Component { - pageChange(event) { - this.props.setPage(parseInt(event.target.getAttribute("data-value"))); - } - - render() { - var previous = null; - var next = null; - - if(this.props.currentPage > 0){ - previous =
    {this.props.previousText}
    ; - } - - if(this.props.currentPage != (this.props.maxPage -1)){ - next =
    {this.props.nextText}
    ; - } - - var options = []; - - var startIndex = Math.max(this.props.currentPage - 5, 0); - var endIndex = Math.min(startIndex + 11, this.props.maxPage); - - if (this.props.maxPage >= 11 && (endIndex - startIndex) <= 10) { - startIndex = endIndex - 11; - } - - for(var i = startIndex; i < endIndex ; i++){ - var selected = this.props.currentPage == i ? "btn-default" : ""; - options.push(
    {i+1}
    ); - } - - return ( -
    - {previous} - {options} - {next} -
    - ); - } -} - -CustomPager.defaultProps = { - maxPage: 0, - nextText: '', - previousText: '', - currentPage: 0 -}; diff --git a/samples/react/ReactGrid/ReactApp/components/PeopleGrid.jsx b/samples/react/ReactGrid/ReactApp/components/PeopleGrid.jsx deleted file mode 100644 index 6ce0ade6..00000000 --- a/samples/react/ReactGrid/ReactApp/components/PeopleGrid.jsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import Griddle from 'griddle-react'; -import { CustomPager } from './CustomPager.jsx'; -import { fakeData } from '../data/fakeData.js'; -import { columnMeta } from '../data/columnMeta.jsx'; -const resultsPerPage = 10; - -// Griddle requires each row to have a property matching each column, even if you're not displaying -// any data from the row in that column -fakeData.forEach(row => { row.actions = ''; }); - -export class PeopleGrid extends React.Component { - render() { - var pageIndex = this.props.params ? (this.props.params.pageIndex || 1) - 1 : 0; - return ( -
    -

    People

    -
    - x.columnName)} - columnMetadata={columnMeta} - resultsPerPage={resultsPerPage} - tableClassName="table" - useCustomPagerComponent="true" - customPagerComponent={CustomPager} - externalCurrentPage={pageIndex} /> -
    -
    - ); - } -} diff --git a/samples/react/ReactGrid/ReactApp/components/PersonEditor.jsx b/samples/react/ReactGrid/ReactApp/components/PersonEditor.jsx deleted file mode 100644 index 3c78f586..00000000 --- a/samples/react/ReactGrid/ReactApp/components/PersonEditor.jsx +++ /dev/null @@ -1,57 +0,0 @@ -import React from 'react'; -import Formsy from 'formsy-react'; -import { Input } from 'formsy-react-components'; -import { fakeData } from '../data/fakeData.js'; - -export class PersonEditor extends React.Component { - constructor() { - super(); - this.state = { savedChanges: false }; - } - - onChange() { - this.setState({ savedChanges: false }); - } - - submit(model, reset, setErrors) { - PersonEditor.sendJson('put', `/api/people/${ this.props.params.personId }`, model).then(response => { - if (response.ok) { - this.setState({ savedChanges: true }); - } else { - // Parse server-side validation errors from the response and display them - response.json().then(setErrors); - } - }); - } - - render() { - var personId = parseInt(this.props.params.personId); - var person = fakeData.filter(p => p.id === personId)[0]; - var notificationBox = this.state.savedChanges - &&
    Done! Your changes were saved.
    ; - - return
    -
    -

    Edit { person.name }

    -
    - - - - - - - - { notificationBox } - - -
    ; - } - - static sendJson(method, url, object) { - return fetch(url, { - method: method, - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(object) - }); - } -} diff --git a/samples/react/ReactGrid/ReactApp/components/ReactApp.jsx b/samples/react/ReactGrid/ReactApp/components/ReactApp.jsx deleted file mode 100644 index 64977a74..00000000 --- a/samples/react/ReactGrid/ReactApp/components/ReactApp.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { Router, Route } from 'react-router'; -import { PeopleGrid } from './PeopleGrid.jsx'; -import { PersonEditor } from './PersonEditor.jsx'; - -export const routes = - - - -; - -export class ReactApp extends React.Component { - render() { - return ( - - ); - } -} diff --git a/samples/react/ReactGrid/ReactApp/data/columnMeta.jsx b/samples/react/ReactGrid/ReactApp/data/columnMeta.jsx deleted file mode 100644 index f66a8a95..00000000 --- a/samples/react/ReactGrid/ReactApp/data/columnMeta.jsx +++ /dev/null @@ -1,60 +0,0 @@ -import React from 'react'; -import { Link } from 'react-router'; - -class RowActionsComponent extends React.Component { - render() { - return Edit; - } -} - -export const columnMeta = [ - { - "columnName": "id", - "order": 1, - "locked": false, - "visible": true - }, - { - "columnName": "name", - "order": 2, - "locked": false, - "visible": true - }, - { - "columnName": "city", - "order": 3, - "locked": false, - "visible": true - }, - { - "columnName": "state", - "order": 4, - "locked": false, - "visible": true - }, - { - "columnName": "country", - "order": 5, - "locked": false, - "visible": true - }, - { - "columnName": "company", - "order": 6, - "locked": false, - "visible": true - }, - { - "columnName": "favoriteNumber", - "order": 7, - "locked": false, - "visible": true - }, - { - "columnName": "actions", - "order": 8, - "locked": true, - "visible": true, - "customComponent": RowActionsComponent - } -]; diff --git a/samples/react/ReactGrid/ReactApp/data/fakeData.js b/samples/react/ReactGrid/ReactApp/data/fakeData.js deleted file mode 100644 index 08c8c0e9..00000000 --- a/samples/react/ReactGrid/ReactApp/data/fakeData.js +++ /dev/null @@ -1,2486 +0,0 @@ -export const fakeData = [ - { - "id": 0, - "name": "Mayer Leonard", - "city": "Kapowsin", - "state": "Hawaii", - "country": "United Kingdom", - "company": "Ovolo", - "favoriteNumber": 7 - }, - { - "id": 1, - "name": "Koch Becker", - "city": "Johnsonburg", - "state": "New Jersey", - "country": "Madagascar", - "company": "Eventage", - "favoriteNumber": 2 - }, - { - "id": 2, - "name": "Lowery Hopkins", - "city": "Blanco", - "state": "Arizona", - "country": "Ukraine", - "company": "Comtext", - "favoriteNumber": 3 - }, - { - "id": 3, - "name": "Walters Mays", - "city": "Glendale", - "state": "Illinois", - "country": "New Zealand", - "company": "Corporana", - "favoriteNumber": 6 - }, - { - "id": 4, - "name": "Shaw Lowe", - "city": "Coultervillle", - "state": "Wyoming", - "country": "Ecuador", - "company": "Isologica", - "favoriteNumber": 2 - }, - { - "id": 5, - "name": "Ola Fernandez", - "city": "Deltaville", - "state": "Delaware", - "country": "Virgin Islands (US)", - "company": "Pawnagra", - "favoriteNumber": 7 - }, - { - "id": 6, - "name": "Park Carr", - "city": "Welda", - "state": "Kentucky", - "country": "Sri Lanka", - "company": "Cosmetex", - "favoriteNumber": 7 - }, - { - "id": 7, - "name": "Laverne Johnson", - "city": "Rosburg", - "state": "New Mexico", - "country": "Croatia", - "company": "Housedown", - "favoriteNumber": 9 - }, - { - "id": 8, - "name": "Lizzie Nelson", - "city": "Chumuckla", - "state": "Montana", - "country": "Turks & Caicos", - "company": "Everest", - "favoriteNumber": 2 - }, - { - "id": 9, - "name": "Clarke Clemons", - "city": "Inkerman", - "state": "Rhode Island", - "country": "Cambodia", - "company": "Apexia", - "favoriteNumber": 3 - }, - { - "id": 10, - "name": "Cindy Phelps", - "city": "Hachita", - "state": "North Carolina", - "country": "Namibia", - "company": "Pholio", - "favoriteNumber": 6 - }, - { - "id": 11, - "name": "Danielle Keller", - "city": "Stockdale", - "state": "Maryland", - "country": "Cape Verde", - "company": "Netility", - "favoriteNumber": 10 - }, - { - "id": 12, - "name": "Duke Hutchinson", - "city": "Needmore", - "state": "Indiana", - "country": "Brunei", - "company": "Electonic", - "favoriteNumber": 1 - }, - { - "id": 13, - "name": "Aimee Duffy", - "city": "Brownlee", - "state": "Vermont", - "country": "Lebanon", - "company": "Repetwire", - "favoriteNumber": 2 - }, - { - "id": 14, - "name": "Meadows Jimenez", - "city": "Winesburg", - "state": "Kansas", - "country": "Timor L'Este", - "company": "Quonk", - "favoriteNumber": 0 - }, - { - "id": 15, - "name": "Karla Potts", - "city": "Juarez", - "state": "Alaska", - "country": "Samoa", - "company": "Zentime", - "favoriteNumber": 3 - }, - { - "id": 16, - "name": "Rita Jensen", - "city": "Elwood", - "state": "North Dakota", - "country": "Greece", - "company": "Valpreal", - "favoriteNumber": 9 - }, - { - "id": 17, - "name": "Jackie Burke", - "city": "Delwood", - "state": "Arkansas", - "country": "Greenland", - "company": "Magmina", - "favoriteNumber": 4 - }, - { - "id": 18, - "name": "Corinne Moreno", - "city": "Wollochet", - "state": "New Hampshire", - "country": "Sierra Leone", - "company": "Marketoid", - "favoriteNumber": 1 - }, - { - "id": 19, - "name": "Giles Cohen", - "city": "Carbonville", - "state": "Massachusetts", - "country": "Tonga", - "company": "Ginkogene", - "favoriteNumber": 10 - }, - { - "id": 20, - "name": "Maynard Barnes", - "city": "Boling", - "state": "Utah", - "country": "Nepal", - "company": "Kyaguru", - "favoriteNumber": 8 - }, - { - "id": 21, - "name": "Singleton Lindsay", - "city": "Weogufka", - "state": "Tennessee", - "country": "Falkland Islands", - "company": "Egypto", - "favoriteNumber": 5 - }, - { - "id": 22, - "name": "Etta Kemp", - "city": "Como", - "state": "Pennsylvania", - "country": "Syria", - "company": "Marqet", - "favoriteNumber": 3 - }, - { - "id": 23, - "name": "Whitney Pennington", - "city": "Farmington", - "state": "Louisiana", - "country": "Suriname", - "company": "Prosure", - "favoriteNumber": 10 - }, - { - "id": 24, - "name": "Sophie Ellison", - "city": "Whitewater", - "state": "Idaho", - "country": "Malta", - "company": "Evidends", - "favoriteNumber": 1 - }, - { - "id": 25, - "name": "Logan Forbes", - "city": "Idledale", - "state": "Michigan", - "country": "Dominican Republic", - "company": "Pigzart", - "favoriteNumber": 3 - }, - { - "id": 26, - "name": "Haley Mcclure", - "city": "Eggertsville", - "state": "Colorado", - "country": "Honduras", - "company": "Ginkle", - "favoriteNumber": 8 - }, - { - "id": 27, - "name": "Williamson Hurley", - "city": "Edgar", - "state": "Texas", - "country": "Yemen", - "company": "Tetratrex", - "favoriteNumber": 3 - }, - { - "id": 28, - "name": "Heidi Hurst", - "city": "Curtice", - "state": "Nebraska", - "country": "Aruba", - "company": "Vendblend", - "favoriteNumber": 10 - }, - { - "id": 29, - "name": "Barker Long", - "city": "Orovada", - "state": "West Virginia", - "country": "Egypt", - "company": "Uniworld", - "favoriteNumber": 8 - }, - { - "id": 30, - "name": "Richard Patrick", - "city": "Gordon", - "state": "Oregon", - "country": "Malawi", - "company": "Quarx", - "favoriteNumber": 8 - }, - { - "id": 31, - "name": "Cameron Graham", - "city": "Noblestown", - "state": "Oklahoma", - "country": "Slovenia", - "company": "Zilidium", - "favoriteNumber": 5 - }, - { - "id": 32, - "name": "Lucy Quinn", - "city": "Greenock", - "state": "Ohio", - "country": "Australia", - "company": "Geoform", - "favoriteNumber": 10 - }, - { - "id": 33, - "name": "Dickson Greene", - "city": "Jeff", - "state": "Virginia", - "country": "Iraq", - "company": "Niquent", - "favoriteNumber": 6 - }, - { - "id": 34, - "name": "Jasmine Brock", - "city": "Tolu", - "state": "Mississippi", - "country": "Hungary", - "company": "Cytrek", - "favoriteNumber": 8 - }, - { - "id": 35, - "name": "Byers Donaldson", - "city": "Jugtown", - "state": "South Dakota", - "country": "Mongolia", - "company": "Slambda", - "favoriteNumber": 4 - }, - { - "id": 36, - "name": "Burns Blake", - "city": "Shawmut", - "state": "Iowa", - "country": "Ethiopia", - "company": "Comstar", - "favoriteNumber": 9 - }, - { - "id": 37, - "name": "Norman Wynn", - "city": "Hasty", - "state": "Washington", - "country": "Bangladesh", - "company": "Netplode", - "favoriteNumber": 7 - }, - { - "id": 38, - "name": "Anthony Weeks", - "city": "Chautauqua", - "state": "Florida", - "country": "Sudan", - "company": "Rubadub", - "favoriteNumber": 9 - }, - { - "id": 39, - "name": "Courtney Marshall", - "city": "Grazierville", - "state": "California", - "country": "Zambia", - "company": "Medicroix", - "favoriteNumber": 0 - }, - { - "id": 40, - "name": "Wilda Foster", - "city": "Ebro", - "state": "New York", - "country": "Cameroon", - "company": "Xixan", - "favoriteNumber": 0 - }, - { - "id": 41, - "name": "Buckner Hyde", - "city": "Century", - "state": "Minnesota", - "country": "Mexico", - "company": "Plasmos", - "favoriteNumber": 6 - }, - { - "id": 42, - "name": "Montgomery Woodard", - "city": "Nadine", - "state": "Georgia", - "country": "Zimbabwe", - "company": "Neptide", - "favoriteNumber": 1 - }, - { - "id": 43, - "name": "Shirley Boyle", - "city": "Groveville", - "state": "Connecticut", - "country": "Tunisia", - "company": "Interodeo", - "favoriteNumber": 1 - }, - { - "id": 44, - "name": "Mavis Welch", - "city": "Springhill", - "state": "South Carolina", - "country": "Italy", - "company": "Asimiline", - "favoriteNumber": 9 - }, - { - "id": 45, - "name": "Barr Flowers", - "city": "Bowden", - "state": "Missouri", - "country": "South Korea", - "company": "Terragen", - "favoriteNumber": 7 - }, - { - "id": 46, - "name": "Cabrera Koch", - "city": "Wanship", - "state": "Maine", - "country": "Mauritius", - "company": "Norsul", - "favoriteNumber": 9 - }, - { - "id": 47, - "name": "Williams Gamble", - "city": "Homestead", - "state": "Wisconsin", - "country": "Romania", - "company": "Gynk", - "favoriteNumber": 4 - }, - { - "id": 48, - "name": "Angelica Washington", - "city": "Roulette", - "state": "Alabama", - "country": "South Africa", - "company": "Exoswitch", - "favoriteNumber": 3 - }, - { - "id": 49, - "name": "Morse Navarro", - "city": "Balm", - "state": "Hawaii", - "country": "Malaysia", - "company": "Comtours", - "favoriteNumber": 7 - }, - { - "id": 50, - "name": "Harding Chambers", - "city": "Lupton", - "state": "New Jersey", - "country": "Oman", - "company": "Gadtron", - "favoriteNumber": 6 - }, - { - "id": 51, - "name": "Frederick Mcdowell", - "city": "Kimmell", - "state": "Arizona", - "country": "Ireland", - "company": "Delphide", - "favoriteNumber": 2 - }, - { - "id": 52, - "name": "Valentine Turner", - "city": "Hobucken", - "state": "Illinois", - "country": "France", - "company": "Sloganaut", - "favoriteNumber": 0 - }, - { - "id": 53, - "name": "Ruby Cooper", - "city": "Connerton", - "state": "Wyoming", - "country": "Iceland", - "company": "Exospace", - "favoriteNumber": 5 - }, - { - "id": 54, - "name": "Natalia Nielsen", - "city": "Holtville", - "state": "Delaware", - "country": "Equatorial Guinea", - "company": "Isoswitch", - "favoriteNumber": 6 - }, - { - "id": 55, - "name": "Bobbie Silva", - "city": "Fivepointville", - "state": "Kentucky", - "country": "Luxembourg", - "company": "Futuris", - "favoriteNumber": 0 - }, - { - "id": 56, - "name": "Clarice Hays", - "city": "Floriston", - "state": "New Mexico", - "country": "Cruise Ship", - "company": "Skyplex", - "favoriteNumber": 5 - }, - { - "id": 57, - "name": "Leblanc Bartlett", - "city": "Catherine", - "state": "Montana", - "country": "Belarus", - "company": "Ezentia", - "favoriteNumber": 10 - }, - { - "id": 58, - "name": "Jodie Martinez", - "city": "Edneyville", - "state": "Rhode Island", - "country": "Antigua & Barbuda", - "company": "Satiance", - "favoriteNumber": 7 - }, - { - "id": 59, - "name": "Pennington Townsend", - "city": "Ahwahnee", - "state": "North Carolina", - "country": "Chad", - "company": "Orbiflex", - "favoriteNumber": 8 - }, - { - "id": 60, - "name": "Garrison Buchanan", - "city": "Coinjock", - "state": "Maryland", - "country": "Reunion", - "company": "Zanity", - "favoriteNumber": 3 - }, - { - "id": 61, - "name": "Cardenas Reeves", - "city": "Greensburg", - "state": "Indiana", - "country": "Gabon", - "company": "Cogentry", - "favoriteNumber": 1 - }, - { - "id": 62, - "name": "Angeline Jacobson", - "city": "Freeburn", - "state": "Vermont", - "country": "Fiji", - "company": "Pearlessa", - "favoriteNumber": 4 - }, - { - "id": 63, - "name": "Turner Franks", - "city": "Fairforest", - "state": "Kansas", - "country": "New Caledonia", - "company": "Maximind", - "favoriteNumber": 1 - }, - { - "id": 64, - "name": "Murphy Santos", - "city": "Waiohinu", - "state": "Alaska", - "country": "Haiti", - "company": "Isodrive", - "favoriteNumber": 0 - }, - { - "id": 65, - "name": "Walls Cherry", - "city": "Avalon", - "state": "North Dakota", - "country": "Mozambique", - "company": "Bolax", - "favoriteNumber": 10 - }, - { - "id": 66, - "name": "Carney Olson", - "city": "Nanafalia", - "state": "Arkansas", - "country": "Pakistan", - "company": "Unq", - "favoriteNumber": 10 - }, - { - "id": 67, - "name": "Jennings Bowers", - "city": "Kenwood", - "state": "New Hampshire", - "country": "Cayman Islands", - "company": "Deepends", - "favoriteNumber": 10 - }, - { - "id": 68, - "name": "Browning Wooten", - "city": "Jessie", - "state": "Massachusetts", - "country": "Guam", - "company": "Eventex", - "favoriteNumber": 5 - }, - { - "id": 69, - "name": "Preston Britt", - "city": "Dennard", - "state": "Utah", - "country": "Cyprus", - "company": "Sureplex", - "favoriteNumber": 4 - }, - { - "id": 70, - "name": "Holly Martin", - "city": "Carrizo", - "state": "Tennessee", - "country": "Nicaragua", - "company": "Sonique", - "favoriteNumber": 1 - }, - { - "id": 71, - "name": "Zelma Barker", - "city": "Zarephath", - "state": "Pennsylvania", - "country": "Czech Republic", - "company": "Xanide", - "favoriteNumber": 9 - }, - { - "id": 72, - "name": "Burgess Zamora", - "city": "Tampico", - "state": "Louisiana", - "country": "Poland", - "company": "Isopop", - "favoriteNumber": 10 - }, - { - "id": 73, - "name": "Galloway Rich", - "city": "Zeba", - "state": "Idaho", - "country": "Uzbekistan", - "company": "Dragbot", - "favoriteNumber": 4 - }, - { - "id": 74, - "name": "Morris Lott", - "city": "Wattsville", - "state": "Michigan", - "country": "Turkmenistan", - "company": "Slumberia", - "favoriteNumber": 3 - }, - { - "id": 75, - "name": "Paul Mcleod", - "city": "Glenbrook", - "state": "Colorado", - "country": "Cuba", - "company": "Candecor", - "favoriteNumber": 6 - }, - { - "id": 76, - "name": "Phoebe Orr", - "city": "Holcombe", - "state": "Texas", - "country": "Faroe Islands", - "company": "Cubicide", - "favoriteNumber": 4 - }, - { - "id": 77, - "name": "Dalton Christensen", - "city": "Rossmore", - "state": "Nebraska", - "country": "Belgium", - "company": "Enormo", - "favoriteNumber": 4 - }, - { - "id": 78, - "name": "Flora Goff", - "city": "Gila", - "state": "West Virginia", - "country": "Philippines", - "company": "Miracula", - "favoriteNumber": 4 - }, - { - "id": 79, - "name": "Sheree Ross", - "city": "Welch", - "state": "Oregon", - "country": "French Polynesia", - "company": "Illumity", - "favoriteNumber": 0 - }, - { - "id": 80, - "name": "Nita Jefferson", - "city": "Calverton", - "state": "Oklahoma", - "country": "Estonia", - "company": "Cincyr", - "favoriteNumber": 2 - }, - { - "id": 81, - "name": "Elma Mendoza", - "city": "Cornfields", - "state": "Ohio", - "country": "Botswana", - "company": "Isotronic", - "favoriteNumber": 6 - }, - { - "id": 82, - "name": "Garcia Hensley", - "city": "Kohatk", - "state": "Virginia", - "country": "Congo", - "company": "Plasmox", - "favoriteNumber": 4 - }, - { - "id": 83, - "name": "Delgado Osborn", - "city": "Nescatunga", - "state": "Mississippi", - "country": "Montenegro", - "company": "Magneato", - "favoriteNumber": 1 - }, - { - "id": 84, - "name": "Chavez Simmons", - "city": "Roderfield", - "state": "South Dakota", - "country": "Norway", - "company": "Waab", - "favoriteNumber": 1 - }, - { - "id": 85, - "name": "Stuart Roach", - "city": "Hebron", - "state": "Iowa", - "country": "Georgia", - "company": "Applica", - "favoriteNumber": 0 - }, - { - "id": 86, - "name": "Georgia Henson", - "city": "Greenbackville", - "state": "Washington", - "country": "Guinea Bissau", - "company": "Talkalot", - "favoriteNumber": 7 - }, - { - "id": 87, - "name": "Ila Sanders", - "city": "Zortman", - "state": "Florida", - "country": "Brazil", - "company": "Koffee", - "favoriteNumber": 10 - }, - { - "id": 88, - "name": "Shepard Maldonado", - "city": "Lawrence", - "state": "California", - "country": "Netherlands", - "company": "Knowlysis", - "favoriteNumber": 1 - }, - { - "id": 89, - "name": "Ramirez Collins", - "city": "Healy", - "state": "New York", - "country": "Guernsey", - "company": "Entroflex", - "favoriteNumber": 4 - }, - { - "id": 90, - "name": "Magdalena Mcgee", - "city": "Goldfield", - "state": "Minnesota", - "country": "Qatar", - "company": "Xelegyl", - "favoriteNumber": 0 - }, - { - "id": 91, - "name": "Crystal Kinney", - "city": "Nogal", - "state": "Georgia", - "country": "Kuwait", - "company": "Zork", - "favoriteNumber": 3 - }, - { - "id": 92, - "name": "Witt Colon", - "city": "Yorklyn", - "state": "Connecticut", - "country": "Singapore", - "company": "Techmania", - "favoriteNumber": 8 - }, - { - "id": 93, - "name": "Joyce Randolph", - "city": "Leland", - "state": "South Carolina", - "country": "Dominica", - "company": "Realmo", - "favoriteNumber": 2 - }, - { - "id": 94, - "name": "Ora Oneil", - "city": "Gilgo", - "state": "Missouri", - "country": "Bahamas", - "company": "Hinway", - "favoriteNumber": 7 - }, - { - "id": 95, - "name": "Hansen Rose", - "city": "Starks", - "state": "Maine", - "country": "Iran", - "company": "Virxo", - "favoriteNumber": 6 - }, - { - "id": 96, - "name": "Isabelle Rush", - "city": "Datil", - "state": "Wisconsin", - "country": "Switzerland", - "company": "Ecraze", - "favoriteNumber": 4 - }, - { - "id": 97, - "name": "Hoffman Crosby", - "city": "Trucksville", - "state": "Alabama", - "country": "Indonesia", - "company": "Multron", - "favoriteNumber": 10 - }, - { - "id": 98, - "name": "Louella Cotton", - "city": "Shelby", - "state": "Hawaii", - "country": "Tajikistan", - "company": "Supportal", - "favoriteNumber": 0 - }, - { - "id": 99, - "name": "Elvia Drake", - "city": "Albrightsville", - "state": "New Jersey", - "country": "Grenada", - "company": "Kiosk", - "favoriteNumber": 10 - }, - { - "id": 100, - "name": "Tyson Guerra", - "city": "Sutton", - "state": "Arizona", - "country": "Benin", - "company": "Dadabase", - "favoriteNumber": 4 - }, - { - "id": 101, - "name": "Marion Sloan", - "city": "Winchester", - "state": "Illinois", - "country": "Venezuela", - "company": "Exostream", - "favoriteNumber": 0 - }, - { - "id": 102, - "name": "Faulkner Diaz", - "city": "Logan", - "state": "Wyoming", - "country": "Monaco", - "company": "Oceanica", - "favoriteNumber": 10 - }, - { - "id": 103, - "name": "Penelope Price", - "city": "Alafaya", - "state": "Delaware", - "country": "Chile", - "company": "Nebulean", - "favoriteNumber": 10 - }, - { - "id": 104, - "name": "Kaitlin Glover", - "city": "Succasunna", - "state": "Kentucky", - "country": "Puerto Rico", - "company": "Orbean", - "favoriteNumber": 4 - }, - { - "id": 105, - "name": "Elena English", - "city": "Wedgewood", - "state": "New Mexico", - "country": "Algeria", - "company": "Kiggle", - "favoriteNumber": 0 - }, - { - "id": 106, - "name": "Clemons Sweeney", - "city": "Saranap", - "state": "Montana", - "country": "Ghana", - "company": "Konnect", - "favoriteNumber": 8 - }, - { - "id": 107, - "name": "Kelsey Blevins", - "city": "Vincent", - "state": "Rhode Island", - "country": "Albania", - "company": "Xymonk", - "favoriteNumber": 7 - }, - { - "id": 108, - "name": "Schroeder Craft", - "city": "Roosevelt", - "state": "North Carolina", - "country": "Satellite", - "company": "Isotrack", - "favoriteNumber": 8 - }, - { - "id": 109, - "name": "Hill Clark", - "city": "Elrama", - "state": "Maryland", - "country": "Slovakia", - "company": "Waterbaby", - "favoriteNumber": 0 - }, - { - "id": 110, - "name": "Glover Meyers", - "city": "Riviera", - "state": "Indiana", - "country": "Liberia", - "company": "Digigene", - "favoriteNumber": 0 - }, - { - "id": 111, - "name": "Lola Parrish", - "city": "Ellerslie", - "state": "Vermont", - "country": "Azerbaijan", - "company": "Myopium", - "favoriteNumber": 1 - }, - { - "id": 112, - "name": "Nora Rivers", - "city": "Belvoir", - "state": "Kansas", - "country": "Afghanistan", - "company": "Comtrek", - "favoriteNumber": 10 - }, - { - "id": 113, - "name": "Cohen Pacheco", - "city": "Bethpage", - "state": "Alaska", - "country": "Netherlands Antilles", - "company": "Accufarm", - "favoriteNumber": 7 - }, - { - "id": 114, - "name": "Diann Horn", - "city": "Derwood", - "state": "North Dakota", - "country": "Seychelles", - "company": "Synkgen", - "favoriteNumber": 3 - }, - { - "id": 115, - "name": "Amalia Nicholson", - "city": "Hendersonville", - "state": "Arkansas", - "country": "Lesotho", - "company": "Geekus", - "favoriteNumber": 2 - }, - { - "id": 116, - "name": "Mcgee Kane", - "city": "Dante", - "state": "New Hampshire", - "country": "Nigeria", - "company": "Kinetica", - "favoriteNumber": 9 - }, - { - "id": 117, - "name": "Shaffer Simpson", - "city": "Verdi", - "state": "Massachusetts", - "country": "Costa Rica", - "company": "Orbixtar", - "favoriteNumber": 0 - }, - { - "id": 118, - "name": "Lott Heath", - "city": "Castleton", - "state": "Utah", - "country": "Burkina Faso", - "company": "Reversus", - "favoriteNumber": 8 - }, - { - "id": 119, - "name": "Sasha Alvarez", - "city": "Foxworth", - "state": "Tennessee", - "country": "Montserrat", - "company": "Farmex", - "favoriteNumber": 9 - }, - { - "id": 120, - "name": "Sonja Rhodes", - "city": "Trona", - "state": "Pennsylvania", - "country": "Liechtenstein", - "company": "Pyramis", - "favoriteNumber": 2 - }, - { - "id": 121, - "name": "Rachel Elliott", - "city": "Hessville", - "state": "Louisiana", - "country": "Vietnam", - "company": "Centice", - "favoriteNumber": 0 - }, - { - "id": 122, - "name": "Elisa Justice", - "city": "Urie", - "state": "Idaho", - "country": "Senegal", - "company": "Dancerity", - "favoriteNumber": 2 - }, - { - "id": 123, - "name": "Velazquez Anderson", - "city": "Lowell", - "state": "Michigan", - "country": "Burundi", - "company": "Digial", - "favoriteNumber": 5 - }, - { - "id": 124, - "name": "Janet Ford", - "city": "Darlington", - "state": "Colorado", - "country": "Turkey", - "company": "Sportan", - "favoriteNumber": 10 - }, - { - "id": 125, - "name": "Simon Peterson", - "city": "Linwood", - "state": "Texas", - "country": "Kazakhstan", - "company": "Zytrac", - "favoriteNumber": 7 - }, - { - "id": 126, - "name": "Smith Baird", - "city": "Marne", - "state": "Nebraska", - "country": "Swaziland", - "company": "Genmy", - "favoriteNumber": 7 - }, - { - "id": 127, - "name": "Rogers Peters", - "city": "Tedrow", - "state": "West Virginia", - "country": "Spain", - "company": "Octocore", - "favoriteNumber": 1 - }, - { - "id": 128, - "name": "Bowers Ayers", - "city": "Matthews", - "state": "Oregon", - "country": "St Lucia", - "company": "Biotica", - "favoriteNumber": 6 - }, - { - "id": 129, - "name": "Paulette Delaney", - "city": "Riegelwood", - "state": "Oklahoma", - "country": "Guinea", - "company": "Netbook", - "favoriteNumber": 3 - }, - { - "id": 130, - "name": "Pat Klein", - "city": "Jacksonburg", - "state": "Ohio", - "country": "El Salvador", - "company": "Recrisys", - "favoriteNumber": 5 - }, - { - "id": 131, - "name": "Dena Rosa", - "city": "Hollymead", - "state": "Virginia", - "country": "Russia", - "company": "Sealoud", - "favoriteNumber": 6 - }, - { - "id": 132, - "name": "Rochelle Barnett", - "city": "Genoa", - "state": "Mississippi", - "country": "Kenya", - "company": "Ersum", - "favoriteNumber": 6 - }, - { - "id": 133, - "name": "Odom Schultz", - "city": "Blende", - "state": "South Dakota", - "country": "Papua New Guinea", - "company": "Elentrix", - "favoriteNumber": 0 - }, - { - "id": 134, - "name": "Anderson Franco", - "city": "Yardville", - "state": "Iowa", - "country": "Sweden", - "company": "Wazzu", - "favoriteNumber": 4 - }, - { - "id": 135, - "name": "Rebecca Wyatt", - "city": "Berwind", - "state": "Washington", - "country": "St Vincent", - "company": "Bristo", - "favoriteNumber": 2 - }, - { - "id": 136, - "name": "Dollie Hooper", - "city": "Richmond", - "state": "Florida", - "country": "Uruguay", - "company": "Vantage", - "favoriteNumber": 1 - }, - { - "id": 137, - "name": "Mathews Sharpe", - "city": "Glenshaw", - "state": "California", - "country": "Trinidad & Tobago", - "company": "Quilk", - "favoriteNumber": 4 - }, - { - "id": 138, - "name": "Debra Skinner", - "city": "Leming", - "state": "New York", - "country": "Saint Pierre & Miquelon", - "company": "Billmed", - "favoriteNumber": 1 - }, - { - "id": 139, - "name": "Cross Wells", - "city": "Caroline", - "state": "Minnesota", - "country": "Mauritania", - "company": "Strozen", - "favoriteNumber": 3 - }, - { - "id": 140, - "name": "Dodson Aguirre", - "city": "Nash", - "state": "Georgia", - "country": "Palestine", - "company": "Tripsch", - "favoriteNumber": 5 - }, - { - "id": 141, - "name": "Edna Copeland", - "city": "Harrison", - "state": "Connecticut", - "country": "Macedonia", - "company": "Flum", - "favoriteNumber": 10 - }, - { - "id": 142, - "name": "Dominguez Goodwin", - "city": "Condon", - "state": "South Carolina", - "country": "Laos", - "company": "Interloo", - "favoriteNumber": 0 - }, - { - "id": 143, - "name": "Fry Leach", - "city": "Advance", - "state": "Missouri", - "country": "Angola", - "company": "Recritube", - "favoriteNumber": 7 - }, - { - "id": 144, - "name": "Mann Malone", - "city": "Lumberton", - "state": "Maine", - "country": "India", - "company": "Xylar", - "favoriteNumber": 9 - }, - { - "id": 145, - "name": "Bridget Ayala", - "city": "Bellamy", - "state": "Wisconsin", - "country": "Cote D Ivoire", - "company": "Comvex", - "favoriteNumber": 7 - }, - { - "id": 146, - "name": "Blackwell Blanchard", - "city": "Ticonderoga", - "state": "Alabama", - "country": "Barbados", - "company": "Applideck", - "favoriteNumber": 7 - }, - { - "id": 147, - "name": "Maxine Irwin", - "city": "Longoria", - "state": "Hawaii", - "country": "Armenia", - "company": "Pearlesex", - "favoriteNumber": 10 - }, - { - "id": 148, - "name": "Laura Bryant", - "city": "Chicopee", - "state": "New Jersey", - "country": "Bosnia & Herzegovina", - "company": "Poshome", - "favoriteNumber": 0 - }, - { - "id": 149, - "name": "Zimmerman Little", - "city": "Rosewood", - "state": "Arizona", - "country": "Guatemala", - "company": "Boink", - "favoriteNumber": 4 - }, - { - "id": 150, - "name": "Barlow Reed", - "city": "Buxton", - "state": "Illinois", - "country": "Tanzania", - "company": "Premiant", - "favoriteNumber": 5 - }, - { - "id": 151, - "name": "Anita Briggs", - "city": "Laurelton", - "state": "Wyoming", - "country": "United Arab Emirates", - "company": "Codact", - "favoriteNumber": 3 - }, - { - "id": 152, - "name": "Ortiz Newton", - "city": "Blandburg", - "state": "Delaware", - "country": "Moldova", - "company": "Enersave", - "favoriteNumber": 7 - }, - { - "id": 153, - "name": "Cox Monroe", - "city": "Dupuyer", - "state": "Kentucky", - "country": "Taiwan", - "company": "Uneeq", - "favoriteNumber": 3 - }, - { - "id": 154, - "name": "Elinor Hughes", - "city": "Yukon", - "state": "New Mexico", - "country": "Bulgaria", - "company": "Bovis", - "favoriteNumber": 5 - }, - { - "id": 155, - "name": "Ronda Burks", - "city": "Ferney", - "state": "Montana", - "country": "Isle of Man", - "company": "Signity", - "favoriteNumber": 6 - }, - { - "id": 156, - "name": "Lourdes Walls", - "city": "Norwood", - "state": "Rhode Island", - "country": "Argentina", - "company": "Snacktion", - "favoriteNumber": 5 - }, - { - "id": 157, - "name": "Susana Mcintosh", - "city": "Manchester", - "state": "North Carolina", - "country": "Israel", - "company": "Teraprene", - "favoriteNumber": 5 - }, - { - "id": 158, - "name": "Alfreda Henry", - "city": "Wilsonia", - "state": "Maryland", - "country": "Bhutan", - "company": "Coash", - "favoriteNumber": 3 - }, - { - "id": 159, - "name": "Tiffany Chaney", - "city": "Carrsville", - "state": "Indiana", - "country": "Morocco", - "company": "Cinaster", - "favoriteNumber": 7 - }, - { - "id": 160, - "name": "Morton Edwards", - "city": "Barstow", - "state": "Vermont", - "country": "Hong Kong", - "company": "Ultrasure", - "favoriteNumber": 10 - }, - { - "id": 161, - "name": "Marcy Serrano", - "city": "Idamay", - "state": "Kansas", - "country": "Finland", - "company": "Isbol", - "favoriteNumber": 3 - }, - { - "id": 162, - "name": "Wendi Gutierrez", - "city": "Camas", - "state": "Alaska", - "country": "Andorra", - "company": "Turnling", - "favoriteNumber": 6 - }, - { - "id": 163, - "name": "Miriam Gates", - "city": "Helen", - "state": "North Dakota", - "country": "Djibouti", - "company": "Undertap", - "favoriteNumber": 8 - }, - { - "id": 164, - "name": "Adrienne Horne", - "city": "Snyderville", - "state": "Arkansas", - "country": "Gambia", - "company": "Olympix", - "favoriteNumber": 2 - }, - { - "id": 165, - "name": "Steele Morales", - "city": "Kenvil", - "state": "New Hampshire", - "country": "Macau", - "company": "Animalia", - "favoriteNumber": 3 - }, - { - "id": 166, - "name": "Ericka Morgan", - "city": "Leroy", - "state": "Massachusetts", - "country": "Kyrgyz Republic", - "company": "Opticall", - "favoriteNumber": 5 - }, - { - "id": 167, - "name": "Deborah Davenport", - "city": "Albany", - "state": "Utah", - "country": "Thailand", - "company": "Vetron", - "favoriteNumber": 10 - }, - { - "id": 168, - "name": "Tameka Mcneil", - "city": "Frierson", - "state": "Tennessee", - "country": "St. Lucia", - "company": "Martgo", - "favoriteNumber": 1 - }, - { - "id": 169, - "name": "Jewell Shields", - "city": "Bannock", - "state": "Pennsylvania", - "country": "Maldives", - "company": "Lotron", - "favoriteNumber": 8 - }, - { - "id": 170, - "name": "Crawford Fox", - "city": "Nicholson", - "state": "Louisiana", - "country": "Rwanda", - "company": "Progenex", - "favoriteNumber": 8 - }, - { - "id": 171, - "name": "Vaughan Tanner", - "city": "Cuylerville", - "state": "Idaho", - "country": "Jamaica", - "company": "Zeam", - "favoriteNumber": 3 - }, - { - "id": 172, - "name": "Shauna Wagner", - "city": "Disautel", - "state": "Michigan", - "country": "China", - "company": "Isologia", - "favoriteNumber": 6 - }, - { - "id": 173, - "name": "Meagan Hines", - "city": "Whitmer", - "state": "Colorado", - "country": "Jordan", - "company": "Grainspot", - "favoriteNumber": 8 - }, - { - "id": 174, - "name": "Palmer Bender", - "city": "Beechmont", - "state": "Texas", - "country": "Japan", - "company": "Vurbo", - "favoriteNumber": 10 - }, - { - "id": 175, - "name": "Amanda Buck", - "city": "Elfrida", - "state": "Nebraska", - "country": "Latvia", - "company": "Frosnex", - "favoriteNumber": 5 - }, - { - "id": 176, - "name": "Kristin Cleveland", - "city": "Richville", - "state": "West Virginia", - "country": "Lithuania", - "company": "Honotron", - "favoriteNumber": 2 - }, - { - "id": 177, - "name": "Harrell Vaughan", - "city": "Munjor", - "state": "Oregon", - "country": "Anguilla", - "company": "Orbalix", - "favoriteNumber": 9 - }, - { - "id": 178, - "name": "Stanley Webb", - "city": "Harleigh", - "state": "Oklahoma", - "country": "Mali", - "company": "Motovate", - "favoriteNumber": 6 - }, - { - "id": 179, - "name": "Briana Mitchell", - "city": "Kansas", - "state": "Ohio", - "country": "Libya", - "company": "Zillatide", - "favoriteNumber": 10 - }, - { - "id": 180, - "name": "Lillian Osborne", - "city": "Eastmont", - "state": "Virginia", - "country": "Belize", - "company": "Circum", - "favoriteNumber": 6 - }, - { - "id": 181, - "name": "Hughes Morse", - "city": "Herlong", - "state": "Mississippi", - "country": "French West Indies", - "company": "Endipine", - "favoriteNumber": 0 - }, - { - "id": 182, - "name": "Elise Whitehead", - "city": "Hailesboro", - "state": "South Dakota", - "country": "Saudi Arabia", - "company": "Geekmosis", - "favoriteNumber": 10 - }, - { - "id": 183, - "name": "Alyce Chavez", - "city": "Bendon", - "state": "Iowa", - "country": "Portugal", - "company": "Dognost", - "favoriteNumber": 8 - }, - { - "id": 184, - "name": "Goff Walker", - "city": "Sultana", - "state": "Washington", - "country": "Germany", - "company": "Uncorp", - "favoriteNumber": 4 - }, - { - "id": 185, - "name": "Brennan Melton", - "city": "Baker", - "state": "Florida", - "country": "Austria", - "company": "Thredz", - "favoriteNumber": 0 - }, - { - "id": 186, - "name": "Toni Brennan", - "city": "Newry", - "state": "California", - "country": "Serbia", - "company": "Bitendrex", - "favoriteNumber": 0 - }, - { - "id": 187, - "name": "Mcmillan Lane", - "city": "Thornport", - "state": "New York", - "country": "Panama", - "company": "Kengen", - "favoriteNumber": 2 - }, - { - "id": 188, - "name": "Yang Trujillo", - "city": "Falmouth", - "state": "Minnesota", - "country": "Paraguay", - "company": "Vitricomp", - "favoriteNumber": 7 - }, - { - "id": 189, - "name": "Osborn Love", - "city": "Rehrersburg", - "state": "Georgia", - "country": "Peru", - "company": "Newcube", - "favoriteNumber": 7 - }, - { - "id": 190, - "name": "Randolph Giles", - "city": "Sandston", - "state": "Connecticut", - "country": "Niger", - "company": "Manglo", - "favoriteNumber": 6 - }, - { - "id": 191, - "name": "Alison Eaton", - "city": "Wauhillau", - "state": "South Carolina", - "country": "St Kitts & Nevis", - "company": "Buzzmaker", - "favoriteNumber": 7 - }, - { - "id": 192, - "name": "Frankie Pollard", - "city": "Salix", - "state": "Missouri", - "country": "Uganda", - "company": "Jasper", - "favoriteNumber": 3 - }, - { - "id": 193, - "name": "Shields Cole", - "city": "Olney", - "state": "Maine", - "country": "British Virgin Islands", - "company": "Anivet", - "favoriteNumber": 3 - }, - { - "id": 194, - "name": "Frieda Wilkins", - "city": "Darrtown", - "state": "Wisconsin", - "country": "Gibraltar", - "company": "Elemantra", - "favoriteNumber": 6 - }, - { - "id": 195, - "name": "Parker Meyer", - "city": "Deseret", - "state": "Alabama", - "country": "Bermuda", - "company": "Cablam", - "favoriteNumber": 6 - }, - { - "id": 196, - "name": "Sharpe Blankenship", - "city": "Sparkill", - "state": "Hawaii", - "country": "Jersey", - "company": "Affluex", - "favoriteNumber": 0 - }, - { - "id": 197, - "name": "Fletcher Pope", - "city": "Libertytown", - "state": "New Jersey", - "country": "Bahrain", - "company": "Veraq", - "favoriteNumber": 6 - }, - { - "id": 198, - "name": "Brittany Holland", - "city": "Stonybrook", - "state": "Arizona", - "country": "Cook Islands", - "company": "Menbrain", - "favoriteNumber": 6 - }, - { - "id": 199, - "name": "Tammi Good", - "city": "Gwynn", - "state": "Illinois", - "country": "Denmark", - "company": "Kangle", - "favoriteNumber": 5 - }, - { - "id": 200, - "name": "Durham Valentine", - "city": "Dodge", - "state": "Wyoming", - "country": "Bolivia", - "company": "Amtas", - "favoriteNumber": 9 - }, - { - "id": 201, - "name": "Gina Savage", - "city": "Camptown", - "state": "Delaware", - "country": "San Marino", - "company": "Golistic", - "favoriteNumber": 8 - }, - { - "id": 202, - "name": "Faith Crane", - "city": "Kingstowne", - "state": "Kentucky", - "country": "Guyana", - "company": "Providco", - "favoriteNumber": 1 - }, - { - "id": 203, - "name": "Mullins Hewitt", - "city": "Courtland", - "state": "New Mexico", - "country": "Colombia", - "company": "Paprikut", - "favoriteNumber": 0 - }, - { - "id": 204, - "name": "Kemp Barber", - "city": "Morriston", - "state": "Montana", - "country": "United Kingdom", - "company": "Geekfarm", - "favoriteNumber": 3 - }, - { - "id": 205, - "name": "Sheppard Shaw", - "city": "Vandiver", - "state": "Rhode Island", - "country": "Madagascar", - "company": "Fossiel", - "favoriteNumber": 9 - }, - { - "id": 206, - "name": "Keith Bradshaw", - "city": "Mulberry", - "state": "North Carolina", - "country": "Ukraine", - "company": "Comtent", - "favoriteNumber": 9 - }, - { - "id": 207, - "name": "Dianne Conley", - "city": "Tonopah", - "state": "Maryland", - "country": "New Zealand", - "company": "Joviold", - "favoriteNumber": 5 - }, - { - "id": 208, - "name": "Love Griffin", - "city": "Day", - "state": "Indiana", - "country": "Ecuador", - "company": "Vortexaco", - "favoriteNumber": 6 - }, - { - "id": 209, - "name": "Melody Delacruz", - "city": "Hanover", - "state": "Vermont", - "country": "Virgin Islands (US)", - "company": "Pyramia", - "favoriteNumber": 6 - }, - { - "id": 210, - "name": "Patsy Kramer", - "city": "Southmont", - "state": "Kansas", - "country": "Sri Lanka", - "company": "Bedder", - "favoriteNumber": 8 - }, - { - "id": 211, - "name": "Becky Richard", - "city": "Crenshaw", - "state": "Alaska", - "country": "Croatia", - "company": "Polarium", - "favoriteNumber": 1 - }, - { - "id": 212, - "name": "Leon Rivera", - "city": "Gibbsville", - "state": "North Dakota", - "country": "Turks & Caicos", - "company": "Micronaut", - "favoriteNumber": 3 - }, - { - "id": 213, - "name": "Simpson Randall", - "city": "Cetronia", - "state": "Arkansas", - "country": "Cambodia", - "company": "Intergeek", - "favoriteNumber": 2 - }, - { - "id": 214, - "name": "Daugherty Duke", - "city": "Levant", - "state": "New Hampshire", - "country": "Namibia", - "company": "Nutralab", - "favoriteNumber": 3 - }, - { - "id": 215, - "name": "Payne Morton", - "city": "Jamestown", - "state": "Massachusetts", - "country": "Cape Verde", - "company": "Insource", - "favoriteNumber": 7 - }, - { - "id": 216, - "name": "Perkins Leblanc", - "city": "Boyd", - "state": "Utah", - "country": "Brunei", - "company": "Dognosis", - "favoriteNumber": 1 - }, - { - "id": 217, - "name": "Phillips Douglas", - "city": "Wikieup", - "state": "Tennessee", - "country": "Lebanon", - "company": "Ziore", - "favoriteNumber": 9 - }, - { - "id": 218, - "name": "Graves Stark", - "city": "Barrelville", - "state": "Pennsylvania", - "country": "Timor L'Este", - "company": "Exovent", - "favoriteNumber": 8 - }, - { - "id": 219, - "name": "Munoz Johns", - "city": "Wyano", - "state": "Louisiana", - "country": "Samoa", - "company": "Escenta", - "favoriteNumber": 10 - }, - { - "id": 220, - "name": "Myra Salazar", - "city": "Gorst", - "state": "Idaho", - "country": "Greece", - "company": "Acrodance", - "favoriteNumber": 10 - }, - { - "id": 221, - "name": "Flynn Miranda", - "city": "Movico", - "state": "Michigan", - "country": "Greenland", - "company": "Artiq", - "favoriteNumber": 6 - }, - { - "id": 222, - "name": "Eloise Barr", - "city": "Greer", - "state": "Colorado", - "country": "Sierra Leone", - "company": "Insuresys", - "favoriteNumber": 5 - }, - { - "id": 223, - "name": "Harrington Daniels", - "city": "Dawn", - "state": "Texas", - "country": "Tonga", - "company": "Pharmex", - "favoriteNumber": 3 - }, - { - "id": 224, - "name": "Lester Carey", - "city": "Keller", - "state": "Nebraska", - "country": "Nepal", - "company": "Melbacor", - "favoriteNumber": 4 - }, - { - "id": 225, - "name": "Malinda Pittman", - "city": "Wyoming", - "state": "West Virginia", - "country": "Falkland Islands", - "company": "Rodeocean", - "favoriteNumber": 1 - }, - { - "id": 226, - "name": "Crane Smith", - "city": "Hoagland", - "state": "Oregon", - "country": "Syria", - "company": "Eclipsent", - "favoriteNumber": 8 - }, - { - "id": 227, - "name": "Ellison Underwood", - "city": "Neahkahnie", - "state": "Oklahoma", - "country": "Suriname", - "company": "Visualix", - "favoriteNumber": 4 - }, - { - "id": 228, - "name": "Shelby Hardy", - "city": "Bascom", - "state": "Ohio", - "country": "Malta", - "company": "Genekom", - "favoriteNumber": 8 - }, - { - "id": 229, - "name": "Sheena Maynard", - "city": "Morningside", - "state": "Virginia", - "country": "Dominican Republic", - "company": "Zillar", - "favoriteNumber": 10 - }, - { - "id": 230, - "name": "Tamera Roman", - "city": "Freelandville", - "state": "Mississippi", - "country": "Honduras", - "company": "Comtract", - "favoriteNumber": 6 - }, - { - "id": 231, - "name": "Juliette Hammond", - "city": "Lindcove", - "state": "South Dakota", - "country": "Yemen", - "company": "Coriander", - "favoriteNumber": 5 - }, - { - "id": 232, - "name": "Dean Holden", - "city": "Brantleyville", - "state": "Iowa", - "country": "Aruba", - "company": "Plexia", - "favoriteNumber": 5 - }, - { - "id": 233, - "name": "Whitfield Meadows", - "city": "Fedora", - "state": "Washington", - "country": "Egypt", - "company": "Isosure", - "favoriteNumber": 1 - }, - { - "id": 234, - "name": "Wiley Kelley", - "city": "Torboy", - "state": "Florida", - "country": "Malawi", - "company": "Zilladyne", - "favoriteNumber": 5 - }, - { - "id": 235, - "name": "Sherry Scott", - "city": "Garfield", - "state": "California", - "country": "Slovenia", - "company": "Otherway", - "favoriteNumber": 5 - }, - { - "id": 236, - "name": "Aline Sosa", - "city": "Martinez", - "state": "New York", - "country": "Australia", - "company": "Comstruct", - "favoriteNumber": 4 - }, - { - "id": 237, - "name": "Leta Rice", - "city": "Utting", - "state": "Minnesota", - "country": "Iraq", - "company": "Jumpstack", - "favoriteNumber": 8 - }, - { - "id": 238, - "name": "Ford Ingram", - "city": "Lafferty", - "state": "Georgia", - "country": "Hungary", - "company": "Sarasonic", - "favoriteNumber": 3 - }, - { - "id": 239, - "name": "Chan David", - "city": "Collins", - "state": "Connecticut", - "country": "Mongolia", - "company": "Velos", - "favoriteNumber": 6 - }, - { - "id": 240, - "name": "Jeanne Murray", - "city": "Carlos", - "state": "South Carolina", - "country": "Ethiopia", - "company": "Equitox", - "favoriteNumber": 6 - }, - { - "id": 241, - "name": "Fernandez Dean", - "city": "Wintersburg", - "state": "Missouri", - "country": "Bangladesh", - "company": "Orboid", - "favoriteNumber": 5 - }, - { - "id": 242, - "name": "Jordan Cox", - "city": "Orin", - "state": "Maine", - "country": "Sudan", - "company": "Roboid", - "favoriteNumber": 6 - }, - { - "id": 243, - "name": "Catherine Harper", - "city": "Bedias", - "state": "Wisconsin", - "country": "Zambia", - "company": "Photobin", - "favoriteNumber": 2 - }, - { - "id": 244, - "name": "Suarez Kelly", - "city": "Cressey", - "state": "Alabama", - "country": "Cameroon", - "company": "Xurban", - "favoriteNumber": 7 - }, - { - "id": 245, - "name": "Henderson Mcdonald", - "city": "Adamstown", - "state": "Hawaii", - "country": "Mexico", - "company": "Skinserve", - "favoriteNumber": 1 - }, - { - "id": 246, - "name": "Hardy Gibbs", - "city": "Chical", - "state": "New Jersey", - "country": "Zimbabwe", - "company": "Limage", - "favoriteNumber": 6 - }, - { - "id": 247, - "name": "Kimberley Yang", - "city": "Kenmar", - "state": "Arizona", - "country": "Tunisia", - "company": "Exotechno", - "favoriteNumber": 9 - }, - { - "id": 248, - "name": "Kristie Gilmore", - "city": "Fairview", - "state": "Illinois", - "country": "Italy", - "company": "Equicom", - "favoriteNumber": 4 - }, - { - "id": 249, - "name": "Jewel Hansen", - "city": "Worton", - "state": "Wyoming", - "country": "South Korea", - "company": "Sulfax", - "favoriteNumber": 6 - }, - { - "id": 250, - "name": "Cheryl Carter", - "city": "Caron", - "state": "Delaware", - "country": "Mauritius", - "company": "Netropic", - "favoriteNumber": 9 - }, - { - "id": 251, - "name": "Keisha Snider", - "city": "Waterloo", - "state": "Kentucky", - "country": "Romania", - "company": "Besto", - "favoriteNumber": 6 - }, - { - "id": 252, - "name": "Minnie Michael", - "city": "Cascades", - "state": "New Mexico", - "country": "South Africa", - "company": "Kidgrease", - "favoriteNumber": 10 - }, - { - "id": 253, - "name": "Sandy Mccullough", - "city": "Remington", - "state": "Montana", - "country": "Malaysia", - "company": "Zosis", - "favoriteNumber": 3 - }, - { - "id": 254, - "name": "Cervantes Maddox", - "city": "Sisquoc", - "state": "Rhode Island", - "country": "Oman", - "company": "Extremo", - "favoriteNumber": 6 - }, - { - "id": 255, - "name": "Sophia Logan", - "city": "Winfred", - "state": "North Carolina", - "country": "Ireland", - "company": "Enaut", - "favoriteNumber": 4 - }, - { - "id": 256, - "name": "Bertha Watson", - "city": "Caroleen", - "state": "Maryland", - "country": "France", - "company": "Musix", - "favoriteNumber": 9 - }, - { - "id": 257, - "name": "Emily Wilson", - "city": "Fairacres", - "state": "Indiana", - "country": "Iceland", - "company": "Comvene", - "favoriteNumber": 8 - }, - { - "id": 258, - "name": "Winters Petersen", - "city": "Wildwood", - "state": "Vermont", - "country": "Equatorial Guinea", - "company": "Webiotic", - "favoriteNumber": 0 - }, - { - "id": 259, - "name": "Chambers Finch", - "city": "Topaz", - "state": "Kansas", - "country": "Luxembourg", - "company": "Sultraxin", - "favoriteNumber": 5 - }, - { - "id": 260, - "name": "Byrd Mills", - "city": "Cloverdale", - "state": "Alaska", - "country": "Cruise Ship", - "company": "Accel", - "favoriteNumber": 2 - }, - { - "id": 261, - "name": "Gross Jacobs", - "city": "Duryea", - "state": "North Dakota", - "country": "Belarus", - "company": "Insuron", - "favoriteNumber": 5 - }, - { - "id": 262, - "name": "Jackson Sherman", - "city": "Waterview", - "state": "Arkansas", - "country": "Antigua & Barbuda", - "company": "Viagreat", - "favoriteNumber": 2 - }, - { - "id": 263, - "name": "Rhodes Boyer", - "city": "Enlow", - "state": "New Hampshire", - "country": "Chad", - "company": "Conferia", - "favoriteNumber": 4 - }, - { - "id": 264, - "name": "Campbell Rodgers", - "city": "Cumminsville", - "state": "Massachusetts", - "country": "Reunion", - "company": "Frolix", - "favoriteNumber": 10 - }, - { - "id": 265, - "name": "Bryant Sawyer", - "city": "Guilford", - "state": "Utah", - "country": "Gabon", - "company": "Rooforia", - "favoriteNumber": 10 - }, - { - "id": 266, - "name": "Joan Browning", - "city": "Elizaville", - "state": "Tennessee", - "country": "Fiji", - "company": "Kneedles", - "favoriteNumber": 6 - }, - { - "id": 267, - "name": "Jennie Mcintyre", - "city": "Draper", - "state": "Pennsylvania", - "country": "New Caledonia", - "company": "Isostream", - "favoriteNumber": 4 - }, - { - "id": 268, - "name": "Merle Jones", - "city": "Caspar", - "state": "Louisiana", - "country": "Haiti", - "company": "Tubesys", - "favoriteNumber": 4 - }, - { - "id": 269, - "name": "Ortega Burgess", - "city": "Thermal", - "state": "Idaho", - "country": "Mozambique", - "company": "Lovepad", - "favoriteNumber": 9 - }, - { - "id": 270, - "name": "Deanna Grimes", - "city": "Flintville", - "state": "Michigan", - "country": "Pakistan", - "company": "Omatom", - "favoriteNumber": 10 - }, - { - "id": 271, - "name": "Jeanie Ochoa", - "city": "Ruckersville", - "state": "Colorado", - "country": "Cayman Islands", - "company": "Momentia", - "favoriteNumber": 8 - }, - { - "id": 272, - "name": "Morrow Valencia", - "city": "Roberts", - "state": "Texas", - "country": "Guam", - "company": "Permadyne", - "favoriteNumber": 4 - }, - { - "id": 273, - "name": "Hull Wade", - "city": "Monument", - "state": "Nebraska", - "country": "Cyprus", - "company": "Indexia", - "favoriteNumber": 10 - }, - { - "id": 274, - "name": "Blanca Sheppard", - "city": "Wadsworth", - "state": "West Virginia", - "country": "Nicaragua", - "company": "Gogol", - "favoriteNumber": 7 - }, - { - "id": 275, - "name": "Stella Luna", - "city": "Dubois", - "state": "Oregon", - "country": "Czech Republic", - "company": "Intrawear", - "favoriteNumber": 1 - } -]; diff --git a/samples/react/ReactGrid/ReactGrid.xproj b/samples/react/ReactGrid/ReactGrid.xproj deleted file mode 100644 index 0d002a64..00000000 --- a/samples/react/ReactGrid/ReactGrid.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - true - - - - abf90a5b-f4e0-438c-a6e4-9549fb43690b - ReactGrid - ..\..\..\artifacts\obj\$(MSBuildProjectName) - .\bin\ - - - 2.0 - 2311 - - - \ No newline at end of file diff --git a/samples/react/ReactGrid/Startup.cs b/samples/react/ReactGrid/Startup.cs deleted file mode 100755 index 147659b7..00000000 --- a/samples/react/ReactGrid/Startup.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.SpaServices.Webpack; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using Newtonsoft.Json.Serialization; - -namespace ReactGrid -{ - public class Startup - { - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddMvc().AddJsonOptions(options => - { - options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); - }); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHostingEnvironment env) - { - app.UseDeveloperExceptionPage(); - - if (env.IsDevelopment()) { - app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { - HotModuleReplacement = true, - ReactHotModuleReplacement = true - }); - } - - app.UseStaticFiles(); - loggerFactory.AddConsole(); - app.UseMvc(routes => - { - routes.MapRoute( - name: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - - routes.MapSpaFallbackRoute( - name: "spa-fallback", - defaults: new { controller = "Home", action = "Index" }); - }); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/samples/react/ReactGrid/Views/Home/Index.cshtml b/samples/react/ReactGrid/Views/Home/Index.cshtml deleted file mode 100755 index 59b13d5a..00000000 --- a/samples/react/ReactGrid/Views/Home/Index.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -
    - -@section scripts { - -} diff --git a/samples/react/ReactGrid/Views/Shared/Error.cshtml b/samples/react/ReactGrid/Views/Shared/Error.cshtml deleted file mode 100755 index 473b35d6..00000000 --- a/samples/react/ReactGrid/Views/Shared/Error.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Error"; -} - -

    Error.

    -

    An error occurred while processing your request.

    diff --git a/samples/react/ReactGrid/Views/Shared/_Layout.cshtml b/samples/react/ReactGrid/Views/Shared/_Layout.cshtml deleted file mode 100755 index 7ea62731..00000000 --- a/samples/react/ReactGrid/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - ReactExample - - - -
    - @RenderBody() -
    - @RenderSection("scripts", required: false) - - diff --git a/samples/react/ReactGrid/Views/_ViewImports.cshtml b/samples/react/ReactGrid/Views/_ViewImports.cshtml deleted file mode 100755 index 30438849..00000000 --- a/samples/react/ReactGrid/Views/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using ReactExample -@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" -@addTagHelper "*, Microsoft.AspNetCore.SpaServices" diff --git a/samples/react/ReactGrid/Views/_ViewStart.cshtml b/samples/react/ReactGrid/Views/_ViewStart.cshtml deleted file mode 100755 index 820a2f6e..00000000 --- a/samples/react/ReactGrid/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/samples/react/ReactGrid/appsettings.json b/samples/react/ReactGrid/appsettings.json deleted file mode 100755 index 0967ef42..00000000 --- a/samples/react/ReactGrid/appsettings.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/samples/react/ReactGrid/jsconfig.json b/samples/react/ReactGrid/jsconfig.json deleted file mode 100644 index 875bb90c..00000000 --- a/samples/react/ReactGrid/jsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "target": "ES6", - "module": "commonjs" - } -} diff --git a/samples/react/ReactGrid/package.json b/samples/react/ReactGrid/package.json deleted file mode 100644 index 9329a550..00000000 --- a/samples/react/ReactGrid/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "ReactExample", - "version": "0.0.0", - "dependencies": { - "babel-core": "^6.13.2", - "bootstrap": "^3.3.7", - "domain-task": "^2.0.1", - "formsy-react": "^0.18.1", - "formsy-react-components": "^0.8.1", - "griddle-react": "^0.6.1", - "history": "^3.0.0", - "memory-fs": "^0.3.0", - "react": "^15.3.0", - "react-dom": "^15.3.0", - "react-router": "^2.6.1", - "require-from-string": "^1.2.0", - "underscore": "^1.8.3", - "webpack-externals-plugin": "^1.0.0" - }, - "devDependencies": { - "aspnet-prerendering": "^1.0.4", - "aspnet-webpack": "^1.0.9", - "aspnet-webpack-react": "^1.0.1", - "babel-loader": "^6.2.4", - "babel-plugin-react-transform": "^2.0.2", - "babel-preset-es2015": "^6.13.2", - "babel-preset-react": "^6.11.1", - "css-loader": "^0.23.1", - "express": "^4.14.0", - "extract-text-webpack-plugin": "^1.0.1", - "file-loader": "^0.9.0", - "react-transform-hmr": "^1.0.4", - "style-loader": "^0.13.1", - "url-loader": "^0.5.7", - "webpack": "^1.13.1", - "webpack-dev-middleware": "^1.6.1", - "webpack-hot-middleware": "^2.12.2" - } -} diff --git a/samples/react/ReactGrid/project.json b/samples/react/ReactGrid/project.json deleted file mode 100755 index dc5e79e6..00000000 --- a/samples/react/ReactGrid/project.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": "1.0.0-*", - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "runtimeOptions": { - "gcServer": true - }, - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0", - "type": "platform" - }, - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Mvc": "1.0.0", - "Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.Extensions.Configuration.Json": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0", - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.Extensions.Logging.Debug": "1.0.0", - "Microsoft.AspNetCore.ReactServices": "1.0.0-*" - }, - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "dnxcore50", - "portable-net45+win8" - ] - } - }, - "publishOptions": { - "exclude": [ - "node_modules", - "bower_components", - "**.xproj", - "**.user", - "**.vspscc" - ] - }, - "scripts": { - "prepublish": [ "npm install" ], - "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] - } -} diff --git a/samples/react/ReactGrid/webpack.config.js b/samples/react/ReactGrid/webpack.config.js deleted file mode 100644 index b1151f12..00000000 --- a/samples/react/ReactGrid/webpack.config.js +++ /dev/null @@ -1,28 +0,0 @@ -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); - -module.exports = { - devtool: 'eval-source-map', - resolve: { - extensions: [ '', '.js', '.jsx' ] - }, - module: { - loaders: [ - { test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/ }, - { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') }, - { test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' } - ] - }, - entry: { - main: ['./ReactApp/boot-client.jsx'] - }, - output: { - path: path.join(__dirname, '/wwwroot/dist'), - filename: '[name].js', - publicPath: '/dist/' // Tells webpack-dev-middleware where to serve the dynamically compiled content from - }, - plugins: [ - new ExtractTextPlugin('main.css') - ] -}; diff --git a/samples/react/ReactGrid/wwwroot/favicon.ico b/samples/react/ReactGrid/wwwroot/favicon.ico deleted file mode 100755 index a3a79998..00000000 Binary files a/samples/react/ReactGrid/wwwroot/favicon.ico and /dev/null differ diff --git a/samples/react/ReactGrid/wwwroot/web.config b/samples/react/ReactGrid/wwwroot/web.config deleted file mode 100644 index e70a7778..00000000 --- a/samples/react/ReactGrid/wwwroot/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/scripts/Regenerate-JSFiles.ps1 b/scripts/Regenerate-JSFiles.ps1 new file mode 100644 index 00000000..ef3336c8 --- /dev/null +++ b/scripts/Regenerate-JSFiles.ps1 @@ -0,0 +1,28 @@ +[cmdletbinding(SupportsShouldProcess = $true)] +param( +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2 + +Push-Location "src" +try { + $dirs = Get-ChildItem -Directory + foreach($dir in $dirs) + { + Push-Location $dir + try{ + if(Test-Path -Path "package.json") + { + npm install + npm run build + } + } + finally{ + Pop-Location + } + } +} +finally { + Pop-Location +} diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..272b8171 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,13 @@ + + + + + true + true + aspnetcore;aspnetcoremvc;nodeservices + + + + + + diff --git a/src/Microsoft.AspNetCore.AngularServices/.gitignore b/src/Microsoft.AspNetCore.AngularServices/.gitignore deleted file mode 100644 index ae3c1726..00000000 --- a/src/Microsoft.AspNetCore.AngularServices/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/src/Microsoft.AspNetCore.AngularServices/Microsoft.AspNetCore.AngularServices.xproj b/src/Microsoft.AspNetCore.AngularServices/Microsoft.AspNetCore.AngularServices.xproj deleted file mode 100644 index 701af9a5..00000000 --- a/src/Microsoft.AspNetCore.AngularServices/Microsoft.AspNetCore.AngularServices.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 421807e6-b62c-417b-b901-46c5dedaa8f1 - Microsoft.AspNetCore.AngularServices - ..\artifacts\obj\$(MSBuildProjectName) - .\bin\ - - - 2.0 - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.AngularServices/PrimeCacheHelper.cs b/src/Microsoft.AspNetCore.AngularServices/PrimeCacheHelper.cs deleted file mode 100644 index 388ab069..00000000 --- a/src/Microsoft.AspNetCore.AngularServices/PrimeCacheHelper.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Net; -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Rendering; -using Microsoft.AspNetCore.Html; -using Microsoft.Extensions.Logging; -using Newtonsoft.Json; - -namespace Microsoft.AspNetCore.AngularServices -{ - public static class PrimeCacheHelper - { - [Obsolete("Use PrimeCacheAsync instead")] - public static Task PrimeCache(this IHtmlHelper html, string url) - { - return PrimeCacheAsync(html, url); - } - - public static async Task PrimeCacheAsync(this IHtmlHelper html, string url) - { - // TODO: Consider deduplicating the PrimeCacheAsync calls (that is, if there are multiple requests to precache - // the same URL, only return nonempty for one of them). This will make it easier to auto-prime-cache any - // HTTP requests made during server-side rendering, without risking unnecessary duplicate requests. - - if (string.IsNullOrEmpty(url)) - { - throw new ArgumentException("Value cannot be null or empty", nameof(url)); - } - - try - { - var request = html.ViewContext.HttpContext.Request; - var baseUriString = string.Concat( - request.Scheme, - "://", - request.Host.ToUriComponent(), - request.PathBase.ToUriComponent(), - request.Path.ToUriComponent(), - request.QueryString.ToUriComponent()); - var fullUri = new Uri(new Uri(baseUriString), url); - var response = await new HttpClient().GetAsync(fullUri.ToString()); - var responseBody = await response.Content.ReadAsStringAsync(); - return new HtmlString(FormatAsScript(url, response.StatusCode, responseBody)); - } - catch (Exception ex) - { - var logger = (ILogger)html.ViewContext.HttpContext.RequestServices.GetService(typeof(ILogger)); - logger?.LogWarning("Error priming cache for URL: " + url, ex); - return new HtmlString(string.Empty); - } - } - - private static string FormatAsScript(string url, HttpStatusCode responseStatusCode, string responseBody) - { - var preCachedUrl = JsonConvert.SerializeObject(url); - var preCachedJson = JsonConvert.SerializeObject(new { statusCode = responseStatusCode, body = responseBody }); - return ""; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.AngularServices/npm/.gitignore b/src/Microsoft.AspNetCore.AngularServices/npm/.gitignore deleted file mode 100644 index 6cb02b18..00000000 --- a/src/Microsoft.AspNetCore.AngularServices/npm/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/node_modules/ -/dist/ -/bundles/ diff --git a/src/Microsoft.AspNetCore.AngularServices/npm/.npmignore b/src/Microsoft.AspNetCore.AngularServices/npm/.npmignore deleted file mode 100644 index 173998af..00000000 --- a/src/Microsoft.AspNetCore.AngularServices/npm/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/src/ -/tsconfig.json -/build.js -/typings/ diff --git a/src/Microsoft.AspNetCore.AngularServices/npm/build.js b/src/Microsoft.AspNetCore.AngularServices/npm/build.js deleted file mode 100644 index 876e1529..00000000 --- a/src/Microsoft.AspNetCore.AngularServices/npm/build.js +++ /dev/null @@ -1,33 +0,0 @@ -// ------------- -// No need to invoke this directly. To run a build, execute: -// npm run prepublish -// ------------- - -var Builder = require('systemjs-builder'); -var builder = new Builder('./'); -builder.config({ - defaultJSExtensions: true, - paths: { - 'angular2-aspnet': 'dist/Exports', - 'angular2-aspnet/*': 'dist/*' - }, - meta: { - 'angular2/*': { build: false }, - 'rxjs/*': { build: false } - } -}); - -var entryPoint = 'dist/Exports'; -var tasks = [ - builder.bundle(entryPoint, './bundles/angular2-aspnet.js'), - builder.bundle(entryPoint, './bundles/angular2-aspnet.min.js', { minify: true }) -]; - -Promise.all(tasks) - .then(function() { - console.log('Build complete'); - }) - .catch(function(err) { - console.error('Build error'); - console.error(err); - }); diff --git a/src/Microsoft.AspNetCore.AngularServices/npm/package.json b/src/Microsoft.AspNetCore.AngularServices/npm/package.json deleted file mode 100644 index 67b27641..00000000 --- a/src/Microsoft.AspNetCore.AngularServices/npm/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "angular2-aspnet", - "version": "0.0.6", - "description": "Helpers for Angular 2 apps built on ASP.NET", - "main": "./dist/Exports", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "prepublish": "rimraf *.d.ts dist/*.d.ts && tsc && node build.js" - }, - "typings": "dist/Exports", - "author": "Microsoft", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/aspnet/JavaScriptServices/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/aspnet/JavaScriptServices.git" - }, - "dependencies": { - "angular2": "2.0.0-beta.13", - "reflect-metadata": "0.1.2", - "rxjs": "5.0.0-beta.2" - }, - "devDependencies": { - "es6-shim": "^0.35.0", - "rimraf": "^2.5.4", - "systemjs-builder": "^0.14.11", - "typescript": "^2.0.0", - "zone.js": "^0.6.10" - } -} diff --git a/src/Microsoft.AspNetCore.AngularServices/npm/readme.md b/src/Microsoft.AspNetCore.AngularServices/npm/readme.md deleted file mode 100644 index cb0461f0..00000000 --- a/src/Microsoft.AspNetCore.AngularServices/npm/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -If you just want to use this package, then you *don't have to build it*. Instead, just grab the prebuilt package from NPM: - - npm install angular2-aspnet - -The rest of this file is notes for anyone contributing to this package itself. - -## How to build - -Run the following: - - npm install - npm run prepublish - -Requirements: - - * Node, NPM - * `tsc` installed globally (via `npm install -g typescript`) - -## Project structure - -This package is intended to be consumable both on the server in Node.js, and on the client. Also, it's written in TypeScript, -which neither of those environments knows natively, but the TypeScript type definitions need to get delivered with the package -so that developers get a good IDE experience when consuming it. - -The build process is therefore: - -1. Compile the TypeScript to produce the development-time (.d.ts) and server-side (.js) artifacts - - `tsc` reads `tsconfig.json` and is instructed to compile all the `.ts` files in `src/`. It produces a corresponding - structure of `.js` and `.d.ts` files in `dist/`. - - When a developer consumes the resulting package (via `npm install angular2-aspnet`), - - - No additional copy of `angular2` will be installed, because this package's dependency on it is declared as a - `peerDependency`. This means it will work with whatever (compatible) version of `angular2` is already installed. - - At runtime inside Node.js, the `main` configuration in `package.json` means the developer can use a standard - `import` statement to consume this package (i.e., `import * from 'angular2-aspnet';` in either JS or TS files). - - At development time inside an IDE such as Visual Studio Code, the `typings` configuration in `package.json` means - the IDE will use the corresponding `.d.ts` file as type metadata for the variable imported that way. - -2. Use the SystemJS builder to produce the client-side artifacts - - `build.js` uses the SystemJS Builder API to combine files in `dist/` into `.js` files ready for use in client-side - SystemJS environments, and puts them in `bundles/`. The bundle files contain `System.register` calls so that any - other part of your client-side code that tries to import `angular2-aspnet` via SystemJS will get that module at runtime. - - To make it work in an application: - - Set up some build step that copies your chosen bundle file from `bundles/` to some location where it will - be served to the client - - Below your `"); - } + output.PostElement.SetHtmlContent($""); } } } diff --git a/src/Microsoft.AspNetCore.SpaServices/Prerendering/Prerenderer.cs b/src/Microsoft.AspNetCore.SpaServices/Prerendering/Prerenderer.cs index 9d8724e4..4e2fb16a 100644 --- a/src/Microsoft.AspNetCore.SpaServices/Prerendering/Prerenderer.cs +++ b/src/Microsoft.AspNetCore.SpaServices/Prerendering/Prerenderer.cs @@ -1,40 +1,103 @@ using System; +using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.NodeServices; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Features; namespace Microsoft.AspNetCore.SpaServices.Prerendering { + /// + /// Performs server-side prerendering by invoking code in Node.js. + /// public static class Prerenderer { - private static readonly Lazy NodeScript; + private static readonly object CreateNodeScriptLock = new object(); - static Prerenderer() + private static StringAsTempFile NodeScript; + + internal static Task RenderToString( + string applicationBasePath, + INodeServices nodeServices, + CancellationToken applicationStoppingToken, + JavaScriptModuleExport bootModule, + HttpContext httpContext, + object customDataParameter, + int timeoutMilliseconds) { - NodeScript = new Lazy(() => - { - var script = EmbeddedResourceReader.Read(typeof(Prerenderer), "/Content/Node/prerenderer.js"); - return new StringAsTempFile(script); // Will be cleaned up on process exit - }); + // We want to pass the original, unencoded incoming URL data through to Node, so that + // server-side code has the same view of the URL as client-side code (on the client, + // location.pathname returns an unencoded string). + // The following logic handles special characters in URL paths in the same way that + // Node and client-side JS does. For example, the path "/a=b%20c" gets passed through + // unchanged (whereas other .NET APIs do change it - Path.Value will return it as + // "/a=b c" and Path.ToString() will return it as "/a%3db%20c") + var requestFeature = httpContext.Features.Get(); + var unencodedPathAndQuery = requestFeature.RawTarget; + + var request = httpContext.Request; + var unencodedAbsoluteUrl = $"{request.Scheme}://{request.Host}{unencodedPathAndQuery}"; + + return RenderToString( + applicationBasePath, + nodeServices, + applicationStoppingToken, + bootModule, + unencodedAbsoluteUrl, + unencodedPathAndQuery, + customDataParameter, + timeoutMilliseconds, + request.PathBase.ToString()); } + /// + /// Performs server-side prerendering by invoking code in Node.js. + /// + /// The root path to your application. This is used when resolving project-relative paths. + /// The instance of that will be used to invoke JavaScript code. + /// A token that indicates when the host application is stopping. + /// The path to the JavaScript file containing the prerendering logic. + /// The URL of the currently-executing HTTP request. This is supplied to the prerendering code. + /// The path and query part of the URL of the currently-executing HTTP request. This is supplied to the prerendering code. + /// An optional JSON-serializable parameter to be supplied to the prerendering code. + /// The maximum duration to wait for prerendering to complete. + /// The PathBase for the currently-executing HTTP request. + /// public static Task RenderToString( string applicationBasePath, INodeServices nodeServices, + CancellationToken applicationStoppingToken, JavaScriptModuleExport bootModule, string requestAbsoluteUrl, string requestPathAndQuery, object customDataParameter, - int timeoutMilliseconds) + int timeoutMilliseconds, + string requestPathBase) { return nodeServices.InvokeExportAsync( - NodeScript.Value.FileName, + GetNodeScriptFilename(applicationStoppingToken), "renderToString", applicationBasePath, bootModule, requestAbsoluteUrl, requestPathAndQuery, customDataParameter, - timeoutMilliseconds); + timeoutMilliseconds, + requestPathBase); + } + + private static string GetNodeScriptFilename(CancellationToken applicationStoppingToken) + { + lock(CreateNodeScriptLock) + { + if (NodeScript == null) + { + var script = EmbeddedResourceReader.Read(typeof(Prerenderer), "/Content/Node/prerenderer.js"); + NodeScript = new StringAsTempFile(script, applicationStoppingToken); // Will be cleaned up on process exit + } + } + + return NodeScript.FileName; } } } \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.SpaServices/Prerendering/PrerenderingServiceCollectionExtensions.cs b/src/Microsoft.AspNetCore.SpaServices/Prerendering/PrerenderingServiceCollectionExtensions.cs new file mode 100644 index 00000000..d6a67439 --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/Prerendering/PrerenderingServiceCollectionExtensions.cs @@ -0,0 +1,21 @@ +using Microsoft.AspNetCore.SpaServices.Prerendering; + +namespace Microsoft.Extensions.DependencyInjection +{ + /// + /// Extension methods for setting up prerendering features in an . + /// + public static class PrerenderingServiceCollectionExtensions + { + /// + /// Configures the dependency injection system to supply an implementation + /// of . + /// + /// The . + public static void AddSpaPrerenderer(this IServiceCollection serviceCollection) + { + serviceCollection.AddHttpContextAccessor(); + serviceCollection.AddSingleton(); + } + } +} diff --git a/src/Microsoft.AspNetCore.SpaServices/Prerendering/RenderToStringResult.cs b/src/Microsoft.AspNetCore.SpaServices/Prerendering/RenderToStringResult.cs index cae8d631..1a2e1563 100644 --- a/src/Microsoft.AspNetCore.SpaServices/Prerendering/RenderToStringResult.cs +++ b/src/Microsoft.AspNetCore.SpaServices/Prerendering/RenderToStringResult.cs @@ -1,11 +1,60 @@ +using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using System.Text; namespace Microsoft.AspNetCore.SpaServices.Prerendering { + /// + /// Describes the prerendering result returned by JavaScript code. + /// public class RenderToStringResult { + /// + /// If set, specifies JSON-serializable data that should be added as a set of global JavaScript variables in the document. + /// This can be used to transfer arbitrary data from server-side prerendering code to client-side code (for example, to + /// transfer the state of a Redux store). + /// public JObject Globals { get; set; } + + /// + /// The HTML generated by the prerendering logic. + /// public string Html { get; set; } + + /// + /// If set, specifies that instead of rendering HTML, the response should be an HTTP redirection to this URL. + /// This can be used if the prerendering code determines that the requested URL would lead to a redirection according + /// to the SPA's routing configuration. + /// public string RedirectUrl { get; set; } + + /// + /// If set, specifies the HTTP status code that should be sent back with the server response. + /// + public int? StatusCode { get; set; } + + /// + /// Constructs a block of JavaScript code that assigns data from the + /// property to the global namespace. + /// + /// A block of JavaScript code. + public string CreateGlobalsAssignmentScript() + { + if (Globals == null) + { + return string.Empty; + } + + var stringBuilder = new StringBuilder(); + + foreach (var property in Globals.Properties()) + { + stringBuilder.AppendFormat("window.{0} = {1};", + property.Name, + property.Value.ToString(Formatting.None)); + } + + return stringBuilder.ToString(); + } } } \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.SpaServices/README.md b/src/Microsoft.AspNetCore.SpaServices/README.md index 4b790777..86a76cb5 100644 --- a/src/Microsoft.AspNetCore.SpaServices/README.md +++ b/src/Microsoft.AspNetCore.SpaServices/README.md @@ -1,15 +1,15 @@ # Microsoft.AspNetCore.SpaServices -If you're building an ASP.NET Core application, and want to use Angular 2, React, Knockout, or another single-page app (SPA) framework, this NuGet package contains useful infrastructure for you. +If you're building an ASP.NET Core application, and want to use Angular, React, Knockout, or another single-page app (SPA) framework, this NuGet package contains useful infrastructure for you. This package enables: - * [**Server-side prerendering**](#server-side-prerendering) for *universal* (a.k.a. *isomorphic*) applications, where your Angular 2 / React / etc. components are first rendered on the server, and then transferred to the client where execution continues + * [**Server-side prerendering**](#server-side-prerendering) for *universal* (a.k.a. *isomorphic*) applications, where your Angular / React / etc. components are first rendered on the server, and then transferred to the client where execution continues * [**Webpack middleware**](#webpack-dev-middleware) so that, during development, any webpack-built resources will be generated on demand, without you having to run webpack manually or compile files to disk * [**Hot module replacement**](#webpack-hot-module-replacement) so that, during development, your code and markup changes will be pushed to your browser and updated in the running application automatically, without even needing to reload the page * [**Routing helpers**](#routing-helper-mapspafallbackroute) for integrating server-side routing with client-side routing -Behind the scenes, it uses the [`Microsoft.AspNetCore.NodeServices`](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.NodeServices) package as a fast and robust way to invoke Node.js-hosted code from ASP.NET Core at runtime. +Behind the scenes, it uses the [`Microsoft.AspNetCore.NodeServices`](https://github.com/aspnet/JavaScriptServices/tree/master/src/Microsoft.AspNetCore.NodeServices) package as a fast and robust way to invoke Node.js-hosted code from ASP.NET Core at runtime. ### Requirements @@ -20,7 +20,7 @@ Behind the scenes, it uses the [`Microsoft.AspNetCore.NodeServices`](https://git ### Installation into existing projects - * Add `Microsoft.AspNetCore.SpaServices` to the dependencies list in your `project.json` file + * Install the `Microsoft.AspNetCore.SpaServices` NuGet package * Run `dotnet restore` (or if you use Visual Studio, just wait a moment - it will restore dependencies automatically) * Install supporting NPM packages for the features you'll be using: * For **server-side prerendering**, install `aspnet-prerendering` @@ -42,17 +42,20 @@ Also, if you want to debug projects created with the aspnetcore-spa generator, s ## Server-side prerendering -The `SpaServices` package isn't tied to any particular client-side framework, and it doesn't force you to set up your client-side application in any one particular style. So, `SpaServices` doesn't contain hard-coded logic for rendering Angular 2 / React / etc. components. +The `SpaServices` package isn't tied to any particular client-side framework, and it doesn't force you to set up your client-side application in any one particular style. So, `SpaServices` doesn't contain hard-coded logic for rendering Angular / React / etc. components. -Instead, what `SpaServices` offers is ASP.NET Core APIs that know how to invoke a JavaScript function that you supply, passing through context information that you'll need for server-side prerendering, and then injects the resulting HTML string into your rendered page. In this document, you'll find examples of setting this up to render Angular 2 and React components. +Instead, what `SpaServices` offers is ASP.NET Core APIs that know how to invoke a JavaScript function that you supply, passing through context information that you'll need for server-side prerendering, and then injects the resulting HTML string into your rendered page. In this document, you'll find examples of setting this up to render Angular and React components. ### 1. Enable the asp-prerender-* tag helpers -Make sure you've installed the `Microsoft.AspNetCore.SpaServices` NuGet package and the `aspnet-prerendering` NPM package. Together these contain the server-side and client-side library code you'll need. +Make sure you've installed into your project: -Now go to your `Views/_ViewImports.cshtml` file, and add the following line: + * The `Microsoft.AspNetCore.SpaServices` NuGet package, version 1.1.0-* or later + * The `aspnet-prerendering` NPM package, version 2.0.1 or later - @addTagHelper *, Microsoft.AspNetCore.SpaServices +Together these contain the server-side and client-side library code you'll need. Now go to your `Views/_ViewImports.cshtml` file, and add the following line: + + @addTagHelper "*, Microsoft.AspNetCore.SpaServices" ### 2. Use asp-prerender-* in a view @@ -67,7 +70,9 @@ If you run your application now, and browse to whatever page renders the view yo Create a JavaScript file at the path matching the `asp-prerender-module` value you specified above. In this example, that means creating a folder called `ClientApp` at the root of your project, and creating a file inside it called `boot-server.js`. Try putting the following into it: ```javascript -module.exports = function(params) { +var prerendering = require('aspnet-prerendering'); + +module.exports = prerendering.createServerRenderer(function(params) { return new Promise(function (resolve, reject) { var result = '

    Hello world!

    ' + '

    Current time in Node is: ' + new Date() + '

    ' @@ -76,12 +81,12 @@ module.exports = function(params) { resolve({ html: result }); }); -}; +}); ``` If you try running your app now, you should see the HTML snippet generated by your JavaScript getting injected into your page. -As you can see, your JavaScript code receives context information (such as the URL being requested), and returns a `Promise` so that it can asynchronously supply the markup to be injected into the page. You can put whatever logic you like here, but typically you'll want to execute a component from your Angular 2 / React / etc. application. +As you can see, your JavaScript code receives context information (such as the URL being requested), and returns a `Promise` so that it can asynchronously supply the markup to be injected into the page. You can put whatever logic you like here, but typically you'll want to execute a component from your Angular / React / etc. application. **Passing data from .NET code into JavaScript code** @@ -98,7 +103,9 @@ For example, in your `cshtml`, Now in your JavaScript prerendering function, you can access this data by reading `params.data`, e.g.: ```javascript -module.exports = function(params) { +var prerendering = require('aspnet-prerendering'); + +module.exports = prerendering.createServerRenderer(function(params) { return new Promise(function (resolve, reject) { var result = '

    Hello world!

    ' + '

    Is gold user: ' + params.data.isGoldUser + '

    ' @@ -106,7 +113,7 @@ module.exports = function(params) { resolve({ html: result }); }); -}; +}); ``` Notice that the property names are received in JavaScript-style casing (e.g., `isGoldUser`) even though they were sent in C#-style casing (e.g., `IsGoldUser`). This is because of how the JSON serialization is configured by default. @@ -182,7 +189,9 @@ If you don't already have a `tsconfig.json` file at the root of your project, ad Now you can delete `ClientApp/boot-server.js`, and in its place, create `ClientApp/boot-server.ts`, containing the TypeScript equivalent of what you had before: ```javascript -export default function (params: any): Promise<{ html: string}> { +import { createServerRenderer } from 'aspnet-prerendering'; + +export default createServerRenderer(params => { return new Promise((resolve, reject) => { const html = `

    Hello world!

    @@ -192,7 +201,7 @@ export default function (params: any): Promise<{ html: string}> { resolve({ html }); }); -} +}); ``` Finally, run `webpack` on the command line to build `ClientApp/dist/main-server.js`. Then you can tell `SpaServices` to use that file for server-side prerendering. In your MVC view where you use `aspnet-prerender-module`, update the attribute value: @@ -202,21 +211,21 @@ Finally, run `webpack` on the command line to build `ClientApp/dist/main-server. Webpack is a broad and powerful tool and can do far more than just invoke the TypeScript compiler. To learn more, see the [webpack website](https://webpack.github.io/). -### 5(a). Prerendering Angular 2 components +### 5(a). Prerendering Angular components -If you're building an Angular 2 application, you can run your components on the server inside your `boot-server.ts` file so they will be injected into the resulting web page. +If you're building an Angular application, you can run your components on the server inside your `boot-server.ts` file so they will be injected into the resulting web page. -First install the NPM package `angular2-universal` - this contains infrastructure for executing Angular 2 components inside Node.js: +First install the NPM package `angular2-universal` - this contains infrastructure for executing Angular components inside Node.js: ``` npm install --save angular2-universal ``` -Now you can use the [`angular2-universal` APIs](https://github.com/angular/universal) from your `boot-server.ts` TypeScript module to execute your Angular 2 component on the server. The code needed for this is fairly complex, but that's unavoidable because Angular 2 supports so many different ways of being configured, and you need to provide wiring for whatever combination of DI modules you're using. +Now you can use the [`angular2-universal` APIs](https://github.com/angular/universal) from your `boot-server.ts` TypeScript module to execute your Angular component on the server. The code needed for this is fairly complex, but that's unavoidable because Angular supports so many different ways of being configured, and you need to provide wiring for whatever combination of DI modules you're using. -You can find an example `boot-server.ts` that renders arbitrary Angular 2 components [here](https://github.com/aspnet/JavaScriptServices/blob/dev/templates/Angular2Spa/ClientApp/boot-server.ts). If you use this with your own application, you might need to edit the `serverBindings` array to reference any other DI services that your Angular 2 component depends on. +You can find an example `boot-server.ts` that renders arbitrary Angular components [here](../../templates/AngularSpa/ClientApp/boot-server.ts). If you use this with your own application, you might need to edit the `serverBindings` array to reference any other DI services that your Angular component depends on. -The easiest way to get started with Angular 2 server-side rendering on ASP.NET Core is to use the [aspnetcore-spa generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/), which creates a ready-made working starting point. +The easiest way to get started with Angular server-side rendering on ASP.NET Core is to use the [aspnetcore-spa generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/), which creates a ready-made working starting point. ### 5(b). Prerendering React components @@ -290,9 +299,9 @@ If you want to enable server-side prerendering too, follow the same process as d The above example is extremely simple - it doesn't use `react-router`, and it doesn't load any data asynchronously. Real applications are likely to do both of these. -For an example server-side boot module that knows how to evaluate `react-router` routes and render the correct React component, see [this example](https://github.com/aspnet/JavaScriptServices/blob/dev/templates/ReactReduxSpa/ClientApp/boot-server.tsx). +For an example server-side boot module that knows how to evaluate `react-router` routes and render the correct React component, see [this example](../../templates/ReactReduxSpa/ClientApp/boot-server.tsx). -Supporting asynchronous data loading involves more considerations. Unlike Angular 2 applications that run asynchronously on the server and freely overwrite server-generated markup with client-generated markup, React strictly wants to run synchronously on the server and always produce the same markup on the server as it does on the client. +Supporting asynchronous data loading involves more considerations. Unlike Angular applications that run asynchronously on the server and freely overwrite server-generated markup with client-generated markup, React strictly wants to run synchronously on the server and always produce the same markup on the server as it does on the client. To make this work, you most likely need some way to know in advance what data your React components will need to use, load it separately from those components, and have some way of transferring information about the loaded data from server to client. If you try to implement this in a generalized way, you'll end up reinventing something like the Flux/Redux pattern. @@ -318,7 +327,7 @@ As a simple example, here's how you can set up Webpack to build TypeScript files ``` npm install --save typescript ts-loader -``` +``` And if you don't already have it, you'll find it useful to install the `webpack` command-line tool: @@ -365,19 +374,19 @@ So that's enough to build TypeScript. Here's where webpack dev middleware comes Following on from the preceding example that builds TypeScript, you could extend your Webpack configuration further to support building LESS. There are three major approaches to doing this: -1. **If using Angular 2, use its native style loader to attach the styles to components**. This is extremely simple and is usually the right choice if you are using Angular 2. However it only applies to Angular 2 components, not to any other part of the host page, so sometimes you might want to combine this technique with options 2 or 3 below. +1. **If using Angular, use its native style loader to attach the styles to components**. This is extremely simple and is usually the right choice if you are using Angular. However it only applies to Angular components, not to any other part of the host page, so sometimes you might want to combine this technique with options 2 or 3 below. 2. **Or, use Webpack's style loader to attach the styles at runtime**. The CSS markup will be included in your JavaScript bundles and will be attached to the document dynamically. This has certain benefits during development but isn't recommended in production. -3. **Or, have each build write a standalone `.css` file to disk**. At runtime, load it using a regular `` tag. This is likely to be the approach you'll want for production use (at least for non-Angular 2 applications, such as React applications) as it's the most robust and best-performing option. +3. **Or, have each build write a standalone `.css` file to disk**. At runtime, load it using a regular `` tag. This is likely to be the approach you'll want for production use (at least for non-Angular applications, such as React applications) as it's the most robust and best-performing option. If instead of LESS you prefer SASS or another CSS preprocessor, the exact same techniques should work, but of course you'll need to replace the `less-loader` with an equivalent Webpack loader for SASS or your chosen preprocessor. -#### Approach 1: Scoping styles to Angular 2 components +#### Approach 1: Scoping styles to Angular components -If you are using Angular 2, this is the easiest way to perform styling. It works with both server and client rendering, supports Hot Module Replacement, and robustly scopes styles to particular components (and optionally, their descendant elements). +If you are using Angular, this is the easiest way to perform styling. It works with both server and client rendering, supports Hot Module Replacement, and robustly scopes styles to particular components (and optionally, their descendant elements). -This repository's Angular 2 template uses this technique to scope styles to components out of the box. It defines those styles as `.css` files. For example, its components reference `.css` files like this: +This repository's Angular template uses this technique to scope styles to components out of the box. It defines those styles as `.css` files. For example, its components reference `.css` files like this: ```javascript @Component({ @@ -391,7 +400,7 @@ To make this work, the template has Webpack configured to inject the contents of ```javascript // This goes into webpack.config.js, in the module loaders array: -{ test: /\.css/, include: /ClientApp/, loader: 'raw' } +{ test: /\.css/, include: /ClientApp/, loader: 'raw-loader' } ``` Now if you want to use LESS instead of plain CSS, you just need to include a LESS loader. Run the following in a command prompt at your project root: @@ -403,10 +412,10 @@ npm install --save less-loader less Next, add the following loader configuration to the `loaders` array in `webpack.config.js`: ```javascript -{ test: /\.less/, include: /ClientApp/, loader: 'raw!less' } +{ test: /\.less/, include: /ClientApp/, loader: 'raw-loader!less-loader' } ``` -Notice how this chains together the `less` loader (which transforms `.less` syntax to plain CSS syntax), then the `raw` loader (which turn the result into a string literal). With this in place, you can reference `.less` files from your Angular 2 components in the obvious way: +Notice how this chains together with `less-loader` (which transforms `.less` syntax to plain CSS syntax), then the `raw` loader (which turn the result into a string literal). With this in place, you can reference `.less` files from your Angular components in the obvious way: ```javascript @Component({ @@ -420,7 +429,7 @@ export class SomeComponent { ... } #### Approach 2: Loading the styles using Webpack and JavaScript -This technique works with any client-side framework (not just Angular 2), and can also apply styles to the entire document rather than just individual components. It's a little simpler to set up than technique 3, plus it works flawlessly with Hot Module Replacement (HMR). The downside is that it's really only good for development time, because in production you probably don't want users to wait until JavaScript is loaded before styles are applied to the page (this would mean they'd see a 'flash of unstyled content' while the page is being loaded). +This technique works with any client-side framework (not just Angular), and can also apply styles to the entire document rather than just individual components. It's a little simpler to set up than technique 3, plus it works flawlessly with Hot Module Replacement (HMR). The downside is that it's really only good for development time, because in production you probably don't want users to wait until JavaScript is loaded before styles are applied to the page (this would mean they'd see a 'flash of unstyled content' while the page is being loaded). First create a `.less` file in your project. For example, create a file at `ClientApp/styles/mystyles.less` containing: @@ -447,7 +456,7 @@ npm install --save less-loader less Finally, tell Webpack to use this whenever it encounters a `.less` file. In `webpack.config.js`, add to the `loaders` array: ``` -{ test: /\.less/, loader: 'style!css!less' } +{ test: /\.less/, loader: 'style-loader!css-loader!less-loader' } ``` This means that when you `import` or `require` a `.less` file, it should pass it first to the LESS compiler to produce CSS, then the output goes to the CSS and Style loaders that know how to attach it dynamically to the page at runtime. @@ -489,7 +498,7 @@ var extractStyles = new (require('extract-text-webpack-plugin'))('mystyles.css') This creates a plugin instance that will output text to a file called `mystyles.css`. You can now compile `.less` files and emit the resulting CSS text into that file. To do so, add the following to the `loaders` array in your Webpack configuration: ```javascript -{ test: /\.less$/, loader: extractStyles.extract('css!less') } +{ test: /\.less$/, loader: extractStyles.extract('css-loader!less-loader') } ``` This tells Webpack that, whenever it finds a `.less` file, it should use the LESS loader to produce CSS, and then feed that CSS into the `extractStyles` object which you've already configured to write a file on disk called `mystyles.css`. Finally, for this to actually work, you need to include `extractStyles` in the list of active plugins. Just add that object to the `plugins` array in your Webpack config, e.g.: @@ -518,7 +527,7 @@ if (env.IsDevelopment()) { app.UseWebpackDevMiddleware(); } -// You call to app.UseStaticFiles(); should be here +// Your call to app.UseStaticFiles(); should be here ``` Also check your webpack configuration at `webpack.config.js`. Since `UseWebpackDevMiddleware` needs to know which incoming requests to intercept, make sure you've specified a `publicPath` value on your `output`, for example: @@ -529,7 +538,7 @@ module.exports = { output: { path: path.join(__dirname, 'wwwroot', 'dist'), - publicPath: '/dist', + publicPath: '/dist/', filename: '[name].js' }, }; @@ -552,7 +561,7 @@ Typically, when you change a source file, the effects appear in your local brows First ensure you already have a working Webpack dev middleware setup. Then, install the `webpack-hot-middleware` NPM module: ``` -npm install --save webpack-hot-middleware +npm install --save-dev webpack-hot-middleware ``` At the top of your `Startup.cs` file, add the following namespace reference: @@ -611,7 +620,7 @@ app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { Also, install the NPM module `aspnet-webpack-react`, e.g.: ``` -npm install --save aspnet-webpack-react +npm install --save-dev aspnet-webpack-react ``` Now if you edit any React component (e.g., in `.jsx` or `.tsx` files), the updated component will be injected into the running application, and will even preserve its in-memory state. @@ -622,8 +631,25 @@ Now if you edit any React component (e.g., in `.jsx` or `.tsx` files), the updat Webpack has built-in HMR support for various types of module, such as styles and React components as described above. But to support HMR for other code modules, you need to add a small block of code that calls `module.hot.accept` to receive the updated module and update the running application. -This is [documented in detail on the Webpack site](https://webpack.github.io/docs/hot-module-replacement.html). Or to get a working HMR-enabled ASP.NET Core site with Angular 2, React, React+Redux, or Knockout, you can use the [aspnetcore-spa generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/). +This is [documented in detail on the Webpack site](https://webpack.github.io/docs/hot-module-replacement.html). Or to get a working HMR-enabled ASP.NET Core site with Angular, React, React+Redux, or Knockout, you can use the [aspnetcore-spa generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/). + +#### Passing options to the Webpack Hot Middleware client +You can configure the [Webpack Hot Middleware client](https://github.com/glenjamin/webpack-hot-middleware#client) +by using the `HotModuleReplacementClientOptions` property on `WebpackDevMiddlewareOptions`: + +```csharp +app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { + HotModuleReplacement = true, + HotModuleReplacementClientOptions = new Dictionary { + { "reload", "true" }, + }, +}); +``` + +For the list of available options, please see [Webpack Hot Middleware docs](https://github.com/glenjamin/webpack-hot-middleware#client). + +**Note**: The `path` option cannot be overridden this way - it is controlled by the `HotModuleReplacementEndpoint` setting. ## Routing helper: MapSpaFallbackRoute @@ -762,14 +788,14 @@ Caveats: ## Debugging your JavaScript/TypeScript code when it runs on the server -When you're using NodeServices or the server-side prerendering feature included in the project templates in this repo, your JavaScript/TypeScript code will execute on the server in a background instance of Node.js. You can enable debugging on that Node.js instance. Here's how to do it. +When you're using NodeServices or the server-side prerendering feature included in the project templates in this repo, your JavaScript/TypeScript code will execute on the server in a background instance of Node.js. You can enable debugging via [V8 Inspector Integration](https://nodejs.org/api/debugger.html#debugger_v8_inspector_integration_for_node_js) on that Node.js instance. Here's how to do it. First, in your `Startup.cs` file, in the `ConfigureServices` method, add the following: ``` services.AddNodeServices(options => { options.LaunchWithDebugging = true; - options.DebuggingPort = 5858; + options.DebuggingPort = 9229; }); ``` @@ -777,21 +803,20 @@ Now, run your application from that command line (e.g., `dotnet run`). Then in a In the console, you should see all the normal trace messages appear, plus among them will be: - ----- - *** Node.js debugging is enabled *** - Debugger listening on port 5858 - - To debug, run: - node-inspector - - If you haven't yet installed node-inspector, you can do so as follows: - npm install -g node-inspector - ----- +``` +warn: Microsoft.AspNetCore.NodeServices[0] + Debugger listening on port 9229. +warn: Microsoft.AspNetCore.NodeServices[0] + Warning: This is an experimental feature and could change at any time. +warn: Microsoft.AspNetCore.NodeServices[0] + To start debugging, open the following URL in Chrome: +warn: Microsoft.AspNetCore.NodeServices[0] + chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +``` -In some other command line window, follow those instructions (i.e., install `node-inspector` as it describes, then run `node-inspector`). Then you can open a browser at `http://127.0.0.1:8080/?port=5858` and you'll see the debugger UI. +As per instructions open the URL in Chrome. Alternatively you can go to the `Sources` tab of the Dev Tools (at http://localhost:5000) and connect to the Node instance under `Threads` in the right sidebar. -By expanding the `webpack://` entry in the sidebar, you'll be able to find your original TypeScript code (it's using source maps), and then set breakpoints in it. When you re-run your app in another browser window, your breakpoints will be hit, then you can debug the server-side execution just like you'd debug client-side execution. It looks like this: +By expanding the `webpack://` entry in the sidebar, you'll be able to find your original source code (it's using source maps), and then set breakpoints in it. When you re-run your app in another browser window, your breakpoints will be hit, then you can debug the server-side execution just like you'd debug client-side execution. It looks like this: -![screen shot 2016-07-26 at 18 56 12](https://cloud.githubusercontent.com/assets/1101362/17149317/a6f7d00c-5362-11e6-969c-4c3a9bbc33f7.png) +![screenshot from 2017-03-25 13-33-26](https://cloud.githubusercontent.com/assets/1596280/24324604/ab888a7e-115f-11e7-89d1-1586acf5e35c.png) -(Note: although this looks like Chrome's native debugger for client-side code, it is actually a JavaScript-powered debugger UI that's connected to the server-side runtime) diff --git a/src/Microsoft.AspNetCore.SpaServices/Routing/SpaRouteExtensions.cs b/src/Microsoft.AspNetCore.SpaServices/Routing/SpaRouteExtensions.cs index 919390e6..7838aa13 100644 --- a/src/Microsoft.AspNetCore.SpaServices/Routing/SpaRouteExtensions.cs +++ b/src/Microsoft.AspNetCore.SpaServices/Routing/SpaRouteExtensions.cs @@ -7,10 +7,22 @@ namespace Microsoft.AspNetCore.Builder { + /// + /// Extension methods useful for configuring routing in a single-page application (SPA). + /// public static class SpaRouteExtensions { private const string ClientRouteTokenName = "clientRoute"; + /// + /// Configures a route that is automatically bypassed if the requested URL appears to be for a static file + /// (e.g., if it has a filename extension). + /// + /// The . + /// The route name. + /// Default route parameters. + /// Route constraints. + /// Route data tokens. public static void MapSpaFallbackRoute( this IRouteBuilder routeBuilder, string name, @@ -27,6 +39,16 @@ public static void MapSpaFallbackRoute( dataTokens); } + /// + /// Configures a route that is automatically bypassed if the requested URL appears to be for a static file + /// (e.g., if it has a filename extension). + /// + /// The . + /// The route name. + /// The template prefix. + /// Default route parameters. + /// Route constraints. + /// Route data tokens. public static void MapSpaFallbackRoute( this IRouteBuilder routeBuilder, string name, diff --git a/src/Microsoft.AspNetCore.SpaServices/TypeScript/Prerenderer.ts b/src/Microsoft.AspNetCore.SpaServices/TypeScript/Prerenderer.ts new file mode 100644 index 00000000..bc491547 --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/TypeScript/Prerenderer.ts @@ -0,0 +1,113 @@ +import { BootModuleInfo, RenderToStringFunc, RenderToStringCallback } from '../npm/aspnet-prerendering/src/PrerenderingInterfaces'; +import * as path from 'path'; +declare var __non_webpack_require__; + +// Separate declaration and export just to add type checking on function signature +export const renderToString: RenderToStringFunc = renderToStringImpl; + +// This function is invoked by .NET code (via NodeServices). Its job is to hand off execution to the application's +// prerendering boot function. It can operate in two modes: +// [1] Legacy mode +// This is for backward compatibility with projects created with templates older than the generator version 0.6.0. +// In this mode, we don't really do anything here - we just load the 'aspnet-prerendering' NPM module (which must +// exist in node_modules, and must be v1.x (not v2+)), and pass through all the parameters to it. Code in +// 'aspnet-prerendering' v1.x will locate the boot function and invoke it. +// The drawback to this mode is that, for it to work, you have to deploy node_modules to production. +// [2] Current mode +// This is for projects created with the Yeoman generator 0.6.0+ (or projects manually updated). In this mode, +// we don't invoke 'require' at runtime at all. All our dependencies are bundled into the NuGet package, so you +// don't have to deploy node_modules to production. +// To determine whether we're in mode [1] or [2], the code locates your prerendering boot function, and checks whether +// a certain flag is attached to the function instance. +function renderToStringImpl(callback: RenderToStringCallback, applicationBasePath: string, bootModule: BootModuleInfo, absoluteRequestUrl: string, requestPathAndQuery: string, customDataParameter: any, overrideTimeoutMilliseconds: number) { + try { + const forceLegacy = isLegacyAspNetPrerendering(); + const renderToStringFunc = !forceLegacy && findRenderToStringFunc(applicationBasePath, bootModule); + const isNotLegacyMode = renderToStringFunc && renderToStringFunc['isServerRenderer']; + + if (isNotLegacyMode) { + // Current (non-legacy) mode - we invoke the exported function directly (instead of going through aspnet-prerendering) + // It's type-safe to just apply the incoming args to this function, because we already type-checked that it's a RenderToStringFunc, + // just like renderToStringImpl itself is. + renderToStringFunc.apply(null, arguments); + } else { + // Legacy mode - just hand off execution to 'aspnet-prerendering' v1.x, which must exist in node_modules at runtime + const aspNetPrerenderingV1RenderToString = require('aspnet-prerendering').renderToString; + if (aspNetPrerenderingV1RenderToString) { + aspNetPrerenderingV1RenderToString(callback, applicationBasePath, bootModule, absoluteRequestUrl, requestPathAndQuery, customDataParameter, overrideTimeoutMilliseconds); + } else { + callback('If you use aspnet-prerendering >= 2.0.0, you must update your server-side boot module to call createServerRenderer. ' + + 'Either update your boot module code, or revert to aspnet-prerendering version 1.x'); + } + } + } catch (ex) { + // Make sure loading errors are reported back to the .NET part of the app + callback( + 'Prerendering failed because of error: ' + + ex.stack + + '\nCurrent directory is: ' + + process.cwd() + ); + } +}; + +function findBootModule(applicationBasePath: string, bootModule: BootModuleInfo): any { + const bootModuleNameFullPath = path.resolve(applicationBasePath, bootModule.moduleName); + if (bootModule.webpackConfig) { + // If you're using asp-prerender-webpack-config, you're definitely in legacy mode + return null; + } else { + return __non_webpack_require__(bootModuleNameFullPath); + } +} + +function findRenderToStringFunc(applicationBasePath: string, bootModule: BootModuleInfo): RenderToStringFunc { + // First try to load the module + const foundBootModule = findBootModule(applicationBasePath, bootModule); + if (foundBootModule === null) { + return null; // Must be legacy mode + } + + // Now try to pick out the function they want us to invoke + let renderToStringFunc: RenderToStringFunc; + if (bootModule.exportName) { + // Explicitly-named export + renderToStringFunc = foundBootModule[bootModule.exportName]; + } else if (typeof foundBootModule !== 'function') { + // TypeScript-style default export + renderToStringFunc = foundBootModule.default; + } else { + // Native default export + renderToStringFunc = foundBootModule; + } + + // Validate the result + if (typeof renderToStringFunc !== 'function') { + if (bootModule.exportName) { + throw new Error(`The module at ${ bootModule.moduleName } has no function export named ${ bootModule.exportName }.`); + } else { + throw new Error(`The module at ${ bootModule.moduleName } does not export a default function, and you have not specified which export to invoke.`); + } + } + + return renderToStringFunc; +} + +function isLegacyAspNetPrerendering() { + const version = getAspNetPrerenderingPackageVersion(); + return version && /^1\./.test(version); +} + +function getAspNetPrerenderingPackageVersion() { + try { + const packageEntryPoint = __non_webpack_require__.resolve('aspnet-prerendering'); + const packageDir = path.dirname(packageEntryPoint); + const packageJsonPath = path.join(packageDir, 'package.json'); + const packageJson = __non_webpack_require__(packageJsonPath); + return packageJson.version.toString(); + } catch(ex) { + // Implies aspnet-prerendering isn't in node_modules at all (or node_modules itself doesn't exist, + // which will be the case in production based on latest templates). + return null; + } +} diff --git a/src/Microsoft.AspNetCore.SpaServices/TypeScript/WebpackDevMiddleware.ts b/src/Microsoft.AspNetCore.SpaServices/TypeScript/WebpackDevMiddleware.ts new file mode 100644 index 00000000..142ca000 --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/TypeScript/WebpackDevMiddleware.ts @@ -0,0 +1,20 @@ +// Pass through the invocation to the 'aspnet-webpack' package, verifying that it can be loaded +export function createWebpackDevServer(callback) { + let aspNetWebpack; + try { + aspNetWebpack = require('aspnet-webpack'); + } catch (ex) { + // Developers sometimes have trouble with badly-configured Node installations, where it's unable + // to find node_modules. Or they accidentally fail to deploy node_modules, or even to run 'npm install'. + // Make sure such errors are reported back to the .NET part of the app. + callback( + 'Webpack dev middleware failed because of an error while loading \'aspnet-webpack\'. Error was: ' + + ex.stack + + '\nCurrent directory is: ' + + process.cwd() + ); + return; + } + + return aspNetWebpack.createWebpackDevServer.apply(this, arguments); +} diff --git a/src/Microsoft.AspNetCore.SpaServices/TypeScript/tsconfig.json b/src/Microsoft.AspNetCore.SpaServices/TypeScript/tsconfig.json new file mode 100644 index 00000000..433cde04 --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/TypeScript/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es3", + "module": "commonjs", + "moduleResolution": "node", + "types": ["node"], + "lib": ["es2015"] + }, + "exclude": [ + "node_modules" + ] +} diff --git a/src/Microsoft.AspNetCore.SpaServices/Webpack/ConditionalProxyMiddleware.cs b/src/Microsoft.AspNetCore.SpaServices/Webpack/ConditionalProxyMiddleware.cs index 72b66c30..8cfbd07a 100644 --- a/src/Microsoft.AspNetCore.SpaServices/Webpack/ConditionalProxyMiddleware.cs +++ b/src/Microsoft.AspNetCore.SpaServices/Webpack/ConditionalProxyMiddleware.cs @@ -9,32 +9,42 @@ namespace Microsoft.AspNetCore.SpaServices.Webpack { /// - /// Based on https://github.com/aspnet/Proxy/blob/dev/src/Microsoft.AspNetCore.Proxy/ProxyMiddleware.cs + /// Based on ProxyMiddleware from https://github.com/aspnet/Proxy/. /// Differs in that, if the proxied request returns a 404, we pass through to the next middleware in the chain /// This is useful for Webpack middleware, because it lets you fall back on prebuilt files on disk for /// chunks not exposed by the current Webpack config (e.g., DLL/vendor chunks). /// internal class ConditionalProxyMiddleware { + private const int DefaultHttpBufferSize = 4096; + private readonly HttpClient _httpClient; private readonly RequestDelegate _next; private readonly ConditionalProxyMiddlewareOptions _options; private readonly string _pathPrefix; + private readonly bool _pathPrefixIsRoot; public ConditionalProxyMiddleware( RequestDelegate next, string pathPrefix, ConditionalProxyMiddlewareOptions options) { + if (!pathPrefix.StartsWith("/")) + { + pathPrefix = "/" + pathPrefix; + } + _next = next; _pathPrefix = pathPrefix; + _pathPrefixIsRoot = string.Equals(_pathPrefix, "/", StringComparison.Ordinal); _options = options; _httpClient = new HttpClient(new HttpClientHandler()); + _httpClient.Timeout = _options.RequestTimeout; } public async Task Invoke(HttpContext context) { - if (context.Request.Path.StartsWithSegments(_pathPrefix)) + if (context.Request.Path.StartsWithSegments(_pathPrefix) || _pathPrefixIsRoot) { var didProxyRequest = await PerformProxyRequest(context); if (didProxyRequest) @@ -62,7 +72,7 @@ private async Task PerformProxyRequest(HttpContext context) requestMessage.Headers.Host = _options.Host + ":" + _options.Port; var uriString = - $"{_options.Scheme}://{_options.Host}:{_options.Port}{context.Request.PathBase}{context.Request.Path}{context.Request.QueryString}"; + $"{_options.Scheme}://{_options.Host}:{_options.Port}{context.Request.Path}{context.Request.QueryString}"; requestMessage.RequestUri = new Uri(uriString); requestMessage.Method = new HttpMethod(context.Request.Method); @@ -92,7 +102,20 @@ private async Task PerformProxyRequest(HttpContext context) // SendAsync removes chunking from the response. This removes the header so it doesn't expect a chunked response. context.Response.Headers.Remove("transfer-encoding"); - await responseMessage.Content.CopyToAsync(context.Response.Body); + + using (var responseStream = await responseMessage.Content.ReadAsStreamAsync()) + { + try + { + await responseStream.CopyToAsync(context.Response.Body, DefaultHttpBufferSize, context.RequestAborted); + } + catch (OperationCanceledException) + { + // The CopyToAsync task will be canceled if the client disconnects (e.g., user + // closes or refreshes the browser tab). Don't treat this as an error. + } + } + return true; } } diff --git a/src/Microsoft.AspNetCore.SpaServices/Webpack/ConditionalProxyMiddlewareOptions.cs b/src/Microsoft.AspNetCore.SpaServices/Webpack/ConditionalProxyMiddlewareOptions.cs index 56540075..2c3311aa 100644 --- a/src/Microsoft.AspNetCore.SpaServices/Webpack/ConditionalProxyMiddlewareOptions.cs +++ b/src/Microsoft.AspNetCore.SpaServices/Webpack/ConditionalProxyMiddlewareOptions.cs @@ -1,16 +1,20 @@ +using System; + namespace Microsoft.AspNetCore.SpaServices.Webpack { internal class ConditionalProxyMiddlewareOptions { - public ConditionalProxyMiddlewareOptions(string scheme, string host, string port) + public ConditionalProxyMiddlewareOptions(string scheme, string host, string port, TimeSpan requestTimeout) { Scheme = scheme; Host = host; Port = port; + RequestTimeout = requestTimeout; } public string Scheme { get; } public string Host { get; } public string Port { get; } + public TimeSpan RequestTimeout { get; } } } \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.SpaServices/Webpack/WebpackDevMiddleware.cs b/src/Microsoft.AspNetCore.SpaServices/Webpack/WebpackDevMiddleware.cs index 9ea32997..2e8f92ea 100644 --- a/src/Microsoft.AspNetCore.SpaServices/Webpack/WebpackDevMiddleware.cs +++ b/src/Microsoft.AspNetCore.SpaServices/Webpack/WebpackDevMiddleware.cs @@ -1,23 +1,41 @@ using System; using System.IO; -using System.Threading.Tasks; +using System.Threading; using Microsoft.AspNetCore.NodeServices; using Microsoft.AspNetCore.SpaServices.Webpack; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.PlatformAbstractions; using Newtonsoft.Json; - -// Putting in this namespace so it's always available whenever MapRoute is +using Newtonsoft.Json.Serialization; namespace Microsoft.AspNetCore.Builder { + /// + /// Extension methods that can be used to enable Webpack dev middleware support. + /// public static class WebpackDevMiddleware { - private const string WebpackDevMiddlewareScheme = "http"; - private const string WebpackHotMiddlewareEndpoint = "/__webpack_hmr"; private const string DefaultConfigFile = "webpack.config.js"; + private static readonly JsonSerializerSettings jsonSerializerSettings = new JsonSerializerSettings + { + // Note that the aspnet-webpack JS code specifically expects options to be serialized with + // PascalCase property names, so it's important to be explicit about this contract resolver + ContractResolver = new DefaultContractResolver(), + + TypeNameHandling = TypeNameHandling.None + }; + + /// + /// Enables Webpack dev middleware support. This hosts an instance of the Webpack compiler in memory + /// in your application so that you can always serve up-to-date Webpack-built resources without having + /// to run the compiler manually. Since the Webpack compiler instance is retained in memory, incremental + /// compilation is vastly faster that re-running the compiler from scratch. + /// + /// Incoming requests that match Webpack-built files will be handled by returning the Webpack compiler + /// output directly, regardless of files on disk. If compilation is in progress when the request arrives, + /// the response will pause until updated compiler output is ready. + /// + /// The . + /// Options for configuring the Webpack compiler instance. public static void UseWebpackDevMiddleware( this IApplicationBuilder appBuilder, WebpackDevMiddlewareOptions options = null) @@ -41,7 +59,7 @@ public static void UseWebpackDevMiddleware( // middleware). And since this is a dev-time-only feature, it doesn't matter if the default transport isn't // as fast as some theoretical future alternative. var nodeServicesOptions = new NodeServicesOptions(appBuilder.ApplicationServices); - nodeServicesOptions.WatchFileExtensions = new string[] {}; // Don't watch anything + nodeServicesOptions.WatchFileExtensions = new string[] { }; // Don't watch anything if (!string.IsNullOrEmpty(options.ProjectPath)) { nodeServicesOptions.ProjectPath = options.ProjectPath; @@ -60,18 +78,26 @@ public static void UseWebpackDevMiddleware( // Get a filename matching the middleware Node script var script = EmbeddedResourceReader.Read(typeof(WebpackDevMiddleware), "/Content/Node/webpack-dev-middleware.js"); - var nodeScript = new StringAsTempFile(script); // Will be cleaned up on process exit + var nodeScript = new StringAsTempFile(script, nodeServicesOptions.ApplicationStoppingToken); // Will be cleaned up on process exit + + // Ideally, this would be relative to the application's PathBase (so it could work in virtual directories) + // but it's not clear that such information exists during application startup, as opposed to within the context + // of a request. + var hmrEndpoint = !string.IsNullOrEmpty(options.HotModuleReplacementEndpoint) + ? options.HotModuleReplacementEndpoint + : "/__webpack_hmr"; // Matches webpack's built-in default // Tell Node to start the server hosting webpack-dev-middleware var devServerOptions = new { webpackConfigPath = Path.Combine(nodeServicesOptions.ProjectPath, options.ConfigFile ?? DefaultConfigFile), suppliedOptions = options, - understandsMultiplePublicPaths = true + understandsMultiplePublicPaths = true, + hotModuleReplacementEndpointUrl = hmrEndpoint }; var devServerInfo = nodeServices.InvokeExportAsync(nodeScript.FileName, "createWebpackDevServer", - JsonConvert.SerializeObject(devServerOptions)).Result; + JsonConvert.SerializeObject(devServerOptions, jsonSerializerSettings)).Result; // If we're talking to an older version of aspnet-webpack, it will return only a single PublicPath, // not an array of PublicPaths. Handle that scenario. @@ -81,33 +107,30 @@ public static void UseWebpackDevMiddleware( } // Proxy the corresponding requests through ASP.NET and into the Node listener + // Anything under / (e.g., /dist) is proxied as a normal HTTP request with a typical timeout (100s is the default from HttpClient), + // plus /__webpack_hmr is proxied with infinite timeout, because it's an EventSource (long-lived request). + foreach (var publicPath in devServerInfo.PublicPaths) + { + appBuilder.UseProxyToLocalWebpackDevMiddleware(publicPath + hmrEndpoint, devServerInfo.Port, Timeout.InfiniteTimeSpan); + appBuilder.UseProxyToLocalWebpackDevMiddleware(publicPath, devServerInfo.Port, TimeSpan.FromSeconds(100)); + } + } + + private static void UseProxyToLocalWebpackDevMiddleware(this IApplicationBuilder appBuilder, string publicPath, int proxyToPort, TimeSpan requestTimeout) + { // Note that this is hardcoded to make requests to "localhost" regardless of the hostname of the // server as far as the client is concerned. This is because ConditionalProxyMiddlewareOptions is // the one making the internal HTTP requests, and it's going to be to some port on this machine // because aspnet-webpack hosts the dev server there. We can't use the hostname that the client // sees, because that could be anything (e.g., some upstream load balancer) and we might not be // able to make outbound requests to it from here. - var proxyOptions = new ConditionalProxyMiddlewareOptions(WebpackDevMiddlewareScheme, - "localhost", devServerInfo.Port.ToString()); - foreach (var publicPath in devServerInfo.PublicPaths) - { - appBuilder.UseMiddleware(publicPath, proxyOptions); - } - - // While it would be nice to proxy the /__webpack_hmr requests too, these return an EventStream, - // and the Microsoft.AspNetCore.Proxy code doesn't handle that entirely - it throws an exception after - // a while. So, just serve a 302 for those. But note that we must use the hostname that the client - // sees, not "localhost", so that it works even when you're not running on localhost (e.g., Docker). - appBuilder.Map(WebpackHotMiddlewareEndpoint, builder => - { - builder.Use(next => ctx => - { - var hostname = ctx.Request.Host.Host; - ctx.Response.Redirect( - $"{WebpackDevMiddlewareScheme}://{hostname}:{devServerInfo.Port.ToString()}{WebpackHotMiddlewareEndpoint}"); - return Task.FromResult(0); - }); - }); + // Also note that the webpack HMR service always uses HTTP, even if your app server uses HTTPS, + // because the HMR service has no need for HTTPS (the client doesn't see it directly - all traffic + // to it is proxied), and the HMR service couldn't use HTTPS anyway (in general it wouldn't have + // the necessary certificate). + var proxyOptions = new ConditionalProxyMiddlewareOptions( + "http", "localhost", proxyToPort.ToString(), requestTimeout); + appBuilder.UseMiddleware(publicPath, proxyOptions); } #pragma warning disable CS0649 diff --git a/src/Microsoft.AspNetCore.SpaServices/Webpack/WebpackDevMiddlewareOptions.cs b/src/Microsoft.AspNetCore.SpaServices/Webpack/WebpackDevMiddlewareOptions.cs index 8f5e12ad..df50100d 100644 --- a/src/Microsoft.AspNetCore.SpaServices/Webpack/WebpackDevMiddlewareOptions.cs +++ b/src/Microsoft.AspNetCore.SpaServices/Webpack/WebpackDevMiddlewareOptions.cs @@ -2,13 +2,60 @@ namespace Microsoft.AspNetCore.SpaServices.Webpack { + /// + /// Options for configuring a Webpack dev middleware compiler. + /// public class WebpackDevMiddlewareOptions { + /// + /// If true, hot module replacement (HMR) will be enabled. This automatically updates Webpack-built + /// resources (such as JavaScript, CSS, or images) in your web browser whenever source files are changed. + /// public bool HotModuleReplacement { get; set; } + + /// + /// If set, overrides the URL that Webpack's client-side code will connect to when listening for updates. + /// This must be a root-relative URL similar to "/__webpack_hmr" (which is the default endpoint). + /// + public string HotModuleReplacementEndpoint { get; set; } + + /// + /// Overrides the internal port number that client-side HMR code will connect to. + /// public int HotModuleReplacementServerPort { get; set; } + + /// + /// If true, enables React-specific extensions to Webpack's hot module replacement (HMR) feature. + /// This enables React components to be updated without losing their in-memory state. + /// public bool ReactHotModuleReplacement { get; set; } + + /// + /// Specifies additional options to be passed to the Webpack Hot Middleware client, if used. + /// + public IDictionary HotModuleReplacementClientOptions { get; set; } + + /// + /// Specifies the Webpack configuration file to be used. If not set, defaults to 'webpack.config.js'. + /// public string ConfigFile { get; set; } + + /// + /// The root path of your project. Webpack runs in this context. + /// public string ProjectPath { get; set; } + + /// + /// Specifies additional environment variables to be passed to the Node instance hosting + /// the webpack compiler. + /// public IDictionary EnvironmentVariables { get; set; } + + /// + /// Specifies a value for the "env" parameter to be passed into the Webpack configuration + /// function. The value must be JSON-serializable, and will only be used if the Webpack + /// configuration is exported as a function. + /// + public object EnvParam { get; set; } } } \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.SpaServices/baseline.netcore.json b/src/Microsoft.AspNetCore.SpaServices/baseline.netcore.json new file mode 100644 index 00000000..d6301ef4 --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/baseline.netcore.json @@ -0,0 +1,751 @@ +{ + "AssemblyIdentity": "Microsoft.AspNetCore.SpaServices, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "Types": [ + { + "Name": "Microsoft.Extensions.DependencyInjection.PrerenderingServiceCollectionExtensions", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "AddSpaPrerenderer", + "Parameters": [ + { + "Name": "serviceCollection", + "Type": "Microsoft.Extensions.DependencyInjection.IServiceCollection" + } + ], + "ReturnType": "System.Void", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.Builder.SpaRouteExtensions", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "MapSpaFallbackRoute", + "Parameters": [ + { + "Name": "routeBuilder", + "Type": "Microsoft.AspNetCore.Routing.IRouteBuilder" + }, + { + "Name": "name", + "Type": "System.String" + }, + { + "Name": "defaults", + "Type": "System.Object" + }, + { + "Name": "constraints", + "Type": "System.Object", + "DefaultValue": "null" + }, + { + "Name": "dataTokens", + "Type": "System.Object", + "DefaultValue": "null" + } + ], + "ReturnType": "System.Void", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "MapSpaFallbackRoute", + "Parameters": [ + { + "Name": "routeBuilder", + "Type": "Microsoft.AspNetCore.Routing.IRouteBuilder" + }, + { + "Name": "name", + "Type": "System.String" + }, + { + "Name": "templatePrefix", + "Type": "System.String" + }, + { + "Name": "defaults", + "Type": "System.Object" + }, + { + "Name": "constraints", + "Type": "System.Object", + "DefaultValue": "null" + }, + { + "Name": "dataTokens", + "Type": "System.Object", + "DefaultValue": "null" + } + ], + "ReturnType": "System.Void", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.Builder.WebpackDevMiddleware", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "UseWebpackDevMiddleware", + "Parameters": [ + { + "Name": "appBuilder", + "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder" + }, + { + "Name": "options", + "Type": "Microsoft.AspNetCore.SpaServices.Webpack.WebpackDevMiddlewareOptions", + "DefaultValue": "null" + } + ], + "ReturnType": "System.Void", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.SpaServices.Webpack.WebpackDevMiddlewareOptions", + "Visibility": "Public", + "Kind": "Class", + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "get_HotModuleReplacement", + "Parameters": [], + "ReturnType": "System.Boolean", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_HotModuleReplacement", + "Parameters": [ + { + "Name": "value", + "Type": "System.Boolean" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_HotModuleReplacementEndpoint", + "Parameters": [], + "ReturnType": "System.String", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_HotModuleReplacementEndpoint", + "Parameters": [ + { + "Name": "value", + "Type": "System.String" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_HotModuleReplacementServerPort", + "Parameters": [], + "ReturnType": "System.Int32", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_HotModuleReplacementServerPort", + "Parameters": [ + { + "Name": "value", + "Type": "System.Int32" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_ReactHotModuleReplacement", + "Parameters": [], + "ReturnType": "System.Boolean", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_ReactHotModuleReplacement", + "Parameters": [ + { + "Name": "value", + "Type": "System.Boolean" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_HotModuleReplacementClientOptions", + "Parameters": [], + "ReturnType": "System.Collections.Generic.IDictionary", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_HotModuleReplacementClientOptions", + "Parameters": [ + { + "Name": "value", + "Type": "System.Collections.Generic.IDictionary" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_ConfigFile", + "Parameters": [], + "ReturnType": "System.String", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_ConfigFile", + "Parameters": [ + { + "Name": "value", + "Type": "System.String" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_ProjectPath", + "Parameters": [], + "ReturnType": "System.String", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_ProjectPath", + "Parameters": [ + { + "Name": "value", + "Type": "System.String" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_EnvironmentVariables", + "Parameters": [], + "ReturnType": "System.Collections.Generic.IDictionary", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_EnvironmentVariables", + "Parameters": [ + { + "Name": "value", + "Type": "System.Collections.Generic.IDictionary" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_EnvParam", + "Parameters": [], + "ReturnType": "System.Object", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_EnvParam", + "Parameters": [ + { + "Name": "value", + "Type": "System.Object" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [], + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.SpaServices.Prerendering.ISpaPrerenderer", + "Visibility": "Public", + "Kind": "Interface", + "Abstract": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "RenderToString", + "Parameters": [ + { + "Name": "moduleName", + "Type": "System.String" + }, + { + "Name": "exportName", + "Type": "System.String", + "DefaultValue": "null" + }, + { + "Name": "customDataParameter", + "Type": "System.Object", + "DefaultValue": "null" + }, + { + "Name": "timeoutMilliseconds", + "Type": "System.Int32", + "DefaultValue": "0" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.SpaServices.Prerendering.JavaScriptModuleExport", + "Visibility": "Public", + "Kind": "Class", + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "get_ModuleName", + "Parameters": [], + "ReturnType": "System.String", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_ExportName", + "Parameters": [], + "ReturnType": "System.String", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_ExportName", + "Parameters": [ + { + "Name": "value", + "Type": "System.String" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [ + { + "Name": "moduleName", + "Type": "System.String" + } + ], + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.SpaServices.Prerendering.Prerenderer", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "RenderToString", + "Parameters": [ + { + "Name": "applicationBasePath", + "Type": "System.String" + }, + { + "Name": "nodeServices", + "Type": "Microsoft.AspNetCore.NodeServices.INodeServices" + }, + { + "Name": "applicationStoppingToken", + "Type": "System.Threading.CancellationToken" + }, + { + "Name": "bootModule", + "Type": "Microsoft.AspNetCore.SpaServices.Prerendering.JavaScriptModuleExport" + }, + { + "Name": "requestAbsoluteUrl", + "Type": "System.String" + }, + { + "Name": "requestPathAndQuery", + "Type": "System.String" + }, + { + "Name": "customDataParameter", + "Type": "System.Object" + }, + { + "Name": "timeoutMilliseconds", + "Type": "System.Int32" + }, + { + "Name": "requestPathBase", + "Type": "System.String" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "Static": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.SpaServices.Prerendering.PrerenderTagHelper", + "Visibility": "Public", + "Kind": "Class", + "BaseType": "Microsoft.AspNetCore.Razor.TagHelpers.TagHelper", + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "ProcessAsync", + "Parameters": [ + { + "Name": "context", + "Type": "Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext" + }, + { + "Name": "output", + "Type": "Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "Virtual": true, + "Override": true, + "ImplementedInterface": "Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_ModuleName", + "Parameters": [], + "ReturnType": "System.String", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_ModuleName", + "Parameters": [ + { + "Name": "value", + "Type": "System.String" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_ExportName", + "Parameters": [], + "ReturnType": "System.String", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_ExportName", + "Parameters": [ + { + "Name": "value", + "Type": "System.String" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_CustomDataParameter", + "Parameters": [], + "ReturnType": "System.Object", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_CustomDataParameter", + "Parameters": [ + { + "Name": "value", + "Type": "System.Object" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_TimeoutMillisecondsParameter", + "Parameters": [], + "ReturnType": "System.Int32", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_TimeoutMillisecondsParameter", + "Parameters": [ + { + "Name": "value", + "Type": "System.Int32" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_ViewContext", + "Parameters": [], + "ReturnType": "Microsoft.AspNetCore.Mvc.Rendering.ViewContext", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_ViewContext", + "Parameters": [ + { + "Name": "value", + "Type": "Microsoft.AspNetCore.Mvc.Rendering.ViewContext" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [ + { + "Name": "serviceProvider", + "Type": "System.IServiceProvider" + } + ], + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.SpaServices.Prerendering.RenderToStringResult", + "Visibility": "Public", + "Kind": "Class", + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "get_Globals", + "Parameters": [], + "ReturnType": "Newtonsoft.Json.Linq.JObject", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_Globals", + "Parameters": [ + { + "Name": "value", + "Type": "Newtonsoft.Json.Linq.JObject" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_Html", + "Parameters": [], + "ReturnType": "System.String", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_Html", + "Parameters": [ + { + "Name": "value", + "Type": "System.String" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_RedirectUrl", + "Parameters": [], + "ReturnType": "System.String", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_RedirectUrl", + "Parameters": [ + { + "Name": "value", + "Type": "System.String" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_StatusCode", + "Parameters": [], + "ReturnType": "System.Nullable", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_StatusCode", + "Parameters": [ + { + "Name": "value", + "Type": "System.Nullable" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "CreateGlobalsAssignmentScript", + "Parameters": [], + "ReturnType": "System.String", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [], + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + } + ] +} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/.gitignore b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/.gitignore new file mode 100644 index 00000000..93666fdf --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/.gitignore @@ -0,0 +1,5 @@ +/node_modules/ +**/*.js +**/*.d.ts +**/*.metadata.json +/compiled diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/.npmignore b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/.npmignore similarity index 61% rename from src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/.npmignore rename to src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/.npmignore index 858cdc4c..2df2c09c 100644 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/.npmignore +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/.npmignore @@ -1,3 +1,3 @@ !/*.js !/*.d.ts -/typings/ +/compiled diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/LICENSE.txt b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/LICENSE.txt similarity index 100% rename from src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/LICENSE.txt rename to src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/LICENSE.txt diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/package.json b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/package.json new file mode 100644 index 00000000..5153adea --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/package.json @@ -0,0 +1,33 @@ +{ + "name": "aspnet-angular", + "version": "0.1.1", + "description": "Helpers for using Angular in ASP.NET Core projects", + "main": "index.js", + "scripts": { + "prepublish": "rimraf *.d.ts && ngc && echo 'Finished building NPM package \"aspnet-angular\"'", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/aspnet/JavaScriptServices.git" + }, + "author": "Microsoft", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/aspnet/JavaScriptServices/issues" + }, + "devDependencies": { + "@angular/common": "^4.3.2", + "@angular/compiler": "^4.3.2", + "@angular/compiler-cli": "^4.3.2", + "@angular/core": "^4.3.2", + "@angular/http": "^4.3.2", + "@angular/platform-browser": "^4.3.2", + "rimraf": "^2.6.1", + "rxjs": "^5.4.2", + "zone.js": "^0.8.16" + }, + "peerDependencies": { + "@angular/core": "^4.2.5 || ^5.0.0-beta" + } +} diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/src/HttpWithStateTransfer.ts b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/src/HttpWithStateTransfer.ts new file mode 100644 index 00000000..517dd7e7 --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/src/HttpWithStateTransfer.ts @@ -0,0 +1,94 @@ +import { Provider, NgModule, Inject } from '@angular/core'; +import { Headers, Http, ResponseOptions, RequestOptionsArgs, Response } from '@angular/http'; +import { Observable } from 'rxjs/Observable'; +import 'rxjs/add/observable/of'; +import 'rxjs/add/operator/map'; +const globalSerializedStateKey = 'HTTP_STATE_TRANSFER'; +const backingStoreDIToken = 'HTTP_STATE_BACKING_STORE'; + +export interface CacheOptions { + permanent: boolean; +} + +export interface CachedHttpResponse { + headers: { [name: string]: any } | null; + status: number; + statusText: string | null; + text: string; + url: string; +} + +export type BackingStore = { [key: string]: CachedHttpResponse }; + +export class HttpWithStateTransfer { + private backingStore: BackingStore; + private http: Http; + + constructor(@Inject(Http) http: Http, @Inject(backingStoreDIToken) backingStore: BackingStore) { + this.http = http; + this.backingStore = backingStore; + } + + public stateForTransfer(): any { + return { [globalSerializedStateKey]: this.backingStore }; + } + + public get(url: string, options?: CacheOptions, requestOptions?: RequestOptionsArgs): Observable { + return this.getCachedResponse(/* cacheKey */ url, () => this.http.get(url, requestOptions), options); + } + + private getCachedResponse(cacheKey: string, provider: () => Observable, options?: CacheOptions): Observable { + // By default, the cache is only used for the *first* client-side read. So, we're only performing + // a one-time transfer of server-side response to the client. If you want to keep and reuse cached + // responses continually during server-side and client-side execution, set 'permanent' to 'true. + const isClient = typeof window !== 'undefined'; + const isPermanent = options && options.permanent; + + const allowReadFromCache = isClient || isPermanent; + if (allowReadFromCache && this.backingStore.hasOwnProperty(cacheKey)) { + const cachedValue = this.backingStore[cacheKey]; + if (!isPermanent) { + delete this.backingStore[cacheKey]; + } + return Observable.of(new Response(new ResponseOptions({ + body: cachedValue.text, + headers: new Headers(cachedValue.headers), + status: cachedValue.status, + url: cachedValue.url + }))); + } + + return provider() + .map(response => { + const allowWriteToCache = !isClient || isPermanent; + if (allowWriteToCache) { + this.backingStore[cacheKey] = { + headers: response.headers ? response.headers.toJSON() : null, + status: response.status, + statusText: response.statusText, + text: response.text(), + url: response.url + }; + } + + return response; + }); + } +} + +export function defaultBackingStoreFactory() { + const transferredData = typeof window !== 'undefined' ? (window as any)[globalSerializedStateKey] : null; + return transferredData || {}; +} + +@NgModule({ + providers: [ + // The backing store is a separate DI service so you could override exactly how it gets + // transferred from server to client + { provide: backingStoreDIToken, useFactory: defaultBackingStoreFactory }, + + { provide: HttpWithStateTransfer, useClass: HttpWithStateTransfer }, + ] +}) +export class HttpWithStateTransferModule { +} diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/src/index.ts b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/src/index.ts new file mode 100644 index 00000000..93d21853 --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/src/index.ts @@ -0,0 +1 @@ +export * from './HttpWithStateTransfer'; diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/tsconfig.json b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/tsconfig.json similarity index 66% rename from src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/tsconfig.json rename to src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/tsconfig.json index 06173418..3c6a30b7 100644 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/tsconfig.json +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-angular/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "experimentalDecorators": true, "moduleResolution": "node", "module": "commonjs", "target": "es5", @@ -8,9 +9,12 @@ "lib": ["es2015", "dom"] }, "files": [ - "src/main.ts" + "src/index.ts" ], "exclude": [ "node_modules" - ] + ], + "angularCompilerOptions": { + "genDir": "compiled" + } } diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/.gitignore b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/.gitignore index a1df9a5c..e1ef4d0a 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/.gitignore +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/.gitignore @@ -1,4 +1,8 @@ /typings/ /node_modules/ -/*.js -/*.d.ts +/**/*.js + +/**/.d.ts +!/src/**/*.d.ts + +yarn.lock diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/.npmignore b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/.npmignore index 858cdc4c..542947e4 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/.npmignore +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/.npmignore @@ -1,3 +1,4 @@ !/*.js !/*.d.ts /typings/ +yarn.lock diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json index 83e0259a..e239460f 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json @@ -1,6 +1,6 @@ { "name": "aspnet-prerendering", - "version": "1.0.7", + "version": "3.0.1", "description": "Helpers for server-side rendering of JavaScript applications in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.", "main": "index.js", "scripts": { @@ -17,13 +17,11 @@ "url": "https://github.com/aspnet/JavaScriptServices.git" }, "dependencies": { - "domain-task": "^2.0.1", - "es6-promise": "^3.1.2" + "domain-task": "^3.0.0" }, "devDependencies": { "@types/node": "^6.0.42", - "@types/whatwg-fetch": "0.0.31", "rimraf": "^2.5.4", - "typescript": "^2.0.0" + "typescript": "^2.2.1" } } diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts index e9d604e8..a313cbad 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts @@ -1,47 +1,13 @@ -import 'es6-promise'; import * as url from 'url'; import * as path from 'path'; import * as domain from 'domain'; -import { run as domainTaskRun } from 'domain-task/main'; -import { baseUrl } from 'domain-task/fetch'; +import { run as domainTaskRun, baseUrl as domainTaskBaseUrl } from 'domain-task/main'; +import { BootFunc, BootFuncParams, BootModuleInfo, RenderToStringCallback, RenderToStringFunc } from './PrerenderingInterfaces'; const defaultTimeoutMilliseconds = 30 * 1000; -export interface RenderToStringCallback { - (error: any, result: RenderToStringResult): void; -} - -export interface RenderToStringResult { - html: string; - globals: { [key: string]: any }; -} - -export interface BootFunc { - (params: BootFuncParams): Promise; -} - -export interface BootFuncParams { - location: url.Url; // e.g., Location object containing information '/some/path' - origin: string; // e.g., 'https://example.com:1234' - url: string; // e.g., '/some/path' - absoluteUrl: string; // e.g., 'https://example.com:1234/some/path' - domainTasks: Promise; - data: any; // any custom object passed through from .NET -} - -export interface BootModuleInfo { - moduleName: string; - exportName?: string; - webpackConfig?: string; -} - -export function renderToString(callback: RenderToStringCallback, applicationBasePath: string, bootModule: BootModuleInfo, absoluteRequestUrl: string, requestPathAndQuery: string, customDataParameter: any, overrideTimeoutMilliseconds: number) { - findBootFunc(applicationBasePath, bootModule, (findBootFuncError, bootFunc) => { - if (findBootFuncError) { - callback(findBootFuncError, null); - return; - } - +export function createServerRenderer(bootFunc: BootFunc): RenderToStringFunc { + const resultFunc = (callback: RenderToStringCallback, applicationBasePath: string, bootModule: BootModuleInfo, absoluteRequestUrl: string, requestPathAndQuery: string, customDataParameter: any, overrideTimeoutMilliseconds: number, requestPathBase: string) => { // Prepare a promise that will represent the completion of all domain tasks in this execution context. // The boot code will wait for this before performing its final render. let domainTaskCompletionPromiseResolve; @@ -50,13 +16,17 @@ export function renderToString(callback: RenderToStringCallback, applicationBase }); const parsedAbsoluteRequestUrl = url.parse(absoluteRequestUrl); const params: BootFuncParams = { - location: url.parse(requestPathAndQuery), + // It's helpful for boot funcs to receive the query as a key-value object, so parse it here + // e.g., react-redux-router requires location.query to be a key-value object for consistency with client-side behaviour + location: url.parse(requestPathAndQuery, /* parseQueryString */ true), origin: parsedAbsoluteRequestUrl.protocol + '//' + parsedAbsoluteRequestUrl.host, url: requestPathAndQuery, + baseUrl: (requestPathBase || '') + '/', absoluteUrl: absoluteRequestUrl, domainTasks: domainTaskCompletionPromise, data: customDataParameter }; + const absoluteBaseUrl = params.origin + params.baseUrl; // Should be same value as page's // Open a new domain that can track all the async tasks involved in the app's execution domainTaskRun(/* code to run */ () => { @@ -66,7 +36,7 @@ export function renderToString(callback: RenderToStringCallback, applicationBase bindPromiseContinuationsToDomain(domainTaskCompletionPromise, domain['active']); // Make the base URL available to the 'domain-tasks/fetch' helper within this execution context - baseUrl(absoluteRequestUrl); + domainTaskBaseUrl(absoluteBaseUrl); // Begin rendering, and apply a timeout const bootFuncPromise = bootFunc(params); @@ -76,7 +46,7 @@ export function renderToString(callback: RenderToStringCallback, applicationBase } const timeoutMilliseconds = overrideTimeoutMilliseconds || defaultTimeoutMilliseconds; // e.g., pass -1 to override as 'never time out' const bootFuncPromiseWithTimeout = timeoutMilliseconds > 0 - ? wrapWithTimeout(bootFuncPromise, timeoutMilliseconds, + ? wrapWithTimeout(bootFuncPromise, timeoutMilliseconds, `Prerendering timed out after ${timeoutMilliseconds}ms because the boot function in '${bootModule.moduleName}' ` + 'returned a promise that did not resolve or reject. Make sure that your boot function always resolves or ' + 'rejects its promise. You can change the timeout value using the \'asp-prerender-timeout\' tag helper.') @@ -97,7 +67,14 @@ export function renderToString(callback: RenderToStringCallback, applicationBase domainTaskCompletionPromiseResolve(); } }); - }); + }; + + // Indicate to the prerendering code bundled into Microsoft.AspNetCore.SpaServices that this is a serverside rendering + // function, so it can be invoked directly. This flag exists only so that, in its absence, we can run some different + // backward-compatibility logic. + resultFunc['isServerRenderer'] = true; + + return resultFunc; } function wrapWithTimeout(promise: Promise, timeoutMilliseconds: number, timeoutRejectionValue: any): Promise { @@ -119,59 +96,6 @@ function wrapWithTimeout(promise: Promise, timeoutMilliseconds: number, ti }); } -function findBootModule(applicationBasePath: string, bootModule: BootModuleInfo, callback: (error: any, foundModule: T) => void) { - const bootModuleNameFullPath = path.resolve(applicationBasePath, bootModule.moduleName); - if (bootModule.webpackConfig) { - const webpackConfigFullPath = path.resolve(applicationBasePath, bootModule.webpackConfig); - - let aspNetWebpackModule: any; - try { - aspNetWebpackModule = require('aspnet-webpack'); - } catch (ex) { - callback('To load your boot module via webpack (i.e., if you specify a \'webpackConfig\' option), you must install the \'aspnet-webpack\' NPM package. Error encountered while loading \'aspnet-webpack\': ' + ex.stack, null); - return; - } - - aspNetWebpackModule.loadViaWebpack(webpackConfigFullPath, bootModuleNameFullPath, callback); - } else { - callback(null, require(bootModuleNameFullPath)); - } -} - -function findBootFunc(applicationBasePath: string, bootModule: BootModuleInfo, callback: (error: any, bootFunc: BootFunc) => void) { - // First try to load the module (possibly via Webpack) - findBootModule(applicationBasePath, bootModule, (findBootModuleError, foundBootModule) => { - if (findBootModuleError) { - callback(findBootModuleError, null); - return; - } - - // Now try to pick out the function they want us to invoke - let bootFunc: BootFunc; - if (bootModule.exportName) { - // Explicitly-named export - bootFunc = foundBootModule[bootModule.exportName]; - } else if (typeof foundBootModule !== 'function') { - // TypeScript-style default export - bootFunc = foundBootModule.default; - } else { - // Native default export - bootFunc = foundBootModule; - } - - // Validate the result - if (typeof bootFunc !== 'function') { - if (bootModule.exportName) { - callback(`The module at ${ bootModule.moduleName } has no function export named ${ bootModule.exportName }.`, null); - } else { - callback(`The module at ${ bootModule.moduleName } does not export a default function, and you have not specified which export to invoke.`, null); - } - } else { - callback(null, bootFunc); - } - }); -} - function bindPromiseContinuationsToDomain(promise: Promise, domainInstance: domain.Domain) { const originalThen = promise.then; promise.then = (function then(resolve, reject) { diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/PrerenderingInterfaces.ts b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/PrerenderingInterfaces.ts new file mode 100644 index 00000000..ae101bdf --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/PrerenderingInterfaces.ts @@ -0,0 +1,39 @@ +export interface RenderToStringFunc { + (callback: RenderToStringCallback, applicationBasePath: string, bootModule: BootModuleInfo, absoluteRequestUrl: string, requestPathAndQuery: string, customDataParameter: any, overrideTimeoutMilliseconds: number, requestPathBase: string): void; +} + +export interface RenderToStringCallback { + (error: any, result?: RenderResult): void; +} + +export interface RenderToStringResult { + html: string; + statusCode?: number; + globals?: { [key: string]: any }; +} + +export interface RedirectResult { + redirectUrl: string; +} + +export type RenderResult = RenderToStringResult | RedirectResult; + +export interface BootFunc { + (params: BootFuncParams): Promise; +} + +export interface BootFuncParams { + location: any; // e.g., Location object containing information '/some/path' + origin: string; // e.g., 'https://example.com:1234' + url: string; // e.g., '/some/path' + baseUrl: string; // e.g., '' or '/myVirtualDir' + absoluteUrl: string; // e.g., 'https://example.com:1234/some/path' + domainTasks: Promise; + data: any; // any custom object passed through from .NET +} + +export interface BootModuleInfo { + moduleName: string; + exportName?: string; + webpackConfig?: string; +} diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/index.ts b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/index.ts index aaff5765..082f07c7 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/index.ts +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/index.ts @@ -1 +1,2 @@ export * from './Prerendering'; +export * from './PrerenderingInterfaces'; diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/README.md b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/README.md index 30cdc0c2..65f78bc1 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/README.md +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/README.md @@ -4,3 +4,8 @@ This NPM package is an internal implementation detail of the `Microsoft.AspNetCo You should not use this package directly in your own applications, because it is not supported, and there are no guarantees about how its APIs will change in the future. + +## History + +* Version 1.x amends the Webpack config to insert `react-transform` and `react-transform-hmr` entries on `babel-loader`. +* Version 2.x drops support for the Babel plugin, and instead amends the Webpack config to insert `react-hot-loader/webpack` and `react-hot-loader/patch` entries. This means it works with React Hot Loader v3. diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/package.json b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/package.json index 477c05d7..0e469c78 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/package.json +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/package.json @@ -1,6 +1,6 @@ { "name": "aspnet-webpack-react", - "version": "1.0.2", + "version": "4.0.0", "description": "Helpers for using Webpack with React in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.", "main": "index.js", "scripts": { @@ -16,22 +16,13 @@ "type": "git", "url": "https://github.com/aspnet/JavaScriptServices.git" }, - "dependencies": { - "babel-core": "^6.7.2", - "babel-loader": "^6.2.4", - "babel-plugin-react-transform": "^2.0.2", - "babel-preset-es2015": "^6.6.0", - "babel-preset-react": "^6.5.0", - "react": "^15.0.0", - "react-transform-hmr": "^1.0.4" - }, "devDependencies": { - "@types/webpack": "^1.12.34", + "@types/webpack": "^4.4.0", "rimraf": "^2.5.4", "typescript": "^2.0.0", - "webpack": "^1.12.14" + "webpack": "^4.16.0" }, "peerDependencies": { - "webpack": "^1.12.14" + "webpack": "^4.0.0" } } diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/src/HotModuleReplacement.ts b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/src/HotModuleReplacement.ts index 4756e4cd..4f63516c 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/src/HotModuleReplacement.ts +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/src/HotModuleReplacement.ts @@ -1,33 +1,53 @@ import * as webpack from 'webpack'; -export function addReactHotModuleReplacementBabelTransform(webpackConfig: webpack.Configuration) { - webpackConfig.module.loaders.forEach(loaderConfig => { - if (loaderConfig.loader && loaderConfig.loader.match(/\bbabel-loader\b/)) { - // Ensure the babel-loader options includes a 'query' - const query = loaderConfig.query = loaderConfig.query || {}; +const supportedTypeScriptLoaders = ['ts-loader', 'awesome-typescript-loader']; - // Ensure Babel plugins includes 'react-transform' - const plugins = query['plugins'] = query['plugins'] || []; - const hasReactTransform = plugins.some(p => p && p[0] === 'react-transform'); - if (!hasReactTransform) { - plugins.push(['react-transform', {}]); - } +export function addReactHotModuleReplacementConfig(webpackConfig: webpack.Configuration) { + const moduleConfig = webpackConfig.module as webpack.Module; + const moduleRules = moduleConfig.rules; + if (!moduleRules) { + return; // Unknown rules list format. Might be Webpack 1.x, which is not supported. + } - // Ensure 'react-transform' plugin is configured to use 'react-transform-hmr' - plugins.forEach(pluginConfig => { - if (pluginConfig && pluginConfig[0] === 'react-transform') { - const pluginOpts = pluginConfig[1] = pluginConfig[1] || {}; - const transforms = pluginOpts.transforms = pluginOpts.transforms || []; - const hasReactTransformHmr = transforms.some(t => t.transform === 'react-transform-hmr'); - if (!hasReactTransformHmr) { - transforms.push({ - transform: 'react-transform-hmr', - imports: ['react'], - locals: ['module'] // Important for Webpack HMR - }); - } - } - }); + // Find the rule that loads TypeScript files, and prepend 'react-hot-loader/webpack' + // to its array of loaders + for (let ruleIndex = 0; ruleIndex < moduleRules.length; ruleIndex++) { + // We only support NewUseRule (i.e., { use: ... }) because OldUseRule doesn't accept array values + const rule = moduleRules[ruleIndex] as webpack.RuleSetRule; + if (!rule.use) { + continue; } + + // We're looking for the first 'use' value that's a TypeScript loader + const loadersArray: webpack.RuleSetUseItem[] = rule.use instanceof Array ? rule.use : [rule.use as webpack.RuleSetUseItem]; + const isTypescriptLoader = supportedTypeScriptLoaders.some(typeScriptLoaderName => containsLoader(loadersArray, typeScriptLoaderName)); + if (!isTypescriptLoader) { + continue; + } + + break; + } + + // Ensure the entrypoint is prefixed with 'react-hot-loader/patch' (unless it's already in there). + // We only support entrypoints of the form { name: value } (not just 'name' or ['name']) + // because that gives us a place to prepend the new value + if (!webpackConfig.entry || typeof webpackConfig.entry === 'string' || webpackConfig.entry instanceof Array) { + throw new Error('Cannot enable React HMR because \'entry\' in Webpack config is not of the form { name: value }'); + } + const entryConfig = webpackConfig.entry as webpack.Entry; + Object.getOwnPropertyNames(entryConfig).forEach(entrypointName => { + if (typeof(entryConfig[entrypointName]) === 'string') { + // Normalise to array + entryConfig[entrypointName] = [entryConfig[entrypointName] as string]; + } + }); +} + +function containsLoader(loadersArray: webpack.RuleSetUseItem[], loaderName: string) { + return loadersArray.some(loader => { + // Allow 'use' values to be either { loader: 'name' } or 'name' + // No need to support legacy webpack.OldLoader + const actualLoaderName = (loader as webpack.RuleSetLoader).loader || (loader as string); + return actualLoaderName && new RegExp(`\\b${ loaderName }\\b`).test(actualLoaderName); }); } diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/src/index.ts b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/src/index.ts index 34dab602..c4284f2f 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/src/index.ts +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/src/index.ts @@ -1 +1,6 @@ -export { addReactHotModuleReplacementBabelTransform } from './HotModuleReplacement'; +export { addReactHotModuleReplacementConfig } from './HotModuleReplacement'; + +// Temporarily alias addReactHotModuleReplacementConfig as addReactHotModuleReplacementBabelTransform for backward +// compatibility with aspnet-webpack 1.x. In aspnet-webpack 2.0, we can drop the old name (and also deprecate +// some other no-longer-supported functionality, such as LoadViaWebpack). +export { addReactHotModuleReplacementConfig as addReactHotModuleReplacementBabelTransform } from './HotModuleReplacement'; diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/package-lock.json b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/package-lock.json new file mode 100644 index 00000000..0e453d1b --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/package-lock.json @@ -0,0 +1,2875 @@ +{ + "name": "aspnet-webpack", + "version": "3.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/connect": { + "version": "3.4.31", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.31.tgz", + "integrity": "sha512-OPSxsP6XqA3984KWDUXq/u05Hu8VWa/2rUVlw/aDUOx87BptIep6xb3NdCxCpKLfLdjZcCE5jR+gouTul3gjdA==", + "dev": true, + "requires": { + "@types/node": "6.0.96" + } + }, + "@types/node": { + "version": "6.0.96", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.96.tgz", + "integrity": "sha512-fsOOY6tMQ3jCB2wD51XFDmmpgm4wVKkJECdcVRqapbJEa7awJDcr+SaH8toz+4r4KW8YQ3M7ybXMoSDo1QGewA==", + "dev": true + }, + "@types/tapable": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.2.tgz", + "integrity": "sha512-42zEJkBpNfMEAvWR5WlwtTH22oDzcMjFsL9gDGExwF8X8WvAiw7Vwop7hPw03QT8TKfec83LwbHj6SvpqM4ELQ==", + "dev": true + }, + "@types/uglify-js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.2.tgz", + "integrity": "sha512-o8hU2+4xsyGC27Vujoklvxl88Ew5zmJuTBYMX1Uro2rYUt4HEFJKL6fuq8aGykvS+ssIsIzerWWP2DRxonownQ==", + "dev": true, + "requires": { + "source-map": "0.6.1" + } + }, + "@types/webpack": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.1.3.tgz", + "integrity": "sha512-NoGVTCumOsyFfuy3934f3ktiJi+wcXHJFxT47tby3iCpuo6M/WjFA9VqT5bYO+FE46i3R0N00RpJX75HxHKDaQ==", + "dev": true, + "requires": { + "@types/node": "6.0.96", + "@types/tapable": "1.0.2", + "@types/uglify-js": "3.0.2", + "source-map": "0.6.1" + } + }, + "acorn": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", + "dev": true, + "requires": { + "acorn": "5.5.3" + } + }, + "ajv": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.0.tgz", + "integrity": "sha512-VDUX1oSajablmiyFyED9L1DFndg0P9h7p1F+NO8FkIzei6EPrR6Zu1n18rd5P8PqaSRd/FrWv3G1TVBqpM83gA==", + "dev": true, + "requires": { + "fast-deep-equal": "2.0.1", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1", + "uri-js": "4.2.2" + } + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "3.1.10", + "normalize-path": "2.1.1" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "atob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "1.2.0", + "browserify-des": "1.0.1", + "evp_bytestokey": "1.0.3" + } + }, + "browserify-des": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "randombytes": "2.0.6" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.1" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "1.0.6" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "1.3.0", + "ieee754": "1.1.11", + "isarray": "1.0.0" + } + }, + "buffer-from": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "cacache": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "dev": true, + "requires": { + "bluebird": "3.5.1", + "chownr": "1.0.1", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "lru-cache": "4.1.3", + "mississippi": "2.0.0", + "mkdirp": "0.5.1", + "move-concurrently": "1.0.1", + "promise-inflight": "1.0.1", + "rimraf": "2.6.2", + "ssri": "5.3.0", + "unique-filename": "1.1.0", + "y18n": "4.0.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + } + }, + "chokidar": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", + "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", + "dev": true, + "requires": { + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.2", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.1.0" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true + }, + "chrome-trace-event": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz", + "integrity": "sha512-sjndyZHrrWiu4RY7AkHgjn80GfAM2ZSzUkZLV/Js59Ldmh6JDThf0SUmOHU53rFu2rVxxfCzJ30Ukcfch3Gb/A==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "1.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + } + }, + "connect": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.5.tgz", + "integrity": "sha1-+43ee6B2OHfQ7J352sC0tA5yx9o=", + "requires": { + "debug": "2.6.9", + "finalhandler": "1.0.6", + "parseurl": "1.3.2", + "utils-merge": "1.0.1" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "1.2.0", + "fs-write-stream-atomic": "1.0.10", + "iferr": "0.1.5", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "elliptic": "6.4.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "md5.js": "1.3.4", + "ripemd160": "2.0.2", + "sha.js": "2.4.11" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "inherits": "2.0.3", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.1", + "sha.js": "2.4.11" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "1.0.1", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.3", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "diffie-hellman": "5.0.3", + "inherits": "2.0.3", + "pbkdf2": "3.0.16", + "public-encrypt": "4.0.2", + "randombytes": "2.0.6", + "randomfill": "1.0.4" + } + }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.6" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "duplexify": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", + "dev": true, + "requires": { + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "stream-shift": "1.0.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", + "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "memory-fs": "0.4.1", + "tapable": "1.0.0" + }, + "dependencies": { + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "0.1.6", + "readable-stream": "2.3.3" + } + } + } + }, + "errno": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.6.tgz", + "integrity": "sha512-IsORQDpaaSwcDP4ZZnHxgE85werpo34VYn1Ud3mq+eUsF593faR8oCZNXrROVkpFu2TsbrNhHin0aUrTsQ9vNw==", + "requires": { + "prr": "1.0.1" + } + }, + "es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "1.3.4", + "safe-buffer": "5.1.1" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "finalhandler": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.6.tgz", + "integrity": "sha1-AHrqM9Gk0+QgF/YkhIrVjSEvgU8=", + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.3.1", + "unpipe": "1.0.0" + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "1.0.1", + "make-dir": "1.3.0", + "pkg-dir": "2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "iferr": "0.1.5", + "imurmurhash": "0.1.4", + "readable-stream": "2.3.3" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "ieee754": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.11.tgz", + "integrity": "sha512-VhDzCKN7K8ufStx/CLj5/PDTMgph+qwN5Pkd5i0sGnVwk56zJ0lkT8Qzi1xqWLS0Wp29DgDtNeS7v8/wMoZeHg==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "1.11.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", + "dev": true, + "requires": { + "is-number": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "dev": true + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "3.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "1.0.1" + } + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + } + }, + "memory-fs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz", + "integrity": "sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA=", + "requires": { + "errno": "0.1.6", + "readable-stream": "2.3.3" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mississippi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "dev": true, + "requires": { + "concat-stream": "1.6.2", + "duplexify": "3.6.0", + "end-of-stream": "1.4.1", + "flush-write-stream": "1.0.3", + "from2": "2.3.0", + "parallel-transform": "1.1.0", + "pump": "2.0.1", + "pumpify": "1.5.1", + "stream-each": "1.2.2", + "through2": "2.0.3" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "1.2.0", + "copy-concurrently": "1.0.5", + "fs-write-stream-atomic": "1.0.10", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "neo-async": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", + "dev": true + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "dev": true, + "requires": { + "assert": "1.4.1", + "browserify-zlib": "0.2.0", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "domain-browser": "1.2.0", + "events": "1.1.1", + "https-browserify": "1.0.0", + "os-browserify": "0.3.0", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.3", + "stream-browserify": "2.0.1", + "stream-http": "2.8.2", + "string_decoder": "1.0.3", + "timers-browserify": "2.0.10", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "p-limit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "dev": true, + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.2.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, + "requires": { + "cyclist": "0.2.2", + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "dev": true, + "requires": { + "asn1.js": "4.10.1", + "browserify-aes": "1.2.0", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.16" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "dev": true, + "requires": { + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.1", + "sha.js": "2.4.11" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "2.1.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "parse-asn1": "5.1.1", + "randombytes": "2.0.6" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "1.4.1", + "once": "1.4.0" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "3.6.0", + "inherits": "2.0.3", + "pump": "2.0.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "2.0.6", + "safe-buffer": "5.1.1" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.3", + "set-immediate-shim": "1.0.1" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "1.2.0" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "0.1.15" + } + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "dev": true, + "requires": { + "ajv": "6.5.0", + "ajv-keywords": "3.2.0" + } + }, + "serialize-javascript": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.2", + "use": "3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "3.0.2" + } + }, + "ssri": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "stream-each": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", + "dev": true, + "requires": { + "end-of-stream": "1.4.1", + "stream-shift": "1.0.0" + } + }, + "stream-http": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.2.tgz", + "integrity": "sha512-QllfrBhqF1DPcz46WxKTs6Mz1Bpc+8Qm6vbqOpVav5odAXwbyzwnEczoWqtxrsmlO+cJqtPrp/8gWKWjaKLLlA==", + "dev": true, + "requires": { + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" + }, + "dependencies": { + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tapable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + } + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "requires": { + "setimmediate": "1.0.5" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typescript": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", + "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", + "dev": true + }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "dev": true, + "requires": { + "commander": "2.13.0", + "source-map": "0.6.1" + } + }, + "uglifyjs-webpack-plugin": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", + "integrity": "sha512-hIQJ1yxAPhEA2yW/i7Fr+SXZVMp+VEI3d42RTHBgQd2yhp/1UdBcR3QEWPV5ahBxlqQDMEMTuTEvDHSFINfwSw==", + "dev": true, + "requires": { + "cacache": "10.0.4", + "find-cache-dir": "1.0.0", + "schema-utils": "0.4.5", + "serialize-javascript": "1.5.0", + "source-map": "0.6.1", + "uglify-es": "3.3.9", + "webpack-sources": "1.1.0", + "worker-farm": "1.6.0" + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + } + } + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "dev": true, + "requires": { + "unique-slug": "2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "dev": true, + "requires": { + "imurmurhash": "0.1.4" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "2.1.1" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "use": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "2.0.3", + "graceful-fs": "4.1.11", + "neo-async": "2.5.1" + } + }, + "webpack": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.5.0.tgz", + "integrity": "sha512-6GrZsvQJnG7o7mjbfjp6s5CyMfdopjt1A/X8LcYwceis9ySjqBX6Lusso2wNZ06utHj2ZvfL6L3f7hfgVeJP6g==", + "dev": true, + "requires": { + "acorn": "5.5.3", + "acorn-dynamic-import": "3.0.0", + "ajv": "6.5.0", + "ajv-keywords": "3.2.0", + "chrome-trace-event": "0.1.3", + "enhanced-resolve": "4.0.0", + "eslint-scope": "3.7.1", + "loader-runner": "2.3.0", + "loader-utils": "1.1.0", + "memory-fs": "0.4.1", + "micromatch": "3.1.10", + "mkdirp": "0.5.1", + "neo-async": "2.5.1", + "node-libs-browser": "2.1.0", + "schema-utils": "0.4.5", + "tapable": "1.0.0", + "uglifyjs-webpack-plugin": "1.2.5", + "watchpack": "1.6.0", + "webpack-sources": "1.1.0" + }, + "dependencies": { + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "0.1.6", + "readable-stream": "2.3.3" + } + } + } + }, + "webpack-node-externals": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/webpack-node-externals/-/webpack-node-externals-1.6.0.tgz", + "integrity": "sha1-Iyxi7GCSsQBjWj0p2DwXRxKN+b0=" + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", + "dev": true, + "requires": { + "source-list-map": "2.0.0", + "source-map": "0.6.1" + } + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, + "requires": { + "errno": "0.1.7" + }, + "dependencies": { + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "1.0.1" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + } + } +} diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/package.json b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/package.json index 66d36834..b9b956c2 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/package.json +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/package.json @@ -1,6 +1,6 @@ { "name": "aspnet-webpack", - "version": "1.0.24", + "version": "3.0.0", "description": "Helpers for using Webpack in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.", "main": "index.js", "scripts": { @@ -21,18 +21,18 @@ "es6-promise": "^3.1.2", "memory-fs": "^0.3.0", "require-from-string": "^1.1.0", - "webpack-dev-middleware": "^1.8.4", "webpack-node-externals": "^1.4.3" }, "devDependencies": { "@types/connect": "^3.4.30", "@types/node": "^6.0.42", - "@types/webpack": "^1.12.34", + "@types/webpack": "^4.1.3", "rimraf": "^2.5.4", "typescript": "^2.0.0", - "webpack": "^1.13.2" + "webpack": "^4.5.0" }, "peerDependencies": { - "webpack": "^1.13.2 || ^2.1.0-beta" + "webpack": "^1.13.2 || ^2.1.0-beta || ^3.0.0 || ^4.0.0", + "webpack-dev-middleware": "^1.8.4 || ^3.0.0" } } diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/LoadViaWebpack.ts b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/LoadViaWebpack.ts index faee0695..0c75afc8 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/LoadViaWebpack.ts +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/LoadViaWebpack.ts @@ -90,9 +90,12 @@ function loadViaWebpackNoCache(webpackConfigPath: string, modulePath: string) })); // The CommonsChunkPlugin is not compatible with a CommonJS environment like Node, nor is it needed in that case - webpackConfig.plugins = webpackConfig.plugins.filter(plugin => { - return !(plugin instanceof webpack.optimize.CommonsChunkPlugin); - }); + const ChunkPlugin = webpack.optimize['CommonsChunkPlugin']; + if (ChunkPlugin !== undefined) { + webpackConfig.plugins = webpackConfig.plugins.filter(plugin => { + return !(plugin instanceof ChunkPlugin); + }); + } // The typical use case for DllReferencePlugin is for referencing vendor modules. In a Node // environment, it doesn't make sense to load them from a DLL bundle, nor would that even diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/WebpackDevMiddleware.ts b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/WebpackDevMiddleware.ts index 23db6816..324f5db8 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/WebpackDevMiddleware.ts +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/WebpackDevMiddleware.ts @@ -3,12 +3,13 @@ import * as webpack from 'webpack'; import * as url from 'url'; import * as fs from 'fs'; import * as path from 'path'; +import * as querystring from 'querystring'; import { requireNewCopy } from './RequireNewCopy'; +import { hasSufficientPermissions } from './WebpackTestPermissions'; export type CreateDevServerResult = { Port: number, - PublicPaths: string[], - PublicPath: string // For backward compatibility with older verions of Microsoft.AspNetCore.SpaServices. Will be removed soon. + PublicPaths: string[] }; export interface CreateDevServerCallback { @@ -19,16 +20,41 @@ export interface CreateDevServerCallback { interface CreateDevServerOptions { webpackConfigPath: string; suppliedOptions: DevServerOptions; + hotModuleReplacementEndpointUrl: string; } +type EsModuleExports = { __esModule: true, default: T }; +type StringMap = [(key: string) => T]; + // These are the options configured in C# and then JSON-serialized, hence the C#-style naming interface DevServerOptions { HotModuleReplacement: boolean; HotModuleReplacementServerPort: number; + HotModuleReplacementClientOptions: StringMap; ReactHotModuleReplacement: boolean; + EnvParam: any; +} + +// Interface as defined in es6-promise +interface Thenable { + then(onFulfilled?: (value: T) => U | Thenable, onRejected?: (error: any) => U | Thenable): Thenable; + then(onFulfilled?: (value: T) => U | Thenable, onRejected?: (error: any) => void): Thenable; +} + +// We support these four kinds of webpack.config.js export +type WebpackConfigOrArray = webpack.Configuration | webpack.Configuration[]; +type WebpackConfigOrArrayOrThenable = WebpackConfigOrArray | Thenable; +interface WebpackConfigFunc { + (env?: any): WebpackConfigOrArrayOrThenable; +} +type WebpackConfigExport = WebpackConfigOrArrayOrThenable | WebpackConfigFunc; +type WebpackConfigModuleExports = WebpackConfigExport | EsModuleExports; + +function isThenable(obj: any): obj is Thenable { + return obj && typeof (>obj).then === 'function'; } -function attachWebpackDevMiddleware(app: any, webpackConfig: webpack.Configuration, enableHotModuleReplacement: boolean, enableReactHotModuleReplacement: boolean, hmrEndpoint: string) { +function attachWebpackDevMiddleware(app: any, webpackConfig: webpack.Configuration, enableHotModuleReplacement: boolean, enableReactHotModuleReplacement: boolean, hmrClientOptions: StringMap, hmrServerEndpoint: string) { // Build the final Webpack config based on supplied options if (enableHotModuleReplacement) { // For this, we only support the key/value config format, not string or string[], since @@ -44,7 +70,7 @@ function attachWebpackDevMiddleware(app: any, webpackConfig: webpack.Configurati // Augment all entry points so they support HMR (unless they already do) Object.getOwnPropertyNames(entryPoints).forEach(entryPointName => { const webpackHotMiddlewareEntryPoint = 'webpack-hot-middleware/client'; - const webpackHotMiddlewareOptions = `?path=` + encodeURIComponent(hmrEndpoint); + const webpackHotMiddlewareOptions = '?' + querystring.stringify(hmrClientOptions); if (typeof entryPoints[entryPointName] === 'string') { entryPoints[entryPointName] = [webpackHotMiddlewareEntryPoint + webpackHotMiddlewareOptions, entryPoints[entryPointName]]; } else if (firstIndexOfStringStartingWith(entryPoints[entryPointName], webpackHotMiddlewareEntryPoint) < 0) { @@ -95,7 +121,9 @@ function attachWebpackDevMiddleware(app: any, webpackConfig: webpack.Configurati const compiler = webpack(webpackConfig); app.use(require('webpack-dev-middleware')(compiler, { noInfo: true, - publicPath: webpackConfig.output.publicPath + stats: webpackConfig.stats, + publicPath: ensureLeadingSlash(webpackConfig.output.publicPath), + watchOptions: webpackConfig.watchOptions })); // After each compilation completes, copy the in-memory filesystem to disk. @@ -106,9 +134,12 @@ function attachWebpackDevMiddleware(app: any, webpackConfig: webpack.Configurati // middleware's in-memory filesystem only (and not on disk) would confuse the debugger, because the // file on disk wouldn't match the file served to the browser, and the source map line numbers wouldn't // match up. Breakpoints would either not be hit, or would hit the wrong lines. - (compiler as any).plugin('done', stats => { - copyRecursiveToRealFsSync(compiler.outputFileSystem, '/', [/\.hot-update\.(js|json)$/]); - }); + const copy = stats => copyRecursiveToRealFsSync(compiler.outputFileSystem, '/', [/\.hot-update\.(js|json|js\.map)$/]); + if (compiler.hooks) { + compiler.hooks.done.tap('aspnet-webpack', copy); + } else { + compiler.plugin('done', copy); + } if (enableHotModuleReplacement) { let webpackHotMiddlewareModule; @@ -117,10 +148,51 @@ function attachWebpackDevMiddleware(app: any, webpackConfig: webpack.Configurati } catch (ex) { throw new Error('HotModuleReplacement failed because of an error while loading \'webpack-hot-middleware\'. Error was: ' + ex.stack); } - app.use(webpackHotMiddlewareModule(compiler)); + app.use(workaroundIISExpressEventStreamFlushingIssue(hmrServerEndpoint)); + app.use(webpackHotMiddlewareModule(compiler, { + path: hmrServerEndpoint + })); } } +function workaroundIISExpressEventStreamFlushingIssue(path: string): connect.NextHandleFunction { + // IIS Express makes HMR seem very slow, because when it's reverse-proxying an EventStream response + // from Kestrel, it doesn't pass through the lines to the browser immediately, even if you're calling + // response.Flush (or equivalent) in your ASP.NET Core code. For some reason, it waits until the following + // line is sent. By default, that wouldn't be until the next HMR heartbeat, which can be up to 5 seconds later. + // In effect, it looks as if your code is taking 5 seconds longer to compile than it really does. + // + // As a workaround, this connect middleware intercepts requests to the HMR endpoint, and modifies the response + // stream so that all EventStream 'data' lines are immediately followed with a further blank line. This is + // harmless in non-IIS-Express cases, because it's OK to have extra blank lines in an EventStream response. + // The implementation is simplistic - rather than using a true stream reader, we just patch the 'write' + // method. This relies on webpack's HMR code always writing complete EventStream messages with a single + // 'write' call. That works fine today, but if webpack's HMR code was changed, this workaround might have + // to be updated. + const eventStreamLineStart = /^data\:/; + return (req, res, next) => { + // We only want to interfere with requests to the HMR endpoint, so check this request matches + const urlMatchesPath = (req.url === path) || (req.url.split('?', 1)[0] === path); + if (urlMatchesPath) { + const origWrite = res.write; + res.write = function (chunk) { + const result = origWrite.apply(this, arguments); + + // We only want to interfere with actual EventStream data lines, so check it is one + if (typeof (chunk) === 'string') { + if (eventStreamLineStart.test(chunk) && chunk.charAt(chunk.length - 1) === '\n') { + origWrite.call(this, '\n\n'); + } + } + + return result; + } + } + + return next(); + }; +} + function copyRecursiveToRealFsSync(from: typeof fs, rootDir: string, exclude: RegExp[]) { from.readdirSync(rootDir).forEach(filename => { const fullPath = pathJoinSafe(rootDir, filename); @@ -140,6 +212,14 @@ function copyRecursiveToRealFsSync(from: typeof fs, rootDir: string, exclude: Re }); } +function ensureLeadingSlash(value: string) { + if (value !== null && value.substring(0, 1) !== '/') { + value = '/' + value; + } + + return value; +} + function pathJoinSafe(rootPath: string, filePath: string) { // On Windows, MemoryFileSystem's readdirSync output produces directory entries like 'C:' // which then trigger errors if you call statSync for them. Avoid this by detecting drive @@ -153,7 +233,7 @@ function pathJoinSafe(rootPath: string, filePath: string) { function beginWebpackWatcher(webpackConfig: webpack.Configuration) { const compiler = webpack(webpackConfig); - compiler.watch({ /* watchOptions */ }, (err, stats) => { + compiler.watch(webpackConfig.watchOptions || {}, (err, stats) => { // The default error reporter is fine for now, but could be customized here in the future if desired }); } @@ -161,61 +241,126 @@ function beginWebpackWatcher(webpackConfig: webpack.Configuration) { export function createWebpackDevServer(callback: CreateDevServerCallback, optionsJson: string) { const options: CreateDevServerOptions = JSON.parse(optionsJson); - // Read the webpack config's export, and normalize it into the more general 'array of configs' format - let webpackConfigArray: webpack.Configuration[] = requireNewCopy(options.webpackConfigPath); - if (!(webpackConfigArray instanceof Array)) { - webpackConfigArray = [webpackConfigArray as webpack.Configuration]; + // Enable TypeScript loading if the webpack config is authored in TypeScript + if (path.extname(options.webpackConfigPath) === '.ts') { + try { + require('ts-node/register'); + } catch (ex) { + throw new Error('Error while attempting to enable support for Webpack config file written in TypeScript. Make sure your project depends on the "ts-node" NPM package. The underlying error was: ' + ex.stack); + } } - const enableHotModuleReplacement = options.suppliedOptions.HotModuleReplacement; - const enableReactHotModuleReplacement = options.suppliedOptions.ReactHotModuleReplacement; - if (enableReactHotModuleReplacement && !enableHotModuleReplacement) { - callback('To use ReactHotModuleReplacement, you must also enable the HotModuleReplacement option.', null); + // See the large comment in WebpackTestPermissions.ts for details about this + if (!hasSufficientPermissions()) { + console.log('WARNING: Webpack dev middleware is not enabled because the server process does not have sufficient permissions. You should either remove the UseWebpackDevMiddleware call from your code, or to make it work, give your server process user account permission to write to your application directory and to read all ancestor-level directories.'); + callback(null, { + Port: 0, + PublicPaths: [] + }); return; } - // The default value, 0, means 'choose randomly' - const suggestedHMRPortOrZero = options.suppliedOptions.HotModuleReplacementServerPort || 0; + // Read the webpack config's export, and normalize it into the more general 'array of configs' format + const webpackConfigModuleExports: WebpackConfigModuleExports = requireNewCopy(options.webpackConfigPath); + let webpackConfigExport = (webpackConfigModuleExports as EsModuleExports<{}>).__esModule === true + ? (webpackConfigModuleExports as EsModuleExports).default + : (webpackConfigModuleExports as WebpackConfigExport); - const app = connect(); - const listener = app.listen(suggestedHMRPortOrZero, () => { - try { - // For each webpack config that specifies a public path, add webpack dev middleware for it - const normalizedPublicPaths: string[] = []; - webpackConfigArray.forEach(webpackConfig => { - if (webpackConfig.target === 'node') { - // For configs that target Node, it's meaningless to set up an HTTP listener, since - // Node isn't going to load those modules over HTTP anyway. It just loads them directly - // from disk. So the most relevant thing we can do with such configs is just write - // updated builds to disk, just like "webpack --watch". - beginWebpackWatcher(webpackConfig); - } else { - // For configs that target browsers, we can set up an HTTP listener, and dynamically - // modify the config to enable HMR etc. This just requires that we have a publicPath. - const publicPath = (webpackConfig.output.publicPath || '').trim(); - if (!publicPath) { - throw new Error('To use the Webpack dev server, you must specify a value for \'publicPath\' on the \'output\' section of your webpack config (for any configuration that targets browsers)'); - } - normalizedPublicPaths.push(removeTrailingSlash(publicPath)); + if (webpackConfigExport instanceof Function) { + // If you export a function, then Webpack convention is that it takes zero or one param, + // and that param is called `env` and reflects the `--env.*` args you can specify on + // the command line (e.g., `--env.prod`). + // When invoking it via WebpackDevMiddleware, we let you configure the `env` param in + // your Startup.cs. + webpackConfigExport = webpackConfigExport(options.suppliedOptions.EnvParam); + } - const hmrEndpoint = `http://localhost:${listener.address().port}/__webpack_hmr`; - attachWebpackDevMiddleware(app, webpackConfig, enableHotModuleReplacement, enableReactHotModuleReplacement, hmrEndpoint); - } - }); + const webpackConfigThenable = isThenable(webpackConfigExport) + ? webpackConfigExport + : { then: callback => callback(webpackConfigExport) } as Thenable; - // Tell the ASP.NET app what addresses we're listening on, so that it can proxy requests here - callback(null, { - Port: listener.address().port, - PublicPaths: normalizedPublicPaths, + webpackConfigThenable.then(webpackConfigResolved => { + const webpackConfigArray = webpackConfigResolved instanceof Array ? webpackConfigResolved : [webpackConfigResolved]; - // For back-compatibility with older versions of Microsoft.AspNetCore.SpaServices, in the case where - // you have exactly one webpackConfigArray entry. This will be removed soon. - PublicPath: normalizedPublicPaths[0] - }); - } catch (ex) { - callback(ex.stack, null); + const enableHotModuleReplacement = options.suppliedOptions.HotModuleReplacement; + const enableReactHotModuleReplacement = options.suppliedOptions.ReactHotModuleReplacement; + if (enableReactHotModuleReplacement && !enableHotModuleReplacement) { + callback('To use ReactHotModuleReplacement, you must also enable the HotModuleReplacement option.', null); + return; } - }); + + // The default value, 0, means 'choose randomly' + const suggestedHMRPortOrZero = options.suppliedOptions.HotModuleReplacementServerPort || 0; + + const app = connect(); + const listener = app.listen(suggestedHMRPortOrZero, () => { + try { + // For each webpack config that specifies a public path, add webpack dev middleware for it + const normalizedPublicPaths: string[] = []; + webpackConfigArray.forEach(webpackConfig => { + if (webpackConfig.target === 'node') { + // For configs that target Node, it's meaningless to set up an HTTP listener, since + // Node isn't going to load those modules over HTTP anyway. It just loads them directly + // from disk. So the most relevant thing we can do with such configs is just write + // updated builds to disk, just like "webpack --watch". + beginWebpackWatcher(webpackConfig); + } else { + // For configs that target browsers, we can set up an HTTP listener, and dynamically + // modify the config to enable HMR etc. This just requires that we have a publicPath. + const publicPath = (webpackConfig.output.publicPath || '').trim(); + if (!publicPath) { + throw new Error('To use the Webpack dev server, you must specify a value for \'publicPath\' on the \'output\' section of your webpack config (for any configuration that targets browsers)'); + } + const publicPathNoTrailingSlash = removeTrailingSlash(publicPath); + normalizedPublicPaths.push(publicPathNoTrailingSlash); + + // This is the URL the client will connect to, except that since it's a relative URL + // (no leading slash), Webpack will resolve it against the runtime URL + // plus it also adds the publicPath + const hmrClientEndpoint = removeLeadingSlash(options.hotModuleReplacementEndpointUrl); + + // This is the URL inside the Webpack middleware Node server that we'll proxy to. + // We have to prefix with the public path because Webpack will add the publicPath + // when it resolves hmrClientEndpoint as a relative URL. + const hmrServerEndpoint = ensureLeadingSlash(publicPathNoTrailingSlash + options.hotModuleReplacementEndpointUrl); + + // We always overwrite the 'path' option as it needs to match what the .NET side is expecting + const hmrClientOptions = options.suppliedOptions.HotModuleReplacementClientOptions || >{}; + hmrClientOptions['path'] = hmrClientEndpoint; + + const dynamicPublicPathKey = 'dynamicPublicPath'; + if (!(dynamicPublicPathKey in hmrClientOptions)) { + // dynamicPublicPath default to true, so we can work with nonempty pathbases (virtual directories) + hmrClientOptions[dynamicPublicPathKey] = true; + } else { + // ... but you can set it to any other value explicitly if you want (e.g., false) + hmrClientOptions[dynamicPublicPathKey] = JSON.parse(hmrClientOptions[dynamicPublicPathKey]); + } + + attachWebpackDevMiddleware(app, webpackConfig, enableHotModuleReplacement, enableReactHotModuleReplacement, hmrClientOptions, hmrServerEndpoint); + } + }); + + // Tell the ASP.NET app what addresses we're listening on, so that it can proxy requests here + callback(null, { + Port: listener.address().port, + PublicPaths: normalizedPublicPaths + }); + } catch (ex) { + callback(ex.stack, null); + } + }); + }, + err => callback(err.stack, null) + ); +} + +function removeLeadingSlash(str: string) { + if (str.indexOf('/') === 0) { + str = str.substring(1); + } + + return str; } function removeTrailingSlash(str: string) { diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/WebpackTestPermissions.ts b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/WebpackTestPermissions.ts new file mode 100644 index 00000000..57476147 --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/WebpackTestPermissions.ts @@ -0,0 +1,58 @@ +import * as fs from 'fs'; +import * as path from 'path'; +const isWindows = /^win/.test(process.platform); + +// On Windows, Node (still as of v8.1.3) has an issue whereby, when locating JavaScript modules +// on disk, it walks up the directory hierarchy to the disk root, testing whether each directory +// is a symlink or not. This fails with an exception if the process doesn't have permission to +// read those directories. This is a problem when hosting in full IIS, because in typical cases +// the process does not have read permission for higher-level directories. +// +// NodeServices itself works around this by injecting a patched version of Node's 'lstat' API that +// suppresses these irrelevant errors during module loads. This covers most scenarios, but isn't +// enough to make Webpack dev middleware work, because typical Webpack configs use loaders such as +// 'awesome-typescript-loader', which works by forking a child process to do some of its work. The +// child process does not get the patched 'lstat', and hence fails. It's an especially bad failure, +// because the Webpack compiler doesn't even surface the exception - it just never completes the +// compilation process, causing the application to hang indefinitely. +// +// Additionally, Webpack dev middleware will want to write its output to disk, which is also going +// to fail in a typical IIS process, because you won't have 'write' permission to the app dir by +// default. We have to actually write the build output to disk (and not purely keep it in the in- +// memory file system) because the server-side prerendering Node instance is a separate process +// that only knows about code changes when it sees the compiled files on disk change. +// +// In the future, we'll hopefully get Node to fix its underlying issue, and figure out whether VS +// could give 'write' access to the app dir when launching sites in IIS. But until then, disable +// Webpack dev middleware if we detect the server process doesn't have the necessary permissions. + +export function hasSufficientPermissions() { + if (isWindows) { + return canReadDirectoryAndAllAncestors(process.cwd()); + } else { + return true; + } +} + +function canReadDirectoryAndAllAncestors(dir: string): boolean { + if (!canReadDirectory(dir)) { + return false; + } + + const parentDir = path.resolve(dir, '..'); + if (parentDir === dir) { + // There are no more parent directories - we've reached the disk root + return true; + } else { + return canReadDirectoryAndAllAncestors(parentDir); + } +} + +function canReadDirectory(dir: string): boolean { + try { + fs.statSync(dir); + return true; + } catch(ex) { + return false; + } +} diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/tsconfig.json b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/tsconfig.json index 2ebeb45d..edd184de 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/tsconfig.json +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/tsconfig.json @@ -5,7 +5,8 @@ "target": "es5", "declaration": true, "outDir": ".", - "lib": ["es2015"] + "lib": ["es2015"], + "types": ["node"] }, "files": [ "src/index.ts" diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/package.json b/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/package.json index f00b165b..b22be854 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/package.json +++ b/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/package.json @@ -1,6 +1,6 @@ { "name": "domain-task", - "version": "2.0.1", + "version": "3.0.3", "description": "Tracks outstanding operations for a logical thread of execution", "main": "index.js", "scripts": { @@ -18,12 +18,12 @@ }, "dependencies": { "domain-context": "^0.5.1", + "is-absolute-url": "^2.1.0", "isomorphic-fetch": "^2.2.1" }, "devDependencies": { "@types/node": "^6.0.42", - "@types/whatwg-fetch": "0.0.31", "rimraf": "^2.5.4", - "typescript": "^2.0.0" + "typescript": "^2.2.1" } } diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/fetch.ts b/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/fetch.ts index 3b2c93e8..fa576cf6 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/fetch.ts +++ b/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/fetch.ts @@ -1,19 +1,22 @@ import * as url from 'url'; import * as domain from 'domain'; import * as domainContext from 'domain-context'; +import * as isAbsoluteUrl from 'is-absolute-url'; +import { baseUrl } from './main'; const isomorphicFetch = require('isomorphic-fetch'); const isNode = typeof process === 'object' && process.versions && !!process.versions.node; - -// Not using a symbol, because this may need to run in a version of Node.js that doesn't support them -const domainTaskStateKey = '__DOMAIN_TASK_INTERNAL_FETCH_BASEURL__DO_NOT_REFERENCE_THIS__'; -let noDomainBaseUrl: string; +const nodeHttps = isNode && require('https'); +const isHttpsRegex = /^https\:/; function issueRequest(baseUrl: string, req: string | Request, init?: RequestInit): Promise { + const reqUrl = (req instanceof Request) ? req.url : req; + const isRelativeUrl = reqUrl && !isAbsoluteUrl(reqUrl); + // Resolve relative URLs if (baseUrl) { if (req instanceof Request) { const reqAsRequest = req as Request; - reqAsRequest.url = url.resolve(baseUrl, reqAsRequest.url); + (reqAsRequest as any).url = url.resolve(baseUrl, reqAsRequest.url); } else { req = url.resolve(baseUrl, req as string); } @@ -28,16 +31,43 @@ function issueRequest(baseUrl: string, req: string | Request, init?: RequestInit `); } - // Currently, some part of ASP.NET (perhaps just Kestrel on Mac - unconfirmed) doesn't complete - // its responses if we send 'Connection: close', which is the default. So if no 'Connection' header - // has been specified explicitly, use 'Connection: keep-alive'. - init = init || {}; - init.headers = init.headers || {}; - if (!init.headers['Connection']) { - init.headers['Connection'] = 'keep-alive'; + init = applyHttpsAgentPolicy(init, isRelativeUrl, baseUrl); + return isomorphicFetch(req, init); +} + +function applyHttpsAgentPolicy(init: RequestInit, isRelativeUrl: boolean, baseUrl: string): RequestInit { + // HTTPS is awkward in Node because it uses a built-in list of CAs, rather than recognizing + // the OS's system-level CA list. There are dozens of issues filed against Node about this, + // but still (as of v8.0.0) no resolution besides manually duplicating your CA config. + // + // The biggest problem for typical isomorphic-SPA development this causes is that if you're + // using a self-signed localhost cert in development, Node won't be able to make API calls + // to it (e.g., https://github.com/aspnet/JavaScriptServices/issues/1089). Developers could + // fix this by either manually configuring the cert in Node (which is extremely inconvenient, + // especially if multiple devs on a team have different self-signed localhost certs), or by + // disabling cert verification on their API requests. + // + // Fortunately, 'domain-task/fetch' knows when you're making a relative-URL request to your + // own web server (as opposed to an arbitrary request to anywhere else). In this specific case, + // there's no real point in cert verification, since the request never even leaves the machine + // so a MitM attack isn't meaningful. So by default, when your code is running in Node and + // is making a relative-URL request, *and* if you haven't explicitly configured any option + // for 'agent' (which would let you set up other HTTPS-handling policies), then we automatically + // disable cert verification for that request. + if (isNode && isRelativeUrl) { + const isHttps = baseUrl && isHttpsRegex.test(baseUrl); + if (isHttps) { + const hasAgentConfig = init && ('agent' in init); + if (!hasAgentConfig) { + const agentForRequest = new (nodeHttps.Agent)({ rejectUnauthorized: false }); + + init = init || {}; + (init as any).agent = agentForRequest; + } + } } - return isomorphicFetch(req, init); + return init; } export function fetch(url: string | Request, init?: RequestInit): Promise { @@ -70,16 +100,6 @@ export function fetch(url: string | Request, init?: RequestInit): Promise { return issueRequest(baseUrl(), url, init); } -export function baseUrl(url?: string): string { - if (url) { - if (domain.active) { - // There's an active domain (e.g., in Node.js), so associate the base URL with it - domainContext.set(domainTaskStateKey, url); - } else { - // There's no active domain (e.g., in browser), so there's just one shared base URL - noDomainBaseUrl = url; - } - } - - return domain.active ? domainContext.get(domainTaskStateKey) : noDomainBaseUrl; -} +// Re-exporting baseUrl from this module for back-compatibility only +// Newer code that wants to access baseUrl should use the version exported from the root of this package +export { baseUrl } from './main'; diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/index.ts b/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/index.ts index 78f0c17c..b6cb2ab2 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/index.ts +++ b/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/index.ts @@ -1,3 +1,3 @@ // This file determines the top-level package exports -export { addTask, run } from './main'; +export { addTask, run, baseUrl } from './main'; export { fetch } from './fetch'; diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/main.ts b/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/main.ts index ee74d73d..0a944d0c 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/main.ts +++ b/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/main.ts @@ -1,8 +1,13 @@ import * as domain from 'domain'; import * as domainContext from 'domain-context'; + +// Not using symbols, because this may need to run in a version of Node.js that doesn't support them const domainTasksStateKey = '__DOMAIN_TASKS'; +const domainTaskBaseUrlStateKey = '__DOMAIN_TASK_INTERNAL_FETCH_BASEURL__DO_NOT_REFERENCE_THIS__'; + +let noDomainBaseUrl: string; -export function addTask(task: PromiseLike) { +export function addTask(task: PromiseLike): PromiseLike { if (task && domain.active) { const state = domainContext.get(domainTasksStateKey) as DomainTasksState; if (state) { @@ -27,6 +32,8 @@ export function addTask(task: PromiseLike) { }); } } + + return task; } export function run(codeToRun: () => T, completionCallback: (error: any) => void): T { @@ -57,6 +64,20 @@ export function run(codeToRun: () => T, completionCallback: (error: any) => v return synchronousResult; } +export function baseUrl(url?: string): string { + if (url) { + if (domain.active) { + // There's an active domain (e.g., in Node.js), so associate the base URL with it + domainContext.set(domainTaskBaseUrlStateKey, url); + } else { + // There's no active domain (e.g., in browser), so there's just one shared base URL + noDomainBaseUrl = url; + } + } + + return domain.active ? domainContext.get(domainTaskBaseUrlStateKey) : noDomainBaseUrl; +} + interface DomainTasksState { numRemainingTasks: number; hasIssuedSuccessCallback: boolean; diff --git a/src/Microsoft.AspNetCore.SpaServices/package-lock.json b/src/Microsoft.AspNetCore.SpaServices/package-lock.json new file mode 100644 index 00000000..f3682c16 --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/package-lock.json @@ -0,0 +1,4230 @@ +{ + "name": "spaservices", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.9.2.tgz", + "integrity": "sha512-pwZnkVyCGJ3LsQ0/3flQK5lCFao4esIzwUVzzk5NvL9vnkEyDhNf4fhHzUMHvyr56gNZywWTS2MR0euabMSz4A==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.5.13.tgz", + "integrity": "sha512-49nwvW/Hx9i+OYHg+mRhKZfAlqThr11Dqz8TsrvqGKMhdI2ijy3KBJOun2Z4770TPjrIJhR6KxChQIDaz8clDA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.5.13", + "@webassemblyjs/helper-wasm-bytecode": "1.5.13", + "@webassemblyjs/wast-parser": "1.5.13", + "debug": "3.1.0", + "mamacro": "0.0.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.13.tgz", + "integrity": "sha512-vrvvB18Kh4uyghSKb0NTv+2WZx871WL2NzwMj61jcq2bXkyhRC+8Q0oD7JGVf0+5i/fKQYQSBCNMMsDMRVAMqA==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.13.tgz", + "integrity": "sha512-dBh2CWYqjaDlvMmRP/kudxpdh30uXjIbpkLj9HQe+qtYlwvYjPRjdQXrq1cTAAOUSMTtzqbXIxEdEZmyKfcwsg==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.13.tgz", + "integrity": "sha512-v7igWf1mHcpJNbn4m7e77XOAWXCDT76Xe7Is1VQFXc4K5jRcFrl9D0NrqM4XifQ0bXiuTSkTKMYqDxu5MhNljA==", + "dev": true, + "requires": { + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.13.tgz", + "integrity": "sha512-yN6ScQQDFCiAXnVctdVO/J5NQRbwyTbQzsGzEgXsAnrxhjp0xihh+nNHQTMrq5UhOqTb5LykpJAvEv9AT0jnAQ==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.5.13" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.13.tgz", + "integrity": "sha512-hSIKzbXjVMRvy3Jzhgu+vDd/aswJ+UMEnLRCkZDdknZO3Z9e6rp1DAs0tdLItjCFqkz9+0BeOPK/mk3eYvVzZg==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.13.tgz", + "integrity": "sha512-zxJXULGPLB7r+k+wIlvGlXpT4CYppRz8fLUM/xobGHc9Z3T6qlmJD9ySJ2jknuktuuiR9AjnNpKYDECyaiX+QQ==", + "dev": true, + "requires": { + "debug": "3.1.0", + "mamacro": "0.0.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.13.tgz", + "integrity": "sha512-0n3SoNGLvbJIZPhtMFq0XmmnA/YmQBXaZKQZcW8maGKwLpVcgjNrxpFZHEOLKjXJYVN5Il8vSfG7nRX50Zn+aw==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.13.tgz", + "integrity": "sha512-IJ/goicOZ5TT1axZFSnlAtz4m8KEjYr12BNOANAwGFPKXM4byEDaMNXYowHMG0yKV9a397eU/NlibFaLwr1fbw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-buffer": "1.5.13", + "@webassemblyjs/helper-wasm-bytecode": "1.5.13", + "@webassemblyjs/wasm-gen": "1.5.13", + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/ieee754": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.5.13.tgz", + "integrity": "sha512-TseswvXEPpG5TCBKoLx9tT7+/GMACjC1ruo09j46ULRZWYm8XHpDWaosOjTnI7kr4SRJFzA6MWoUkAB+YCGKKg==", + "dev": true, + "requires": { + "ieee754": "1.1.12" + } + }, + "@webassemblyjs/leb128": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.5.13.tgz", + "integrity": "sha512-0NRMxrL+GG3eISGZBmLBLAVjphbN8Si15s7jzThaw1UE9e5BY1oH49/+MA1xBzxpf1OW5sf9OrPDOclk9wj2yg==", + "dev": true, + "requires": { + "long": "4.0.0" + }, + "dependencies": { + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "dev": true + } + } + }, + "@webassemblyjs/utf8": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.5.13.tgz", + "integrity": "sha512-Ve1ilU2N48Ew0lVGB8FqY7V7hXjaC4+PeZM+vDYxEd+R2iQ0q+Wb3Rw8v0Ri0+rxhoz6gVGsnQNb4FjRiEH/Ng==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.13.tgz", + "integrity": "sha512-X7ZNW4+Hga4f2NmqENnHke2V/mGYK/xnybJSIXImt1ulxbCOEs/A+ZK/Km2jgihjyVxp/0z0hwIcxC6PrkWtgw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-buffer": "1.5.13", + "@webassemblyjs/helper-wasm-bytecode": "1.5.13", + "@webassemblyjs/helper-wasm-section": "1.5.13", + "@webassemblyjs/wasm-gen": "1.5.13", + "@webassemblyjs/wasm-opt": "1.5.13", + "@webassemblyjs/wasm-parser": "1.5.13", + "@webassemblyjs/wast-printer": "1.5.13", + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.13.tgz", + "integrity": "sha512-yfv94Se8R73zmr8GAYzezFHc3lDwE/lBXQddSiIZEKZFuqy7yWtm3KMwA1uGbv5G1WphimJxboXHR80IgX1hQA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-wasm-bytecode": "1.5.13", + "@webassemblyjs/ieee754": "1.5.13", + "@webassemblyjs/leb128": "1.5.13", + "@webassemblyjs/utf8": "1.5.13" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.13.tgz", + "integrity": "sha512-IkXSkgzVhQ0QYAdIayuCWMmXSYx0dHGU8Ah/AxJf1gBvstMWVnzJnBwLsXLyD87VSBIcsqkmZ28dVb0mOC3oBg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-buffer": "1.5.13", + "@webassemblyjs/wasm-gen": "1.5.13", + "@webassemblyjs/wasm-parser": "1.5.13", + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.13.tgz", + "integrity": "sha512-XnYoIcu2iqq8/LrtmdnN3T+bRjqYFjRHqWbqK3osD/0r/Fcv4d9ecRzjVtC29ENEuNTK4mQ9yyxCBCbK8S/cpg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-api-error": "1.5.13", + "@webassemblyjs/helper-wasm-bytecode": "1.5.13", + "@webassemblyjs/ieee754": "1.5.13", + "@webassemblyjs/leb128": "1.5.13", + "@webassemblyjs/utf8": "1.5.13" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.5.13.tgz", + "integrity": "sha512-Lbz65T0LQ1LgzKiUytl34CwuhMNhaCLgrh0JW4rJBN6INnBB8NMwUfQM+FxTnLY9qJ+lHJL/gCM5xYhB9oWi4A==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/floating-point-hex-parser": "1.5.13", + "@webassemblyjs/helper-api-error": "1.5.13", + "@webassemblyjs/helper-code-frame": "1.5.13", + "@webassemblyjs/helper-fsm": "1.5.13", + "long": "3.2.0", + "mamacro": "0.0.3" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.5.13.tgz", + "integrity": "sha512-QcwogrdqcBh8Z+eUF8SG+ag5iwQSXxQJELBEHmLkk790wgQgnIMmntT2sMAMw53GiFNckArf5X0bsCA44j3lWQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/wast-parser": "1.5.13", + "long": "3.2.0" + } + }, + "acorn": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.2.tgz", + "integrity": "sha512-cJrKCNcr2kv8dlDnbw+JPUGjHZzo4myaxOLmpOX8a+rgX94YeTcTMv/LFJUSByRpc+i4GgVnnhLxvMu/2Y+rqw==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", + "dev": true, + "requires": { + "acorn": "5.7.2" + } + }, + "ajv": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", + "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", + "dev": true, + "requires": { + "fast-deep-equal": "2.0.1", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.4.1", + "uri-js": "4.2.2" + } + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "dev": true + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.3" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "3.1.10", + "normalize-path": "2.1.1" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.3", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.2" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "1.2.0", + "browserify-des": "1.0.2", + "evp_bytestokey": "1.0.3" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3", + "safe-buffer": "5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "randombytes": "2.0.6" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "elliptic": "6.4.1", + "inherits": "2.0.3", + "parse-asn1": "5.1.1" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "1.0.6" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "1.3.0", + "ieee754": "1.1.12", + "isarray": "1.0.0" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "cacache": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "dev": true, + "requires": { + "bluebird": "3.5.1", + "chownr": "1.0.1", + "glob": "7.1.3", + "graceful-fs": "4.1.11", + "lru-cache": "4.1.3", + "mississippi": "2.0.0", + "mkdirp": "0.5.1", + "move-concurrently": "1.0.1", + "promise-inflight": "1.0.1", + "rimraf": "2.6.2", + "ssri": "5.3.0", + "unique-filename": "1.1.0", + "y18n": "4.0.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.5.0" + } + }, + "chardet": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.5.0.tgz", + "integrity": "sha512-9ZTaoBaePSCFvNlNGrsyI8ZVACP2svUtq0DkM7t4K2ClAa96sqOIRjAzDTc8zXzFt1cZR46rRzLTiHFSJ+Qw0g==", + "dev": true + }, + "chokidar": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "dev": true, + "requires": { + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.2", + "fsevents": "1.2.4", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "lodash.debounce": "4.0.8", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.1.0" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", + "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", + "dev": true, + "requires": { + "tslib": "1.9.3" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.2" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "typedarray": "0.0.6" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "1.2.0", + "fs-write-stream-atomic": "1.0.10", + "iferr": "0.1.5", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "elliptic": "6.4.1" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "md5.js": "1.3.4", + "ripemd160": "2.0.2", + "sha.js": "2.4.11" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "inherits": "2.0.3", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.2", + "sha.js": "2.4.11" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "1.0.5", + "path-key": "2.0.1", + "semver": "5.5.1", + "shebang-command": "1.2.0", + "which": "1.3.1" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "1.0.1", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.3", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "diffie-hellman": "5.0.3", + "inherits": "2.0.3", + "pbkdf2": "3.0.16", + "public-encrypt": "4.0.2", + "randombytes": "2.0.6", + "randomfill": "1.0.4" + } + }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", + "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", + "dev": true, + "requires": { + "xregexp": "4.0.0" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.6" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "duplexify": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", + "dev": true, + "requires": { + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "stream-shift": "1.0.0" + } + }, + "elliptic": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.5", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", + "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "memory-fs": "0.4.1", + "tapable": "1.0.0" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "1.0.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint-scope": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "dev": true, + "requires": { + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "1.3.4", + "safe-buffer": "5.1.2" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.3", + "shebang-command": "1.2.0", + "which": "1.3.1" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "external-editor": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.1.tgz", + "integrity": "sha512-e1neqvSt5pSwQcFnYc6yfGuJD2Q4336cdbHs5VeUO0zTkqPbrHMyw2q1r47fpfLWbvIG8H8A6YO3sck7upTV6Q==", + "dev": true, + "requires": { + "chardet": "0.5.0", + "iconv-lite": "0.4.24", + "tmp": "0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "1.0.1", + "make-dir": "1.3.0", + "pkg-dir": "2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.6" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.6" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "iferr": "0.1.5", + "imurmurhash": "0.1.4", + "readable-stream": "2.3.6" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.11.0", + "node-pre-gyp": "0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.0", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.7", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.5" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.5.1", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + } + } + }, + "global-modules-path": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/global-modules-path/-/global-modules-path-2.3.0.tgz", + "integrity": "sha512-HchvMJNYh9dGSCy8pOQ2O8u/hoXaL+0XhnrwH0RyLiSXMMTl9W3N6KUU73+JFOg5PGjtzl6VZzUQsnrpm7Szag==", + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.2" + } + }, + "hash.js": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", + "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "1.1.5", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "import-local": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", + "dev": true, + "requires": { + "pkg-dir": "2.0.0", + "resolve-cwd": "2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "inquirer": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", + "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", + "dev": true, + "requires": { + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "3.0.1", + "figures": "2.0.0", + "lodash": "4.17.10", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rxjs": "6.2.2", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "1.11.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "dev": true + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", + "dev": true + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "3.0.0" + } + }, + "mamacro": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", + "dev": true + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "1.0.1" + } + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "1.2.0" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "0.1.7", + "readable-stream": "2.3.6" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.13", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mississippi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "dev": true, + "requires": { + "concat-stream": "1.6.2", + "duplexify": "3.6.0", + "end-of-stream": "1.4.1", + "flush-write-stream": "1.0.3", + "from2": "2.3.0", + "parallel-transform": "1.1.0", + "pump": "2.0.1", + "pumpify": "1.5.1", + "stream-each": "1.2.3", + "through2": "2.0.3" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "1.2.0", + "copy-concurrently": "1.0.5", + "fs-write-stream-atomic": "1.0.10", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz", + "integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "neo-async": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.2.tgz", + "integrity": "sha512-vdqTKI9GBIYcAEbFAcpKPErKINfPF5zIuz3/niBfq8WUZjpT2tytLlFVrBgWdOtqI4uaA/Rb6No0hux39XXDuw==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "dev": true, + "requires": { + "assert": "1.4.1", + "browserify-zlib": "0.2.0", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "domain-browser": "1.2.0", + "events": "1.1.1", + "https-browserify": "1.0.0", + "os-browserify": "0.3.0", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.6", + "stream-browserify": "2.0.1", + "stream-http": "2.8.3", + "string_decoder": "1.1.1", + "timers-browserify": "2.0.10", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.4", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "1.2.0" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.3.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, + "requires": { + "cyclist": "0.2.2", + "inherits": "2.0.3", + "readable-stream": "2.3.6" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "dev": true, + "requires": { + "asn1.js": "4.10.1", + "browserify-aes": "1.2.0", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.16" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "dev": true, + "requires": { + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.2", + "sha.js": "2.4.11" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "2.1.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "parse-asn1": "5.1.1", + "randombytes": "2.0.6" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "1.4.1", + "once": "1.4.0" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "3.6.0", + "inherits": "2.0.3", + "pump": "2.0.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "2.0.6", + "safe-buffer": "5.1.2" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "2.1.0" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "1.2.0" + } + }, + "rxjs": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.2.tgz", + "integrity": "sha512-0MI8+mkKAXZUF9vMrEoPnaoHkfzBPP4IGwUYRJhIRJF6/w3uByO1e91bEHn8zd43RdkTMKiooYKmwz7RH6zfOQ==", + "dev": true, + "requires": { + "tslib": "1.9.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "0.1.15" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "schema-utils": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", + "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", + "dev": true, + "requires": { + "ajv": "6.5.3", + "ajv-keywords": "3.2.0" + } + }, + "semver": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "dev": true + }, + "serialize-javascript": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.2" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.2", + "use": "3.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "2.1.2", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "3.0.2" + } + }, + "ssri": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.6" + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "1.4.1", + "stream-shift": "1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + }, + "tapable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "2.3.6", + "xtend": "4.0.1" + } + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "requires": { + "setimmediate": "1.0.5" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + } + }, + "ts-loader": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-4.5.0.tgz", + "integrity": "sha512-ihgVaSmgrX4crGV4n7yuoHPoCHbDzj9aepCZR9TgIx4SgJ9gdnB6xLHgUBb7bsFM/f0K6x9iXa65KY/Fu1Klkw==", + "dev": true, + "requires": { + "chalk": "2.4.1", + "enhanced-resolve": "4.1.0", + "loader-utils": "1.1.0", + "micromatch": "3.1.10", + "semver": "5.5.1" + } + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typescript": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.0.1.tgz", + "integrity": "sha512-zQIMOmC+372pC/CCVLqnQ0zSBiY7HHodU7mpQdjiZddek4GMj31I3dUJ7gAs9o65X7mnRma6OokOkc6f9jjfBg==", + "dev": true + }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "dev": true, + "requires": { + "commander": "2.13.0", + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "uglifyjs-webpack-plugin": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", + "integrity": "sha512-ovHIch0AMlxjD/97j9AYovZxG5wnHOPkL7T1GKochBADp/Zwc44pEWNqpKl1Loupp1WhFg7SlYmHZRUfdAacgw==", + "dev": true, + "requires": { + "cacache": "10.0.4", + "find-cache-dir": "1.0.0", + "schema-utils": "0.4.7", + "serialize-javascript": "1.5.0", + "source-map": "0.6.1", + "uglify-es": "3.3.9", + "webpack-sources": "1.1.0", + "worker-farm": "1.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + } + } + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "dev": true, + "requires": { + "unique-slug": "2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "dev": true, + "requires": { + "imurmurhash": "0.1.4" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "2.1.1" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "v8-compile-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz", + "integrity": "sha512-1wFuMUIM16MDJRCrpbpuEPTUGmM5QMUg0cr3KFwra2XgOgFcPGDQHDh3CszSCD2Zewc/dh/pamNEW8CbfDebUw==", + "dev": true + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "2.0.4", + "graceful-fs": "4.1.11", + "neo-async": "2.5.2" + } + }, + "webpack": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.17.1.tgz", + "integrity": "sha512-vdPYogljzWPhFKDj3Gcp01Vqgu7K3IQlybc3XIdKSQHelK1C3eIQuysEUR7MxKJmdandZlQB/9BG2Jb1leJHaw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-module-context": "1.5.13", + "@webassemblyjs/wasm-edit": "1.5.13", + "@webassemblyjs/wasm-opt": "1.5.13", + "@webassemblyjs/wasm-parser": "1.5.13", + "acorn": "5.7.2", + "acorn-dynamic-import": "3.0.0", + "ajv": "6.5.3", + "ajv-keywords": "3.2.0", + "chrome-trace-event": "1.0.0", + "enhanced-resolve": "4.1.0", + "eslint-scope": "4.0.0", + "json-parse-better-errors": "1.0.2", + "loader-runner": "2.3.0", + "loader-utils": "1.1.0", + "memory-fs": "0.4.1", + "micromatch": "3.1.10", + "mkdirp": "0.5.1", + "neo-async": "2.5.2", + "node-libs-browser": "2.1.0", + "schema-utils": "0.4.7", + "tapable": "1.0.0", + "uglifyjs-webpack-plugin": "1.3.0", + "watchpack": "1.6.0", + "webpack-sources": "1.1.0" + } + }, + "webpack-cli": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.0.tgz", + "integrity": "sha512-p5NeKDtYwjZozUWq6kGNs9w+Gtw/CPvyuXjXn2HMdz8Tie+krjEg8oAtonvIyITZdvpF7XG9xDHwscLr2c+ugQ==", + "dev": true, + "requires": { + "chalk": "2.4.1", + "cross-spawn": "6.0.5", + "enhanced-resolve": "4.1.0", + "global-modules-path": "2.3.0", + "import-local": "1.0.0", + "inquirer": "6.2.0", + "interpret": "1.1.0", + "loader-utils": "1.1.0", + "supports-color": "5.5.0", + "v8-compile-cache": "2.0.2", + "yargs": "12.0.1" + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", + "dev": true, + "requires": { + "source-list-map": "2.0.0", + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, + "requires": { + "errno": "0.1.7" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xregexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", + "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.1.tgz", + "integrity": "sha512-B0vRAp1hRX4jgIOWFtjfNjd9OA9RWYZ6tqGA9/I/IrTMsxmKvtWy+ersM+jzpQqbC3YfLzeABPdeTgcJ9eu1qQ==", + "dev": true, + "requires": { + "cliui": "4.1.0", + "decamelize": "2.0.0", + "find-up": "3.0.0", + "get-caller-file": "1.0.3", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "4.0.0", + "yargs-parser": "10.1.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "3.0.0", + "path-exists": "3.0.0" + } + }, + "p-limit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", + "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "dev": true, + "requires": { + "p-try": "2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + } + } + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "4.1.0" + } + } + } +} diff --git a/src/Microsoft.AspNetCore.SpaServices/package.json b/src/Microsoft.AspNetCore.SpaServices/package.json new file mode 100644 index 00000000..7ee819c7 --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/package.json @@ -0,0 +1,19 @@ +{ + "name": "spaservices", + "version": "1.0.0", + "description": "This is not really an NPM package and will not be published. This file exists only to reference compilation tools.", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "webpack --mode production" + }, + "author": "Microsoft", + "license": "Apache-2.0", + "devDependencies": { + "@types/node": "^10.9.2", + "ts-loader": "^4.5.0", + "typescript": "^3.0.1", + "webpack": "^4.17.1", + "webpack-cli": "^3.1.0" + } +} diff --git a/src/Microsoft.AspNetCore.SpaServices/project.json b/src/Microsoft.AspNetCore.SpaServices/project.json deleted file mode 100644 index 38ababb7..00000000 --- a/src/Microsoft.AspNetCore.SpaServices/project.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "1.0.0-*", - "description": "Helpers for building single-page applications on ASP.NET MVC Core", - "compilationOptions": { - "keyFile": "../../tools/Key.snk" - }, - "authors": [ - "Microsoft" - ], - "dependencies": { - "Microsoft.AspNetCore.Mvc": "1.0.1", - "Microsoft.AspNetCore.NodeServices": "1.0.0-*" - }, - "frameworks": { - "net451": { - }, - "netstandard1.6": { - "imports": [ - "dotnet5.6", - "dnxcore50", - "portable-net45+win8" - ] - } - }, - "buildOptions": { - "embed": [ - "Content/**/*" - ] - } -} diff --git a/src/Microsoft.AspNetCore.SpaServices/webpack.config.js b/src/Microsoft.AspNetCore.SpaServices/webpack.config.js new file mode 100644 index 00000000..e2d4c5d6 --- /dev/null +++ b/src/Microsoft.AspNetCore.SpaServices/webpack.config.js @@ -0,0 +1,31 @@ +const path = require('path'); + +module.exports = { + target: 'node', + externals: [ + // These NPM modules are loaded dynamically at runtime, rather than being bundled into the Content/Node/*.js files + // So, at runtime, they have to either be in node_modules or be built-in Node modules (e.g., 'fs') + 'aspnet-prerendering', + 'aspnet-webpack' + ], + resolve: { + extensions: [ '.ts' ] + }, + module: { + rules: [ + { test: /\.ts$/, use: 'ts-loader' }, + ] + }, + entry: { + 'prerenderer': ['./TypeScript/Prerenderer'], + 'webpack-dev-middleware': ['./TypeScript/WebpackDevMiddleware'], + }, + output: { + libraryTarget: 'commonjs', + path: path.join(__dirname, 'Content', 'Node'), + filename: '[name].js' + }, + optimization: { + minimize: false + } +}; diff --git a/templates/Angular2Spa/Angular2Spa.xproj b/templates/Angular2Spa/Angular2Spa.xproj deleted file mode 100644 index 3f02ad9d..00000000 --- a/templates/Angular2Spa/Angular2Spa.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - true - - - - 8f5cb8a9-3086-4b49-a1c2-32a9f89bca11 - Angular2Spa - .\obj - .\bin\ - v4.5.2 - - - 2.0 - - - \ No newline at end of file diff --git a/templates/Angular2Spa/ClientApp/app/app.module.ts b/templates/Angular2Spa/ClientApp/app/app.module.ts deleted file mode 100644 index 6d912da0..00000000 --- a/templates/Angular2Spa/ClientApp/app/app.module.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { UniversalModule } from 'angular2-universal'; -import { AppComponent } from './components/app/app.component' -import { NavMenuComponent } from './components/navmenu/navmenu.component'; -import { HomeComponent } from './components/home/home.component'; -import { FetchDataComponent } from './components/fetchdata/fetchdata.component'; -import { CounterComponent } from './components/counter/counter.component'; - -@NgModule({ - bootstrap: [ AppComponent ], - declarations: [ - AppComponent, - NavMenuComponent, - CounterComponent, - FetchDataComponent, - HomeComponent - ], - imports: [ - UniversalModule, // Must be first import. This automatically imports BrowserModule, HttpModule, and JsonpModule too. - RouterModule.forRoot([ - { path: '', redirectTo: 'home', pathMatch: 'full' }, - { path: 'home', component: HomeComponent }, - { path: 'counter', component: CounterComponent }, - { path: 'fetch-data', component: FetchDataComponent }, - { path: '**', redirectTo: 'home' } - ]) - ] -}) -export class AppModule { -} diff --git a/templates/Angular2Spa/ClientApp/app/components/app/app.component.css b/templates/Angular2Spa/ClientApp/app/components/app/app.component.css deleted file mode 100644 index 63926006..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/app/app.component.css +++ /dev/null @@ -1,6 +0,0 @@ -@media (max-width: 767px) { - /* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */ - .body-content { - padding-top: 50px; - } -} diff --git a/templates/Angular2Spa/ClientApp/app/components/app/app.component.html b/templates/Angular2Spa/ClientApp/app/components/app/app.component.html deleted file mode 100644 index f208d1e8..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/app/app.component.html +++ /dev/null @@ -1,10 +0,0 @@ -
    -
    -
    - -
    -
    - -
    -
    -
    diff --git a/templates/Angular2Spa/ClientApp/app/components/app/app.component.ts b/templates/Angular2Spa/ClientApp/app/components/app/app.component.ts deleted file mode 100644 index b20a1aed..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/app/app.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { -} diff --git a/templates/Angular2Spa/ClientApp/app/components/counter/counter.component.html b/templates/Angular2Spa/ClientApp/app/components/counter/counter.component.html deleted file mode 100644 index 4d1dfd99..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/counter/counter.component.html +++ /dev/null @@ -1,7 +0,0 @@ -

    Counter

    - -

    This is a simple example of an Angular 2 component.

    - -

    Current count: {{ currentCount }}

    - - diff --git a/templates/Angular2Spa/ClientApp/app/components/counter/counter.component.ts b/templates/Angular2Spa/ClientApp/app/components/counter/counter.component.ts deleted file mode 100644 index 69de17d9..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/counter/counter.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'counter', - templateUrl: './counter.component.html' -}) -export class CounterComponent { - public currentCount = 0; - - public incrementCounter() { - this.currentCount++; - } -} diff --git a/templates/Angular2Spa/ClientApp/app/components/fetchdata/fetchdata.component.html b/templates/Angular2Spa/ClientApp/app/components/fetchdata/fetchdata.component.html deleted file mode 100644 index 8d24e710..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/fetchdata/fetchdata.component.html +++ /dev/null @@ -1,24 +0,0 @@ -

    Weather forecast

    - -

    This component demonstrates fetching data from the server.

    - -

    Loading...

    - - - - - - - - - - - - - - - - - - -
    DateTemp. (C)Temp. (F)Summary
    {{ forecast.dateFormatted }}{{ forecast.temperatureC }}{{ forecast.temperatureF }}{{ forecast.summary }}
    diff --git a/templates/Angular2Spa/ClientApp/app/components/fetchdata/fetchdata.component.ts b/templates/Angular2Spa/ClientApp/app/components/fetchdata/fetchdata.component.ts deleted file mode 100644 index e213bae5..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/fetchdata/fetchdata.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Component } from '@angular/core'; -import { Http } from '@angular/http'; - -@Component({ - selector: 'fetchdata', - templateUrl: './fetchdata.component.html' -}) -export class FetchDataComponent { - public forecasts: WeatherForecast[]; - - constructor(http: Http) { - http.get('/api/SampleData/WeatherForecasts').subscribe(result => { - this.forecasts = result.json(); - }); - } -} - -interface WeatherForecast { - dateFormatted: string; - temperatureC: number; - temperatureF: number; - summary: string; -} diff --git a/templates/Angular2Spa/ClientApp/app/components/home/home.component.html b/templates/Angular2Spa/ClientApp/app/components/home/home.component.html deleted file mode 100644 index 034d34eb..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/home/home.component.html +++ /dev/null @@ -1,16 +0,0 @@ -

    Hello, world!

    -

    Welcome to your new single-page application, built with:

    - -

    To help you get started, we've also set up:

    -
      -
    • Client-side navigation. For example, click Counter then Back to return here.
    • -
    • Server-side prerendering. For faster initial loading and improved SEO, your Angular 2 app is prerendered on the server. The resulting HTML is then transferred to the browser where a client-side copy of the app takes over.
    • -
    • Webpack dev middleware. In development mode, there's no need to run the webpack build tool. Your client-side resources are dynamically built on demand. Updates are available as soon as you modify any file.
    • -
    • Hot module replacement. In development mode, you don't even need to reload the page after making most changes. Within seconds of saving changes to files, your Angular 2 app will be rebuilt and a new instance injected is into the page.
    • -
    • Efficient production builds. In production mode, development-time features are disabled, and the webpack build tool produces minified static CSS and JavaScript files.
    • -
    diff --git a/templates/Angular2Spa/ClientApp/app/components/home/home.component.ts b/templates/Angular2Spa/ClientApp/app/components/home/home.component.ts deleted file mode 100644 index 81846cee..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/home/home.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'home', - templateUrl: './home.component.html' -}) -export class HomeComponent { -} diff --git a/templates/Angular2Spa/ClientApp/app/components/navmenu/navmenu.component.css b/templates/Angular2Spa/ClientApp/app/components/navmenu/navmenu.component.css deleted file mode 100644 index e15c6128..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/navmenu/navmenu.component.css +++ /dev/null @@ -1,59 +0,0 @@ -li .glyphicon { - margin-right: 10px; -} - -/* Highlighting rules for nav menu items */ -li.link-active a, -li.link-active a:hover, -li.link-active a:focus { - background-color: #4189C7; - color: white; -} - -/* Keep the nav menu independent of scrolling and on top of other items */ -.main-nav { - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 1; -} - -@media (min-width: 768px) { - /* On small screens, convert the nav menu to a vertical sidebar */ - .main-nav { - height: 100%; - width: calc(25% - 20px); - } - .navbar { - border-radius: 0px; - border-width: 0px; - height: 100%; - } - .navbar-header { - float: none; - } - .navbar-collapse { - border-top: 1px solid #444; - padding: 0px; - } - .navbar ul { - float: none; - } - .navbar li { - float: none; - font-size: 15px; - margin: 6px; - } - .navbar li a { - padding: 10px 16px; - border-radius: 4px; - } - .navbar a { - /* If a menu item's text is too long, truncate it */ - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } -} diff --git a/templates/Angular2Spa/ClientApp/app/components/navmenu/navmenu.component.html b/templates/Angular2Spa/ClientApp/app/components/navmenu/navmenu.component.html deleted file mode 100644 index c49d5097..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/navmenu/navmenu.component.html +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/templates/Angular2Spa/ClientApp/app/components/navmenu/navmenu.component.ts b/templates/Angular2Spa/ClientApp/app/components/navmenu/navmenu.component.ts deleted file mode 100644 index 7a1691cb..00000000 --- a/templates/Angular2Spa/ClientApp/app/components/navmenu/navmenu.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'nav-menu', - templateUrl: './navmenu.component.html', - styleUrls: ['./navmenu.component.css'] -}) -export class NavMenuComponent { -} diff --git a/templates/Angular2Spa/ClientApp/boot-client.ts b/templates/Angular2Spa/ClientApp/boot-client.ts deleted file mode 100644 index 03d73a72..00000000 --- a/templates/Angular2Spa/ClientApp/boot-client.ts +++ /dev/null @@ -1,22 +0,0 @@ -import 'angular2-universal-polyfills/browser'; -import { enableProdMode } from '@angular/core'; -import { platformUniversalDynamic } from 'angular2-universal'; -import { AppModule } from './app/app.module'; -import 'bootstrap'; - -// Enable either Hot Module Reloading or production mode -if (module['hot']) { - module['hot'].accept(); - module['hot'].dispose(() => { platform.destroy(); }); -} else { - enableProdMode(); -} - -// Boot the application, either now or when the DOM content is loaded -const platform = platformUniversalDynamic(); -const bootApplication = () => { platform.bootstrapModule(AppModule); }; -if (document.readyState === 'complete') { - bootApplication(); -} else { - document.addEventListener('DOMContentLoaded', bootApplication); -} diff --git a/templates/Angular2Spa/ClientApp/boot-server.ts b/templates/Angular2Spa/ClientApp/boot-server.ts deleted file mode 100644 index 7ae129ab..00000000 --- a/templates/Angular2Spa/ClientApp/boot-server.ts +++ /dev/null @@ -1,32 +0,0 @@ -import 'angular2-universal-polyfills'; -import 'zone.js'; -import { enableProdMode } from '@angular/core'; -import { platformNodeDynamic } from 'angular2-universal'; -import { AppModule } from './app/app.module'; - -enableProdMode(); -const platform = platformNodeDynamic(); - -export default function (params: any) : Promise<{ html: string, globals?: any }> { - return new Promise((resolve, reject) => { - const requestZone = Zone.current.fork({ - name: 'angular-universal request', - properties: { - baseUrl: '/', - requestUrl: params.url, - originUrl: params.origin, - preboot: false, - document: '' - }, - onHandleError: (parentZone, currentZone, targetZone, error) => { - // If any error occurs while rendering the module, reject the whole operation - reject(error); - return true; - } - }); - - return requestZone.run>(() => platform.serializeModule(AppModule)).then(html => { - resolve({ html: html }); - }, reject); - }); -} diff --git a/templates/Angular2Spa/ClientApp/dist/_placeholder.txt b/templates/Angular2Spa/ClientApp/dist/_placeholder.txt deleted file mode 100644 index b22cc154..00000000 --- a/templates/Angular2Spa/ClientApp/dist/_placeholder.txt +++ /dev/null @@ -1,9 +0,0 @@ ------------------------------------------------------------------- -Don't delete this file. Do include it in your source control repo. ------------------------------------------------------------------- - -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/Angular2Spa/Controllers/HomeController.cs b/templates/Angular2Spa/Controllers/HomeController.cs deleted file mode 100755 index 9d75da88..00000000 --- a/templates/Angular2Spa/Controllers/HomeController.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace WebApplicationBasic.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - - public IActionResult Error() - { - return View(); - } - } -} diff --git a/templates/Angular2Spa/Controllers/SampleDataController.cs b/templates/Angular2Spa/Controllers/SampleDataController.cs deleted file mode 100644 index 0f1aa37a..00000000 --- a/templates/Angular2Spa/Controllers/SampleDataController.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace WebApplicationBasic.Controllers -{ - [Route("api/[controller]")] - public class SampleDataController : Controller - { - private static string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - [HttpGet("[action]")] - public IEnumerable WeatherForecasts() - { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - DateFormatted = DateTime.Now.AddDays(index).ToString("d"), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }); - } - - public class WeatherForecast - { - public string DateFormatted { get; set; } - public int TemperatureC { get; set; } - public string Summary { get; set; } - - public int TemperatureF - { - get - { - return 32 + (int)(TemperatureC / 0.5556); - } - } - } - } -} diff --git a/templates/Angular2Spa/Dockerfile b/templates/Angular2Spa/Dockerfile deleted file mode 100644 index c9bf07c1..00000000 --- a/templates/Angular2Spa/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM microsoft/dotnet:1.0.0-preview2-onbuild - -RUN apt-get update -RUN wget -qO- https://deb.nodesource.com/setup_4.x | bash - -RUN apt-get install -y build-essential nodejs - -WORKDIR /app - -COPY project.json . -RUN ["dotnet", "restore"] - -COPY . /app -RUN ["dotnet", "build"] - -EXPOSE 5000/tcp - -ENTRYPOINT ["dotnet", "run", "--server.urls", "http://0.0.0.0:5000"] diff --git a/templates/Angular2Spa/Program.cs b/templates/Angular2Spa/Program.cs deleted file mode 100644 index b2e5e4b8..00000000 --- a/templates/Angular2Spa/Program.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; - -namespace WebApplicationBasic -{ - public class Program - { - public static void Main(string[] args) - { - var config = new ConfigurationBuilder() - .AddCommandLine(args) - .AddEnvironmentVariables(prefix: "ASPNETCORE_") - .Build(); - - var host = new WebHostBuilder() - .UseConfiguration(config) - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/templates/Angular2Spa/README.md b/templates/Angular2Spa/README.md deleted file mode 100644 index d8ba0b38..00000000 --- a/templates/Angular2Spa/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Welcome to ASP.NET Core - -We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new. - -You've created a new ASP.NET Core project. [Learn what's new](https://go.microsoft.com/fwlink/?LinkId=518016) - -## This application consists of: - -* Sample pages using ASP.NET Core MVC -* [Gulp](https://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](https://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side libraries -* Theming using [Bootstrap](https://go.microsoft.com/fwlink/?LinkID=398939) - -## How to - -* [Add a Controller and View](https://go.microsoft.com/fwlink/?LinkID=398600) -* [Add an appsetting in config and access it in app.](https://go.microsoft.com/fwlink/?LinkID=699562) -* [Manage User Secrets using Secret Manager.](https://go.microsoft.com/fwlink/?LinkId=699315) -* [Use logging to log a message.](https://go.microsoft.com/fwlink/?LinkId=699316) -* [Add packages using NuGet.](https://go.microsoft.com/fwlink/?LinkId=699317) -* [Add client packages using Bower.](https://go.microsoft.com/fwlink/?LinkId=699318) -* [Target development, staging or production environment.](https://go.microsoft.com/fwlink/?LinkId=699319) - -## Overview - -* [Conceptual overview of what is ASP.NET Core](https://go.microsoft.com/fwlink/?LinkId=518008) -* [Fundamentals of ASP.NET Core such as Startup and middleware.](https://go.microsoft.com/fwlink/?LinkId=699320) -* [Working with Data](https://go.microsoft.com/fwlink/?LinkId=398602) -* [Security](https://go.microsoft.com/fwlink/?LinkId=398603) -* [Client side development](https://go.microsoft.com/fwlink/?LinkID=699321) -* [Develop on different platforms](https://go.microsoft.com/fwlink/?LinkID=699322) -* [Read more on the documentation site](https://go.microsoft.com/fwlink/?LinkID=699323) - -## Run & Deploy - -* [Run your app](https://go.microsoft.com/fwlink/?LinkID=517851) -* [Run tools such as EF migrations and more](https://go.microsoft.com/fwlink/?LinkID=517853) -* [Publish to Microsoft Azure Web Apps](https://go.microsoft.com/fwlink/?LinkID=398609) - -We would love to hear your [feedback](https://go.microsoft.com/fwlink/?LinkId=518015) diff --git a/templates/Angular2Spa/Startup.cs b/templates/Angular2Spa/Startup.cs deleted file mode 100755 index e5d73ed6..00000000 --- a/templates/Angular2Spa/Startup.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.SpaServices.Webpack; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace WebApplicationBasic -{ - public class Startup - { - public Startup(IHostingEnvironment env) - { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) - .AddEnvironmentVariables(); - Configuration = builder.Build(); - } - - public IConfigurationRoot Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - // Add framework services. - services.AddMvc(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) - { - loggerFactory.AddConsole(Configuration.GetSection("Logging")); - loggerFactory.AddDebug(); - - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { - HotModuleReplacement = true - }); - } - else - { - app.UseExceptionHandler("/Home/Error"); - } - - app.UseStaticFiles(); - - app.UseMvc(routes => - { - routes.MapRoute( - name: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - - routes.MapSpaFallbackRoute( - name: "spa-fallback", - defaults: new { controller = "Home", action = "Index" }); - }); - } - } -} diff --git a/templates/Angular2Spa/Views/Home/Index.cshtml b/templates/Angular2Spa/Views/Home/Index.cshtml deleted file mode 100644 index fc1ae58f..00000000 --- a/templates/Angular2Spa/Views/Home/Index.cshtml +++ /dev/null @@ -1,10 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -Loading... - - -@section scripts { - -} diff --git a/templates/Angular2Spa/Views/Shared/Error.cshtml b/templates/Angular2Spa/Views/Shared/Error.cshtml deleted file mode 100755 index 473b35d6..00000000 --- a/templates/Angular2Spa/Views/Shared/Error.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Error"; -} - -

    Error.

    -

    An error occurred while processing your request.

    diff --git a/templates/Angular2Spa/Views/Shared/_Layout.cshtml b/templates/Angular2Spa/Views/Shared/_Layout.cshtml deleted file mode 100644 index 799964fa..00000000 --- a/templates/Angular2Spa/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - @ViewData["Title"] - WebApplicationBasic - - - - - @RenderBody() - - @RenderSection("scripts", required: false) - - diff --git a/templates/Angular2Spa/Views/_ViewImports.cshtml b/templates/Angular2Spa/Views/_ViewImports.cshtml deleted file mode 100755 index e7b4f83f..00000000 --- a/templates/Angular2Spa/Views/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using WebApplicationBasic -@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" -@addTagHelper "*, Microsoft.AspNetCore.SpaServices" diff --git a/templates/Angular2Spa/Views/_ViewStart.cshtml b/templates/Angular2Spa/Views/_ViewStart.cshtml deleted file mode 100755 index 820a2f6e..00000000 --- a/templates/Angular2Spa/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/templates/Angular2Spa/appsettings.json b/templates/Angular2Spa/appsettings.json deleted file mode 100755 index 723c096a..00000000 --- a/templates/Angular2Spa/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/templates/Angular2Spa/package.json b/templates/Angular2Spa/package.json deleted file mode 100644 index 2be2beda..00000000 --- a/templates/Angular2Spa/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "Angular2Spa", - "version": "0.0.0", - "dependencies": { - "@angular/common": "2.0.2", - "@angular/compiler": "2.0.2", - "@angular/core": "2.0.2", - "@angular/forms": "2.0.2", - "@angular/http": "2.0.2", - "@angular/platform-browser": "2.0.2", - "@angular/platform-browser-dynamic": "2.0.2", - "@angular/platform-server": "2.0.2", - "@angular/router": "3.0.2", - "@types/node": "^6.0.42", - "angular2-platform-node": "~2.0.11", - "angular2-template-loader": "^0.6.0", - "angular2-universal": "~2.0.11", - "angular2-universal-polyfills": "~2.0.11", - "aspnet-prerendering": "^1.0.7", - "aspnet-webpack": "^1.0.17", - "bootstrap": "^3.3.7", - "css": "^2.2.1", - "css-loader": "^0.25.0", - "es6-shim": "^0.35.1", - "event-source-polyfill": "^0.0.7", - "expose-loader": "^0.7.1", - "extract-text-webpack-plugin": "^1.0.1", - "file-loader": "^0.9.0", - "html-loader": "^0.4.4", - "isomorphic-fetch": "^2.2.1", - "jquery": "^2.2.1", - "preboot": "^4.5.2", - "raw-loader": "^0.5.1", - "rxjs": "5.0.0-beta.12", - "style-loader": "^0.13.1", - "to-string-loader": "^1.1.5", - "ts-loader": "^0.8.2", - "typescript": "^2.0.3", - "url-loader": "^0.5.7", - "webpack": "^1.13.2", - "webpack-hot-middleware": "^2.12.2", - "webpack-merge": "^0.14.1", - "webpack-node-externals": "^1.4.3", - "zone.js": "^0.6.25" - } -} diff --git a/templates/Angular2Spa/project.json b/templates/Angular2Spa/project.json deleted file mode 100755 index 39d5802f..00000000 --- a/templates/Angular2Spa/project.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.1", - "type": "platform" - }, - "Microsoft.AspNetCore.AngularServices": "1.0.0-*", - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.Mvc": "1.0.1", - "Microsoft.AspNetCore.Razor.Tools": { - "version": "1.0.0-preview2-final", - "type": "build" - }, - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", - "Microsoft.Extensions.Configuration.Json": "1.0.0", - "Microsoft.Extensions.Configuration.CommandLine": "1.0.0", - "Microsoft.Extensions.Logging": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0", - "Microsoft.Extensions.Logging.Debug": "1.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0" - }, - - "tools": { - "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", - "Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final" - }, - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "portable-net45+win8" - ] - } - }, - - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true, - "compile": { - "exclude": ["node_modules"] - } - }, - - "runtimeOptions": { - "configProperties": { - "System.GC.Server": true - } - }, - - "publishOptions": { - "include": [ - "appsettings.json", - "ClientApp/dist", - "node_modules", - "Views", - "web.config", - "wwwroot" - ], - "exclude": [ - "wwwroot/dist/*.map" - ] - }, - - "scripts": { - "prepublish": [ - "npm install", - "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod", - "node node_modules/webpack/bin/webpack.js --env.prod" - ], - "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] - }, - - "tooling": { - "defaultNamespace": "WebApplicationBasic" - } -} diff --git a/templates/Angular2Spa/template_gitignore b/templates/Angular2Spa/template_gitignore deleted file mode 100644 index ded4b289..00000000 --- a/templates/Angular2Spa/template_gitignore +++ /dev/null @@ -1,248 +0,0 @@ -/Properties/launchSettings.json - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -bin/ -Bin/ -obj/ -Obj/ - -# Visual Studio 2015 cache/options directory -.vs/ -/wwwroot/dist/** -/ClientApp/dist/** - -# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 -!/wwwroot/dist/_placeholder.txt -!/ClientApp/dist/_placeholder.txt - - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Microsoft Azure ApplicationInsights config file -ApplicationInsights.config - -# Windows Store app package directory -AppPackages/ -BundleArtifacts/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -orleans.codegen.cs - -# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 -/node_modules/** -!/node_modules/_placeholder.txt - -/yarn.lock - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe - -# FAKE - F# Make -.fake/ diff --git a/templates/Angular2Spa/template_nodemodules_placeholder.txt b/templates/Angular2Spa/template_nodemodules_placeholder.txt deleted file mode 100644 index 97e54d1a..00000000 --- a/templates/Angular2Spa/template_nodemodules_placeholder.txt +++ /dev/null @@ -1,11 +0,0 @@ ------------------------------------------------------------------- -Don't delete this file. Do include it in your source control repo. ------------------------------------------------------------------- - -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started, which means it's not enough just to -run 'npm install' during publishing: you need to ensure node_modules already -existed at least). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/Angular2Spa/tsconfig.json b/templates/Angular2Spa/tsconfig.json deleted file mode 100644 index 94b22fce..00000000 --- a/templates/Angular2Spa/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node", - "target": "es5", - "sourceMap": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "skipDefaultLibCheck": true, - "lib": [ "es6", "dom" ], - "types": [ "node" ] - }, - "exclude": [ "bin", "node_modules" ], - "atom": { "rewriteTsconfig": false } -} diff --git a/templates/Angular2Spa/web.config b/templates/Angular2Spa/web.config deleted file mode 100644 index a8d66727..00000000 --- a/templates/Angular2Spa/web.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/templates/Angular2Spa/webpack.config.js b/templates/Angular2Spa/webpack.config.js deleted file mode 100644 index 33e002fe..00000000 --- a/templates/Angular2Spa/webpack.config.js +++ /dev/null @@ -1,60 +0,0 @@ -var isDevBuild = process.argv.indexOf('--env.prod') < 0; -var path = require('path'); -var webpack = require('webpack'); -var nodeExternals = require('webpack-node-externals'); -var merge = require('webpack-merge'); -var allFilenamesExceptJavaScript = /\.(?!js(\?|$))([^.]+(\?|$))/; - -// Configuration in common to both client-side and server-side bundles -var sharedConfig = { - resolve: { extensions: [ '', '.js', '.ts' ] }, - output: { - filename: '[name].js', - publicPath: '/dist/' // Webpack dev middleware, if enabled, handles requests for this URL prefix - }, - module: { - loaders: [ - { test: /\.ts$/, include: /ClientApp/, loaders: ['ts?silent=true', 'angular2-template'] }, - { test: /\.html$/, loader: 'html' }, - { test: /\.css$/, loader: 'to-string!css' }, - { test: /\.(png|jpg|jpeg|gif|svg)$/, loader: 'url', query: { limit: 25000 } } - ] - } -}; - -// Configuration for client-side bundle suitable for running in browsers -var clientBundleOutputDir = './wwwroot/dist'; -var clientBundleConfig = merge(sharedConfig, { - entry: { 'main-client': './ClientApp/boot-client.ts' }, - output: { path: path.join(__dirname, clientBundleOutputDir) }, - plugins: [ - new webpack.DllReferencePlugin({ - context: __dirname, - manifest: require('./wwwroot/dist/vendor-manifest.json') - }) - ].concat(isDevBuild ? [ - // Plugins that apply in development builds only - new webpack.SourceMapDevToolPlugin({ - filename: '[file].map', // Remove this line if you prefer inline source maps - moduleFilenameTemplate: path.relative(clientBundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk - }) - ] : [ - // Plugins that apply in production builds only - new webpack.optimize.OccurenceOrderPlugin(), - new webpack.optimize.UglifyJsPlugin() - ]) -}); - -// Configuration for server-side (prerendering) bundle suitable for running in Node -var serverBundleConfig = merge(sharedConfig, { - entry: { 'main-server': './ClientApp/boot-server.ts' }, - output: { - libraryTarget: 'commonjs', - path: path.join(__dirname, './ClientApp/dist') - }, - target: 'node', - devtool: 'inline-source-map', - externals: [nodeExternals({ whitelist: [allFilenamesExceptJavaScript] })] // Don't bundle .js files from node_modules -}); - -module.exports = [clientBundleConfig, serverBundleConfig]; diff --git a/templates/Angular2Spa/webpack.config.vendor.js b/templates/Angular2Spa/webpack.config.vendor.js deleted file mode 100644 index 89371baf..00000000 --- a/templates/Angular2Spa/webpack.config.vendor.js +++ /dev/null @@ -1,54 +0,0 @@ -var isDevBuild = process.argv.indexOf('--env.prod') < 0; -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); -var extractCSS = new ExtractTextPlugin('vendor.css'); - -module.exports = { - resolve: { - extensions: [ '', '.js' ] - }, - module: { - loaders: [ - { test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, loader: 'url-loader?limit=100000' }, - { test: /\.css(\?|$)/, loader: extractCSS.extract(['css']) } - ] - }, - entry: { - vendor: [ - '@angular/common', - '@angular/compiler', - '@angular/core', - '@angular/http', - '@angular/platform-browser', - '@angular/platform-browser-dynamic', - '@angular/router', - '@angular/platform-server', - 'angular2-universal', - 'angular2-universal-polyfills', - 'bootstrap', - 'bootstrap/dist/css/bootstrap.css', - 'es6-shim', - 'es6-promise', - 'event-source-polyfill', - 'jquery', - 'zone.js', - ] - }, - output: { - path: path.join(__dirname, 'wwwroot', 'dist'), - filename: '[name].js', - library: '[name]_[hash]', - }, - plugins: [ - extractCSS, - new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) - new webpack.optimize.OccurenceOrderPlugin(), - new webpack.DllPlugin({ - path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), - name: '[name]_[hash]' - }) - ].concat(isDevBuild ? [] : [ - new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }) - ]) -}; diff --git a/templates/Angular2Spa/wwwroot/dist/_placeholder.txt b/templates/Angular2Spa/wwwroot/dist/_placeholder.txt deleted file mode 100644 index b22cc154..00000000 --- a/templates/Angular2Spa/wwwroot/dist/_placeholder.txt +++ /dev/null @@ -1,9 +0,0 @@ ------------------------------------------------------------------- -Don't delete this file. Do include it in your source control repo. ------------------------------------------------------------------- - -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/Angular2Spa/wwwroot/favicon.ico b/templates/Angular2Spa/wwwroot/favicon.ico deleted file mode 100755 index a3a79998..00000000 Binary files a/templates/Angular2Spa/wwwroot/favicon.ico and /dev/null differ diff --git a/templates/AureliaSpa/Aurelia.xproj b/templates/AureliaSpa/Aurelia.xproj deleted file mode 100644 index 6abcd44f..00000000 --- a/templates/AureliaSpa/Aurelia.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - true - - - - 33d8dad9-74f9-471d-8bad-55f828faa736 - AureliaSpa - .\obj - .\bin\ - v4.5.2 - - - 2.0 - - - diff --git a/templates/AureliaSpa/ClientApp/app/components/app/app.css b/templates/AureliaSpa/ClientApp/app/components/app/app.css deleted file mode 100644 index 63926006..00000000 --- a/templates/AureliaSpa/ClientApp/app/components/app/app.css +++ /dev/null @@ -1,6 +0,0 @@ -@media (max-width: 767px) { - /* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */ - .body-content { - padding-top: 50px; - } -} diff --git a/templates/AureliaSpa/ClientApp/app/components/app/app.html b/templates/AureliaSpa/ClientApp/app/components/app/app.html deleted file mode 100644 index 27cae10e..00000000 --- a/templates/AureliaSpa/ClientApp/app/components/app/app.html +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/templates/AureliaSpa/ClientApp/app/components/app/app.ts b/templates/AureliaSpa/ClientApp/app/components/app/app.ts deleted file mode 100644 index 6a70c185..00000000 --- a/templates/AureliaSpa/ClientApp/app/components/app/app.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Aurelia } from 'aurelia-framework'; -import { Router, RouterConfiguration } from 'aurelia-router'; - -export class App { - router: Router; - - configureRouter(config: RouterConfiguration, router: Router) { - config.title = 'Aurelia'; - config.map([{ - route: [ '', 'home' ], - name: 'home', - settings: { icon: 'home' }, - moduleId: '../home/home', - nav: true, - title: 'Home' - }, { - route: 'counter', - name: 'counter', - settings: { icon: 'education' }, - moduleId: '../counter/counter', - nav: true, - title: 'Counter' - }, { - route: 'fetch-data', - name: 'fetchdata', - settings: { icon: 'th-list' }, - moduleId: '../fetchdata/fetchdata', - nav: true, - title: 'Fetch data' - }]); - - this.router = router; - } -} diff --git a/templates/AureliaSpa/ClientApp/app/components/counter/counter.html b/templates/AureliaSpa/ClientApp/app/components/counter/counter.html deleted file mode 100644 index ef4bf8f3..00000000 --- a/templates/AureliaSpa/ClientApp/app/components/counter/counter.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/templates/AureliaSpa/ClientApp/app/components/counter/counter.ts b/templates/AureliaSpa/ClientApp/app/components/counter/counter.ts deleted file mode 100644 index 3217c449..00000000 --- a/templates/AureliaSpa/ClientApp/app/components/counter/counter.ts +++ /dev/null @@ -1,7 +0,0 @@ -export class Counter { - public currentCount = 0; - - public incrementCounter() { - this.currentCount++; - } -} diff --git a/templates/AureliaSpa/ClientApp/app/components/fetchdata/fetchdata.html b/templates/AureliaSpa/ClientApp/app/components/fetchdata/fetchdata.html deleted file mode 100644 index bd06c35d..00000000 --- a/templates/AureliaSpa/ClientApp/app/components/fetchdata/fetchdata.html +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/templates/AureliaSpa/ClientApp/app/components/fetchdata/fetchdata.ts b/templates/AureliaSpa/ClientApp/app/components/fetchdata/fetchdata.ts deleted file mode 100644 index fe9a207e..00000000 --- a/templates/AureliaSpa/ClientApp/app/components/fetchdata/fetchdata.ts +++ /dev/null @@ -1,26 +0,0 @@ -// The following line is a workaround for aurelia-fetch-client requiring the type UrlSearchParams -// to exist in global scope, but that type not being declared in any public @types/* package. -/// - -import { HttpClient } from 'aurelia-fetch-client'; -import { inject } from 'aurelia-framework'; - -@inject(HttpClient) -export class Fetchdata { - public forecasts: WeatherForecast[]; - - constructor(http: HttpClient) { - http.fetch('/api/SampleData/WeatherForecasts') - .then(result => result.json()) - .then(data => { - this.forecasts = data; - }); - } -} - -interface WeatherForecast { - dateFormatted: string; - temperatureC: number; - temperatureF: number; - summary: string; -} diff --git a/templates/AureliaSpa/ClientApp/app/components/home/home.html b/templates/AureliaSpa/ClientApp/app/components/home/home.html deleted file mode 100644 index 9d0474db..00000000 --- a/templates/AureliaSpa/ClientApp/app/components/home/home.html +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/templates/AureliaSpa/ClientApp/app/components/home/home.ts b/templates/AureliaSpa/ClientApp/app/components/home/home.ts deleted file mode 100644 index 737d6cc2..00000000 --- a/templates/AureliaSpa/ClientApp/app/components/home/home.ts +++ /dev/null @@ -1,2 +0,0 @@ -export class Home { -} diff --git a/templates/AureliaSpa/ClientApp/app/components/navmenu/navmenu.css b/templates/AureliaSpa/ClientApp/app/components/navmenu/navmenu.css deleted file mode 100644 index 8518eda3..00000000 --- a/templates/AureliaSpa/ClientApp/app/components/navmenu/navmenu.css +++ /dev/null @@ -1,59 +0,0 @@ -li .glyphicon { - margin-right: 10px; -} - -/* Highlighting rules for nav menu items */ -li.au-target.link-active a, -li.au-target.link-active a:hover, -li.au-target.link-active a:focus { - background-color: #4189C7; - color: white; -} - -/* Keep the nav menu independent of scrolling and on top of other items */ -.main-nav { - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 1; -} - -@media (min-width: 768px) { - /* On small screens, convert the nav menu to a vertical sidebar */ - .main-nav { - height: 100%; - width: calc(25% - 20px); - } - .navbar { - border-radius: 0px; - border-width: 0px; - height: 100%; - } - .navbar-header { - float: none; - } - .navbar-collapse { - border-top: 1px solid #444; - padding: 0px; - } - .navbar ul { - float: none; - } - .navbar li { - float: none; - font-size: 15px; - margin: 6px; - } - .navbar li a { - padding: 10px 16px; - border-radius: 4px; - } - .navbar a { - /* If a menu item's text is too long, truncate it */ - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } -} diff --git a/templates/AureliaSpa/ClientApp/app/components/navmenu/navmenu.html b/templates/AureliaSpa/ClientApp/app/components/navmenu/navmenu.html deleted file mode 100644 index 38b97f9c..00000000 --- a/templates/AureliaSpa/ClientApp/app/components/navmenu/navmenu.html +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/templates/AureliaSpa/ClientApp/boot.ts b/templates/AureliaSpa/ClientApp/boot.ts deleted file mode 100644 index e03d3f22..00000000 --- a/templates/AureliaSpa/ClientApp/boot.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Aurelia } from 'aurelia-framework'; -import 'bootstrap/dist/css/bootstrap.css'; -import 'bootstrap'; -declare const IS_DEV_BUILD: boolean; // The value is supplied by Webpack during the build - -export function configure(aurelia: Aurelia) { - aurelia.use.standardConfiguration(); - - if (IS_DEV_BUILD) { - aurelia.use.developmentLogging(); - } - - aurelia.start().then(() => aurelia.setRoot('app/components/app/app')); -} diff --git a/templates/AureliaSpa/Controllers/HomeController.cs b/templates/AureliaSpa/Controllers/HomeController.cs deleted file mode 100644 index 9d75da88..00000000 --- a/templates/AureliaSpa/Controllers/HomeController.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace WebApplicationBasic.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - - public IActionResult Error() - { - return View(); - } - } -} diff --git a/templates/AureliaSpa/Controllers/SampleDataController.cs b/templates/AureliaSpa/Controllers/SampleDataController.cs deleted file mode 100644 index 1f46d127..00000000 --- a/templates/AureliaSpa/Controllers/SampleDataController.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace WebApplicationBasic.Controllers -{ - [Route("api/[controller]")] - public class SampleDataController : Controller - { - private static string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - [HttpGet("[action]")] - public IEnumerable WeatherForecasts() - { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - DateFormatted = DateTime.Now.AddDays(index).ToString("d"), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }); - } - - public class WeatherForecast - { - public string DateFormatted { get; set; } - public int TemperatureC { get; set; } - public string Summary { get; set; } - - public int TemperatureF - { - get - { - return 32 + (int)(this.TemperatureC / 0.5556); - } - } - } - } -} diff --git a/templates/AureliaSpa/Dockerfile b/templates/AureliaSpa/Dockerfile deleted file mode 100644 index c9bf07c1..00000000 --- a/templates/AureliaSpa/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM microsoft/dotnet:1.0.0-preview2-onbuild - -RUN apt-get update -RUN wget -qO- https://deb.nodesource.com/setup_4.x | bash - -RUN apt-get install -y build-essential nodejs - -WORKDIR /app - -COPY project.json . -RUN ["dotnet", "restore"] - -COPY . /app -RUN ["dotnet", "build"] - -EXPOSE 5000/tcp - -ENTRYPOINT ["dotnet", "run", "--server.urls", "http://0.0.0.0:5000"] diff --git a/templates/AureliaSpa/Program.cs b/templates/AureliaSpa/Program.cs deleted file mode 100644 index b2e5e4b8..00000000 --- a/templates/AureliaSpa/Program.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; - -namespace WebApplicationBasic -{ - public class Program - { - public static void Main(string[] args) - { - var config = new ConfigurationBuilder() - .AddCommandLine(args) - .AddEnvironmentVariables(prefix: "ASPNETCORE_") - .Build(); - - var host = new WebHostBuilder() - .UseConfiguration(config) - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/templates/AureliaSpa/README.md b/templates/AureliaSpa/README.md deleted file mode 100644 index d8ba0b38..00000000 --- a/templates/AureliaSpa/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Welcome to ASP.NET Core - -We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new. - -You've created a new ASP.NET Core project. [Learn what's new](https://go.microsoft.com/fwlink/?LinkId=518016) - -## This application consists of: - -* Sample pages using ASP.NET Core MVC -* [Gulp](https://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](https://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side libraries -* Theming using [Bootstrap](https://go.microsoft.com/fwlink/?LinkID=398939) - -## How to - -* [Add a Controller and View](https://go.microsoft.com/fwlink/?LinkID=398600) -* [Add an appsetting in config and access it in app.](https://go.microsoft.com/fwlink/?LinkID=699562) -* [Manage User Secrets using Secret Manager.](https://go.microsoft.com/fwlink/?LinkId=699315) -* [Use logging to log a message.](https://go.microsoft.com/fwlink/?LinkId=699316) -* [Add packages using NuGet.](https://go.microsoft.com/fwlink/?LinkId=699317) -* [Add client packages using Bower.](https://go.microsoft.com/fwlink/?LinkId=699318) -* [Target development, staging or production environment.](https://go.microsoft.com/fwlink/?LinkId=699319) - -## Overview - -* [Conceptual overview of what is ASP.NET Core](https://go.microsoft.com/fwlink/?LinkId=518008) -* [Fundamentals of ASP.NET Core such as Startup and middleware.](https://go.microsoft.com/fwlink/?LinkId=699320) -* [Working with Data](https://go.microsoft.com/fwlink/?LinkId=398602) -* [Security](https://go.microsoft.com/fwlink/?LinkId=398603) -* [Client side development](https://go.microsoft.com/fwlink/?LinkID=699321) -* [Develop on different platforms](https://go.microsoft.com/fwlink/?LinkID=699322) -* [Read more on the documentation site](https://go.microsoft.com/fwlink/?LinkID=699323) - -## Run & Deploy - -* [Run your app](https://go.microsoft.com/fwlink/?LinkID=517851) -* [Run tools such as EF migrations and more](https://go.microsoft.com/fwlink/?LinkID=517853) -* [Publish to Microsoft Azure Web Apps](https://go.microsoft.com/fwlink/?LinkID=398609) - -We would love to hear your [feedback](https://go.microsoft.com/fwlink/?LinkId=518015) diff --git a/templates/AureliaSpa/Startup.cs b/templates/AureliaSpa/Startup.cs deleted file mode 100644 index 412b4db7..00000000 --- a/templates/AureliaSpa/Startup.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.SpaServices.Webpack; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace WebApplicationBasic -{ - public class Startup - { - public Startup(IHostingEnvironment env) - { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) - .AddEnvironmentVariables(); - Configuration = builder.Build(); - } - - public IConfigurationRoot Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - // Add framework services. - services.AddMvc(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) - { - loggerFactory.AddConsole(Configuration.GetSection("Logging")); - loggerFactory.AddDebug(); - - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - - app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { - HotModuleReplacement = false // Aurelia Webpack Plugin HMR currently has issues. Leave this set to false. - }); - } - else - { - app.UseExceptionHandler("/Home/Error"); - } - - app.UseStaticFiles(); - - app.UseMvc(routes => - { - routes.MapRoute( - name: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - - routes.MapSpaFallbackRoute( - name: "spa-fallback", - defaults: new { controller = "Home", action = "Index" }); - }); - } - } -} diff --git a/templates/AureliaSpa/Views/Home/Index.cshtml b/templates/AureliaSpa/Views/Home/Index.cshtml deleted file mode 100644 index f6b17914..00000000 --- a/templates/AureliaSpa/Views/Home/Index.cshtml +++ /dev/null @@ -1,10 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -
    Loading...
    - -@section scripts { - - -} diff --git a/templates/AureliaSpa/Views/Shared/Error.cshtml b/templates/AureliaSpa/Views/Shared/Error.cshtml deleted file mode 100644 index 473b35d6..00000000 --- a/templates/AureliaSpa/Views/Shared/Error.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Error"; -} - -

    Error.

    -

    An error occurred while processing your request.

    diff --git a/templates/AureliaSpa/Views/Shared/_Layout.cshtml b/templates/AureliaSpa/Views/Shared/_Layout.cshtml deleted file mode 100644 index 9daed473..00000000 --- a/templates/AureliaSpa/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - @ViewData["Title"] - Aurelia - - - - - @RenderBody() - - @RenderSection("scripts", required: false) - - diff --git a/templates/AureliaSpa/Views/_ViewImports.cshtml b/templates/AureliaSpa/Views/_ViewImports.cshtml deleted file mode 100644 index e7b4f83f..00000000 --- a/templates/AureliaSpa/Views/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using WebApplicationBasic -@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" -@addTagHelper "*, Microsoft.AspNetCore.SpaServices" diff --git a/templates/AureliaSpa/Views/_ViewStart.cshtml b/templates/AureliaSpa/Views/_ViewStart.cshtml deleted file mode 100644 index 820a2f6e..00000000 --- a/templates/AureliaSpa/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/templates/AureliaSpa/appsettings.json b/templates/AureliaSpa/appsettings.json deleted file mode 100644 index 723c096a..00000000 --- a/templates/AureliaSpa/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/templates/AureliaSpa/package.json b/templates/AureliaSpa/package.json deleted file mode 100644 index ffdbfd05..00000000 --- a/templates/AureliaSpa/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "AureliaSpa", - "version": "0.0.0", - "dependencies": { - "aurelia-bootstrapper-webpack": "^1.0.0", - "aurelia-event-aggregator": "^1.0.0", - "aurelia-fetch-client": "^1.0.0", - "aurelia-framework": "^1.0.0", - "aurelia-history-browser": "^1.0.0", - "aurelia-loader-webpack": "^1.0.0", - "aurelia-logging-console": "^1.0.0", - "aurelia-pal-browser": "^1.0.0", - "aurelia-polyfills": "^1.0.0", - "aurelia-route-recognizer": "^1.0.0", - "aurelia-router": "^1.0.2", - "aurelia-templating-binding": "^1.0.0", - "aurelia-templating-resources": "^1.0.0", - "aurelia-templating-router": "^1.0.0", - "bootstrap": "^3.3.7", - "isomorphic-fetch": "^2.2.1", - "jquery": "^2.2.1" - }, - "devDependencies": { - "@types/node": "^6.0.45", - "@types/whatwg-fetch": "0.0.32", - "aspnet-webpack": "^1.0.11", - "aurelia-webpack-plugin": "^1.1.0", - "copy-webpack-plugin": "^3.0.1", - "css": "^2.2.1", - "css-loader": "^0.25.0", - "expose-loader": "^0.7.1", - "extract-text-webpack-plugin": "^2.0.0-beta.4", - "file-loader": "^0.9.0", - "html-loader": "^0.4.4", - "html-webpack-plugin": "^2.22.0", - "raw-loader": "^0.5.1", - "style-loader": "^0.13.1", - "to-string-loader": "^1.1.5", - "ts-loader": "^0.8.2", - "typescript": "^2.0.0", - "url-loader": "^0.5.7", - "webpack": "^2.1.0-beta.25", - "webpack-hot-middleware": "^2.10.0" - }, - "aurelia": { - "build": { - "includeDependencies": "aurelia-*" - } - } -} diff --git a/templates/AureliaSpa/project.json b/templates/AureliaSpa/project.json deleted file mode 100644 index a4bb93f1..00000000 --- a/templates/AureliaSpa/project.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.1", - "type": "platform" - }, - "Microsoft.AspNetCore.SpaServices": "1.0.0-*", - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.Mvc": "1.0.1", - "Microsoft.AspNetCore.Razor.Tools": { - "version": "1.0.0-preview2-final", - "type": "build" - }, - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", - "Microsoft.Extensions.Configuration.Json": "1.0.0", - "Microsoft.Extensions.Configuration.CommandLine": "1.0.0", - "Microsoft.Extensions.Logging": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0", - "Microsoft.Extensions.Logging.Debug": "1.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0" - }, - - "tools": { - "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", - "Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final" - }, - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "portable-net45+win8" - ] - } - }, - - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - - "runtimeOptions": { - "configProperties": { - "System.GC.Server": true - } - }, - - "publishOptions": { - "include": [ - "appsettings.json", - "ClientApp/dist", - "Views", - "web.config", - "wwwroot" - ] - }, - - "scripts": { - "prepublish": [ - "npm install", - "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod", - "node node_modules/webpack/bin/webpack.js --env.prod" - ], - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - }, - - "tooling": { - "defaultNamespace": "WebApplicationBasic" - } -} diff --git a/templates/AureliaSpa/template_gitignore b/templates/AureliaSpa/template_gitignore deleted file mode 100644 index bc5a6f34..00000000 --- a/templates/AureliaSpa/template_gitignore +++ /dev/null @@ -1,247 +0,0 @@ -/Properties/launchSettings.json - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -bin/ -Bin/ -obj/ -Obj/ - -# Visual Studio 2015 cache/options directory -.vs/ -/wwwroot/dist/** -/ClientApp/dist/** - -# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 -!/wwwroot/dist/_placeholder.txt -!/ClientApp/dist/_placeholder.txt - -/yarn.lock - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Microsoft Azure ApplicationInsights config file -ApplicationInsights.config - -# Windows Store app package directory -AppPackages/ -BundleArtifacts/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -orleans.codegen.cs - -# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 -/node_modules/** -!/node_modules/_placeholder.txt - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe - -# FAKE - F# Make -.fake/ diff --git a/templates/AureliaSpa/template_nodemodules_placeholder.txt b/templates/AureliaSpa/template_nodemodules_placeholder.txt deleted file mode 100644 index 97e54d1a..00000000 --- a/templates/AureliaSpa/template_nodemodules_placeholder.txt +++ /dev/null @@ -1,11 +0,0 @@ ------------------------------------------------------------------- -Don't delete this file. Do include it in your source control repo. ------------------------------------------------------------------- - -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started, which means it's not enough just to -run 'npm install' during publishing: you need to ensure node_modules already -existed at least). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/AureliaSpa/tsconfig.json b/templates/AureliaSpa/tsconfig.json deleted file mode 100644 index 71d738e1..00000000 --- a/templates/AureliaSpa/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node", - "target": "es5", - "sourceMap": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "skipDefaultLibCheck": true, - "lib": [ "es6", "dom" ], - "types": [ "node", "whatwg-fetch" ] - }, - "exclude": [ "bin", "node_modules" ], - "atom": { "rewriteTsconfig": false } -} diff --git a/templates/AureliaSpa/webpack.config.js b/templates/AureliaSpa/webpack.config.js deleted file mode 100644 index dafa58b2..00000000 --- a/templates/AureliaSpa/webpack.config.js +++ /dev/null @@ -1,44 +0,0 @@ -var isDevBuild = process.argv.indexOf('--env.prod') < 0; -var path = require('path'); -var webpack = require('webpack'); -var AureliaWebpackPlugin = require('aurelia-webpack-plugin'); - -var bundleOutputDir = './wwwroot/dist'; -module.exports = { - resolve: { extensions: [ '.js', '.ts' ] }, - entry: { 'app': 'aurelia-bootstrapper-webpack' }, // Note: The aurelia-webpack-plugin will add your app's modules to this bundle automatically - output: { - path: path.resolve(bundleOutputDir), - publicPath: '/dist', - filename: '[name].js' - }, - module: { - loaders: [ - { test: /\.ts$/, include: /ClientApp/, loader: 'ts', query: { silent: true } }, - { test: /\.html$/, loader: 'html' }, - { test: /\.css$/, loaders: [ 'style', 'css' ] }, - { test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' } - ] - }, - plugins: [ - new webpack.DefinePlugin({ IS_DEV_BUILD: JSON.stringify(isDevBuild) }), - new webpack.DllReferencePlugin({ - context: __dirname, - manifest: require('./wwwroot/dist/vendor-manifest.json') - }), - new AureliaWebpackPlugin({ - root: path.resolve('./'), - src: path.resolve('./ClientApp'), - baseUrl: '/' - }) - ].concat(isDevBuild ? [ - // Plugins that apply in development builds only - new webpack.SourceMapDevToolPlugin({ - filename: '[file].map', // Remove this line if you prefer inline source maps - moduleFilenameTemplate: path.relative(bundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk - }) - ] : [ - // Plugins that apply in production builds only - new webpack.optimize.UglifyJsPlugin() - ]) -}; diff --git a/templates/AureliaSpa/webpack.config.vendor.js b/templates/AureliaSpa/webpack.config.vendor.js deleted file mode 100644 index e6051cb1..00000000 --- a/templates/AureliaSpa/webpack.config.vendor.js +++ /dev/null @@ -1,51 +0,0 @@ -var isDevBuild = process.argv.indexOf('--env.prod') < 0; -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); -var extractCSS = new ExtractTextPlugin('vendor.css'); - -module.exports = { - resolve: { - extensions: [ '.js' ] - }, - module: { - loaders: [ - { test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, loader: 'url-loader?limit=100000' }, - { test: /\.css(\?|$)/, loader: extractCSS.extract(['css']) } - ] - }, - entry: { - vendor: [ - 'aurelia-event-aggregator', - 'aurelia-fetch-client', - 'aurelia-framework', - 'aurelia-history-browser', - 'aurelia-logging-console', - 'aurelia-pal-browser', - 'aurelia-polyfills', - 'aurelia-route-recognizer', - 'aurelia-router', - 'aurelia-templating-binding', - 'aurelia-templating-resources', - 'aurelia-templating-router', - 'bootstrap', - 'bootstrap/dist/css/bootstrap.css', - 'jquery' - ], - }, - output: { - path: path.join(__dirname, 'wwwroot', 'dist'), - filename: '[name].js', - library: '[name]_[hash]', - }, - plugins: [ - extractCSS, - new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) - new webpack.DllPlugin({ - path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), - name: '[name]_[hash]' - }) - ].concat(isDevBuild ? [] : [ - new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }) - ]) -}; diff --git a/templates/AureliaSpa/wwwroot/dist/_placeholder.txt b/templates/AureliaSpa/wwwroot/dist/_placeholder.txt deleted file mode 100644 index b22cc154..00000000 --- a/templates/AureliaSpa/wwwroot/dist/_placeholder.txt +++ /dev/null @@ -1,9 +0,0 @@ ------------------------------------------------------------------- -Don't delete this file. Do include it in your source control repo. ------------------------------------------------------------------- - -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/AureliaSpa/wwwroot/favicon.ico b/templates/AureliaSpa/wwwroot/favicon.ico deleted file mode 100644 index 6884543f..00000000 Binary files a/templates/AureliaSpa/wwwroot/favicon.ico and /dev/null differ diff --git a/templates/KnockoutSpa/ClientApp/boot.ts b/templates/KnockoutSpa/ClientApp/boot.ts deleted file mode 100644 index 897fed6b..00000000 --- a/templates/KnockoutSpa/ClientApp/boot.ts +++ /dev/null @@ -1,19 +0,0 @@ -import './css/site.css'; -import * as ko from 'knockout'; -import './webpack-component-loader'; -import AppRootComponent from './components/app-root/app-root'; -const createHistory = require('history').createBrowserHistory; - -// Load and register the component -ko.components.register('app-root', AppRootComponent); - -// Tell Knockout to start up an instance of your application -ko.applyBindings({ history: createHistory() }); - -// Basic hot reloading support. Automatically reloads and restarts the Knockout app each time -// you modify source files. This will not preserve any application state other than the URL. -declare var module: any; -if (module.hot) { - module.hot.accept(); - module.hot.dispose(() => ko.cleanNode(document.body)); -} diff --git a/templates/KnockoutSpa/ClientApp/components/app-root/app-root.html b/templates/KnockoutSpa/ClientApp/components/app-root/app-root.html deleted file mode 100644 index f1f11b40..00000000 --- a/templates/KnockoutSpa/ClientApp/components/app-root/app-root.html +++ /dev/null @@ -1,8 +0,0 @@ -
    -
    -
    - -
    -
    -
    -
    diff --git a/templates/KnockoutSpa/ClientApp/components/app-root/app-root.ts b/templates/KnockoutSpa/ClientApp/components/app-root/app-root.ts deleted file mode 100644 index 011a2202..00000000 --- a/templates/KnockoutSpa/ClientApp/components/app-root/app-root.ts +++ /dev/null @@ -1,44 +0,0 @@ -import * as ko from 'knockout'; -import * as History from 'history'; -import { Route, Router } from '../../router'; -import navMenu from '../nav-menu/nav-menu'; - -// Declare the client-side routing configuration -const routes: Route[] = [ - { url: '', params: { page: 'home-page' } }, - { url: 'counter', params: { page: 'counter-example' } }, - { url: 'fetch-data', params: { page: 'fetch-data' } } -]; - -class AppRootViewModel { - public route: KnockoutObservable; - private _router: Router; - - constructor(params: { history: History.History }) { - // Activate the client-side router - this._router = new Router(params.history, routes) - this.route = this._router.currentRoute; - - // Load and register all the KO components needed to handle the routes - // The optional 'bundle?lazy!' prefix is a Webpack feature that causes the referenced modules - // to be split into separate files that are then loaded on demand. - // For docs, see https://github.com/webpack/bundle-loader - ko.components.register('nav-menu', navMenu); - ko.components.register('home-page', require('bundle?lazy!../home-page/home-page')); - ko.components.register('counter-example', require('bundle?lazy!../counter-example/counter-example')); - ko.components.register('fetch-data', require('bundle?lazy!../fetch-data/fetch-data')); - } - - // To support hot module replacement, this method unregisters the router and KO components. - // In production scenarios where hot module replacement is disabled, this would not be invoked. - public dispose() { - this._router.dispose(); - - // TODO: Need a better API for this - Object.getOwnPropertyNames((ko).components._allRegisteredComponents).forEach(componentName => { - ko.components.unregister(componentName); - }); - } -} - -export default { viewModel: AppRootViewModel, template: require('./app-root.html') }; diff --git a/templates/KnockoutSpa/ClientApp/components/counter-example/counter-example.html b/templates/KnockoutSpa/ClientApp/components/counter-example/counter-example.html deleted file mode 100644 index 7327e592..00000000 --- a/templates/KnockoutSpa/ClientApp/components/counter-example/counter-example.html +++ /dev/null @@ -1,7 +0,0 @@ -

    Counter

    - -

    This is a simple example of a Knockout component.

    - -

    Current count:

    - - diff --git a/templates/KnockoutSpa/ClientApp/components/counter-example/counter-example.ts b/templates/KnockoutSpa/ClientApp/components/counter-example/counter-example.ts deleted file mode 100644 index 39b7f046..00000000 --- a/templates/KnockoutSpa/ClientApp/components/counter-example/counter-example.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as ko from 'knockout'; - -class CounterExampleViewModel { - public currentCount = ko.observable(0); - - public incrementCounter() { - let prevCount = this.currentCount(); - this.currentCount(prevCount + 1); - } -} - -export default { viewModel: CounterExampleViewModel, template: require('./counter-example.html') }; diff --git a/templates/KnockoutSpa/ClientApp/components/fetch-data/fetch-data.html b/templates/KnockoutSpa/ClientApp/components/fetch-data/fetch-data.html deleted file mode 100644 index 8e9223bb..00000000 --- a/templates/KnockoutSpa/ClientApp/components/fetch-data/fetch-data.html +++ /dev/null @@ -1,24 +0,0 @@ -

    Weather forecast

    - -

    This component demonstrates fetching data from the server.

    - -

    Loading...

    - - - - - - - - - - - - - - - - - - -
    DateTemp. (C)Temp. (F)Summary
    diff --git a/templates/KnockoutSpa/ClientApp/components/fetch-data/fetch-data.ts b/templates/KnockoutSpa/ClientApp/components/fetch-data/fetch-data.ts deleted file mode 100644 index a6618cd3..00000000 --- a/templates/KnockoutSpa/ClientApp/components/fetch-data/fetch-data.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as ko from 'knockout'; -import 'isomorphic-fetch'; - -interface WeatherForecast { - dateFormatted: string; - temperatureC: number; - temperatureF: number; - summary: string; -} - -class FetchDataViewModel { - public forecasts = ko.observableArray(); - - constructor() { - fetch('/api/SampleData/WeatherForecasts') - .then(response => response.json()) - .then((data: WeatherForecast[]) => { - this.forecasts(data); - }); - } -} - -export default { viewModel: FetchDataViewModel, template: require('./fetch-data.html') }; diff --git a/templates/KnockoutSpa/ClientApp/components/home-page/home-page.html b/templates/KnockoutSpa/ClientApp/components/home-page/home-page.html deleted file mode 100644 index 46242687..00000000 --- a/templates/KnockoutSpa/ClientApp/components/home-page/home-page.html +++ /dev/null @@ -1,16 +0,0 @@ -

    Hello, world!

    -

    Welcome to your new single-page application, built with:

    - -

    To help you get started, we've also set up:

    -
      -
    • Client-side navigation. For example, click Counter then Back to return here.
    • -
    • Webpack dev middleware. In development mode, there's no need to run the webpack build tool. Your client-side resources are dynamically built on demand. Updates are available as soon as you modify any file.
    • -
    • Hot module replacement. In development mode, you don't even need to reload the page after making most changes. Within seconds of saving changes to files, your Knockout app will be rebuilt and a new instance injected is into the page.
    • -
    • Code splitting and lazy loading. KO components may optionally be bundled individually and loaded on demand. For example, the code and template for 'Counter' is not loaded until you navigate to it..
    • -
    • Efficient production builds. In production mode, development-time features are disabled, and the webpack build tool produces minified static CSS and JavaScript files.
    • -
    diff --git a/templates/KnockoutSpa/ClientApp/components/home-page/home-page.ts b/templates/KnockoutSpa/ClientApp/components/home-page/home-page.ts deleted file mode 100644 index 588024e2..00000000 --- a/templates/KnockoutSpa/ClientApp/components/home-page/home-page.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as ko from 'knockout'; - -class HomePageViewModel { -} - -export default { viewModel: HomePageViewModel, template: require('./home-page.html') }; diff --git a/templates/KnockoutSpa/ClientApp/components/nav-menu/nav-menu.html b/templates/KnockoutSpa/ClientApp/components/nav-menu/nav-menu.html deleted file mode 100644 index 0bfd32c9..00000000 --- a/templates/KnockoutSpa/ClientApp/components/nav-menu/nav-menu.html +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/templates/KnockoutSpa/ClientApp/components/nav-menu/nav-menu.ts b/templates/KnockoutSpa/ClientApp/components/nav-menu/nav-menu.ts deleted file mode 100644 index 186c60e1..00000000 --- a/templates/KnockoutSpa/ClientApp/components/nav-menu/nav-menu.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as ko from 'knockout'; -import { Route } from '../../router'; - -interface NavMenuParams { - route: KnockoutObservable; -} - -class NavMenuViewModel { - public route: KnockoutObservable; - - constructor(params: NavMenuParams) { - // This viewmodel doesn't do anything except pass through the 'route' parameter to the view. - // You could remove this viewmodel entirely, and define 'nav-menu' as a template-only component. - // But in most apps, you'll want some viewmodel logic to determine what navigation options appear. - this.route = params.route; - } -} - -export default { viewModel: NavMenuViewModel, template: require('./nav-menu.html') }; diff --git a/templates/KnockoutSpa/ClientApp/css/site.css b/templates/KnockoutSpa/ClientApp/css/site.css deleted file mode 100755 index 3058af68..00000000 --- a/templates/KnockoutSpa/ClientApp/css/site.css +++ /dev/null @@ -1,66 +0,0 @@ -.main-nav li .glyphicon { - margin-right: 10px; -} - -/* Highlighting rules for nav menu items */ -.main-nav li a.active, -.main-nav li a.active:hover, -.main-nav li a.active:focus { - background-color: #4189C7; - color: white; -} - -/* Keep the nav menu independent of scrolling and on top of other items */ -.main-nav { - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 1; -} - -@media (max-width: 767px) { - /* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */ - body { - padding-top: 50px; - } -} - -@media (min-width: 768px) { - /* On small screens, convert the nav menu to a vertical sidebar */ - .main-nav { - height: 100%; - width: calc(25% - 20px); - } - .main-nav .navbar { - border-radius: 0px; - border-width: 0px; - height: 100%; - } - .main-nav .navbar-header { - float: none; - } - .main-nav .navbar-collapse { - border-top: 1px solid #444; - padding: 0px; - } - .main-nav .navbar ul { - float: none; - } - .main-nav .navbar li { - float: none; - font-size: 15px; - margin: 6px; - } - .main-nav .navbar li a { - padding: 10px 16px; - border-radius: 4px; - } - .main-nav .navbar a { - /* If a menu item's text is too long, truncate it */ - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } -} diff --git a/templates/KnockoutSpa/ClientApp/router.ts b/templates/KnockoutSpa/ClientApp/router.ts deleted file mode 100644 index d3ac7497..00000000 --- a/templates/KnockoutSpa/ClientApp/router.ts +++ /dev/null @@ -1,58 +0,0 @@ -import * as ko from 'knockout'; -import * as $ from 'jquery'; -import * as History from 'history'; -import crossroads = require('crossroads'); - -// This module configures crossroads.js, a routing library. If you prefer, you -// can use any other routing library (or none at all) as Knockout is designed to -// compose cleanly with external libraries. -// -// You *don't* have to follow the pattern established here (each route entry -// specifies a 'page', which is a Knockout component) - there's nothing built into -// Knockout that requires or even knows about this technique. It's just one of -// many possible ways of setting up client-side routes. -export class Router { - public currentRoute = ko.observable({}); - private disposeHistory: () => void; - private clickEventListener: EventListener; - - constructor(history: History.History, routes: Route[]) { - // Reset and configure Crossroads so it matches routes and updates this.currentRoute - crossroads.removeAllRoutes(); - crossroads.resetState(); - crossroads.normalizeFn = crossroads.NORM_AS_OBJECT; - routes.forEach(route => { - crossroads.addRoute(route.url, (requestParams) => { - this.currentRoute(ko.utils.extend(requestParams, route.params)); - }); - }); - - // Make history.js watch for navigation and notify Crossroads - this.disposeHistory = history.listen(location => crossroads.parse(location.pathname)); - this.clickEventListener = evt => { - let target: any = evt.currentTarget; - if (target && target.tagName === 'A') { - let href = target.getAttribute('href'); - if (href && href.charAt(0) == '/') { - history.push(href); - evt.preventDefault(); - } - } - }; - $(document).on('click', 'a', this.clickEventListener); - - // Initialize Crossroads with starting location - // Need to cast history to 'any' because @types/history is out-of-date - crossroads.parse((history as any).location.pathname); - } - - public dispose() { - this.disposeHistory(); - $(document).off('click', 'a', this.clickEventListener); - } -} - -export interface Route { - url?: string; - params?: any; -} diff --git a/templates/KnockoutSpa/ClientApp/webpack-component-loader.ts b/templates/KnockoutSpa/ClientApp/webpack-component-loader.ts deleted file mode 100644 index 10f13e8f..00000000 --- a/templates/KnockoutSpa/ClientApp/webpack-component-loader.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as ko from 'knockout'; - -// This Knockout component loader integrates with Webpack's lazy-loaded bundle feature. -// Having this means you can optionally declare components as follows: -// ko.components.register('my-component', require('bundle?lazy!../some-path-to-a-js-or-ts-module')); -// ... and then it will be loaded on demand instead of being loaded up front. -ko.components.loaders.unshift({ - loadComponent: (name, componentConfig, callback) => { - if (typeof componentConfig === 'function') { - // It's a lazy-loaded Webpack bundle - (componentConfig as any)(loadedModule => { - // Handle TypeScript-style default exports - if (loadedModule.__esModule && loadedModule.default) { - loadedModule = loadedModule.default; - } - - // Pass the loaded module to KO's default loader - ko.components.defaultLoader.loadComponent(name, loadedModule, callback); - }); - } else { - // It's something else - let another component loader handle it - callback(null); - } - } -}); diff --git a/templates/KnockoutSpa/Controllers/HomeController.cs b/templates/KnockoutSpa/Controllers/HomeController.cs deleted file mode 100755 index 9d75da88..00000000 --- a/templates/KnockoutSpa/Controllers/HomeController.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace WebApplicationBasic.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - - public IActionResult Error() - { - return View(); - } - } -} diff --git a/templates/KnockoutSpa/Controllers/SampleDataController.cs b/templates/KnockoutSpa/Controllers/SampleDataController.cs deleted file mode 100644 index 0f1aa37a..00000000 --- a/templates/KnockoutSpa/Controllers/SampleDataController.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace WebApplicationBasic.Controllers -{ - [Route("api/[controller]")] - public class SampleDataController : Controller - { - private static string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - [HttpGet("[action]")] - public IEnumerable WeatherForecasts() - { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - DateFormatted = DateTime.Now.AddDays(index).ToString("d"), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }); - } - - public class WeatherForecast - { - public string DateFormatted { get; set; } - public int TemperatureC { get; set; } - public string Summary { get; set; } - - public int TemperatureF - { - get - { - return 32 + (int)(TemperatureC / 0.5556); - } - } - } - } -} diff --git a/templates/KnockoutSpa/Dockerfile b/templates/KnockoutSpa/Dockerfile deleted file mode 100644 index b4620123..00000000 --- a/templates/KnockoutSpa/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM microsoft/dotnet:latest - -RUN apt-get update -RUN wget -qO- https://deb.nodesource.com/setup_4.x | bash - -RUN apt-get install -y build-essential nodejs - -WORKDIR /app - -COPY project.json . -RUN ["dotnet", "restore"] - -COPY . /app -RUN ["dotnet", "build"] - -EXPOSE 5000/tcp - -ENTRYPOINT ["dotnet", "run", "--server.urls", "http://0.0.0.0:5000"] diff --git a/templates/KnockoutSpa/KnockoutSpa.xproj b/templates/KnockoutSpa/KnockoutSpa.xproj deleted file mode 100644 index 9a6e512c..00000000 --- a/templates/KnockoutSpa/KnockoutSpa.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - true - - - - 85231b41-6998-49ae-abd2-5124c83dbef2 - KnockoutSpa - .\obj - .\bin\ - v4.5.2 - - - 2.0 - - - \ No newline at end of file diff --git a/templates/KnockoutSpa/Program.cs b/templates/KnockoutSpa/Program.cs deleted file mode 100644 index b2e5e4b8..00000000 --- a/templates/KnockoutSpa/Program.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; - -namespace WebApplicationBasic -{ - public class Program - { - public static void Main(string[] args) - { - var config = new ConfigurationBuilder() - .AddCommandLine(args) - .AddEnvironmentVariables(prefix: "ASPNETCORE_") - .Build(); - - var host = new WebHostBuilder() - .UseConfiguration(config) - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/templates/KnockoutSpa/README.md b/templates/KnockoutSpa/README.md deleted file mode 100644 index d8ba0b38..00000000 --- a/templates/KnockoutSpa/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Welcome to ASP.NET Core - -We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new. - -You've created a new ASP.NET Core project. [Learn what's new](https://go.microsoft.com/fwlink/?LinkId=518016) - -## This application consists of: - -* Sample pages using ASP.NET Core MVC -* [Gulp](https://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](https://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side libraries -* Theming using [Bootstrap](https://go.microsoft.com/fwlink/?LinkID=398939) - -## How to - -* [Add a Controller and View](https://go.microsoft.com/fwlink/?LinkID=398600) -* [Add an appsetting in config and access it in app.](https://go.microsoft.com/fwlink/?LinkID=699562) -* [Manage User Secrets using Secret Manager.](https://go.microsoft.com/fwlink/?LinkId=699315) -* [Use logging to log a message.](https://go.microsoft.com/fwlink/?LinkId=699316) -* [Add packages using NuGet.](https://go.microsoft.com/fwlink/?LinkId=699317) -* [Add client packages using Bower.](https://go.microsoft.com/fwlink/?LinkId=699318) -* [Target development, staging or production environment.](https://go.microsoft.com/fwlink/?LinkId=699319) - -## Overview - -* [Conceptual overview of what is ASP.NET Core](https://go.microsoft.com/fwlink/?LinkId=518008) -* [Fundamentals of ASP.NET Core such as Startup and middleware.](https://go.microsoft.com/fwlink/?LinkId=699320) -* [Working with Data](https://go.microsoft.com/fwlink/?LinkId=398602) -* [Security](https://go.microsoft.com/fwlink/?LinkId=398603) -* [Client side development](https://go.microsoft.com/fwlink/?LinkID=699321) -* [Develop on different platforms](https://go.microsoft.com/fwlink/?LinkID=699322) -* [Read more on the documentation site](https://go.microsoft.com/fwlink/?LinkID=699323) - -## Run & Deploy - -* [Run your app](https://go.microsoft.com/fwlink/?LinkID=517851) -* [Run tools such as EF migrations and more](https://go.microsoft.com/fwlink/?LinkID=517853) -* [Publish to Microsoft Azure Web Apps](https://go.microsoft.com/fwlink/?LinkID=398609) - -We would love to hear your [feedback](https://go.microsoft.com/fwlink/?LinkId=518015) diff --git a/templates/KnockoutSpa/Startup.cs b/templates/KnockoutSpa/Startup.cs deleted file mode 100755 index e5d73ed6..00000000 --- a/templates/KnockoutSpa/Startup.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.SpaServices.Webpack; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace WebApplicationBasic -{ - public class Startup - { - public Startup(IHostingEnvironment env) - { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) - .AddEnvironmentVariables(); - Configuration = builder.Build(); - } - - public IConfigurationRoot Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - // Add framework services. - services.AddMvc(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) - { - loggerFactory.AddConsole(Configuration.GetSection("Logging")); - loggerFactory.AddDebug(); - - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { - HotModuleReplacement = true - }); - } - else - { - app.UseExceptionHandler("/Home/Error"); - } - - app.UseStaticFiles(); - - app.UseMvc(routes => - { - routes.MapRoute( - name: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - - routes.MapSpaFallbackRoute( - name: "spa-fallback", - defaults: new { controller = "Home", action = "Index" }); - }); - } - } -} diff --git a/templates/KnockoutSpa/Views/Home/Index.cshtml b/templates/KnockoutSpa/Views/Home/Index.cshtml deleted file mode 100644 index 866fb01b..00000000 --- a/templates/KnockoutSpa/Views/Home/Index.cshtml +++ /dev/null @@ -1,9 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - - - -@section scripts { - -} diff --git a/templates/KnockoutSpa/Views/Shared/Error.cshtml b/templates/KnockoutSpa/Views/Shared/Error.cshtml deleted file mode 100755 index 473b35d6..00000000 --- a/templates/KnockoutSpa/Views/Shared/Error.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Error"; -} - -

    Error.

    -

    An error occurred while processing your request.

    diff --git a/templates/KnockoutSpa/Views/Shared/_Layout.cshtml b/templates/KnockoutSpa/Views/Shared/_Layout.cshtml deleted file mode 100644 index a770ceb4..00000000 --- a/templates/KnockoutSpa/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - @ViewData["Title"] - WebApplicationBasic - - - - - - - - @RenderBody() - - - @RenderSection("scripts", required: false) - - diff --git a/templates/KnockoutSpa/Views/_ViewImports.cshtml b/templates/KnockoutSpa/Views/_ViewImports.cshtml deleted file mode 100755 index e7b4f83f..00000000 --- a/templates/KnockoutSpa/Views/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using WebApplicationBasic -@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" -@addTagHelper "*, Microsoft.AspNetCore.SpaServices" diff --git a/templates/KnockoutSpa/Views/_ViewStart.cshtml b/templates/KnockoutSpa/Views/_ViewStart.cshtml deleted file mode 100755 index 820a2f6e..00000000 --- a/templates/KnockoutSpa/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/templates/KnockoutSpa/appsettings.json b/templates/KnockoutSpa/appsettings.json deleted file mode 100755 index 723c096a..00000000 --- a/templates/KnockoutSpa/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/templates/KnockoutSpa/package.json b/templates/KnockoutSpa/package.json deleted file mode 100644 index 7c231980..00000000 --- a/templates/KnockoutSpa/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "WebApplicationBasic", - "version": "0.0.0", - "devDependencies": { - "@types/core-js": "^0.9.34", - "@types/crossroads": "0.0.29", - "@types/es6-promise": "0.0.32", - "@types/history": "^2.0.38", - "@types/jquery": "^2.0.32", - "@types/knockout": "^3.4.35", - "@types/react-router": "^2.0.37", - "@types/requirejs": "^2.1.26", - "@types/signals": "0.0.16", - "@types/whatwg-fetch": "0.0.30", - "aspnet-webpack": "^1.0.17", - "bootstrap": "^3.3.6", - "bundle-loader": "^0.5.4", - "crossroads": "^0.12.2", - "css-loader": "^0.25.0", - "event-source-polyfill": "^0.0.7", - "extract-text-webpack-plugin": "^1.0.1", - "file-loader": "^0.9.0", - "history": "^4.3.0", - "isomorphic-fetch": "^2.2.1", - "jquery": "^2.2.1", - "knockout": "^3.4.0", - "raw-loader": "^0.5.1", - "style-loader": "^0.13.1", - "ts-loader": "^0.8.2", - "typescript": "^2.0.3", - "url-loader": "^0.5.7", - "webpack": "^1.13.2", - "webpack-hot-middleware": "^2.12.2" - } -} diff --git a/templates/KnockoutSpa/project.json b/templates/KnockoutSpa/project.json deleted file mode 100755 index 24a35e1d..00000000 --- a/templates/KnockoutSpa/project.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.1", - "type": "platform" - }, - "Microsoft.AspNetCore.SpaServices": "1.0.0-*", - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.Mvc": "1.0.1", - "Microsoft.AspNetCore.Razor.Tools": { - "version": "1.0.0-preview2-final", - "type": "build" - }, - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", - "Microsoft.Extensions.Configuration.Json": "1.0.0", - "Microsoft.Extensions.Configuration.CommandLine": "1.0.0", - "Microsoft.Extensions.Logging": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0", - "Microsoft.Extensions.Logging.Debug": "1.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0" - }, - - "tools": { - "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", - "Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final" - }, - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "portable-net45+win8" - ] - } - }, - - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true, - "compile": { - "exclude": ["node_modules"] - } - }, - - "runtimeOptions": { - "configProperties": { - "System.GC.Server": true - } - }, - - "publishOptions": { - "include": [ - "appsettings.json", - "node_modules", - "Views", - "web.config", - "wwwroot" - ], - "exclude": [ - "wwwroot/dist/*.map" - ] - }, - - "scripts": { - "prepublish": [ - "npm install", - "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod", - "node node_modules/webpack/bin/webpack.js --env.prod" - ], - "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] - }, - - "tooling": { - "defaultNamespace": "WebApplicationBasic" - } -} diff --git a/templates/KnockoutSpa/template_gitignore b/templates/KnockoutSpa/template_gitignore deleted file mode 100644 index 893db26a..00000000 --- a/templates/KnockoutSpa/template_gitignore +++ /dev/null @@ -1,245 +0,0 @@ -/Properties/launchSettings.json - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -bin/ -Bin/ -obj/ -Obj/ - -# Visual Studio 2015 cache/options directory -.vs/ -/wwwroot/dist/** - -# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 -!/wwwroot/dist/_placeholder.txt - -/yarn.lock - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Microsoft Azure ApplicationInsights config file -ApplicationInsights.config - -# Windows Store app package directory -AppPackages/ -BundleArtifacts/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -orleans.codegen.cs - -# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 -/node_modules/** -!/node_modules/_placeholder.txt - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe - -# FAKE - F# Make -.fake/ diff --git a/templates/KnockoutSpa/template_nodemodules_placeholder.txt b/templates/KnockoutSpa/template_nodemodules_placeholder.txt deleted file mode 100644 index 09ae8c0c..00000000 --- a/templates/KnockoutSpa/template_nodemodules_placeholder.txt +++ /dev/null @@ -1,7 +0,0 @@ -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started, which means it's not enough just to -run 'npm install' during publishing: you need to ensure node_modules already -existed at least). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/KnockoutSpa/tsconfig.json b/templates/KnockoutSpa/tsconfig.json deleted file mode 100644 index d94f03b2..00000000 --- a/templates/KnockoutSpa/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node", - "target": "es5", - "sourceMap": true, - "skipDefaultLibCheck": true, - "types": ["es6-promise", "history", "requirejs", "whatwg-fetch"] - }, - "exclude": [ - "bin", - "node_modules" - ] -} diff --git a/templates/KnockoutSpa/web.config b/templates/KnockoutSpa/web.config deleted file mode 100644 index a8d66727..00000000 --- a/templates/KnockoutSpa/web.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/templates/KnockoutSpa/webpack.config.js b/templates/KnockoutSpa/webpack.config.js deleted file mode 100644 index 98fd96d0..00000000 --- a/templates/KnockoutSpa/webpack.config.js +++ /dev/null @@ -1,40 +0,0 @@ -var isDevBuild = process.argv.indexOf('--env.prod') < 0; -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); - -var bundleOutputDir = './wwwroot/dist'; -module.exports = { - entry: { 'main': './ClientApp/boot.ts' }, - resolve: { extensions: [ '', '.js', '.ts' ] }, - output: { - path: path.join(__dirname, bundleOutputDir), - filename: '[name].js', - publicPath: '/dist/' - }, - module: { - loaders: [ - { test: /\.ts$/, include: /ClientApp/, loader: 'ts', query: { silent: true } }, - { test: /\.html$/, loader: 'raw' }, - { test: /\.css$/, loader: isDevBuild ? 'style!css' : ExtractTextPlugin.extract(['css']) }, - { test: /\.(png|jpg|jpeg|gif|svg)$/, loader: 'url', query: { limit: 25000 } } - ] - }, - plugins: [ - new webpack.DllReferencePlugin({ - context: __dirname, - manifest: require('./wwwroot/dist/vendor-manifest.json') - }) - ].concat(isDevBuild ? [ - // Plugins that apply in development builds only - new webpack.SourceMapDevToolPlugin({ - filename: '[file].map', // Remove this line if you prefer inline source maps - moduleFilenameTemplate: path.relative(bundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk - }) - ] : [ - // Plugins that apply in production builds only - new webpack.optimize.OccurenceOrderPlugin(), - new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }), - new ExtractTextPlugin('site.css') - ]) -}; diff --git a/templates/KnockoutSpa/webpack.config.vendor.js b/templates/KnockoutSpa/webpack.config.vendor.js deleted file mode 100644 index 049bc837..00000000 --- a/templates/KnockoutSpa/webpack.config.vendor.js +++ /dev/null @@ -1,36 +0,0 @@ -var isDevBuild = process.argv.indexOf('--env.prod') < 0; -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); -var extractCSS = new ExtractTextPlugin('vendor.css'); - -module.exports = { - resolve: { - extensions: [ '', '.js' ] - }, - module: { - loaders: [ - { test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, loader: 'url-loader?limit=100000' }, - { test: /\.css(\?|$)/, loader: extractCSS.extract(['css']) } - ] - }, - entry: { - vendor: ['bootstrap', 'bootstrap/dist/css/bootstrap.css', 'knockout', 'crossroads', 'event-source-polyfill', 'history', 'isomorphic-fetch', 'style-loader', 'jquery'], - }, - output: { - path: path.join(__dirname, 'wwwroot', 'dist'), - filename: '[name].js', - library: '[name]_[hash]', - }, - plugins: [ - extractCSS, - new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) - new webpack.optimize.OccurenceOrderPlugin(), - new webpack.DllPlugin({ - path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), - name: '[name]_[hash]' - }) - ].concat(isDevBuild ? [] : [ - new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }) - ]) -}; diff --git a/templates/KnockoutSpa/wwwroot/dist/_placeholder.txt b/templates/KnockoutSpa/wwwroot/dist/_placeholder.txt deleted file mode 100644 index b22cc154..00000000 --- a/templates/KnockoutSpa/wwwroot/dist/_placeholder.txt +++ /dev/null @@ -1,9 +0,0 @@ ------------------------------------------------------------------- -Don't delete this file. Do include it in your source control repo. ------------------------------------------------------------------- - -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/KnockoutSpa/wwwroot/favicon.ico b/templates/KnockoutSpa/wwwroot/favicon.ico deleted file mode 100755 index a3a79998..00000000 Binary files a/templates/KnockoutSpa/wwwroot/favicon.ico and /dev/null differ diff --git a/templates/ReactReduxSpa/.babelrc b/templates/ReactReduxSpa/.babelrc deleted file mode 100644 index 86c445f5..00000000 --- a/templates/ReactReduxSpa/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015", "react"] -} diff --git a/templates/ReactReduxSpa/ClientApp/boot-client.tsx b/templates/ReactReduxSpa/ClientApp/boot-client.tsx deleted file mode 100644 index 4dc12af3..00000000 --- a/templates/ReactReduxSpa/ClientApp/boot-client.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import './css/site.css'; -import 'bootstrap'; -import * as React from 'react'; -import * as ReactDOM from 'react-dom'; -import { browserHistory, Router } from 'react-router'; -import { Provider } from 'react-redux'; -import { syncHistoryWithStore } from 'react-router-redux'; -import routes from './routes'; -import configureStore from './configureStore'; -import { ApplicationState } from './store'; - -// Get the application-wide store instance, prepopulating with state from the server where available. -const initialState = (window as any).initialReduxState as ApplicationState; -const store = configureStore(initialState); -const history = syncHistoryWithStore(browserHistory, store); - -// This code starts up the React app when it runs in a browser. It sets up the routing configuration -// and injects the app into a DOM element. -ReactDOM.render( - - - , - document.getElementById('react-app') -); diff --git a/templates/ReactReduxSpa/ClientApp/boot-server.tsx b/templates/ReactReduxSpa/ClientApp/boot-server.tsx deleted file mode 100644 index 62aefcfa..00000000 --- a/templates/ReactReduxSpa/ClientApp/boot-server.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import * as React from 'react'; -import { Provider } from 'react-redux'; -import { renderToString } from 'react-dom/server'; -import { match, RouterContext } from 'react-router'; -import createMemoryHistory from 'history/lib/createMemoryHistory'; -import routes from './routes'; -import configureStore from './configureStore'; -type BootResult = { html?: string, globals?: { [key: string]: any }, redirectUrl?: string}; - -export default function (params: any): Promise<{ html: string }> { - return new Promise((resolve, reject) => { - // Match the incoming request against the list of client-side routes - match({ routes, location: params.location }, (error, redirectLocation, renderProps: any) => { - if (error) { - throw error; - } - - // If there's a redirection, just send this information back to the host application - if (redirectLocation) { - resolve({ redirectUrl: redirectLocation.pathname }); - return; - } - - // If it didn't match any route, renderProps will be undefined - if (!renderProps) { - throw new Error(`The location '${ params.url }' doesn't match any route configured in react-router.`); - } - - // Build an instance of the application - const store = configureStore(); - const app = ( - - - - ); - - // Perform an initial render that will cause any async tasks (e.g., data access) to begin - renderToString(app); - - // Once the tasks are done, we can perform the final render - // We also send the redux store state, so the client can continue execution where the server left off - params.domainTasks.then(() => { - resolve({ - html: renderToString(app), - globals: { initialReduxState: store.getState() } - }); - }, reject); // Also propagate any errors back into the host application - }); - }); -} diff --git a/templates/ReactReduxSpa/ClientApp/components/Counter.tsx b/templates/ReactReduxSpa/ClientApp/components/Counter.tsx deleted file mode 100644 index 6b8f05cb..00000000 --- a/templates/ReactReduxSpa/ClientApp/components/Counter.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import * as React from 'react'; -import { Link } from 'react-router'; -import { provide } from 'redux-typed'; -import { ApplicationState } from '../store'; -import * as CounterStore from '../store/Counter'; - -class Counter extends React.Component { - public render() { - return
    -

    Counter

    - -

    This is a simple example of a React component.

    - -

    Current count: { this.props.count }

    - - -
    ; - } -} - -// Build the CounterProps type, which allows the component to be strongly typed -const provider = provide( - (state: ApplicationState) => state.counter, // Select which part of global state maps to this component - CounterStore.actionCreators // Select which action creators should be exposed to this component -); -type CounterProps = typeof provider.allProps; -export default provider.connect(Counter); diff --git a/templates/ReactReduxSpa/ClientApp/components/FetchData.tsx b/templates/ReactReduxSpa/ClientApp/components/FetchData.tsx deleted file mode 100644 index d204029a..00000000 --- a/templates/ReactReduxSpa/ClientApp/components/FetchData.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import * as React from 'react'; -import { Link } from 'react-router'; -import { provide } from 'redux-typed'; -import { ApplicationState } from '../store'; -import * as WeatherForecastsState from '../store/WeatherForecasts'; - -interface RouteParams { - startDateIndex: string; -} - -class FetchData extends React.Component { - componentWillMount() { - // This method runs when the component is first added to the page - let startDateIndex = parseInt(this.props.params.startDateIndex) || 0; - this.props.requestWeatherForecasts(startDateIndex); - } - - componentWillReceiveProps(nextProps: WeatherForecastProps) { - // This method runs when incoming props (e.g., route params) change - let startDateIndex = parseInt(nextProps.params.startDateIndex) || 0; - this.props.requestWeatherForecasts(startDateIndex); - } - - public render() { - return
    -

    Weather forecast

    -

    This component demonstrates fetching data from the server and working with URL parameters.

    - { this.renderForecastsTable() } - { this.renderPagination() } -
    ; - } - - private renderForecastsTable() { - return - - - - - - - - - - {this.props.forecasts.map(forecast => - - - - - - - )} - -
    DateTemp. (C)Temp. (F)Summary
    { forecast.dateFormatted }{ forecast.temperatureC }{ forecast.temperatureF }{ forecast.summary }
    ; - } - - private renderPagination() { - let prevStartDateIndex = this.props.startDateIndex - 5; - let nextStartDateIndex = this.props.startDateIndex + 5; - - return

    - Previous - Next - { this.props.isLoading ? Loading... : [] } -

    ; - } -} - -// Build the WeatherForecastProps type, which allows the component to be strongly typed -const provider = provide( - (state: ApplicationState) => state.weatherForecasts, // Select which part of global state maps to this component - WeatherForecastsState.actionCreators // Select which action creators should be exposed to this component -).withExternalProps<{ params: RouteParams }>(); // Also include a 'params' property on WeatherForecastProps -type WeatherForecastProps = typeof provider.allProps; -export default provider.connect(FetchData); diff --git a/templates/ReactReduxSpa/ClientApp/components/Home.tsx b/templates/ReactReduxSpa/ClientApp/components/Home.tsx deleted file mode 100644 index 50995624..00000000 --- a/templates/ReactReduxSpa/ClientApp/components/Home.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import * as React from 'react'; - -export default class Home extends React.Component { - public render() { - return
    -

    Hello, world!

    -

    Welcome to your new single-page application, built with:

    - -

    To help you get started, we've also set up:

    -
      -
    • Client-side navigation. For example, click Counter then Back to return here.
    • -
    • Webpack dev middleware. In development mode, there's no need to run the webpack build tool. Your client-side resources are dynamically built on demand. Updates are available as soon as you modify any file.
    • -
    • Hot module replacement. In development mode, you don't even need to reload the page after making most changes. Within seconds of saving changes to files, rebuilt React components will be injected directly into your running application, preserving its live state.
    • -
    • Efficient production builds. In production mode, development-time features are disabled, and the webpack build tool produces minified static CSS and JavaScript files.
    • -
    • Server-side prerendering. To optimize startup time, your React application is first rendered on the server. The initial HTML and state is then transferred to the browser, where client-side code picks up where the server left off.
    • -
    -
    ; - } -} diff --git a/templates/ReactReduxSpa/ClientApp/components/Layout.tsx b/templates/ReactReduxSpa/ClientApp/components/Layout.tsx deleted file mode 100644 index b9f877bd..00000000 --- a/templates/ReactReduxSpa/ClientApp/components/Layout.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import * as React from 'react'; -import { NavMenu } from './NavMenu'; - -export interface LayoutProps { - body: React.ReactElement; -} - -export class Layout extends React.Component { - public render() { - return
    -
    -
    - -
    -
    - { this.props.body } -
    -
    -
    ; - } -} diff --git a/templates/ReactReduxSpa/ClientApp/components/NavMenu.tsx b/templates/ReactReduxSpa/ClientApp/components/NavMenu.tsx deleted file mode 100644 index e3158f61..00000000 --- a/templates/ReactReduxSpa/ClientApp/components/NavMenu.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import * as React from 'react'; -import { Link } from 'react-router'; - -export class NavMenu extends React.Component { - public render() { - return
    -
    -
    - - WebApplicationBasic -
    -
    -
    -
      -
    • - - Home - -
    • -
    • - - Counter - -
    • -
    • - - Fetch data - -
    • -
    -
    -
    -
    ; - } -} diff --git a/templates/ReactReduxSpa/ClientApp/configureStore.ts b/templates/ReactReduxSpa/ClientApp/configureStore.ts deleted file mode 100644 index b7788452..00000000 --- a/templates/ReactReduxSpa/ClientApp/configureStore.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { createStore, applyMiddleware, compose, combineReducers, GenericStoreEnhancer } from 'redux'; -import thunk from 'redux-thunk'; -import { routerReducer } from 'react-router-redux'; -import * as Store from './store'; -import { typedToPlain } from 'redux-typed'; - -export default function configureStore(initialState?: Store.ApplicationState) { - // Build middleware. These are functions that can process the actions before they reach the store. - const windowIfDefined = typeof window === 'undefined' ? null : window as any; - // If devTools is installed, connect to it - const devToolsExtension = windowIfDefined && windowIfDefined.devToolsExtension as () => GenericStoreEnhancer; - const createStoreWithMiddleware = compose( - applyMiddleware(thunk, typedToPlain), - devToolsExtension ? devToolsExtension() : f => f - )(createStore); - - // Combine all reducers and instantiate the app-wide store instance - const allReducers = buildRootReducer(Store.reducers); - const store = createStoreWithMiddleware(allReducers, initialState) as Redux.Store; - - // Enable Webpack hot module replacement for reducers - if (module.hot) { - module.hot.accept('./store', () => { - const nextRootReducer = require('./store'); - store.replaceReducer(buildRootReducer(nextRootReducer.reducers)); - }); - } - - return store; -} - -function buildRootReducer(allReducers) { - return combineReducers(Object.assign({}, allReducers, { routing: routerReducer })); -} diff --git a/templates/ReactReduxSpa/ClientApp/css/site.css b/templates/ReactReduxSpa/ClientApp/css/site.css deleted file mode 100755 index 3058af68..00000000 --- a/templates/ReactReduxSpa/ClientApp/css/site.css +++ /dev/null @@ -1,66 +0,0 @@ -.main-nav li .glyphicon { - margin-right: 10px; -} - -/* Highlighting rules for nav menu items */ -.main-nav li a.active, -.main-nav li a.active:hover, -.main-nav li a.active:focus { - background-color: #4189C7; - color: white; -} - -/* Keep the nav menu independent of scrolling and on top of other items */ -.main-nav { - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 1; -} - -@media (max-width: 767px) { - /* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */ - body { - padding-top: 50px; - } -} - -@media (min-width: 768px) { - /* On small screens, convert the nav menu to a vertical sidebar */ - .main-nav { - height: 100%; - width: calc(25% - 20px); - } - .main-nav .navbar { - border-radius: 0px; - border-width: 0px; - height: 100%; - } - .main-nav .navbar-header { - float: none; - } - .main-nav .navbar-collapse { - border-top: 1px solid #444; - padding: 0px; - } - .main-nav .navbar ul { - float: none; - } - .main-nav .navbar li { - float: none; - font-size: 15px; - margin: 6px; - } - .main-nav .navbar li a { - padding: 10px 16px; - border-radius: 4px; - } - .main-nav .navbar a { - /* If a menu item's text is too long, truncate it */ - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } -} diff --git a/templates/ReactReduxSpa/ClientApp/dist/_placeholder.txt b/templates/ReactReduxSpa/ClientApp/dist/_placeholder.txt deleted file mode 100644 index b22cc154..00000000 --- a/templates/ReactReduxSpa/ClientApp/dist/_placeholder.txt +++ /dev/null @@ -1,9 +0,0 @@ ------------------------------------------------------------------- -Don't delete this file. Do include it in your source control repo. ------------------------------------------------------------------- - -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/ReactReduxSpa/ClientApp/routes.tsx b/templates/ReactReduxSpa/ClientApp/routes.tsx deleted file mode 100644 index 6845bfbb..00000000 --- a/templates/ReactReduxSpa/ClientApp/routes.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import * as React from 'react'; -import { Router, Route, HistoryBase } from 'react-router'; -import { Layout } from './components/Layout'; -import Home from './components/Home'; -import FetchData from './components/FetchData'; -import Counter from './components/Counter'; - -export default - - - - { /* Optional route segment that does not affect NavMenu highlighting */ } - -; - -// Enable Hot Module Replacement (HMR) -if (module.hot) { - module.hot.accept(); -} diff --git a/templates/ReactReduxSpa/ClientApp/store/Counter.ts b/templates/ReactReduxSpa/ClientApp/store/Counter.ts deleted file mode 100644 index 67eee6b4..00000000 --- a/templates/ReactReduxSpa/ClientApp/store/Counter.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { typeName, isActionType, Action, Reducer } from 'redux-typed'; -import { ActionCreator } from './'; - -// ----------------- -// STATE - This defines the type of data maintained in the Redux store. - -export interface CounterState { - count: number; -} - -// ----------------- -// ACTIONS - These are serializable (hence replayable) descriptions of state transitions. -// They do not themselves have any side-effects; they just describe something that is going to happen. -// Use @typeName and isActionType for type detection that works even after serialization/deserialization. - -@typeName("INCREMENT_COUNT") -class IncrementCount extends Action { -} - -// ---------------- -// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition. -// They don't directly mutate state, but they can have external side-effects (such as loading data). - -export const actionCreators = { - increment: (): ActionCreator => (dispatch, getState) => { - dispatch(new IncrementCount()); - } -}; - -// ---------------- -// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state. -export const reducer: Reducer = (state, action) => { - if (isActionType(action, IncrementCount)) { - return { count: state.count + 1 }; - } - - // For unrecognized actions (or in cases where actions have no effect), must return the existing state - // (or default initial state if none was supplied) - return state || { count: 0 }; -}; diff --git a/templates/ReactReduxSpa/ClientApp/store/WeatherForecasts.ts b/templates/ReactReduxSpa/ClientApp/store/WeatherForecasts.ts deleted file mode 100644 index 3101a7dd..00000000 --- a/templates/ReactReduxSpa/ClientApp/store/WeatherForecasts.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { fetch, addTask } from 'domain-task'; -import { typeName, isActionType, Action, Reducer } from 'redux-typed'; -import { ActionCreator } from './'; - -// ----------------- -// STATE - This defines the type of data maintained in the Redux store. - -export interface WeatherForecastsState { - isLoading: boolean; - startDateIndex: number; - forecasts: WeatherForecast[]; -} - -export interface WeatherForecast { - dateFormatted: string; - temperatureC: number; - temperatureF: number; - summary: string; -} - -// ----------------- -// ACTIONS - These are serializable (hence replayable) descriptions of state transitions. -// They do not themselves have any side-effects; they just describe something that is going to happen. -// Use @typeName and isActionType for type detection that works even after serialization/deserialization. - -@typeName("REQUEST_WEATHER_FORECASTS") -class RequestWeatherForecasts extends Action { - constructor(public startDateIndex: number) { - super(); - } -} - -@typeName("RECEIVE_WEATHER_FORECASTS") -class ReceiveWeatherForecasts extends Action { - constructor(public startDateIndex: number, public forecasts: WeatherForecast[]) { - super(); - } -} - -// ---------------- -// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition. -// They don't directly mutate state, but they can have external side-effects (such as loading data). - -export const actionCreators = { - requestWeatherForecasts: (startDateIndex: number): ActionCreator => (dispatch, getState) => { - // Only load data if it's something we don't already have (and are not already loading) - if (startDateIndex !== getState().weatherForecasts.startDateIndex) { - let fetchTask = fetch(`/api/SampleData/WeatherForecasts?startDateIndex=${ startDateIndex }`) - .then(response => response.json()) - .then((data: WeatherForecast[]) => { - dispatch(new ReceiveWeatherForecasts(startDateIndex, data)); - }); - - addTask(fetchTask); // Ensure server-side prerendering waits for this to complete - dispatch(new RequestWeatherForecasts(startDateIndex)); - } - } -}; - -// ---------------- -// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state. -const unloadedState: WeatherForecastsState = { startDateIndex: null, forecasts: [], isLoading: false }; -export const reducer: Reducer = (state, action) => { - if (isActionType(action, RequestWeatherForecasts)) { - return { startDateIndex: action.startDateIndex, isLoading: true, forecasts: state.forecasts }; - } else if (isActionType(action, ReceiveWeatherForecasts)) { - // Only accept the incoming data if it matches the most recent request. This ensures we correctly - // handle out-of-order responses. - if (action.startDateIndex === state.startDateIndex) { - return { startDateIndex: action.startDateIndex, forecasts: action.forecasts, isLoading: false }; - } - } - - // For unrecognized actions (or in cases where actions have no effect), must return the existing state - // (or default initial state if none was supplied) - return state || unloadedState; -}; diff --git a/templates/ReactReduxSpa/ClientApp/store/index.ts b/templates/ReactReduxSpa/ClientApp/store/index.ts deleted file mode 100644 index 1f4798b4..00000000 --- a/templates/ReactReduxSpa/ClientApp/store/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ActionCreatorGeneric } from 'redux-typed'; -import * as WeatherForecasts from './WeatherForecasts'; -import * as Counter from './Counter'; - -// The top-level state object -export interface ApplicationState { - counter: Counter.CounterState, - weatherForecasts: WeatherForecasts.WeatherForecastsState -} - -// Whenever an action is dispatched, Redux will update each top-level application state property using -// the reducer with the matching name. It's important that the names match exactly, and that the reducer -// acts on the corresponding ApplicationState property type. -export const reducers = { - counter: Counter.reducer, - weatherForecasts: WeatherForecasts.reducer -}; - -// This type can be used as a hint on action creators so that its 'dispatch' and 'getState' params are -// correctly typed to match your store. -export type ActionCreator = ActionCreatorGeneric; diff --git a/templates/ReactReduxSpa/Controllers/HomeController.cs b/templates/ReactReduxSpa/Controllers/HomeController.cs deleted file mode 100755 index 9d75da88..00000000 --- a/templates/ReactReduxSpa/Controllers/HomeController.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace WebApplicationBasic.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - - public IActionResult Error() - { - return View(); - } - } -} diff --git a/templates/ReactReduxSpa/Controllers/SampleDataController.cs b/templates/ReactReduxSpa/Controllers/SampleDataController.cs deleted file mode 100644 index 69724757..00000000 --- a/templates/ReactReduxSpa/Controllers/SampleDataController.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace WebApplicationBasic.Controllers -{ - [Route("api/[controller]")] - public class SampleDataController : Controller - { - private static string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - [HttpGet("[action]")] - public IEnumerable WeatherForecasts(int startDateIndex) - { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - DateFormatted = DateTime.Now.AddDays(index + startDateIndex).ToString("d"), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }); - } - - public class WeatherForecast - { - public string DateFormatted { get; set; } - public int TemperatureC { get; set; } - public string Summary { get; set; } - - public int TemperatureF - { - get - { - return 32 + (int)(TemperatureC / 0.5556); - } - } - } - } -} diff --git a/templates/ReactReduxSpa/Dockerfile b/templates/ReactReduxSpa/Dockerfile deleted file mode 100644 index b4620123..00000000 --- a/templates/ReactReduxSpa/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM microsoft/dotnet:latest - -RUN apt-get update -RUN wget -qO- https://deb.nodesource.com/setup_4.x | bash - -RUN apt-get install -y build-essential nodejs - -WORKDIR /app - -COPY project.json . -RUN ["dotnet", "restore"] - -COPY . /app -RUN ["dotnet", "build"] - -EXPOSE 5000/tcp - -ENTRYPOINT ["dotnet", "run", "--server.urls", "http://0.0.0.0:5000"] diff --git a/templates/ReactReduxSpa/Program.cs b/templates/ReactReduxSpa/Program.cs deleted file mode 100644 index b2e5e4b8..00000000 --- a/templates/ReactReduxSpa/Program.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; - -namespace WebApplicationBasic -{ - public class Program - { - public static void Main(string[] args) - { - var config = new ConfigurationBuilder() - .AddCommandLine(args) - .AddEnvironmentVariables(prefix: "ASPNETCORE_") - .Build(); - - var host = new WebHostBuilder() - .UseConfiguration(config) - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/templates/ReactReduxSpa/README.md b/templates/ReactReduxSpa/README.md deleted file mode 100644 index d8ba0b38..00000000 --- a/templates/ReactReduxSpa/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Welcome to ASP.NET Core - -We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new. - -You've created a new ASP.NET Core project. [Learn what's new](https://go.microsoft.com/fwlink/?LinkId=518016) - -## This application consists of: - -* Sample pages using ASP.NET Core MVC -* [Gulp](https://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](https://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side libraries -* Theming using [Bootstrap](https://go.microsoft.com/fwlink/?LinkID=398939) - -## How to - -* [Add a Controller and View](https://go.microsoft.com/fwlink/?LinkID=398600) -* [Add an appsetting in config and access it in app.](https://go.microsoft.com/fwlink/?LinkID=699562) -* [Manage User Secrets using Secret Manager.](https://go.microsoft.com/fwlink/?LinkId=699315) -* [Use logging to log a message.](https://go.microsoft.com/fwlink/?LinkId=699316) -* [Add packages using NuGet.](https://go.microsoft.com/fwlink/?LinkId=699317) -* [Add client packages using Bower.](https://go.microsoft.com/fwlink/?LinkId=699318) -* [Target development, staging or production environment.](https://go.microsoft.com/fwlink/?LinkId=699319) - -## Overview - -* [Conceptual overview of what is ASP.NET Core](https://go.microsoft.com/fwlink/?LinkId=518008) -* [Fundamentals of ASP.NET Core such as Startup and middleware.](https://go.microsoft.com/fwlink/?LinkId=699320) -* [Working with Data](https://go.microsoft.com/fwlink/?LinkId=398602) -* [Security](https://go.microsoft.com/fwlink/?LinkId=398603) -* [Client side development](https://go.microsoft.com/fwlink/?LinkID=699321) -* [Develop on different platforms](https://go.microsoft.com/fwlink/?LinkID=699322) -* [Read more on the documentation site](https://go.microsoft.com/fwlink/?LinkID=699323) - -## Run & Deploy - -* [Run your app](https://go.microsoft.com/fwlink/?LinkID=517851) -* [Run tools such as EF migrations and more](https://go.microsoft.com/fwlink/?LinkID=517853) -* [Publish to Microsoft Azure Web Apps](https://go.microsoft.com/fwlink/?LinkID=398609) - -We would love to hear your [feedback](https://go.microsoft.com/fwlink/?LinkId=518015) diff --git a/templates/ReactReduxSpa/ReactReduxSpa.xproj b/templates/ReactReduxSpa/ReactReduxSpa.xproj deleted file mode 100644 index f3701ba6..00000000 --- a/templates/ReactReduxSpa/ReactReduxSpa.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - true - - - - dbfc6db0-a6d1-4694-a108-1c604b988da3 - ReactReduxSpa - .\obj - .\bin\ - v4.5.2 - - - 2.0 - - - \ No newline at end of file diff --git a/templates/ReactReduxSpa/Startup.cs b/templates/ReactReduxSpa/Startup.cs deleted file mode 100755 index 750d79c0..00000000 --- a/templates/ReactReduxSpa/Startup.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.SpaServices.Webpack; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace WebApplicationBasic -{ - public class Startup - { - public Startup(IHostingEnvironment env) - { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) - .AddEnvironmentVariables(); - Configuration = builder.Build(); - } - - public IConfigurationRoot Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - // Add framework services. - services.AddMvc(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) - { - loggerFactory.AddConsole(Configuration.GetSection("Logging")); - loggerFactory.AddDebug(); - - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { - HotModuleReplacement = true, - ReactHotModuleReplacement = true - }); - } - else - { - app.UseExceptionHandler("/Home/Error"); - } - - app.UseStaticFiles(); - - app.UseMvc(routes => - { - routes.MapRoute( - name: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - - routes.MapSpaFallbackRoute( - name: "spa-fallback", - defaults: new { controller = "Home", action = "Index" }); - }); - } - } -} diff --git a/templates/ReactReduxSpa/Views/Home/Index.cshtml b/templates/ReactReduxSpa/Views/Home/Index.cshtml deleted file mode 100644 index a53a97e7..00000000 --- a/templates/ReactReduxSpa/Views/Home/Index.cshtml +++ /dev/null @@ -1,9 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -
    Loading...
    - -@section scripts { - -} diff --git a/templates/ReactReduxSpa/Views/Shared/Error.cshtml b/templates/ReactReduxSpa/Views/Shared/Error.cshtml deleted file mode 100755 index 473b35d6..00000000 --- a/templates/ReactReduxSpa/Views/Shared/Error.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Error"; -} - -

    Error.

    -

    An error occurred while processing your request.

    diff --git a/templates/ReactReduxSpa/Views/Shared/_Layout.cshtml b/templates/ReactReduxSpa/Views/Shared/_Layout.cshtml deleted file mode 100644 index 67338828..00000000 --- a/templates/ReactReduxSpa/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - @ViewData["Title"] - WebApplicationBasic - - - - - - @RenderBody() - - - @RenderSection("scripts", required: false) - - diff --git a/templates/ReactReduxSpa/Views/_ViewImports.cshtml b/templates/ReactReduxSpa/Views/_ViewImports.cshtml deleted file mode 100755 index e7b4f83f..00000000 --- a/templates/ReactReduxSpa/Views/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using WebApplicationBasic -@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" -@addTagHelper "*, Microsoft.AspNetCore.SpaServices" diff --git a/templates/ReactReduxSpa/Views/_ViewStart.cshtml b/templates/ReactReduxSpa/Views/_ViewStart.cshtml deleted file mode 100755 index 820a2f6e..00000000 --- a/templates/ReactReduxSpa/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/templates/ReactReduxSpa/appsettings.json b/templates/ReactReduxSpa/appsettings.json deleted file mode 100755 index 723c096a..00000000 --- a/templates/ReactReduxSpa/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/templates/ReactReduxSpa/package.json b/templates/ReactReduxSpa/package.json deleted file mode 100644 index 293c109f..00000000 --- a/templates/ReactReduxSpa/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "WebApplicationBasic", - "version": "0.0.0", - "dependencies": { - "@types/react": "^0.14.29", - "@types/react-dom": "^0.14.14", - "@types/react-redux": "^4.4.29", - "@types/react-router": "^2.0.30", - "@types/react-router-redux": "^4.0.30", - "@types/redux": "3.5.27", - "@types/redux-thunk": "^2.1.28", - "@types/source-map": "^0.1.28", - "@types/uglify-js": "^2.0.27", - "@types/webpack": "^1.12.35", - "@types/webpack-env": "^1.12.1", - "@types/whatwg-fetch": "0.0.28", - "aspnet-prerendering": "^1.0.7", - "aspnet-webpack": "^1.0.17", - "aspnet-webpack-react": "^1.0.2", - "babel-core": "^6.5.2", - "babel-loader": "^6.2.3", - "babel-preset-es2015": "^6.5.0", - "babel-preset-react": "^6.5.0", - "bootstrap": "^3.3.6", - "css-loader": "^0.23.1", - "domain-task": "^2.0.1", - "event-source-polyfill": "^0.0.7", - "extract-text-webpack-plugin": "^1.0.1", - "file-loader": "^0.8.5", - "jquery": "^2.2.1", - "react": "^15.3.2", - "react-dom": "^15.3.2", - "react-redux": "^4.4.5", - "react-router": "^2.8.1", - "react-router-redux": "^4.0.6", - "redux": "^3.6.0", - "redux-thunk": "^2.1.0", - "redux-typed": "^2.0.0", - "style-loader": "^0.13.0", - "ts-loader": "^0.8.1", - "typescript": "2.0.3", - "url-loader": "^0.5.7", - "webpack": "^1.13.2", - "webpack-node-externals": "^1.4.3", - "webpack-hot-middleware": "^2.12.2", - "webpack-merge": "^0.14.1" - } -} diff --git a/templates/ReactReduxSpa/project.json b/templates/ReactReduxSpa/project.json deleted file mode 100755 index a6bb0e34..00000000 --- a/templates/ReactReduxSpa/project.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.1", - "type": "platform" - }, - "Microsoft.AspNetCore.ReactServices": "1.0.0-*", - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.Mvc": "1.0.1", - "Microsoft.AspNetCore.Razor.Tools": { - "version": "1.0.0-preview2-final", - "type": "build" - }, - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", - "Microsoft.Extensions.Configuration.Json": "1.0.0", - "Microsoft.Extensions.Configuration.CommandLine": "1.0.0", - "Microsoft.Extensions.Logging": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0", - "Microsoft.Extensions.Logging.Debug": "1.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0" - }, - - "tools": { - "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", - "Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final" - }, - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "portable-net45+win8" - ] - } - }, - - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true, - "compile": { - "exclude": ["node_modules"] - } - }, - - "runtimeOptions": { - "configProperties": { - "System.GC.Server": true - } - }, - - "publishOptions": { - "include": [ - "appsettings.json", - "ClientApp/dist", - "node_modules", - "Views", - "web.config", - "wwwroot" - ], - "exclude": [ - "wwwroot/dist/*.map" - ] - }, - - "scripts": { - "prepublish": [ - "npm install", - "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod", - "node node_modules/webpack/bin/webpack.js --env.prod" - ], - "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] - }, - - "tooling": { - "defaultNamespace": "WebApplicationBasic" - } -} diff --git a/templates/ReactReduxSpa/template_gitignore b/templates/ReactReduxSpa/template_gitignore deleted file mode 100644 index bc5a6f34..00000000 --- a/templates/ReactReduxSpa/template_gitignore +++ /dev/null @@ -1,247 +0,0 @@ -/Properties/launchSettings.json - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -bin/ -Bin/ -obj/ -Obj/ - -# Visual Studio 2015 cache/options directory -.vs/ -/wwwroot/dist/** -/ClientApp/dist/** - -# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 -!/wwwroot/dist/_placeholder.txt -!/ClientApp/dist/_placeholder.txt - -/yarn.lock - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Microsoft Azure ApplicationInsights config file -ApplicationInsights.config - -# Windows Store app package directory -AppPackages/ -BundleArtifacts/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -orleans.codegen.cs - -# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 -/node_modules/** -!/node_modules/_placeholder.txt - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe - -# FAKE - F# Make -.fake/ diff --git a/templates/ReactReduxSpa/template_nodemodules_placeholder.txt b/templates/ReactReduxSpa/template_nodemodules_placeholder.txt deleted file mode 100644 index 09ae8c0c..00000000 --- a/templates/ReactReduxSpa/template_nodemodules_placeholder.txt +++ /dev/null @@ -1,7 +0,0 @@ -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started, which means it's not enough just to -run 'npm install' during publishing: you need to ensure node_modules already -existed at least). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/ReactReduxSpa/tsconfig.json b/templates/ReactReduxSpa/tsconfig.json deleted file mode 100644 index 960a981b..00000000 --- a/templates/ReactReduxSpa/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "moduleResolution": "node", - "target": "es6", - "jsx": "preserve", - "experimentalDecorators": true, - "sourceMap": true, - "skipDefaultLibCheck": true, - "lib": ["es6", "dom"], - "types": [ "webpack-env", "whatwg-fetch" ], - "paths": { - // Fixes "Duplicate identifier 'Redux'" error when packages were installed via Yarn (by specifying which .d.ts file is authoritative) - "redux": ["./node_modules/@types/redux/index"] - } - }, - "exclude": [ - "bin", - "node_modules" - ] -} diff --git a/templates/ReactReduxSpa/web.config b/templates/ReactReduxSpa/web.config deleted file mode 100644 index a8d66727..00000000 --- a/templates/ReactReduxSpa/web.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/templates/ReactReduxSpa/webpack.config.js b/templates/ReactReduxSpa/webpack.config.js deleted file mode 100644 index 9398d50a..00000000 --- a/templates/ReactReduxSpa/webpack.config.js +++ /dev/null @@ -1,66 +0,0 @@ -var isDevBuild = process.argv.indexOf('--env.prod') < 0; -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); -var nodeExternals = require('webpack-node-externals'); -var merge = require('webpack-merge'); -var allFilenamesExceptJavaScript = /\.(?!js(\?|$))([^.]+(\?|$))/; - -// Configuration in common to both client-side and server-side bundles -var sharedConfig = () => ({ - resolve: { extensions: [ '', '.js', '.jsx', '.ts', '.tsx' ] }, - output: { - filename: '[name].js', - publicPath: '/dist/' // Webpack dev middleware, if enabled, handles requests for this URL prefix - }, - module: { - loaders: [ - { test: /\.tsx?$/, include: /ClientApp/, loader: 'babel-loader' }, - { test: /\.tsx?$/, include: /ClientApp/, loader: 'ts', query: { silent: true } } - ] - } -}); - -// Configuration for client-side bundle suitable for running in browsers -var clientBundleOutputDir = './wwwroot/dist'; -var clientBundleConfig = merge(sharedConfig(), { - entry: { 'main-client': './ClientApp/boot-client.tsx' }, - module: { - loaders: [ - { test: /\.css$/, loader: ExtractTextPlugin.extract(['css']) }, - { test: /\.(png|jpg|jpeg|gif|svg)$/, loader: 'url', query: { limit: 25000 } } - ] - }, - output: { path: path.join(__dirname, clientBundleOutputDir) }, - plugins: [ - new ExtractTextPlugin('site.css'), - new webpack.DllReferencePlugin({ - context: __dirname, - manifest: require('./wwwroot/dist/vendor-manifest.json') - }) - ].concat(isDevBuild ? [ - // Plugins that apply in development builds only - new webpack.SourceMapDevToolPlugin({ - filename: '[file].map', // Remove this line if you prefer inline source maps - moduleFilenameTemplate: path.relative(clientBundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk - }) - ] : [ - // Plugins that apply in production builds only - new webpack.optimize.OccurenceOrderPlugin(), - new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }) - ]) -}); - -// Configuration for server-side (prerendering) bundle suitable for running in Node -var serverBundleConfig = merge(sharedConfig(), { - entry: { 'main-server': './ClientApp/boot-server.tsx' }, - output: { - libraryTarget: 'commonjs', - path: path.join(__dirname, './ClientApp/dist') - }, - target: 'node', - devtool: 'inline-source-map', - externals: [nodeExternals({ whitelist: [allFilenamesExceptJavaScript] })] // Don't bundle .js files from node_modules -}); - -module.exports = [clientBundleConfig, serverBundleConfig]; diff --git a/templates/ReactReduxSpa/webpack.config.vendor.js b/templates/ReactReduxSpa/webpack.config.vendor.js deleted file mode 100644 index 96d6bc31..00000000 --- a/templates/ReactReduxSpa/webpack.config.vendor.js +++ /dev/null @@ -1,39 +0,0 @@ -var isDevBuild = process.argv.indexOf('--env.prod') < 0; -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); -var extractCSS = new ExtractTextPlugin('vendor.css'); - -module.exports = { - resolve: { - extensions: [ '', '.js' ] - }, - module: { - loaders: [ - { test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, loader: 'url-loader?limit=100000' }, - { test: /\.css(\?|$)/, loader: extractCSS.extract(['css']) } - ] - }, - entry: { - vendor: ['bootstrap', 'bootstrap/dist/css/bootstrap.css', 'domain-task', 'event-source-polyfill', 'react', 'react-dom', 'react-router', 'redux', 'redux-thunk', 'react-router-redux', 'redux-typed', 'style-loader', 'jquery'], - }, - output: { - path: path.join(__dirname, 'wwwroot', 'dist'), - filename: '[name].js', - library: '[name]_[hash]', - }, - plugins: [ - extractCSS, - new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) - new webpack.optimize.OccurenceOrderPlugin(), - new webpack.DllPlugin({ - path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), - name: '[name]_[hash]' - }), - new webpack.DefinePlugin({ - 'process.env.NODE_ENV': isDevBuild ? '"development"' : '"production"' - }) - ].concat(isDevBuild ? [] : [ - new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }) - ]) -}; diff --git a/templates/ReactReduxSpa/wwwroot/dist/_placeholder.txt b/templates/ReactReduxSpa/wwwroot/dist/_placeholder.txt deleted file mode 100644 index b22cc154..00000000 --- a/templates/ReactReduxSpa/wwwroot/dist/_placeholder.txt +++ /dev/null @@ -1,9 +0,0 @@ ------------------------------------------------------------------- -Don't delete this file. Do include it in your source control repo. ------------------------------------------------------------------- - -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/ReactReduxSpa/wwwroot/favicon.ico b/templates/ReactReduxSpa/wwwroot/favicon.ico deleted file mode 100755 index a3a79998..00000000 Binary files a/templates/ReactReduxSpa/wwwroot/favicon.ico and /dev/null differ diff --git a/templates/ReactSpa/.babelrc b/templates/ReactSpa/.babelrc deleted file mode 100644 index 86c445f5..00000000 --- a/templates/ReactSpa/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015", "react"] -} diff --git a/templates/ReactSpa/ClientApp/boot.tsx b/templates/ReactSpa/ClientApp/boot.tsx deleted file mode 100644 index 129f349d..00000000 --- a/templates/ReactSpa/ClientApp/boot.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import './css/site.css'; - -import * as React from 'react'; -import * as ReactDOM from 'react-dom'; -import { browserHistory, Router } from 'react-router'; -import routes from './routes'; - -// This code starts up the React app when it runs in a browser. It sets up the routing configuration -// and injects the app into a DOM element. -ReactDOM.render( - , - document.getElementById('react-app') -); diff --git a/templates/ReactSpa/ClientApp/components/Counter.tsx b/templates/ReactSpa/ClientApp/components/Counter.tsx deleted file mode 100644 index 233bed06..00000000 --- a/templates/ReactSpa/ClientApp/components/Counter.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import * as React from 'react'; - -interface CounterState { - currentCount: number; -} - -export class Counter extends React.Component { - constructor() { - super(); - this.state = { currentCount: 0 }; - } - - public render() { - return
    -

    Counter

    - -

    This is a simple example of a React component.

    - -

    Current count: { this.state.currentCount }

    - - -
    ; - } - - incrementCounter() { - this.setState({ - currentCount: this.state.currentCount + 1 - }); - } -} diff --git a/templates/ReactSpa/ClientApp/components/FetchData.tsx b/templates/ReactSpa/ClientApp/components/FetchData.tsx deleted file mode 100644 index 2ee2f1d1..00000000 --- a/templates/ReactSpa/ClientApp/components/FetchData.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import * as React from 'react'; -import 'isomorphic-fetch'; - -interface FetchDataExampleState { - forecasts: WeatherForecast[]; - loading: boolean; -} - -export class FetchData extends React.Component { - constructor() { - super(); - this.state = { forecasts: [], loading: true }; - - fetch('/api/SampleData/WeatherForecasts') - .then(response => response.json()) - .then((data: WeatherForecast[]) => { - this.setState({ forecasts: data, loading: false }); - }); - } - - public render() { - let contents = this.state.loading - ?

    Loading...

    - : FetchData.renderForecastsTable(this.state.forecasts); - - return
    -

    Weather forecast

    -

    This component demonstrates fetching data from the server.

    - { contents } -

    For more sophisticated applications, consider an architecture such as Redux or Flux for managing state. You can generate an ASP.NET Core application with React and Redux using dotnet new aspnet/spa/reactredux instead of using this template.

    -
    ; - } - - private static renderForecastsTable(forecasts: WeatherForecast[]) { - return - - - - - - - - - - {forecasts.map(forecast => - - - - - - - )} - -
    DateTemp. (C)Temp. (F)Summary
    { forecast.dateFormatted }{ forecast.temperatureC }{ forecast.temperatureF }{ forecast.summary }
    ; - } -} - -interface WeatherForecast { - dateFormatted: string; - temperatureC: number; - temperatureF: number; - summary: string; -} diff --git a/templates/ReactSpa/ClientApp/components/Home.tsx b/templates/ReactSpa/ClientApp/components/Home.tsx deleted file mode 100644 index 9f68e05c..00000000 --- a/templates/ReactSpa/ClientApp/components/Home.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import * as React from 'react'; - -export class Home extends React.Component { - public render() { - return
    -

    Hello, world!

    -

    Welcome to your new single-page application, built with:

    - -

    To help you get started, we've also set up:

    -
      -
    • Client-side navigation. For example, click Counter then Back to return here.
    • -
    • Webpack dev middleware. In development mode, there's no need to run the webpack build tool. Your client-side resources are dynamically built on demand. Updates are available as soon as you modify any file.
    • -
    • Hot module replacement. In development mode, you don't even need to reload the page after making most changes. Within seconds of saving changes to files, rebuilt React components will be injected directly into your running application, preserving its live state.
    • -
    • Efficient production builds. In production mode, development-time features are disabled, and the webpack build tool produces minified static CSS and JavaScript files.
    • -
    -

    Going further

    -

    - For larger applications, or for server-side prerendering (i.e., for isomorphic or universal applications), you should consider using a Flux/Redux-like architecture. - You can generate an ASP.NET Core application with React and Redux using dotnet new aspnet/spa/reactredux instead of using this template. -

    -
    ; - } -} diff --git a/templates/ReactSpa/ClientApp/components/Layout.tsx b/templates/ReactSpa/ClientApp/components/Layout.tsx deleted file mode 100644 index b9f877bd..00000000 --- a/templates/ReactSpa/ClientApp/components/Layout.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import * as React from 'react'; -import { NavMenu } from './NavMenu'; - -export interface LayoutProps { - body: React.ReactElement; -} - -export class Layout extends React.Component { - public render() { - return
    -
    -
    - -
    -
    - { this.props.body } -
    -
    -
    ; - } -} diff --git a/templates/ReactSpa/ClientApp/components/NavMenu.tsx b/templates/ReactSpa/ClientApp/components/NavMenu.tsx deleted file mode 100644 index e3158f61..00000000 --- a/templates/ReactSpa/ClientApp/components/NavMenu.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import * as React from 'react'; -import { Link } from 'react-router'; - -export class NavMenu extends React.Component { - public render() { - return
    -
    -
    - - WebApplicationBasic -
    -
    -
    -
      -
    • - - Home - -
    • -
    • - - Counter - -
    • -
    • - - Fetch data - -
    • -
    -
    -
    -
    ; - } -} diff --git a/templates/ReactSpa/ClientApp/css/site.css b/templates/ReactSpa/ClientApp/css/site.css deleted file mode 100755 index 3058af68..00000000 --- a/templates/ReactSpa/ClientApp/css/site.css +++ /dev/null @@ -1,66 +0,0 @@ -.main-nav li .glyphicon { - margin-right: 10px; -} - -/* Highlighting rules for nav menu items */ -.main-nav li a.active, -.main-nav li a.active:hover, -.main-nav li a.active:focus { - background-color: #4189C7; - color: white; -} - -/* Keep the nav menu independent of scrolling and on top of other items */ -.main-nav { - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 1; -} - -@media (max-width: 767px) { - /* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */ - body { - padding-top: 50px; - } -} - -@media (min-width: 768px) { - /* On small screens, convert the nav menu to a vertical sidebar */ - .main-nav { - height: 100%; - width: calc(25% - 20px); - } - .main-nav .navbar { - border-radius: 0px; - border-width: 0px; - height: 100%; - } - .main-nav .navbar-header { - float: none; - } - .main-nav .navbar-collapse { - border-top: 1px solid #444; - padding: 0px; - } - .main-nav .navbar ul { - float: none; - } - .main-nav .navbar li { - float: none; - font-size: 15px; - margin: 6px; - } - .main-nav .navbar li a { - padding: 10px 16px; - border-radius: 4px; - } - .main-nav .navbar a { - /* If a menu item's text is too long, truncate it */ - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } -} diff --git a/templates/ReactSpa/ClientApp/routes.tsx b/templates/ReactSpa/ClientApp/routes.tsx deleted file mode 100644 index 5a3dafb6..00000000 --- a/templates/ReactSpa/ClientApp/routes.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import * as React from 'react'; -import { Router, Route, HistoryBase } from 'react-router'; -import { Layout } from './components/Layout'; -import { Home } from './components/Home'; -import { FetchData } from './components/FetchData'; -import { Counter } from './components/Counter'; - -export default - - - -; - -// Allow Hot Module Reloading -declare var module: any; -if (module.hot) { - module.hot.accept(); -} diff --git a/templates/ReactSpa/Controllers/HomeController.cs b/templates/ReactSpa/Controllers/HomeController.cs deleted file mode 100755 index 9d75da88..00000000 --- a/templates/ReactSpa/Controllers/HomeController.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace WebApplicationBasic.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - - public IActionResult Error() - { - return View(); - } - } -} diff --git a/templates/ReactSpa/Controllers/SampleDataController.cs b/templates/ReactSpa/Controllers/SampleDataController.cs deleted file mode 100644 index 0f1aa37a..00000000 --- a/templates/ReactSpa/Controllers/SampleDataController.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace WebApplicationBasic.Controllers -{ - [Route("api/[controller]")] - public class SampleDataController : Controller - { - private static string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - [HttpGet("[action]")] - public IEnumerable WeatherForecasts() - { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - DateFormatted = DateTime.Now.AddDays(index).ToString("d"), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }); - } - - public class WeatherForecast - { - public string DateFormatted { get; set; } - public int TemperatureC { get; set; } - public string Summary { get; set; } - - public int TemperatureF - { - get - { - return 32 + (int)(TemperatureC / 0.5556); - } - } - } - } -} diff --git a/templates/ReactSpa/Dockerfile b/templates/ReactSpa/Dockerfile deleted file mode 100644 index b4620123..00000000 --- a/templates/ReactSpa/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM microsoft/dotnet:latest - -RUN apt-get update -RUN wget -qO- https://deb.nodesource.com/setup_4.x | bash - -RUN apt-get install -y build-essential nodejs - -WORKDIR /app - -COPY project.json . -RUN ["dotnet", "restore"] - -COPY . /app -RUN ["dotnet", "build"] - -EXPOSE 5000/tcp - -ENTRYPOINT ["dotnet", "run", "--server.urls", "http://0.0.0.0:5000"] diff --git a/templates/ReactSpa/Program.cs b/templates/ReactSpa/Program.cs deleted file mode 100644 index b2e5e4b8..00000000 --- a/templates/ReactSpa/Program.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; - -namespace WebApplicationBasic -{ - public class Program - { - public static void Main(string[] args) - { - var config = new ConfigurationBuilder() - .AddCommandLine(args) - .AddEnvironmentVariables(prefix: "ASPNETCORE_") - .Build(); - - var host = new WebHostBuilder() - .UseConfiguration(config) - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/templates/ReactSpa/README.md b/templates/ReactSpa/README.md deleted file mode 100644 index d8ba0b38..00000000 --- a/templates/ReactSpa/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Welcome to ASP.NET Core - -We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new. - -You've created a new ASP.NET Core project. [Learn what's new](https://go.microsoft.com/fwlink/?LinkId=518016) - -## This application consists of: - -* Sample pages using ASP.NET Core MVC -* [Gulp](https://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](https://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side libraries -* Theming using [Bootstrap](https://go.microsoft.com/fwlink/?LinkID=398939) - -## How to - -* [Add a Controller and View](https://go.microsoft.com/fwlink/?LinkID=398600) -* [Add an appsetting in config and access it in app.](https://go.microsoft.com/fwlink/?LinkID=699562) -* [Manage User Secrets using Secret Manager.](https://go.microsoft.com/fwlink/?LinkId=699315) -* [Use logging to log a message.](https://go.microsoft.com/fwlink/?LinkId=699316) -* [Add packages using NuGet.](https://go.microsoft.com/fwlink/?LinkId=699317) -* [Add client packages using Bower.](https://go.microsoft.com/fwlink/?LinkId=699318) -* [Target development, staging or production environment.](https://go.microsoft.com/fwlink/?LinkId=699319) - -## Overview - -* [Conceptual overview of what is ASP.NET Core](https://go.microsoft.com/fwlink/?LinkId=518008) -* [Fundamentals of ASP.NET Core such as Startup and middleware.](https://go.microsoft.com/fwlink/?LinkId=699320) -* [Working with Data](https://go.microsoft.com/fwlink/?LinkId=398602) -* [Security](https://go.microsoft.com/fwlink/?LinkId=398603) -* [Client side development](https://go.microsoft.com/fwlink/?LinkID=699321) -* [Develop on different platforms](https://go.microsoft.com/fwlink/?LinkID=699322) -* [Read more on the documentation site](https://go.microsoft.com/fwlink/?LinkID=699323) - -## Run & Deploy - -* [Run your app](https://go.microsoft.com/fwlink/?LinkID=517851) -* [Run tools such as EF migrations and more](https://go.microsoft.com/fwlink/?LinkID=517853) -* [Publish to Microsoft Azure Web Apps](https://go.microsoft.com/fwlink/?LinkID=398609) - -We would love to hear your [feedback](https://go.microsoft.com/fwlink/?LinkId=518015) diff --git a/templates/ReactSpa/ReactSpa.xproj b/templates/ReactSpa/ReactSpa.xproj deleted file mode 100644 index 4a9c25be..00000000 --- a/templates/ReactSpa/ReactSpa.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - true - - - - e9d1a695-f0e6-46f2-b5e3-72f4af805387 - ReactSpa - .\obj - .\bin\ - v4.5.2 - - - 2.0 - - - \ No newline at end of file diff --git a/templates/ReactSpa/Startup.cs b/templates/ReactSpa/Startup.cs deleted file mode 100755 index 750d79c0..00000000 --- a/templates/ReactSpa/Startup.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.SpaServices.Webpack; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace WebApplicationBasic -{ - public class Startup - { - public Startup(IHostingEnvironment env) - { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) - .AddEnvironmentVariables(); - Configuration = builder.Build(); - } - - public IConfigurationRoot Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - // Add framework services. - services.AddMvc(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) - { - loggerFactory.AddConsole(Configuration.GetSection("Logging")); - loggerFactory.AddDebug(); - - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { - HotModuleReplacement = true, - ReactHotModuleReplacement = true - }); - } - else - { - app.UseExceptionHandler("/Home/Error"); - } - - app.UseStaticFiles(); - - app.UseMvc(routes => - { - routes.MapRoute( - name: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - - routes.MapSpaFallbackRoute( - name: "spa-fallback", - defaults: new { controller = "Home", action = "Index" }); - }); - } - } -} diff --git a/templates/ReactSpa/Views/Home/Index.cshtml b/templates/ReactSpa/Views/Home/Index.cshtml deleted file mode 100644 index 139ed8ac..00000000 --- a/templates/ReactSpa/Views/Home/Index.cshtml +++ /dev/null @@ -1,9 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -
    Loading...
    - -@section scripts { - -} diff --git a/templates/ReactSpa/Views/Shared/Error.cshtml b/templates/ReactSpa/Views/Shared/Error.cshtml deleted file mode 100755 index 473b35d6..00000000 --- a/templates/ReactSpa/Views/Shared/Error.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Error"; -} - -

    Error.

    -

    An error occurred while processing your request.

    diff --git a/templates/ReactSpa/Views/Shared/_Layout.cshtml b/templates/ReactSpa/Views/Shared/_Layout.cshtml deleted file mode 100644 index a770ceb4..00000000 --- a/templates/ReactSpa/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - @ViewData["Title"] - WebApplicationBasic - - - - - - - - @RenderBody() - - - @RenderSection("scripts", required: false) - - diff --git a/templates/ReactSpa/Views/_ViewImports.cshtml b/templates/ReactSpa/Views/_ViewImports.cshtml deleted file mode 100755 index e7b4f83f..00000000 --- a/templates/ReactSpa/Views/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using WebApplicationBasic -@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" -@addTagHelper "*, Microsoft.AspNetCore.SpaServices" diff --git a/templates/ReactSpa/Views/_ViewStart.cshtml b/templates/ReactSpa/Views/_ViewStart.cshtml deleted file mode 100755 index 820a2f6e..00000000 --- a/templates/ReactSpa/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/templates/ReactSpa/appsettings.json b/templates/ReactSpa/appsettings.json deleted file mode 100755 index 723c096a..00000000 --- a/templates/ReactSpa/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/templates/ReactSpa/package.json b/templates/ReactSpa/package.json deleted file mode 100644 index 79fc1077..00000000 --- a/templates/ReactSpa/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "WebApplicationBasic", - "version": "0.0.0", - "devDependencies": { - "@types/history": "^2.0.39", - "@types/isomorphic-fetch": "0.0.31", - "@types/react": "^0.14.38", - "@types/react-dom": "^0.14.17", - "@types/react-router": "^2.0.38", - "aspnet-webpack": "^1.0.17", - "aspnet-webpack-react": "^1.0.2", - "babel-core": "^6.17.0", - "babel-loader": "^6.2.5", - "babel-preset-es2015": "^6.16.0", - "babel-preset-react": "^6.16.0", - "bootstrap": "^3.3.6", - "css-loader": "^0.25.0", - "event-source-polyfill": "^0.0.7", - "extract-text-webpack-plugin": "^1.0.1", - "file-loader": "^0.9.0", - "isomorphic-fetch": "^2.2.1", - "jquery": "^2.2.1", - "react": "^15.3.2", - "react-dom": "^15.3.2", - "react-router": "^2.8.1", - "style-loader": "^0.13.1", - "ts-loader": "^0.8.2", - "typescript": "^2.0.3", - "url-loader": "^0.5.7", - "webpack": "^1.13.2", - "webpack-hot-middleware": "^2.12.2" - } -} diff --git a/templates/ReactSpa/project.json b/templates/ReactSpa/project.json deleted file mode 100755 index 88da8ca6..00000000 --- a/templates/ReactSpa/project.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.1", - "type": "platform" - }, - "Microsoft.AspNetCore.ReactServices": "1.0.0-*", - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.Mvc": "1.0.1", - "Microsoft.AspNetCore.Razor.Tools": { - "version": "1.0.0-preview2-final", - "type": "build" - }, - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", - "Microsoft.Extensions.Configuration.Json": "1.0.0", - "Microsoft.Extensions.Configuration.CommandLine": "1.0.0", - "Microsoft.Extensions.Logging": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0", - "Microsoft.Extensions.Logging.Debug": "1.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0" - }, - - "tools": { - "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", - "Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final" - }, - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "portable-net45+win8" - ] - } - }, - - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true, - "compile": { - "exclude": ["node_modules"] - } - }, - - "runtimeOptions": { - "configProperties": { - "System.GC.Server": true - } - }, - - "publishOptions": { - "include": [ - "appsettings.json", - "node_modules", - "Views", - "web.config", - "wwwroot" - ], - "exclude": [ - "wwwroot/dist/*.map" - ] - }, - - "scripts": { - "prepublish": [ - "npm install", - "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod", - "node node_modules/webpack/bin/webpack.js --env.prod" - ], - "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] - }, - - "tooling": { - "defaultNamespace": "WebApplicationBasic" - } -} diff --git a/templates/ReactSpa/template_gitignore b/templates/ReactSpa/template_gitignore deleted file mode 100644 index 893db26a..00000000 --- a/templates/ReactSpa/template_gitignore +++ /dev/null @@ -1,245 +0,0 @@ -/Properties/launchSettings.json - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -bin/ -Bin/ -obj/ -Obj/ - -# Visual Studio 2015 cache/options directory -.vs/ -/wwwroot/dist/** - -# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 -!/wwwroot/dist/_placeholder.txt - -/yarn.lock - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Microsoft Azure ApplicationInsights config file -ApplicationInsights.config - -# Windows Store app package directory -AppPackages/ -BundleArtifacts/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -orleans.codegen.cs - -# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 -/node_modules/** -!/node_modules/_placeholder.txt - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe - -# FAKE - F# Make -.fake/ diff --git a/templates/ReactSpa/template_nodemodules_placeholder.txt b/templates/ReactSpa/template_nodemodules_placeholder.txt deleted file mode 100644 index 09ae8c0c..00000000 --- a/templates/ReactSpa/template_nodemodules_placeholder.txt +++ /dev/null @@ -1,7 +0,0 @@ -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started, which means it's not enough just to -run 'npm install' during publishing: you need to ensure node_modules already -existed at least). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/ReactSpa/tsconfig.json b/templates/ReactSpa/tsconfig.json deleted file mode 100644 index 69ed93a9..00000000 --- a/templates/ReactSpa/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node", - "target": "es6", - "jsx": "preserve", - "sourceMap": true, - "skipDefaultLibCheck": true - }, - "exclude": [ - "bin", - "node_modules" - ] -} diff --git a/templates/ReactSpa/web.config b/templates/ReactSpa/web.config deleted file mode 100644 index a8d66727..00000000 --- a/templates/ReactSpa/web.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/templates/ReactSpa/webpack.config.js b/templates/ReactSpa/webpack.config.js deleted file mode 100644 index 54d81727..00000000 --- a/templates/ReactSpa/webpack.config.js +++ /dev/null @@ -1,41 +0,0 @@ -var isDevBuild = process.argv.indexOf('--env.prod') < 0; -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); - -var bundleOutputDir = './wwwroot/dist'; -module.exports = { - devtool: isDevBuild ? 'inline-source-map' : null, - entry: { 'main': './ClientApp/boot.tsx' }, - resolve: { extensions: [ '', '.js', '.jsx', '.ts', '.tsx' ] }, - output: { - path: path.join(__dirname, bundleOutputDir), - filename: '[name].js', - publicPath: '/dist/' - }, - module: { - loaders: [ - { test: /\.ts(x?)$/, include: /ClientApp/, loader: 'babel-loader' }, - { test: /\.tsx?$/, include: /ClientApp/, loader: 'ts', query: { silent: true } }, - { test: /\.css$/, loader: isDevBuild ? 'style!css' : ExtractTextPlugin.extract(['css']) }, - { test: /\.(png|jpg|jpeg|gif|svg)$/, loader: 'url', query: { limit: 25000 } } - ] - }, - plugins: [ - new webpack.DllReferencePlugin({ - context: __dirname, - manifest: require('./wwwroot/dist/vendor-manifest.json') - }) - ].concat(isDevBuild ? [ - // Plugins that apply in development builds only - new webpack.SourceMapDevToolPlugin({ - filename: '[file].map', // Remove this line if you prefer inline source maps - moduleFilenameTemplate: path.relative(bundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk - }) - ] : [ - // Plugins that apply in production builds only - new webpack.optimize.OccurenceOrderPlugin(), - new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }), - new ExtractTextPlugin('site.css') - ]) -}; diff --git a/templates/ReactSpa/webpack.config.vendor.js b/templates/ReactSpa/webpack.config.vendor.js deleted file mode 100644 index c3421e8b..00000000 --- a/templates/ReactSpa/webpack.config.vendor.js +++ /dev/null @@ -1,39 +0,0 @@ -var isDevBuild = process.argv.indexOf('--env.prod') < 0; -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); -var extractCSS = new ExtractTextPlugin('vendor.css'); - -module.exports = { - resolve: { - extensions: [ '', '.js' ] - }, - module: { - loaders: [ - { test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, loader: 'url-loader?limit=100000' }, - { test: /\.css(\?|$)/, loader: extractCSS.extract(['css']) } - ] - }, - entry: { - vendor: ['bootstrap', 'bootstrap/dist/css/bootstrap.css', 'event-source-polyfill', 'isomorphic-fetch', 'react', 'react-dom', 'react-router', 'style-loader', 'jquery'], - }, - output: { - path: path.join(__dirname, 'wwwroot', 'dist'), - filename: '[name].js', - library: '[name]_[hash]', - }, - plugins: [ - extractCSS, - new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) - new webpack.optimize.OccurenceOrderPlugin(), - new webpack.DllPlugin({ - path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), - name: '[name]_[hash]' - }), - new webpack.DefinePlugin({ - 'process.env.NODE_ENV': isDevBuild ? '"development"' : '"production"' - }) - ].concat(isDevBuild ? [] : [ - new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }) - ]) -}; diff --git a/templates/ReactSpa/wwwroot/dist/_placeholder.txt b/templates/ReactSpa/wwwroot/dist/_placeholder.txt deleted file mode 100644 index b22cc154..00000000 --- a/templates/ReactSpa/wwwroot/dist/_placeholder.txt +++ /dev/null @@ -1,9 +0,0 @@ ------------------------------------------------------------------- -Don't delete this file. Do include it in your source control repo. ------------------------------------------------------------------- - -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/ReactSpa/wwwroot/favicon.ico b/templates/ReactSpa/wwwroot/favicon.ico deleted file mode 100755 index a3a79998..00000000 Binary files a/templates/ReactSpa/wwwroot/favicon.ico and /dev/null differ diff --git a/templates/WebApplicationBasic/ClientApp/App.ts b/templates/WebApplicationBasic/ClientApp/App.ts deleted file mode 100644 index 4cde26cb..00000000 --- a/templates/WebApplicationBasic/ClientApp/App.ts +++ /dev/null @@ -1,5 +0,0 @@ -import 'bootstrap'; -import './css/site.css'; - -// Replace with your TypeScript code -console.log('Hello, world!'); diff --git a/templates/WebApplicationBasic/ClientApp/css/site.css b/templates/WebApplicationBasic/ClientApp/css/site.css deleted file mode 100755 index af0456db..00000000 --- a/templates/WebApplicationBasic/ClientApp/css/site.css +++ /dev/null @@ -1,24 +0,0 @@ -body { - padding-top: 50px; - padding-bottom: 20px; -} - -/* Wrapping element */ -/* Set some basic padding to keep content from hitting the edges */ -.body-content { - padding-left: 15px; - padding-right: 15px; -} - -/* Set widths on the form inputs since otherwise they're 100% wide */ -input, -select, -textarea { - max-width: 280px; -} - -/* Carousel */ -.carousel-caption p { - font-size: 20px; - line-height: 1.4; -} diff --git a/templates/WebApplicationBasic/Controllers/HomeController.cs b/templates/WebApplicationBasic/Controllers/HomeController.cs deleted file mode 100755 index 03b3a060..00000000 --- a/templates/WebApplicationBasic/Controllers/HomeController.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace WebApplicationBasic.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - - public IActionResult About() - { - ViewData["Message"] = "Your application description page."; - - return View(); - } - - public IActionResult Contact() - { - ViewData["Message"] = "Your contact page."; - - return View(); - } - - public IActionResult Error() - { - return View(); - } - } -} diff --git a/templates/WebApplicationBasic/Dockerfile b/templates/WebApplicationBasic/Dockerfile deleted file mode 100644 index 134c714c..00000000 --- a/templates/WebApplicationBasic/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM microsoft/dotnet:latest - -WORKDIR /app - -COPY project.json . -RUN ["dotnet", "restore"] - -COPY . /app -RUN ["dotnet", "build"] - -EXPOSE 5000/tcp - -ENTRYPOINT ["dotnet", "run", "--server.urls", "http://0.0.0.0:5000"] diff --git a/templates/WebApplicationBasic/Program.cs b/templates/WebApplicationBasic/Program.cs deleted file mode 100644 index b2e5e4b8..00000000 --- a/templates/WebApplicationBasic/Program.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; - -namespace WebApplicationBasic -{ - public class Program - { - public static void Main(string[] args) - { - var config = new ConfigurationBuilder() - .AddCommandLine(args) - .AddEnvironmentVariables(prefix: "ASPNETCORE_") - .Build(); - - var host = new WebHostBuilder() - .UseConfiguration(config) - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/templates/WebApplicationBasic/README.md b/templates/WebApplicationBasic/README.md deleted file mode 100644 index d8ba0b38..00000000 --- a/templates/WebApplicationBasic/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Welcome to ASP.NET Core - -We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new. - -You've created a new ASP.NET Core project. [Learn what's new](https://go.microsoft.com/fwlink/?LinkId=518016) - -## This application consists of: - -* Sample pages using ASP.NET Core MVC -* [Gulp](https://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](https://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side libraries -* Theming using [Bootstrap](https://go.microsoft.com/fwlink/?LinkID=398939) - -## How to - -* [Add a Controller and View](https://go.microsoft.com/fwlink/?LinkID=398600) -* [Add an appsetting in config and access it in app.](https://go.microsoft.com/fwlink/?LinkID=699562) -* [Manage User Secrets using Secret Manager.](https://go.microsoft.com/fwlink/?LinkId=699315) -* [Use logging to log a message.](https://go.microsoft.com/fwlink/?LinkId=699316) -* [Add packages using NuGet.](https://go.microsoft.com/fwlink/?LinkId=699317) -* [Add client packages using Bower.](https://go.microsoft.com/fwlink/?LinkId=699318) -* [Target development, staging or production environment.](https://go.microsoft.com/fwlink/?LinkId=699319) - -## Overview - -* [Conceptual overview of what is ASP.NET Core](https://go.microsoft.com/fwlink/?LinkId=518008) -* [Fundamentals of ASP.NET Core such as Startup and middleware.](https://go.microsoft.com/fwlink/?LinkId=699320) -* [Working with Data](https://go.microsoft.com/fwlink/?LinkId=398602) -* [Security](https://go.microsoft.com/fwlink/?LinkId=398603) -* [Client side development](https://go.microsoft.com/fwlink/?LinkID=699321) -* [Develop on different platforms](https://go.microsoft.com/fwlink/?LinkID=699322) -* [Read more on the documentation site](https://go.microsoft.com/fwlink/?LinkID=699323) - -## Run & Deploy - -* [Run your app](https://go.microsoft.com/fwlink/?LinkID=517851) -* [Run tools such as EF migrations and more](https://go.microsoft.com/fwlink/?LinkID=517853) -* [Publish to Microsoft Azure Web Apps](https://go.microsoft.com/fwlink/?LinkID=398609) - -We would love to hear your [feedback](https://go.microsoft.com/fwlink/?LinkId=518015) diff --git a/templates/WebApplicationBasic/Startup.cs b/templates/WebApplicationBasic/Startup.cs deleted file mode 100755 index fe5473d7..00000000 --- a/templates/WebApplicationBasic/Startup.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace WebApplicationBasic -{ - public class Startup - { - public Startup(IHostingEnvironment env) - { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) - .AddEnvironmentVariables(); - Configuration = builder.Build(); - } - - public IConfigurationRoot Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - // Add framework services. - services.AddMvc(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) - { - loggerFactory.AddConsole(Configuration.GetSection("Logging")); - loggerFactory.AddDebug(); - - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseExceptionHandler("/Home/Error"); - } - - app.UseStaticFiles(); - - app.UseMvc(routes => - { - routes.MapRoute( - name: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - }); - } - } -} diff --git a/templates/WebApplicationBasic/Views/Home/About.cshtml b/templates/WebApplicationBasic/Views/Home/About.cshtml deleted file mode 100755 index b653a26f..00000000 --- a/templates/WebApplicationBasic/Views/Home/About.cshtml +++ /dev/null @@ -1,7 +0,0 @@ -@{ - ViewData["Title"] = "About"; -} -

    @ViewData["Title"].

    -

    @ViewData["Message"]

    - -

    Use this area to provide additional information.

    diff --git a/templates/WebApplicationBasic/Views/Home/Contact.cshtml b/templates/WebApplicationBasic/Views/Home/Contact.cshtml deleted file mode 100755 index f953aa63..00000000 --- a/templates/WebApplicationBasic/Views/Home/Contact.cshtml +++ /dev/null @@ -1,17 +0,0 @@ -@{ - ViewData["Title"] = "Contact"; -} -

    @ViewData["Title"].

    -

    @ViewData["Message"]

    - -
    - One Microsoft Way
    - Redmond, WA 98052-6399
    - P: - 425.555.0100 -
    - -
    - Support: Support@example.com
    - Marketing: Marketing@example.com -
    diff --git a/templates/WebApplicationBasic/Views/Home/Index.cshtml b/templates/WebApplicationBasic/Views/Home/Index.cshtml deleted file mode 100755 index 6fef9aef..00000000 --- a/templates/WebApplicationBasic/Views/Home/Index.cshtml +++ /dev/null @@ -1,114 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - - - - - -@section scripts { - -} diff --git a/templates/WebApplicationBasic/Views/Shared/Error.cshtml b/templates/WebApplicationBasic/Views/Shared/Error.cshtml deleted file mode 100755 index 473b35d6..00000000 --- a/templates/WebApplicationBasic/Views/Shared/Error.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Error"; -} - -

    Error.

    -

    An error occurred while processing your request.

    diff --git a/templates/WebApplicationBasic/Views/Shared/_Layout.cshtml b/templates/WebApplicationBasic/Views/Shared/_Layout.cshtml deleted file mode 100755 index 787de23e..00000000 --- a/templates/WebApplicationBasic/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - @ViewData["Title"] - WebApplicationBasic - - - - - - -
    - @RenderBody() -
    -
    -

    © 2016 - WebApplicationBasic

    -
    -
    - - - @RenderSection("scripts", required: false) - - diff --git a/templates/WebApplicationBasic/Views/_ViewImports.cshtml b/templates/WebApplicationBasic/Views/_ViewImports.cshtml deleted file mode 100755 index 6b9e366d..00000000 --- a/templates/WebApplicationBasic/Views/_ViewImports.cshtml +++ /dev/null @@ -1,2 +0,0 @@ -@using WebApplicationBasic -@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" diff --git a/templates/WebApplicationBasic/Views/_ViewStart.cshtml b/templates/WebApplicationBasic/Views/_ViewStart.cshtml deleted file mode 100755 index 820a2f6e..00000000 --- a/templates/WebApplicationBasic/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/templates/WebApplicationBasic/WebApplicationBasic.xproj b/templates/WebApplicationBasic/WebApplicationBasic.xproj deleted file mode 100644 index 40c6b3ab..00000000 --- a/templates/WebApplicationBasic/WebApplicationBasic.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - true - - - - cb4398d6-b7f1-449a-ae02-828769679232 - WebApplicationBasic - .\obj - .\bin\ - v4.5.2 - - - 2.0 - - - \ No newline at end of file diff --git a/templates/WebApplicationBasic/appsettings.json b/templates/WebApplicationBasic/appsettings.json deleted file mode 100755 index 723c096a..00000000 --- a/templates/WebApplicationBasic/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/templates/WebApplicationBasic/package.json b/templates/WebApplicationBasic/package.json deleted file mode 100644 index 8cc94585..00000000 --- a/templates/WebApplicationBasic/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "WebApplicationBasic", - "version": "0.0.0", - "devDependencies": { - "bootstrap": "^3.3.7", - "css-loader": "^0.23.1", - "event-source-polyfill": "^0.0.7", - "extendify": "^1.0.0", - "extract-text-webpack-plugin": "^1.0.1", - "file-loader": "^0.8.5", - "jquery": "^2.2.1", - "style-loader": "^0.13.0", - "ts-loader": "^0.8.1", - "typescript": "^2.0.3", - "url-loader": "^0.5.7", - "webpack": "^1.13.2" - } -} diff --git a/templates/WebApplicationBasic/project.json b/templates/WebApplicationBasic/project.json deleted file mode 100755 index cbafb51a..00000000 --- a/templates/WebApplicationBasic/project.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.1", - "type": "platform" - }, - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.Mvc": "1.0.1", - "Microsoft.AspNetCore.Razor.Tools": { - "version": "1.0.0-preview2-final", - "type": "build" - }, - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", - "Microsoft.Extensions.Configuration.Json": "1.0.0", - "Microsoft.Extensions.Configuration.CommandLine": "1.0.0", - "Microsoft.Extensions.Logging": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0", - "Microsoft.Extensions.Logging.Debug": "1.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0" - }, - - "tools": { - "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" - }, - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "portable-net45+win8" - ] - } - }, - - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true, - "compile": { - "exclude": ["node_modules"] - } - }, - - "runtimeOptions": { - "configProperties": { - "System.GC.Server": true - } - }, - - "publishOptions": { - "include": [ - "appsettings.json", - "Views", - "web.config", - "wwwroot" - ], - "exclude": [ - "wwwroot/dist/*.map" - ] - }, - - "scripts": { - "prepublish": [ - "npm install", - "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js", - "node node_modules/webpack/bin/webpack.js" - ], - "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] - }, - - "tooling": { - "defaultNamespace": "WebApplicationBasic" - } -} diff --git a/templates/WebApplicationBasic/template_gitignore b/templates/WebApplicationBasic/template_gitignore deleted file mode 100644 index e12e5da5..00000000 --- a/templates/WebApplicationBasic/template_gitignore +++ /dev/null @@ -1,242 +0,0 @@ -/Properties/launchSettings.json - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -bin/ -Bin/ -obj/ -Obj/ - -# Visual Studio 2015 cache/options directory -.vs/ -/wwwroot/dist/ - -/yarn.lock - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Microsoft Azure ApplicationInsights config file -ApplicationInsights.config - -# Windows Store app package directory -AppPackages/ -BundleArtifacts/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -orleans.codegen.cs - -# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 -/node_modules/** -!/node_modules/_placeholder.txt - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe - -# FAKE - F# Make -.fake/ diff --git a/templates/WebApplicationBasic/template_nodemodules_placeholder.txt b/templates/WebApplicationBasic/template_nodemodules_placeholder.txt deleted file mode 100644 index 09ae8c0c..00000000 --- a/templates/WebApplicationBasic/template_nodemodules_placeholder.txt +++ /dev/null @@ -1,7 +0,0 @@ -This file exists as a workaround for https://github.com/dotnet/cli/issues/1396 -('dotnet publish' does not publish any directories that didn't exist or were -empty before the publish script started, which means it's not enough just to -run 'npm install' during publishing: you need to ensure node_modules already -existed at least). - -Hopefully, this can be removed after the move to the new MSBuild. diff --git a/templates/WebApplicationBasic/tsconfig.json b/templates/WebApplicationBasic/tsconfig.json deleted file mode 100644 index 046eabe4..00000000 --- a/templates/WebApplicationBasic/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node", - "target": "es5", - "sourceMap": true, - "lib": ["es6", "dom"], - "skipDefaultLibCheck": true - }, - "exclude": [ - "bin", - "node_modules" - ] -} diff --git a/templates/WebApplicationBasic/web.config b/templates/WebApplicationBasic/web.config deleted file mode 100644 index a8d66727..00000000 --- a/templates/WebApplicationBasic/web.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/templates/WebApplicationBasic/webpack.config.dev.js b/templates/WebApplicationBasic/webpack.config.dev.js deleted file mode 100644 index e3410f6d..00000000 --- a/templates/WebApplicationBasic/webpack.config.dev.js +++ /dev/null @@ -1,12 +0,0 @@ -var path = require('path'); -var webpack = require('webpack'); - -module.exports = { - plugins: [ - // Plugins that apply in development builds only - new webpack.SourceMapDevToolPlugin({ - filename: '[file].map', // Remove this line if you prefer inline source maps - moduleFilenameTemplate: path.relative('./wwwroot/dist', '[resourcePath]') // Point sourcemap entries to the original file locations on disk - }) - ] -}; diff --git a/templates/WebApplicationBasic/webpack.config.js b/templates/WebApplicationBasic/webpack.config.js deleted file mode 100644 index 129d22ce..00000000 --- a/templates/WebApplicationBasic/webpack.config.js +++ /dev/null @@ -1,35 +0,0 @@ -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); -var merge = require('extendify')({ isDeep: true, arrays: 'concat' }); -var devConfig = require('./webpack.config.dev'); -var prodConfig = require('./webpack.config.prod'); -var isDevelopment = process.env.ASPNETCORE_ENVIRONMENT === 'Development'; -var extractCSS = new ExtractTextPlugin('site.css'); - -module.exports = merge({ - resolve: { - extensions: [ '', '.js', '.jsx', '.ts', '.tsx' ] - }, - module: { - loaders: [ - { test: /\.ts(x?)$/, include: /ClientApp/, loader: 'ts-loader?silent=true' }, - { test: /\.css/, loader: extractCSS.extract(['css']) } - ] - }, - entry: { - main: ['./ClientApp/App.ts'] - }, - output: { - path: path.join(__dirname, 'wwwroot', 'dist'), - filename: '[name].js', - publicPath: '/dist/' - }, - plugins: [ - extractCSS, - new webpack.DllReferencePlugin({ - context: __dirname, - manifest: require('./wwwroot/dist/vendor-manifest.json') - }) - ] -}, isDevelopment ? devConfig : prodConfig); diff --git a/templates/WebApplicationBasic/webpack.config.prod.js b/templates/WebApplicationBasic/webpack.config.prod.js deleted file mode 100644 index 775f115f..00000000 --- a/templates/WebApplicationBasic/webpack.config.prod.js +++ /dev/null @@ -1,8 +0,0 @@ -var webpack = require('webpack'); - -module.exports = { - plugins: [ - new webpack.optimize.OccurenceOrderPlugin(), - new webpack.optimize.UglifyJsPlugin({ minimize: true }) - ] -}; diff --git a/templates/WebApplicationBasic/webpack.config.vendor.js b/templates/WebApplicationBasic/webpack.config.vendor.js deleted file mode 100644 index c6161de5..00000000 --- a/templates/WebApplicationBasic/webpack.config.vendor.js +++ /dev/null @@ -1,36 +0,0 @@ -var path = require('path'); -var webpack = require('webpack'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); -var extractCSS = new ExtractTextPlugin('vendor.css'); -var isDevelopment = process.env.ASPNETCORE_ENVIRONMENT === 'Development'; - -module.exports = { - resolve: { - extensions: [ '', '.js' ] - }, - module: { - loaders: [ - { test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' }, - { test: /\.css/, loader: extractCSS.extract(['css']) } - ] - }, - entry: { - vendor: ['bootstrap', 'bootstrap/dist/css/bootstrap.css', 'event-source-polyfill', 'style-loader', 'jquery'] - }, - output: { - path: path.join(__dirname, 'wwwroot', 'dist'), - filename: '[name].js', - library: '[name]_[hash]', - }, - plugins: [ - extractCSS, - new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) - new webpack.optimize.OccurenceOrderPlugin(), - new webpack.DllPlugin({ - path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), - name: '[name]_[hash]' - }) - ].concat(isDevelopment ? [] : [ - new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }) - ]) -}; diff --git a/templates/WebApplicationBasic/wwwroot/favicon.ico b/templates/WebApplicationBasic/wwwroot/favicon.ico deleted file mode 100755 index a3a79998..00000000 Binary files a/templates/WebApplicationBasic/wwwroot/favicon.ico and /dev/null differ diff --git a/templates/WebApplicationBasic/wwwroot/images/ASP-NET-Banners-01.png b/templates/WebApplicationBasic/wwwroot/images/ASP-NET-Banners-01.png deleted file mode 100755 index ad3c267c..00000000 Binary files a/templates/WebApplicationBasic/wwwroot/images/ASP-NET-Banners-01.png and /dev/null differ diff --git a/templates/WebApplicationBasic/wwwroot/images/ASP-NET-Banners-02.png b/templates/WebApplicationBasic/wwwroot/images/ASP-NET-Banners-02.png deleted file mode 100755 index 16c37fc5..00000000 Binary files a/templates/WebApplicationBasic/wwwroot/images/ASP-NET-Banners-02.png and /dev/null differ diff --git a/templates/WebApplicationBasic/wwwroot/images/Banner-01-Azure.png b/templates/WebApplicationBasic/wwwroot/images/Banner-01-Azure.png deleted file mode 100755 index 59fb923e..00000000 Binary files a/templates/WebApplicationBasic/wwwroot/images/Banner-01-Azure.png and /dev/null differ diff --git a/templates/WebApplicationBasic/wwwroot/images/Banner-02-VS.png b/templates/WebApplicationBasic/wwwroot/images/Banner-02-VS.png deleted file mode 100755 index c9f46113..00000000 Binary files a/templates/WebApplicationBasic/wwwroot/images/Banner-02-VS.png and /dev/null differ diff --git a/templates/WhereHaveTheTemplatesGone.md b/templates/WhereHaveTheTemplatesGone.md new file mode 100644 index 00000000..939f5cfe --- /dev/null +++ b/templates/WhereHaveTheTemplatesGone.md @@ -0,0 +1,11 @@ +# Where have all the SPA templates gone? + +They are now in the [ASP.NET templating](https://github.com/aspnet/templating) repo. + +This is so that all the ASP.NET templates (both SPA and non-SPA) can be built, tested, and packaged from a single location and always included automatically in future SDK builds. + +### What about issues and pull requests? + +If you have issues or comments about the SPA templates, please continue to post them [here in this repo](https://github.com/aspnet/JavaScriptServices/issues), because then you will reach a more relevant group of contributors than if you posted to `aspnet/templating`. + +If you want to submit a pull request on the SPA templates, then of course you will neeed to submit that to the `aspnet/templating` repo, because that's where the code is now. But before doing so it's always a good idea to [post an issue on this repo](https://github.com/aspnet/JavaScriptServices/issues) describing what you want to do, so we can discuss whether or not such a PR would be accepted. diff --git a/templates/package-builder/.gitignore b/templates/package-builder/.gitignore deleted file mode 100644 index f0cef27c..00000000 --- a/templates/package-builder/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/node_modules/ -/built/ -/dist/ diff --git a/templates/package-builder/README.md b/templates/package-builder/README.md deleted file mode 100644 index 74d42abf..00000000 --- a/templates/package-builder/README.md +++ /dev/null @@ -1,5 +0,0 @@ -To generator the Yeoman generator, execute: - - npm run build - -Output will appear in the `generator-aspnetcore-spa` directory. diff --git a/templates/package-builder/bin/NuGet.exe b/templates/package-builder/bin/NuGet.exe deleted file mode 100644 index 6bb79fe5..00000000 Binary files a/templates/package-builder/bin/NuGet.exe and /dev/null differ diff --git a/templates/package-builder/package.json b/templates/package-builder/package.json deleted file mode 100644 index b65ceb01..00000000 --- a/templates/package-builder/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "generator-aspnetcore-spa-generator", - "version": "1.0.0", - "description": "Creates the Yeoman generator and 'dotnet new' package for ASP.NET Core SPA templates", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "build": "tsc && node ./tmp/build/build.js" - }, - "author": "Microsoft", - "license": "Apache-2.0", - "dependencies": { - "@types/semver": "^5.3.30", - "diff": "^2.2.2", - "gitignore-parser": "0.0.2", - "glob": "^7.0.3", - "lodash": "^4.11.1", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.2", - "semver": "^5.3.0" - }, - "devDependencies": { - "@types/glob": "^5.0.30", - "@types/lodash": "^4.14.37", - "@types/mkdirp": "^0.3.29", - "@types/node": "^6.0.45", - "@types/node-uuid": "0.0.28", - "@types/rimraf": "0.0.28", - "@types/yeoman-generator": "0.0.30", - "typescript": "^2.0.0" - } -} diff --git a/templates/package-builder/src/build/build.ts b/templates/package-builder/src/build/build.ts deleted file mode 100644 index e394ddd6..00000000 --- a/templates/package-builder/src/build/build.ts +++ /dev/null @@ -1,181 +0,0 @@ -import * as glob from 'glob'; -import * as gitignore from 'gitignore-parser'; -import * as fs from 'fs'; -import * as path from 'path'; -import * as _ from 'lodash'; -import * as mkdirp from 'mkdirp'; -import * as rimraf from 'rimraf'; -import * as childProcess from 'child_process'; - -const isWindows = /^win/.test(process.platform); -const textFileExtensions = ['.gitignore', 'template_gitignore', '.config', '.cs', '.cshtml', 'Dockerfile', '.html', '.js', '.json', '.jsx', '.md', '.nuspec', '.ts', '.tsx', '.xproj']; -const yeomanGeneratorSource = './src/yeoman'; - -const templates: { [key: string]: { dir: string, dotNetNewId: string, displayName: string, forceInclusion?: RegExp } } = { - 'angular-2': { dir: '../../templates/Angular2Spa/', dotNetNewId: 'Angular', displayName: 'Angular 2', forceInclusion: /^(wwwroot|ClientApp)\/dist\// }, - 'aurelia': { dir: '../../templates/AureliaSpa/', dotNetNewId: 'Aurelia', displayName: 'Aurelia' }, - 'knockout': { dir: '../../templates/KnockoutSpa/', dotNetNewId: 'Knockout', displayName: 'Knockout.js' }, - 'react-redux': { dir: '../../templates/ReactReduxSpa/', dotNetNewId: 'ReactRedux', displayName: 'React.js and Redux' }, - 'react': { dir: '../../templates/ReactSpa/', dotNetNewId: 'React', displayName: 'React.js' } -}; - -function isTextFile(filename: string): boolean { - return textFileExtensions.indexOf(path.extname(filename).toLowerCase()) >= 0; -} - -function writeFileEnsuringDirExists(root: string, filename: string, contents: string | Buffer) { - let fullPath = path.join(root, filename); - mkdirp.sync(path.dirname(fullPath)); - fs.writeFileSync(fullPath, contents); -} - -function listFilesExcludingGitignored(root: string, forceInclusion: RegExp): string[] { - // Note that the gitignore files, prior to be written by the generator, are called 'template_gitignore' - // instead of '.gitignore'. This is a workaround for Yeoman doing strange stuff with .gitignore files - // (it renames them to .npmignore, which is not helpful). - let gitIgnorePath = path.join(root, 'template_gitignore'); - let gitignoreEvaluator = fs.existsSync(gitIgnorePath) - ? gitignore.compile(fs.readFileSync(gitIgnorePath, 'utf8')) - : { accepts: () => true }; - return glob.sync('**/*', { cwd: root, dot: true, nodir: true }) - .filter(fn => gitignoreEvaluator.accepts(fn) || (forceInclusion && forceInclusion.test(fn))); -} - -function writeTemplate(sourceRoot: string, destRoot: string, contentReplacements: { from: RegExp, to: string }[], filenameReplacements: { from: RegExp, to: string }[], forceInclusion: RegExp) { - listFilesExcludingGitignored(sourceRoot, forceInclusion).forEach(fn => { - let sourceContent = fs.readFileSync(path.join(sourceRoot, fn)); - - // For text files, replace hardcoded values with template tags - if (isTextFile(fn)) { - let sourceText = sourceContent.toString('utf8'); - contentReplacements.forEach(replacement => { - sourceText = sourceText.replace(replacement.from, replacement.to); - }); - - sourceContent = new Buffer(sourceText, 'utf8'); - } - - // Also apply replacements in filenames - filenameReplacements.forEach(replacement => { - fn = fn.replace(replacement.from, replacement.to); - }); - - writeFileEnsuringDirExists(destRoot, fn, sourceContent); - }); -} - -function copyRecursive(sourceRoot: string, destRoot: string, matchGlob: string) { - glob.sync(matchGlob, { cwd: sourceRoot, dot: true, nodir: true }) - .forEach(fn => { - const sourceContent = fs.readFileSync(path.join(sourceRoot, fn)); - writeFileEnsuringDirExists(destRoot, fn, sourceContent); - }); -} - -function buildYeomanNpmPackage() { - const outputRoot = './dist/generator-aspnetcore-spa'; - const outputTemplatesRoot = path.join(outputRoot, 'app/templates'); - rimraf.sync(outputTemplatesRoot); - - // Copy template files - const filenameReplacements = [ - { from: /.*\.xproj$/, to: 'tokenreplace-namePascalCase.xproj' } - ]; - const contentReplacements = [ - { from: /\bWebApplicationBasic\b/g, to: '<%= namePascalCase %>' }, - { from: /[0-9a-f\-]{36}<\/ProjectGuid>/g, to: '<%= projectGuid %>' }, - { from: /.*?<\/RootNamespace>/g, to: '<%= namePascalCase %>'}, - { from: /\s*/g, to: '' }, - { from: /\s*/g, to: '' }, - ]; - _.forEach(templates, (templateConfig, templateName) => { - const outputDir = path.join(outputTemplatesRoot, templateName); - writeTemplate(templateConfig.dir, outputDir, contentReplacements, filenameReplacements, templateConfig.forceInclusion); - }); - - // Also copy the generator files (that's the compiled .js files, plus all other non-.ts files) - const tempRoot = './tmp'; - copyRecursive(path.join(tempRoot, 'yeoman'), outputRoot, '**/*.js'); - copyRecursive(yeomanGeneratorSource, outputRoot, '**/!(*.ts)'); - - // Clean up - rimraf.sync(tempRoot); -} - -function buildDotNetNewNuGetPackage() { - const outputRoot = './dist/dotnetnew'; - rimraf.sync(outputRoot); - - // Copy template files - const sourceProjectName = 'WebApplicationBasic'; - const projectGuid = '00000000-0000-0000-0000-000000000000'; - const filenameReplacements = [ - { from: /.*\.xproj$/, to: `${sourceProjectName}.xproj` }, - { from: /\btemplate_gitignore$/, to: '.gitignore' }, - - // Workaround for https://github.com/aspnet/JavaScriptServices/issues/235 - // For details, see the comment in ../yeoman/app/index.ts - { from: /\btemplate_nodemodules_placeholder.txt$/, to: 'node_modules/_placeholder.txt' } - ]; - const contentReplacements = [ - { from: /[0-9a-f\-]{36}<\/ProjectGuid>/g, to: `${projectGuid}` }, - { from: /.*?<\/RootNamespace>/g, to: `${sourceProjectName}`}, - { from: /\s*/g, to: '' }, - { from: /\s*/g, to: '' }, - ]; - _.forEach(templates, (templateConfig, templateName) => { - const templateOutputDir = path.join(outputRoot, 'templates', templateName); - const templateOutputProjectDir = path.join(templateOutputDir, sourceProjectName); - writeTemplate(templateConfig.dir, templateOutputProjectDir, contentReplacements, filenameReplacements, templateConfig.forceInclusion); - - // Add a .netnew.json file - fs.writeFileSync(path.join(templateOutputDir, '.netnew.json'), JSON.stringify({ - author: 'Microsoft', - classifications: [ 'Standard>>Quick Starts' ], - name: `ASP.NET Core SPA with ${templateConfig.displayName}`, - groupIdentity: `Microsoft.AspNetCore.Spa.${templateConfig.dotNetNewId}`, - identity: `Microsoft.AspNetCore.Spa.${templateConfig.dotNetNewId}`, - shortName: `aspnetcorespa-${templateConfig.dotNetNewId.toLowerCase()}`, - tags: { language: 'C#' }, - guids: [ projectGuid ], - sourceName: sourceProjectName - }, null, 2)); - }); - - // Invoke NuGet to create the final package - const yeomanPackageVersion = JSON.parse(fs.readFileSync(path.join(yeomanGeneratorSource, 'package.json'), 'utf8')).version; - writeTemplate('./src/dotnetnew', outputRoot, [ - { from: /\{version\}/g, to: yeomanPackageVersion }, - ], [], null); - const nugetExe = path.join(process.cwd(), './bin/NuGet.exe'); - const nugetStartInfo = { cwd: outputRoot, stdio: 'inherit' }; - if (isWindows) { - // Invoke NuGet.exe directly - childProcess.spawnSync(nugetExe, ['pack'], nugetStartInfo); - } else { - // Invoke via Mono (relying on that being available) - childProcess.spawnSync('mono', [nugetExe, 'pack'], nugetStartInfo); - } - - // Clean up - rimraf.sync('./tmp'); -} - -// TODO: Instead of just showing this warning, improve build script so it actually does build them -// in the correct format. Can do this once we've moved away from using ASPNETCORE_ENVIRONMENT to -// control the build output mode. The templates we warn about here are the ones where we ship some -// files that wouldn't normally be under source control (e.g., /wwwroot/dist/*). -const templatesWithForceIncludes = Object.getOwnPropertyNames(templates) - .filter(templateName => !!templates[templateName].forceInclusion); -if (templatesWithForceIncludes.length > 0) { - console.warn(` ---- -WARNING: Ensure that the following templates are already built in the configuration desired for publishing. -For example, build the dist files in debug mode. -TEMPLATES: ${templatesWithForceIncludes.join(', ')} ---- -`); -} - -buildYeomanNpmPackage(); -buildDotNetNewNuGetPackage(); diff --git a/templates/package-builder/src/dotnetnew/Microsoft.AspNetCore.Spa.Templates.nuspec b/templates/package-builder/src/dotnetnew/Microsoft.AspNetCore.Spa.Templates.nuspec deleted file mode 100644 index 46c00114..00000000 --- a/templates/package-builder/src/dotnetnew/Microsoft.AspNetCore.Spa.Templates.nuspec +++ /dev/null @@ -1,19 +0,0 @@ - - - - Microsoft.AspNetCore.Spa.Templates - {version} - Class Library and Console Application Templates for .NET Core - Microsoft - false - My package description. - - - - - - - - - - \ No newline at end of file diff --git a/templates/package-builder/src/yeoman/.gitignore b/templates/package-builder/src/yeoman/.gitignore deleted file mode 100644 index 2ccbe465..00000000 --- a/templates/package-builder/src/yeoman/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules/ diff --git a/templates/package-builder/src/yeoman/README.md b/templates/package-builder/src/yeoman/README.md deleted file mode 100644 index c9640e02..00000000 --- a/templates/package-builder/src/yeoman/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Generates ASP.NET Core projects for single-page applications. - -Can generate projects with: - - * Angular 2 - * Knockout - * React - * React with Redux - -For more information about features and usage, see [this blog post](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/). - -To learn more about the underlying technologies, or to report any issues, see [this project's GitHub repo](https://github.com/aspnet/JavaScriptServices). diff --git a/templates/package-builder/src/yeoman/app/index.ts b/templates/package-builder/src/yeoman/app/index.ts deleted file mode 100644 index ffe764d5..00000000 --- a/templates/package-builder/src/yeoman/app/index.ts +++ /dev/null @@ -1,129 +0,0 @@ -import * as path from 'path'; -import * as yeoman from 'yeoman-generator'; -import * as uuid from 'node-uuid'; -import * as glob from 'glob'; -import * as semver from 'semver'; -import { execSync } from 'child_process'; -import npmWhich = require('npm-which'); -const yosay = require('yosay'); -const toPascalCase = require('to-pascal-case'); -const isWindows = /^win/.test(process.platform); - -type YeomanPrompt = (opt: yeoman.IPromptOptions | yeoman.IPromptOptions[], callback: (answers: any) => void) => void; -const optionOrPrompt: YeomanPrompt = require('yeoman-option-or-prompt'); - -const templates = [ - { value: 'angular-2', name: 'Angular 2' }, - { value: 'aurelia', name: 'Aurelia' }, - { value: 'knockout', name: 'Knockout' }, - { value: 'react', name: 'React' }, - { value: 'react-redux', name: 'React with Redux' } -]; - -class MyGenerator extends yeoman.Base { - private _answers: any; - private _optionOrPrompt: YeomanPrompt; - - constructor(args: string | string[], options: any) { - super(args, options); - this._optionOrPrompt = optionOrPrompt; - this.log(yosay('Welcome to the ASP.NET Core Single-Page App generator!')); - - if (isWindows) { - assertNpmVersionIsAtLeast('3.0.0'); - } - } - - prompting() { - const done = this.async(); - - this.option('projectguid'); - this._optionOrPrompt([{ - type: 'list', - name: 'framework', - message: 'Framework', - choices: templates - }, { - type: 'input', - name: 'name', - message: 'Your project name', - default: this.appname - }], answers => { - this._answers = answers; - this._answers.namePascalCase = toPascalCase(answers.name); - this._answers.projectGuid = this.options['projectguid'] || uuid.v4(); - done(); - }); - } - - writing() { - var templateRoot = this.templatePath(this._answers.framework); - glob.sync('**/*', { cwd: templateRoot, dot: true, nodir: true }).forEach(fn => { - // Token replacement in filenames - let outputFn = fn.replace(/tokenreplace\-([^\.\/]*)/g, (substr, token) => this._answers[token]); - - // Rename template_gitignore to .gitignore in output - if (path.basename(fn) === 'template_gitignore') { - outputFn = path.join(path.dirname(fn), '.gitignore'); - } - - // Likewise, output template_nodemodules_placeholder.txt as node_modules/_placeholder.txt - // This is a workaround for https://github.com/aspnet/JavaScriptServices/issues/235. We need the new project - // to have a nonempty node_modules dir as far as *source control* is concerned. So, there's a gitignore - // rule that explicitly causes node_modules/_placeholder.txt to be tracked in source control. But how - // does that file get there in the first place? It's not enough for such a file to exist when the - // generator-aspnetcore-spa NPM package is published, because NPM doesn't allow any directories called - // node_modules to exist in the package. So we have a file with at a different location, and move it - // to node_modules as part of executing the template. - if (path.basename(fn) === 'template_nodemodules_placeholder.txt') { - outputFn = path.join(path.dirname(fn), 'node_modules', '_placeholder.txt'); - } - - this.fs.copyTpl( - path.join(templateRoot, fn), - this.destinationPath(outputFn), - this._answers - ); - }); - } - - installingDeps() { - // If available, restore dependencies using Yarn instead of NPM - const yarnPath = getPathToExecutable('yarn'); - if (!!yarnPath) { - this.log('Will restore NPM dependencies using \'yarn\' installed at ' + yarnPath); - this.npmInstall = (pkgs, options, cb) => { - return (this as any).runInstall(yarnPath, pkgs, options, cb); - }; - } - - this.installDependencies({ - npm: true, - bower: false, - callback: () => { - this.spawnCommandSync('dotnet', ['restore']); - this.spawnCommandSync('./node_modules/.bin/webpack', ['--config', 'webpack.config.vendor.js']); - this.spawnCommandSync('./node_modules/.bin/webpack'); - } - }); - } -} - -function getPathToExecutable(executableName: string) { - try { - return npmWhich(__dirname).sync(executableName); - } catch(ex) { - return null; - } -} - -function assertNpmVersionIsAtLeast(minVersion: string) { - const runningVersion = execSync('npm -v').toString(); - if (!semver.gte(runningVersion, minVersion, /* loose */ true)) { - console.error(`This generator requires NPM version ${minVersion} or later. You are running NPM version ${runningVersion}`); - process.exit(0); - } -} - -declare var module: any; -(module).exports = MyGenerator; diff --git a/templates/package-builder/src/yeoman/package.json b/templates/package-builder/src/yeoman/package.json deleted file mode 100644 index fc9ac7d9..00000000 --- a/templates/package-builder/src/yeoman/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "generator-aspnetcore-spa", - "version": "0.4.2", - "description": "Single-Page App templates for ASP.NET Core", - "author": "Microsoft", - "license": "Apache-2.0", - "files": [ - "app" - ], - "keywords": [ - "yeoman-generator" - ], - "bugs": { - "url": "https://github.com/aspnet/JavaScriptServices/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/aspnet/JavaScriptServices.git" - }, - "dependencies": { - "glob": "^7.0.3", - "node-uuid": "^1.4.7", - "npm-which": "^3.0.1", - "to-pascal-case": "^1.0.0", - "yeoman-generator": "^0.20.2", - "yeoman-option-or-prompt": "^1.0.2", - "yosay": "^1.1.1" - } -} diff --git a/templates/package-builder/tsconfig.json b/templates/package-builder/tsconfig.json deleted file mode 100644 index 2bc7f668..00000000 --- a/templates/package-builder/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node", - "target": "es5", - "outDir": "tmp", - "sourceMap": false, - "lib": ["es6"] - }, - "exclude": [ - "**/node_modules", - "dist" - ] -} diff --git a/templates/package-builder/typings/gitignore-parser/gitignore-parser.d.ts b/templates/package-builder/typings/gitignore-parser/gitignore-parser.d.ts deleted file mode 100644 index e265ba89..00000000 --- a/templates/package-builder/typings/gitignore-parser/gitignore-parser.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module 'gitignore-parser' { - export function compile(gitignoreContents: string): any; -} diff --git a/templates/package-builder/typings/npm-which/npm-which.d.ts b/templates/package-builder/typings/npm-which/npm-which.d.ts deleted file mode 100644 index 3959c5b4..00000000 --- a/templates/package-builder/typings/npm-which/npm-which.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module 'npm-which' { - interface NpmWhichContext { - sync(executableName: string): string; - } - - function defaultFunction(rootDir: string) : NpmWhichContext; - export = defaultFunction; -} diff --git a/version.props b/version.props new file mode 100644 index 00000000..71a78cdd --- /dev/null +++ b/version.props @@ -0,0 +1,12 @@ + + + 3.0.0 + alpha1 + $(VersionPrefix) + $(VersionPrefix)-$(VersionSuffix)-final + t000 + a- + $(FeatureBranchVersionPrefix)$(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) + $(VersionSuffix)-$(BuildNumber) + +
    -
    - -
    -

    {{ albumData.Artist.Name }}

    -
    -
    -
    - -
    -

    {{ albumData.Genre.Name }}

    -
    -
    -
    - -
    -

    {{ albumData.Title }}

    -
    -
    -
    - -
    -

    {{ albumData.Price | currency:'USD':true }}

    -
    -
    -
    - -
    -

    {{ albumData.AlbumArtUrl }}

    -
    -
    -
    - -
    - {{ albumData.Title }} -
    -
    -
    -
    - Edit - - Back to List -
    -
    -