Skip to content

Merge blazor-wasm in to master #22296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 289 commits into from
May 29, 2020
Merged

Merge blazor-wasm in to master #22296

merged 289 commits into from
May 29, 2020

Conversation

pranavkm
Copy link
Contributor

No description provided.

pranavkm and others added 30 commits February 12, 2020 14:20
* Build against the 3.1.0 AspNetCore

The version of the runtime that projects compile against
is stamped in to the runtimeconfig.json. In an earlier change, the AspNetCoreRef version
was bumped up to 3.1.2 which causes running dotnet dev-serve to fail
if you do not have the runtime installed.

In addition, the template json allows roll-forwards to major version (5.0 versions) if that's the only version
available. We do this with the razor compiler:
https://github.com/dotnet/aspnetcore-tooling/blob/master/src/Razor/src/Microsoft.AspNetCore.Razor.Tools/runtimeconfig.template.json
…203.1 (#19017)

- Microsoft.AspNetCore.Blazor.Mono - 3.2.0-preview1.20103.1
…213.5 (#19034)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.20113.5
- Microsoft.DotNet.GenAPI - 1.0.0-beta.20113.5
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.20113.5
…213.1 (#19039)

- Microsoft.AspNetCore.Blazor.Mono - 3.2.0-preview1.20113.1
* Add service worker

* Add manifest

* Bring back BaselineTest.cs

* Add baselines for blazorwasm templates

* Add publishing test for PWA template

* Baseline fixes

* Fix baseline test logic to allow for multi-project outputs

* Remove non-blazorwasm baselines, since this branch now only covers blazorwasm

* Add test for PWA publish output

* Beginning generation of assets manifest

* Generate assets manifest including blazor outputs

* Tweaks

* Write assets manifest in JSON form

* Publish service worker

* Better API

* More resilience

* Better API again

* Make ComputeBlazorAssetsManifestItems public as people will need to customize the list

* Exclude service worker files from assets manifest

* Use web standard format for hash

* Update project template

* In assets manifest, only include items being published

* Renames

* Compute default assets manifest version by combining hashes

* Emit sw manifest in .js form

* Update service worker in project

* Actually isolate browser instances when requested during E2E tests

* E2E test for published PWA operating offline

* Fix SWAM path in template

* Clarify targets
when attempting to enable client debugging on blazor-wasm an attempt to
provide a helpful message casues an ¨Unknown OS platform¨ exception

relates to #16366 #12970
* Adds a Microsoft.AspNetCore.Components.WebAssembly.Authentication
  library for performing authentication in Blazor webassembly.
* Includes a default implementation that supports OIDC capable IdPs
  using oidc-client.js
* Includes multiple primitives to deal with authentication flows and
  supports acquiring access tokens to call APIs.
  * RemoteAuthenticatorView is responsible for handling authentication
    operations at the user interface level.
  * RemoteAuthenticatorService is responsible for handling the lower
    level authentication details by using JavaScript interop to interact
    with the underlying javascript library implementing the auth protocol.
  * SignOutSessionStateManager handles CSRF protection for the logout
    path.
  * IAccessTokenProvider handles provisioning access tokens to call APIs.
* [Blazor] Adds a project template option for individual auth
* Handles hosted scenarios with Identity Server.
* Handles non-hosted scenarios with oidc-client.js.
* Handles AAD and B2C scenarios with an MSAL library (disabled for now).
* Adds additional scenarios to address #17011
* Include commit hash so we can track the build of Blazor WASM associated with a perf run
* Port some infrastructure fixes from master

Fixes #17011
* Make the dev-server log less
* Allow loading a user configured settings file
* [Blazor] Move Blazor to use Static Web Assets
* Plugs-in Blazor wasm through the static web assets infrastructure.
* Avoids the need for a custom Blazor.config file.
* Removes broken auto-rebuild and debug support.
* Removes unnecessary server-side Blazor helpers.
* Rename Blazor.Mono -> Components.WebAssembly.Runtime
* Update launchSettings.json for BlazorWASM

* Remove the `useWebAssemblyDebugging` setting as its no longer needed
…219.1 (#19167)

- Microsoft.AspNetCore.Components.WebAssembly.Runtime - 3.2.0-preview2.20119.1
…219.2 (#19169)

- Microsoft.AspNetCore.Components.WebAssembly.Runtime - 3.2.0-preview2.20119.2
Move to MapBlazorWebAssemblyApplication as the way to map blazor files into a hosted application.
…19119)

* [Blazor][Wasm] Move HttpClient from default services to extension method (#16929)

* Apply suggestions from code review

Co-authored-by: Steve Sanderson <[email protected]>
…220.1 (#19210)

- Microsoft.AspNetCore.Components.WebAssembly.Runtime - 3.2.0-preview2.20120.1
pranavkm and others added 10 commits May 11, 2020 10:46
* Add a scenario for measuring navigating between components

* Apply suggestions from code review

Co-authored-by: Steve Sanderson <[email protected]>

Co-authored-by: Steve Sanderson <[email protected]>
* Fixup JS

* Avoid monkey patching
* Undo overzealous merge choices
* Undo temporary changes applied when part of the repo was building in the blazor-wasm branch
* Skip SPA template tests in 3.1
* Fix logging config and output redirection in DebugProxy
* Log all messages from DebugProxy
@pranavkm pranavkm force-pushed the prkrishn/merge-into-master branch 3 times, most recently from 6299a84 to b3292fe Compare May 28, 2020 17:21
@Pilchie Pilchie added the area-blazor Includes: Blazor, Razor Components label May 28, 2020
@pranavkm pranavkm force-pushed the prkrishn/merge-into-master branch from b3292fe to 276b6eb Compare May 28, 2020 19:50
* Cleanup bad merge
* Update to dotnet-serve that supports arbitrary ports
@pranavkm pranavkm force-pushed the prkrishn/merge-into-master branch from 276b6eb to 592dfe1 Compare May 28, 2020 22:44
@pranavkm pranavkm marked this pull request as ready for review May 29, 2020 01:45
@pranavkm pranavkm requested a review from a team May 29, 2020 01:45
@pranavkm
Copy link
Contributor Author

592dfe1 has most of the master specific changes.

@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-serve": {
"version": "1.5.0",
"version": "1.7.125",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version supports assigning dotnet-serve a random port.

@@ -11,6 +11,12 @@
],
"dotnet/x86": [
"$(MicrosoftNETCoreAppInternalPackageVersion)"
],
"aspnetcore/x64": [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dotnet-serve doesn't roll forward to a 5.0 runtime.

{
public readonly struct DevelopmentCertificate
{
public DevelopmentCertificate(string certificatePath, string certificatePassword, string certificateThumbprint)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @javiercn

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

"09732173-2cef-46b7-83db-1334bcb079d3", // Tenant ID
"53bc9b9d-9d6a-45d4-8429-2a2761773502" // Client ID
],
"identity": "Microsoft.Web.Blazor.Wasm.CSharp.5.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @phenning

@@ -36,6 +37,12 @@ Update this list when preparing for a new patch.
<Package Id="Microsoft.AspNetCore.Components.Authorization" Version="3.1.4" />
<Package Id="Microsoft.AspNetCore.Components.Forms" Version="3.1.4" />
<Package Id="Microsoft.AspNetCore.Components.Web" Version="3.1.4" />
<Package Id="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the 3.2.0-preview1 versions above be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Let me get this in and I'll follow up with a clean up

Copy link
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than the 1 question (which might also apply to the 3.1 PR)

@@ -0,0 +1,59 @@
# Uses Scheduled Triggers, which aren't supported in YAML yet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scheduled triggers are supported in YAML. Suggest folllowing up to move the configuration from AzDO to here and to explicitly exlude other executions of this pipeline e.g.

pr: none
trigger: none
schedules:
- cron: "0 */12 * * *"
  branches:
    include:
    - master
  always: true

@@ -9,9 +9,9 @@
-->
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="3.2.0-preview1.20067.1">
<Dependency Name="Microsoft.AspNetCore.Components.WebAssembly.Runtime" Version="3.2.0">
<Uri>https://github.com/dotnet/blazor</Uri>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When will dotnet/blazor no longer be used?

the package with IncludeAssets="compile".
-->
<ItemGroup>
<_HttpHandlerAssembly Include="@(_BlazorUserRuntimeAssembly)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What reads @(_HttpHandlerAssembly) items?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.