From 8bc00d5d64e0517c879c94414fa0e92eb79cf248 Mon Sep 17 00:00:00 2001 From: khamzakhamza Date: Wed, 20 Mar 2024 16:44:58 +0000 Subject: [PATCH 1/4] Extended Blazor server and WebAssembly options to match web format. --- src/Components/Web.JS/src/Boot.Server.ts | 3 ++- src/Components/Web.JS/src/Boot.WebAssembly.ts | 3 ++- .../Web.JS/src/Platform/Circuits/CircuitStartOptions.ts | 2 ++ .../Web.JS/src/Platform/WebAssemblyStartOptions.ts | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Components/Web.JS/src/Boot.Server.ts b/src/Components/Web.JS/src/Boot.Server.ts index 824c12546963..786b92694563 100644 --- a/src/Components/Web.JS/src/Boot.Server.ts +++ b/src/Components/Web.JS/src/Boot.Server.ts @@ -18,7 +18,8 @@ function boot(userOptions?: Partial): Promise { } started = true; - const configuredOptions = resolveOptions(userOptions); + const normalizedOptions = userOptions?.circuit ?? userOptions; + const configuredOptions = resolveOptions(normalizedOptions); setCircuitOptions(Promise.resolve(configuredOptions || {})); JSEventRegistry.create(Blazor); diff --git a/src/Components/Web.JS/src/Boot.WebAssembly.ts b/src/Components/Web.JS/src/Boot.WebAssembly.ts index ca1523f60f1c..3b54502272af 100644 --- a/src/Components/Web.JS/src/Boot.WebAssembly.ts +++ b/src/Components/Web.JS/src/Boot.WebAssembly.ts @@ -20,7 +20,8 @@ async function boot(options?: Partial): Promise { } started = true; - setWebAssemblyOptions(Promise.resolve(options || {})); + const normalizedOptions = options?.webAssembly ?? options; + setWebAssemblyOptions(Promise.resolve(normalizedOptions || {})); JSEventRegistry.create(Blazor); const webAssemblyComponents = discoverComponents(document, 'webassembly') as WebAssemblyComponentDescriptor[]; diff --git a/src/Components/Web.JS/src/Platform/Circuits/CircuitStartOptions.ts b/src/Components/Web.JS/src/Platform/Circuits/CircuitStartOptions.ts index 935282a685f0..4bc19a77ebbe 100644 --- a/src/Components/Web.JS/src/Platform/Circuits/CircuitStartOptions.ts +++ b/src/Components/Web.JS/src/Platform/Circuits/CircuitStartOptions.ts @@ -20,6 +20,8 @@ export interface CircuitStartOptions { reconnectionHandler?: ReconnectionHandler; initializers : ServerInitializers; circuitHandlers: CircuitHandler[]; + // Exists for compatibility with WebStartOptions. + circuit?: CircuitStartOptions; } export function resolveOptions(userOptions?: Partial): CircuitStartOptions { diff --git a/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts b/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts index 6eec9e2b9a1e..fdec303cfa19 100644 --- a/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts +++ b/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts @@ -34,6 +34,11 @@ export interface WebAssemblyStartOptions { * Allows to override .NET runtime configuration. */ configureRuntime(builder: DotnetHostBuilder): void; + + /** + * Exists for compatibility with WebStartOptions. + */ + webAssembly?: WebAssemblyStartOptions; } // This type doesn't have to align with anything in BootConfig. From 6c2a0ef0d4c6729d68a6a122dd691edc64111179 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 6 May 2024 12:24:39 +0000 Subject: [PATCH 2/4] Update .NET SDK Update .NET SDK to version 9.0.100-preview.5.24253.17. --- updated-dependencies: - dependency-name: Microsoft.NET.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: github-actions[bot] --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index 33d29182d231..ba7648e43a2b 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "9.0.100-preview.4.24207.7" + "version": "9.0.100-preview.5.24253.17" }, "tools": { - "dotnet": "9.0.100-preview.4.24207.7", + "dotnet": "9.0.100-preview.5.24253.17", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" From 9af6c14921a9af8a45e14c68b183e94ee64a9c0f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 10 Jun 2024 12:27:40 +0000 Subject: [PATCH 3/4] Update .NET SDK Update .NET SDK to version 9.0.100-preview.6.24309.2. --- updated-dependencies: - dependency-name: Microsoft.NET.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: github-actions[bot] --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index ba7648e43a2b..35fa3a5d73df 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "9.0.100-preview.5.24253.17" + "version": "9.0.100-preview.6.24309.2" }, "tools": { - "dotnet": "9.0.100-preview.5.24253.17", + "dotnet": "9.0.100-preview.6.24309.2", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" From 8c8df2834c015a4be6d2f0e8173cbffc29643f2e Mon Sep 17 00:00:00 2001 From: khamzakhamza Date: Sun, 1 Sep 2024 14:49:15 +0100 Subject: [PATCH 4/4] Update dotnet version --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index 35fa3a5d73df..583bcb88a5bd 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "9.0.100-preview.6.24309.2" + "version": "9.0.100-preview.7.24407.12" }, "tools": { - "dotnet": "9.0.100-preview.6.24309.2", + "dotnet": "9.0.100-preview.7.24407.12", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"