Commit Graph

157 Commits

Author SHA1 Message Date
Pranav K a7c2d25ffa
Remove constraints on WebAssembly.Build package
Make Blazor-Wasm projects not-packable by default
2020-04-02 15:13:35 -07:00
Pranav K 0c614ff9c7
Fixup 2020-04-02 15:13:34 -07:00
Pranav K a9494214fa
Preserve files being published to the publish root and the wwwroot
Fixes https://github.com/dotnet/aspnetcore/issues/19926
2020-04-02 15:13:33 -07:00
Steve Sanderson 113cb5422d
Support JsonStringEnumConverter. Fixes #19086 (#20446)
* Fix serializing enums. Fixes #19086

* Add E2E test
2020-04-02 16:09:34 +01:00
Steve Sanderson ae569e2b48
Add some extra publish integration tests, plus fix publish-from-VS-with-RID (#20410)
* Add detailed integration tests for publishing service workers, assets manifests, and blazor.boot.json
* Fix publishing from VS with non-portable RID
2020-04-01 13:35:30 -07:00
Steve Sanderson aeff119dc4
Blazor dev server: serve all files (#20355)
* Serve all files in development. Fixes #19931

* Dev server code tidy
2020-03-31 16:08:22 +01:00
Steve Sanderson 05ee136e87 Rename site.css to app.css. Fixes #19779 2020-03-31 12:31:57 +01:00
Safia Abdalla cba5387f28
Bring back logic to remove unwanted env variables (#20326) 2020-03-30 12:34:19 -07:00
Pranav K fa2db44d89
Update WebAssemblyHost.cs 2020-03-29 19:08:10 -07:00
Pranav K 248b31e0fb
Load satellite resources before rendering components 2020-03-29 15:20:59 -07:00
Pranav K 56b944f46c
Fix missing pdbs in Blazor build (#20257)
* Fix missing pdbs in Blazor build

* Allow tests to run in Debug and Release independent of the configuration test project is built in

Fixes https://github.com/dotnet/aspnetcore/issues/20242
2020-03-28 14:50:11 -07:00
Steve Sanderson c379bae8e9
Fix SWAM hash (#20240) 2020-03-28 17:53:46 +00:00
Pranav K 82d05ae785
Add support for loading satellite assemblies (#20033)
* Add support for loading satellite assemblies

Fixes #17016
2020-03-26 13:58:00 -07:00
Pranav K cb6858fe31
Update to using System.Net.Http.Json (#20195) 2020-03-26 10:13:23 -07:00
Javier Calvarro Nelson b0a95d05e0
[Blazor] Auth fixes (#20191)
* Adds MetadataAddress property to OidcProviderOptions.
* Sets defaults for the Msal cache location on the provider initialization.
* Updates the template to avoid redirecting to the login page if the user is already authenticated.
* Fixes startup APIs for AddRemoteAuthentication.
* Fixes TryGetToken for the Blazor MSAL library when the token can't be acquired silently.
2020-03-26 09:07:46 -07:00
Pranav K de2fa4c69c Update versions
* Update Blazor version to preview4
* Update ASP.NET Core references to 3.1.3
* Remove DisableImplicitComponentsAnalyzers workaround
2020-03-25 15:59:17 -07:00
Steve Sanderson bbe9cca327
Write hash to service worker on publish (#20131)
* Write SWAM version into service worker output

* Update project template

* Add publishing test

* Update src/Components/WebAssembly/Build/src/targets/ServiceWorkerAssetsManifest.targets

Co-Authored-By: Pranav K <prkrishn@hotmail.com>

* Add E2E test for hosted PWA too

* Avoid test clashes

* E2E test fix

* E2E test fix

* E2E test fix

Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-03-25 20:06:03 +00:00
Pranav K 47536a3c14
Blazor wasm preview4 (#20117)
* Restore public API contract on WebAssemblyJSRuntime (#19968)

* Shrink icon-512.png (#19999)

* Use custom DebugProxyHost to initialize DebugProxy config (#19980)

Addresses #19909

* Spruce up WebAssemblyHostEnvironment interface and use (#20008)

* Load .dlls/.wasm/.pdb in parallel with dotnet.*.js. Fixes #18898 (#20029)

* Add BaseAddress property to WebAssemblyHostEnvironment (#20019)

- Adds `BaseAddress` to `IWebAssemblyHostEnvironment`
- Uses unmarshalled APIs to extract application host
- Move NavigationManager initialization to startup code
- Fix subdir mapping in ClientSideHostingTest

Addresses #19910

Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
Co-authored-by: Safia Abdalla <safia@safia.rocks>
Co-authored-by: Safia Abdalla <safia@microsoft.com>
2020-03-25 01:51:55 +00:00
Pranav K cb293661e1
Make extensions
Make WebAssemblyJSRuntime interop-specific overloads extension methods
2020-03-17 09:49:27 -07:00
Pranav K c37f3fefce
Turn on scope validation for service provider
Fixes https://github.com/dotnet/aspnetcore/issues/9365
2020-03-16 16:20:02 -07:00
Steve Sanderson f1b812e21e
Update ws-proxy code (#19826) 2020-03-13 11:34:09 +00:00
Steve Sanderson 9343d2bca0
Log unhandled exceptions to custom logger (#19606) 2020-03-13 10:40:02 +00:00
Steve Sanderson 2e9bb2ff5f
Debug proxy as external tool (#19767) 2020-03-12 18:42:13 +00:00
Pranav K 147c39289a
Add support for configuration (#19544)
* Add support for configuration

Fixes https://github.com/dotnet/aspnetcore/issues/18675
2020-03-12 11:38:06 -07:00
Pranav K a0c76e5a4c
Rename WebAssembly.JSInterop -> Microsoft.JSInterop.WebAssembly 2020-03-10 13:42:35 -07:00
Pranav K 6833facda4
Use TargetPath in blazor dev server (#19658)
The linker's changed since the issue report and correctly resolves paths.
However the dev-server was doing weird things to calculate the path to the output.

Fixes https://github.com/dotnet/aspnetcore/issues/18288
2020-03-10 11:06:15 -07:00
Javier Calvarro Nelson adc81c94de
[Blazor] Fix default value for response type (#19706) 2020-03-09 11:54:51 -07:00
Pranav K 247c0ddae9
Make BlazorLinkerDescriptor public (#19649)
This was accidentally made non-public as part of the API review
2020-03-06 10:18:53 -08:00
Pranav K e40fc36783
Update debug proxy to match 5973519784 (#19618) 2020-03-05 15:26:32 -08:00
Pranav K b02978e0d8
React to dotnet.js having a version number (#19603) 2020-03-05 14:36:32 -08:00
msftbot[bot] 28c44ce1c1
[Blazor] API cleanups for the authentication Package (#19601)
* Add missing OIDC provider options

* Convert string to enum

* Revert changes to JS files
2020-03-05 14:47:47 +00:00
msftbot[bot] e5cd390a8c
Update ws-proxy to match Mono commit 4c348d6567f42be (#19600) 2020-03-05 14:46:56 +00:00
Javier Calvarro Nelson e15e1c2415
[Blazor] Fix incrementalism with unlinked files (#19596) 2020-03-05 05:44:08 -08:00
Steve Sanderson fee14d8e13 Update debug proxy to match Mono commit b91580bafa7208b4a52d66cfadce070551f1904a 2020-03-03 11:43:55 +00:00
Javier Calvarro Nelson 085f6e1585
[Blazor][Fixes #19503] Exclude gzip files from manifest (#19525)
* Exclude gzip files from manifest
* Add a test to validate the service-worker manifest
2020-03-03 03:41:58 -08:00
Javier Calvarro Nelson 2b72b637bf
[Blazor][Wasm] Add missing state callbacks (#19405)
* Adds missing callback when logging in and logging out successfully
2020-02-27 09:48:48 -08:00
Steve Sanderson eed3605ae5
In debug mode, don't enable the linker by default (plus other minor build fixes) (#19374)
* In debug mode, don't enable the linker by default

* Fixup

* Update Blazor.MonoRuntime.targets

* Ensure we have a true/false value. Stop inferring from BlazorLinkOnBuild.

* Avoid doing work for ServiceWorkerAssetsManifest when it's not being used

* React to BlazorLinkOnBuild->BlazorWebAssemblyEnableLinking rename

Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-02-27 11:49:47 +00:00
Javier Calvarro Nelson b2d01f80d3
[Blazor] Fix error handling in AuthorizeService.ts 2020-02-26 09:08:38 -08:00
Steve Sanderson f3633f3c38
Remove unused DevToolsClient.cs source file (#19364) 2020-02-26 15:33:31 +00:00
Steve Sanderson 34b165a0ef
Update Mono debug proxy (#19335)
* Update to match Mono sources at a8d34b2

* Update to match Mono sources at fafa41f

* Update to match Mono sources at ed012b6

* Change class/struct/enum types to internal

* Use ILogger in proxy code

* Update to match https://github.com/mono/mono/pull/19026
2020-02-25 14:51:46 +00:00
Steve Sanderson bfcf72dfdf
Fix boot json on mac/linux (#19332) 2020-02-25 11:48:31 +00:00
Javier Calvarro Nelson 226f461806
[Blazor] Remove compression middleware from the template (#19285)
Remove response compression from the template
2020-02-24 11:03:00 -08:00
Ryan Nowak 9c16db3e89 Add service provider factory support
Fixes: #18814

This adds back support on the Blazor WASM Host for using
ISerivceProviderFactory<>.

We previously had this support when the Blazor WASM host was a clone of
generic host, but I accidentally lost it when simplifying the host
(sorry :( ).
2020-02-21 16:28:17 -08:00
Pranav K 7ba8d06717
BlazorWASM: API review (#19219)
Fixes https://github.com/dotnet/aspnetcore/issues/13174
2020-02-21 12:58:02 -08:00
Steve Sanderson 6fe946e633
Blazor WebAssembly caching fixes (#19235)
* Support logging errors that happen really early

* Tolerate all the ways caching might be unavailable

* Include dotnet.js in blazor.boot.json

* Reorganize boot manifest to categorize files by role, not just by filename extension

* Enable cache-busting and SRI check on dotnet.js

* Change cache-busting to vary filename, not using querystring. Needed to make PWA manifest still work.
2020-02-21 17:35:36 +00:00
Javier Calvarro Nelson c9c06f573d
[Blazor] Adds support for statically pre-compressing assets using gzip (#19157)
* Adds a task to perform gzip compession.
* Gzips framework files incrementally
* Serves pre-compressed versions of the framework files when possible.
2020-02-21 09:32:07 -08:00
Javier Calvarro Nelson 0541e19ac2
[Blazor][Wasm] Adds support for AAD and AADB2C using msal.js (#19190)
* Adds a new library Microsoft.Authentication.WebAssembly.Msal that handles authentication for Blazor Webassembly applications using msal.js
2020-02-21 09:12:36 -08:00
Pranav K 4715de45eb
Fixup RuntimeDependenciesResolver test (#19208)
Fixes https://github.com/dotnet/aspnetcore/issues/12059
2020-02-21 08:35:20 -08:00
Javier Calvarro Nelson 9ded8e17d4
Change MapBlazorWebAssemblyApplication to UseBlazorFrameworkFiles (#19198) 2020-02-21 04:20:41 -08:00
Marlon Regenhardt 6a85855fbb
[Blazor][Wasm] Move HttpClient from default services to Program.Main (#19119)
* [Blazor][Wasm] Move HttpClient from default services to extension method (#16929)

* Apply suggestions from code review

Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
2020-02-20 10:47:49 -08:00
Javier Calvarro Nelson c39bc6a6bd
[Blazor] Move to MapBlazorWebAssemblyApplication (#19147)
Move to MapBlazorWebAssemblyApplication as the way to map blazor files into a hosted application.
2020-02-19 23:56:43 -08:00
Pranav K 1dfbe75e9f
Rename Blazor.Mono -> Components.WebAssembly.Runtime (#19124)
* Rename Blazor.Mono -> Components.WebAssembly.Runtime
2020-02-19 09:06:50 -08:00
Javier Calvarro Nelson 0e155fd7ca
[Fixes #12588][Blazor] Move Blazor to use Static Web Assets (#18409)
* [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.
2020-02-19 04:05:03 -08:00
Pranav K 52c4598618
Fixup 2020-02-18 15:26:15 -08:00
Pranav K 92409e2e57 Make the dev-server log less (#18971)
* Make the dev-server log less
* Allow loading a user configured settings file
2020-02-18 15:08:30 -08:00
Pranav K e521205b5d
Rename Blazor.Mono -> Components.WebAssembly.Runtime 2020-02-18 14:16:59 -08:00
Pranav K c935e9aa2d
Blazor WebAssembly package renames (#19026)
Fixes https://github.com/dotnet/aspnetcore/issues/18384
2020-02-18 10:54:28 -08:00