[Spa] Introduces NoSpaFrontEnd (hidden) option for testing purposes (#15)
In order for us to ensure the templates are up to date with the latest changes on the .NET runtime, we want to have some tests that are able to build them (and run the server part independently) if necessary.
For that matter, we are introducing the NoSpaFrontEnd option which is hidden from the users and that can be specified in tests to remove all integration with the SPA frontend.
We will continue droping the files on disk, but there will be no npm restore during build nor we will try to launch the SPA proxy when the app launches.
We will have some tests on the ASP.NET Core repo that install the templates package produced by the repo and build the templates to at least catch build breaks that changes on ASP.NET Core can cause.
* Get local builds working
- no solution file or build scripts but `dotnet pack` does the trick
- last part of #32027 unless we need Arcade or a CI build urgently
Main work was to add a few missing files and modify them for this environment
- mostly copied from dotnet/aspnetcore
- Directory.Build.props and Directory.Build.targets created from scratch
- some content copied from dotnet/arcade and dotnet/aspnetcore
- NuGet.config and eng/Versions.props copied but pared down (a lot) to mandatory bits for an isolated build
- new eng/ files mostly came from src/ProjectTemplates/ in dotnet/aspnetcore
- eng/DotNetPackageIcon.png came from src/Microsoft.DotNet.Arcade.Sdk/tools/Assets/ in dotnet/arcade
- eng/Packaging.targets copied from src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets in dotnet/arcade
nits:
- fix whitespace Directory.Build.targets target added to `$(Description)`
- fix typo in the `_AppendRepositoryUrlToPackageDescription` target name
- remove src/.gitignore and move content into new root .gitignore file
- remove SECURITY.md trailing whitespace
* Update templates baseline for recent changes
* Add using alias to fix type name conflict in templates that were missed in the previous set of changes.
* Update SPA templates
- Use top-level statements
- Use minimal hosting APIs
- dotnet/aspnetcore#33947dotnet/aspnetcore#33944
* Fix nullable issue in Blazor Server template
Commit migrated from dotnet/aspnetcore@4cdd594dad
* Add description to package
* Automatically resolve proxy target based on available environment variables
* Introduce a temporary page while the proxy is launching and redirect to the proxy page when visiting the backend for the first time
* Switch to probing the proxy on a per-request basis. This helps in cases where the user closes the proxy window (for example when the app is run without debugging via Ctrl+F5) in IIS Express scenarios.
Commit migrated from dotnet/aspnetcore@64efb3eea5
This reverts commit c6346a336a.
It breaks or templates, we can make this change once we are consuming an SDK version that has the right bits.
Commit migrated from dotnet/aspnetcore@131d207102
Updates the react template to use the http-proxy-middleware for handling
the requests instead of the asp.net core proxy in the same way it's done
for the Angular template.
Commit migrated from dotnet/aspnetcore@e5667a925e
* A new package Microsoft.AspNetCore.SpaProxy has been added that is
used by the templates to launch their development proxy via npm/yarn.
* The SPA development proxy for each CLI now is the frontend for the
application and proxies the requests to the backend which is the
ASP.NET Core application.
* At publish time the application assets are copied to the wwwroot.
* SpaServices.Extensions has been removed from the templates since it is
no longer needed. MapFallbackToFile("index.html") handles unknown
requests and serves the SPA entry point.
* The templates have been updated to keep using HTTPS with the SPA proxy
configured to use the ASP.NET Core HTTPS development certificate via a
new aspnetcore-https.js file that ships within the template.
* The configuration for angular has been updated with a proxy.conf.js
file to proxy requests to the backend.
* The entry point for the application in development is now
https://localhost:5002 when using https and http://localhost:5002
otherwise.
Commit migrated from dotnet/aspnetcore@6bc4b79f4e
* Use Random.Shared
Use the new .NET 6 Random.Shared static property where possible.
See https://github.com/dotnet/runtime/pull/50297.
* Revert WebApi-CSharp changes
For some reason I don't understand, this template doesn't see Random.Shared when compiled so this reverts the previous change for this template.
Commit migrated from dotnet/aspnetcore@2458822000